Hi, I am trying to make a copy of the Analysis widget that comes with v1.13 of Experience Builder Developer Edition. The workflow is as follows, and we have no issues making copies of the sample widget or the map widget using these steps.
For other widgets after this step it will detect them and they will be available in the builder once that's started. However for the Analysis widget I'm getting 16 errors during the client's start, related to dependencies. Most of these dependencies seem to have names matching folders in this location: client\dist\arcgis-amd-packages, but not all of them.
The default Analysis widget that comes with ExB works fine, so the dependencies must be available somehow.
I've tried reaching out to Esri Canada support with this as a case but was turned away for an unsupported workflow, and they linked me to the guide on how to create a custom widget. I'd rather not recreate the Analysis/GP widget from scratch.
@JoeRogan just wanting to confirm you've followed these exact steps?
1. copy the Analysis widget into the client>your-extensions>widgets folder
2. rename the Analysis widget, also update the manifest (I think you had this right)
Example: Create a starter widget | ArcGIS Experience Builder | ArcGIS Developers
Hi @AlixVezina , thank you for the response.
I had not tried that yet as this wasn't necessary when duplicating the map or layer list widgets for customizations. That command does run successfully, but doesn't provide me with an update src folder for the widget where I could start my customizations. I tried running npm run build:dev to see what happens, and it results in the same 16 missing modules errors.
I'm adding a screenshot of what I see with the widget.tsx file open, this shows a few of the broken dependencies with red underline as well as the errors in the console at the bottom.
Sorry @JoeRogan I had corrected my post after sharing it and it must not have come through. My main question was: how are you adding the Analysis widget as a custom widget?
I believe the steps should be to add the Analysis widget into the client > your-extensions > widgets folder and then rename it.
CCing @WeiYing1 for any specific requirements to customize the Analysis widget.
Is your name in the manifest.json "analysis-sar"? The name in the manifest.json must exactly match the folder name for the widget to compile correctly. (Your original post indicates you named it "analysis-custom".)
Yes I have renamed both the folder and name in the manifest to analysis-sar, they match. The widget is in my client > your-extensions folder. I've successfully done this with other widgets, its just the Analysis widget that doesn't seem to work. A coworker has reproduced the issues on their machine too.
What I don't understand are how the modules are loaded for the Analysis widget in the core of ExB, the widget clearly works there. As a test I am taking one of the first lines that doesn't work and just loading it into the super basic sample widget. The line is:
Hi @JoeRogan ,
Thanks for your feedback! Unfortunately you may not copy Analysis widget like other widget. Because an Esri priviate library is referenced in the Analysis widget. So it is as expected to see errors. So far we cannot open access to this private library. So it is not support if you would like develop a custom widget coping from Analysis widget.
If there are any features you would like to added to Analysis widget, we are happy to hear about your story and investigate the possibility to enhance the widget.
Thanks,
Wei
That's an alarming practice from Esri. What exactly is a "Esri private library" and why is Esri preventing its paying customers from accessing the tools and functions that we've paid for? Can you provide a complete list of what widgets are considered "private Esri widgets?"
Hi @AValenski
Thanks for your question. And sorry for unclear explanation.
The Analysis widget is not a private widget. The Analysis functionalities are open to public users for sure. However it does not allow you to directly access the code of the widget implementation. The private library means it is a library for internal use across Esri teams to develop functionalities, where the code is not exposed to public users and I believe that is understandable.
However in future we may expose these kind of components/library to public users to help them develop their own functionalities. But the project is not ready yet.
Thanks,
Wei