@evoke-platform/ui-components 1.0.0-dev.256 → 1.0.0-dev.258

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,15 @@ export type CriteriaInputProps = {
27
27
  fetchObject?: (objectId: string) => Promise<EvokeObject | undefined>;
28
28
  object: TreeViewObject;
29
29
  };
30
+ /**
31
+ * String matching operators ('contains', 'beginsWith', 'endsWith') use regex patterns.
32
+ * Special characters like .*+?^${}()|[] are escaped (\\) by default.
33
+ * Set to true to treat these characters as normal text instead.
34
+ * @example
35
+ * // Default: input "hello.*" becomes "hello\.\*" in the query
36
+ * // With disableRegexEscapeChars=true: "hello.*" stays as "hello.*" in the query
37
+ */
38
+ disableRegexEscapeChars?: boolean;
30
39
  };
31
40
  export declare const valueEditor: (props: ValueEditorProps) => JSX.Element;
32
41
  declare const CriteriaBuilder: (props: CriteriaInputProps) => JSX.Element;
@@ -264,7 +264,7 @@ export const valueEditor = (props) => {
264
264
  return ValueEditor(props);
265
265
  };
266
266
  const CriteriaBuilder = (props) => {
267
- const { properties, criteria, setCriteria, originalCriteria, enablePresetValues, presetValues, operators, dynamicContentInput, disabled, disabledCriteria, hideBorder, presetGroupLabel, treeViewOpts, } = props;
267
+ const { properties, criteria, setCriteria, originalCriteria, enablePresetValues, presetValues, operators, dynamicContentInput, disabled, disabledCriteria, hideBorder, presetGroupLabel, treeViewOpts, disableRegexEscapeChars, } = props;
268
268
  const [query, setQuery] = useState(undefined);
269
269
  const [propertyTreeMap, setPropertyTreeMap] = useState({});
270
270
  useEffect(() => {
@@ -332,7 +332,10 @@ const CriteriaBuilder = (props) => {
332
332
  format: 'mongodb',
333
333
  ruleProcessor: (rule, options) => {
334
334
  let newRule = rule;
335
- if (['contains', 'beginsWith', 'endsWith'].includes(rule.operator)) {
335
+ const isPresetValue = typeof rule.value === 'string' && rule.value.startsWith('{{') && rule.value.endsWith('}}');
336
+ if (!disableRegexEscapeChars &&
337
+ ['contains', 'beginsWith', 'endsWith'].includes(rule.operator) &&
338
+ !isPresetValue) {
336
339
  newRule = { ...rule, value: escape(rule.value) };
337
340
  }
338
341
  return defaultRuleProcessorMongoDB(newRule, options);
@@ -199,7 +199,7 @@ export function parseMongoDB(mongoQuery) {
199
199
  }
200
200
  if (regexValue) {
201
201
  // remove escape characters for display
202
- regexValue = regexValue.replace(/\\/g, '');
202
+ regexValue = regexValue.replace(/\\(.)/g, '$1');
203
203
  }
204
204
  return {
205
205
  field: key,
@@ -599,7 +599,7 @@ CriteriaBuilderRelatedObject.args = {
599
599
  id: 'status',
600
600
  name: 'Status',
601
601
  type: 'string',
602
- enum: ['RN', 'NP', 'DNP', 'MA'],
602
+ enum: ['RN', 'NP', 'DNP', 'MA', 'RN (LP)'],
603
603
  required: false,
604
604
  },
605
605
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.0.0-dev.256",
3
+ "version": "1.0.0-dev.258",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",
@@ -29,7 +29,7 @@
29
29
  "prettier:fix": "npm run prettier:cli -- --write",
30
30
  "eslint": "eslint src",
31
31
  "eslint:fix": "npm run eslint -- --fix",
32
- "release": "commit-and-tag-version --prerelease dev -m \"chore(release): v%s [skip ci]\"",
32
+ "release": "commit-and-tag-version --releaseCommitMessageFormat \"chore(release): {{currentTag}} [skip ci]\"",
33
33
  "prepare": "husky install"
34
34
  },
35
35
  "author": "",