@descope/flow-components 2.2.53 → 2.2.55

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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "2.2.53",
8
+ "buildVersion": "2.2.55",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -28,7 +28,7 @@
28
28
  {
29
29
  "id": "flowComponents:react",
30
30
  "name": "react",
31
- "version": "19.2.3",
31
+ "version": "19.2.4",
32
32
  "singleton": true,
33
33
  "requiredVersion": ">= 18",
34
34
  "assets": {
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "2.2.53",
8
+ "buildVersion": "2.2.55",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -31,7 +31,7 @@
31
31
  "shareScope": "default",
32
32
  "import": false,
33
33
  "name": "react",
34
- "version": "19.2.3",
34
+ "version": "19.2.4",
35
35
  "eager": false,
36
36
  "id": "flowComponents:react",
37
37
  "assets": {
package/dist/index.cjs.js CHANGED
@@ -82506,6 +82506,19 @@ function requireIndex_cjs () {
82506
82506
  }
82507
82507
  };
82508
82508
 
82509
+ const inputOverrideValidConstraintsMixin$1 = (superclass) =>
82510
+ class InputOverrideValidConstraintsMixinClass extends superclass {
82511
+ init() {
82512
+ super.init?.();
82513
+
82514
+ // vaadin uses `validConstraints` (required, pattern, minlength, maxlength) to determine if it should validate
82515
+ // the input or not. We want to override this behavior, so we can enforce validation even if these attributes are not present.
82516
+ if (this.baseElement._hasValidConstraints) {
82517
+ this.baseElement._hasValidConstraints = () => true;
82518
+ }
82519
+ }
82520
+ };
82521
+
82509
82522
  const getFileExtension = (path) => {
82510
82523
  const match = path.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i);
82511
82524
  return match ? match[1] : null;
@@ -87757,7 +87770,7 @@ descope-enriched-text {
87757
87770
  const ComboBoxMixin = (superclass) =>
87758
87771
  class ComboBoxMixinClass extends superclass {
87759
87772
  static get observedAttributes() {
87760
- return ['label-type'];
87773
+ return ['label-type', 'require-match'];
87761
87774
  }
87762
87775
 
87763
87776
  // eslint-disable-next-line class-methods-use-this
@@ -87829,6 +87842,10 @@ descope-enriched-text {
87829
87842
  }
87830
87843
  }
87831
87844
 
87845
+ get requireMatch() {
87846
+ return this.getAttribute('require-match') === 'true' && !this.allowCustomValue;
87847
+ }
87848
+
87832
87849
  // eslint-disable-next-line class-methods-use-this
87833
87850
  isValidDataType(data) {
87834
87851
  const isValid = Array.isArray(data);
@@ -87981,16 +87998,27 @@ descope-enriched-text {
87981
87998
  }
87982
87999
  }
87983
88000
 
88001
+ isValueMatch() {
88002
+ return this.baseElement.items.some(val => val.getAttribute('data-id') === this.baseElement.querySelector('input').value);
88003
+ }
88004
+
87984
88005
  init() {
87985
88006
  super.init?.();
87986
88007
 
87987
88008
  // eslint-disable-next-line func-names
87988
88009
  this.getValidity = function () {
88010
+ if (this.requireMatch && !this.isValueMatch()) {
88011
+ return {
88012
+ patternMismatch: true,
88013
+ };
88014
+ }
88015
+
87989
88016
  if (!this.value && this.isRequired) {
87990
88017
  return {
87991
88018
  valueMissing: true,
87992
88019
  };
87993
88020
  }
88021
+
87994
88022
  return {};
87995
88023
  };
87996
88024
 
@@ -88042,6 +88070,10 @@ descope-enriched-text {
88042
88070
  }
88043
88071
  }
88044
88072
 
88073
+ handleRequireMatchChange(shouldValidate) {
88074
+ this.baseElement.allowCustomValue = shouldValidate || this.allowCustomValue;
88075
+ }
88076
+
88045
88077
  attributeChangedCallback(attrName, oldValue, newValue) {
88046
88078
  super.attributeChangedCallback?.(attrName, oldValue, newValue);
88047
88079
 
@@ -88052,6 +88084,8 @@ descope-enriched-text {
88052
88084
  } else {
88053
88085
  this.removeEventListener('click', this.onLabelClick);
88054
88086
  }
88087
+ } else if (attrName === 'require-match') {
88088
+ this.handleRequireMatchChange(newValue === 'true');
88055
88089
  }
88056
88090
  }
88057
88091
  }
@@ -88349,6 +88383,7 @@ descope-enriched-text {
88349
88383
  proxyProps: ['selectionStart'],
88350
88384
  inputEvent: 'value-changed',
88351
88385
  }),
88386
+ inputOverrideValidConstraintsMixin$1,
88352
88387
  componentNameValidationMixin$1,
88353
88388
  ComboBoxMixin,
88354
88389
  )(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "2.2.53",
3
+ "version": "2.2.55",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -78,8 +78,8 @@
78
78
  "postcss": "^8.4.14",
79
79
  "prettier": "3.8.1",
80
80
  "pretty-quick": "^4.0.0",
81
- "react": "19.2.3",
82
- "react-dom": "19.2.3",
81
+ "react": "19.2.4",
82
+ "react-dom": "19.2.4",
83
83
  "rollup": "^4.0.0",
84
84
  "rollup-plugin-auto-external": "^2.0.0",
85
85
  "rollup-plugin-copy": "^3.4.0",
@@ -96,7 +96,7 @@
96
96
  "webpack-dev-server": "5.2.3"
97
97
  },
98
98
  "dependencies": {
99
- "@descope/web-components-ui": "2.2.53"
99
+ "@descope/web-components-ui": "2.2.55"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "react": ">= 18"