react-hook-core 0.1.10 → 0.1.12

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.
package/lib/components.js CHANGED
@@ -833,27 +833,54 @@ var BaseEditComponent = (function (_super) {
833
833
  }
834
834
  };
835
835
  BaseEditComponent.prototype.fail = function (result) {
836
- var errors = result.errors;
837
836
  var f = this.form;
838
837
  var u = this.ui;
839
- if (u && f) {
840
- var unmappedErrors = u.showFormError(f, errors);
841
- if (!result.message) {
842
- if (errors && errors.length === 1) {
843
- result.message = errors[0].message;
838
+ if (Array.isArray(result)) {
839
+ if (u && f) {
840
+ var unmappedErrors = u.showFormError(f, result);
841
+ formutil_1.focusFirstError(f);
842
+ if (unmappedErrors && unmappedErrors.length > 0) {
843
+ var t = this.resourceService.value('error');
844
+ if (u && u.buildErrorMessage) {
845
+ var msg = u.buildErrorMessage(unmappedErrors);
846
+ this.showError(msg, t);
847
+ }
848
+ else {
849
+ this.showError(unmappedErrors[0].field + ' ' + unmappedErrors[0].code + ' ' + unmappedErrors[0].message, t);
850
+ }
851
+ }
852
+ }
853
+ else {
854
+ var t = this.resourceService.value('error');
855
+ if (result.length > 0) {
856
+ this.showError(result[0].field + ' ' + result[0].code + ' ' + result[0].message, t);
844
857
  }
845
858
  else {
846
- result.message = u.buildErrorMessage(unmappedErrors);
859
+ this.showError(t, t);
847
860
  }
848
861
  }
849
- formutil_1.focusFirstError(f);
850
862
  }
851
- else if (errors && errors.length === 1) {
852
- result.message = errors[0].message;
853
- }
854
- if (result.message) {
855
- var t = this.resourceService.value('error');
856
- this.showError(result.message, t);
863
+ else {
864
+ var errors = result.errors;
865
+ if (u && f) {
866
+ var unmappedErrors = u.showFormError(f, errors);
867
+ if (!result.message) {
868
+ if (errors && errors.length === 1) {
869
+ result.message = errors[0].message;
870
+ }
871
+ else {
872
+ result.message = u.buildErrorMessage(unmappedErrors);
873
+ }
874
+ }
875
+ formutil_1.focusFirstError(f);
876
+ }
877
+ else if (errors && errors.length === 1) {
878
+ result.message = errors[0].message;
879
+ }
880
+ if (result.message) {
881
+ var t = this.resourceService.value('error');
882
+ this.showError(result.message, t);
883
+ }
857
884
  }
858
885
  };
859
886
  BaseEditComponent.prototype.postSave = function (res, backOnSave) {
@@ -864,7 +891,10 @@ var BaseEditComponent = (function (_super) {
864
891
  var successMsg = (newMod ? this.insertSuccessMsg : this.updateSuccessMsg);
865
892
  var x = res;
866
893
  var r = this.resourceService;
867
- if (!isNaN(x)) {
894
+ if (Array.isArray(x)) {
895
+ this.fail(x);
896
+ }
897
+ else if (!isNaN(x)) {
868
898
  if (x === st.success) {
869
899
  this.succeed(successMsg, backOnSave);
870
900
  }
package/lib/core.js CHANGED
@@ -132,17 +132,22 @@ function buildId(p, keys) {
132
132
  return id;
133
133
  }
134
134
  exports.buildId = buildId;
135
- function dateToDefaultString(date) {
136
- return '' + date.getFullYear() + '-' + addZero(date.getMonth() + 1, 2) + '-' + addZero(date.getDate(), 2);
137
- }
138
- exports.dateToDefaultString = dateToDefaultString;
139
- function addZero(val, num) {
140
- var v = val.toString();
141
- while (v.length < num) {
142
- v = '0' + v;
143
- }
144
- return v.toString();
145
- }
135
+ exports.datetimeToString = function (inputDate) {
136
+ var date = new Date(inputDate);
137
+ var year = date.getFullYear();
138
+ var month = String(date.getMonth() + 1).padStart(2, '0');
139
+ var day = String(date.getDate()).padStart(2, '0');
140
+ var hours = String(date.getHours()).padStart(2, '0');
141
+ var minutes = String(date.getMinutes()).padStart(2, '0');
142
+ var seconds = String(date.getSeconds()).padStart(2, '0');
143
+ return year + "-" + month + "-" + day + "T" + hours + ":" + minutes + ":" + seconds;
144
+ };
145
+ exports.dateToString = function (inputDate) {
146
+ var year = inputDate.getFullYear();
147
+ var month = String(inputDate.getMonth() + 1).padStart(2, '0');
148
+ var day = String(inputDate.getDate()).padStart(2, '0');
149
+ return year + "-" + month + "-" + day;
150
+ };
146
151
  function initForm(form, initMat) {
147
152
  if (form) {
148
153
  setTimeout(function () {
package/lib/route.js CHANGED
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var qs = require("query-string");
4
- function navigate(history, stateTo) {
5
- history.push(stateTo);
6
- }
7
- exports.navigate = navigate;
8
4
  function buildFromUrl() {
9
5
  return buildParameters(window.location.search);
10
6
  }
@@ -13,7 +9,7 @@ function buildParameters(url) {
13
9
  var urlSearch = url;
14
10
  var i = urlSearch.indexOf('?');
15
11
  if (i >= 0) {
16
- urlSearch = url.substr(i + 1);
12
+ urlSearch = url.substring(i + 1);
17
13
  }
18
14
  var parsed = qs.parse(urlSearch);
19
15
  return parsed;
package/lib/state.js CHANGED
@@ -119,6 +119,32 @@ function buildState(e, state, ctrl, modelName, tloc) {
119
119
  objSet[modelName] = model;
120
120
  return objSet;
121
121
  }
122
+ else if (type && (type.toLowerCase() === 'date' || type.toLowerCase() === 'datetime-local')) {
123
+ var objSet = {};
124
+ try {
125
+ var selectedDate = new Date(ctrl.value);
126
+ reflect_1.setValue(model, field, selectedDate);
127
+ objSet[modelName] = model;
128
+ return objSet;
129
+ }
130
+ catch (error) {
131
+ console.error('Error occurred while formatting date:', error);
132
+ }
133
+ return objSet;
134
+ }
135
+ else if (type && (type.toLowerCase() === 'time')) {
136
+ var objSet = {};
137
+ try {
138
+ var selectedDate = new Date(ctrl.value);
139
+ reflect_1.setValue(model, field, selectedDate.getTime());
140
+ objSet[modelName] = model;
141
+ return objSet;
142
+ }
143
+ catch (error) {
144
+ console.error('Error occurred while formatting time:', error);
145
+ }
146
+ return objSet;
147
+ }
122
148
  else {
123
149
  if (ctrl.tagName === 'SELECT') {
124
150
  if (ctrl.value === '' || !ctrl.value) {
package/lib/useEdit.js CHANGED
@@ -260,28 +260,55 @@ exports.useCoreEdit = function (refForm, initialState, service, p1, p, props) {
260
260
  };
261
261
  var succeed = (p && p.succeed ? p.succeed : _succeed);
262
262
  var _fail = function (result) {
263
- var errors = result.errors;
264
263
  var f = refForm.current;
265
264
  var u = p1.ui;
266
- if (errors && u) {
267
- var unmappedErrors = u.showFormError(f, errors);
268
- formutil_1.focusFirstError(f);
269
- if (!result.message) {
270
- if (errors && errors.length === 1) {
271
- result.message = errors[0].message;
272
- }
273
- else {
265
+ if (Array.isArray(result)) {
266
+ if (u && f) {
267
+ var unmappedErrors = u.showFormError(f, result);
268
+ formutil_1.focusFirstError(f);
269
+ if (unmappedErrors && unmappedErrors.length > 0) {
270
+ var t = p1.resource.value('error');
274
271
  if (p1.ui && p1.ui.buildErrorMessage) {
275
- result.message = p1.ui.buildErrorMessage(unmappedErrors);
272
+ var msg = p1.ui.buildErrorMessage(unmappedErrors);
273
+ p1.showError(msg, t);
276
274
  }
277
275
  else {
278
- result.message = errors[0].message;
276
+ p1.showError(unmappedErrors[0].field + ' ' + unmappedErrors[0].code + ' ' + unmappedErrors[0].message, t);
279
277
  }
280
278
  }
281
279
  }
282
- if (result.message) {
280
+ else {
283
281
  var t = p1.resource.value('error');
284
- p1.showError(result.message, t);
282
+ if (result.length > 0) {
283
+ p1.showError(result[0].field + ' ' + result[0].code + ' ' + result[0].message, t);
284
+ }
285
+ else {
286
+ p1.showError(t, t);
287
+ }
288
+ }
289
+ }
290
+ else {
291
+ var errors = result.errors;
292
+ if (errors && u) {
293
+ var unmappedErrors = u.showFormError(f, errors);
294
+ formutil_1.focusFirstError(f);
295
+ if (!result.message) {
296
+ if (errors && errors.length === 1) {
297
+ result.message = errors[0].message;
298
+ }
299
+ else {
300
+ if (p1.ui && p1.ui.buildErrorMessage) {
301
+ result.message = p1.ui.buildErrorMessage(unmappedErrors);
302
+ }
303
+ else {
304
+ result.message = errors[0].message;
305
+ }
306
+ }
307
+ }
308
+ if (result.message) {
309
+ var t = p1.resource.value('error');
310
+ p1.showError(result.message, t);
311
+ }
285
312
  }
286
313
  }
287
314
  };
@@ -293,7 +320,10 @@ exports.useCoreEdit = function (refForm, initialState, service, p1, p, props) {
293
320
  var successMsg = p1.resource.value('msg_save_success');
294
321
  var newMod = flag.newMode;
295
322
  var st = core_1.createEditStatus(p ? p.status : undefined);
296
- if (!isNaN(x)) {
323
+ if (Array.isArray(x)) {
324
+ fail(x);
325
+ }
326
+ else if (!isNaN(x)) {
297
327
  if (x === st.success) {
298
328
  succeed(obj, successMsg, version, backOnSave);
299
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-hook-core",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "react",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./src/index.ts",
package/src/components.ts CHANGED
@@ -907,26 +907,49 @@ export abstract class BaseEditComponent<T, P, S> extends BaseComponent<P, S> {
907
907
  this.back(null);
908
908
  }
909
909
  }
910
- fail(result: ResultInfo<T>) {
911
- const errors = result.errors;
910
+ fail(result: ResultInfo<T> | ErrorMessage[]) {
912
911
  const f = this.form;
913
912
  const u = this.ui;
914
- if (u && f) {
915
- const unmappedErrors = u.showFormError(f, errors);
916
- if (!result.message) {
917
- if (errors && errors.length === 1) {
918
- result.message = errors[0].message;
913
+ if (Array.isArray(result)) {
914
+ if (u && f) {
915
+ const unmappedErrors = u.showFormError(f, result);
916
+ focusFirstError(f);
917
+ if (unmappedErrors && unmappedErrors.length > 0) {
918
+ const t = this.resourceService.value('error');
919
+ if (u && u.buildErrorMessage) {
920
+ const msg = u.buildErrorMessage(unmappedErrors);
921
+ this.showError(msg, t);
922
+ } else {
923
+ this.showError(unmappedErrors[0].field + ' ' + unmappedErrors[0].code + ' ' + unmappedErrors[0].message, t);
924
+ }
925
+ }
926
+ } else {
927
+ const t = this.resourceService.value('error');
928
+ if (result.length > 0) {
929
+ this.showError(result[0].field + ' ' + result[0].code + ' ' + result[0].message, t);
919
930
  } else {
920
- result.message = u.buildErrorMessage(unmappedErrors);
931
+ this.showError(t, t);
921
932
  }
922
933
  }
923
- focusFirstError(f);
924
- } else if (errors && errors.length === 1) {
925
- result.message = errors[0].message;
926
- }
927
- if (result.message) {
928
- const t = this.resourceService.value('error');
929
- this.showError(result.message, t);
934
+ } else {
935
+ const errors = result.errors;
936
+ if (u && f) {
937
+ const unmappedErrors = u.showFormError(f, errors);
938
+ if (!result.message) {
939
+ if (errors && errors.length === 1) {
940
+ result.message = errors[0].message;
941
+ } else {
942
+ result.message = u.buildErrorMessage(unmappedErrors);
943
+ }
944
+ }
945
+ focusFirstError(f);
946
+ } else if (errors && errors.length === 1) {
947
+ result.message = errors[0].message;
948
+ }
949
+ if (result.message) {
950
+ const t = this.resourceService.value('error');
951
+ this.showError(result.message, t);
952
+ }
930
953
  }
931
954
  }
932
955
 
@@ -938,7 +961,9 @@ export abstract class BaseEditComponent<T, P, S> extends BaseComponent<P, S> {
938
961
  const successMsg = (newMod ? this.insertSuccessMsg : this.updateSuccessMsg);
939
962
  const x: any = res;
940
963
  const r = this.resourceService;
941
- if (!isNaN(x)) {
964
+ if (Array.isArray(x)) {
965
+ this.fail(x);
966
+ } else if (!isNaN(x)) {
942
967
  if (x === st.success) {
943
968
  this.succeed(successMsg, backOnSave);
944
969
  } else {
package/src/core.ts CHANGED
@@ -310,16 +310,23 @@ export function buildId<ID>(p: Readonly<Params<string>>, keys?: string[]): ID |
310
310
  }
311
311
  return id;
312
312
  }
313
- export function dateToDefaultString(date: Date): string {
314
- return '' + date.getFullYear() + '-' + addZero(date.getMonth() + 1, 2) + '-' + addZero(date.getDate(), 2); // DateUtil.formatDate(date, 'YYYY-MM-DD');
315
- }
316
- function addZero(val: number, num: number): string {
317
- let v = val.toString();
318
- while (v.length < num) {
319
- v = '0' + v;
320
- }
321
- return v.toString();
322
- }
313
+ export const datetimeToString = (inputDate: Date) => {
314
+ const date = new Date(inputDate);
315
+ const year = date.getFullYear();
316
+ const month = String(date.getMonth() + 1).padStart(2, '0');
317
+ const day = String(date.getDate()).padStart(2, '0');
318
+ const hours = String(date.getHours()).padStart(2, '0');
319
+ const minutes = String(date.getMinutes()).padStart(2, '0');
320
+ const seconds = String(date.getSeconds()).padStart(2, '0');
321
+ return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;
322
+ };
323
+
324
+ export const dateToString = (inputDate: Date) => {
325
+ const year = inputDate.getFullYear();
326
+ const month = String(inputDate.getMonth() + 1).padStart(2, '0');
327
+ const day = String(inputDate.getDate()).padStart(2, '0');
328
+ return `${year}-${month}-${day}`;
329
+ };
323
330
  /*
324
331
  export function formatFax(value: string) {
325
332
  return formatter.formatFax(value);
package/src/route.ts CHANGED
@@ -1,10 +1,5 @@
1
- import * as H from 'history';
2
1
  import * as qs from 'query-string';
3
2
 
4
- export function navigate(history: H.History, stateTo: string) {
5
- history.push(stateTo);
6
- }
7
-
8
3
  export function buildFromUrl<S>(): S {
9
4
  return buildParameters(window.location.search);
10
5
  }
@@ -12,7 +7,7 @@ export function buildParameters<T>(url: string): T {
12
7
  let urlSearch = url;
13
8
  const i = urlSearch.indexOf('?');
14
9
  if (i >= 0) {
15
- urlSearch = url.substr(i + 1);
10
+ urlSearch = url.substring(i + 1);
16
11
  }
17
12
  const parsed: any = qs.parse(urlSearch);
18
13
  return parsed;
package/src/state.ts CHANGED
@@ -99,6 +99,28 @@ export function buildState<S, K extends keyof S>(e: any, state: Readonly<S>, ctr
99
99
  const objSet: any = {};
100
100
  objSet[modelName] = model;
101
101
  return objSet;
102
+ } else if (type && (type.toLowerCase() === 'date' || type.toLowerCase() === 'datetime-local')) {
103
+ const objSet: any = {};
104
+ try {
105
+ const selectedDate = new Date(ctrl.value);
106
+ setValue(model, field, selectedDate);
107
+ objSet[modelName] = model;
108
+ return objSet;
109
+ } catch (error) {
110
+ console.error('Error occurred while formatting date:', error);
111
+ }
112
+ return objSet;
113
+ } else if (type && (type.toLowerCase() === 'time')) {
114
+ const objSet: any = {};
115
+ try {
116
+ const selectedDate = new Date(ctrl.value);
117
+ setValue(model, field, selectedDate.getTime());
118
+ objSet[modelName] = model;
119
+ return objSet;
120
+ } catch (error) {
121
+ console.error('Error occurred while formatting time:', error);
122
+ }
123
+ return objSet;
102
124
  } else {
103
125
  if (ctrl.tagName === 'SELECT') {
104
126
  if (ctrl.value === '' || !ctrl.value) {
package/src/update.ts CHANGED
@@ -43,7 +43,7 @@ export const useUpdate = <T>(initialState: T, getName?: ((f?: HTMLFormElement|nu
43
43
  }
44
44
  const l = localeOf(lc, getLocale);
45
45
  handleEvent(e, removeErr);
46
- const objSet = buildState(e, state, ctrl, mn, l);
46
+ const objSet = buildState<T, any>(e, state, ctrl, mn, l);
47
47
  if (objSet) {
48
48
  if (callback) {
49
49
  setState(objSet, callback);
@@ -53,7 +53,7 @@ export const useUpdate = <T>(initialState: T, getName?: ((f?: HTMLFormElement|nu
53
53
  }
54
54
  };
55
55
  const updateFlatState = (e: any, callback?: () => void, lc?: Locale) => {
56
- const objSet = buildFlatState(e, state, lc);
56
+ const objSet = buildFlatState<T, any>(e, state, lc);
57
57
  if (objSet) {
58
58
  if (callback) {
59
59
  setState(objSet, callback);
package/src/useEdit.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import {useEffect, useState} from 'react';
2
2
  import {useNavigate, useParams} from 'react-router';
3
- import {Attributes, buildId, createEditStatus, EditStatusConfig, getModelName as getModelName2, hideLoading, initForm, LoadingService, Locale, message, messageByHttpStatus, ResourceService, showLoading, UIService} from './core';
3
+ import {Attributes, buildId, createEditStatus, EditStatusConfig, ErrorMessage, getModelName as getModelName2, hideLoading, initForm, LoadingService, Locale, message, messageByHttpStatus, ResourceService, showLoading, UIService} from './core';
4
4
  import {build, createModel as createModel2, EditParameter, GenericService, handleStatus, handleVersion, initPropertyNullInModel, ResultInfo} from './edit';
5
5
  import {focusFirstError, readOnly as setReadOnly} from './formutil';
6
6
  import {DispatchWithCallback, useMergeState} from './merge';
@@ -33,7 +33,7 @@ export interface BaseEditComponentParam<T, ID> {
33
33
  onSave?: (isBack?: boolean) => void;
34
34
  validate?: (obj: T, callback: (obj2?: T) => void) => void;
35
35
  succeed?: (obj: T, msg: string, version?: string, isBack?: boolean, result?: ResultInfo<T>) => void;
36
- fail?: (result: ResultInfo<T>) => void;
36
+ fail?: (result: ResultInfo<T>|ErrorMessage[]) => void;
37
37
  postSave?: (obj: T, res: number|ResultInfo<T>, version?: string, backOnSave?: boolean) => void;
38
38
  handleDuplicateKey?: (result?: ResultInfo<T>) => void;
39
39
  load?: (i: ID|null, callback?: (m: T, showM: (m2: T) => void) => void) => void;
@@ -334,27 +334,50 @@ export const useCoreEdit = <T, ID, S, P>(
334
334
  };
335
335
  const succeed = (p && p.succeed ? p.succeed : _succeed);
336
336
 
337
- const _fail = (result: ResultInfo<T>) => {
338
- const errors = result.errors;
337
+ const _fail = (result: ResultInfo<T> | ErrorMessage[]) => {
339
338
  const f = refForm.current;
340
339
  const u = p1.ui;
341
- if (errors && u) {
342
- const unmappedErrors = u.showFormError(f, errors);
343
- focusFirstError(f);
344
- if (!result.message) {
345
- if (errors && errors.length === 1) {
346
- result.message = errors[0].message;
347
- } else {
340
+ if (Array.isArray(result)) {
341
+ if (u && f) {
342
+ const unmappedErrors = u.showFormError(f, result);
343
+ focusFirstError(f);
344
+ if (unmappedErrors && unmappedErrors.length > 0) {
345
+ const t = p1.resource.value('error');
348
346
  if (p1.ui && p1.ui.buildErrorMessage) {
349
- result.message = p1.ui.buildErrorMessage(unmappedErrors);
347
+ const msg = p1.ui.buildErrorMessage(unmappedErrors);
348
+ p1.showError(msg, t);
350
349
  } else {
351
- result.message = errors[0].message;
350
+ p1.showError(unmappedErrors[0].field + ' ' + unmappedErrors[0].code + ' ' + unmappedErrors[0].message, t);
352
351
  }
353
352
  }
354
- }
355
- if (result.message) {
353
+ } else {
356
354
  const t = p1.resource.value('error');
357
- p1.showError(result.message, t);
355
+ if (result.length > 0) {
356
+ p1.showError(result[0].field + ' ' + result[0].code + ' ' + result[0].message, t);
357
+ } else {
358
+ p1.showError(t, t);
359
+ }
360
+ }
361
+ } else {
362
+ const errors = result.errors;
363
+ if (errors && u) {
364
+ const unmappedErrors = u.showFormError(f, errors);
365
+ focusFirstError(f);
366
+ if (!result.message) {
367
+ if (errors && errors.length === 1) {
368
+ result.message = errors[0].message;
369
+ } else {
370
+ if (p1.ui && p1.ui.buildErrorMessage) {
371
+ result.message = p1.ui.buildErrorMessage(unmappedErrors);
372
+ } else {
373
+ result.message = errors[0].message;
374
+ }
375
+ }
376
+ }
377
+ if (result.message) {
378
+ const t = p1.resource.value('error');
379
+ p1.showError(result.message, t);
380
+ }
358
381
  }
359
382
  }
360
383
  };
@@ -367,7 +390,9 @@ export const useCoreEdit = <T, ID, S, P>(
367
390
  const successMsg = p1.resource.value('msg_save_success');
368
391
  const newMod = flag.newMode;
369
392
  const st = createEditStatus(p ? p.status : undefined);
370
- if (!isNaN(x)) {
393
+ if (Array.isArray(x)) {
394
+ fail(x);
395
+ } else if (!isNaN(x)) {
371
396
  if (x === st.success) {
372
397
  succeed(obj, successMsg, version, backOnSave);
373
398
  } else {
package/src/useSearch.ts CHANGED
@@ -57,7 +57,7 @@ export interface InitSearchComponentParam<T, M extends Filter, S> extends Search
57
57
  createFilter?: () => M;
58
58
  initialize?: (ld: (s: M, auto?: boolean) => void, setState2: DispatchWithCallback<Partial<S>>, com?: SearchComponentState<T, M>) => void;
59
59
  }
60
- export interface HookPropsSearchParameter<T, S extends Filter, ST, P> extends HookPropsBaseSearchParameter<T, S, ST, P> {
60
+ export interface HookPropsSearchParameter<T, S extends Filter, ST extends SearchComponentState<T, S>, P> extends HookPropsBaseSearchParameter<T, S, ST, P> {
61
61
  createFilter?: () => S;
62
62
  initialize?: (ld: (s: S, auto?: boolean) => void, setState2: DispatchWithCallback<Partial<ST>>, com?: SearchComponentState<T, S>) => void;
63
63
  }
@@ -112,7 +112,7 @@ export interface HookBaseSearchParameter<T, S extends Filter, ST extends SearchC
112
112
  getLocale?: () => Locale;
113
113
  autoSearch?: boolean;
114
114
  }
115
- export interface HookPropsBaseSearchParameter<T, S extends Filter, ST, P> extends HookBaseSearchParameter<T, S, ST> {
115
+ export interface HookPropsBaseSearchParameter<T, S extends Filter, ST extends SearchComponentState<T, S>, P> extends HookBaseSearchParameter<T, S, ST> {
116
116
  props?: P;
117
117
  // prepareCustomData?: (data: any) => void;
118
118
  }
package/tsconfig.json CHANGED
@@ -16,7 +16,8 @@
16
16
  "lib": [
17
17
  "dom",
18
18
  "es6",
19
- "es7"
19
+ "es7",
20
+ "es2017"
20
21
  ]
21
22
  },
22
23
  "include": [