@panneau/field-resource-item 4.0.11 → 4.0.15
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/dist/index.d.ts +50 -0
- package/{es → dist}/index.js +3 -3
- package/package.json +21 -19
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { FormError, Message } from '@panneau/core';
|
|
3
|
+
|
|
4
|
+
interface Item {
|
|
5
|
+
id?: string | number | null;
|
|
6
|
+
type?: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
interface ResourceItemFieldProps {
|
|
10
|
+
name?: string | null;
|
|
11
|
+
value?: Item | null;
|
|
12
|
+
errors?: FormError[] | null;
|
|
13
|
+
resource?: string | null;
|
|
14
|
+
resourceType?: string | null;
|
|
15
|
+
paginated?: boolean;
|
|
16
|
+
query?: Record<string, unknown> | null;
|
|
17
|
+
requestQuery?: Record<string, unknown> | null;
|
|
18
|
+
page?: number | string | null;
|
|
19
|
+
count?: number | string | null;
|
|
20
|
+
options?: Record<string, unknown> | null;
|
|
21
|
+
searchParamName?: string;
|
|
22
|
+
getItemLabel?: ((item: Item, path: string | null) => string) | null;
|
|
23
|
+
getItemDescription?: ((item: Item, path: string | null) => string | null) | null;
|
|
24
|
+
getItemImage?: ((item: Item, path: string | null) => string | null) | null;
|
|
25
|
+
itemLabelPath?: string;
|
|
26
|
+
itemDescriptionPath?: string | null;
|
|
27
|
+
itemImagePath?: string;
|
|
28
|
+
itemLabelWithId?: boolean;
|
|
29
|
+
placeholder?: Message | string | null;
|
|
30
|
+
canCreate?: boolean;
|
|
31
|
+
canEdit?: boolean;
|
|
32
|
+
canFind?: boolean;
|
|
33
|
+
withoutModal?: boolean;
|
|
34
|
+
createButtonLabel?: Message | null;
|
|
35
|
+
editButtonLabel?: Message | null;
|
|
36
|
+
findButtonLabel?: Message | null;
|
|
37
|
+
multiple?: boolean;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
className?: string | null;
|
|
40
|
+
inputClassName?: string | null;
|
|
41
|
+
onChange?: ((value: Item | Item[] | null) => void) | null;
|
|
42
|
+
}
|
|
43
|
+
declare function ResourceItemField({ name, value, errors, resource: resourceId, resourceType, paginated, query: initialQuery, requestQuery: initialRequestQuery, page: initialPage, count: initialCount, options: initialOptions, searchParamName, getItemLabel: initialGetItemLabel, getItemDescription, getItemImage, itemLabelPath, itemDescriptionPath, itemImagePath, itemLabelWithId, placeholder, canCreate, canEdit, canFind, withoutModal, createButtonLabel, editButtonLabel, findButtonLabel, multiple, disabled, className, inputClassName, onChange, }: ResourceItemFieldProps): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
45
|
+
declare namespace _default {
|
|
46
|
+
let id: string;
|
|
47
|
+
let component: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { ResourceItemField as default, _default as definition };
|
package/{es → dist}/index.js
RENAMED
|
@@ -3,9 +3,9 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
3
3
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import isArray from 'lodash
|
|
7
|
-
import isEmpty from 'lodash
|
|
8
|
-
import uniqBy from 'lodash
|
|
6
|
+
import isArray from 'lodash/isArray';
|
|
7
|
+
import isEmpty from 'lodash/isEmpty';
|
|
8
|
+
import uniqBy from 'lodash/uniqBy';
|
|
9
9
|
import { useMemo, useState, useCallback, useEffect } from 'react';
|
|
10
10
|
import { useIntl, FormattedMessage } from 'react-intl';
|
|
11
11
|
import { usePanneauResource } from '@panneau/core/contexts';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-resource-item",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.15",
|
|
4
4
|
"description": "An item mapping a resource",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -26,18 +26,21 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"type": "module",
|
|
29
|
-
"module": "
|
|
29
|
+
"module": "dist/index.js",
|
|
30
|
+
"types": "dist/index.d.ts",
|
|
30
31
|
"exports": {
|
|
31
|
-
".":
|
|
32
|
+
".": {
|
|
33
|
+
"default": "./dist/index.js",
|
|
34
|
+
"types": "./dist/index.d.ts"
|
|
35
|
+
}
|
|
32
36
|
},
|
|
33
37
|
"files": [
|
|
34
|
-
"
|
|
35
|
-
"es",
|
|
38
|
+
"dist",
|
|
36
39
|
"assets"
|
|
37
40
|
],
|
|
38
41
|
"scripts": {
|
|
39
42
|
"prepublishOnly": "npm run build",
|
|
40
|
-
"build": "../../scripts/prepare-package.sh"
|
|
43
|
+
"build": "../../scripts/prepare-package.sh --types"
|
|
41
44
|
},
|
|
42
45
|
"devDependencies": {
|
|
43
46
|
"react": "^19.0.0",
|
|
@@ -49,23 +52,22 @@
|
|
|
49
52
|
},
|
|
50
53
|
"dependencies": {
|
|
51
54
|
"@babel/runtime": "^7.12.5",
|
|
52
|
-
"@panneau/core": "^4.0.
|
|
53
|
-
"@panneau/data": "^4.0.
|
|
54
|
-
"@panneau/element-button": "^4.0.
|
|
55
|
-
"@panneau/element-resource-card": "^4.0.
|
|
56
|
-
"@panneau/element-select": "^4.0.
|
|
57
|
-
"@panneau/form-resource": "^4.0.
|
|
58
|
-
"@panneau/intl": "^4.0.
|
|
59
|
-
"@panneau/modal-dialog": "^4.0.
|
|
60
|
-
"@panneau/modal-resource-form": "^4.0.
|
|
61
|
-
"@panneau/modal-resource-items": "^4.0.
|
|
55
|
+
"@panneau/core": "^4.0.15",
|
|
56
|
+
"@panneau/data": "^4.0.15",
|
|
57
|
+
"@panneau/element-button": "^4.0.15",
|
|
58
|
+
"@panneau/element-resource-card": "^4.0.15",
|
|
59
|
+
"@panneau/element-select": "^4.0.15",
|
|
60
|
+
"@panneau/form-resource": "^4.0.15",
|
|
61
|
+
"@panneau/intl": "^4.0.15",
|
|
62
|
+
"@panneau/modal-dialog": "^4.0.15",
|
|
63
|
+
"@panneau/modal-resource-form": "^4.0.15",
|
|
64
|
+
"@panneau/modal-resource-items": "^4.0.15",
|
|
62
65
|
"classnames": "^2.5.1",
|
|
63
|
-
"lodash
|
|
64
|
-
"prop-types": "^15.7.2",
|
|
66
|
+
"lodash": "^4.17.21",
|
|
65
67
|
"react-intl": "^5.15.8 || ^6.0.0 || ^7.0.0"
|
|
66
68
|
},
|
|
67
69
|
"publishConfig": {
|
|
68
70
|
"access": "public"
|
|
69
71
|
},
|
|
70
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "83c02ca2f26e02383ef452ffcafda984d0b211cd"
|
|
71
73
|
}
|