@@ -5,7 +5,7 @@ export class Validate {
55 static validateProps ( props : ContainerProps & { isWebModeler ?: boolean } ) : ReactChild {
66 const errorMessages = [ ] ;
77
8- if ( props . filterBy === "XPath" && ! props . constraint ) {
8+ if ( ! window . mx . isOffline ( ) && props . filterBy === "XPath" && ! props . constraint ) {
99 errorMessages . push ( "The checked 'XPath constraint' is required when 'Filter by' is set to 'XPath'" ) ;
1010 }
1111 if ( props . filterBy === "attribute" && ! props . attribute ) {
@@ -14,7 +14,7 @@ export class Validate {
1414 if ( props . filterBy === "attribute" && ! props . attributeValue ) {
1515 errorMessages . push ( "The checked 'Attribute value' is required when 'Filter by' is set to 'Attribute'" ) ;
1616 }
17- if ( props . unCheckedFilterBy === "XPath" && ! props . unCheckedConstraint ) {
17+ if ( ! window . mx . isOffline ( ) && props . unCheckedFilterBy === "XPath" && ! props . unCheckedConstraint ) {
1818 errorMessages . push ( "The unchecked 'XPath constraint' is required when 'Filter by' is set to 'XPath'" ) ;
1919 }
2020 if ( props . unCheckedFilterBy === "attribute" && ! props . unCheckedAttribute ) {
@@ -24,11 +24,19 @@ export class Validate {
2424 errorMessages . push ( "The unchecked 'Attribute value' is required when 'Filter by' is set to 'Attribute'" ) ;
2525 }
2626 if ( ! props . isWebModeler ) {
27- if ( window . mx . isOffline ( ) && props . filterBy === "XPath" ) {
28- errorMessages . push ( "The checked 'Filter by' 'XPath' is not supported for offline application" ) ;
29- }
30- if ( window . mx . isOffline ( ) && props . unCheckedFilterBy === "XPath" ) {
31- errorMessages . push ( "The unchecked 'Filter by' 'XPath' is not supported for offline application" ) ;
27+ if ( window . mx . isOffline ( ) ) {
28+ if ( props . filterBy === "XPath" ) {
29+ errorMessages . push ( "The checked 'Filter by' 'XPath' is not supported for offline application" ) ;
30+ }
31+ if ( props . filterBy === "attribute" && props . attribute . indexOf ( "/" ) > - 1 ) {
32+ errorMessages . push ( `The checked 'Filter by' 'Attribute' over reference is not supported for offline application` ) ;
33+ }
34+ if ( props . unCheckedFilterBy === "XPath" ) {
35+ errorMessages . push ( "The unchecked 'Filter by' 'XPath' is not supported for offline application" ) ;
36+ }
37+ if ( props . unCheckedFilterBy === "attribute" && props . unCheckedAttribute . indexOf ( "/" ) > - 1 ) {
38+ errorMessages . push ( `The unchecked 'Filter by' 'Attribute' over reference is not supported for offline application` ) ;
39+ }
3240 }
3341 if ( ! props . mxObject && props . filterBy === "XPath" && props . constraint . indexOf ( "[%CurrentObject%]'" ) > - 1 ) {
3442 errorMessages . push ( "The checked 'XPath constraint', requires a context object" ) ;
0 commit comments