oolib 2.29.1 → 2.29.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.
@@ -5,9 +5,10 @@ export function PasswordInput({ enableValidation, ...props }: {
5
5
  }): any;
6
6
  export function EmailInput(props: any): any;
7
7
  export function PhoneInput(props: any): any;
8
- export function URLInput({ routesAreValidInputs, validationPlugin, ...props }: {
8
+ export function URLInput({ routesAreValidInputs, validationPlugin, validateOnMount, ...props }: {
9
9
  [x: string]: any;
10
10
  routesAreValidInputs?: boolean;
11
11
  validationPlugin: any;
12
+ validateOnMount: any;
12
13
  }): any;
13
14
  export function NumberInput(props: any): any;
@@ -215,7 +215,7 @@ var PhoneInput = function (props) {
215
215
  exports.PhoneInput = PhoneInput;
216
216
  var URLInput = function (_a) {
217
217
  var _b = _a.routesAreValidInputs, routesAreValidInputs = _b === void 0 ? false : _b, //if we want react route declarations to be considered as 'valid' then set this to true
218
- validationPlugin = _a.validationPlugin, props = __rest(_a, ["routesAreValidInputs", "validationPlugin"]);
218
+ validationPlugin = _a.validationPlugin, validateOnMount = _a.validateOnMount, props = __rest(_a, ["routesAreValidInputs", "validationPlugin", "validateOnMount"]);
219
219
  var handleValidation = function (value) { return __awaiter(void 0, void 0, void 0, function () {
220
220
  var pluginResponse, response, err_1;
221
221
  return __generator(this, function (_a) {
@@ -257,6 +257,11 @@ var URLInput = function (_a) {
257
257
  }
258
258
  });
259
259
  }); };
260
+ (0, react_1.useEffect)(function () {
261
+ if (value && validateOnMount) {
262
+ handleValidation(value);
263
+ }
264
+ }, [validateOnMount, value]);
260
265
  return (react_1.default.createElement(exports.TextInput, __assign({ type: "url", validateOnBlur: handleValidation, placeholder: "Enter a valid url..." }, props)));
261
266
  };
262
267
  exports.URLInput = URLInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.29.1",
3
+ "version": "2.29.3",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",