iguazio.dashboard-react-controls 2.1.1 → 2.1.3

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.
@@ -54,7 +54,7 @@ const Tooltip = _ref => {
54
54
  setShow(false);
55
55
  };
56
56
  const handleMouseLeave = (0, _react.useCallback)(event => {
57
- if (tooltipRef.current && !tooltipRef.current.contains(event.relatedTarget) && parentRef.current && !parentRef.current.contains(event.relatedTarget) || hidden) {
57
+ if (!tooltipRef.current || hidden || tooltipRef.current && !tooltipRef.current.contains(event.relatedTarget) && parentRef.current && !parentRef.current.contains(event.relatedTarget)) {
58
58
  setShow(false);
59
59
  }
60
60
  }, [hidden]);
package/dist/constants.js CHANGED
@@ -78,6 +78,10 @@ const validation = exports.validation = {
78
78
  LABEL: 'No consecutive characters',
79
79
  NAME: 'noConsecutiveCharacters'
80
80
  },
81
+ NOT_CONTAIN: {
82
+ LABEL: 'Must not contain',
83
+ NAME: 'notContainCharacters'
84
+ },
81
85
  ONLY_AT_THE_BEGINNING: {
82
86
  LABEL: 'Only at the beginning',
83
87
  NAME: 'onlyAtTheBeginning'
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.45 17.9L1 12.45L6.45 7L7.86 8.41L4.83 11.45H19.17L16.14 8.41L17.55 7L23 12.45L17.55 17.9L16.14 16.49L19.17 13.45H4.83L7.86 16.49L6.45 17.9Z" fill="#7F7989"/>
3
+ </svg>
@@ -185,6 +185,13 @@ const generateRule = {
185
185
  pattern: new RegExp('^' + convertedPattern)
186
186
  };
187
187
  },
188
+ notContainCharacters: chars => {
189
+ return {
190
+ name: _constants.validation.NOT_CONTAIN.NAME,
191
+ label: _constants.validation.NOT_CONTAIN.LABEL + ': ' + convertToLabel(chars),
192
+ pattern: new RegExp('^[^' + convertToPattern(chars) + ']+$')
193
+ };
194
+ },
188
195
  maxLengthBetweenDelimiters: (delimiter, maxLength, delimiterDescription) => {
189
196
  return {
190
197
  name: 'labelsLength',
@@ -327,7 +334,7 @@ const validationRules = {
327
334
  value: commonRules.k8sLabels.value
328
335
  },
329
336
  params: {
330
- key: [generateRule.beginEndNotWith('s')],
337
+ key: [generateRule.notContainCharacters('s')],
331
338
  value: [generateRule.beginEndNotWith('s')]
332
339
  },
333
340
  secrets: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iguazio.dashboard-react-controls",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",