alizarin 1.0.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.
@@ -0,0 +1,1298 @@
1
+ export declare const AlizarinModel: typeof viewModels.ResourceInstanceViewModel;
2
+
3
+ declare abstract class ArchesClient {
4
+ abstract getGraphs(): Promise<GraphResult>;
5
+ abstract getGraph(graph: StaticGraphMeta): Promise<StaticGraph | null>;
6
+ abstract getGraphByIdOnly(graphId: string): Promise<StaticGraph | null>;
7
+ abstract getResources(graphId: string, limit: number): Promise<StaticResource[]>;
8
+ abstract getResource(resourceId: string): Promise<StaticResource>;
9
+ abstract getCollection(collectionId: string): Promise<StaticCollection>;
10
+ }
11
+
12
+ declare const archesClient: ArchesClientRemote;
13
+
14
+ declare class ArchesClientLocal extends ArchesClient {
15
+ fs: any;
16
+ allGraphFile: () => string;
17
+ graphToGraphFile?: (graph: StaticGraphMeta) => string;
18
+ graphIdToGraphFile: (graphId: string) => string;
19
+ graphIdToResourcesFiles: (graphId: string) => string[];
20
+ resourceIdToFile: (resourceId: string) => string;
21
+ collectionIdToFile: (collectionId: string) => string;
22
+ constructor({ allGraphFile, graphToGraphFile, graphIdToResourcesFiles, resourceIdToFile, collectionIdToFile, graphIdToGraphFile, }?: {
23
+ allGraphFile?: () => string;
24
+ graphToGraphFile?: (graph: StaticGraphMeta) => string;
25
+ graphIdToGraphFile?: (graphId: string) => string;
26
+ graphIdToResourcesFiles?: (graphId: string) => string[];
27
+ resourceIdToFile?: (resourceId: string) => string;
28
+ collectionIdToFile?: (collectionId: string) => string;
29
+ });
30
+ getGraphs(): Promise<GraphResult>;
31
+ getGraph(graph: StaticGraphMeta): Promise<StaticGraph | null>;
32
+ getGraphByIdOnly(graphId: string): Promise<StaticGraph | null>;
33
+ getResource(resourceId: string): Promise<StaticResource>;
34
+ getCollection(collectionId: string): Promise<StaticCollection>;
35
+ getResources(graphId: string, limit: number | null): Promise<StaticResource[]>;
36
+ }
37
+
38
+ declare class ArchesClientRemote extends ArchesClient {
39
+ archesUrl: string;
40
+ constructor(archesUrl: string);
41
+ getGraphs(): Promise<GraphResult>;
42
+ getGraph(graph: StaticGraphMeta): Promise<StaticGraph>;
43
+ getGraphByIdOnly(graphId: string): Promise<StaticGraph>;
44
+ getResource(resourceId: string): Promise<StaticResource>;
45
+ getCollection(collectionId: string): Promise<StaticCollection>;
46
+ getResources(graphId: string, limit: number): Promise<StaticResource[]>;
47
+ }
48
+
49
+ declare class ArchesClientRemoteStatic extends ArchesClient {
50
+ archesUrl: string;
51
+ allGraphFile: () => string;
52
+ graphToGraphFile?: (graph: StaticGraphMeta) => string;
53
+ graphIdToGraphFile: (graphId: string) => string;
54
+ graphIdToResourcesFiles: (graphId: string) => string[];
55
+ resourceIdToFile: (resourceId: string) => string;
56
+ collectionIdToFile: (collectionId: string) => string;
57
+ constructor(archesUrl: string, { allGraphFile, graphToGraphFile, graphIdToResourcesFiles, resourceIdToFile, collectionIdToFile, graphIdToGraphFile, }?: {
58
+ allGraphFile?: () => string;
59
+ graphToGraphFile?: (graph: StaticGraphMeta) => string;
60
+ graphIdToGraphFile?: (graphId: string) => string;
61
+ graphIdToResourcesFiles?: (graphId: string) => string[];
62
+ resourceIdToFile?: (resourceId: string) => string;
63
+ collectionIdToFile?: (collectionId: string) => string;
64
+ });
65
+ getGraphs(): Promise<GraphResult>;
66
+ getGraph(graph: StaticGraphMeta): Promise<StaticGraph | null>;
67
+ getGraphByIdOnly(graphId: string): Promise<StaticGraph | null>;
68
+ getResource(resourceId: string): Promise<StaticResource>;
69
+ getCollection(collectionId: string): Promise<StaticCollection>;
70
+ getResources(graphId: string, limit: number): Promise<StaticResource[]>;
71
+ }
72
+
73
+ declare class AttrPromise<T> extends Promise<T> implements IStringKeyedObject {
74
+ [key: string | symbol]: any;
75
+ [Symbol.toPrimitive]: undefined;
76
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason: any) => void) => void);
77
+ }
78
+
79
+ declare abstract class BaseRenderer {
80
+ render(asset: ResourceInstanceViewModel<any>): Promise<any>;
81
+ abstract renderDomainValue(value: DomainValueViewModel, _depth: number): Promise<any>;
82
+ abstract renderDate(value: DateViewModel, _depth: number): Promise<any>;
83
+ abstract renderConceptValue(value: ConceptValueViewModel, _depth: number): Promise<any>;
84
+ abstract renderResourceReference(value: ResourceInstanceViewModel<any>, _depth: number): Promise<any>;
85
+ abstract renderSemantic(value: SemanticViewModel, depth: number): Promise<any>;
86
+ abstract renderBlock(block: {
87
+ [key: string]: string;
88
+ } | {
89
+ [key: string]: string;
90
+ }[], depth: number): any;
91
+ abstract renderArray(value: any[], depth: number): Promise<any>;
92
+ abstract renderString(value: string | StringViewModel | NonLocalizedStringViewModel, _depth: number): Promise<any>;
93
+ abstract renderBoolean(value: boolean | BooleanViewModel, _depth: number): Promise<any>;
94
+ abstract renderNumber(value: number | NumberViewModel, _depth: number): Promise<any>;
95
+ abstract renderUrl(value: UrlViewModel, _depth: number): Promise<any>;
96
+ renderValue(value: any, depth: number): Promise<any>;
97
+ }
98
+
99
+ declare class BooleanViewModel extends Boolean implements IViewModel {
100
+ _: IViewModel | Promise<IViewModel> | undefined;
101
+ __parentPseudo: PseudoValue<any> | undefined;
102
+ __config: StaticNodeConfigBoolean;
103
+ describeField: () => string | null;
104
+ describeFieldGroup: () => string | null;
105
+ constructor(value: boolean, config: StaticNodeConfigBoolean);
106
+ toString(lang?: string | undefined): string;
107
+ __forJsonCache(): null;
108
+ forJson(): boolean;
109
+ static __create(tile: StaticTile, node: StaticNode, value: any): BooleanViewModel | Promise<BooleanViewModel | null> | null;
110
+ __asTileData(): boolean;
111
+ }
112
+
113
+ declare class CardComponent {
114
+ id: string;
115
+ name: string;
116
+ constructor(id: string, name: string);
117
+ }
118
+
119
+ declare type CheckPermission = ((nodegroupId: string, tile: StaticTile | null, node: Map<string, StaticNode>) => boolean);
120
+
121
+ declare class Cleanable extends String {
122
+ __clean: string | undefined;
123
+ }
124
+
125
+ declare namespace client {
126
+ export {
127
+ archesClient,
128
+ ArchesClient,
129
+ ArchesClientRemoteStatic,
130
+ ArchesClientRemote,
131
+ ArchesClientLocal,
132
+ GraphResult
133
+ }
134
+ }
135
+ export { client }
136
+
137
+ declare class ConceptValueCacheEntry implements IStringKeyedObject {
138
+ [key: string]: any;
139
+ datatype: string;
140
+ id: string;
141
+ value: string;
142
+ conceptId: string | null;
143
+ meta: {
144
+ [key: string]: any;
145
+ };
146
+ constructor({ meta, id, value, conceptId }: {
147
+ meta: IStringKeyedObject | undefined;
148
+ id: string;
149
+ value: string;
150
+ conceptId: string | null;
151
+ });
152
+ }
153
+
154
+ declare class ConceptValueViewModel extends String implements IViewModel {
155
+ _: IViewModel | Promise<IViewModel> | undefined;
156
+ __parentPseudo: IPseudo | undefined;
157
+ describeField: () => string | null;
158
+ describeFieldGroup: () => string | null;
159
+ _value: StaticValue | Promise<StaticValue>;
160
+ constructor(value: StaticValue);
161
+ forJson(): Promise<StaticValue>;
162
+ __forJsonCache(getMeta: GetMeta): Promise<ConceptValueCacheEntry>;
163
+ getValue(): StaticValue | Promise<StaticValue>;
164
+ static __create(tile: StaticTile, node: StaticNode, value: any, cacheEntry: ConceptValueCacheEntry | null): Promise<ConceptValueViewModel | null>;
165
+ __asTileData(): Promise<string | null>;
166
+ }
167
+
168
+ declare class ConfigurationOptions {
169
+ graphs: Array<string> | null | boolean;
170
+ eagerLoadGraphs: boolean;
171
+ constructor();
172
+ }
173
+
174
+ declare const CUSTOM_DATATYPES: Map<string, string | IViewModel>;
175
+
176
+ declare class DateViewModel extends Date implements IViewModel {
177
+ _: IViewModel | Promise<IViewModel> | undefined;
178
+ __parentPseudo: PseudoValue<any> | undefined;
179
+ __original: string;
180
+ then: undefined;
181
+ describeField: () => string | null;
182
+ describeFieldGroup: () => string | null;
183
+ __forJsonCache(): null;
184
+ constructor(val: string);
185
+ static __create(tile: StaticTile, node: StaticNode, value: any): DateViewModel | Promise<DateViewModel | null> | null;
186
+ forJson(): Promise<string>;
187
+ __asTileData(): string;
188
+ }
189
+
190
+ declare const DEFAULT_LANGUAGE = "en";
191
+
192
+ declare class DomainValueViewModel extends String implements IViewModel {
193
+ _: IViewModel | Promise<IViewModel> | undefined;
194
+ __parentPseudo: PseudoValue<any> | undefined;
195
+ describeField: () => string | null;
196
+ describeFieldGroup: () => string | null;
197
+ _value: StaticDomainValue | Promise<StaticDomainValue>;
198
+ constructor(value: StaticDomainValue);
199
+ forJson(): Promise<StaticDomainValue>;
200
+ __forJsonCache(): null;
201
+ getValue(): StaticDomainValue | Promise<StaticDomainValue>;
202
+ lang(lang: string): Promise<string | undefined>;
203
+ static __create(tile: StaticTile, node: StaticNode, value: any): Promise<DomainValueViewModel | null>;
204
+ __asTileData(): Promise<string | null>;
205
+ }
206
+
207
+ declare class FlatMarkdownRenderer extends MarkdownRenderer {
208
+ renderSemantic(vm: SemanticViewModel, depth: number): Promise<any>;
209
+ renderArray(value: any, depth: number): Promise<any>;
210
+ renderString(value: string | StringViewModel | NonLocalizedStringViewModel, _depth: number): Promise<any>;
211
+ }
212
+
213
+ declare function generateUuidv5(group: [type: string, id?: string], key: string | string[]): string;
214
+
215
+ declare class GeoJSONViewModel implements IViewModel, IStringKeyedObject {
216
+ [key: string | symbol]: any;
217
+ _: IViewModel | Promise<IViewModel> | undefined;
218
+ __parentPseudo: PseudoValue<any> | undefined;
219
+ then: undefined;
220
+ [Symbol.toPrimitive]: undefined;
221
+ describeField: () => string | null;
222
+ describeFieldGroup: () => string | null;
223
+ _value: {
224
+ [key: string]: any;
225
+ };
226
+ __forJsonCache(): null;
227
+ constructor(jsonData: {
228
+ [key: string]: any;
229
+ });
230
+ static __create(tile: StaticTile, node: StaticNode, value: any): GeoJSONViewModel | Promise<GeoJSONViewModel | null> | null;
231
+ forJson(): Promise<{
232
+ [key: string]: any;
233
+ }>;
234
+ __asTileData(): {
235
+ [key: string]: any;
236
+ };
237
+ }
238
+
239
+ export declare const getCurrentLanguage: typeof utils.getCurrentLanguage;
240
+
241
+ declare function getCurrentLanguage_2(): string;
242
+
243
+ declare type GetMeta = ((vm: IViewModel) => IStringKeyedObject) | undefined;
244
+
245
+ declare function getViewModel<RIVM extends IRIVM<RIVM>>(parentPseudo: PseudoValue<any>, tile: StaticTile, node: StaticNode, data: any, parent: IRIVM<RIVM> | null, childNodes: Map<string, StaticNode>, isInner?: boolean): Promise<IViewModel | null>;
246
+
247
+ export declare class GraphManager {
248
+ _initialized: boolean;
249
+ archesClient: ArchesClient;
250
+ graphs: Map<string, ResourceModelWrapper<any>>;
251
+ wkrms: Map<string, WKRM>;
252
+ constructor(archesClient: ArchesClient);
253
+ initialize(configurationOptions?: ConfigurationOptions | undefined): Promise<void>;
254
+ loadGraph<RIVM extends IRIVM<RIVM>>(modelClass: ResourceInstanceViewModelConstructor<RIVM> | string): Promise<ResourceModelWrapper<RIVM>>;
255
+ get<RIVM extends IRIVM<RIVM>>(modelClass: ResourceInstanceViewModelConstructor<RIVM> | string): Promise<ResourceModelWrapper<RIVM>>;
256
+ getResource<T extends IRIVM<T>>(resourceId: string, lazy?: boolean, pruneTiles?: boolean): Promise<T>;
257
+ getGraph(graphId: string): StaticGraph;
258
+ }
259
+
260
+ export declare const graphManager: GraphManager;
261
+
262
+ declare type GraphMutation = (baseGraph: StaticGraph) => StaticGraph;
263
+
264
+ export declare class GraphMutator {
265
+ baseGraph: StaticGraph;
266
+ mutations: GraphMutation[];
267
+ autocreateCard: boolean;
268
+ constructor(baseGraph: StaticGraph, options?: {
269
+ autocreateCard?: boolean;
270
+ });
271
+ _generateUuidv5(key: string): string;
272
+ _generateEdge(fromNode: string, toNode: string, ontologyProperty: string, name?: string, description?: string): StaticEdge;
273
+ addSemanticNode(parentAlias: string | null, alias: string, name: string, cardinality: 'n' | '1', ontologyClass: string, parentProperty: string, description?: string, options?: {
274
+ exportable?: boolean;
275
+ fieldname?: string;
276
+ hascustomalias?: boolean;
277
+ is_collector?: boolean;
278
+ isrequired?: boolean;
279
+ issearchable?: boolean;
280
+ istopnode?: boolean;
281
+ sortorder?: number;
282
+ }, config?: {
283
+ [key: string]: any;
284
+ }): this;
285
+ addConceptNode(parentAlias: string | null, alias: string, name: string, collection: StaticCollection, cardinality: 'n' | '1', ontologyClass: string, parentProperty: string, description?: string, options?: {
286
+ is_list?: boolean;
287
+ exportable?: boolean;
288
+ fieldname?: string;
289
+ hascustomalias?: boolean;
290
+ is_collector?: boolean;
291
+ isrequired?: boolean;
292
+ issearchable?: boolean;
293
+ istopnode?: boolean;
294
+ sortorder?: number;
295
+ }, config?: {
296
+ [key: string]: any;
297
+ }): this;
298
+ addCard(nodegroup: string | StaticNodegroup, name: string | StaticTranslatableString, component?: CardComponent, options?: {
299
+ active?: boolean;
300
+ constraints?: Array<StaticConstraint>;
301
+ cssclass?: string | null;
302
+ helpenabled?: boolean;
303
+ helptext?: string | null | StaticTranslatableString;
304
+ helptitle?: string | null | StaticTranslatableString;
305
+ instructions?: string | null | StaticTranslatableString;
306
+ is_editable?: boolean;
307
+ description?: string | null;
308
+ sortorder?: number | null;
309
+ visible?: boolean;
310
+ }, config?: {
311
+ [key: string]: any;
312
+ }): void;
313
+ addStringNode(parentAlias: string | null, alias: string, name: string, cardinality: 'n' | '1', ontologyClass: string, parentProperty: string, description?: string, options?: {
314
+ exportable?: boolean;
315
+ fieldname?: string;
316
+ hascustomalias?: boolean;
317
+ is_collector?: boolean;
318
+ isrequired?: boolean;
319
+ issearchable?: boolean;
320
+ istopnode?: boolean;
321
+ sortorder?: number;
322
+ }, config?: {
323
+ [key: string]: any;
324
+ }): this;
325
+ _addNodegroup(parentAlias: string | null, nodegroupId: string, cardinality: 'n' | '1', name?: StaticTranslatableString): this;
326
+ _addGenericNode(parentAlias: string | null, alias: string, name: string, cardinality: 'n' | '1', datatype: string, ontologyClass: string, parentProperty: string, description?: string, options?: {
327
+ exportable?: boolean;
328
+ fieldname?: string;
329
+ hascustomalias?: boolean;
330
+ is_collector?: boolean;
331
+ isrequired?: boolean;
332
+ issearchable?: boolean;
333
+ istopnode?: boolean;
334
+ sortorder?: number;
335
+ }, config?: {
336
+ [key: string]: any;
337
+ }): this;
338
+ addWidgetToCard(nodeId: string, widget: Widget, name: string, config: {
339
+ [key: string]: any;
340
+ }, options?: {
341
+ sortorder?: number | null;
342
+ silentSkip?: boolean;
343
+ visible?: boolean;
344
+ }): GraphMutator;
345
+ apply(): StaticGraph;
346
+ }
347
+
348
+ declare class GraphResult {
349
+ models: {
350
+ [graphId: string]: StaticGraphMeta;
351
+ };
352
+ constructor(jsonData: GraphResult);
353
+ }
354
+
355
+ declare interface IGraphManager {
356
+ getResource<T extends IRIVM<T>>(resourceId: string, lazy: boolean): Promise<T>;
357
+ }
358
+
359
+ declare interface IInstanceWrapper<T extends IRIVM<T>> {
360
+ resource: StaticResource | null | false;
361
+ model: IModelWrapper<T>;
362
+ loadNodes(aliases: Array<string>): Promise<void>;
363
+ allEntries(): MapIterator<[string, Array<IPseudo> | false | null]>;
364
+ addPseudo(childNode: StaticNode, tile: StaticTile | null, node: StaticNode): IPseudo;
365
+ ensureNodegroup(allValues: Map<string, any>, allNodegroups: Map<string, boolean | Promise<any>>, nodegroupId: string | null, nodeObjs: Map<string, StaticNode>, nodegroupObjs: Map<string, StaticNodegroup>, edges: Map<string, string[]>, addIfMissing: boolean, tiles: StaticTile[] | null, doImpliedNodegroups: boolean): Promise<[Map<string, any>, Set<string>]>;
366
+ setOrmAttribute(key: string, value: any): Promise<void>;
367
+ getOrmAttribute(key: string): Promise<any>;
368
+ getValueCache(build: boolean, getMeta: GetMeta): Promise<{
369
+ [tileId: string]: {
370
+ [nodeId: string]: IStringKeyedObject;
371
+ };
372
+ } | undefined>;
373
+ getRoot(): Promise<IPseudo | undefined>;
374
+ getRootViewModel(): Promise<IStringKeyedObject>;
375
+ populate(lazy: boolean): Promise<void>;
376
+ }
377
+
378
+ declare interface IModelWrapper<T extends IRIVM<T>> {
379
+ all(params: {
380
+ limit?: number;
381
+ lazy?: boolean;
382
+ } | undefined): Promise<Array<T>>;
383
+ getPermittedNodegroups(): Map<string | null, boolean | CheckPermission>;
384
+ isNodegroupPermitted(nodegroupId: string, tile: StaticTile | null, nodes: Map<string, StaticNode>): boolean;
385
+ getChildNodes(nodeId: string): Map<string, StaticNode>;
386
+ getNodeObjectsByAlias(): Map<string, StaticNode>;
387
+ getNodeObjects(): Map<string, StaticNode>;
388
+ getNodegroupObjects(): Map<string, StaticNodegroup>;
389
+ getEdges(): Map<string, string[]>;
390
+ wkrm: IWKRM;
391
+ }
392
+
393
+ declare class INodeConfig {
394
+ }
395
+
396
+ declare namespace interfaces {
397
+ export {
398
+ CheckPermission,
399
+ ISemantic,
400
+ ResourceInstanceViewModelConstructor,
401
+ GetMeta,
402
+ IInstanceWrapper,
403
+ IModelWrapper,
404
+ IRIVM,
405
+ IStringKeyedObject,
406
+ IReferenceDataManager,
407
+ IViewModel,
408
+ IPseudo,
409
+ INodeConfig,
410
+ IGraphManager
411
+ }
412
+ }
413
+ export { interfaces }
414
+
415
+ declare interface IPseudo {
416
+ parentNode: IPseudo | null;
417
+ getValue(): AttrPromise<IViewModel | null | Array<IViewModel>>;
418
+ forJson(): {
419
+ [key: string]: any;
420
+ } | {
421
+ [key: string]: any;
422
+ }[] | string | number | boolean | null;
423
+ isIterable(): boolean;
424
+ tile: any;
425
+ node: any;
426
+ describeField: () => string;
427
+ describeFieldGroup: () => string;
428
+ }
429
+
430
+ declare interface IReferenceDataManager {
431
+ retrieveCollection(id: string): Promise<StaticCollection>;
432
+ }
433
+
434
+ declare interface IRIVM<T extends IRIVM<T>> {
435
+ [key: string]: any;
436
+ id: string;
437
+ then: undefined;
438
+ $: IInstanceWrapper<T> | null;
439
+ __: IModelWrapper<T> | null;
440
+ __parentPseudo: IPseudo | undefined;
441
+ }
442
+
443
+ declare interface ISemantic extends IViewModel {
444
+ update(mapLike: Map<string, any> | {
445
+ [key: string]: any;
446
+ }): void;
447
+ }
448
+
449
+ declare interface IStaticDescriptorConfig {
450
+ descriptor_types: {
451
+ nodegroup_id: string;
452
+ string_template: string;
453
+ }[];
454
+ }
455
+
456
+ declare interface IStaticNodeConfigBoolean {
457
+ i18n_properties: string[];
458
+ falseLabel: {
459
+ [key: string]: string;
460
+ };
461
+ trueLabel: {
462
+ [key: string]: string;
463
+ };
464
+ }
465
+
466
+ declare interface IStaticNodeConfigConcept {
467
+ rdmCollection: string;
468
+ }
469
+
470
+ declare interface IStaticNodeConfigDomain {
471
+ i18n_config: {
472
+ [key: string]: string;
473
+ };
474
+ options: StaticDomainValue[];
475
+ }
476
+
477
+ declare interface IStringKeyedObject {
478
+ [key: string | symbol]: any;
479
+ }
480
+
481
+ declare interface IViewModel {
482
+ _: IViewModel | undefined | Promise<IViewModel | null>;
483
+ __parentPseudo: IPseudo | undefined;
484
+ forJson(): {
485
+ [key: string]: any;
486
+ } | {
487
+ [key: string]: any;
488
+ }[] | string | number | boolean | null;
489
+ __forJsonCache(getMeta: GetMeta): IStringKeyedObject | null;
490
+ }
491
+
492
+ declare interface IWKRM {
493
+ modelName: string;
494
+ modelClassName: string;
495
+ graphId: string;
496
+ meta: StaticGraphMeta;
497
+ }
498
+
499
+ declare class JsonRenderer extends Renderer {
500
+ renderDate(value: DateViewModel, _depth: number): Promise<any>;
501
+ renderBoolean(value: boolean | BooleanViewModel, _depth: number): Promise<any>;
502
+ renderConceptValue(value: ConceptValueViewModel, _depth: number): Promise<any>;
503
+ renderDomainValue(value: DomainValueViewModel, _depth: number): Promise<any>;
504
+ renderResourceReference(value: ResourceInstanceViewModel<any>, _depth: number): Promise<any>;
505
+ }
506
+
507
+ declare class MarkdownRenderer extends Renderer {
508
+ conceptValueToUrl: ((value: ConceptValueViewModel) => string) | undefined;
509
+ dateToText: ((value: DateViewModel) => string) | undefined;
510
+ domainValueToUrl: ((value: DomainValueViewModel) => string) | undefined;
511
+ resourceReferenceToUrl: ((value: ResourceInstanceViewModel<any>) => string) | undefined;
512
+ nodeToUrl: ((value: string) => string) | undefined;
513
+ constructor(callbacks: {
514
+ conceptValueToUrl: ((value: ConceptValueViewModel) => string) | undefined;
515
+ dateToText: ((value: DateViewModel) => string) | undefined;
516
+ domainValueToUrl: ((value: DomainValueViewModel) => string) | undefined;
517
+ resourceReferenceToUrl: ((value: ResourceInstanceViewModel<any>) => string) | undefined;
518
+ nodeToUrl: ((value: string) => string) | undefined;
519
+ });
520
+ renderUrl(value: UrlViewModel, _depth: number): Promise<any>;
521
+ renderDomainValue(domainValue: DomainValueViewModel, _: number): Promise<any>;
522
+ renderDate(date: DateViewModel, _: number): Promise<any>;
523
+ renderConceptValue(conceptValue: ConceptValueViewModel, _: number): Promise<any>;
524
+ renderResourceReference(rivm: ResourceInstanceViewModel<any>, _: number): Promise<any>;
525
+ }
526
+
527
+ declare namespace nodeConfig {
528
+ export {
529
+ nodeConfigManager,
530
+ StaticNodeConfigDomain,
531
+ StaticNodeConfigBoolean,
532
+ StaticNodeConfigConcept
533
+ }
534
+ }
535
+ export { nodeConfig }
536
+
537
+ declare class NodeConfigManager {
538
+ static _cache: Map<string, INodeConfig | null>;
539
+ cache: Map<string, INodeConfig | null>;
540
+ constructor(cache?: Map<string, INodeConfig | null> | undefined);
541
+ retrieve(node: StaticNode): INodeConfig | StaticNodeConfigBoolean | StaticNodeConfigDomain | null | undefined;
542
+ }
543
+
544
+ declare const nodeConfigManager: NodeConfigManager;
545
+
546
+ declare class NonLocalizedStringViewModel extends String implements IViewModel {
547
+ _: IViewModel | Promise<IViewModel> | undefined;
548
+ __parentPseudo: PseudoValue<any> | undefined;
549
+ describeField: () => string | null;
550
+ describeFieldGroup: () => string | null;
551
+ __forJsonCache(): null;
552
+ forJson(): string;
553
+ static __create(tile: StaticTile, node: StaticNode, value: any): NonLocalizedStringViewModel | Promise<NonLocalizedStringViewModel | null> | null;
554
+ __asTileData(): string;
555
+ }
556
+
557
+ declare class NumberViewModel extends Number implements IViewModel {
558
+ _: IViewModel | Promise<IViewModel> | undefined;
559
+ __parentPseudo: PseudoValue<any> | undefined;
560
+ describeField: () => string | null;
561
+ describeFieldGroup: () => string | null;
562
+ toString(): string;
563
+ __forJsonCache(): null;
564
+ forJson(): number;
565
+ static __create(tile: StaticTile, node: StaticNode, value: any): NumberViewModel | Promise<NumberViewModel | null> | null;
566
+ __asTileData(): number;
567
+ }
568
+
569
+ declare class PseudoValue<VM extends IViewModel> implements IPseudo {
570
+ node: StaticNode;
571
+ tile: StaticTile | null;
572
+ value: any;
573
+ parent: IRIVM<any> | null;
574
+ parentNode: PseudoValue<any> | null;
575
+ valueLoaded: boolean | undefined;
576
+ datatype: string | null;
577
+ originalTile: StaticTile | null;
578
+ accessed: boolean;
579
+ childNodes: Map<string, StaticNode>;
580
+ isOuter: boolean;
581
+ isInner: boolean;
582
+ inner: PseudoValue<ISemantic> | null;
583
+ independent: boolean;
584
+ isIterable(): boolean;
585
+ describeField(): string;
586
+ describeFieldGroup(): string;
587
+ constructor(node: StaticNode, tile: StaticTile | null, value: any, parent: IRIVM<any> | null, childNodes: Map<string, StaticNode>, inner: boolean | PseudoValue<ISemantic>);
588
+ getParentTileId(): string | null;
589
+ getTile(): Promise<[StaticTile | null, any[]]>;
590
+ clear(): void;
591
+ updateValue(tile?: StaticTile | null): AttrPromise<VM>;
592
+ getValue(): AttrPromise<VM | null>;
593
+ getLength(): number;
594
+ getChildTypes(): Promise<{}>;
595
+ getChildren(direct?: null): IPseudo[];
596
+ forJson(): Promise<{
597
+ [key: string]: any;
598
+ } | {
599
+ [key: string]: any;
600
+ }[] | string | number | boolean | null>;
601
+ }
602
+
603
+ export declare const RDM: ReferenceDataManager;
604
+
605
+ declare class ReferenceDataManager {
606
+ archesClient: ArchesClient;
607
+ collections: Map<string, Promise<StaticCollection>>;
608
+ constructor(archesClient: ArchesClient);
609
+ retrieveCollection(id: string): Promise<StaticCollection>;
610
+ }
611
+
612
+ declare class Renderer extends BaseRenderer {
613
+ renderDomainValue(value: DomainValueViewModel, _depth: number): Promise<any>;
614
+ renderString(value: string | StringViewModel | NonLocalizedStringViewModel, _depth: number): Promise<any>;
615
+ renderNumber(value: number | NumberViewModel, _depth: number): Promise<any>;
616
+ renderBoolean(value: boolean | BooleanViewModel, _depth: number): Promise<any>;
617
+ renderDate(value: DateViewModel, _depth: number): Promise<any>;
618
+ renderConceptValue(value: ConceptValueViewModel, _depth: number): Promise<any>;
619
+ renderResourceReference(value: ResourceInstanceViewModel<any>, _depth: number): Promise<any>;
620
+ renderSemantic(value: SemanticViewModel, depth: number): Promise<any>;
621
+ renderUrl(value: UrlViewModel, _depth: number): Promise<any>;
622
+ renderBlock(block: {
623
+ [key: string]: string;
624
+ } | {
625
+ [key: string]: string;
626
+ }[], depth: number): any;
627
+ renderArray(value: any, depth: number): Promise<any>;
628
+ }
629
+
630
+ declare namespace renderers {
631
+ export {
632
+ MarkdownRenderer,
633
+ JsonRenderer,
634
+ Cleanable,
635
+ FlatMarkdownRenderer
636
+ }
637
+ }
638
+ export { renderers }
639
+
640
+ declare class ResourceInstanceCacheEntry implements IStringKeyedObject {
641
+ [key: string]: any;
642
+ datatype: string;
643
+ id: string;
644
+ type: string;
645
+ graphId: string;
646
+ title: string | null;
647
+ meta: {
648
+ [key: string]: any;
649
+ };
650
+ constructor({ meta, id, type, graphId, title }: {
651
+ meta: IStringKeyedObject | undefined;
652
+ id: string;
653
+ type: string;
654
+ graphId: string;
655
+ title: string | null;
656
+ });
657
+ }
658
+
659
+ declare class ResourceInstanceViewModel<RIVM extends IRIVM<RIVM>> implements IStringKeyedObject {
660
+ [key: string | symbol]: any;
661
+ _: IViewModel | Promise<IViewModel> | undefined;
662
+ $: IInstanceWrapper<RIVM> | null;
663
+ __: IModelWrapper<RIVM> | null;
664
+ __parentPseudo: IPseudo | undefined;
665
+ __cacheEntry: ResourceInstanceCacheEntry | null;
666
+ id: string;
667
+ then: undefined;
668
+ [Symbol.toPrimitive]: undefined;
669
+ gm: IGraphManager | undefined;
670
+ toString(): string;
671
+ __has(key: string): Promise<boolean | undefined>;
672
+ __asTileData(): Promise<IStringKeyedObject>;
673
+ __forJsonCache(getMeta: GetMeta): Promise<ResourceInstanceCacheEntry>;
674
+ forJson(cascade?: boolean): Promise<StaticResourceReference>;
675
+ retrieve(): Promise<[IInstanceWrapper<RIVM>, IModelWrapper<RIVM>]>;
676
+ constructor(id: string, modelWrapper: IModelWrapper<RIVM> | null, instanceWrapperFactory: ((rivm: RIVM) => IInstanceWrapper<RIVM>) | null, cacheEntry: object | null);
677
+ static __create(tile: StaticTile, node: StaticNode, value: any, cacheEntry: ResourceInstanceCacheEntry | null): Promise<ResourceInstanceViewModel<any> | null>;
678
+ }
679
+
680
+ declare type ResourceInstanceViewModelConstructor<T extends IRIVM<T>> = new (id: string, modelWrapper: IModelWrapper<T> | null, instanceWrapperFactory: ((rivm: T) => IInstanceWrapper<T>) | null, cacheEntry: object | null) => T;
681
+
682
+ export declare class ResourceModelWrapper<RIVM extends IRIVM<RIVM>> {
683
+ wkrm: WKRM;
684
+ graph: StaticGraph;
685
+ viewModelClass?: ResourceInstanceViewModelConstructor<RIVM>;
686
+ permittedNodegroups?: Map<string | null, boolean | CheckPermission>;
687
+ constructor(wkrm: WKRM, graph: StaticGraph, viewModelClass?: ResourceInstanceViewModelConstructor<RIVM>);
688
+ getBranchPublicationIds(accessible?: boolean): string[];
689
+ getCollections(accessible?: boolean): string[];
690
+ pruneGraph(keepFunctions?: string[]): undefined;
691
+ exportGraph(): StaticGraph;
692
+ all(params?: {
693
+ limit?: number;
694
+ lazy?: boolean;
695
+ } | undefined): Promise<Array<RIVM>>;
696
+ stripTiles(resource: StaticResource): void;
697
+ resourceGenerator(staticResources: AsyncIterable<StaticResource, RIVM, unknown>, lazy?: boolean, pruneTiles?: boolean): AsyncGenerator<RIVM, void, unknown>;
698
+ iterAll(params: {
699
+ limit?: number;
700
+ lazy?: boolean;
701
+ }): AsyncGenerator<RIVM>;
702
+ findStatic(id: string): Promise<StaticResource>;
703
+ find(id: string, lazy?: boolean, pruneTiles?: boolean): Promise<RIVM>;
704
+ setPermittedNodegroups(permissions: Map<string | null, boolean | CheckPermission>): void;
705
+ getPermittedNodegroups(): Map<string | null, boolean | CheckPermission>;
706
+ isNodegroupPermitted(nodegroupId: string, tile: StaticTile | null): boolean;
707
+ makeInstance(id: string, resource: StaticResource | null, pruneTiles?: boolean): RIVM;
708
+ edges: Map<string, string[]> | undefined;
709
+ nodes: Map<string, StaticNode> | undefined;
710
+ nodegroups: Map<string, StaticNodegroup> | undefined;
711
+ nodesByAlias: Map<string, StaticNode> | undefined;
712
+ getChildNodes(nodeId: string): Map<string, StaticNode>;
713
+ buildNodes(): void;
714
+ getNodeObjectsByAlias(): Map<string, StaticNode>;
715
+ getEdges(): Map<string, string[]>;
716
+ getNodeObjects(): Map<string, StaticNode>;
717
+ getNodegroupObjects(): Map<string, StaticNodegroup>;
718
+ getRootNode(): StaticNode;
719
+ fromStaticResource(resource: StaticResource, lazy?: boolean, pruneTiles?: boolean): Promise<RIVM>;
720
+ }
721
+
722
+ declare class SemanticViewModel implements IStringKeyedObject, IViewModel {
723
+ [key: string | symbol]: any;
724
+ _: IViewModel | Promise<IViewModel> | undefined;
725
+ then: undefined;
726
+ [Symbol.toPrimitive]: undefined;
727
+ __parentPseudo: PseudoValue<any> | undefined;
728
+ __childValues: Map<string, any>;
729
+ __parentWkri: IRIVM<any> | null;
730
+ __childNodes: Map<string, StaticNode>;
731
+ __tile: StaticTile | null;
732
+ __node: StaticNode;
733
+ __forJsonCache(): null;
734
+ constructor(parentWkri: IRIVM<any> | null, childNodes: Map<string, StaticNode>, tile: StaticTile | null, node: StaticNode);
735
+ toString(): Promise<string>;
736
+ toObject(): Promise<any>;
737
+ forJson(): Promise<any>;
738
+ __update(map: Map<string, any>): Promise<void[]>;
739
+ __get(key: string): Promise<IViewModel | IViewModel[] | null>;
740
+ __set(key: string, value: any): Promise<void>;
741
+ __has(key: string): boolean;
742
+ __getChildTypes(): Promise<Map<string, any>>;
743
+ __getChildren(direct?: null | boolean): Promise<any[]>;
744
+ __getChildValue(key: string, setDefault?: boolean): Promise<IPseudo>;
745
+ __makePseudo(key: string): IPseudo;
746
+ static __create(tile: StaticTile, node: StaticNode, value: any, parent: IRIVM<any> | null, childNodes: Map<string, StaticNode>): Promise<SemanticViewModel>;
747
+ __asTileData(): Promise<(any[] | null)[]>;
748
+ __getChildValues(): Promise<Map<string, IPseudo>>;
749
+ }
750
+
751
+ export declare const setCurrentLanguage: typeof utils.setCurrentLanguage;
752
+
753
+ declare function setCurrentLanguage_2(lang: string): void;
754
+
755
+ declare function slugify(original: any): string;
756
+
757
+ declare class StaticCard {
758
+ active: boolean;
759
+ cardid: string;
760
+ component_id: string;
761
+ config?: object;
762
+ constraints: Array<StaticConstraint>;
763
+ cssclass: null | string;
764
+ description: string | null;
765
+ graph_id: string;
766
+ helpenabled: boolean;
767
+ helptext: StaticTranslatableString;
768
+ helptitle: StaticTranslatableString;
769
+ instructions: StaticTranslatableString;
770
+ is_editable: boolean;
771
+ name: StaticTranslatableString;
772
+ nodegroup_id: string;
773
+ sortorder: number | null;
774
+ visible: boolean;
775
+ constructor(jsonData: StaticCard);
776
+ }
777
+
778
+ declare class StaticCardsXNodesXWidgets {
779
+ card_id: string;
780
+ config: object;
781
+ id: string;
782
+ label: StaticTranslatableString;
783
+ node_id: string;
784
+ sortorder: number;
785
+ visible: boolean;
786
+ widget_id: string;
787
+ constructor(jsonData: StaticCardsXNodesXWidgets);
788
+ }
789
+
790
+ declare class StaticCollection {
791
+ id: string;
792
+ prefLabels: {
793
+ [lang: string]: StaticValue;
794
+ };
795
+ concepts: {
796
+ [conceptId: string]: StaticConcept;
797
+ };
798
+ __allConcepts: {
799
+ [conceptId: string]: StaticConcept;
800
+ };
801
+ __values: {
802
+ [valueId: string]: StaticValue;
803
+ };
804
+ static fromConceptScheme(props: {
805
+ collectionid?: string;
806
+ name?: string | {
807
+ [lang: string]: StaticValue;
808
+ } | StaticValue;
809
+ conceptScheme: StaticConcept;
810
+ }): StaticCollection;
811
+ static create(props: {
812
+ collectionid?: string;
813
+ name: string | {
814
+ [lang: string]: StaticValue;
815
+ } | StaticValue;
816
+ concepts: StaticConcept[] | {
817
+ [conceptId: string]: StaticConcept;
818
+ };
819
+ }): StaticCollection;
820
+ constructor(jsonData: StaticCollection);
821
+ getConceptValue?(valueId: string): StaticValue;
822
+ getConceptByValue?(label: string): StaticConcept | null | undefined;
823
+ toString(): string;
824
+ }
825
+
826
+ declare class StaticConcept {
827
+ id: string;
828
+ prefLabels: {
829
+ [lang: string]: StaticValue;
830
+ };
831
+ source: string | null;
832
+ sortOrder: number | null;
833
+ children: StaticConcept[] | null;
834
+ constructor(jsonData: StaticConcept);
835
+ getPrefLabel?(): StaticValue;
836
+ toString(): any;
837
+ static fromValue(conceptScheme: StaticConcept | null, value: string | StaticValue | {
838
+ [lang: string]: StaticValue;
839
+ }, children?: (string | StaticValue | StaticConcept)[], config?: {
840
+ baseLanguage?: string;
841
+ source?: string | null;
842
+ sortOrder?: number | null;
843
+ }): StaticConcept;
844
+ }
845
+
846
+ declare class StaticConstraint {
847
+ card_id: string;
848
+ constraintid: string;
849
+ nodes: Array<string>;
850
+ uniquetoallinstances: boolean;
851
+ constructor(jsonData: StaticConstraint);
852
+ }
853
+
854
+ declare class StaticDomainValue {
855
+ id: string;
856
+ selected: boolean;
857
+ text: {
858
+ [lang: string]: string;
859
+ };
860
+ constructor(jsonData: StaticDomainValue);
861
+ toString(): string;
862
+ lang(lang: string): string | undefined;
863
+ forJson(): Promise<{
864
+ id: string;
865
+ selected: boolean;
866
+ text: {
867
+ [lang: string]: string;
868
+ };
869
+ }>;
870
+ }
871
+
872
+ declare class StaticEdge {
873
+ description: string | null;
874
+ domainnode_id: string;
875
+ edgeid: string;
876
+ graph_id: string;
877
+ name: null | string;
878
+ ontologyproperty: null | string;
879
+ rangenode_id: string;
880
+ constructor(jsonData: StaticEdge);
881
+ copy?(): StaticEdge;
882
+ }
883
+
884
+ declare class StaticFunctionsXGraphs {
885
+ config: IStaticDescriptorConfig;
886
+ function_id: string;
887
+ graph_id: string;
888
+ id: string;
889
+ constructor(jsonData: StaticFunctionsXGraphs);
890
+ copy(): StaticFunctionsXGraphs;
891
+ }
892
+
893
+ declare class StaticGraph {
894
+ author: string;
895
+ cards: Array<StaticCard> | null;
896
+ cards_x_nodes_x_widgets: Array<StaticCardsXNodesXWidgets> | null;
897
+ color: string | null;
898
+ config: object;
899
+ deploymentdate: null | string;
900
+ deploymentfile: null | string;
901
+ description: StaticTranslatableString;
902
+ edges: Array<StaticEdge>;
903
+ functions_x_graphs: Array<StaticFunctionsXGraphs> | null;
904
+ graphid: string;
905
+ iconclass: string;
906
+ is_editable: boolean | null;
907
+ isresource: boolean;
908
+ jsonldcontext: string | null;
909
+ name: StaticTranslatableString;
910
+ nodegroups: Array<StaticNodegroup>;
911
+ nodes: Array<StaticNode>;
912
+ ontology_id: string | null;
913
+ publication: StaticPublication | null;
914
+ relatable_resource_model_ids: Array<string>;
915
+ resource_2_resource_constraints: Array<any> | null;
916
+ root: StaticNode;
917
+ slug: string | null;
918
+ subtitle: StaticTranslatableString;
919
+ template_id: string;
920
+ version: string;
921
+ constructor(jsonData: StaticGraph);
922
+ copy?(): StaticGraph;
923
+ static create(props: {
924
+ author?: string;
925
+ color?: string | null;
926
+ config?: object;
927
+ deploymentdate?: null | string;
928
+ deploymentfile?: null | string;
929
+ description?: string | StaticTranslatableString;
930
+ graphid?: string;
931
+ iconclass?: string;
932
+ is_editable?: boolean | null;
933
+ isresource?: boolean;
934
+ jsonldcontext?: string | null;
935
+ name?: string | StaticTranslatableString;
936
+ ontology_id?: string | null;
937
+ relatable_resource_model_ids?: Array<string>;
938
+ resource_2_resource_constraints?: Array<any> | null;
939
+ slug?: string | null;
940
+ subtitle?: string | StaticTranslatableString;
941
+ template_id?: string;
942
+ version?: string;
943
+ }, published?: boolean): StaticGraph;
944
+ }
945
+
946
+ declare class StaticGraphMeta {
947
+ [key: string]: any;
948
+ author: string | undefined;
949
+ cards: number | undefined;
950
+ cards_x_nodes_x_widgets: number | undefined;
951
+ color: string | undefined;
952
+ description: {
953
+ [lang: string]: string;
954
+ } | undefined;
955
+ edges: number | undefined;
956
+ graphid: string;
957
+ iconclass: string | undefined;
958
+ is_editable: boolean | undefined;
959
+ isresource: boolean | undefined;
960
+ jsonldcontext: {
961
+ [key: string]: any;
962
+ } | undefined;
963
+ name: {
964
+ [lang: string]: string;
965
+ } | undefined;
966
+ nodegroups: number | undefined;
967
+ nodes: number | undefined;
968
+ ontology_id: string | undefined;
969
+ publication: {
970
+ [key: string]: string | null;
971
+ } | undefined;
972
+ relatable_resource_model_ids: string[];
973
+ resource_2_resource_constraints: any[];
974
+ root: StaticNode | undefined;
975
+ slug: string | undefined;
976
+ subtitle: {
977
+ [lang: string]: string;
978
+ } | undefined;
979
+ version: string | undefined;
980
+ constructor(jsondata: StaticGraphMeta);
981
+ }
982
+
983
+ declare class StaticNode {
984
+ alias: string | null;
985
+ config: {
986
+ [key: string]: any;
987
+ };
988
+ datatype: string;
989
+ description: string | null;
990
+ exportable: boolean;
991
+ fieldname: null | string;
992
+ graph_id: string;
993
+ hascustomalias: boolean;
994
+ is_collector: boolean;
995
+ isrequired: boolean;
996
+ issearchable: boolean;
997
+ istopnode: boolean;
998
+ name: string;
999
+ nodegroup_id: string | null;
1000
+ nodeid: string;
1001
+ ontologyclass: string | null;
1002
+ parentproperty: string | null;
1003
+ sortorder: number;
1004
+ sourcebranchpublication_id: null | string;
1005
+ constructor(jsonData: StaticNode);
1006
+ copy?(): StaticNode;
1007
+ static compare(nodeA: StaticNode | {
1008
+ [key: string]: any;
1009
+ }, nodeB: StaticNode | {
1010
+ [key: string]: any;
1011
+ }): number | boolean;
1012
+ }
1013
+
1014
+ declare class StaticNodeConfigBoolean implements IStaticNodeConfigBoolean, INodeConfig {
1015
+ i18n_properties: string[];
1016
+ falseLabel: {
1017
+ [key: string]: string;
1018
+ };
1019
+ trueLabel: {
1020
+ [key: string]: string;
1021
+ };
1022
+ constructor(jsonData: IStaticNodeConfigBoolean);
1023
+ }
1024
+
1025
+ declare class StaticNodeConfigConcept implements IStaticNodeConfigConcept, INodeConfig {
1026
+ rdmCollection: string;
1027
+ constructor(jsonData: IStaticNodeConfigConcept);
1028
+ }
1029
+
1030
+ declare class StaticNodeConfigDomain implements IStaticNodeConfigDomain, INodeConfig {
1031
+ i18n_config: {
1032
+ [key: string]: string;
1033
+ };
1034
+ options: StaticDomainValue[];
1035
+ getSelected(): StaticDomainValue | undefined;
1036
+ valueFromId(id: string): StaticDomainValue | undefined;
1037
+ constructor(jsonData: IStaticNodeConfigDomain);
1038
+ }
1039
+
1040
+ declare class StaticNodegroup {
1041
+ cardinality: "1" | "n" | null;
1042
+ legacygroupid: null;
1043
+ nodegroupid: string;
1044
+ parentnodegroup_id: string | null;
1045
+ constructor(jsonData: StaticNodegroup);
1046
+ copy?(): StaticNodegroup;
1047
+ }
1048
+
1049
+ declare type StaticProvisionalEdit = any;
1050
+
1051
+ declare class StaticPublication {
1052
+ graph_id: string;
1053
+ notes: null | string;
1054
+ publicationid: string;
1055
+ published_time: string;
1056
+ constructor(jsonData: StaticPublication);
1057
+ copy?(): StaticPublication;
1058
+ }
1059
+
1060
+ declare class StaticResource {
1061
+ resourceinstance: StaticResourceMetadata;
1062
+ tiles: Array<StaticTile> | null;
1063
+ metadata: {
1064
+ [key: string]: string;
1065
+ };
1066
+ __cache: {
1067
+ [tileId: string]: {
1068
+ [nodeId: string]: {
1069
+ [key: string]: string;
1070
+ };
1071
+ };
1072
+ } | undefined;
1073
+ __source: string | undefined;
1074
+ __scopes: string[] | undefined;
1075
+ constructor(jsonData: StaticResource);
1076
+ }
1077
+
1078
+ declare class StaticResourceDescriptors {
1079
+ [key: string]: (string | undefined | (() => boolean));
1080
+ name?: string;
1081
+ map_popup?: string;
1082
+ description?: string;
1083
+ constructor(jsonData?: StaticResourceDescriptors);
1084
+ isEmpty(): boolean;
1085
+ }
1086
+
1087
+ declare class StaticResourceMetadata {
1088
+ descriptors: StaticResourceDescriptors;
1089
+ graph_id: string;
1090
+ name: string;
1091
+ resourceinstanceid: string;
1092
+ publication_id: string | null;
1093
+ principaluser_id: number | null;
1094
+ legacyid: null | string;
1095
+ graph_publication_id: string | null;
1096
+ constructor(jsonData: StaticResourceMetadata);
1097
+ }
1098
+
1099
+ declare class StaticResourceReference {
1100
+ id: string;
1101
+ type: string | undefined;
1102
+ graphId: string;
1103
+ title: string | undefined;
1104
+ root: any | undefined;
1105
+ meta?: {
1106
+ [key: string]: any;
1107
+ };
1108
+ constructor(jsonData: StaticResourceReference);
1109
+ }
1110
+
1111
+ declare class StaticStore {
1112
+ archesClient: ArchesClient;
1113
+ cache: Map<string, StaticResource | StaticResourceMetadata>;
1114
+ cacheMetadataOnly: boolean;
1115
+ constructor(archesClient: ArchesClient, cacheMetadataOnly?: boolean);
1116
+ getMeta(id: string, onlyIfCached?: boolean): Promise<StaticResourceMetadata | null>;
1117
+ loadAll(graphId: string, limit?: number | undefined): AsyncIterable<StaticResource>;
1118
+ loadOne(id: string): Promise<StaticResource>;
1119
+ }
1120
+
1121
+ export declare const staticStore: StaticStore;
1122
+
1123
+ declare class StaticTile {
1124
+ data: Map<string, object | Map<string, any> | Array<any> | null | number | boolean | string>;
1125
+ nodegroup_id: string;
1126
+ resourceinstance_id: string;
1127
+ tileid: string | null;
1128
+ parenttile_id: string | null;
1129
+ provisionaledits: null | Array<StaticProvisionalEdit>;
1130
+ sortorder: number | null;
1131
+ constructor(jsonData: StaticTile);
1132
+ ensureId(): string;
1133
+ }
1134
+
1135
+ declare class StaticTranslatableString extends String {
1136
+ translations: Map<string, string>;
1137
+ lang: string;
1138
+ constructor(s: string | StaticTranslatableString, lang?: undefined | string);
1139
+ copy?(): StaticTranslatableString;
1140
+ toString(): string;
1141
+ toJSON(): {
1142
+ [key: string]: string;
1143
+ };
1144
+ }
1145
+
1146
+ declare namespace staticTypes {
1147
+ export {
1148
+ StaticValue,
1149
+ StaticTile,
1150
+ StaticGraph,
1151
+ StaticResource,
1152
+ StaticResourceMetadata,
1153
+ StaticNode,
1154
+ StaticNodegroup,
1155
+ StaticEdge,
1156
+ StaticCard,
1157
+ StaticCardsXNodesXWidgets,
1158
+ StaticCollection,
1159
+ StaticConcept,
1160
+ StaticDomainValue,
1161
+ StaticResourceReference,
1162
+ StaticGraphMeta,
1163
+ StaticFunctionsXGraphs,
1164
+ StaticResourceDescriptors,
1165
+ StaticTranslatableString,
1166
+ StaticConstraint,
1167
+ IStaticDescriptorConfig
1168
+ }
1169
+ }
1170
+ export { staticTypes }
1171
+
1172
+ declare class StaticValue {
1173
+ id: string;
1174
+ value: string;
1175
+ __concept?: StaticConcept | null;
1176
+ __conceptId?: string | null;
1177
+ constructor(jsonData: StaticValue, concept?: StaticConcept | string | null);
1178
+ toString(): string;
1179
+ static create(referent: string | StaticConcept, valueType: string, value: string, language?: string): StaticValue;
1180
+ }
1181
+
1182
+ declare class StringTranslatedLanguage {
1183
+ value: string;
1184
+ }
1185
+
1186
+ declare class StringViewModel extends String implements IViewModel {
1187
+ _: IViewModel | Promise<IViewModel> | undefined;
1188
+ __parentPseudo: PseudoValue<any> | undefined;
1189
+ describeField: () => string | null;
1190
+ describeFieldGroup: () => string | null;
1191
+ _value: Map<string, StringTranslatedLanguage>;
1192
+ __forJsonCache(): null;
1193
+ constructor(value: Map<string, StringTranslatedLanguage>, language?: string | null);
1194
+ forJson(): string;
1195
+ lang(language: string): string | undefined;
1196
+ static __create(tile: StaticTile, node: StaticNode, value: any): StringViewModel | Promise<StringViewModel | null> | null;
1197
+ __asTileData(): Map<string, StringTranslatedLanguage>;
1198
+ }
1199
+
1200
+ declare class Url {
1201
+ url: string;
1202
+ url_label?: string;
1203
+ constructor(url: string, url_label?: string);
1204
+ }
1205
+
1206
+ declare class UrlViewModel extends String implements IViewModel {
1207
+ _: IViewModel | Promise<IViewModel> | undefined;
1208
+ __parentPseudo: PseudoValue<any> | undefined;
1209
+ describeField: () => string | null;
1210
+ describeFieldGroup: () => string | null;
1211
+ _value: Url;
1212
+ __forJsonCache(): null;
1213
+ constructor(value: Url);
1214
+ forJson(): {
1215
+ [key: string]: string;
1216
+ };
1217
+ label(): string;
1218
+ href(): string;
1219
+ static __create(tile: StaticTile, node: StaticNode, value: any): UrlViewModel | Promise<UrlViewModel | null> | null;
1220
+ __asTileData(): {
1221
+ [key: string]: string;
1222
+ };
1223
+ }
1224
+
1225
+ declare namespace utils {
1226
+ export {
1227
+ slugify,
1228
+ AttrPromise,
1229
+ getCurrentLanguage_2 as getCurrentLanguage,
1230
+ generateUuidv5,
1231
+ setCurrentLanguage_2 as setCurrentLanguage
1232
+ }
1233
+ }
1234
+ export { utils }
1235
+
1236
+ declare class ValueList<T extends IRIVM<T>> {
1237
+ values: Map<string, any>;
1238
+ wrapper: IInstanceWrapper<T>;
1239
+ tiles: StaticTile[] | null;
1240
+ promises: Map<string, boolean | Promise<boolean | IViewModel>>;
1241
+ writeLock: null | Promise<boolean | IViewModel>;
1242
+ constructor(values: Map<string, any>, allNodegroups: Map<string, boolean>, wrapper: IInstanceWrapper<T>, tiles: StaticTile[] | null);
1243
+ get(key: string): Promise<any>;
1244
+ set(key: string, value: any): void;
1245
+ has(key: string): Promise<boolean>;
1246
+ retrieve(key: string, dflt?: any, raiseError?: boolean): Promise<any>;
1247
+ setDefault(key: string, value: any): Promise<any>;
1248
+ }
1249
+
1250
+ declare class ViewContext {
1251
+ graphManager: IGraphManager | undefined;
1252
+ }
1253
+
1254
+ declare const viewContext: ViewContext;
1255
+
1256
+ declare namespace viewModels {
1257
+ export {
1258
+ ResourceInstanceCacheEntry,
1259
+ DEFAULT_LANGUAGE,
1260
+ ResourceInstanceViewModel,
1261
+ ValueList,
1262
+ getViewModel,
1263
+ DomainValueViewModel,
1264
+ SemanticViewModel,
1265
+ StringViewModel,
1266
+ DateViewModel,
1267
+ GeoJSONViewModel,
1268
+ ConceptValueViewModel,
1269
+ viewContext,
1270
+ NonLocalizedStringViewModel,
1271
+ CUSTOM_DATATYPES,
1272
+ BooleanViewModel,
1273
+ NumberViewModel,
1274
+ UrlViewModel
1275
+ }
1276
+ }
1277
+ export { viewModels }
1278
+
1279
+ declare class Widget {
1280
+ id: string;
1281
+ name: string;
1282
+ datatype: string;
1283
+ defaultConfig: string;
1284
+ constructor(id: string, name: string, datatype: string, defaultConfig: string);
1285
+ getDefaultConfig(): {
1286
+ [key: string]: any;
1287
+ };
1288
+ }
1289
+
1290
+ export declare class WKRM {
1291
+ modelName: string;
1292
+ modelClassName: string;
1293
+ graphId: string;
1294
+ meta: StaticGraphMeta;
1295
+ constructor(meta: StaticGraphMeta);
1296
+ }
1297
+
1298
+ export { }