@ecodev/natural 45.0.0 → 45.0.1

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.
@@ -2,7 +2,6 @@ import { SelectionModel } from '@angular/cdk/collections';
2
2
  import { FlatTreeControl } from '@angular/cdk/tree';
3
3
  import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
4
4
  import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
5
- import { Observable } from 'rxjs';
6
5
  import { NaturalAbstractController } from '../../../classes/abstract-controller';
7
6
  import { NaturalSearchFacets } from '../../search/types/facet';
8
7
  import { NaturalSearchSelections } from '../../search/types/values';
@@ -96,20 +95,20 @@ export declare class NaturalHierarchicSelectorComponent extends NaturalAbstractC
96
95
  /**
97
96
  * Created to collapse all children when closing a parent, but not sure it's good.
98
97
  */
99
- getChildren(): (node: HierarchicModelNode) => Observable<HierarchicModelNode[]>;
98
+ private getChildren;
100
99
  /**
101
100
  * Transforms a HierarchicModelNode into a FlatNode
102
101
  */
103
- transformer(): (node: HierarchicModelNode, level: number) => HierarchicFlatNode;
102
+ private transformer;
104
103
  /**
105
104
  * Return deep of the node in the tree
106
105
  */
107
- getLevel(): (node: HierarchicFlatNode) => number;
106
+ private getLevel;
108
107
  /**
109
108
  * Is always expandable because we load on demand, we don't know if there are children yet
110
109
  */
111
- isExpandable(): (node: HierarchicFlatNode) => boolean;
112
- getOrCreateFlatNode(node: HierarchicModelNode, level: number): HierarchicFlatNode;
110
+ private isExpandable;
111
+ private getOrCreateFlatNode;
113
112
  search(selections: NaturalSearchSelections): void;
114
113
  private loadRoots;
115
114
  /**
@@ -1,18 +1,14 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import { BehaviorSubject, Observable } from 'rxjs';
3
- import { NaturalQueryVariablesManager, QueryVariables } from '../../../classes/query-variable-manager';
3
+ import { QueryVariables } from '../../../classes/query-variable-manager';
4
4
  import { HierarchicFlatNode } from '../classes/flat-node';
5
- import { NaturalHierarchicConfiguration, NaturalHierarchicServiceConfiguration } from '../classes/hierarchic-configuration';
5
+ import { NaturalHierarchicConfiguration } from '../classes/hierarchic-configuration';
6
6
  import { HierarchicFiltersConfiguration } from '../classes/hierarchic-filters-configuration';
7
7
  import { HierarchicModelNode } from '../classes/model-node';
8
8
  import * as i0 from "@angular/core";
9
9
  export interface OrganizedModelSelection {
10
10
  [key: string]: any[];
11
11
  }
12
- interface ContextualizedConfig {
13
- configuration: NaturalHierarchicServiceConfiguration;
14
- variablesManager: NaturalQueryVariablesManager;
15
- }
16
12
  export declare class NaturalHierarchicSelectorService {
17
13
  private readonly injector;
18
14
  /**
@@ -20,7 +16,7 @@ export declare class NaturalHierarchicSelectorService {
20
16
  * This observable contains Node.
21
17
  * When it's updated, the TreeController and TreeFlattener process the new array to generate the flat tree.
22
18
  */
23
- dataChange: BehaviorSubject<HierarchicModelNode[]>;
19
+ readonly dataChange: BehaviorSubject<HierarchicModelNode[]>;
24
20
  /**
25
21
  * Configuration for relations and selection constraints
26
22
  *
@@ -43,13 +39,9 @@ export declare class NaturalHierarchicSelectorService {
43
39
  * Retrieve elements from the server
44
40
  * Get root elements if node is null, or child elements if node is given
45
41
  */
46
- getList(node?: HierarchicFlatNode | null, contextFilters?: HierarchicFiltersConfiguration | null, searchVariables?: QueryVariables | null): Observable<HierarchicModelNode[]>;
42
+ private getList;
47
43
  countItems(node: HierarchicFlatNode, contextFilters?: HierarchicFiltersConfiguration | null): void;
48
- getContextualizedConfigs(node?: HierarchicFlatNode | null, contextFilters?: HierarchicFiltersConfiguration | null, searchVariables?: QueryVariables | null): ContextualizedConfig[];
49
- /**
50
- * Check configuration to return a boolean that allows or denies the selection for the given element
51
- */
52
- isSelectable(node: HierarchicFlatNode): boolean;
44
+ private getContextualizedConfigs;
53
45
  /**
54
46
  * Return models matching given FlatNodes
55
47
  * Returns a Literal of models grouped by their configuration attribute "selectableAtKey"
@@ -87,4 +79,3 @@ export declare class NaturalHierarchicSelectorService {
87
79
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalHierarchicSelectorService, never>;
88
80
  static ɵprov: i0.ɵɵInjectableDeclaration<NaturalHierarchicSelectorService>;
89
81
  }
90
- export {};
@@ -137,7 +137,7 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
137
137
  */
138
138
  getInput(object: Literal): Vcreate['input'] | Vupdate['input'];
139
139
  /**
140
- * Return the number of objects matching the query
140
+ * Return the number of objects matching the query. It may never complete.
141
141
  *
142
142
  * This is used for the unique validator
143
143
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "45.0.0",
3
+ "version": "45.0.1",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,