Skip to content

Conversation

@ecanchev-jaspersoft
Copy link
Member

This PR adds the feature for having cascading input controls.
PR-gif

Additionally, the jv-tools package accepts an object when using the useVisualize custom hook to provide the server and the context path:

const vContainer = useVisualize(
    {
      server: "https://mobiledemo.jaspersoft.com",
      contextPath: "/jasperserver-pro",
    },
    myAuth,
    { errorCallback },
  );

this will add the server property to the vObject:
PR

add reducer to manage the state of the input controls
…and put everything inside events.change because the updates happens on the state now.
… has slaveDependencies.

The work is not done yet, having issues with the reducer and the local state of each component.
…xt API.

it also includes the work for avoiding duplication of the request for the same chain of input controls
missing: to make all slave dependencies to behave the same way as the immediate slave dependency
…on for single input controls so that the user can know if the value is okay or not
… logic for updating the options for single and multi select input control
…change method multiple times for single and multi select input control
…use the cascading feature was added to Single and Multi Select input controls, hence the other Input Controls had to be updated.

- This commit adds the changes for Boolean, and SingleValueText
- Changes on MultiSelect, and SingleSelect Input control are for removing params that need to be put on a more general interface.
…ted in order to store the values in the store.
…een updated in order to store the values in the store.
…ted in order to store the values in the store.
… (cascading feature). The main feature of the cascading feature for this IC is already tested on the useChangeCallback test
…es for the context/dispatch (cascading feature).
…new changes for the context/dispatch (cascading feature).
ecanchev-jaspersoft and others added 15 commits December 19, 2024 16:50
…changes for the context/dispatch (cascading feature).
…nges for the context/dispatch (cascading feature).
…ges for the context/dispatch (cascading feature).
…or the context/dispatch (cascading feature).
… the values from the server for cascading feature
…urn the same options for different scenarios
…rendering

This will fix the tests and the first rendering (no error in the browser console)
@yplakosh-jaspersoft
Copy link
Contributor

I propose to merge server and contextPath properties into one server property.

@ecanchev-jaspersoft
Copy link
Member Author

ecanchev-jaspersoft commented Dec 26, 2024

I propose to merge server and contextPath properties into one server property.

both properties have been merged.
Now, the useVisualize hook will accept:

const vContainer = useVisualize(
   {
     server: "https://mobiledemo.jaspersoft.com/jasperserver-pro",
     visualizePath:
       "https://mobiledemo.jaspersoft.com/jasperserver-pro/client/visualize.js",
     auth: {...},
   },
   { errorCallback },
 );

even publicPath is accepted. However this is optional. In case of visualizePath points to CDN server, publicPath should also be set by user.
if publicPath is not set, viz.js doesn't know where to load the chunks.

@ecanchev-jaspersoft ecanchev-jaspersoft merged commit 16ae1cc into main Jan 4, 2025
3 checks passed
@ecanchev-jaspersoft ecanchev-jaspersoft deleted the cascading-ics branch January 4, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants