mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-4797] - fix null value for display text when the field it's not visible (#4987)
* fix reset display text value when it's not visible * change invalid unit test * change unit test * use alpha to test
This commit is contained in:
parent
a8ef686cdd
commit
f9a8d3a4bf
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Alfresco-ADF-Angular-Demo",
|
||||
"description": "Demo shell for Alfresco Angular components",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-cli",
|
||||
"description": "Alfresco ADF cli and utils",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"bin": {
|
||||
"adf-license": "./bin/doc/licenseList.js",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-content-services",
|
||||
"description": "Alfresco ADF content services",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-content-services.js",
|
||||
"repository": {
|
||||
@ -27,7 +27,7 @@
|
||||
"@angular/router": ">=7.0.3",
|
||||
"@alfresco/js-api": "3.4.0",
|
||||
"rxjs": ">=6.2.2",
|
||||
"@alfresco/adf-core": "3.4.0",
|
||||
"@alfresco/adf-core": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@ngx-translate/core": ">=11.0.0",
|
||||
"hammerjs": ">=2.0.8",
|
||||
"moment": ">=2.22.2",
|
||||
|
@ -530,7 +530,7 @@ describe('WidgetVisibilityCloudService', () => {
|
||||
expect(fakeFormField.isVisible).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should reset value when the field is not visibile', () => {
|
||||
it('should notreset value when the field is not visibile', () => {
|
||||
visibilityObjTest.leftValue = 'test_1';
|
||||
visibilityObjTest.operator = '==';
|
||||
visibilityObjTest.rightType = WidgetTypeEnum.field;
|
||||
@ -539,7 +539,7 @@ describe('WidgetVisibilityCloudService', () => {
|
||||
|
||||
service.refreshEntityVisibility(fakeFormField);
|
||||
expect(fakeFormField.isVisible).toBeFalsy();
|
||||
expect(fakeFormField.value).toEqual(null);
|
||||
expect(fakeFormField.value).toEqual('FAKE_FORM_FIELD_VALUE');
|
||||
});
|
||||
|
||||
it('should return true when the visibility condition is not valid', () => {
|
||||
|
@ -914,7 +914,7 @@ describe('WidgetVisibilityService', () => {
|
||||
expect(contModel.isVisible).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should set null value when the field is not visibile', () => {
|
||||
it('should not set null value when the field is not visibile', () => {
|
||||
visibilityObjTest.leftFormFieldId = 'test_4';
|
||||
visibilityObjTest.operator = '!=';
|
||||
visibilityObjTest.rightFormFieldId = 'dropdown';
|
||||
@ -922,7 +922,7 @@ describe('WidgetVisibilityService', () => {
|
||||
|
||||
service.refreshEntityVisibility(fakeFormField);
|
||||
expect(fakeFormField.isVisible).toBeFalsy();
|
||||
expect(fakeFormField.value).toEqual(null);
|
||||
expect(fakeFormField.value).toEqual('FAKE_FORM_FIELD_VALUE');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -48,9 +48,6 @@ export class WidgetVisibilityService {
|
||||
|
||||
refreshEntityVisibility(element: FormFieldModel | TabModel) {
|
||||
const visible = this.evaluateVisibility(element.form, element.visibilityCondition);
|
||||
if (!visible && element instanceof FormFieldModel) {
|
||||
element.value = null;
|
||||
}
|
||||
element.isVisible = visible;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-core",
|
||||
"description": "Alfresco ADF core",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-core.js",
|
||||
"repository": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-extensions",
|
||||
"description": "Provides extensibility support for ADF applications.",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"license": "Apache-2.0",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-extensions.js",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-insights",
|
||||
"description": "Alfresco ADF insights",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-insights.js",
|
||||
"repository": {
|
||||
@ -27,8 +27,8 @@
|
||||
"@angular/router": ">=7.0.3",
|
||||
"@alfresco/js-api": "3.4.0",
|
||||
"rxjs": ">=6.2.2",
|
||||
"@alfresco/adf-core": "3.4.0",
|
||||
"@alfresco/adf-content-services": "3.4.0",
|
||||
"@alfresco/adf-core": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-content-services": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@ngx-translate/core": ">=11.0.0",
|
||||
"chart.js": ">=2.5.0",
|
||||
"core-js": ">=2.5.4",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-process-services-cloud",
|
||||
"description": "Alfresco ADF process services cloud",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-process-services-cloud.js",
|
||||
"repository": {
|
||||
@ -27,8 +27,8 @@
|
||||
"@angular/router": ">=7.0.3",
|
||||
"@alfresco/js-api": "3.4.0",
|
||||
"rxjs": ">=6.2.2",
|
||||
"@alfresco/adf-core": "3.4.0",
|
||||
"@alfresco/adf-content-services": "3.4.0",
|
||||
"@alfresco/adf-core": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-content-services": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@ngx-translate/core": ">=11.0.0",
|
||||
"hammerjs": ">=2.0.8",
|
||||
"moment": ">=2.22.2",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-process-services",
|
||||
"description": "Alfresco ADF process services",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "bundles/adf-process-services.js",
|
||||
"repository": {
|
||||
@ -27,8 +27,8 @@
|
||||
"@angular/router": ">=7.0.3",
|
||||
"@alfresco/js-api": "3.4.0",
|
||||
"rxjs": ">=6.2.2",
|
||||
"@alfresco/adf-core": "3.4.0",
|
||||
"@alfresco/adf-content-services": "3.4.0",
|
||||
"@alfresco/adf-core": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-content-services": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@ngx-translate/core": ">=11.0.0",
|
||||
"core-js": ">=2.5.4",
|
||||
"hammerjs": ">=2.0.8",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@alfresco/adf-testing",
|
||||
"description": "Alfresco ADF testing page and utils",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
16
package.json
16
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "alfresco-components",
|
||||
"description": "Alfresco Angular components",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "./index.js",
|
||||
"scripts": {
|
||||
@ -73,13 +73,13 @@
|
||||
"process services-cloud"
|
||||
],
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": "3.4.0",
|
||||
"@alfresco/adf-core": "3.4.0",
|
||||
"@alfresco/adf-extensions": "3.4.0",
|
||||
"@alfresco/adf-insights": "3.4.0",
|
||||
"@alfresco/adf-process-services": "3.4.0",
|
||||
"@alfresco/adf-process-services-cloud": "3.4.0",
|
||||
"@alfresco/adf-testing": "3.4.0",
|
||||
"@alfresco/adf-content-services": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-core": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-extensions": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-insights": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-process-services": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-process-services-cloud": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/adf-testing": "3.4.0-a8ef686cddc5364975fbddba68e6683305f47d42",
|
||||
"@alfresco/js-api": "3.4.0",
|
||||
"@angular/animations": "^7.2.15",
|
||||
"@angular/cdk": "7.3.7",
|
||||
|
Loading…
x
Reference in New Issue
Block a user