Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: react-backoffice/backoffice
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.2.0
Choose a base ref
...
head repository: react-backoffice/backoffice
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 19,684 additions and 20,754 deletions.
  1. +0 −17 .babelrc
  2. +0 −16 .babelrc.production
  3. +4 −2 .editorconfig
  4. +4 −0 .eslintignore
  5. +34 −8 .eslintrc.js
  6. +119 −2 .gitignore
  7. +2 −0 .npmignore
  8. +7 −0 .prettierrc.js
  9. +3 −4 .travis.yml
  10. +9 −6 .vscode/launch.json
  11. +3 −0 .vscode/settings.json
  12. +149 −214 README.md
  13. +0 −6 __tests__/config.js
  14. +0 −22 __tests__/data/dashboard.js
  15. +0 −194 __tests__/data/form.jsx
  16. +0 −253 __tests__/data/listing_data.js
  17. +0 −43 __tests__/data/listing_headers.jsx
  18. +0 −20 __tests__/data/menu.js
  19. +0 −45 __tests__/data/tabs.jsx
  20. +17 −18 __tests__/index.test.js
  21. +0 −78 __tests__/visual/Container.jsx
  22. +0 −48 __tests__/visual/General.jsx
  23. +0 −166 __tests__/visual/Page.jsx
  24. +0 −24 __tests__/visual/app.jsx
  25. +4 −4 examples/form/EditForm.jsx
  26. +213 −182 examples/form/data.jsx
  27. +2 −2 examples/form/theme.js
  28. +7 −6 examples/list/UserListing.jsx
  29. +1 −1 examples/list/headers.jsx
  30. +1 −1 examples/package.json
  31. +2 −2 examples/theme.js
  32. +0 −29 index.d.ts
  33. +0 −15 index.js
  34. +0 −36 jest.config.js
  35. +87 −61 package.json
  36. +2 −1 {__tests__/visual → public}/index.html
  37. +0 −18 src/AddButton/AddButton.jsx
  38. +0 −10 src/AddButton/AddButton.test.jsx
  39. +0 −33 src/AddButton/AddButtonBranch.jsx
  40. +0 −42 src/AddButton/__snapshots__/AddButton.test.jsx.snap
  41. +12 −0 src/AddButton/__snapshots__/index.test.tsx.snap
  42. +0 −3 src/AddButton/index.jsx
  43. +10 −0 src/AddButton/index.test.tsx
  44. +32 −0 src/AddButton/index.tsx
  45. +0 −51 src/AppContainer/AppContainer.jsx
  46. +0 −16 src/AppContainer/AppContainer.test.jsx
  47. +0 −3 src/AppContainer/__snapshots__/AppContainer.test.jsx.snap
  48. +302 −0 src/AppContainer/__snapshots__/index.test.tsx.snap
  49. +0 −22 src/AppContainer/createContext.js
  50. +0 −3 src/AppContainer/index.js
  51. +12 −0 src/AppContainer/index.test.tsx
  52. +75 −0 src/AppContainer/index.tsx
  53. +0 −60 src/AppContainer/withRoot.jsx
  54. +0 −37 src/BackButton/BackButton.jsx
  55. +0 −22 src/BackButton/BackButton.test.jsx
  56. +30 −0 src/BackButton/BackButton.test.tsx
  57. +0 −29 src/BackButton/BackButtonBranch.jsx
  58. +0 −42 src/BackButton/__snapshots__/BackButton.test.jsx.snap
  59. +7 −0 src/BackButton/__snapshots__/BackButton.test.tsx.snap
  60. +0 −3 src/BackButton/index.js
  61. +26 −0 src/BackButton/index.tsx
  62. +0 −105 src/Base/Base.jsx
  63. +0 −151 src/Base/Base.test.jsx
  64. +0 −132 src/Base/BaseBranch.jsx
  65. +0 −1,410 src/Base/__snapshots__/Base.test.jsx.snap
  66. +231 −0 src/Base/__snapshots__/index.test.tsx.snap
  67. +0 −3 src/Base/index.js
  68. +43 −0 src/Base/index.styles.ts
  69. +125 −0 src/Base/index.test.tsx
  70. +82 −0 src/Base/index.tsx
  71. +0 −80 src/Confirm/Confirm.jsx
  72. +0 −79 src/Confirm/Confirm.test.jsx
  73. +0 −79 src/Confirm/ConfirmBranch.jsx
  74. +59 −0 src/Confirm/ConfirmBranch.tsx
  75. +0 −5 src/Confirm/__snapshots__/Confirm.test.jsx.snap
  76. +20 −0 src/Confirm/__snapshots__/index.test.tsx.snap
  77. +0 −3 src/Confirm/index.js
  78. +70 −0 src/Confirm/index.test.tsx
  79. +67 −0 src/Confirm/index.tsx
  80. +0 −34 src/CookieInfo/Cookie.js
  81. +0 −31 src/CookieInfo/Cookie.test.js
  82. +0 −95 src/CookieInfo/CookieInfo.jsx
  83. +0 −34 src/CookieInfo/CookieInfo.test.jsx
  84. +0 −39 src/CookieInfo/__snapshots__/CookieInfo.test.jsx.snap
  85. +0 −3 src/CookieInfo/index.js
  86. +0 −34 src/Dashboard/Dashboard.jsx
  87. +0 −27 src/Dashboard/Dashboard.test.jsx
  88. +31 −0 src/Dashboard/Dashboard.test.tsx
  89. +0 −45 src/Dashboard/DashboardBranch.jsx
  90. +56 −0 src/Dashboard/DashboardBranch.tsx
  91. +0 −91 src/Dashboard/DashboardCard.jsx
  92. +0 −29 src/Dashboard/DashboardCard.test.jsx
  93. +25 −0 src/Dashboard/DashboardCard.test.tsx
  94. +88 −0 src/Dashboard/DashboardCard.tsx
  95. +0 −55 src/Dashboard/DashboardGroup.jsx
  96. +0 −17 src/Dashboard/DashboardGroup.test.jsx
  97. +21 −0 src/Dashboard/DashboardGroup.test.tsx
  98. +48 −0 src/Dashboard/DashboardGroup.tsx
  99. +0 −60 src/Dashboard/__snapshots__/Dashboard.test.jsx.snap
  100. +46 −0 src/Dashboard/__snapshots__/Dashboard.test.tsx.snap
  101. +0 −57 src/Dashboard/__snapshots__/DashboardCard.test.jsx.snap
  102. +39 −0 src/Dashboard/__snapshots__/DashboardCard.test.tsx.snap
  103. +0 −42 src/Dashboard/__snapshots__/DashboardGroup.test.jsx.snap
  104. +21 −0 src/Dashboard/__snapshots__/DashboardGroup.test.tsx.snap
  105. +0 −3 src/Dashboard/index.js
  106. +24 −0 src/Dashboard/index.tsx
  107. +0 −71 src/Drawer/Drawer.jsx
  108. +0 −17 src/Drawer/Drawer.test.jsx
  109. +0 −170 src/Drawer/__snapshots__/Drawer.test.jsx.snap
  110. +0 −3 src/Drawer/index.jsx
  111. +14 −0 src/Drawer/index.test.tsx
  112. +65 −0 src/Drawer/index.tsx
  113. +0 −166 src/Form/Form.jsx
  114. +0 −52 src/Form/Form.test.jsx
  115. +130 −0 src/Form/Form.tsx
  116. +0 −148 src/Form/FormBranch.jsx
  117. +12 −0 src/Form/FormContext.ts
  118. +0 −222 src/Form/FormField.jsx
  119. +0 −249 src/Form/FormField.test.jsx
  120. +134 −0 src/Form/FormField.tsx
  121. +0 −160 src/Form/FormFieldBranch.jsx
  122. +0 −99 src/Form/FormFieldDate.jsx
  123. +0 −134 src/Form/FormFieldInput.jsx
  124. +0 −23 src/Form/FormFieldInput.test.jsx
  125. +0 −148 src/Form/FormFieldList.jsx
  126. +0 −149 src/Form/FormFieldListBranch.jsx
  127. +0 −81 src/Form/FormFieldSwitch.jsx
  128. +0 −42 src/Form/FormFieldSwitch.test.jsx
  129. +0 −68 src/Form/FormGroupWrapper.jsx
  130. +58 −0 src/Form/FormGroupWrapper.tsx
  131. +92 −0 src/Form/FormState.tsx
  132. +0 −82 src/Form/FormSubmitButton.jsx
  133. +74 −0 src/Form/FormSubmitButton.tsx
  134. +99 −0 src/Form/Inputs/DateInput.tsx
  135. +12 −0 src/Form/Inputs/Hidden.tsx
  136. +91 −0 src/Form/Inputs/Input.tsx
  137. +48 −0 src/Form/Inputs/List.tsx
  138. +69 −0 src/Form/Inputs/Switch.tsx
  139. +0 −2,218 src/Form/__snapshots__/Form.test.jsx.snap
  140. +0 −53 src/Form/__snapshots__/FormFieldInput.test.jsx.snap
  141. +0 −171 src/Form/__snapshots__/FormFieldSwitch.test.jsx.snap
  142. +52 −0 src/Form/__tests__/Form.test.tsx
  143. +206 −0 src/Form/__tests__/FormField.test.tsx
  144. +16 −0 src/Form/__tests__/FormFieldInput.test.tsx
  145. +33 −0 src/Form/__tests__/FormFieldSwitch.test.tsx
  146. +536 −0 src/Form/__tests__/__snapshots__/Form.test.tsx.snap
  147. +43 −0 src/Form/__tests__/__snapshots__/FormFieldInput.test.tsx.snap
  148. +50 −0 src/Form/__tests__/__snapshots__/FormFieldSwitch.test.tsx.snap
  149. +0 −18 src/Form/constants.js
  150. +27 −0 src/Form/constants.ts
  151. +0 −3 src/Form/index.js
  152. +173 −0 src/Form/index.tsx
  153. +0 −61 src/Form/isValid.js
  154. +5 −0 src/Form/utils/isObject.ts
  155. +94 −0 src/Form/utils/isValid.ts
  156. +87 −0 src/Form/utils/reducer.ts
  157. +44 −0 src/Form/utils/validators.ts
  158. +0 −38 src/Form/validators.js
  159. +0 −112 src/Header/Header.jsx
  160. +0 −29 src/Header/Header.test.jsx
  161. +0 −119 src/Header/__snapshots__/Header.test.jsx.snap
  162. +27 −0 src/Header/__snapshots__/index.test.tsx.snap
  163. +0 −3 src/Header/index.js
  164. +18 −0 src/Header/index.test.tsx
  165. +107 −0 src/Header/index.tsx
  166. +0 −370 src/Listing/Listing.jsx
  167. +0 −239 src/Listing/Listing.test.jsx
  168. +0 −152 src/Listing/ListingBranch.jsx
  169. +144 −0 src/Listing/ListingBranch.tsx
  170. +0 −77 src/Listing/ListingHeader.jsx
  171. +0 −27 src/Listing/ListingHeader.test.jsx
  172. +71 −0 src/Listing/ListingHeader.tsx
  173. +0 −108 src/Listing/ListingLine.jsx
  174. +0 −78 src/Listing/ListingLine.test.jsx
  175. +114 −0 src/Listing/ListingLine.tsx
  176. +0 −41 src/Listing/ListingLoader.jsx
  177. +0 −15 src/Listing/ListingLoader.test.jsx
  178. +38 −0 src/Listing/ListingLoader.tsx
  179. +0 −64 src/Listing/ListingSearch.jsx
  180. +0 −103 src/Listing/ListingSearch.test.jsx
  181. +89 −0 src/Listing/ListingSearch.tsx
  182. +0 −69 src/Listing/ListingSearchBranch.jsx
  183. +0 −77 src/Listing/ListingToolbar.jsx
  184. +0 −16 src/Listing/ListingToolbar.test.jsx
  185. +71 −0 src/Listing/ListingToolbar.tsx
  186. +0 −3,055 src/Listing/__snapshots__/Listing.test.jsx.snap
  187. +0 −118 src/Listing/__snapshots__/ListingHeader.test.jsx.snap
  188. +0 −226 src/Listing/__snapshots__/ListingLine.test.jsx.snap
  189. +0 −32 src/Listing/__snapshots__/ListingLoader.test.jsx.snap
  190. +0 −179 src/Listing/__snapshots__/ListingSearch.test.jsx.snap
  191. +0 −108 src/Listing/__snapshots__/ListingToolbar.test.jsx.snap
  192. +246 −0 src/Listing/__tests__/Listing.test.tsx
  193. +29 −0 src/Listing/__tests__/ListingHeader.test.tsx
  194. +77 −0 src/Listing/__tests__/ListingLine.test.tsx
  195. +15 −0 src/Listing/__tests__/ListingLoader.test.tsx
  196. +81 −0 src/Listing/__tests__/ListingSearch.test.tsx
  197. +12 −0 src/Listing/__tests__/ListingToolbar.test.tsx
  198. +130 −0 src/Listing/__tests__/__snapshots__/Listing.test.tsx.snap
  199. +29 −0 src/Listing/__tests__/__snapshots__/ListingHeader.test.tsx.snap
  200. +130 −0 src/Listing/__tests__/__snapshots__/ListingLine.test.tsx.snap
  201. +16 −0 src/Listing/__tests__/__snapshots__/ListingLoader.test.tsx.snap
  202. +53 −0 src/Listing/__tests__/__snapshots__/ListingSearch.test.tsx.snap
  203. +25 −0 src/Listing/__tests__/__snapshots__/ListingToolbar.test.tsx.snap
  204. +0 −3 src/Listing/index.js
  205. +202 −0 src/Listing/index.tsx
  206. +48 −0 src/Listing/utils/filterElement.ts
  207. +32 −0 src/Listing/utils/sortData.ts
  208. +0 −48 src/Menu/Menu.jsx
  209. +0 −21 src/Menu/Menu.test.jsx
  210. +0 −53 src/Menu/MenuItem.jsx
  211. +0 −38 src/Menu/MenuItem.test.jsx
  212. +30 −0 src/Menu/MenuItem.test.tsx
  213. +64 −0 src/Menu/MenuItem.tsx
  214. +0 −53 src/Menu/__snapshots__/Menu.test.jsx.snap
  215. +0 −109 src/Menu/__snapshots__/MenuItem.test.jsx.snap
  216. +37 −0 src/Menu/__snapshots__/MenuItem.test.tsx.snap
  217. +20 −0 src/Menu/__snapshots__/index.test.tsx.snap
  218. +0 −3 src/Menu/index.jsx
  219. +24 −0 src/Menu/index.test.tsx
  220. +107 −0 src/Menu/index.tsx
  221. +0 −51 src/NoMatch/NoMatch.jsx
  222. +0 −28 src/NoMatch/NoMatch.test.jsx
  223. +21 −0 src/NoMatch/NoMatch.test.tsx
  224. +51 −0 src/NoMatch/NoMatch.tsx
  225. +0 −48 src/NoMatch/__snapshots__/NoMatch.test.jsx.snap
  226. +46 −0 src/NoMatch/__snapshots__/NoMatch.test.tsx.snap
  227. +0 −3 src/NoMatch/index.js
  228. +3 −0 src/NoMatch/index.ts
  229. +0 −33 src/Snackbar/Snackbar.jsx
  230. +0 −10 src/Snackbar/Snackbar.test.jsx
  231. +10 −0 src/Snackbar/Snackbar.test.tsx
  232. +28 −0 src/Snackbar/Snackbar.tsx
  233. +0 −3 src/Snackbar/__snapshots__/Snackbar.test.jsx.snap
  234. +26 −0 src/Snackbar/__snapshots__/Snackbar.test.tsx.snap
  235. +0 −17 src/Snackbar/index.d.ts
  236. +0 −3 src/Snackbar/index.js
  237. +3 −0 src/Snackbar/index.ts
  238. +0 −119 src/Tabs/Tabs.jsx
  239. +0 −57 src/Tabs/Tabs.test.jsx
  240. +0 −134 src/Tabs/__snapshots__/Tabs.test.jsx.snap
  241. +22 −0 src/Tabs/__snapshots__/index.test.tsx.snap
  242. +0 −3 src/Tabs/index.js
  243. +65 −0 src/Tabs/index.test.tsx
  244. +110 −0 src/Tabs/index.tsx
  245. +91 −0 src/__visual__/Container.tsx
  246. +28 −0 src/__visual__/General.tsx
  247. +41 −0 src/__visual__/Layout.tsx
  248. +32 −0 src/__visual__/data/dashboard.ts
  249. +208 −0 src/__visual__/data/form.tsx
  250. +255 −0 src/__visual__/data/listing_data.ts
  251. +54 −0 src/__visual__/data/listing_headers.tsx
  252. +65 −0 src/__visual__/data/menu.tsx
  253. +39 −0 src/__visual__/data/tabs.tsx
  254. +17 −0 src/__visual__/pages/dashboard.tsx
  255. +47 −0 src/__visual__/pages/form.tsx
  256. +61 −0 src/__visual__/pages/index.tsx
  257. +68 −0 src/__visual__/pages/list.tsx
  258. +20 −0 src/__visual__/pages/tabs.tsx
  259. +15 −0 src/app.ts
  260. +12 −0 src/index.tsx
  261. +4 −0 src/react-app-env.d.ts
  262. +8 −0 src/setupTests.js
  263. +10 −0 src/utils/easeInOutQuad.ts
  264. +0 −18 src/utils/replace.js
  265. +25 −0 src/utils/replace.ts
  266. +31 −0 tsconfig.build.json
  267. +15 −4 tsconfig.json
  268. +0 −12 tslint.json
  269. +0 −44 webpack-production.config.js
  270. +0 −58 webpack.config.js
  271. +11,531 −5,055 yarn.lock
17 changes: 0 additions & 17 deletions .babelrc

This file was deleted.

16 changes: 0 additions & 16 deletions .babelrc.production

This file was deleted.

6 changes: 4 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
examples/
node_modules/
coverage/
build/
dist/
42 changes: 34 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
module.exports = {
extends: "airbnb",
parser: "babel-eslint",
env: {
browser: true,
es6: true,
jest: true,
parser: "@typescript-eslint/parser",
extends: ["plugin:react/recommended", "plugin:prettier/recommended"],

parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: "./tsconfig.build.json",
tsconfigRootDir: "./",
ecmaFeatures: {
jsx: true,
},
},

rules: {
semi: ["error", "never"],
"react/display-name": "off",
"react/prop-types": "off",

"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",

// For the next couple of months ;)
"@typescript-eslint/no-empty-function": "off",
},
}

settings: {
react: {
version: "detect",
},
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
},
},
};
121 changes: 119 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,121 @@
__tests__/visual/dist/
node_modules
# 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/)
.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.*

# Mine
coverage
build/
dist/
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -9,3 +9,5 @@ jest.config.js
ts*.json
webpack-production.config.js
webpack.config.js
coverage/
build/
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: false,
printWidth: 80,
arrowParens: 'always',
};
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
language: node_js
node_js:
- "8"
- "10"
- "12"
cache:
yarn: true
directories:
- "node_modules"
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- export PATH="$HOME/.yarn/bin:$PATH"
- export TZ=Europe/Berlin
before_script:
- yarn add react react-dom prop-types
- yarn add react react-dom
script:
- yarn test:coverage
15 changes: 9 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -4,18 +4,21 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:3001",
"webRoot": "${workspaceFolder}"
},
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"-i"
],
"args": ["-i"],
"internalConsoleOptions": "openOnSessionStart",
"outFiles": [
"${workspaceRoot}/dist/**/*"
]
"outFiles": ["${workspaceRoot}/dist/**/*"]
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading