Giter Site home page Giter Site logo

dynamic-forms's People

Contributors

bilogic avatar cecolby11 avatar dependabot[bot] avatar dxnter avatar mc0918 avatar nie7321 avatar nmg9964 avatar sfk571 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynamic-forms's Issues

Included lodash-php module dependency conflict when using composer autoloader. Breaks __() "trans" helper function.

The bug
Due to the inclusion of the lodash-php module when using the composer autoloader, your module has the potential to be loaded before Laravel helper dependencies, which prevents the creation of Laravel's __() (trans) helper function. This results in all calls to __() breaking.

Essentially with this module as a dependency the Laravel project more than likely will need be manually installed in all other environments (dev, stage, prod, etc). Eliminating the ability to utilize composer install.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Laravel project with composer
  2. composer require northwestern-sysdev/dynamic-forms
  3. composer install (probably not necessary, just need "dynamic-forms" in the composer.json)
  4. Push (or copy w/o vendor/) the project to a clean environment (staging, etc)
  5. run composer install
  6. call the __('some text') function (in a view for example)
  7. load the page that calls the '__' helper function.

Expected behavior
The __() helper should not throw an exception and load as normal.

**Have you customized the resources/js/formio/defaults.js` file?

  • No
  • Yes (describe changes)

Additional context
In the Lodash module the '__' check if (!function_exists('__')) { on line 92 of Lodash.php is insufficient for preventing a conflict.

There is No clear way to use it via Laravel and error with controllers naming compared to web.php routes

There is No clear way to use it via Laravel and error with controllers naming compared to web.php routes
There is No clear way to use it via Laravel and error with controllers naming compared to web.php routes

go to web.php and to DynamicFormsResourceController.php
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

**Have you customized the resources/js/formio/defaults.js` file?

  • No
  • Yes (describe changes)

Additional context
Add any other context about the problem here.

Error when running `php artisan dynamic-forms:install`

Describe the bug

[/project]# php artisan dynamic-forms:install
Publishing file upload controller...

   ERROR  Command "dynamic-forms:installStorageController" is not defined. Did you mean one of these?

  โ‡‚ dynamic-forms:install

[/project]#

To Reproduce
Steps to reproduce the behavior:

  1. Install Laravel Framework 9.26.1
  2. composer require northwestern-sysdev/dynamic-forms
  3. php artisan dynamic-forms:install

Expected behavior
Not expecting an error

**Have you customized the resources/js/formio/defaults.js` file?

  • No
  • Yes (describe changes)

Support resources for select components

The select component can look up resources via AJAX instead of a static list of values. We don't support this, but it would be great if we did.

Tasks

  • Make sure we've got control of the URL it's doing AJAX requests for (builder & form)
  • Add a controller for resource types & resources
    • Need to come up with a good way for devs to create a "resource type" for the controller that is also available to the backend component class for validation.
  • Figure out a good way to present these resource-backed selects in the UI
    • Out of the box, you'd pick the option from the dropdown in the builder. We'll need to restrict it to just the two relevant options (data + resource). There's some code that does this for submit buttons that may be a useful lodestar.

Cannot install on fresh Laravel 11 project

Describe the bug
Installed a fresh Laravel 11.7.0 to test the package but it did not install, following is a composer error message:

Problem 1
    - Root composer.json requires northwestern-sysdev/dynamic-forms ^1.0 -> satisfiable by northwestern-sysdev/dynamic-forms[v1.0.0].
    - northwestern-sysdev/dynamic-forms v1.0.0 requires nesbot/carbon ^2 -> found nesbot/carbon[2.0.0, ..., 2.72.3] but the package is fixed to 3.3.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require northwestern-sysdev/dynamic-forms:*" to figure out if any version is installable, or "composer require northwestern-sysdev/dynamic-forms:^2.1" if you know which you need.

As suggested by the composer, I tried with -W flag and got the following error:

Problem 1
    - northwestern-sysdev/lodash-php v1.0.0 requires sebastian/comparator ^1.2 | ^2.0 | ^2.1 | ^3.0 | ^4.0 -> found sebastian/comparator[1.2.0, ..., 1.2.4, 2.0.0, ..., 2.1.3, 3.0.0, ..., 3.0.5, 4.0.0, ..., 4.0.8] but these were not loaded, likely because it conflicts with another require.
    - northwestern-sysdev/lodash-php v1.1.0 requires sebastian/comparator ^1.2 | ^2.0 | ^2.1 | ^3.0 | ^4.0 | ^5.0 -> found sebastian/comparator[1.2.0, ..., 1.2.4, 2.0.0, ..., 2.1.3, 3.0.0, ..., 3.0.5, 4.0.0, ..., 4.0.8, 5.0.0, 5.0.1] but these were not loaded, likely because it conflicts with another require.
    - northwestern-sysdev/dynamic-forms v1.0.0 requires northwestern-sysdev/lodash-php ^1.0.0 -> satisfiable by northwestern-sysdev/lodash-php[v1.0.0, v1.1.0].
    - Root composer.json requires northwestern-sysdev/dynamic-forms ^1.0 -> satisfiable by northwestern-sysdev/dynamic-forms[v1.0.0].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require northwestern-sysdev/dynamic-forms:*" to figure out if any version is installable, or "composer require northwestern-sysdev/dynamic-forms:^2.1" if you know which you need.

To Reproduce

  1. Install a fresh Laravel project composer create-project laravel/laravel dynamic-form
  2. Go into the directory and install composer dependencies composer install
  3. Install npm npm install
  4. Install the dynamic-forms package as per the docs composer require northwestern-sysdev/dynamic-forms
  5. And it runs into the error above.

Expected behavior
The package should be installed as there are prerequisites fulfilled as per the docs.

**Have you customized the resources/js/formio/defaults.js` file?

  • No
  • Yes (describe changes)

Additional context
Add any other context about the problem here.

Support for Tags component

The tags component is not supported. It would be nice if it were supported.

It seems like this is a very basic tag field that doesn't do any server-side lookups, so it should be easy enough to get it set up.

Use Laravel Storage for file uploads

When we originally implemented S3 file uploads, both Storage and Flysystem's S3 adapter made it hard to access the AWS SDK's S3Client with all the config set up, and these things did not have mechanisms to interact with S3-specific features.

This has been improved in Laravel 9.x and 10.x: the Storage::temporaryUrl() method can probably do everything we need, letting us simplify the file upload code significantly.

UserOnboarding and Documentation

This is a good library but also complex to get started with because the documentation for this is so precise and not well explained

Address component - Add Google Maps support

The address component only supports OpenStreetMaps right now.

Adding support for Google Maps would probably be nice.

  • Come up with a way for a developer to choose OSM vs. Google Maps & specify their Maps API key on the config
  • Communicate the config to the form builder
  • Make it work!

File component - support direct server uploads

To start off, we only support uploads to S3 via pre-signed URLs.

The library should also support the more traditional direct-to-server file upload.

  • Some way for devs to specify what method to use (either in the config or per-form)
  • Communicate this choice to the form builder
  • Add a driver & get it working

JSON Logic Conditional Support

Currently, the library only supports the most basic "if other field is X, show/hide this field" conditional.

I don't think there's a great way to get the pure JS eval stuff working w/ the PHP backend, but the JSON Logic conditionals can probably be made to work.

  • Turn JSON Logic conditionals back on in the Form.io config
  • Implement them server-side (this will probably do most of the work)
  • Make the Lodash functions (e.g. doing sums) that the builder advertises actually work

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.