(schemas: {[tableId: string]: any})
| 49 | }; |
| 50 | |
| 51 | const toTablesSchema = (schemas: {[tableId: string]: any}): TablesSchema => { |
| 52 | const tablesSchema: TablesSchema = objNew(); |
| 53 | objForEach(schemas, (schema, tableId) => { |
| 54 | const tableSchema: {[cellId: string]: CellSchema} = objNew(); |
| 55 | ifNotUndefined(getProperties(schema), (properties) => |
| 56 | objForEach(properties, (cellSchema, cellId) => |
| 57 | ifNotUndefined(toCellOrValueSchema(cellSchema), (cellSchema) => { |
| 58 | tableSchema[cellId] = cellSchema; |
| 59 | }), |
| 60 | ), |
| 61 | ); |
| 62 | if (!objIsEmpty(tableSchema)) { |
| 63 | tablesSchema[tableId] = tableSchema; |
| 64 | } |
| 65 | }); |
| 66 | return tablesSchema; |
| 67 | }; |
| 68 | |
| 69 | const toValuesSchema = (schemas: {[valueId: string]: any}): ValuesSchema => { |
| 70 | const valuesSchema: ValuesSchema = objNew(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…