@dcupl/common 1.5.11 → 1.6.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 (39) hide show
  1. package/dist/lib-cjs/cache.controller.d.ts +1 -0
  2. package/dist/lib-cjs/cache.controller.js +10 -0
  3. package/dist/lib-cjs/cache.controller.js.map +1 -1
  4. package/dist/lib-cjs/computeSuggestions.js +2 -2
  5. package/dist/lib-cjs/computeSuggestions.js.map +1 -1
  6. package/dist/lib-cjs/index.d.ts +2 -2
  7. package/dist/lib-cjs/index.js +2 -2
  8. package/dist/lib-cjs/index.js.map +1 -1
  9. package/dist/lib-cjs/types/dcupl.types.d.ts +21 -0
  10. package/dist/lib-cjs/types/index.d.ts +4 -3
  11. package/dist/lib-cjs/types/index.js +4 -3
  12. package/dist/lib-cjs/types/index.js.map +1 -1
  13. package/dist/lib-cjs/types/model.types.d.ts +32 -37
  14. package/dist/lib-cjs/types/model.types.js +14 -1
  15. package/dist/lib-cjs/types/model.types.js.map +1 -1
  16. package/dist/lib-cjs/types/quality.types.d.ts +72 -0
  17. package/dist/lib-cjs/types/quality.types.js +3 -0
  18. package/dist/lib-cjs/types/quality.types.js.map +1 -0
  19. package/dist/lib-esm/cache.controller.d.ts +1 -0
  20. package/dist/lib-esm/cache.controller.js +10 -0
  21. package/dist/lib-esm/cache.controller.js.map +1 -1
  22. package/dist/lib-esm/computeSuggestions.js +2 -2
  23. package/dist/lib-esm/computeSuggestions.js.map +1 -1
  24. package/dist/lib-esm/index.d.ts +2 -2
  25. package/dist/lib-esm/index.js +2 -2
  26. package/dist/lib-esm/index.js.map +1 -1
  27. package/dist/lib-esm/types/dcupl.types.d.ts +21 -0
  28. package/dist/lib-esm/types/index.d.ts +4 -3
  29. package/dist/lib-esm/types/index.js +4 -3
  30. package/dist/lib-esm/types/index.js.map +1 -1
  31. package/dist/lib-esm/types/model.types.d.ts +32 -37
  32. package/dist/lib-esm/types/model.types.js +13 -0
  33. package/dist/lib-esm/types/model.types.js.map +1 -1
  34. package/dist/lib-esm/types/quality.types.d.ts +72 -0
  35. package/dist/lib-esm/types/quality.types.js +2 -0
  36. package/dist/lib-esm/types/quality.types.js.map +1 -0
  37. package/dist/tsconfig-cjs.tsbuildinfo +1 -1
  38. package/dist/tsconfig.tsbuildinfo +1 -1
  39. package/package.json +1 -1
@@ -6,5 +6,6 @@ export declare class CacheController {
6
6
  set(key: string, context: any, value: any): void;
7
7
  has(key: string, context: any): boolean;
8
8
  clear(): void;
9
+ generateContext(constext: any): any;
9
10
  getCacheName(key: string, context: any): string;
10
11
  }
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CacheController = void 0;
7
+ var lodash_1 = require("lodash");
7
8
  var object_hash_1 = __importDefault(require("object-hash"));
8
9
  var CacheController = /** @class */ (function () {
9
10
  function CacheController(enabled) {
@@ -26,6 +27,15 @@ var CacheController = /** @class */ (function () {
26
27
  CacheController.prototype.clear = function () {
27
28
  this.cache.clear();
28
29
  };
30
+ CacheController.prototype.generateContext = function (constext) {
31
+ try {
32
+ return (0, lodash_1.cloneDeep)(constext);
33
+ }
34
+ catch (err) {
35
+ console.log('error in cache generateContext', err);
36
+ return constext;
37
+ }
38
+ };
29
39
  CacheController.prototype.getCacheName = function (key, context) {
30
40
  var hash = (0, object_hash_1.default)(context);
31
41
  return key + '_' + hash;
@@ -1 +1 @@
1
- {"version":3,"file":"cache.controller.js","sourceRoot":"","sources":["../../src/cache.controller.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAqC;AAErC;IAGE,yBAAmB,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAEM,6BAAG,GAAV,UAAW,GAAW,EAAE,OAAY;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,S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CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IAEM,6BAAG,GAAV,UAAW,GAAW,EAAE,OAAY,EAAE,KAAU;QAC9C,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC;IAEM,6BAAG,GAAV,UAAW,GAAW,EAAE,OAAY;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IAEM,+BAAK,GAAZ;QACE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEM,yCAAe,GAAtB,UAAuB,QAAa;QAClC,IAAI;YACF,OAAO,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAC;SAC5B;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;YACnD,OAAO,QAAQ,CAAC;SACjB;IACH,CAAC;IAEM,sCAAY,GAAnB,UAAoB,GAAW,EAAE,OAAY;QAC3C,IAAM,IAAI,GAAG,IAAA,qBAAU,EAAC,OAAO,CAAC,CAAC;QACjC,OAAO,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;IAC1B,CAAC;IACH,sBAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,0CAAe"}
@@ -51,14 +51,14 @@ function computeSuggestions(data, index, options, queryManager) {
51
51
  if (isRelevantAttributeIndex && (relevantSearchTerm === '' || relevantSearchTerm === '//')) {
52
52
  var suggestion = {
53
53
  value: key,
54
- keys: value,
54
+ keys: options.calculateResultKeys ? value : [],
55
55
  };
56
56
  suggestions.push(suggestion);
57
57
  }
58
58
  else if (isRelevantAttributeIndex && queryManager.queryFind(relevantKey, relevantSearchTerm, 'some')) {
59
59
  var suggestion = {
60
60
  value: key,
61
- keys: value,
61
+ keys: options.calculateResultKeys ? value : [],
62
62
  };
63
63
  suggestions.push(suggestion);
64
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"computeSuggestions.js","sourceRoot":"","sources":["../../src/computeSuggestions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAgB,kBAAkB,CAChC,IAA2B,EAC3B,KAA4B,EAC5B,OAA0B,EAC1B,YAA0B;;IAE1B,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;QAChB,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;KAClB;IACD,IAAM,WAAW,GAAiB,EAAE,CAAC;IAErC,IAAM,kBAAkB,GAAG,OAAO,CAAC,SAAS;QAC1C,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;QAC/D,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;;QAElB,KAA2B,IAAA,KAAA,SAAA,KAAK,CAAC,OAAO,EAAE,CAAA,gBAAA,4BAAE;YAAjC,IAAA,KAAA,mBAAY,EAAX,GAAG,QAAA,EAAE,KAAK,QAAA;YACpB,IAAM,wBAAwB,GAAG,KAAK,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAd,CAAc,CAAC,CAAC;YAEtE,IAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAElG,IAAI,OAAO,CAAC,iBAAiB,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE;gBAC3D,SAAS;aACV;YAED,IAAI,OAAO,CAAC,YAAY,IAAI,GAAG,KAAK,I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AAC;AA/CD,gDA+CC"}
@@ -1,6 +1,6 @@
1
1
  export * from './analytics.controller';
2
- export * from './changeDetection';
3
2
  export * from './cache.controller';
3
+ export * from './changeDetection';
4
4
  export * from './computeSuggestions';
5
5
  export * from './getAggregation';
6
6
  export * from './getFacets';
@@ -9,8 +9,8 @@ export * from './indices.controller';
9
9
  export * from './performance';
10
10
  export * from './pivot';
11
11
  export * from './property-parser';
12
- export * from './script.controller';
13
12
  export * from './query-builder';
14
13
  export * from './query.helper';
15
14
  export * from './queryData';
15
+ export * from './script.controller';
16
16
  export * from './types';
@@ -15,8 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./analytics.controller"), exports);
18
- __exportStar(require("./changeDetection"), exports);
19
18
  __exportStar(require("./cache.controller"), exports);
19
+ __exportStar(require("./changeDetection"), exports);
20
20
  __exportStar(require("./computeSuggestions"), exports);
21
21
  __exportStar(require("./getAggregation"), exports);
22
22
  __exportStar(require("./getFacets"), exports);
@@ -25,9 +25,9 @@ __exportStar(require("./indices.controller"), exports);
25
25
  __exportStar(require("./performance"), exports);
26
26
  __exportStar(require("./pivot"), exports);
27
27
  __exportStar(require("./property-parser"), exports);
28
- __exportStar(require("./script.controller"), exports);
29
28
  __exportStar(require("./query-builder"), exports);
30
29
  __exportStar(require("./query.helper"), exports);
31
30
  __exportStar(require("./queryData"), exports);
31
+ __exportStar(require("./script.controller"), exports);
32
32
  __exportStar(require("./types"), exports);
33
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,oDAAkC;AAClC,qDAAmC;AACnC,uDAAqC;AACrC,mDAAiC;AACjC,8CAA4B;AAC5B,2CAAyB;AACzB,uDAAqC;AACrC,gDAA8B;AAC9B,0CAAwB;AACxB,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAChC,iDAA+B;AAC/B,8CAA4B;AAC5B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,mDAAiC;AACjC,8CAA4B;AAC5B,2CAAyB;AACzB,uDAAqC;AACrC,gDAA8B;AAC9B,0CAAwB;AACxB,oDAAkC;AAClC,kDAAgC;AAChC,iDAA+B;AAC/B,8CAA4B;AAC5B,sDAAoC;AACpC,0CAAwB"}
@@ -8,19 +8,40 @@ import { DcuplGlobalQueryOptions } from './query.types';
8
8
  import { SuggestionOptions } from './suggestion.types';
9
9
  export type DcuplInitOptions = {
10
10
  config?: DcuplInitConfig;
11
+ /**
12
+ * deprecated - use config.quality instead
13
+ */
11
14
  errorTracking?: DcuplInitErrorTrackingConfig;
15
+ /**
16
+ * Enables/disables the model & data quality checks
17
+ */
18
+ quality?: DcuplInitQualityConfig;
19
+ /**
20
+ * Fine tune performance settings
21
+ */
12
22
  performance?: DcuplInitPerformanceConfig;
13
23
  analytics?: DcuplInitErrorAnalyticsConfig;
14
24
  referenceMetadata?: DcuplInitReferenceMetadataConfig;
15
25
  };
16
26
  export type DcuplInitPerformanceConfig = {
27
+ /**
28
+ * Enable/disable internal API caching
29
+ */
17
30
  cache?: {
18
31
  enabled: boolean;
19
32
  };
33
+ /**
34
+ * Enable/disable usage of deep data clones
35
+ * This can be useful to avoid side effects when altering data inside your application
36
+ * If you are sure that you are not altering the data you can disable this feature to improve performance
37
+ */
20
38
  clone?: {
21
39
  enabled: boolean;
22
40
  };
23
41
  };
42
+ export type DcuplInitQualityConfig = {
43
+ enabled: boolean;
44
+ };
24
45
  export type DcuplInitErrorTrackingConfig = {
25
46
  enabled: boolean;
26
47
  };
@@ -1,5 +1,5 @@
1
- export * from './app-loader.types';
2
1
  export * from './aggregation.types';
2
+ export * from './app-loader.types';
3
3
  export * from './data.types';
4
4
  export * from './dcupl.types';
5
5
  export * from './facets.types';
@@ -9,10 +9,11 @@ export * from './internal.types';
9
9
  export * from './list.types';
10
10
  export * from './model.types';
11
11
  export * from './projection.types';
12
+ export * from './quality.types';
12
13
  export * from './query.types';
14
+ export * from './rest-api/rest-api.types';
15
+ export * from './runner/runner.types';
13
16
  export * from './section.types';
14
17
  export * from './suggestion.types';
15
18
  export * from './testing.types';
16
19
  export * from './workflow/workflow.types';
17
- export * from './runner/runner.types';
18
- export * from './rest-api/rest-api.types';
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./app-loader.types"), exports);
18
17
  __exportStar(require("./aggregation.types"), exports);
18
+ __exportStar(require("./app-loader.types"), exports);
19
19
  __exportStar(require("./data.types"), exports);
20
20
  __exportStar(require("./dcupl.types"), exports);
21
21
  __exportStar(require("./facets.types"), exports);
@@ -25,11 +25,12 @@ __exportStar(require("./internal.types"), exports);
25
25
  __exportStar(require("./list.types"), exports);
26
26
  __exportStar(require("./model.types"), exports);
27
27
  __exportStar(require("./projection.types"), exports);
28
+ __exportStar(require("./quality.types"), exports);
28
29
  __exportStar(require("./query.types"), exports);
30
+ __exportStar(require("./rest-api/rest-api.types"), exports);
31
+ __exportStar(require("./runner/runner.types"), exports);
29
32
  __exportStar(require("./section.types"), exports);
30
33
  __exportStar(require("./suggestion.types"), exports);
31
34
  __exportStar(require("./testing.types"), exports);
32
35
  __exportStar(require("./workflow/workflow.types"), exports);
33
- __exportStar(require("./runner/runner.types"), exports);
34
- __exportStar(require("./rest-api/rest-api.types"), exports);
35
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,sDAAoC;AACpC,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B;AAC/B,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,qDAAmC;AACnC,gDAA8B;AAC9B,kDAAgC;AAChC,qDAAmC;AACnC,kDAAgC;AAChC,4DAA0C;AAC1C,wDAAsC;AACtC,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B;AAC/B,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,qDAAmC;AACnC,kDAAgC;AAChC,gDAA8B;AAC9B,4DAA0C;AAC1C,wDAAsC;AACtC,kDAAgC;AAChC,qDAAmC;AACnC,kDAAgC;AAChC,4DAA0C"}
@@ -1,7 +1,8 @@
1
1
  import { AggregationOptions, RawItem } from '.';
2
2
  import { PivotOptions } from '../pivot';
3
3
  type AggregationOptionsModel = Omit<AggregationOptions, 'attribute'>;
4
- export type PropertyType = 'string' | 'int' | 'float' | 'json' | 'date' | 'boolean' | 'any' | 'Array<string>' | 'Array<int>' | 'Array<float>' | 'Array<date>';
4
+ export type PropertyType = 'any' | 'Array<date>' | 'Array<float>' | 'Array<int>' | 'Array<string>' | 'boolean' | 'date' | 'float' | 'int' | 'json' | 'string';
5
+ export declare const PropertyTypesAsArray: PropertyType[];
5
6
  export declare const NumberPropertyTypes: PropertyType[];
6
7
  export declare const DatePropertyTypes: PropertyType[];
7
8
  /**
@@ -24,12 +25,22 @@ export type ModelMetadata = {
24
25
  [key: string]: any;
25
26
  };
26
27
  export type FilterComparisonType = 'equal' | 'equalIgnoreCase' | 'contains' | 'containsIgnoreCase' | 'containsIgnoreCaseAndWhitespace';
28
+ export type PropertyAggregate = (PropertyNumber | PropertyString) & {
29
+ aggregate: true;
30
+ };
31
+ export type FilterStringArray = {
32
+ key: string;
33
+ comparisonType: FilterComparisonType;
34
+ };
35
+ export type FilterStringSingle = {
36
+ comparisonType?: FilterComparisonType;
37
+ };
27
38
  /**
28
39
  * A property is a quality or characteristic belonging an object.
29
40
  * @defaultSnippets {"label":"Property", "properties":["key","type"]}
30
41
  *
31
42
  */
32
- type PropertyBase = {
43
+ export type PropertyBase = {
33
44
  /**
34
45
  * A key is an unique identifier overall properties in this model.
35
46
  *
@@ -38,16 +49,18 @@ type PropertyBase = {
38
49
  */
39
50
  key: string;
40
51
  type: PropertyType;
41
- origin?: string;
42
- filter?: boolean | FilterStringSingle | FilterStringArray[] | FilterNumberArray[];
43
- aggregate?: boolean | AggregationOptionsModel;
52
+ expression?: string;
44
53
  derive?: {
45
54
  localReference: string;
46
55
  remoteProperty: string;
47
56
  separator?: string;
48
57
  };
58
+ origin?: string;
59
+ filter?: boolean | FilterStringSingle | FilterStringArray[] | FilterNumberArray[];
60
+ aggregate?: boolean | AggregationOptionsModel;
49
61
  meta?: ModelMetadata;
50
62
  index?: boolean;
63
+ quality?: AttributeQualityConfig;
51
64
  };
52
65
  /**
53
66
  * @defaultSnippets { "label": "String Property", "properties": ["key", "type:string:boolean"] }
@@ -110,33 +123,8 @@ export type PropertyString = PropertyBase & {
110
123
  type: 'string' | 'Array<string>';
111
124
  filter?: boolean | FilterStringSingle | FilterStringArray[];
112
125
  };
113
- /**
114
- * @defaultSnippets { "label": "Dynamic Expression Property", "properties": ["key", "type:string:string", "expression:string:${some_prop}_${another_prop}"] }
115
- */
116
- export type PropertyExpression = PropertyBase & {
117
- type: 'string';
118
- expression: string;
119
- aggregate: boolean | AggregationOptionsModel;
120
- filter?: boolean | FilterStringSingle | FilterStringArray[];
121
- };
122
126
  export type PropertyNumber = PropertyFloat | PropertyInt;
123
- export type Property = PropertyExpression | PropertyString | PropertyInt | PropertyFloat | PropertyDate | PropertyJson | PropertyBoolean | PropertyAny;
124
- export type PropertyDerived = Property & {
125
- derive: {
126
- localReference: string;
127
- remoteProperty: string;
128
- };
129
- };
130
- export type PropertyAggregate = (PropertyNumber | PropertyString) & {
131
- aggregate: true;
132
- };
133
- export type FilterStringArray = {
134
- key: string;
135
- comparisonType: FilterComparisonType;
136
- };
137
- export type FilterStringSingle = {
138
- comparisonType?: FilterComparisonType;
139
- };
127
+ export type Property = PropertyString | PropertyInt | PropertyFloat | PropertyDate | PropertyJson | PropertyBoolean | PropertyAny;
140
128
  /**
141
129
  * Facet calculation is disabled by default
142
130
  */
@@ -161,6 +149,7 @@ export type ReferenceBase = {
161
149
  * @important
162
150
  */
163
151
  key: string;
152
+ type: ReferenceType;
164
153
  /**
165
154
  * The Model this reference is pointing to.
166
155
  *
@@ -168,17 +157,13 @@ export type ReferenceBase = {
168
157
  * @important
169
158
  */
170
159
  model: string;
171
- type: ReferenceType;
172
160
  origin?: string;
173
- /**
174
- * Filtering the values of the reference with or without counting
175
- * @defaultSnippets {"label":"Filter"}
176
- */
177
161
  filter?: boolean | ReferenceFilterDefinition;
178
- validity?: ReferenceValidity;
179
162
  aggregate?: boolean | AggregationOptionsModel;
180
163
  meta?: ModelMetadata;
181
164
  index?: boolean;
165
+ validity?: ReferenceValidity;
166
+ quality?: AttributeQualityConfig;
182
167
  };
183
168
  export type AggregatedReference = ReferenceBase & {
184
169
  aggregate: true;
@@ -272,6 +257,15 @@ export type ValueMappingConfig = {
272
257
  values: ValueMappingValues[];
273
258
  };
274
259
  export type ModelAttribute = Property | Reference;
260
+ export type ModelQualityConfig = {
261
+ enabled?: boolean;
262
+ attributes?: AttributeQualityConfig;
263
+ };
264
+ export type AttributeQualityConfig = {
265
+ required?: boolean;
266
+ nullable?: boolean;
267
+ forceStrictDataType?: boolean;
268
+ };
275
269
  /**
276
270
  * A model describes a real world object and hols attributes.
277
271
  *
@@ -293,6 +287,7 @@ export type ModelDefinition<ModelNames extends string = string> = {
293
287
  keyProperty?: string;
294
288
  valueMappings?: ValueMappingConfig[];
295
289
  meta?: ModelMetadata;
290
+ quality?: ModelQualityConfig;
296
291
  };
297
292
  export type DcuplViewType = 'section' | 'pivot';
298
293
  export type ViewDefinitionBase = {
@@ -1,6 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DatePropertyTypes = exports.NumberPropertyTypes = void 0;
3
+ exports.DatePropertyTypes = exports.NumberPropertyTypes = exports.PropertyTypesAsArray = void 0;
4
+ exports.PropertyTypesAsArray = [
5
+ 'any',
6
+ 'Array<date>',
7
+ 'Array<float>',
8
+ 'Array<int>',
9
+ 'Array<string>',
10
+ 'boolean',
11
+ 'date',
12
+ 'float',
13
+ 'int',
14
+ 'json',
15
+ 'string',
16
+ ];
4
17
  exports.NumberPropertyTypes = ['int', 'float', 'Array<int>', 'Array<float>'];
5
18
  exports.DatePropertyTypes = ['date', 'Array<date>'];
6
19
  //# sourceMappingURL=model.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.types.js","sourceRoot":"","sources":["../../../src/types/model.types.ts"],"names":[],"mappings":";;;AAkBa,QAAA,mBAAmB,GAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACrF,QAAA,iBAAiB,GAAmB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"model.types.js","sourceRoot":"","sources":["../../../src/types/model.types.ts"],"names":[],"mappings":";;;AAkBa,QAAA,oBAAoB,GAAmB;IAClD,KAAK;IACL,aAAa;IACb,cAAc;IACd,YAAY;IACZ,eAAe;IACf,SAAS;IACT,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,QAAQ;CACT,CAAC;AAEW,QAAA,mBAAmB,GAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACrF,QAAA,iBAAiB,GAAmB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC"}
@@ -0,0 +1,72 @@
1
+ export declare namespace QualityAnalyzer {
2
+ type ModelErrorGroup = 'ReferenceDataError' | 'PropertyDataError' | 'DataContainerError' | 'ModelDefinitionError';
3
+ type ModelErrorType = 'UndefinedAttribute' | 'UndefinedValue' | 'NullValue' | 'WrongDataType' | 'NonUniqueKey' | 'MissingModel' | 'MissingProperty' | 'MissingReference' | 'UnknownExpressionVariable' | 'RemoteReferenceKeyNotFound' | 'InvalidModelDefinition';
4
+ type DcuplErrorType = 'model' | 'loader';
5
+ type DcuplErrorBase = {
6
+ key?: string;
7
+ errorGroup: string;
8
+ errorType: string;
9
+ title: string;
10
+ type: DcuplErrorType;
11
+ description?: string;
12
+ meta?: any;
13
+ };
14
+ type InternalModelError = DcuplErrorBase & {
15
+ type: 'model';
16
+ errorGroup: ModelErrorGroup;
17
+ errorType: ModelErrorType;
18
+ model?: string;
19
+ itemKey?: string;
20
+ attribute?: string;
21
+ };
22
+ type LoaderErrorGroup = 'LoaderConfigError' | 'ResourceError';
23
+ type LoaderErrorType = 'InvalidConfig' | 'InvalidResource';
24
+ type LoaderErrors = DcuplErrorBase & {
25
+ type: 'loader';
26
+ errorGroup: LoaderErrorGroup;
27
+ errorType: LoaderErrorType;
28
+ model?: string;
29
+ };
30
+ type DcuplError = InternalModelError | LoaderErrors;
31
+ /**
32
+ * Analytics Values
33
+ */
34
+ type AnalyticsValues = {
35
+ loading: number;
36
+ processing: number;
37
+ startup: number;
38
+ sizes?: {
39
+ totalEncoded?: number;
40
+ totalDecoded?: number;
41
+ unusedDecoded?: number;
42
+ models?: Array<{
43
+ model: string;
44
+ encodedBodySize: number;
45
+ decodedBodySize: number;
46
+ }>;
47
+ };
48
+ unusedAttributes?: UnusedAttribute[];
49
+ errors?: {
50
+ size?: number;
51
+ UndefinedValue?: number;
52
+ UndefinedAttribute?: number;
53
+ WrongDataType?: number;
54
+ MissingModel?: number;
55
+ InvalidModelDescription?: number;
56
+ RemoteReferenceKeyNotFound?: number;
57
+ };
58
+ counts?: {
59
+ resources?: number;
60
+ modelFiles?: number;
61
+ dataFiles?: number;
62
+ models?: number;
63
+ rows?: number;
64
+ attributes?: number;
65
+ dataEntries?: number;
66
+ };
67
+ };
68
+ type UnusedAttribute = {
69
+ model: string;
70
+ attribute: string;
71
+ };
72
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=quality.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality.types.js","sourceRoot":"","sources":["../../../src/types/quality.types.ts"],"names":[],"mappings":""}
@@ -6,5 +6,6 @@ export declare class CacheController {
6
6
  set(key: string, context: any, value: any): void;
7
7
  has(key: string, context: any): boolean;
8
8
  clear(): void;
9
+ generateContext(constext: any): any;
9
10
  getCacheName(key: string, context: any): string;
10
11
  }
@@ -1,3 +1,4 @@
1
+ import { cloneDeep } from 'lodash';
1
2
  import objectHash from 'object-hash';
2
3
  var CacheController = /** @class */ (function () {
3
4
  function CacheController(enabled) {
@@ -20,6 +21,15 @@ var CacheController = /** @class */ (function () {
20
21
  CacheController.prototype.clear = function () {
21
22
  this.cache.clear();
22
23
  };
24
+ CacheController.prototype.generateContext = function (constext) {
25
+ try {
26
+ return cloneDeep(constext);
27
+ }
28
+ catch (err) {
29
+ console.log('error in cache generateContext', err);
30
+ return constext;
31
+ }
32
+ };
23
33
  CacheController.prototype.getCacheName = function (key, context) {
24
34
  var hash = objectHash(context);
25
35
  return key + '_' + hash;
@@ -1 +1 @@
1
- {"version":3,"file":"cache.controller.js","sourceRoot":"","sources":["../../src/cache.controller.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC;IAGE,yBAAmB,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAEM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Y;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IAEM,6BAAG,GAAV,UAAW,GAAW,EAAE,OAAY,EAAE,KAAU;QAC9C,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC;IAEM,6BAAG,GAAV,UAAW,GAAW,EAAE,OAAY;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IAEM,+BAAK,GAAZ;QACE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEM,yCAAe,GAAtB,UAAuB,QAAa;QAClC,IAAI;YACF,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;SAC5B;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;YACnD,OAAO,QAAQ,CAAC;SACjB;IACH,CAAC;IAEM,sCAAY,GAAnB,UAAoB,GAAW,EAAE,OAAY;QAC3C,IAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACjC,OAAO,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;IAC1B,CAAC;IACH,sBAAC;AAAD,CAAC,AAtCD,IAsCC"}
@@ -48,14 +48,14 @@ export function computeSuggestions(data, index, options, queryManager) {
48
48
  if (isRelevantAttributeIndex && (relevantSearchTerm === '' || relevantSearchTerm === '//')) {
49
49
  var suggestion = {
50
50
  value: key,
51
- keys: value,
51
+ keys: options.calculateResultKeys ? value : [],
52
52
  };
53
53
  suggestions.push(suggestion);
54
54
  }
55
55
  else if (isRelevantAttributeIndex && queryManager.queryFind(relevantKey, relevantSearchTerm, 'some')) {
56
56
  var suggestion = {
57
57
  value: key,
58
- keys: value,
58
+ keys: options.calculateResultKeys ? value : [],
59
59
  };
60
60
  suggestions.push(suggestion);
61
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"computeSuggestions.js","sourceRoot":"","sources":["../../src/computeSuggestions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,UAAU,kBAAkB,CAChC,IAA2B,EAC3B,KAA4B,EAC5B,OAA0B,EAC1B,YAA0B;;IAE1B,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;QAChB,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;KAClB;IACD,IAAM,WAAW,GAAiB,EAAE,CAAC;IAErC,IAAM,kBAAkB,GAAG,OAAO,CAAC,SAAS;QAC1C,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;QAC/D,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;;QAElB,KAA2B,IAAA,KAAA,SAAA,KAAK,CAAC,OAAO,EAAE,CAAA,gBAAA,4BAAE;YAAjC,IAAA,KAAA,mBAAY,EAAX,GAAG,QAAA,EAAE,KAAK,QAAA;YACpB,IAAM,wBAAwB,GAAG,KAAK,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAd,CAAc,CAAC,CAAC;YAEtE,IAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAElG,IAAI,OAAO,CAAC,iBAAiB,IAAI,OAAO,G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,GAAG,EAAE;gBACtC,MAAM;aACP;SACF;;;;;;;;;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export * from './analytics.controller';
2
- export * from './changeDetection';
3
2
  export * from './cache.controller';
3
+ export * from './changeDetection';
4
4
  export * from './computeSuggestions';
5
5
  export * from './getAggregation';
6
6
  export * from './getFacets';
@@ -9,8 +9,8 @@ export * from './indices.controller';
9
9
  export * from './performance';
10
10
  export * from './pivot';
11
11
  export * from './property-parser';
12
- export * from './script.controller';
13
12
  export * from './query-builder';
14
13
  export * from './query.helper';
15
14
  export * from './queryData';
15
+ export * from './script.controller';
16
16
  export * from './types';
@@ -1,6 +1,6 @@
1
1
  export * from './analytics.controller';
2
- export * from './changeDetection';
3
2
  export * from './cache.controller';
3
+ export * from './changeDetection';
4
4
  export * from './computeSuggestions';
5
5
  export * from './getAggregation';
6
6
  export * from './getFacets';
@@ -9,9 +9,9 @@ export * from './indices.controller';
9
9
  export * from './performance';
10
10
  export * from './pivot';
11
11
  export * from './property-parser';
12
- export * from './script.controller';
13
12
  export * from './query-builder';
14
13
  export * from './query.helper';
15
14
  export * from './queryData';
15
+ export * from './script.controller';
16
16
  export * from './types';
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
@@ -8,19 +8,40 @@ import { DcuplGlobalQueryOptions } from './query.types';
8
8
  import { SuggestionOptions } from './suggestion.types';
9
9
  export type DcuplInitOptions = {
10
10
  config?: DcuplInitConfig;
11
+ /**
12
+ * deprecated - use config.quality instead
13
+ */
11
14
  errorTracking?: DcuplInitErrorTrackingConfig;
15
+ /**
16
+ * Enables/disables the model & data quality checks
17
+ */
18
+ quality?: DcuplInitQualityConfig;
19
+ /**
20
+ * Fine tune performance settings
21
+ */
12
22
  performance?: DcuplInitPerformanceConfig;
13
23
  analytics?: DcuplInitErrorAnalyticsConfig;
14
24
  referenceMetadata?: DcuplInitReferenceMetadataConfig;
15
25
  };
16
26
  export type DcuplInitPerformanceConfig = {
27
+ /**
28
+ * Enable/disable internal API caching
29
+ */
17
30
  cache?: {
18
31
  enabled: boolean;
19
32
  };
33
+ /**
34
+ * Enable/disable usage of deep data clones
35
+ * This can be useful to avoid side effects when altering data inside your application
36
+ * If you are sure that you are not altering the data you can disable this feature to improve performance
37
+ */
20
38
  clone?: {
21
39
  enabled: boolean;
22
40
  };
23
41
  };
42
+ export type DcuplInitQualityConfig = {
43
+ enabled: boolean;
44
+ };
24
45
  export type DcuplInitErrorTrackingConfig = {
25
46
  enabled: boolean;
26
47
  };
@@ -1,5 +1,5 @@
1
- export * from './app-loader.types';
2
1
  export * from './aggregation.types';
2
+ export * from './app-loader.types';
3
3
  export * from './data.types';
4
4
  export * from './dcupl.types';
5
5
  export * from './facets.types';
@@ -9,10 +9,11 @@ export * from './internal.types';
9
9
  export * from './list.types';
10
10
  export * from './model.types';
11
11
  export * from './projection.types';
12
+ export * from './quality.types';
12
13
  export * from './query.types';
14
+ export * from './rest-api/rest-api.types';
15
+ export * from './runner/runner.types';
13
16
  export * from './section.types';
14
17
  export * from './suggestion.types';
15
18
  export * from './testing.types';
16
19
  export * from './workflow/workflow.types';
17
- export * from './runner/runner.types';
18
- export * from './rest-api/rest-api.types';