react-hook-core 0.4.10 → 0.4.11
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/core.js +1 -1
- package/lib/index.js +0 -1
- package/lib/useSearch.js +1 -2
- package/package.json +1 -1
- package/src/core.ts +1 -1
- package/src/index.ts +0 -1
- package/src/useSearch.ts +1 -2
package/lib/core.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.pageSizes = [12, 24, 60, 100, 120, 180, 300, 600]
|
|
|
4
4
|
exports.sizes = exports.pageSizes
|
|
5
5
|
var resources = (function () {
|
|
6
6
|
function resources() {}
|
|
7
|
-
resources.phone = /
|
|
7
|
+
resources.phone = / |\-|\.|\(|\)/g
|
|
8
8
|
resources._cache = {}
|
|
9
9
|
resources.cache = true
|
|
10
10
|
resources.fields = "fields"
|
package/lib/index.js
CHANGED
package/lib/useSearch.js
CHANGED
|
@@ -25,7 +25,6 @@ var react_1 = require("react")
|
|
|
25
25
|
var common_1 = require("./common")
|
|
26
26
|
var core_1 = require("./core")
|
|
27
27
|
var input_1 = require("./input")
|
|
28
|
-
var merge_1 = require("./merge")
|
|
29
28
|
var reflect_1 = require("./reflect")
|
|
30
29
|
var route_1 = require("./route")
|
|
31
30
|
var search_1 = require("./search")
|
|
@@ -338,7 +337,7 @@ exports.useCoreSearch = function (refForm, initialState, service, p1, p2) {
|
|
|
338
337
|
return refForm && refForm.current ? refForm.current.getAttribute("currency-code") : "USD"
|
|
339
338
|
}
|
|
340
339
|
var getCurrencyCode = p && p.getCurrencyCode ? p.getCurrencyCode : _getCurrencyCode
|
|
341
|
-
var _c =
|
|
340
|
+
var _c = update_1.useMergeState(p),
|
|
342
341
|
component = _c[0],
|
|
343
342
|
setComponent = _c[1]
|
|
344
343
|
var toggleFilter = function (event) {
|
package/package.json
CHANGED
package/src/core.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const pageSizes = [12, 24, 60, 100, 120, 180, 300, 600]
|
|
|
6
6
|
export const sizes = pageSizes
|
|
7
7
|
// tslint:disable-next-line:class-name
|
|
8
8
|
export class resources {
|
|
9
|
-
static phone = /
|
|
9
|
+
static phone = / |\-|\.|\(|\)/g
|
|
10
10
|
static _cache: any = {}
|
|
11
11
|
static cache = true
|
|
12
12
|
static fields = "fields"
|
package/src/index.ts
CHANGED
package/src/useSearch.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { useEffect, useState } from "react"
|
|
|
2
2
|
import { error } from "./common"
|
|
3
3
|
import { LoadingService, Locale, pageSizes, resources, ResourceService, UIService } from "./core"
|
|
4
4
|
import { hideLoading, initForm, showLoading } from "./input"
|
|
5
|
-
import { DispatchWithCallback, useMergeState } from "./merge"
|
|
6
5
|
import { clone } from "./reflect"
|
|
7
6
|
import { buildFromUrl } from "./route"
|
|
8
7
|
import {
|
|
@@ -23,7 +22,7 @@ import {
|
|
|
23
22
|
Sortable,
|
|
24
23
|
} from "./search"
|
|
25
24
|
import { enLocale } from "./state"
|
|
26
|
-
import { useUpdate } from "./update"
|
|
25
|
+
import { DispatchWithCallback, useMergeState, useUpdate } from "./update"
|
|
27
26
|
|
|
28
27
|
export function showPaging<T>(com: Pagination, list: T[], pageSize?: number, total?: number): void {
|
|
29
28
|
com.total = total
|