Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
3c1ed0b
Update README.md
maltesa Jun 7, 2022
628b824
🤓 Readbility Update
jobenjada Jun 7, 2022
db8845b
🤓 Readbility Update
jobenjada Jun 7, 2022
c7ccae4
feat: add checkbox, outsource ClassNames type to new types file
mattinannt Jun 8, 2022
5b81af3
fix: merge readme changes with new checkbox element
mattinannt Jun 8, 2022
9d4d344
🤓 Readbility Update
jobenjada Jun 9, 2022
67164c7
Merge branch 'main' of https://github.com/snoopForms/snoopforms-react…
jobenjada Jun 9, 2022
4056c2b
feat: add submission post functionality to SnoopForm component, add o…
mattinannt Jun 9, 2022
b359ce0
feat: add userFingerprint, modify snoopHub calls to work with new eve…
mattinannt Jun 14, 2022
0c57fb6
feat: add localOnly option
mattinannt Jun 21, 2022
16be448
fix: schema generation with multiple pages
mattinannt Jun 22, 2022
75d8bc6
fix: loading bug of fingerprintJS
mattinannt Jul 20, 2022
77e1dbb
rewrite snoop-react using tsdx boilerplate and adding elements for em…
mattinannt Jul 28, 2022
a99af12
re-add github actions
mattinannt Jul 28, 2022
5499c31
update node version in github action
mattinannt Jul 28, 2022
3a990e3
update utils to match prettier rules
mattinannt Jul 28, 2022
431ce39
add crossenv package to solve script issues on windows
mattinannt Jul 28, 2022
fa7e8ea
update node version in publish action
mattinannt Jul 28, 2022
9fce0cb
bugfix reset invalid fields
mattinannt Jul 29, 2022
d7d4e72
make domain and formId in SnoopForm optional
mattinannt Jul 30, 2022
396d11e
bugfix thankyou page crashes with elements - allowing elements
mattinannt Jul 30, 2022
69c776f
update version number to 0.2.2
mattinannt Jul 30, 2022
8d5e12e
fix radio & checkbox elementLabel styling
mattinannt Aug 12, 2022
5b2d60f
update version to v0.2.4
mattinannt Aug 12, 2022
8c4744f
bugfix fingerprintjs bug
mattinannt Aug 23, 2022
bd316e1
#21: Add helperText to all question types (#3)
timothyde Sep 2, 2022
979e514
remove fingerprinting
mattinannt Sep 2, 2022
916f931
Update SnoopForm.tsx
fdis111 Sep 14, 2022
aaf9dfa
Update SnoopForm.tsx
fdis111 Sep 14, 2022
15d7ad8
feat: add timer
fdis111 Sep 15, 2022
6f9a131
feat: submit form when countdown is 0
fdis111 Sep 15, 2022
7056bd5
fix: remove unused variable
fdis111 Sep 15, 2022
9a5e2bc
fix: timer postion
fdis111 Sep 17, 2022
92e1ae0
fix multiple radio buttons on the same page not working
mattinannt Sep 20, 2022
551e277
fix multiple choice bug in radio button
mattinannt Sep 20, 2022
ce2f4b0
v0.3.2 with fixed radio button
mattinannt Sep 20, 2022
eb4b7f3
feat: created button link element
eltazy Sep 20, 2022
39398b4
Merge branch 'main' of github.com:KinshasaDigitalAcademy/kda-snoopfor…
fdis111 Sep 21, 2022
ed14670
styled timer bubble
eltazy Sep 21, 2022
20107ca
fix: remove type submit on link
eltazy Sep 21, 2022
0ac88a9
fix: conflict
fdis111 Sep 21, 2022
f9de761
Merge pull request #1 from KinshasaDigitalAcademy/develop
fdis111 Sep 21, 2022
4b0ec74
fix: input radio name
fdis111 Sep 22, 2022
5a85120
Merge pull request #2 from KinshasaDigitalAcademy/develop
fdis111 Sep 26, 2022
094a7ab
fix: lint
fdis111 Sep 26, 2022
3d99846
fix: input radio id and label for
fdis111 Sep 26, 2022
5779255
feat: timer resume
fdis111 Sep 28, 2022
4b56a7e
feat: update form submision on submit
fdis111 Sep 28, 2022
a9a5dc7
Update README.md
mattinannt Sep 29, 2022
48da410
fix: lint
fdis111 Sep 29, 2022
4c8a0f8
add cards & update to 0.3.3
mattinannt Sep 29, 2022
170ecb6
Merge branch 'main' of github.com:snoopForms/snoopforms-react
mattinannt Sep 29, 2022
bf5150e
update card cols to overwrite responsiveness
mattinannt Sep 29, 2022
c04b513
increase version number to v0.3.4
mattinannt Sep 29, 2022
9f1b732
fix autoSubmit by triggering after modifying submission
mattinannt Sep 29, 2022
6e43677
feat: fix timer on timed forms
fdis111 Oct 2, 2022
19c2a15
Merge pull request #3 from KinshasaDigitalAcademy/develop
fdis111 Oct 2, 2022
409161d
Merge pull request #4 from KinshasaDigitalAcademy/develop
fdis111 Oct 2, 2022
09691ab
feat: added option image
eltazy Oct 11, 2022
b6b6a2e
fix: set resp. value for multiple choice question
eltazy Oct 11, 2022
19a86e8
feat: added a red star when required field
creytas Oct 12, 2022
020bb82
fix: add red star to email component
creytas Oct 13, 2022
e8e31a1
fix: clean snoopform refs
creytas Oct 13, 2022
3150039
added phone verification
creytas Oct 14, 2022
ac6197f
feat: set multiple choice image component width
creytas Oct 14, 2022
b77457d
feat: update submissions
fdis111 Oct 27, 2022
ffbac61
Merge branch 'randy.b'
eltazy Oct 27, 2022
d6c3e6b
Merge branch 'main' into feat/update_submissions
fdis111 Oct 27, 2022
e3f45a7
Merge branch 'main' into feat/update_submissions
fdis111 Oct 27, 2022
5dc9d28
Merge pull request #6 from KinshasaDigitalAcademy/feat/update_submiss…
fdis111 Oct 27, 2022
f418a25
feat: put * before required questions
fdis111 Nov 1, 2022
691cec3
fix: add default values on email and phone number inputs
fdis111 Nov 2, 2022
2315c93
fix: pre-fill text fields with default values
eltazy Nov 2, 2022
51bbc4f
fix: add default values on email and phone number inputs
fdis111 Nov 3, 2022
8d7c4b1
Merge branch 'main' of github.com:KinshasaDigitalAcademy/kda-snoopfor…
fdis111 Nov 3, 2022
ff7e0c8
fix: add default values on email and phone number inputs
fdis111 Nov 3, 2022
95fa556
fix: lint
fdis111 Nov 3, 2022
30ce36b
fix: remove border when we dont have image on input radio opts
fdis111 Nov 3, 2022
16408d0
design: added horizontal separator after questions
eltazy Nov 22, 2022
3fab524
fix: change all KDA referencs into kadea
lys-0243 May 19, 2023
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
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI
on: [push]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['14.x']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1

- name: Lint
run: yarn lint

- name: Test
run: yarn test --ci --coverage --maxWorkers=2

- name: Build
run: yarn build
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
tags:
- "v*"
- 'v*'

jobs:
publish:
Expand All @@ -12,10 +12,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
- run: npm install
- run: npm run build
- run: npm test
node-version: 14
- run: yarn install
- run: yarn build
- run: yarn test
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: size
on: [pull_request]
jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v1
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/test.yml

This file was deleted.

120 changes: 4 additions & 116 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,119 +1,7 @@

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.DS_Store
node_modules
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.DS_Store
.parcel-cache
.idea/
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/commit-msg

This file was deleted.

8 changes: 0 additions & 8 deletions .husky/common.sh

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-commit

This file was deleted.

45 changes: 45 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const path = require('path');

module.exports = {
stories: ['../stories/**/*.stories.@(ts|tsx|js|jsx)'],
//addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
{
name: '@storybook/addon-postcss',
options: {
cssLoaderOptions: {
// When you have splitted your css over multiple files
// and use @import('./other-styles.css')
importLoaders: 1,
},
postcssLoaderOptions: {
// When using postCSS 8
implementation: require('postcss'),
},
},
},
],
// https://storybook.js.org/docs/react/configure/typescript#mainjs-configuration
typescript: {
check: true, // type-check stories during Storybook build
},
/* webpackFinal: async config => {
config.module.rules.push({
test: /\.css$/,
use: [
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [require('tailwindcss'), require('autoprefixer')],
},
},
},
],
include: path.resolve(__dirname, '../'),
});
return config;
}, */
};
6 changes: 6 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import '../tailwind.css';
// https://storybook.js.org/docs/react/writing-stories/parameters#global-parameters
export const parameters = {
// https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args
actions: { argTypesRegex: '^on.*' },
};
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 snoopForms (snoopForms.com)
Copyright (c) 2022 Matthias Nannt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
50 changes: 37 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

React Library with form- & survey-elements for the snoopForms platform

[![npm package](https://img.shields.io/badge/npm%20i-@snoopforms/react)](https://www.npmjs.com/package/@snoopforms/react) [![version number](https://img.shields.io/npm/v/@snoopforms/react?color=green&label=version)](https://github.com/snoopforms/snoopforms-react/releases) [![Actions Status](https://github.com/snoopForms/snoopforms-react/workflows/Test/badge.svg)](https://github.com/snoopForms/snoopforms-react/actions) [![License](https://img.shields.io/github/license/snoopforms/snoopforms-react)](https://github.com/snoopForms/snoopforms-react/blob/main/LICENSE)
[![npm package](https://img.shields.io/badge/npm%20i-@snoopforms/react)](https://www.npmjs.com/package/@snoopforms/react) [![version number](https://img.shields.io/npm/v/@snoopforms/react?color=green&label=version)](https://github.com/snoopforms/react/releases) [![Actions Status](https://github.com/snoopForms/snoopforms-react/workflows/Test/badge.svg)](https://github.com/snoopForms/snoopforms-react/actions) [![License](https://img.shields.io/github/license/snoopforms/snoopforms-react)](https://github.com/snoopForms/snoopforms-react/blob/main/LICENSE)

<br/>

Expand All @@ -14,26 +14,50 @@ React Library with form- & survey-elements for the snoopForms platform
npm install @snoopforms/react
```

## How to use
## How to use it 🤓

Use the SnoopForm components to build your form easily. Use the `SnoopForm` wrapper to make the connection to the SnoopForm Data-Platform. Use `SnoopPage` to tell the Form where you need an new page. The SnoopForms library will only show the current page to the user. That way you can build long, more complex forms or a Typeform-like form-view, where you change the page after every question.
You can choose your `SnoopElements` from a wide range of pre-coded components, including text, email, checkboxes, radio-buttons, color-pickers, and many more.
Use the SnoopForm components to build your form easily.

- `SnoopForm:` Use the `SnoopForm` wrapper to make the connection to the SnoopForm Data-Platform.
- `SnoopPage:` Use `SnoopPage` to tell the Form where you need an new page. The SnoopForms library will only show the current page to the user. That way you can build long, more complex forms or a Typeform-like form-view, where the page changes after every question.
- `SnoopElement:` You can choose your `SnoopElement` from a wide range of pre-coded components, including text, email, checkboxes, radio-buttons, and many more.

## Example

```jsx
<SnoopForm domain="example.com" formId={"abcde123"}>
<SnoopPage name="first">
<SnoopElement type="text" name={"name"} label="Your name" />
<SnoopForm formId="abcd">
<SnoopPage name="basicInfo">
<SnoopElement
type="text"
name="name"
label="Your name"
help="Please use your real name"
required
/>
<SnoopElement
type="radio"
name={"importance"}
label="What's your favorite food?"
options={["Pizza", "Pasta", "Sushi"]}
type="textarea"
name="about"
label="About you"
help="e.g. your hobbies etc."
required
/>
<SnoopSubmit label="Submit 💪">
<SnoopElement name="submit" type="submit" label="Submit" />
</SnoopPage>
<SnoopPage name="advancedInfo">
<SnoopElement
type="checkbox"
name="programming-lanuguages"
label="What programming languages do you love?"
options={['C++', 'Javascript', 'Scala', 'Assembler']}
/>
<SnoopElement name="submit" type="submit" label="Submit" />
</SnoopPage>
<SnoopPage name="thankyou" thankyou>
<p>Thanks a lot for your time and insights 🙏</p>
</SnoopPage>
</SnoopForm>
```

## Contributing
## Contribute 🙏

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1 change: 0 additions & 1 deletion commitlint.config.js

This file was deleted.

9 changes: 0 additions & 9 deletions config/fileTransformer.js

This file was deleted.

7 changes: 0 additions & 7 deletions config/tsconfig.cjs.json

This file was deleted.

Loading