APIv4 - Add `nullable` property to getFields; improve SearchKit editable UX
authorColeman Watts <coleman@civicrm.org>
Mon, 3 Jan 2022 16:48:37 +0000 (11:48 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 26 Jan 2022 15:00:28 +0000 (10:00 -0500)
commitf8d39baf91d81e4f668a08e7c8a066e0616fb9da
tree8c7709705c9d3d9aba7facc7a655602cf998ea51
parenta90c3874d6ea74017dd038cc64d952afe99a1981
APIv4 - Add `nullable` property to getFields; improve SearchKit editable UX

Unlike the 'required' field property, which only determines if the API requires a value to Create,
the 'nullable' property tells a UI whether a field is allowed to be set to NULL in Create OR Update.

SearchKit uses this property during in-place edit and bulk edit operations to determine whether a
field can be left blank.
20 files changed:
Civi/Api4/Generic/BasicGetFieldsAction.php
Civi/Api4/Service/Spec/FieldSpec.php
Civi/Api4/Service/Spec/SpecFormatter.php
Civi/Api4/Service/Spec/SpecGatherer.php
ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php
ext/search_kit/Civi/Search/Admin.php
ext/search_kit/ang/crmSearchDisplay/crmSearchDisplayEditable.component.js
ext/search_kit/ang/crmSearchDisplay/crmSearchDisplayEditable.html
ext/search_kit/ang/crmSearchTasks/crmSearchInput/date.html
ext/search_kit/ang/crmSearchTasks/crmSearchInput/float.html
ext/search_kit/ang/crmSearchTasks/crmSearchInput/integer.html
ext/search_kit/ang/crmSearchTasks/crmSearchInput/select.html
ext/search_kit/ang/crmSearchTasks/crmSearchInput/text.html
ext/search_kit/ang/crmSearchTasks/crmSearchTaskUpdate.ctrl.js
ext/search_kit/ang/crmSearchTasks/crmSearchTaskUpdate.html
ext/search_kit/ang/crmSearchTasks/crmSearchTasks.component.js
ext/search_kit/css/crmSearchAdmin.css
ext/search_kit/css/crmSearchDisplay.css
tests/phpunit/api/v4/Action/BasicCustomFieldTest.php
tests/phpunit/api/v4/Action/GetFieldsTest.php