@elderbyte/ngx-starter 19.12.0 → 19.13.0

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.
Files changed (33) hide show
  1. package/fesm2022/elderbyte-ngx-starter.mjs +1898 -1247
  2. package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
  3. package/lib/common/data/datasource/curated/curated-data-source.d.ts +43 -0
  4. package/lib/common/data/datasource/curated/curated-list-data-source.d.ts +24 -0
  5. package/lib/common/data/datasource/curated/curated-paged-data-source.d.ts +30 -0
  6. package/lib/common/data/datasource/data-source-base.d.ts +3 -2
  7. package/lib/common/data/datasource/entity-id-util.d.ts +4 -1
  8. package/lib/common/data/datasource/local/local-list-data-source.d.ts +7 -4
  9. package/lib/common/data/datasource/public_api.d.ts +4 -0
  10. package/lib/common/forms/elder-multi-entity-value-accessor.d.ts +4 -20
  11. package/lib/common/forms/entities-change-event.d.ts +19 -0
  12. package/lib/common/forms/public_api.d.ts +2 -0
  13. package/lib/common/forms/value-accessor-base.d.ts +14 -7
  14. package/lib/common/forms/value-change-event.d.ts +6 -0
  15. package/lib/common/utils/local-data-filter.d.ts +44 -11
  16. package/lib/common/utils/object-path-resolver.d.ts +15 -0
  17. package/lib/components/data-view/table/elder-table/elder-table.component.d.ts +20 -11
  18. package/lib/components/data-view/table/table-navigation/table-navigation.component.d.ts +47 -0
  19. package/lib/components/select/filter/elder-chip-filter-style-resolver.d.ts +2 -2
  20. package/lib/components/select/filter/elder-chips-include-exclude.directive.d.ts +7 -6
  21. package/lib/components/select/filter/include-exclude-selection-model.d.ts +19 -16
  22. package/lib/components/select/multi/elder-multi-select-base.d.ts +19 -10
  23. package/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips-options.directive.d.ts +42 -0
  24. package/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.d.ts +3 -2
  25. package/lib/components/select/multi/public_api.d.ts +1 -0
  26. package/lib/components/time/elder-local-date-input/elder-local-date-input.component.d.ts +3 -1
  27. package/lib/components/time/elder-toggle-text-input.directive.d.ts +34 -0
  28. package/lib/components/time/public_api.d.ts +1 -0
  29. package/lib/components/time/smart-local-date-parser.service.d.ts +9 -0
  30. package/package.json +1 -1
  31. package/src/assets/i18n/de.json +1 -1
  32. package/src/lib/components/data-view/table/table-navigation/table-navigation.component.scss +0 -0
  33. package/theming/components/_elder-table-theme.scss +1 -1
@@ -1,8 +1,8 @@
1
1
  import { Observable } from 'rxjs';
2
- export declare class IncludeExcludeState {
3
- readonly id: string;
2
+ export declare class IncludeExcludeState<TId = string> {
3
+ readonly id: TId;
4
4
  mode: IncludeExcludeValue;
5
- constructor(id: string, mode: IncludeExcludeValue);
5
+ constructor(id: TId, mode: IncludeExcludeValue);
6
6
  }
7
7
  export declare enum IncludeExcludeValue {
8
8
  NEUTRAL = "NEUTRAL",
@@ -10,7 +10,7 @@ export declare enum IncludeExcludeValue {
10
10
  EXCLUDE = "EXCLUDE"
11
11
  }
12
12
  export type IncludeExcludeCycleStrategy = 'TOGGLE' | 'FULL_CYCLE';
13
- export declare class IncludeExcludeSelectionModel {
13
+ export declare class IncludeExcludeSelectionModel<TId = string> {
14
14
  /***************************************************************************
15
15
  * *
16
16
  * Fields *
@@ -19,7 +19,7 @@ export declare class IncludeExcludeSelectionModel {
19
19
  private readonly log;
20
20
  private _strategy;
21
21
  private _defaultInitialValue;
22
- private readonly stateById$;
22
+ private readonly _stateById$;
23
23
  /***************************************************************************
24
24
  * *
25
25
  * Constructor *
@@ -31,8 +31,8 @@ export declare class IncludeExcludeSelectionModel {
31
31
  * Properties *
32
32
  * *
33
33
  **************************************************************************/
34
- get selection(): IncludeExcludeState[];
35
- get selection$(): Observable<IncludeExcludeState[]>;
34
+ get selection(): IncludeExcludeState<TId>[];
35
+ get selection$(): Observable<IncludeExcludeState<TId>[]>;
36
36
  get strategy(): IncludeExcludeCycleStrategy;
37
37
  set strategy(strategy: IncludeExcludeCycleStrategy);
38
38
  get defaultInitialValue(): IncludeExcludeValue;
@@ -42,16 +42,18 @@ export declare class IncludeExcludeSelectionModel {
42
42
  * Public API *
43
43
  * *
44
44
  **************************************************************************/
45
- findIncluded(): string[];
46
- findExcluded(): string[];
47
- cycleExisting(id: string): IncludeExcludeState | null;
48
- initTo(ids: string[], initialValueOverride?: IncludeExcludeValue): void;
45
+ findIncluded(): TId[];
46
+ findExcluded(): TId[];
47
+ cycleExisting(id: TId): IncludeExcludeState<TId> | null;
48
+ initTo(ids: TId[], initialValueOverride?: IncludeExcludeValue): void;
49
+ resetAllTo(initialValueOverride?: IncludeExcludeValue): void;
50
+ resetTo(ids: TId[], resetValue: IncludeExcludeValue | undefined): void;
49
51
  clear(): void;
50
- replaceSelection(newStates: IncludeExcludeState[]): void;
51
- updateState(id: string, mode: IncludeExcludeValue): IncludeExcludeState;
52
- updateStates(newStates: IncludeExcludeState[]): void;
53
- isInMode(id: string, mode: IncludeExcludeValue): boolean;
54
- findStateById(searchedId: string): IncludeExcludeState | null;
52
+ replaceSelection(newStates: IncludeExcludeState<TId>[]): void;
53
+ updateState(id: TId, mode: IncludeExcludeValue): IncludeExcludeState<TId>;
54
+ updateStates(newStates: IncludeExcludeState<TId>[]): void;
55
+ isInMode(id: TId, mode: IncludeExcludeValue): boolean;
56
+ findStateById(searchedId: TId): IncludeExcludeState<TId> | null;
55
57
  /***************************************************************************
56
58
  * *
57
59
  * Private methods *
@@ -61,4 +63,5 @@ export declare class IncludeExcludeSelectionModel {
61
63
  private nextValueToggle;
62
64
  private nextValueFullCycle;
63
65
  private toStateMap;
66
+ private replaceStateMap;
64
67
  }
@@ -3,6 +3,7 @@ import { IDataContext } from '../../../common/data/data-context/data-context';
3
3
  import { Observable } from 'rxjs';
4
4
  import { IElderMultiEntityValueAccessor } from '../../../common/forms/elder-multi-entity-value-accessor';
5
5
  import { Sort } from '../../../common/data/sort';
6
+ import { EntitiesChangeEvent } from '../../../common/forms/entities-change-event';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
8
9
  * Base component implementation of elder-multi-select.
@@ -22,6 +23,7 @@ export declare abstract class ElderMultiSelectBase<TId, TEntity, TValue> extends
22
23
  private readonly logger;
23
24
  private readonly _entityIds$;
24
25
  private readonly _entities$;
26
+ private readonly dialogService;
25
27
  /**
26
28
  * Defines how the entities should be sorted locally.
27
29
  * This affects how entities are displayed when more than
@@ -33,26 +35,29 @@ export declare abstract class ElderMultiSelectBase<TId, TEntity, TValue> extends
33
35
  * the user will be prompted to confirm.
34
36
  */
35
37
  confirmRemoval: boolean;
36
- readonly entityIdsChange: Observable<TId[]>;
37
- readonly entitiesChange: Observable<TEntity[]>;
38
+ readonly entitiesChangeEvent: Observable<EntitiesChangeEvent<TId, TEntity>>;
38
39
  /**
39
- * Similar to entity-id change, but emits only when the user
40
- * has updated the value.
40
+ * @deprecated Switch to entitiesChangeEvent
41
41
  */
42
- readonly entityIdsUpdated: Observable<TId[]>;
42
+ readonly entitiesChange: Observable<TEntity[]>;
43
43
  /**
44
- * Similar to entity change, but emits only when the user
45
- * has updated the value.
44
+ * @deprecated Switch to entitiesChangeEvent (filter by userInitiated)
46
45
  */
47
46
  readonly entitiesUpdated: Observable<TEntity[]>;
48
- private readonly dialogService;
47
+ /**
48
+ * @deprecated Switch to entitiesChangeEvent
49
+ */
50
+ readonly entityIdsChange: Observable<TId[]>;
51
+ /**
52
+ * @deprecated Switch to entitiesChangeEvent (filter by userInitiated)
53
+ */
54
+ readonly entityIdsUpdated: Observable<TId[]>;
49
55
  /***************************************************************************
50
56
  * *
51
57
  * Constructor *
52
58
  * *
53
59
  **************************************************************************/
54
60
  protected constructor(controlType: string);
55
- private awaitEntitiesWithId;
56
61
  /***************************************************************************
57
62
  * *
58
63
  * Host Bindings *
@@ -107,6 +112,10 @@ export declare abstract class ElderMultiSelectBase<TId, TEntity, TValue> extends
107
112
  * Private Methods *
108
113
  * *
109
114
  **************************************************************************/
115
+ private buildEntitiesChangeEvent;
116
+ private awaitEntitiesWithIdToMap;
117
+ private toEntityByIdMap;
118
+ private containsAllIds;
110
119
  private isAlreadyPresent;
111
120
  private entityIdsFromValues;
112
121
  private entityIdFromValue;
@@ -123,5 +132,5 @@ export declare abstract class ElderMultiSelectBase<TId, TEntity, TValue> extends
123
132
  private writeEntitiesSorted;
124
133
  private sortEntities;
125
134
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderMultiSelectBase<any, any, any>, never>;
126
- static ɵdir: i0.ɵɵDirectiveDeclaration<ElderMultiSelectBase<any, any, any>, never, never, { "entitiesSorts": { "alias": "entitiesSorts"; "required": false; }; "confirmRemoval": { "alias": "confirmRemoval"; "required": false; }; "entities": { "alias": "entities"; "required": false; }; "entityIds": { "alias": "entityIds"; "required": false; }; }, { "entityIdsChange": "entityIdsChange"; "entitiesChange": "entitiesChange"; "entityIdsUpdated": "entityIdsUpdated"; "entitiesUpdated": "entitiesUpdated"; }, never, never, true, never>;
135
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderMultiSelectBase<any, any, any>, never, never, { "entitiesSorts": { "alias": "entitiesSorts"; "required": false; }; "confirmRemoval": { "alias": "confirmRemoval"; "required": false; }; "entities": { "alias": "entities"; "required": false; }; "entityIds": { "alias": "entityIds"; "required": false; }; }, { "entitiesChangeEvent": "entitiesChangeEvent"; "entitiesChange": "entitiesChange"; "entitiesUpdated": "entitiesUpdated"; "entityIdsChange": "entityIdsChange"; "entityIdsUpdated": "entityIdsUpdated"; }, never, never, true, never>;
127
136
  }
@@ -0,0 +1,42 @@
1
+ import { DestroyRef, OnInit } from '@angular/core';
2
+ import { ElderMultiSelectChipsComponent } from './elder-multi-select-chips.component';
3
+ import { IncludeExcludeSelectionModel } from '../../filter/include-exclude-selection-model';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ElderMultiSelectChipsOptionsDirective<TId, TEntity> implements OnInit {
6
+ private multiSelect;
7
+ private inclExclModel;
8
+ destroyRef: DestroyRef;
9
+ /***************************************************************************
10
+ * *
11
+ * Fields *
12
+ * *
13
+ **************************************************************************/
14
+ private readonly log;
15
+ readonly maxOptions: import("@angular/core").InputSignal<number>;
16
+ private readonly inControlOfOptions;
17
+ /***************************************************************************
18
+ * *
19
+ * Constructor *
20
+ * *
21
+ **************************************************************************/
22
+ constructor(multiSelect: ElderMultiSelectChipsComponent<TId, TEntity>, inclExclModel: IncludeExcludeSelectionModel<TEntity> | undefined, destroyRef: DestroyRef);
23
+ /***************************************************************************
24
+ * *
25
+ * Life Cycle *
26
+ * *
27
+ **************************************************************************/
28
+ ngOnInit(): void;
29
+ /***************************************************************************
30
+ * *
31
+ * Private methods *
32
+ * *
33
+ **************************************************************************/
34
+ private get dataContext$();
35
+ private autoReloadOnDataChangeEvents;
36
+ private subscribeToEntities;
37
+ private applyAllOptions;
38
+ private isOptionInUse;
39
+ private startDataContextIfNeeded;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderMultiSelectChipsOptionsDirective<any, any>, [null, { optional: true; }, null]>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderMultiSelectChipsOptionsDirective<any, any>, "elder-multi-select-chips[elderShowOptions]", never, { "maxOptions": { "alias": "maxOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
42
+ }
@@ -33,7 +33,8 @@ export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TV
33
33
  */
34
34
  chipSpecFn: (e: TEntity) => SelectChipSpec;
35
35
  selectable: boolean;
36
- allowRemove: boolean;
36
+ readonly allowRemoveInput: import("@angular/core").InputSignalWithTransform<boolean, import("@angular/cdk/coercion").BooleanInput>;
37
+ readonly allowRemove: import("@angular/core").WritableSignal<boolean>;
37
38
  allowSorting: boolean;
38
39
  stacked: boolean;
39
40
  maxDisplayCount: number;
@@ -89,6 +90,6 @@ export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TV
89
90
  private reduceDisplayedChips;
90
91
  private buildIndicatorChip;
91
92
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderMultiSelectChipsComponent<any, any, any>, never>;
92
- static ɵcmp: i0.ɵɵComponentDeclaration<ElderMultiSelectChipsComponent<any, any, any>, "elder-multi-select-chips", never, { "defaultChipSpec": { "alias": "defaultChipSpec"; "required": false; }; "chipSpecFn": { "alias": "chipSpecFn"; "required": false; }; "allowRemove": { "alias": "allowRemove"; "required": false; }; "allowSorting": { "alias": "allowSorting"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "maxDisplayCount": { "alias": "maxDisplayCount"; "required": false; }; "chipTemplate": { "alias": "chipTemplate"; "required": false; }; "chipAvatarTemplate": { "alias": "chipAvatarTemplate"; "required": false; }; "customInputTemplate": { "alias": "customInputTemplate"; "required": false; }; }, {}, ["_customChipInput", "chipTemplateQuery", "chipAvatarTemplateQuery", "customInputTemplateQuery"], never, true, never>;
93
+ static ɵcmp: i0.ɵɵComponentDeclaration<ElderMultiSelectChipsComponent<any, any, any>, "elder-multi-select-chips", never, { "defaultChipSpec": { "alias": "defaultChipSpec"; "required": false; }; "chipSpecFn": { "alias": "chipSpecFn"; "required": false; }; "allowRemoveInput": { "alias": "allowRemove"; "required": false; "isSignal": true; }; "allowSorting": { "alias": "allowSorting"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "maxDisplayCount": { "alias": "maxDisplayCount"; "required": false; }; "chipTemplate": { "alias": "chipTemplate"; "required": false; }; "chipAvatarTemplate": { "alias": "chipAvatarTemplate"; "required": false; }; "customInputTemplate": { "alias": "customInputTemplate"; "required": false; }; }, {}, ["_customChipInput", "chipTemplateQuery", "chipAvatarTemplateQuery", "customInputTemplateQuery"], never, true, never>;
93
94
  }
94
95
  export {};
@@ -1,4 +1,5 @@
1
1
  export * from './elder-multi-select-base';
2
2
  export * from './elder-multi-select-form-field';
3
3
  export * from './elder-multi-select-chips/select-chip-spec';
4
+ export * from './elder-multi-select-chips/elder-multi-select-chips-options.directive';
4
5
  export * from './elder-multi-select-chip-options/select-option-chip-spec';
@@ -5,8 +5,10 @@ import { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepi
5
5
  import { IsoDateStr } from '../../../common/time/date-util';
6
6
  import { BooleanInput } from '@angular/cdk/coercion';
7
7
  import { ElderFormFieldControlBase } from '../../../common/forms/elder-form-field-control-base.directive';
8
+ import { SmartLocalDateParserService } from '../smart-local-date-parser.service';
8
9
  import * as i0 from "@angular/core";
9
10
  export declare class ElderLocalDateInputComponent extends ElderFormFieldControlBase<LocalDate> {
11
+ private readonly localDateParser;
10
12
  /***************************************************************************
11
13
  * *
12
14
  * Fields *
@@ -36,7 +38,7 @@ export declare class ElderLocalDateInputComponent extends ElderFormFieldControlB
36
38
  * Constructor *
37
39
  * *
38
40
  **************************************************************************/
39
- constructor();
41
+ constructor(localDateParser: SmartLocalDateParserService);
40
42
  /***************************************************************************
41
43
  * *
42
44
  * Properties *
@@ -0,0 +1,34 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ElderToggleTextInputDirective {
4
+ private inputRef;
5
+ /***************************************************************************
6
+ * *
7
+ * Fields *
8
+ * *
9
+ **************************************************************************/
10
+ private originalInputType;
11
+ /***************************************************************************
12
+ * *
13
+ * Constructor *
14
+ * *
15
+ **************************************************************************/
16
+ constructor(inputRef: ElementRef<HTMLInputElement>);
17
+ /***************************************************************************
18
+ * *
19
+ * Host Listener *
20
+ * *
21
+ **************************************************************************/
22
+ onDoubleClick(event: MouseEvent): void;
23
+ onFocusOut(event: FocusEvent): void;
24
+ /***************************************************************************
25
+ * *
26
+ * Private Methods *
27
+ * *
28
+ **************************************************************************/
29
+ private setInputType;
30
+ private rememberOriginalInputType;
31
+ private restoreOriginalInputType;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderToggleTextInputDirective, never>;
33
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderToggleTextInputDirective, "input[elderToggleTextInput]", never, {}, {}, never, never, true, never>;
34
+ }
@@ -5,3 +5,4 @@ export * from './duration/iso-duration-str';
5
5
  export * from './period/period-bucket';
6
6
  export * from './period/period-format';
7
7
  export * from './elder-time.module';
8
+ export * from './elder-toggle-text-input.directive';
@@ -0,0 +1,9 @@
1
+ import { LocalDate } from '@js-joda/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SmartLocalDateParserService {
4
+ private readonly formatters;
5
+ constructor();
6
+ tryParse(dateString: string): LocalDate | null;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartLocalDateParserService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<SmartLocalDateParserService>;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "19.12.0",
3
+ "version": "19.13.0",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^18.0.0 || ^19.0.0",
6
6
  "@angular/common": "^18.0.0 || ^19.0.0",
@@ -92,7 +92,7 @@
92
92
 
93
93
  "paginator": {
94
94
  "itemCountSeparator": "von",
95
- "itemsPerPage": "Elemente pro Seite",
95
+ "itemsPerPage": "",
96
96
  "firstPage": "Erste Seite",
97
97
  "lastPage": "Letzte Seite",
98
98
  "nextPage": "Nächste Seite",
@@ -43,7 +43,7 @@
43
43
  color: gray;
44
44
  }
45
45
 
46
- .elder-table-footer {
46
+ .elder-table-navigation-bar {
47
47
  height: var(--elder-data-element-footer-height);
48
48
  }
49
49