Hello,
I'm sorry but I don't really understand how the widget Query is working because of all his files ( Setting, SingleQuerySetting , SortFields , PopupConfig , etc.) and I also don't understand how to use the different dijit...
For exemple, you talked about jimu/dijit/_QueryableLayerSourcePopup which uses jimu/dijit/QueryableLayerSource which uses jimu/dijit/QueryableServiceChooserFromPortal which uses jimu/dijit/ItemSelector but I only found the jimu/dijit/_QueryableLayerSourcePopup in the SingleQuerySetting.js and the Setting.js but I really don't understand how to use and custom it...
In parallel, I tried to use the ItemSelector, that was really simplest to load it in my custom widget, but, connected or not, it didn't want to show my data on my AGOL portal... (you can see it in my last screenshot)
I'm a little disarmed right now...