GithubHelp home page GithubHelp logo

jhipster / generator-jhipster-react-native Goto Github PK

View Code? Open in Web Editor NEW
262.0 262.0 54.0 9.17 MB

A React Native blueprint for JHipster

Home Page: https://jhipster-sample-app-react-native.vercel.app/

License: Apache License 2.0

JavaScript 26.90% Shell 2.52% EJS 70.46% TypeScript 0.12%
android ios jhipster jhipster-blueprint react-native

generator-jhipster-react-native's Introduction

JHipster BOM and server-side library - DEPRECATED

Angular Build Status React Build Status Vue Build Status Webflux Build Status Azure DevOps Build Status Maven Central

Full documentation and information is available on our website at https://www.jhipster.tech/

This project is used by the JHipster generator. This is the Bill of Materials and server-side library:

  • jhipster-dependencies
  • jhipster-framework

If the current version is SNAPSHOT then to use this SNAPSHOT version:

  • clone this project
  • run ./mvnw clean install -Dgpg.skip=true, on Windows run .\mvnw.cmd clean install -D"gpg.skip=true"

Analysis of the JHipster server-side parent POM project

sonar-quality-gate sonar-coverage sonar-bugs sonar-vulnerabilities

generator-jhipster-react-native's People

Contributors

amurmurmur avatar danielfran avatar dependabot[bot] avatar dwarakaprasad avatar fr33maan avatar friederbluemle avatar github-actions[bot] avatar hide212131 avatar jamonholmgren avatar jhipster-bot avatar karlingen avatar mhmmdd avatar mraible avatar mshima avatar nonameolsson avatar rmevans9 avatar ruddell avatar vivekmore avatar zhyd1997 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

generator-jhipster-react-native's Issues

Fetch data from different jHipster entities and display on pickers

I need help here: I have two pickers and a flat-list on one screen i would like to fetch data from two entities on my back-end and be able to display the different data fetch on the two pickers and flat list.

Unfortunately they are all displaying data from the last entered entity am using component will receive props

I believe the problem is with this function how can i ensure that each picker fetches the data from the right entity ?

componentWillReceiveProps (newProps) {
if (newProps.mealTypes) {
this.setState({
done: newProps.mealTypes.length < this.state.size,
dataObjects: this.state.loading ? [...this.state.dataObjects, ...newProps.mealTypes] : newProps.mealTypes,
loading: false
})
};
if (newProps.mealPreparationPlaces) {
this.setState({
done: newProps.mealPreparationPlaces.length < this.state.size,
dataObjects: this.state.loading ? [...this.state.dataObjects, ...newProps.mealPreparationPlaces] : newProps.mealPreparationPlaces,
loading: false
})
}
}

Path to copy doesn't exist node modules ignite-jhipster boilerplate

Hi there, we tried this app, many times before it works perfectly. But this time there is some error while creating an app, there it is stuck at copying with an error in the previous command.
My system has

Ubuntu 18.04 LTS
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Node - v8.12.0
Ignite version* 2.1.2

having the error below is the output

๐Ÿ”ฅ igniting app dehaze
โœ” Generating a React Native client for JHipster apps
? Enter the path to your JHipster project root directory: ../w-app
Looking for ../w-app/.yo-rc.json
Found JHipster config file at ../w-app/.yo-rc.json
โœ” added React Native 0.56.1 in 89.13s
โœ” using the JHipster boilerplate
โ ‹ โ–ธ copying filesan error occured while installing ignite-jhipster boilerplate.
Error: Path to copy doesn't exist /media/balvinder/Content/Git_Projects/dehaze-mvp/ignite-app/dehaze/node_modules/ignite-jhipster/boilerplate/App
โ ‡ โ–ธ copying files

Pls help regarding the issue, otherwise the project is awesome...

Could not login/register account on real device

Dear @ruddell
Many thanks for your great work, just one problem I face now, when I run the app on simulator both iOS and Android are ok, but when run on real device, in can not connect to API, I have expose APi on hosting as well then replace:

apiUrl: 'https://demodomain.xyz/',
appUrlScheme: 'demoapp',

But it's not worked on real device, on simulator is ok

Do I missing some configuration?

Thanks

Entity Generator Improvements

Things left to fix related to relationships:

  • Related entities aren't loaded until you visit the edit screen, so they won't appear at first.
    • If you go back then click edit/create again, they will be listed
  • OneToOne relationships - don't list entities that already have a relation (Not done in main generator so skipping

Update Docs

v2 Documentation Changes:

  • Project structure grouped by feature
  • Social Login docs for JHipster v5 (Keycloak/Okta integration)
  • Review the other docs

Entities saving on create and not update

Hey Ruddell, looks like a silly question, but I am able to create a new record in any entity, but when I try to update there is nothing happen after I click save. I was editing some date field as it was having an issue, so i tried another entity. The same issue is there the save works on new record and not on old record when we try to edit.
also, I have applied by setting some default value to fields, but I was unable to do that.
modified: {
value: 'some_value',
returnKeyType: 'done',
onSubmitEditing: () => this.submitForm()
}

My configuration

ignite --version 2.1.2
android emulator running Android 9

React dependencies in package.json
 "react": "16.4.1",
    "react-native": "0.56.1",

Entity generator doesn't handle LocalDate properly

I've generated an entity with the following JDL:

entity Points {
  date LocalDate required,
  exercise Integer,
  meals Integer,
  alcohol Integer,
  notes String maxlength(140)
}

There seem to be a couple issues with using this in Ignite JHipster:

  1. When I create a new record, the date wants me to select a time as well as a date. All I want is a date selector, not time.
  2. When I try to edit the record, I get an error: TypeError: props.date.getTime is not a function.

image

Here's what the data looks like in the record I'm editing:

id:1051
date:2018-10-04
exercise:1
meals:1
alcohol:1
notes:Notes
user:null

Error building apk

  • OS: Windown10
  • Ignite JHipster Version: react-native: "0.57.5", react-native-navigation: "2.1.3-snapshot.33"
  • Node Version: 8.12.0

When try to build the signed apk it is producing the errors but i am able to run it without any errors

` Task :react-native-navigation:compileReactNative51ReleaseJavaWithJavac FAILED
G:--\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\SyncUiImplementation.java:8: error: cannot find symbol
import com.facebook.react.uimanager.MeasureSpecProvider;
^
symbol: class MeasureSpecProvider
location: package com.facebook.react.uimanager
G:---\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\SyncUiImplementation.java:9: error: cannot find symbol
import com.facebook.react.uimanager.SizeMonitoringFrameLayout;
^
symbol: class SizeMonitoringFrameLayout
location: package com.facebook.react.uimanager
G:----\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\SyncUiImplementation.java:78: error: cannot find symbol
public <T extends SizeMonitoringFrameLayout & MeasureSpecProvider> void registerRootView(T rootView, int tag, ThemedReactContext context) {
^
symbol: class SizeMonitoringFrameLayout
location: class SyncUiImplementation
G:----\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\SyncUiImplementation.java:78: error: cannot find symbol
public <T extends SizeMonitoringFrameLayout & MeasureSpecProvider> void registerRootView(T rootView, int tag, ThemedReactContext context) {
^
symbol: class MeasureSpecProvider
location: class SyncUiImplementation
G:-----\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\JsDevReloadHandlerFacade.java:7: error: JsDevReloadHandlerFacade is not abstract and does not override abstract method onSuccess(NativeDeltaClient) in DevBundleDownloadListener
public class JsDevReloadHandlerFacade implements DevBundleDownloadListener, NavigationDevBundleDownloadListener {
^
G:----\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\ReloadHandlerFacade.java:8: error: method does not override or implement a method from a supertype
@OverRide
^
G:-----\node_modules\react-native-navigation\lib\android\app\src\main\java\com\reactnativenavigation\react\ReloadHandler.java:3: error: ReloadHandler is not abstract and does not override abstract method onSuccess(NativeDeltaClient) in DevBundleDownloadListener
public class ReloadHandler extends ReloadHandlerFacade implements JsDevReloadHandler.ReloadListener {
^
G:------\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\DevBundleDownloadListenerAdapter.java:7: error: DevBundleDownloadListenerAdapter is not abstract and does not override abstract method onSuccess(NativeDeltaClient) in DevBundleDownloadListener
public class DevBundleDownloadListenerAdapter implements DevBundleDownloadListener {
^
G:----\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\DevBundleDownloadListenerAdapter.java:8: error: method does not override or implement a method from a supertype
@OverRide
^
Note: G:----\node_modules\react-native-navigation\lib\android\app\src\reactNative51\java\com\reactnativenavigation\react\SyncUiImplementation.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
9 errors

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':react-native-navigation:compileReactNative51ReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 6m 39s
78 actionable tasks: 61 executed, 17 up-to-date`

react-native link not working

Dear @ruddell
Thanks for great framework, just one thing I have try install some other dependency that need run "react-native link" but it's error not found command,
Could you guide me how to use in this case?
BR

Ignite JHipster needs OAuth support to be refactored

With the rewrite of JHipster's OAuth support to use an external IdP, the OAuth support in this library no longer works. You should be able to use OAuth's implicit flow to get an access token from the IdP and make API calls with it in the Authorization header.

This is what I did with the Ionic Module for JHipster and it works well. I also added an AuthInfoResource that we might want to add automatically when users choose OAuth in JHipster.

Layout by Feature

  • Convert folder layout to group by feature - model off of JHipster React frontend

Redirect back to app after OIDC Login on Android doesn't work

To make my API work with Android in an emulator, I had to change all localhost links to 10.0.2.2. See emulator-networking for more information.

This means I had to update src/main/resources/config/application.yml in my JHipster app to the following.

security:
    oauth2:
        client:
            access-token-uri: http://10.0.2.2:9080/auth/realms/jhipster/protocol/openid-connect/token
            user-authorization-uri: http://10.0.2.2:9080/auth/realms/jhipster/protocol/openid-connect/auth
            client-id: web_app
            client-secret: web_app
            scope: openid profile email
        resource:
            user-info-uri: http://10.0.2.2:9080/auth/realms/jhipster/protocol/openid-connect/userinfo

In my React Native app, I had to change my apiUrl in App/Config/AppConfig.js.

export default {
  apiUrl: 'http://10.0.2.2:8080/',
  appUrlScheme: 'healthpoints'
}

Then I modified my android/app/src/main/AndroidManifest.xml to contain my app's scheme.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.healthpoints">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="healthpoints" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>
</manifest>

I ran adb reverse tcp:9090 tcp:9090 so Reactotron works.

I'm able to click Login and authenticate with Keycloak. However, when it redirects back to my app, I'm not authenticated and no access token is sent to the server.

Here's an animated gif that shows this behavior.

android oidc

Here's a screenshot of Reactotron showing the redirect to the IdP and subsequent call to get account information w/o an access token.

Reactotron

Entity generator does not create relationship dropdowns

I created a new entity called Points with the following JDL:

entity BloodPressure {
  timestamp ZonedDateTime required,
  systolic Integer required,
  diastolic Integer required
}
entity Weight {
  timestamp ZonedDateTime required,
  weight Double required
}
entity Points {
  date LocalDate required,
  exercise Integer,
  meals Integer,
  alcohol Integer,
  notes String maxlength(140)
}
entity Preferences {
  weeklyGoal Integer required min(10) max(21),
  weightUnits Units required
}

enum Units {
  KG,
  LB
}

relationship OneToOne {
  Preferences{user(login)} to User
}
relationship ManyToOne {
  BloodPressure{user(login)} to User,
  Weight{user(login)} to User,
  Points{user(login)} to User
}

paginate BloodPressure, Weight with infinite-scroll
paginate Points with pagination

In my JHipster app, there's a User drop-down on the add/edit screen.

screen shot 2018-10-04 at 3 09 51 pm

In my React Native app, there is no drop-down.

screen shot 2018-10-04 at 3 26 05 pm

Account Section

  • Register page
  • Forgot Password page
  • Account Settings page
  • Change Password page

Error loading boilerplate

Getting this error when trying to create a new ignite app from the boilerplate. This worked previously for me.

`$ ignite new MySdMobile --boilerplate ignite-jhipster
Directory MySdMobile already exists.
? Do you want to overwrite this directory? true
Overwriting MySdMobile...

( ) (
)\ ) ( ( /( )\ ) * )
(()/( )\ ) )()) (()/( ) /( ( /(_)) (()/( ((_)\ /(_)) ( )(_)) )\ (_)) /(_))_ _((_) (_)) (_(_()) ((_) |_ _| (_)) __| | \| | |_ _| |_ _| | __| | | | (_ | | . | | | | | | |
|
| _| ||_| || || |__|

An unfair headstart for your React Native apps.
https://infinite.red/ignite


๐Ÿ”ฅ igniting app MySdMobile
โœ– error loading the boilerplate`

Can't run new app on Android

Describe the bug

I tried creating a new app with 2.0.0 this evening and ran into an issue running it on Android. First of all, I get a compile error:

> Configure project :react-native-navigation
downloadRobolectricDependencies into /Users/mraible/react-native-spring-boot/react-native-app/android/build/robolectric-3.5.1-dependencies


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-vector-icons'.
> Could not resolve all files for configuration ':react-native-vector-icons:classpath'.
   > Could not find com.android.tools:common:25.3.3.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.pom
         https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.jar
     Required by:
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.build:manifest-merger:25.3.3
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.ddms:ddmlib:25.3.3
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:shared:25.3.3
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:tracker:25.3.3
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools.layoutlib:layoutlib-api:25.3.3
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:dvlib:25.3.3
         project :react-native-vector-icons > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:repository:25.3.3

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

I was able to fix this by modifying node_modules/react-native-vector-icons/android/build.gradle and changing its dependencies to be com.android.tools.build:gradle:1.3.1.

However, when I try to deploy to my AVD, I get an error and I can't seem to get past it.

screenshot_1544235202

Instructions To reproduce

Create an app with OAuth 2.0 support.

JHipster app's .yo-rc.json

{
  "generator-jhipster": {
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "enableHibernateCache": true,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "jhiPrefix": "jhi",
    "languages": [
      "en",
      "es"
    ],
    "messageBroker": false,
    "nativeLanguage": "en",
    "packageName": "com.okta.developer",
    "packageFolder": "com/okta/developer",
    "prodDatabaseType": "postgresql",
    "searchEngine": "elasticsearch",
    "serviceDiscoveryType": false,
    "skipClient": false,
    "skipServer": false,
    "testFrameworks": [
      "protractor"
    ],
    "websocket": false,
    "applicationType": "monolith",
    "baseName": "HealthPoints",
    "authenticationType": "oauth2",
    "buildTool": "gradle",
    "clientFramework": "react",
    "useSass": true,
    "jhipsterVersion": "5.7.0",
    "skipUserManagement": true,
    "clientPackageManager": "npm",
    "cacheProvider": "ehcache",
    "serverPort": "8080",
    "otherModules": []
  },
  "entities": [
    "Points",
    "BloodPressure",
    "Weight",
    "Preferences"
  ]
}

Entity JDL or JSON files

Versions (please complete the following information):

  • OS: macOS Mojave
  • Ignite JHipster Version: 2.0.0
  • Node Version: 11.3.0

Upgrade RN to 0.57 (Windows + Haste Module Issue)

Versions (please complete the following information):

  • OS: windows 10
  • Ignite JHipster Version: v1.12.2
  • Node Version: 8.11.3
  • jhipsterVersion: 4.14.0,

Describe the bug

npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! Invalid dependency type requested: alias

generated new project from ignite-jhipster pointint to my jhipster server when i am installing node modules using "npm install" the packages are not installing and getting this error in android in ios it is runnning

Error when installing Ignite Jhispster boilerplate

๐Ÿ”ฅ igniting app attV1
โˆš using the JHipster boilerplate
? Enter the path to your JHipster project root directory: dietaryassessment2
Looking for dietaryassessment2/.yo-rc.json
Found JHipster config file at dietaryassessment2/.yo-rc.json
? Would you like Ignite Development Screens? true
? What animation library will you use? (Press <space> to select)
โˆš added React Native 0.52.0 in 45.38s
โˆš using the JHipster boilerplate
ร— ignite-jhipster was not able to be installed. Is it a valid NPM module?
----------
Command failed: yarn add ignite-jhipster --dev
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/react@^3.2.16".
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.

----------
JHipster config saved to your app's .jhipster folder.
โˆš added ignite-jhipster in 70.03s
ร— ignite-ir-boilerplate was not able to be installed. Is it a valid NPM module?
----------
Command failed: yarn add ignite-ir-boilerplate --dev
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/react@^3.2.16".
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.

----------
ร— ignite-dev-screens was not able to be installed. Is it a valid NPM module?
----------
Command failed: yarn add ignite-dev-screens --dev
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/react@^3.2.16".
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.

----------
ร— ignite-vector-icons was not able to be installed. Is it a valid NPM module?
----------
Command failed: yarn add ignite-vector-icons --dev
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/react@^3.2.16".
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.

----------
ร— ignite-standard was not able to be installed. Is it a valid NPM module?
----------
Command failed: yarn add ignite-standard --dev
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/react@^3.2.16".
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.

----------
an error occured while installing ignite-jhipster boilerplate.
TypeError: Cannot set property 'ignore' of undefined

Fields mark as 'required' are shown as 'optional' when creating/editing a entity

This is the .jhipster/entity.json


{
    "fluentMethods": true,
    "relationships": [],
    "fields": [
        {
            "fieldName": "name",
            "fieldType": "String",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "barcode",
            "fieldType": "String",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "metadata",
            "fieldType": "String"
        },
        {
            "fieldName": "statusId",
            "fieldType": "String",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "createdAt",
            "fieldType": "ZonedDateTime",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "createdBy",
            "fieldType": "String",
            "fieldValidateRules": [
                "required"
            ]
        }
    ],
    "changelogDate": "20180111125645",
    "entityTableName": "entity",
    "dto": "no",
    "pagination": "no",
    "service": "no",
    "jpaMetamodelFiltering": false,
    "microserviceName": "ATracker"
}

entityjson

import-jdl command doesn't do anything

I'm trying to use the import-jdl command to generate entities from the following file:

entity BloodPressure {
  timestamp ZonedDateTime required,
  systolic Integer required,
  diastolic Integer required
}
entity Weight {
  timestamp ZonedDateTime required,
  weight Double required
}
entity Points {
  date LocalDate required,
  exercise Integer,
  meals Integer,
  alcohol Integer,
  notes String maxlength(140)
}
entity Preferences {
  weeklyGoal Integer required min(10) max(21),
  weightUnits Units required
}

enum Units {
  KG,
  LB 
}

relationship OneToOne {
  Preferences{user(login)} to User
}
relationship ManyToOne {
  BloodPressure{user(login)} to User,
  Weight{user(login)} to User,
  Points{user(login)} to User
}

paginate BloodPressure, Weight with infinite-scroll
paginate Points with pagination

When I run the following command, nothing happens.

ignite generate import-jdl entities.jh

Related question: should it be possible to use the same JDL file I used to create my JHipster app?

application {
  config {
    applicationType monolith,
    baseName HealthPoints
    packageName com.okta.developer,
    authenticationType oauth2,
    prodDatabaseType postgresql,
    buildTool gradle,
    searchEngine elasticsearch,
    serviceDiscoveryType eureka,
    testFrameworks [protractor],
    clientFramework react,
    useSass true,
    enableTranslation true,
    nativeLanguage en,
    languages [en, es]
  }
  entities Points, BloodPressure, Weight, Preferences 
}

// JDL definition for application 'TwentyOnePoints' generated with command 'jhipster export-jdl'

entity BloodPressure {
  timestamp ZonedDateTime required,
  systolic Integer required,
  diastolic Integer required
}
entity Weight {
  timestamp ZonedDateTime required,
  weight Double required
}
entity Points {
  date LocalDate required,
  exercise Integer,
  meals Integer,
  alcohol Integer,
  notes String maxlength(140)
}
entity Preferences {
  weeklyGoal Integer required min(10) max(21),
  weightUnits Units required
}

enum Units {
  KG,
  LB 
}

relationship OneToOne {
  Preferences{user(login)} to User
}
relationship ManyToOne {
  BloodPressure{user(login)} to User,
  Weight{user(login)} to User,
  Points{user(login)} to User
}

paginate BloodPressure, Weight with infinite-scroll
paginate Points with pagination

Unable to login I get error invalid login

I am not able to login to my Frontend the backend is running ok and I have copied the URL to AppConfig.js. On my android virtual device I also get a warning : NetInfos change event is deprecated. Listen to the connection Change event instead.
NetInfo.fetch is deprecated. Use NetInfo.getConnecyionInfo() instead. Where should I configure this changes?

Picker cannot fetch names from jhipster backend

Hi i want the picker to pull enumerator names from the jhipster backend but it return a null value, kindly assist. this is part of my code

 class AssessmentsScreen extends Component {
  constructor(props) {
    super(props);
    this.state = {
      isLoading: false,
      enumerator: '',
      dataSource:[]
    };
  } 
  
  fetchEnumerators = () => {
  this.setState({isLoading: !this.state.isLoading});
  } 
  
  handleLoadMore = () => {
    if (this.state.done || this.props.fetching) {
      return
    }
  this.setState({
    page: this.state.enumerator.name,
    isLoading: true
  })
  this.fetchAssessments()
}
 
  render () {
   
      if (this.state.isLoading) {
        return (
          <View style={{flex: 1, paddingTop: 20}}>
            <ActivityIndicator />
          </View>
        );
      }
     return (
 
 <Picker style={styles.picker}
        itemStyle={styles.items}
        selectedValue={this.state.enumerator.name}
        onValueChange={(itemValue,itemIndex) => this.setState({enumerator: itemValue})}>
            {this.state.dataSource.map((item, key) => {return <Picker.Item value={item.name} label={"Name " + i} key={item.name}  /> })}
            
    </Picker>
	
	)

Social Login

Planned Features:

  • Websocket Support
  • Social Login
  • Internationalization (not much interest, please open an issue if you want it)

To Investigate

  • React-Navigation

Entity Subgenerator Prompts

Load entity config from the JHipster project, similar flow to generating a gateway entity from a microservice.

UAA integration example

Hi,

Thank you for sharing this great project!

I am having problems generating a microservices architecture project with Jhipster-UAA(which I assume will work with the uaa option in ingite-jhipster).

I have a Jhipster registry, uaa, gateway and a "one entity-field" microservice app. But I couldn't figure out how to configure this on the Config/AppConfig.js file.

I can see the authentication in the backend is happening but my app is not moving from the login screen.

Not sure if there is another config file I need to modify or the problem is because I am pointing to the gateway instead of going directly to the uaa service. Any advice will be welcome, I am new in react so I am still trying to learn how everything was built.

Thanks again!

Nothing happens when clicking on Login with OIDC on Android

I've generated an app and deployed it to an Android AVD successfully. However, when I click "Login", nothing happens. I think this is because the API points to localhost, which an Android AVD doesn't recognize. If I try changing it to my laptop's IP address, I get an error.

In AppConfig.js:

apiUrl: 'http://192.168.0.66:8080/',
console.error: "uncaught at root", "at root 
 at takeLatest 
 at login 
 login$@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:143525:52
tryCatch@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:29610:23
invoke@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:29783:32
http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:29653:30
next@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:139672:33
currCb@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:139750:11
tryCallOne@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:28939:16
http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:29040:27
http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:4530:26
_callTimer@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:4419:17
_callImmediatesPass@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:4455:19
callImmediates@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:4674:33
__callImmediates@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:3998:32
http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:3837:34
__guard@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:3978:15
flushedQueue@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:3836:21
flushedQueue@[native code]
callFunctionReturnFlushedQueue@http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false:3805:33
callFunctionReturnFlushedQueue@[native code]"

screenshot_1539031013

NOTE: I also don't see a request to the API to get the information from the /api/auth-info endpoint.

OAuth 2.0 files generated in the wrong directory

I tried creating a new React Native app with this module today and noticed the OAuth 2.0-related files are created in a src directory rather than in my JHipster app's directory.

If I run tree . in the src directory, you can see the files:

โžœ  src git:(master) โœ— tree .
.
โ””โ”€โ”€ main
    โ””โ”€โ”€ java
        โ””โ”€โ”€ com
            โ””โ”€โ”€ okta
                โ””โ”€โ”€ developer
                    โ”œโ”€โ”€ config
                    โ”‚ย ย  โ””โ”€โ”€ ResourceServerConfiguration.java
                    โ””โ”€โ”€ web
                        โ””โ”€โ”€ rest
                            โ””โ”€โ”€ AuthInfoResource.java

The parent directory has:

react-native-app
jhipster-api
src

E2E Tests with Detox

Once #54 is merged, we can set up https://github.com/wix/detox for E2E tests similar to Protractor. This will make upgrades much easier since we can get rid of most manual testing.

  • Couldn't get Android working (any tips/help appreciated), but iOS works well.

Submit/Save form

I would like to save my form to the jHipster backend but i get an error
image

this is my code:

import React from 'react'
import { Alert, ScrollView, Text, TouchableHighlight, DatePickerAndroid } from 'react-native'
import { connect } from 'react-redux'
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'
// Add Actions - replace 'Your' with whatever your reducer is called :)
//  import AccountActions from '../Redux/AssessmentRedux'
import { Actions as NavigationActions } from 'react-native-router-flux'
import RoundedButton from '../Components/RoundedButton' // eslint-disable-line
import AssessmentActions from '../Redux/AssessmentRedux'
import t from 'tcomb-form-native'
// Styles
import styles from './Styles/NewAssessmentScreenStyle'
import moment from 'moment'
let Form = t.form.Form

class NewAssessmentScreen extends React.Component {
  constructor (props) {
    super(props)
    this.state = { 
        accountModel: t.struct({
        enumerator: t.String,
        participant: t.String,
        interviewee: t.String,
        assessmentType: t.String,
        factory: t.form.Radio
      //  startDate: t.Date 
        
        
      }),
      accountValue: this.props.account,
      options: {
        fields: {
          enumerator: {
            returnKeyType: 'next',
            onSubmitEditing: () => this.refs.form.getComponent('participant').refs.input.focus()
          },
          participant: {
            returnKeyType: 'next',
            onSubmitEditing: () => this.refs.form.getComponent('interviewee').refs.input.focus()
          },
          interviewee: {
            returnKeyType: 'next',
            onSubmitEditing: () => this.refs.form.getComponent(' assessmentType').refs.input.focus()
          },
          assessmentType: {
            returnKeyType: 'done',
            onSubmitEditing: () => this.refs.form.getComponent(' startDate').refs.input.focus()
          }, 
                       
        }
      },
      success: false
    }
    this.submitUpdate = this.submitUpdate.bind(this)
    this.accountChange = this.accountChange.bind(this)
  }

   submitUpdate () {
    this.setState({
      success: false
    })
    // call getValue() to get the values of the form
    const value = this.refs.form.getValue()
    if (value) { // if validation fails, value will be null
      this.props.assessmentUpdateRequest (value)
    }
  }

  componentWillReceiveProps (newProps) {
    // Did the update attempt complete?
    if (!newProps.updating) {
      if (newProps.error) {
        if (newProps.error === 'WRONG') {
          Alert.alert('Error', 'Something went wrong while saving the settings', [{text: 'OK'}])
        }
      } else if (!this.state.success) {
        this.setState({
          success: true
        })
        Alert.alert('Success', 'Assessments updated', [{text: 'OK'}])
        this.props.getAccount()
      }
    }
  }

  accountChange (newValue) {
    this.setState({
      accountValue: newValue
    })
  }

  render () {
    var Person = t.struct({
      effectiveDate: t.Date // a date field
  });
  let myFormatFunction = (format,date) =>{
      return moment(date).format(format);
  }
  var effectiveDate = {
      label: 'Effective Date',
      mode:'date',
      config:{
          format:(date) => myFormatFunction("DD MMM YYYY",date)
      }
  };
  let options = {
      fields: {
         "effectiveDate":effectiveDate
      }
  };


    return (
      <KeyboardAwareScrollView>
        <ScrollView style={styles.container}>
          <Form
            ref='form'
            type={this.state.accountModel}
            options={this.state.options}
            value={this.state.accountValue}
            onChange={this.accountChange}
            
          />
           <Form ref="documentDate" type={Person} value={this.state.dateValue} options={options} />
          <TouchableHighlight style={styles.button} onPress={this.submitUpdate} underlayColor='#99d9f4'>
            <Text style={styles.buttonText}>Save</Text>
          </TouchableHighlight>

           
         <RoundedButton text='Start Child Assessment' onPress={NavigationActions.startAssessment} />      
         <RoundedButton text='Start Adult Assessment' onPress={NavigationActions.start1Assessment} />  
          


        </ScrollView>
      </KeyboardAwareScrollView>
    )
  }
}

const mapStateToProps = (state) => {
  return {
   account: state.account.account,
    updating: state.account.updating,
    error: state.account.error
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    getAllAssessments: (assessment) => dispatch(AssessmentActions.assessmentUpdateRequest(assessment))
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(NewAssessmentScreen)

Waiting for support for social login

Hi, you are doing great work and this project will be of great help.
Just want to let you know I am eagerly awaiting for social login support in this.

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.