File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export class Validate {
55 static validateProps ( props : ContainerProps & { isWebModeler ?: boolean } ) : ReactChild {
66 const errorMessages = [ ] ;
77
8- if ( ! window . mx . isOffline ( ) && props . filterBy === "XPath" && ! props . constraint ) {
8+ if ( ( props . isWebModeler || ! 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 ( ! window . mx . isOffline ( ) && props . unCheckedFilterBy === "XPath" && ! props . unCheckedConstraint ) {
17+ if ( ( props . isWebModeler || ! 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 ) {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export class Validate {
66 const errorMessages : string [ ] = [ ] ;
77
88 props . filters . forEach ( ( filter , index ) => {
9- if ( ! window . mx . isOffline ( ) && filter . filterBy === "XPath" && ! filter . constraint ) {
9+ if ( ( props . isWebModeler || ! window . mx . isOffline ( ) ) && filter . filterBy === "XPath" && ! filter . constraint ) {
1010 errorMessages . push ( `Filter position: {${ index + 1 } } is missing XPath constraint` ) ;
1111 }
1212 if ( filter . filterBy === "attribute" && ! filter . attribute ) {
@@ -15,10 +15,10 @@ export class Validate {
1515 if ( filter . filterBy === "attribute" && ! filter . attributeValue ) {
1616 errorMessages . push ( `Filter position: {${ index + 1 } } 'Attribute value' is required` ) ;
1717 }
18- if ( ! window . mx . isOffline ( ) && ! props . isWebModeler && filter . filterBy === "XPath" && filter . constraint . indexOf ( "[%CurrentObject%]'" ) > - 1 && ! props . mxObject ) {
18+ if ( ( props . isWebModeler || ! window . mx . isOffline ( ) ) && ! props . isWebModeler && filter . filterBy === "XPath" && filter . constraint . indexOf ( "[%CurrentObject%]'" ) > - 1 && ! props . mxObject ) {
1919 errorMessages . push ( `Filter position: {${ index + 1 } } is XPath constraint, requires a context object` ) ;
2020 }
21- if ( window . mx . isOffline ( ) ) {
21+ if ( ! props . isWebModeler && window . mx . isOffline ( ) ) {
2222 if ( filter . filterBy === "attribute" && filter . attribute && filter . attribute . indexOf ( "/" ) > - 1 ) {
2323 errorMessages . push ( `Filter position: {${ index + 1 } } 'Attribute' over reference is not supported in offline mode` ) ;
2424 }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export class Validate {
55 static validateProps ( props : ContainerProps & { isWebModeler ?: boolean } ) : ReactChild {
66 const errorMessages : string [ ] = [ ] ;
77
8- if ( window . mx . isOffline ( ) ) {
8+ if ( ! props . isWebModeler && window . mx . isOffline ( ) ) {
99 props . attributeList . forEach ( ( searchAttribute , index ) => {
1010 if ( searchAttribute . attribute . indexOf ( "/" ) > - 1 ) {
1111 errorMessages . push ( `'Search attribute' at position {${ index + 1 } } over reference is not supported in offline application` ) ;
You can’t perform that action at this time.
0 commit comments