Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
8a3f251
ShexForm initial structure
pablo-rodriguez-jd Apr 8, 2019
cd58f54
recursive component
pablo-rodriguez-jd Apr 8, 2019
79ac302
Dynamic form fields
pablo-rodriguez-jd Apr 8, 2019
972a3cc
Merge branch 'develop' into feature/shex-form-component
pablo-rodriguez-jd Apr 9, 2019
f2d67e7
Shex in storybook
pablo-rodriguez-jd Apr 9, 2019
fcc278a
added shexUse hook
jairo-campos-JD Apr 9, 2019
d25145c
added parentPredicate on link focusForm
jairo-campos-JD Apr 9, 2019
7bd0b87
added shexForm on demo page
jairo-campos-JD Apr 9, 2019
0cf463f
added parentSubject on formFocus
jairo-campos-JD Apr 10, 2019
2663bf1
field and fields component
pablo-rodriguez-jd Apr 10, 2019
3200b83
Merge branch 'feature/shex-form-component' of https://github.com/inru…
pablo-rodriguez-jd Apr 10, 2019
97d49fb
added parenPredicate link id
jairo-campos-JD Apr 10, 2019
3c2329c
Merge branch 'feature/shex-form-component' of https://github.com/inru…
jairo-campos-JD Apr 10, 2019
8399447
useForm hook v1
pablo-rodriguez-jd Apr 10, 2019
b74445b
updated parentPredicate to parentSubject
jairo-campos-JD Apr 10, 2019
ecfcb25
updated jest result json
jairo-campos-JD Apr 10, 2019
3297b50
updated jest result json
jairo-campos-JD Apr 10, 2019
3078dab
onChange
pablo-rodriguez-jd Apr 10, 2019
5753372
action added
pablo-rodriguez-jd Apr 10, 2019
6eb7608
refactor get _formFocus
jairo-campos-JD Apr 10, 2019
1251d44
Merge branch 'feature/shex-form-component' of https://github.com/inru…
jairo-campos-JD Apr 10, 2019
cc96742
render empty subject fields
jairo-campos-JD Apr 10, 2019
72229cf
onSubmit, new Shex
pablo-rodriguez-jd Apr 10, 2019
2a7905b
Merge branch 'feature/shex-form-component' of https://github.com/inru…
pablo-rodriguez-jd Apr 10, 2019
821d817
added values when node is a dropdown
jairo-campos-JD Apr 11, 2019
b00c5bf
added functionality to add new fields
jairo-campos-JD Apr 11, 2019
8168562
On form reset
pablo-rodriguez-jd Apr 11, 2019
51074fd
sace progress add new node
jairo-campos-JD Apr 11, 2019
ee9ce7e
Merge branch 'feature/shex-form-component' of https://github.com/inru…
jairo-campos-JD Apr 11, 2019
ff11a44
added functionality to add new no link nodes
jairo-campos-JD Apr 11, 2019
f4f262f
add parentSubject for new fields
jairo-campos-JD Apr 11, 2019
1367c26
CRUD events for onSubmit
pablo-rodriguez-jd Apr 11, 2019
3eea091
added multiple values functionality
jairo-campos-JD Apr 15, 2019
9951983
added multiple values functionality
jairo-campos-JD Apr 15, 2019
32a10e4
added document uri on dropdown values
jairo-campos-JD Apr 15, 2019
6e89869
Dropdown v1
pablo-rodriguez-jd Apr 15, 2019
3f4e9d1
Merge branch 'feature/shex-form-component' of https://github.com/inru…
pablo-rodriguez-jd Apr 15, 2019
6b594b7
added recursive on addnewlink and fix parentSubject dropwdown
jairo-campos-JD Apr 15, 2019
528e8d3
Merge branch 'feature/shex-form-component' of https://github.com/inru…
jairo-campos-JD Apr 15, 2019
bf98c40
removed console
jairo-campos-JD Apr 15, 2019
9686433
fixed conflict issue
jairo-campos-JD Apr 15, 2019
68645c6
addNewExpression field refactor
jairo-campos-JD Apr 15, 2019
a66f966
added webid on not link data
jairo-campos-JD Apr 15, 2019
0f87526
Dynamic label for dropdown
pablo-rodriguez-jd Apr 15, 2019
a122580
remove parentSubject when is a link node
jairo-campos-JD Apr 15, 2019
9625990
Merge branch 'feature/shex-form-component' of https://github.com/inru…
jairo-campos-JD Apr 15, 2019
91e0f20
OnSubmit linked data
pablo-rodriguez-jd Apr 15, 2019
5bb1ae0
Merge branch 'feature/shex-form-component' of https://github.com/inru…
pablo-rodriguez-jd Apr 15, 2019
85a48b0
onSubmit for linked and no linked data
pablo-rodriguez-jd Apr 15, 2019
9763d1d
fixed link id issue on new nodes
jairo-campos-JD Apr 16, 2019
8145d4e
print annotation key label
jairo-campos-JD Apr 16, 2019
8556de0
print annotation key label
jairo-campos-JD Apr 16, 2019
b484b88
added annotations on form shex
jairo-campos-JD Apr 16, 2019
524f162
added prefix annotation on ProfileShex
jairo-campos-JD Apr 16, 2019
adbf83b
added utils to get shex form label from annotations
jairo-campos-JD Apr 16, 2019
fa61802
added prefix functionality on shexForm
jairo-campos-JD Apr 16, 2019
ec2fa50
fixed parent render label
jairo-campos-JD Apr 16, 2019
eb2c9c5
added functionality to remove expressions into shexJ
jairo-campos-JD Apr 17, 2019
5c81d6e
add small styles on shexfom
jairo-campos-JD Apr 17, 2019
4acdda7
add small styles on shexfom
jairo-campos-JD Apr 17, 2019
d13e80c
onDelete
pablo-rodriguez-jd Apr 17, 2019
6162ffb
Merge branch 'feature/shex-form-component' of https://github.com/inru…
pablo-rodriguez-jd Apr 17, 2019
6b5f8be
onDelete with UI params
pablo-rodriguez-jd Apr 17, 2019
8b3d74b
fixed delete link nodes fields
jairo-campos-JD Apr 17, 2019
342db4b
fixed prefix child annotations
jairo-campos-JD Apr 17, 2019
04c26f3
Fix new empty fields parentSubject
pablo-rodriguez-jd Apr 17, 2019
aa1938d
Merge branch 'feature/shex-form-component' of https://github.com/inru…
pablo-rodriguez-jd Apr 17, 2019
ab8e721
canDelete or not
pablo-rodriguez-jd Apr 17, 2019
51dec6d
fixed other shexC FILES
jairo-campos-JD Apr 18, 2019
0e0c824
Merge branch 'feature/shex-form-component' of https://github.com/inru…
jairo-campos-JD Apr 18, 2019
64f5505
last updates
jairo-campos-JD Apr 18, 2019
0579e54
fix add new link of type select and fix link save issue on select
jairo-campos-JD Apr 18, 2019
4525375
show empty select when it is not on document POD
jairo-campos-JD Apr 18, 2019
059025d
added functionality to remove select fields
jairo-campos-JD Apr 18, 2019
670857c
added rootShape by default
jairo-campos-JD Apr 18, 2019
a0b884a
fixed label annotations
jairo-campos-JD Apr 18, 2019
33e12f2
fixed delete dropdown link data fields
jairo-campos-JD Apr 18, 2019
7cc5533
fixed issue link field
jairo-campos-JD Apr 18, 2019
1cf9b1a
fixed min max issue
jairo-campos-JD Apr 18, 2019
2e80726
added function to delete or update shexJ
jairo-campos-JD Apr 19, 2019
57787d9
add functionality to update or delte shexJ object
jairo-campos-JD Apr 19, 2019
ecaf24b
renamed function to add new field
jairo-campos-JD Apr 22, 2019
f80d814
refactor fillFormData recursive
jairo-campos-JD Apr 22, 2019
993bfeb
fixed fieldValue issue
jairo-campos-JD Apr 22, 2019
501b591
fixed proxies error
jairo-campos-JD Apr 22, 2019
1bf12b2
fixed empty link to lflex
jairo-campos-JD Apr 22, 2019
d1d114f
fix min max on link buttons
jairo-campos-JD Apr 22, 2019
a049db8
add unsaved on fecth
jairo-campos-JD Apr 22, 2019
5c03779
update unsaved to saved
jairo-campos-JD Apr 22, 2019
74bfc69
fixed unsaved flag
jairo-campos-JD Apr 22, 2019
0745c09
saved changed to isNew
jairo-campos-JD Apr 22, 2019
8b912b2
onDelete Function
pablo-rodriguez-jd Apr 23, 2019
7f966c4
refactor new expression on shexJ function
jairo-campos-JD Apr 23, 2019
2927093
merge conflict
jairo-campos-JD Apr 23, 2019
dfb837b
refactor shexJ hooks names and props params
jairo-campos-JD Apr 24, 2019
75a0a30
refactor addnewField on shexJ
jairo-campos-JD Apr 24, 2019
d327272
updated doc on useShex
jairo-campos-JD Apr 24, 2019
8ffe960
add link on 3 level or more
jairo-campos-JD Apr 24, 2019
e335bca
add parentPredicate
jairo-campos-JD Apr 24, 2019
abad465
defaultValue update, isNew to false
pablo-rodriguez-jd Apr 24, 2019
ae0b555
fixed createField function
jairo-campos-JD Apr 25, 2019
4f19be1
Merge branch 'feature/shex-form-component-v2' of https://github.com/i…
pablo-rodriguez-jd Apr 25, 2019
85cc50b
delete link from correct subject and predicate
pablo-rodriguez-jd Apr 25, 2019
140f4d0
fixed multiple copies on clone
jairo-campos-JD Apr 25, 2019
c57d3e8
add hook test and fix hook alias on test
jairo-campos-JD Apr 25, 2019
d641ffb
fix error on render
jairo-campos-JD Apr 25, 2019
790df81
added reachook test library
jairo-campos-JD Apr 25, 2019
5b99f2d
fix error on render
jairo-campos-JD Apr 25, 2019
9369729
added useShex test
jairo-campos-JD Apr 25, 2019
7441262
add parentSubject on level 1 shexC
jairo-campos-JD Apr 25, 2019
db7140e
added seed on random date for link id data
jairo-campos-JD Apr 25, 2019
b9b00c9
fixed addnewField by value
jairo-campos-JD Apr 25, 2019
c409b04
create handleShexForm demo component
jairo-campos-JD Apr 26, 2019
8306611
refactor components folders
jairo-campos-JD Apr 26, 2019
cfd985b
allow to add rootShape manually
jairo-campos-JD Apr 26, 2019
ecf3cfe
expose ShexFormBuilder on library
jairo-campos-JD Apr 26, 2019
cdfd791
added functionality to create a document if doesnt exist on POD
jairo-campos-JD Apr 26, 2019
06d87af
added callback hook on useShex
jairo-campos-JD Apr 29, 2019
ba2f4f7
add shex types on hook
jairo-campos-JD Apr 29, 2019
ced39c3
fixed issue when documentUri is empty
jairo-campos-JD Apr 29, 2019
83cee25
add react hook library
jairo-campos-JD Apr 29, 2019
171e3f9
fixed flow types on shex hook
jairo-campos-JD Apr 29, 2019
deed5a3
added test to useForm
jairo-campos-JD Apr 29, 2019
8e01a5c
added onError callback on fetch documents
jairo-campos-JD Apr 29, 2019
e3fdb5c
refactor rename useShex
jairo-campos-JD Apr 29, 2019
3675c1a
add try catch on shex
jairo-campos-JD Apr 29, 2019
c9b38e0
added error handle for useShex and useForm hooks
jairo-campos-JD Apr 30, 2019
52e1d76
fixed error handling
jairo-campos-JD Apr 30, 2019
dbaab67
formValidation
jairo-campos-JD May 1, 2019
2922a44
refactor render shex and validation
jairo-campos-JD May 2, 2019
2c7991e
added styles on error message
jairo-campos-JD May 2, 2019
8cb6e64
updated formValidation message
jairo-campos-JD May 6, 2019
aa746f9
refactor dropdown component on shex form
jairo-campos-JD May 6, 2019
91fb69c
refactor dropdown component on shex form
jairo-campos-JD May 6, 2019
0992040
add context on build
jairo-campos-JD May 6, 2019
35a51f8
Dropdown error fixed
pablo-rodriguez-jd May 6, 2019
2eff82a
added language option for shex label
jairo-campos-JD May 6, 2019
9b49664
Merge branch 'feature/shex-form-component-v5' of https://github.com/i…
jairo-campos-JD May 6, 2019
f2bf4fb
added language
jairo-campos-JD May 7, 2019
a124aa2
added delete language text
jairo-campos-JD May 7, 2019
48a3eb0
added addbutton test
jairo-campos-JD May 7, 2019
5a0ea0e
added test for delete button component
jairo-campos-JD May 7, 2019
11f10ff
added dropdown tests
jairo-campos-JD May 7, 2019
c94e36e
add input field tests
jairo-campos-JD May 7, 2019
8e6f565
added Field test
jairo-campos-JD May 7, 2019
08b346a
added small comments
jairo-campos-JD May 7, 2019
deaa235
added shexForm component test
jairo-campos-JD May 7, 2019
86738cf
fixed delete last field issue
jairo-campos-JD May 8, 2019
9e4127a
removed fields from formValues to avoid re insert on POD
jairo-campos-JD May 8, 2019
9d4816f
fixed remove fields ui
jairo-campos-JD May 8, 2019
4e4f009
fixed single shex issue
jairo-campos-JD May 8, 2019
cc5d973
fixed form validation message when user do not add pattern
jairo-campos-JD May 8, 2019
640687b
Showing delete button properly
pablo-rodriguez-jd May 8, 2019
c2ee734
Merge branch 'feature/shex-form-component-v5' of https://github.com/i…
jairo-campos-JD May 8, 2019
0fbffc2
Moved utils into lib
pablo-rodriguez-jd May 8, 2019
23b2c61
onDelete working
pablo-rodriguez-jd May 8, 2019
8e4758b
fixed add button clone
jairo-campos-JD May 8, 2019
fd0b93a
merge
jairo-campos-JD May 8, 2019
95bc028
fixed index style on delete
jairo-campos-JD May 8, 2019
1e0108e
add button fix
jairo-campos-JD May 8, 2019
83ceac9
fixed form validation
jairo-campos-JD May 8, 2019
5c22a4c
Fixed min max validation fields
jairo-campos-JD May 8, 2019
998c468
fixed email type values string to link
jairo-campos-JD May 8, 2019
3837f07
Default option for dropdown
pablo-rodriguez-jd May 8, 2019
f4f0358
Fixing bug where a failed validation check was still updating the def…
james-martin-jd May 9, 2019
bc93201
Minor styling to buttons
pablo-rodriguez-jd May 9, 2019
dde9bbf
rollback version to 0.3.2
pablo-rodriguez-jd May 9, 2019
60a8ef6
Partial saving and deleting fixed
pablo-rodriguez-jd May 10, 2019
9de7c3f
Removing old shape file and adding new reference to the hosted shape …
james-martin-jd May 10, 2019
0dfd6b0
Partial Deletion and no deletion after created erros fixed and
pablo-rodriguez-jd May 10, 2019
15084fb
Merge branch 'feature/shex-form-component-v5' of https://github.com/i…
pablo-rodriguez-jd May 10, 2019
67385fc
Adding first readme text
james-martin-jd May 10, 2019
bb04f16
Merge branch 'feature/shex-form-component-v5' of github.com:inrupt/so…
james-martin-jd May 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
'@styled-components': path.resolve(__dirname, '../src/lib/styled-components'),
'@components': path.resolve(__dirname, '../src/lib/components'),
'@entities': path.resolve(__dirname, '../src/lib/entities'),
'@utils': path.resolve(__dirname, '../src/utils'),
'@utils': path.resolve(__dirname, '../src/lib/utils'),
'@testSetup': path.resolve(__dirname, '../src/test/setup')
}
},
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,36 @@ The Uploader component contains the file uploading logic and Solid integration,
Here's an example of a basic ProfileUploader component, demonstrating how to add your own Uploader UI

We currently re-expose withWebId and LogoutButton so you can use the basic components without installing other libraries.

### ShexFormBuilder

**Note**: This is an early preview build of a work-in-progress component and subject to large-scale changesin future releases.

This component allows you to create a fully functional form, complete with submit, cancel, and validation rules, from a [Shex](http://shex.io/shex-primer/index.html) Shape.


Usage:
```
<ShexFormBuilder documentUri={url} shexUri={} />
```
| Props | Type | Default | Description |
| ------------------ | -------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| documentUri | string | null | Required. The URL representing the root subject to save the form data to, for example a webID or file in the user's pod. |
| shexUri | string | null | Required. The URL to the shex shape to use to render the form |
| rootShape | string | null | Optional. The shape in the shexUri file to begin parsing. If a START shape is defined in the shape, this is not necessary. |
| theme | Object | null | Optional. An object (defined below) allowing custom overrides to the look and feel of the form
| language | string | null | Optional. The language identifier to translate text. For example, 'en' or 'es'.
| successCallback | Function | Function that writes a success message to console | Optional. Overrides the existing success callback and allows custom success functions.
| errorCallback | Function | Function that writes the error message to console | Optional. Overrides the existing error callback function
| messageValidation | Object | null | An Object containing an array of error strings. The error strings will be used in most non-validation situations

Theme object:

| Key | Type | Default | Description
| ------------------ | -------- | ------------------------------------- | --------------------
| input | string | solid-input-shex | Custom class name for input fields in the form
| select | string | solid-input-shex solid-select-shex | Custom class name for select fields in the form
| deleteButton | string | solid-button-shex | Custom class name for the delete button
| form | string | solid-shex-form | Custom class name for the form


5 changes: 3 additions & 2 deletions config/webpack.config.demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ module.exports = {
'@styled-components': path.resolve(__dirname, '../src/lib/styled-components'),
'@components': path.resolve(__dirname, '../src/lib/components'),
'@entities': path.resolve(__dirname, '../src/lib/entities'),
'@utils': path.resolve(__dirname, '../src/utils'),
'@testSetup': path.resolve(__dirname, '../src/test/setup')
'@utils': path.resolve(__dirname, '../src/lib/utils'),
'@hooks': path.resolve(__dirname, '../src/lib/hooks'),
'@context': path.resolve(__dirname, '../src/lib/context')
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
Expand Down
5 changes: 3 additions & 2 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ module.exports = {
'@styled-components': path.resolve(__dirname, '../src/lib/styled-components'),
'@components': path.resolve(__dirname, '../src/lib/components'),
'@entities': path.resolve(__dirname, '../src/lib/entities'),
'@utils': path.resolve(__dirname, '../src/utils'),
'@testSetup': path.resolve(__dirname, '../src/test/setup')
'@utils': path.resolve(__dirname, '../src/lib/utils'),
'@hooks': path.resolve(__dirname, '../src/lib/hooks'),
'@context': path.resolve(__dirname, '../src/lib/context')
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
Expand Down
5 changes: 3 additions & 2 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ module.exports = {
'@styled-components': path.resolve(__dirname, '../src/lib/styled-components'),
'@components': path.resolve(__dirname, '../src/lib/components'),
'@entities': path.resolve(__dirname, '../src/lib/entities'),
'@utils': path.resolve(__dirname, '../src/utils'),
'@testSetup': path.resolve(__dirname, '../src/test/setup')
'@utils': path.resolve(__dirname, '../src/lib/utils'),
'@hooks': path.resolve(__dirname, '../src/lib/hooks'),
'@context': path.resolve(__dirname, '../src/lib/context')
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
Expand Down
6 changes: 5 additions & 1 deletion jest-test-results.json

Large diffs are not rendered by default.

Loading