GithubHelp home page GithubHelp logo

blackboxvision / react-admin-extensions Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 16.0 567 KB

Packages for improving your development workflow with react admin

License: MIT License

JavaScript 7.62% TypeScript 83.81% HTML 0.83% MDX 7.74%

react-admin-extensions's Introduction

RA Extensions

At BlackBox Vision we use a lot React Admin as a tool for building internal systems and back offices.

We're pretty grateful for the work done behind React Admin.

This repository contains some internal libraries that we've used in our projects and decided to release as a part of our OSS initiative.

Packages

We've packages to support different needs.

UI/UX

Forms

Entities

Realtime

Input/Fields

Translations

Permissions

  • RA RBAC: Add support for fine grained permissions into your app.
  • RA Audit Log (WIP): Add support for auditing user events, and a timeline view to visualize all the user actions.

Auth Providers

Data Providers

Those packages marked with (WIP) are packages under development.

react-admin-extensions's People

Contributors

ehf32 avatar joebordes avatar jonatansalas avatar manutuero avatar mendozammatias avatar wixsl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-admin-extensions's Issues

add `hactoberfest` label to the project

Hi

I am going to push a translation change to the project. I would like it to count for my hactkoberfest PRs. Can you add that label to the project so it gets accepted?

Thanks

[Refactor] - Migrate to tsdx

We've used to work with pika pkg as the method for building, bundling and releasing the libraries under the monorepo. The latest year pika pkg has been archived and no more work has been done around.

Analizing where to move, I think we need to move the packages to tsdx since its well mantained and it has a lot of features that can make our work more easier.

Cannot find module: '@blackbox-vision/ra-language-spanish'. Make sure this package is installed.

Hi,

Thanks for sharing Spanish translations for react-admin!

I've updated from 3.12 to 3.16 and found this issue. I've tried installing this library on a new React Admin project but didn't work.

yarn create react-app test-admin
cd test-admin/
yarn add react-admin ra-data-json-server prop-types
yarn build

That works until I installed this library:

yarn add @blackbox-vision/ra-language-spanish

yarn add v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "connected-react-router@^6.5.2".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "final-form@^4.20.2".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "react-final-form@^6.5.2".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "react-redux@^7.1.0".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "react-router@^5.1.0".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "react-router-dom@^5.1.0".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "redux@^3.7.2 || ^4.0.3".
warning "ra-data-json-server > [email protected]" has unmet peer dependency "redux-saga@^1.0.0".
warning "react-admin > [email protected]" has unmet peer dependency "history@^4.7.2".
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > @blackbox-vision/[email protected]" has unmet peer dependency "ra-core@^3.14.0".
warning " > @blackbox-vision/[email protected]" has incorrect peer dependency "react@^16.11.0".
[4/4] Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ @blackbox-vision/[email protected]
info All dependencies
└─ @blackbox-vision/[email protected]
Done in 6.34s.

yarn build

yarn run v1.22.10
$ react-scripts build
Creating an optimized production build...
Failed to compile.

./src/App.js
Cannot find module: '@blackbox-vision/ra-language-spanish'. Make sure this package is installed.

You can install this package by running: yarn add @blackbox-vision/ra-language-spanish.


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there something I wrong I'm doing or maybe installing wrong library version?

Jest tests: Cannot find module '@blackbox-vision/ra-language-spanish'

It works perfect from the App build (create react app), but it cannot find the module when running jest tests.
I think it has something to do with
Jest looking for a file called index.js in the module root folder.
If i create and empty index.js file in the root folder Jest pass sucessfully.

This is the node_modules subfolder for the installed module:
└── ra-language-spanish
├── dist-src
│   └── index.js
├── dist-types
│   └── index.d.ts
├── dist-web
│   ├── index.js
│   └── index.js.map
├── package.json
└── README.md

This is the Jest run failing ouput:

FAIL src/App.test.js
● Test suite failed to run

Cannot find module '@blackbox-vision/ra-language-spanish' from 'src/providers/i18nProvider.js'

Require stack:
  src/providers/i18nProvider.js
  src/App.js
  src/App.test.js

  2 | import polyglotI18nProvider from 'ra-i18n-polyglot'
  3 | import englishMessages from 'ra-language-english'
> 4 | import spanishMessages from '@blackbox-vision/ra-language-spanish'
    | ^
  5 | import frenchMessages from 'ra-language-french'
  6 | import italianMessages from 'ra-language-italian'
  7 | import merge from 'lodash/merge'

  at Resolver.resolveModule (node_modules/jest-runtime/node_modules/jest-resolve/build/index.js:306:11)
  at Object.<anonymous> (src/providers/i18nProvider.js:4:1)

Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 7.515 s, estimated 10 s
Ran all test suites.

Cannot find module & Unable to resolve path to module - '@blackbox-vision/ra-language-spanish/'

If I import the library as:

import spanishMessages from "@blackbox-vision/ra-language-spanish/";

It works, but get the following ESLint errors:

Unable to resolve path to module "@blackbox-vision/ra-language-spanish/"
Missing file extension for "@blackbox-vision/ra-language-spanish/"

And my tests fail:

Cannot find module '@blackbox-vision/ra-language-spanish/' from 'src/providers/translation/locales/es.js'

I can fix the ESLint errors if I import as @blackbox-vision/ra-language-spanish/dist-src or /dist-web but my tests still fail with:

export default spanishMessages;
^^^^^^
SyntaxError: Unexpected token 'export'

I only managed to make everything work by updating the jest config in my package.json:

"jest": {
   "transformIgnorePatterns": [
      "node_modules/(?!@blackbox-vision)"
   ]
}

I don't understand why I have to do this, I am missing something?


Versions:

  • @blackbox-vision/ra-language-spanish - 3.16.2
  • react-admin - 3.19.1
  • yarn - 1.22.10
  • node - 14.18.1

does not work when creating provider version 3.17.1

This is how the translation works in react-admin 3.17.1

`import polyglotI18nProvider from "ra-i18n-polyglot";
import spanishMessages from "@blackbox-vision/ra-language-spanish";

export const i18nProvider = polyglotI18nProvider(() => spanishMessages, 'es', {
allowMissing: true,
});
`

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.