@panneau/medias 4.0.55 → 4.0.58
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 +29 -29
- package/dist/index.js +1 -1
- package/package.json +32 -29
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { ReactNode, Dispatch, SetStateAction } from 'react';
|
|
3
3
|
import * as _panneau_core from '@panneau/core';
|
|
4
4
|
import { Media, Field, MediaType, Filter, Column, Resource } from '@panneau/core';
|
|
@@ -20,7 +20,7 @@ interface MediaFormProps {
|
|
|
20
20
|
className?: string | null;
|
|
21
21
|
children?: ReactNode | null;
|
|
22
22
|
}
|
|
23
|
-
declare function MediaForm({ value: initialValue, fields: initialFields, onChange, onSave, onReplace, onDelete, onClose, withDelete, withTrash, withReplace, className, children, }: MediaFormProps):
|
|
23
|
+
declare function MediaForm({ value: initialValue, fields: initialFields, onChange, onSave, onReplace, onDelete, onClose, withDelete, withTrash, withReplace, className, children, }: MediaFormProps): react.JSX.Element;
|
|
24
24
|
|
|
25
25
|
interface LayoutItem {
|
|
26
26
|
id: string;
|
|
@@ -63,7 +63,7 @@ interface MediasBrowserProps {
|
|
|
63
63
|
filtersClassName?: string | null;
|
|
64
64
|
formChildren?: ReactNode | null;
|
|
65
65
|
}
|
|
66
|
-
declare function MediasBrowser({ items: initialItems, extraItems, types, permissions, baseUrl, filters, columns, fields, query: initialQuery, layout: initialLayout, layouts, theme, onMediaUploaded, onItemsChange, onLayoutChange, onMediaFormOpen, onMediaFormClose, selectable, selectedItems, onSelectionChange, multipleSelection, uppyConfig, withDelete, withTrash, withReplace, withStickySelection, withoutUpload, className, filtersClassName, formChildren, }: MediasBrowserProps):
|
|
66
|
+
declare function MediasBrowser({ items: initialItems, extraItems, types, permissions, baseUrl, filters, columns, fields, query: initialQuery, layout: initialLayout, layouts, theme, onMediaUploaded, onItemsChange, onLayoutChange, onMediaFormOpen, onMediaFormClose, selectable, selectedItems, onSelectionChange, multipleSelection, uppyConfig, withDelete, withTrash, withReplace, withStickySelection, withoutUpload, className, filtersClassName, formChildren, }: MediasBrowserProps): react.JSX.Element;
|
|
67
67
|
|
|
68
68
|
interface MediasPickerProps extends MediasBrowserProps {
|
|
69
69
|
items?: Media[] | null;
|
|
@@ -71,7 +71,7 @@ interface MediasPickerProps extends MediasBrowserProps {
|
|
|
71
71
|
onChange?: ((selection: Media[] | null) => void) | null;
|
|
72
72
|
multiple?: boolean;
|
|
73
73
|
}
|
|
74
|
-
declare function MediasPicker({ items: initialItems, value: initialSelectedItems, onChange, multiple, ...props }: MediasPickerProps):
|
|
74
|
+
declare function MediasPicker({ items: initialItems, value: initialSelectedItems, onChange, multiple, ...props }: MediasPickerProps): react.JSX.Element;
|
|
75
75
|
|
|
76
76
|
interface MediasApi {
|
|
77
77
|
get: (query?: Record<string, unknown>, page?: number | null, count?: number | null) => Promise<UseItemsResponse<Media>>;
|
|
@@ -88,19 +88,19 @@ interface MediasApiProviderProps {
|
|
|
88
88
|
children: ReactNode;
|
|
89
89
|
}
|
|
90
90
|
declare function useMediasApi(): MediasApi;
|
|
91
|
-
declare function MediasApiProvider({ api: providedApi, children }: MediasApiProviderProps):
|
|
91
|
+
declare function MediasApiProvider({ api: providedApi, children }: MediasApiProviderProps): react.JSX.Element;
|
|
92
92
|
|
|
93
93
|
interface MediasBrowserContainerProps extends MediasBrowserProps {
|
|
94
94
|
api?: MediasApi | null;
|
|
95
95
|
media?: Media | null;
|
|
96
96
|
}
|
|
97
|
-
declare function MediasBrowserContainer({ api, media, ...props }: MediasBrowserContainerProps):
|
|
97
|
+
declare function MediasBrowserContainer({ api, media, ...props }: MediasBrowserContainerProps): react.JSX.Element;
|
|
98
98
|
|
|
99
99
|
interface MediasPickerContainerProps extends MediasPickerProps {
|
|
100
100
|
api?: MediasApi | null;
|
|
101
101
|
media?: Media | null;
|
|
102
102
|
}
|
|
103
|
-
declare function MediasPickerContainer({ api, media, ...props }: MediasPickerContainerProps):
|
|
103
|
+
declare function MediasPickerContainer({ api, media, ...props }: MediasPickerContainerProps): react.JSX.Element;
|
|
104
104
|
|
|
105
105
|
interface MediaContextValue {
|
|
106
106
|
currentMedia: Media | null;
|
|
@@ -111,7 +111,7 @@ interface MediaProviderProps {
|
|
|
111
111
|
children: ReactNode;
|
|
112
112
|
}
|
|
113
113
|
declare function useCurrentMedia(): MediaContextValue;
|
|
114
|
-
declare function MediaProvider({ media: providedMedia, children }: MediaProviderProps):
|
|
114
|
+
declare function MediaProvider({ media: providedMedia, children }: MediaProviderProps): react.JSX.Element;
|
|
115
115
|
|
|
116
116
|
interface UseMediasOpts {
|
|
117
117
|
trashed?: boolean;
|
|
@@ -376,9 +376,9 @@ declare function useMedia(id: string, opts: any): {
|
|
|
376
376
|
isRefetching: boolean;
|
|
377
377
|
isStale: boolean;
|
|
378
378
|
isEnabled: boolean;
|
|
379
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Media
|
|
379
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<Media>, Error>>;
|
|
380
380
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
381
|
-
promise: Promise<Media
|
|
381
|
+
promise: Promise<NoInfer<Media>>;
|
|
382
382
|
media: Media;
|
|
383
383
|
} | {
|
|
384
384
|
error: null;
|
|
@@ -403,9 +403,9 @@ declare function useMedia(id: string, opts: any): {
|
|
|
403
403
|
isRefetching: boolean;
|
|
404
404
|
isStale: boolean;
|
|
405
405
|
isEnabled: boolean;
|
|
406
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<Media
|
|
406
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<Media>, Error>>;
|
|
407
407
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
408
|
-
promise: Promise<Media
|
|
408
|
+
promise: Promise<NoInfer<Media>>;
|
|
409
409
|
media: Media;
|
|
410
410
|
};
|
|
411
411
|
|
|
@@ -441,7 +441,7 @@ declare function useMediaReplace(): {
|
|
|
441
441
|
|
|
442
442
|
declare const _default$2: ({
|
|
443
443
|
id: string;
|
|
444
|
-
label:
|
|
444
|
+
label: react.JSX.Element;
|
|
445
445
|
component: string;
|
|
446
446
|
path: string;
|
|
447
447
|
sortable: boolean;
|
|
@@ -451,22 +451,22 @@ declare const _default$2: ({
|
|
|
451
451
|
actions?: undefined;
|
|
452
452
|
} | {
|
|
453
453
|
id: string;
|
|
454
|
-
label:
|
|
454
|
+
label: react.JSX.Element;
|
|
455
455
|
component: string;
|
|
456
456
|
path: string;
|
|
457
457
|
descriptionPath: string;
|
|
458
458
|
descriptionValues: {
|
|
459
|
-
image:
|
|
460
|
-
video:
|
|
461
|
-
audio:
|
|
462
|
-
document:
|
|
459
|
+
image: react.JSX.Element;
|
|
460
|
+
video: react.JSX.Element;
|
|
461
|
+
audio: react.JSX.Element;
|
|
462
|
+
document: react.JSX.Element;
|
|
463
463
|
};
|
|
464
464
|
sortable: boolean;
|
|
465
465
|
format?: undefined;
|
|
466
466
|
actions?: undefined;
|
|
467
467
|
} | {
|
|
468
468
|
id: string;
|
|
469
|
-
label:
|
|
469
|
+
label: react.JSX.Element;
|
|
470
470
|
component: string;
|
|
471
471
|
format: string;
|
|
472
472
|
path: string;
|
|
@@ -476,7 +476,7 @@ declare const _default$2: ({
|
|
|
476
476
|
actions?: undefined;
|
|
477
477
|
} | {
|
|
478
478
|
id: string;
|
|
479
|
-
label:
|
|
479
|
+
label: react.JSX.Element;
|
|
480
480
|
component: string;
|
|
481
481
|
path: string;
|
|
482
482
|
format: string;
|
|
@@ -486,7 +486,7 @@ declare const _default$2: ({
|
|
|
486
486
|
actions?: undefined;
|
|
487
487
|
} | {
|
|
488
488
|
id: string;
|
|
489
|
-
label:
|
|
489
|
+
label: react.JSX.Element;
|
|
490
490
|
actions: string[];
|
|
491
491
|
component?: undefined;
|
|
492
492
|
path?: undefined;
|
|
@@ -498,7 +498,7 @@ declare const _default$2: ({
|
|
|
498
498
|
|
|
499
499
|
declare const _default$1: ({
|
|
500
500
|
name: string;
|
|
501
|
-
label:
|
|
501
|
+
label: react.JSX.Element;
|
|
502
502
|
type: string;
|
|
503
503
|
component: string;
|
|
504
504
|
id?: undefined;
|
|
@@ -508,12 +508,12 @@ declare const _default$1: ({
|
|
|
508
508
|
} | {
|
|
509
509
|
id: string;
|
|
510
510
|
component: string;
|
|
511
|
-
label:
|
|
511
|
+
label: react.JSX.Element;
|
|
512
512
|
isList: boolean;
|
|
513
513
|
hideWithoutValue: boolean;
|
|
514
514
|
fields: ({
|
|
515
515
|
id: string;
|
|
516
|
-
label:
|
|
516
|
+
label: react.JSX.Element;
|
|
517
517
|
type: string;
|
|
518
518
|
display: string;
|
|
519
519
|
name: string;
|
|
@@ -521,7 +521,7 @@ declare const _default$1: ({
|
|
|
521
521
|
format?: undefined;
|
|
522
522
|
} | {
|
|
523
523
|
id: string;
|
|
524
|
-
label:
|
|
524
|
+
label: react.JSX.Element;
|
|
525
525
|
type: string;
|
|
526
526
|
display: string;
|
|
527
527
|
name: string;
|
|
@@ -544,9 +544,9 @@ declare const _default: ({
|
|
|
544
544
|
id: string;
|
|
545
545
|
component: string;
|
|
546
546
|
name: string;
|
|
547
|
-
placeholder:
|
|
547
|
+
placeholder: react.JSX.Element;
|
|
548
548
|
options: {
|
|
549
|
-
label:
|
|
549
|
+
label: react.JSX.Element;
|
|
550
550
|
value: string;
|
|
551
551
|
}[];
|
|
552
552
|
multiple: boolean;
|
|
@@ -556,13 +556,13 @@ declare const _default: ({
|
|
|
556
556
|
interface MediasResourceBrowserProps extends MediasBrowserContainerProps {
|
|
557
557
|
resource?: Resource | string | null;
|
|
558
558
|
}
|
|
559
|
-
declare function MediasResourceBrowser({ resource: resourceId, ...props }: MediasResourceBrowserProps):
|
|
559
|
+
declare function MediasResourceBrowser({ resource: resourceId, ...props }: MediasResourceBrowserProps): react.JSX.Element;
|
|
560
560
|
|
|
561
561
|
interface MediasResourcePickerProps extends MediasPickerContainerProps {
|
|
562
562
|
resource?: Resource | string | null;
|
|
563
563
|
[key: string]: unknown;
|
|
564
564
|
}
|
|
565
|
-
declare function MediasResourcePicker({ resource: resourceId, ...props }: MediasResourcePickerProps):
|
|
565
|
+
declare function MediasResourcePicker({ resource: resourceId, ...props }: MediasResourcePickerProps): react.JSX.Element;
|
|
566
566
|
|
|
567
567
|
export { MediaForm, MediaProvider, MediasApiProvider, MediasBrowser, MediasBrowserContainer, MediasPicker, MediasPickerContainer, MediasResourceBrowser, MediasResourcePicker, _default$2 as columns, _default$1 as fields, _default as filters, useCurrentMedia, useMedia, useMediaCreate, useMediaDelete, useMediaReplace, useMediaRestore, useMediaTrash, useMediaUpdate, useMedias, useMediasApi };
|
|
568
568
|
export type { MediaContextValue, MediasApi, MediasBrowserContainerProps, MediasBrowserProps, MediasPickerContainerProps, MediasPickerProps };
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { c } from 'react/compiler-runtime';
|
|
|
11
11
|
import ImageDisplay from '@panneau/display-image';
|
|
12
12
|
import MediaPlayer from '@panneau/element-media-player';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
|
-
import uniqBy from 'lodash/uniqBy';
|
|
14
|
+
import uniqBy from 'lodash-es/uniqBy';
|
|
15
15
|
import Buttons from '@panneau/element-buttons';
|
|
16
16
|
import Grid from '@panneau/element-grid';
|
|
17
17
|
import Icon from '@panneau/element-icon';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/medias",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.58",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/folkloreinc/panneau-js.git"
|
|
12
12
|
},
|
|
13
|
+
"license": "ISC",
|
|
13
14
|
"author": {
|
|
14
15
|
"name": "Folklore",
|
|
15
16
|
"email": "info@folklore.email"
|
|
@@ -24,11 +25,10 @@
|
|
|
24
25
|
"email": "nrb@folklore.email"
|
|
25
26
|
}
|
|
26
27
|
],
|
|
27
|
-
"
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"**/*.css"
|
|
30
|
+
],
|
|
28
31
|
"type": "module",
|
|
29
|
-
"module": "dist/index.js",
|
|
30
|
-
"types": "dist/index.d.ts",
|
|
31
|
-
"style": "assets/css/styles.css",
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
34
|
"types": "./dist/index.d.ts",
|
|
@@ -38,13 +38,37 @@
|
|
|
38
38
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
39
39
|
"./assets/css/styles.css": "./assets/css/styles.css"
|
|
40
40
|
},
|
|
41
|
+
"module": "dist/index.js",
|
|
42
|
+
"types": "dist/index.d.ts",
|
|
43
|
+
"style": "assets/css/styles.css",
|
|
41
44
|
"files": [
|
|
42
45
|
"dist",
|
|
43
46
|
"assets"
|
|
44
47
|
],
|
|
45
48
|
"scripts": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
49
|
+
"build": "../../scripts/prepare-package.sh --types",
|
|
50
|
+
"prepublishOnly": "npm run build"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@babel/runtime": "^7.28.6",
|
|
54
|
+
"@panneau/core": "^4.0.58",
|
|
55
|
+
"@panneau/data": "^4.0.58",
|
|
56
|
+
"@panneau/display-image": "^4.0.58",
|
|
57
|
+
"@panneau/element-button": "^4.0.58",
|
|
58
|
+
"@panneau/element-buttons": "^4.0.58",
|
|
59
|
+
"@panneau/element-form": "^4.0.58",
|
|
60
|
+
"@panneau/element-form-status": "^4.0.58",
|
|
61
|
+
"@panneau/element-grid": "^4.0.58",
|
|
62
|
+
"@panneau/element-icon": "^4.0.58",
|
|
63
|
+
"@panneau/element-media-card": "^4.0.58",
|
|
64
|
+
"@panneau/element-media-player": "^4.0.58",
|
|
65
|
+
"@panneau/element-pagination": "^4.0.58",
|
|
66
|
+
"@panneau/element-table": "^4.0.58",
|
|
67
|
+
"@panneau/field-upload": "^4.0.58",
|
|
68
|
+
"@panneau/filter-filters": "^4.0.58",
|
|
69
|
+
"classnames": "^2.5.1",
|
|
70
|
+
"lodash": "^4.17.21",
|
|
71
|
+
"react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
|
|
48
72
|
},
|
|
49
73
|
"devDependencies": {
|
|
50
74
|
"react": "^19.2.0",
|
|
@@ -54,29 +78,8 @@
|
|
|
54
78
|
"react": "^19.2.0",
|
|
55
79
|
"react-dom": "^19.0.0"
|
|
56
80
|
},
|
|
57
|
-
"dependencies": {
|
|
58
|
-
"@babel/runtime": "^7.28.6",
|
|
59
|
-
"@panneau/core": "^4.0.55",
|
|
60
|
-
"@panneau/data": "^4.0.55",
|
|
61
|
-
"@panneau/display-image": "^4.0.55",
|
|
62
|
-
"@panneau/element-button": "^4.0.55",
|
|
63
|
-
"@panneau/element-buttons": "^4.0.55",
|
|
64
|
-
"@panneau/element-form": "^4.0.55",
|
|
65
|
-
"@panneau/element-form-status": "^4.0.55",
|
|
66
|
-
"@panneau/element-grid": "^4.0.55",
|
|
67
|
-
"@panneau/element-icon": "^4.0.55",
|
|
68
|
-
"@panneau/element-media-card": "^4.0.55",
|
|
69
|
-
"@panneau/element-media-player": "^4.0.55",
|
|
70
|
-
"@panneau/element-pagination": "^4.0.55",
|
|
71
|
-
"@panneau/element-table": "^4.0.55",
|
|
72
|
-
"@panneau/field-upload": "^4.0.55",
|
|
73
|
-
"@panneau/filter-filters": "^4.0.55",
|
|
74
|
-
"classnames": "^2.5.1",
|
|
75
|
-
"lodash": "^4.17.21",
|
|
76
|
-
"react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
|
|
77
|
-
},
|
|
78
81
|
"publishConfig": {
|
|
79
82
|
"access": "public"
|
|
80
83
|
},
|
|
81
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "408b9bef2c15c0a6c55588721d13a965ead50a5f"
|
|
82
85
|
}
|