Releases: nvxdm/strapi-plugin-remote-select
Releases · nvxdm/strapi-plugin-remote-select
v5.0.0
Breaking Changes
- Version scheme: Major version now matches Strapi major version. Jumped from 2.x to 5.0.0 to align with Strapi 5.
- Replaced
lodash-eswithmicromustache: Template syntax for option labels changed from lodash templates (<%= field %>) to mustache-style ({{ field }}). Supports dot-path access for nested properties (e.g.,{{ address.city }}). - Search placeholder changed: The
{q}placeholder in URLs/bodies is now{{ q }}, consistent with the mustache template syntax used everywhere else.
Added
- Presets system: Define reusable fetch configurations in
config/plugins.jsunderremote-select.presets. Presets encapsulate URL, method, headers, body, and mapping — so content editors just pick a preset name instead of configuring each field manually.- New
GET /remote-select/presetsendpoint returns available preset names. - Preset selector dropdown in the admin field configuration UI (auto-populated from server config). Falls back to a free-text input if presets can't be loaded.
- Server-side preset resolution with variable and search substitution.
- New
PresetFetchOptionsSchemayup validation for preset-based requests.
- New
RemoteSelectPluginOptionstype export from the server entry point, allowing typed plugin configuration in consumer projects.fetchPresetNamesutility: Synchronous XHR call during admin plugin registration to load preset names for the field configuration UI.
Changed
- Refactored
OptionsProxyService: Complete rewrite. Now handles both custom and preset configs, with clearer separation of concerns (variable substitution, header parsing, option label/value extraction, deduplication). - Refactored admin components (
RemoteSelect.tsx,SearchableRemoteSelect.tsx): Both now build request bodies conditionally based on whether a preset or custom config is used. Searchable select delegates{{ q }}substitution to the server for presets. - Replaced
lodash-esdebounce inSearchableRemoteSelectwith a simplesetTimeout/clearTimeoutpattern, removing thelodash-esdependency entirely. - Improved validation schema:
RemoteSelectFetchOptions.schema.tsnow validatesmethodfield and includessearchparameter. Added separatePresetFetchOptionsSchemafor preset-based requests. - Updated
getRemoteSelectRegisterOptions: Now acceptspresetNamesparameter to dynamically build the preset selector. Added "Configuration preset" section to the field settings UI. - Cleaned up dependencies: Removed
lodash-esand@types/lodash-es. Addedmicromustacheas a runtime dependency. - Server config default now includes
presets: {}alongsidevariables: {}. - Updated
README.md: Documentation reflects new template syntax, preset system, and updated configuration examples.
Removed
lodash-esdependency: Replaced entirely bymicromustachefor templates and nativesetTimeoutfor debounce.server/src/services/service.ts: Removed unused legacy service file.
2.0.4
1.0.8
Add support for dynamic variables in API requests
Introduced the ability to use configurable variables in API URLs, headers, and bodies for the remote-select plugin. Updated relevant service methods, configuration, and documentation to support this feature. Minor type and field adjustments were also applied for better consistency.