Coder Social home page Coder Social logo

capture-models's Introduction

Capture models

This is a repository for working with capture models in JS. It will provide the data-model, operations on the data-model and UI components for editing the data model. It won't provide the UI for all cases and won't bring the UI for going from a piece of content to a selector value.

Installation

Requirements:

  • Node 10.x

Install and start

$ yarn install
$ yarn start

You will get a FESK+nunjucks environment and a Storybook. Since this is a library, you will also get ./lib and ./dist directories with compiled libraries that will be used when publishing to NPM.

Implementation notes (known issues):

  • stylesheets must not be the same name as the components, so if you have a MyComponent.tsx then you must name your style file differently. As a convention, I've added MyComponent.styles.scss as the convention to work around this issue.
  • Importing react needs to be done as import * as React from 'react'; due to a flaw in the TSConfig.

capture-models's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar robmarch2 avatar stephenwf avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

capture-models's Issues

Error saving OCR

Test fixture + replication required.

Before:

{"id":"5246535f-ee25-4543-ae6c-3f9e75708817","structure":{"id":"e5ec4a70-173c-4f33-86ca-f475ef5b1880","type":"choice","label":"OCR Correction","items":[{"id":"9f5624fc-d05d-4ccc-b674-23f72d0c1e0e","type":"model","label":"Default","fields":[["ocr-correction",[["lines",["text"]]]]]}]},"document":{"id":"69e2a9cb-07e4-4db4-a13d-b051d203d466","type":"entity","label":"OCR Correction","properties":{"ocr-correction":[{"id":"ea0d0a97-e528-4264-9555-6a372b894813","type":"madoc-paragraphs","label":"OCR Correction","value":""}]}},"target":[{"id":"urn:madoc:manifest:9665","type":"Manifest"},{"id":"urn:madoc:canvas:9693","type":"Canvas"}],"profile":null,"derivedFrom":"2420cacd-d8b0-4234-b706-a378a10847a0","contributors":{"urn:madoc:user:1":{"id":"urn:madoc:user:1","type":"Person","name":"Madoc TS"}}}

JSON saved
https://gist.githubusercontent.com/stephenwf/958aa9739b662c260d3545117f71829b/raw/f568979d699f460e4bfbc90d7e6b5f3deefa247a/model.json

error message:

ERROR:  syntax error at or near ")" at character 91
STATEMENT:  SELECT id FROM "models_api"."document" "d" WHERE "d"."parentId" = $1 AND "d"."id" not IN ()
ERROR:  syntax error at or near ")" at character 88
STATEMENT:  SELECT id FROM "models_api"."field" "d" WHERE "d"."parentId" = $1 AND "d"."id" not IN ()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.