cal/packages/app-store/routing-forms/lib
jemiluv8 e7ddcf23a3
fix: Route Builder rules should be case insensitive (#9040)
* override jsonLogic operators on string operands to allow for case insensitive comparisons.

Affected Operators: "==", "===", "!=", "!==", "in"

* disable no-explicit-any on jsonLogicOverrides file since most of the code there will be from jsonLogic and may not meet our coding style.

Majority of overrides require us to copy over functions and their signatures from jsonLogic and then modify their implementation.

The signature of functions implementing most operators take the operands typed as "any", which is intended, but doesn't adhere to our coding style. Hence the need to override the eslint rule

* run linter to fix issues

* Fix bug in in operator when second arg is an array

* remove redundant indexOf check on overriden jsonLogic "in" operator.

Note: this deviates from the original implementation in the jsonLogic library because our current useage ensures that the second operand is always a string or string[] and will therefore always have .index function. Whenever our invariants change in the future, make sure to modify this implementation to prevent any unexpected

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2023-05-26 12:16:39 +00:00
..
createFallbackRoute.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
getConnectedForms.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
getFieldIdentifier.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
getQueryBuilderConfig.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
getSerializableForm.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
InitialConfig.tsx Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
isFallbackRoute.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
isFormEditAllowed.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
isRouter.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
isRouterLinkedField.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00
jsonLogicOverrides.ts fix: Route Builder rules should be case insensitive (#9040) 2023-05-26 12:16:39 +00:00
processRoute.tsx fix: Route Builder rules should be case insensitive (#9040) 2023-05-26 12:16:39 +00:00
RoutingPages.ts Move routing forms outside of ee and use LicenseRequired component instead. (#7639) 2023-03-09 22:58:02 +00:00