terminusdb 12.0.2

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 (86) hide show
  1. package/Contributing.md +36 -0
  2. package/LICENSE +201 -0
  3. package/README.md +175 -0
  4. package/RELEASE_NOTES.md +462 -0
  5. package/dist/index.html +22 -0
  6. package/dist/terminusdb-client.min.js +3 -0
  7. package/dist/terminusdb-client.min.js.LICENSE.txt +188 -0
  8. package/dist/terminusdb-client.min.js.map +1 -0
  9. package/dist/typescript/index.d.ts +14 -0
  10. package/dist/typescript/lib/accessControl.d.ts +554 -0
  11. package/dist/typescript/lib/axiosInstance.d.ts +2 -0
  12. package/dist/typescript/lib/connectionConfig.d.ts +381 -0
  13. package/dist/typescript/lib/const.d.ts +54 -0
  14. package/dist/typescript/lib/dispatchRequest.d.ts +17 -0
  15. package/dist/typescript/lib/errorMessage.d.ts +25 -0
  16. package/dist/typescript/lib/query/woqlBuilder.d.ts +75 -0
  17. package/dist/typescript/lib/query/woqlCore.d.ts +341 -0
  18. package/dist/typescript/lib/query/woqlDoc.d.ts +63 -0
  19. package/dist/typescript/lib/query/woqlLibrary.d.ts +718 -0
  20. package/dist/typescript/lib/query/woqlPrinter.d.ts +71 -0
  21. package/dist/typescript/lib/query/woqlQuery.d.ts +833 -0
  22. package/dist/typescript/lib/typedef.d.ts +624 -0
  23. package/dist/typescript/lib/utils.d.ts +199 -0
  24. package/dist/typescript/lib/valueHash.d.ts +146 -0
  25. package/dist/typescript/lib/viewer/chartConfig.d.ts +62 -0
  26. package/dist/typescript/lib/viewer/chooserConfig.d.ts +38 -0
  27. package/dist/typescript/lib/viewer/documentFrame.d.ts +44 -0
  28. package/dist/typescript/lib/viewer/frameConfig.d.ts +74 -0
  29. package/dist/typescript/lib/viewer/frameRule.d.ts +145 -0
  30. package/dist/typescript/lib/viewer/graphConfig.d.ts +73 -0
  31. package/dist/typescript/lib/viewer/objectFrame.d.ts +212 -0
  32. package/dist/typescript/lib/viewer/streamConfig.d.ts +23 -0
  33. package/dist/typescript/lib/viewer/tableConfig.d.ts +66 -0
  34. package/dist/typescript/lib/viewer/terminusRule.d.ts +75 -0
  35. package/dist/typescript/lib/viewer/viewConfig.d.ts +47 -0
  36. package/dist/typescript/lib/viewer/woqlChart.d.ts +1 -0
  37. package/dist/typescript/lib/viewer/woqlChooser.d.ts +56 -0
  38. package/dist/typescript/lib/viewer/woqlGraph.d.ts +26 -0
  39. package/dist/typescript/lib/viewer/woqlPaging.d.ts +1 -0
  40. package/dist/typescript/lib/viewer/woqlResult.d.ts +128 -0
  41. package/dist/typescript/lib/viewer/woqlRule.d.ts +96 -0
  42. package/dist/typescript/lib/viewer/woqlStream.d.ts +31 -0
  43. package/dist/typescript/lib/viewer/woqlTable.d.ts +102 -0
  44. package/dist/typescript/lib/viewer/woqlView.d.ts +49 -0
  45. package/dist/typescript/lib/woql.d.ts +1267 -0
  46. package/dist/typescript/lib/woqlClient.d.ts +1216 -0
  47. package/index.js +28 -0
  48. package/lib/.eslintrc +1 -0
  49. package/lib/accessControl.js +988 -0
  50. package/lib/axiosInstance.js +5 -0
  51. package/lib/connectionConfig.js +765 -0
  52. package/lib/const.js +59 -0
  53. package/lib/dispatchRequest.js +236 -0
  54. package/lib/errorMessage.js +110 -0
  55. package/lib/query/woqlBuilder.js +234 -0
  56. package/lib/query/woqlCore.js +934 -0
  57. package/lib/query/woqlDoc.js +177 -0
  58. package/lib/query/woqlLibrary.js +1015 -0
  59. package/lib/query/woqlPrinter.js +476 -0
  60. package/lib/query/woqlQuery.js +1865 -0
  61. package/lib/typedef.js +248 -0
  62. package/lib/utils.js +817 -0
  63. package/lib/valueHash.js_old +581 -0
  64. package/lib/viewer/chartConfig.js +411 -0
  65. package/lib/viewer/chooserConfig.js +234 -0
  66. package/lib/viewer/documentFrame.js +206 -0
  67. package/lib/viewer/frameConfig.js +469 -0
  68. package/lib/viewer/frameRule.js +519 -0
  69. package/lib/viewer/graphConfig.js +345 -0
  70. package/lib/viewer/objectFrame.js +1550 -0
  71. package/lib/viewer/streamConfig.js +82 -0
  72. package/lib/viewer/tableConfig.js +310 -0
  73. package/lib/viewer/terminusRule.js +196 -0
  74. package/lib/viewer/viewConfig.js +219 -0
  75. package/lib/viewer/woqlChart.js +17 -0
  76. package/lib/viewer/woqlChooser.js +171 -0
  77. package/lib/viewer/woqlGraph.js +295 -0
  78. package/lib/viewer/woqlPaging.js +148 -0
  79. package/lib/viewer/woqlResult.js +258 -0
  80. package/lib/viewer/woqlRule.js +312 -0
  81. package/lib/viewer/woqlStream.js +27 -0
  82. package/lib/viewer/woqlTable.js +332 -0
  83. package/lib/viewer/woqlView.js +107 -0
  84. package/lib/woql.js +1693 -0
  85. package/lib/woqlClient.js +2091 -0
  86. package/package.json +110 -0
@@ -0,0 +1,199 @@
1
+ export function checkValidName(str: any): boolean;
2
+ export namespace ACTIONS {
3
+ let CREATE_DATABASE: string;
4
+ let DELETE_DATABASE: string;
5
+ let SCHEMA_READ_ACCESS: string;
6
+ let SCHEMA_WRITE_ACCESS: string;
7
+ let INSTANCE_READ_ACCESS: string;
8
+ let INSTANCE_WRITE_ACCESS: string;
9
+ let COMMIT_READ_ACCESS: string;
10
+ let COMMIT_WRITE_ACCESS: string;
11
+ let META_READ_ACCESS: string;
12
+ let META_WRITE_ACCESS: string;
13
+ let CLASS_FRAME: string;
14
+ let BRANCH: string;
15
+ let CLONE: string;
16
+ let FETCH: string;
17
+ let PUSH: string;
18
+ let REBASE: string;
19
+ }
20
+ export function encodeURISegment(str: any): any;
21
+ export function decodeURISegment(str: any): any;
22
+ export function removeDocType(str: any): any;
23
+ export let standard_urls: object;
24
+ /**
25
+ * Encode document payload for GET
26
+ * @param {string | object} payload
27
+ * @returns {string}
28
+ */
29
+ export function URIEncodePayload(payload: string | object): string;
30
+ /**
31
+ * Adds an entry to the list of known standard URL prefixes
32
+ * @param {string} prefix
33
+ * @param {string} url
34
+ */
35
+ export function addURLPrefix(prefix: string, url: string): void;
36
+ /**
37
+ * is the object empty?
38
+ * returns true if the json object is empty
39
+ * @param {object|array} [obj]
40
+ * @returns {boolean}
41
+ */
42
+ export function empty(obj?: object | any[]): boolean;
43
+ /**
44
+ * Generates a unique node id
45
+ * @param {string} [base]
46
+ * @returns {string}
47
+ */
48
+ export function genBNID(base?: string): string;
49
+ /**
50
+ * Returns the shorthand version (compressed to prefix:id ) of a url or
51
+ * false if there is none known for that URL
52
+ * @param {object | string} link
53
+ * @returns {string | boolean}
54
+ */
55
+ export function getShorthand(link: object | string): string | boolean;
56
+ /**
57
+ * Compares 2 IRIs for equality by checking compressed and expanded versions of both sides
58
+ * @param {string} ida
59
+ * @param {string} idb
60
+ * @returns {boolean}
61
+ */
62
+ export function compareIDs(ida: string, idb: string): boolean;
63
+ /**
64
+ * Shortens a URL to its compressed format - returns the full URL if not possible
65
+ * @param {string} [url]
66
+ * @param {string} [prefixes]
67
+ * @returns {string | undefined}
68
+ */
69
+ export function shorten(url?: string, prefixes?: string): string | undefined;
70
+ /**
71
+ * Expands a URL to its full URL format - returns the passed string if not possible to expand
72
+ * @param {string} [url]
73
+ * @returns {string | undefined}
74
+ */
75
+ export function unshorten(url?: string): string | undefined;
76
+ /**
77
+ * shortens a jsonld document to its prefixed form
78
+ * @param {array|object|string} jsonld
79
+ * @param {string} [prefixes]
80
+ * @returns {string|array|object}
81
+ */
82
+ export function json_shorten(jsonld: any[] | object | string, prefixes?: string): string | any[] | object;
83
+ /**
84
+ * Unshortens a jsonld document to its full form
85
+ * @param {array|object|string} jsonld
86
+ * @param {string} [prefixes]
87
+ * @returns {string|array|object}
88
+ */
89
+ export function json_unshorten(jsonld: any[] | object | string, prefixes?: string): string | any[] | object;
90
+ /**
91
+ * Tests a string to see if it is a valid URL -
92
+ * Valid URLs are those that start with http:// or https://
93
+ */
94
+ export function validURL(str: any): boolean;
95
+ /**
96
+ * Tests a string to see if it is a valid URL -
97
+ * Valid URLs are those that start with http:// or https://
98
+ * @param {string} str
99
+ * @param {string | object} [context]
100
+ * @param {boolean} [allow_shorthand]
101
+ * @returns {boolean}
102
+ */
103
+ export function isIRI(str: string, context?: string | object, allow_shorthand?: boolean): boolean;
104
+ /**
105
+ * Generates a text label from a URL
106
+ * @param {string} url
107
+ * @returns {string}
108
+ */
109
+ export function labelFromURL(url: string): string;
110
+ /**
111
+ * Generates a text label from a URL
112
+ */
113
+ export function labelFromVariable(v: any): any;
114
+ /**
115
+ * returns the fragment part of a URL (whether compressed or not)
116
+ */
117
+ export function urlFragment(url: any): any;
118
+ /**
119
+ * returns the last part of a URL after the last /
120
+ */
121
+ export function lastURLBit(url: any): any;
122
+ /**
123
+ * returns the a standard URL associated with a given prefix and extension
124
+ */
125
+ export function getStdURL(pref: any, ext: any, url: any): any;
126
+ export function addNamespacesToVariables(vars: any): any[];
127
+ export function addNamespaceToVariable(v: any): any;
128
+ export function removeNamespaceFromVariable(mvar: any): any;
129
+ export function removeNamespacesFromVariables(vars: any): any[];
130
+ export function getConfigValue(val: any, row: any): any;
131
+ export namespace TypeHelper {
132
+ /**
133
+ * Returns true if the passed type is an xsd:string (compressed or not)
134
+ */
135
+ function isStringType(stype: any): boolean;
136
+ function isDatatype(stype: any): boolean;
137
+ /**
138
+ * Adds 3 order magnitude separators ( default ,) into big numbers for legibility
139
+ */
140
+ function numberWithCommas(value: any, separator: any): any;
141
+ function formatBytes(bytes: any, decimals?: number): string;
142
+ let datatypes: string[];
143
+ function parseRangeValue(val: any, dividor: any): any;
144
+ }
145
+ export namespace DateHelper {
146
+ /**
147
+ * Takes an xsd time string and returns a structure {hour: HH, minute: MM,
148
+ * second ss.ssssss, timezone: tz}
149
+ */
150
+ function parseXsdTime(val: any): {};
151
+ /**
152
+ * Takes an xsd time string and returns a structure {year: [-]YYYY, month: MM, day: dd}
153
+ */
154
+ function parseXsdDate(val: any): false | {
155
+ year: any;
156
+ month: any;
157
+ day: any;
158
+ timezone: string | boolean;
159
+ };
160
+ /**
161
+ * Parses a date string of type ty
162
+ */
163
+ function parseDate(ty: any, value: any): {};
164
+ /**
165
+ * adds appropriate padding to date type for xsd rules
166
+ */
167
+ function addXsdPadding(parsed: any): {
168
+ year: any;
169
+ month: any;
170
+ day: any;
171
+ hour: any;
172
+ minute: any;
173
+ second: any;
174
+ };
175
+ /**
176
+ * generates an xsd string of type ty for the passed parsed structure (year, month, day, hour,
177
+ * minute, second, timezone)
178
+ */
179
+ function xsdFromParsed(parsed: any, ty: any): any;
180
+ /**
181
+ * Converts between a unix timestamp and a parsed structure
182
+ */
183
+ function convertTimestampToXsd(val: any): {
184
+ year: number;
185
+ month: number;
186
+ day: number;
187
+ hour: number;
188
+ minute: number;
189
+ second: number;
190
+ };
191
+ /**
192
+ * Parses an xsd date time into a structure
193
+ */
194
+ function parseXsdDateTime(val: any): {};
195
+ /**
196
+ * Extracts the timezone data from an xsd date string
197
+ */
198
+ function extractXsdTimezone(val: any): false | "Z";
199
+ }
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Compute the ValueHash for a document
3
+ *
4
+ * @param {object} doc - The document to hash
5
+ * @param {object} [options] - Options for hash computation
6
+ * @param {object} [options.context] - The context with prefix mappings
7
+ * @param {object} [options.schema] - Optional schema information
8
+ * @returns {string} The computed ValueHash (SHA256 hex string)
9
+ */
10
+ export function computeValueHash(doc: object, options?: {
11
+ context?: object;
12
+ schema?: object;
13
+ }): string;
14
+ /**
15
+ * Generate the full @id for a document using ValueHash
16
+ *
17
+ * @param {object} doc - The document to generate ID for
18
+ * @param {object} [options] - Options for ID generation
19
+ * @param {object} [options.context] - The context with prefix mappings
20
+ * @param {object} [options.schema] - Optional schema information
21
+ * @returns {string} The full document @id with ValueHash
22
+ */
23
+ export function generateValueHashId(doc: object, options?: {
24
+ context?: object;
25
+ schema?: object;
26
+ }): string;
27
+ /**
28
+ * Set the @id of a document using ValueHash, recursively processing subdocuments
29
+ *
30
+ * @param {object} doc - The document to set ID for
31
+ * @param {object} [options] - Options for ID generation
32
+ * @param {object} [options.context] - The context with prefix mappings
33
+ * @param {object} [options.schema] - Optional schema information
34
+ * @returns {object} The document with @id set (and subdocuments processed)
35
+ */
36
+ export function setValueHashId(doc: object, options?: {
37
+ context?: object;
38
+ schema?: object;
39
+ }): object;
40
+ /**
41
+ * Elaborate a document by expanding IRIs and adding type information
42
+ * This is a simplified version that works for ValueHash computation
43
+ *
44
+ * @param {object} doc - The document to elaborate
45
+ * @param {object} context - The context with prefix mappings
46
+ * @param {object} schema - Optional schema information for type inference
47
+ * @returns {object} The elaborated document
48
+ */
49
+ export function elaborateDocument(doc: object, context: object, schema?: object): object;
50
+ /**
51
+ * Extract all path-value pairs from an elaborated document
52
+ * This matches TerminusDB's get_all_path_values/2 predicate
53
+ *
54
+ * @param {object} doc - The elaborated document
55
+ * @param {Array} currentPath - The current path (for recursion)
56
+ * @returns {Array} Array of [path, formattedValue] pairs
57
+ */
58
+ export function extractPathValues(doc: object, currentPath?: any[]): any[];
59
+ /**
60
+ * Expand a prefixed IRI using the context
61
+ * @param {string} iri - The IRI to expand (may be prefixed like "xsd:string")
62
+ * @param {object} context - The context object with prefix mappings
63
+ * @returns {string} The expanded IRI
64
+ */
65
+ export function expandIRI(iri: string, context: object): string;
66
+ /**
67
+ * Get the base IRI for a type
68
+ * @param {string} type - The type name
69
+ * @param {object} context - The context object
70
+ * @returns {string} The base IRI for document IDs of this type
71
+ */
72
+ export function getTypeBase(type: string, context: object): string;
73
+ /**
74
+ * Format an atom for Prolog quoted output
75
+ * Atoms containing special characters or starting with uppercase need quoting
76
+ * @param {string} atom - The atom to format
77
+ * @returns {string} The formatted atom
78
+ */
79
+ export function formatPrologAtom(atom: string): string;
80
+ /**
81
+ * Format a string for Prolog quoted output (escape special characters)
82
+ * @param {string} str - The string to format
83
+ * @returns {string} The formatted string
84
+ */
85
+ export function formatPrologString(str: string): string;
86
+ /**
87
+ * Format a typed value in Prolog format: (value^^type)
88
+ * For strings: ("value"^^'type')
89
+ * For numbers: (42^^'type')
90
+ * For booleans: (true^^'type')
91
+ * @param {any} value - The value
92
+ * @param {string} type - The XSD type IRI
93
+ * @returns {string} The formatted typed value
94
+ */
95
+ export function formatTypedValue(value: any, type: string): string;
96
+ /**
97
+ * Format a path (list of keys) in Prolog format: [key1,key2,...]
98
+ * @param {Array} path - The path as array of keys
99
+ * @returns {string} The formatted path
100
+ */
101
+ export function formatPrologPath(path: any[]): string;
102
+ /**
103
+ * Format a path-value pair in Prolog format: [path]-value
104
+ * @param {Array} path - The path
105
+ * @param {any} value - The value (already formatted)
106
+ * @returns {string} The formatted pair
107
+ */
108
+ export function formatPathValuePair(path: any[], value: any): string;
109
+ export namespace XSD_TYPES {
110
+ let string: string;
111
+ let integer: string;
112
+ let decimal: string;
113
+ let double: string;
114
+ let float: string;
115
+ let boolean: string;
116
+ let date: string;
117
+ let dateTime: string;
118
+ let time: string;
119
+ let gYear: string;
120
+ let gMonth: string;
121
+ let gDay: string;
122
+ let gYearMonth: string;
123
+ let gMonthDay: string;
124
+ let duration: string;
125
+ let anyURI: string;
126
+ let base64Binary: string;
127
+ let hexBinary: string;
128
+ let long: string;
129
+ let short: string;
130
+ let byte: string;
131
+ let unsignedLong: string;
132
+ let unsignedInt: string;
133
+ let unsignedShort: string;
134
+ let unsignedByte: string;
135
+ let positiveInteger: string;
136
+ let negativeInteger: string;
137
+ let nonPositiveInteger: string;
138
+ let nonNegativeInteger: string;
139
+ }
140
+ /**
141
+ * Default context prefixes
142
+ */
143
+ export const DEFAULT_CONTEXT: {
144
+ '@base': string;
145
+ '@schema': string;
146
+ };
@@ -0,0 +1,62 @@
1
+ export = WOQLChartConfig;
2
+ declare function WOQLChartConfig(): void;
3
+ declare class WOQLChartConfig {
4
+ type: string;
5
+ prettyPrint(): string;
6
+ json(): {
7
+ chart: {
8
+ margin: any;
9
+ title: any;
10
+ description: any;
11
+ layout: any;
12
+ align: any;
13
+ };
14
+ rules: any;
15
+ };
16
+ loadJSON(config: any, rules: any): void;
17
+ rules: WOQLChartRule[];
18
+ title(title: any): any;
19
+ _title: any;
20
+ description(description: any): any;
21
+ _description: any;
22
+ layout(layout: any): any;
23
+ _layout: any;
24
+ align(align: any): any;
25
+ _align: any;
26
+ margin(marginObj: any): any;
27
+ _margin: any;
28
+ create(client: any): WOQLChartConfig;
29
+ xAxis(...vars: any[]): any;
30
+ legend(...vars: any[]): any;
31
+ yAxis(...vars: any[]): any;
32
+ bar(...vars: any[]): any;
33
+ line(...vars: any[]): any;
34
+ point(...vars: any[]): any;
35
+ area(...vars: any[]): any;
36
+ }
37
+ /**
38
+ *
39
+ * @param {Chart} scope
40
+ */
41
+ declare function WOQLChartRule(): void;
42
+ declare class WOQLChartRule {
43
+ style(key: any, value: any): any;
44
+ label(label: any): any;
45
+ legendType(legendType: any): any;
46
+ fillOpacity(fillOpacity: any): any;
47
+ fill(color: any): any;
48
+ stroke(color: any): any;
49
+ strokeWidth(size: any): any;
50
+ dot(isVisible: any): any;
51
+ labelRotate(angle: any): any;
52
+ padding(paddingObj: any): any;
53
+ labelDateInput(labelDateInput: any): any;
54
+ labelDateOutput(labelDateOutput: any): any;
55
+ stackId(stackId: any): any;
56
+ type(type: any): any;
57
+ axisDomain(domainArr: any): any;
58
+ colorEntry(propValue: any): any;
59
+ customColors(colorsObj: any): any;
60
+ payload(payloadArr: any): any;
61
+ barSize(barSize: any): any;
62
+ }
@@ -0,0 +1,38 @@
1
+ export = WOQLChooserConfig;
2
+ declare function WOQLChooserConfig(): void;
3
+ declare class WOQLChooserConfig {
4
+ type: string;
5
+ create(client: any): WOQLChooser;
6
+ prettyPrint(): string;
7
+ json(): {
8
+ chooser: any;
9
+ rules: any;
10
+ };
11
+ loadJSON(config: any, rules: any): void;
12
+ rules: WOQLChooserRule[];
13
+ change(v: any): any;
14
+ onChange: any;
15
+ show_empty(p: any): any;
16
+ placeholder: any;
17
+ rule(v: any): any;
18
+ values(v: any): any;
19
+ value_variable: any;
20
+ labels(v: any): any;
21
+ label_variable: any;
22
+ titles(v: any): any;
23
+ title_variable: any;
24
+ sort(v: any): any;
25
+ sort_variable: any;
26
+ direction(v: any): any;
27
+ sort_direction: any;
28
+ }
29
+ import WOQLChooser = require("./woqlChooser");
30
+ declare function WOQLChooserRule(scope: any): void;
31
+ declare class WOQLChooserRule {
32
+ constructor(scope: any);
33
+ label(l: any): any;
34
+ title(l: any): any;
35
+ values(l: any): any;
36
+ selected(s: any): any;
37
+ prettyPrint(): any;
38
+ }
@@ -0,0 +1,44 @@
1
+ export = DocumentFrame;
2
+ /**
3
+ * @file Document Frame
4
+ * @license Apache Version 2
5
+ */
6
+ declare function DocumentFrame(client: any, config: any): void;
7
+ declare class DocumentFrame {
8
+ /**
9
+ * @file Document Frame
10
+ * @license Apache Version 2
11
+ */
12
+ constructor(client: any, config: any);
13
+ client: any;
14
+ config: any;
15
+ load_schema: boolean;
16
+ options(opts: any): this;
17
+ db(dburl: any): this;
18
+ /**
19
+ * @param {String} url - loads the document frame from the document API in frame form
20
+ * - loads the frame encapsulates more meta-data in the json and reduces the
21
+ * number of api calls we need to make
22
+ * @returns {Promise}
23
+ */
24
+ loadDocument(url: string, encoding: any): Promise<any>;
25
+ loadSchema(cls: any, dbURL: any): any;
26
+ /**
27
+ * @param {String} url - loads the document frame along with its class frame
28
+ * @param {String} [cls] - optional class id of the document - if absent class frames
29
+ * will be loaded from the document class once it is loaded
30
+ * @returns {Promise}
31
+ * - loads a document frame and it's class frame in unison
32
+ */
33
+ loadComplete(url: string, cls?: string): Promise<any>;
34
+ loadJSON(json: any, type: any): any;
35
+ loadData(jsonld: any, cls: any, classframes: any): void;
36
+ document: ObjectFrame;
37
+ load(classframes: any, doc: any): void;
38
+ loadSchemaFrames(classframes: any, cls: any): void;
39
+ filterFrame(loadRenderer: any): void;
40
+ setErrors(errors: any, frameconf: any): void;
41
+ clearErrors(frameconf: any): void;
42
+ applyRules(doc: any, config: any, mymatch: any): void;
43
+ }
44
+ import ObjectFrame = require("./objectFrame");
@@ -0,0 +1,74 @@
1
+ export = FrameConfig;
2
+ /**
3
+ * @file Frame Config
4
+ * @license Apache Version 2
5
+ */
6
+ declare function FrameConfig(): void;
7
+ declare class FrameConfig {
8
+ type: string;
9
+ create(client: any): DocumentFrame;
10
+ prettyPrint(): string;
11
+ json(): {
12
+ frame: any;
13
+ rules: any;
14
+ };
15
+ loadJSON(config: any, rules: any): this;
16
+ rules: DocumentRule[];
17
+ json_rules(): any[];
18
+ load_schema(tf: any): any;
19
+ get_schema: any;
20
+ show_all(r: any): this;
21
+ show_parts(o: any, p: any, d: any): this;
22
+ object(): any;
23
+ property(): any;
24
+ scope(scope: any): any;
25
+ data(): any;
26
+ all(): any;
27
+ /**
28
+ * Attaches display options to frames from matching rules
29
+ */
30
+ setFrameDisplayOptions(frame: any, rule: any): void;
31
+ setFrameFeatures(existing: any, fresh: any): any;
32
+ setFrameArgs(existing: any, fresh: any): any;
33
+ }
34
+ import DocumentFrame = require("./documentFrame.js");
35
+ /**
36
+ * @file Document Rule
37
+ * @license Apache Version 2
38
+ */
39
+ declare function DocumentRule(): void;
40
+ declare class DocumentRule {
41
+ rule: {};
42
+ renderer(rend: any): any;
43
+ compare(func: any): any;
44
+ mode(mode: any): any;
45
+ collapse(func: any): any;
46
+ view(m: any): any;
47
+ /**
48
+ * Should actions which are disabled in the given context be displayed?
49
+ */
50
+ showDisabledButtons(m: any): any;
51
+ header(m: any): any;
52
+ errors(errs: any): any;
53
+ headerStyle(m: any): any;
54
+ showEmpty(m: any): any;
55
+ dataviewer(m: any): any;
56
+ features(...m: any[]): any;
57
+ headerFeatures(...m: any[]): any;
58
+ render(func: any): any;
59
+ style(style: any): any;
60
+ /**
61
+ * The frame or feature will be hidden or unhidden (boolean)
62
+ */
63
+ hidden(m: any): any;
64
+ /**
65
+ * Specifies arguments to a renderer
66
+ */
67
+ args(json: any): any;
68
+ /**
69
+ * Adds a property to a feature array
70
+ */
71
+ applyFeatureProperty(feats: any, prop: any, val: any): {}[];
72
+ unpackFeatures(feats: any): string;
73
+ prettyPrint(): any;
74
+ }