@panneau/medias 4.0.55 → 4.0.56

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 CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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, Error>>;
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, Error>>;
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: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
454
+ label: react.JSX.Element;
455
455
  component: string;
456
456
  path: string;
457
457
  descriptionPath: string;
458
458
  descriptionValues: {
459
- image: react_jsx_runtime.JSX.Element;
460
- video: react_jsx_runtime.JSX.Element;
461
- audio: react_jsx_runtime.JSX.Element;
462
- document: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
511
+ label: react.JSX.Element;
512
512
  isList: boolean;
513
513
  hideWithoutValue: boolean;
514
514
  fields: ({
515
515
  id: string;
516
- label: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
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: react_jsx_runtime.JSX.Element;
547
+ placeholder: react.JSX.Element;
548
548
  options: {
549
- label: react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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): react_jsx_runtime.JSX.Element;
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.55",
3
+ "version": "4.0.56",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -28,6 +28,9 @@
28
28
  "type": "module",
29
29
  "module": "dist/index.js",
30
30
  "types": "dist/index.d.ts",
31
+ "sideEffects": [
32
+ "**/*.css"
33
+ ],
31
34
  "style": "assets/css/styles.css",
32
35
  "exports": {
33
36
  ".": {
@@ -56,21 +59,21 @@
56
59
  },
57
60
  "dependencies": {
58
61
  "@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",
62
+ "@panneau/core": "^4.0.56",
63
+ "@panneau/data": "^4.0.56",
64
+ "@panneau/display-image": "^4.0.56",
65
+ "@panneau/element-button": "^4.0.56",
66
+ "@panneau/element-buttons": "^4.0.56",
67
+ "@panneau/element-form": "^4.0.56",
68
+ "@panneau/element-form-status": "^4.0.56",
69
+ "@panneau/element-grid": "^4.0.56",
70
+ "@panneau/element-icon": "^4.0.56",
71
+ "@panneau/element-media-card": "^4.0.56",
72
+ "@panneau/element-media-player": "^4.0.56",
73
+ "@panneau/element-pagination": "^4.0.56",
74
+ "@panneau/element-table": "^4.0.56",
75
+ "@panneau/field-upload": "^4.0.56",
76
+ "@panneau/filter-filters": "^4.0.56",
74
77
  "classnames": "^2.5.1",
75
78
  "lodash": "^4.17.21",
76
79
  "react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
@@ -78,5 +81,5 @@
78
81
  "publishConfig": {
79
82
  "access": "public"
80
83
  },
81
- "gitHead": "1c9183567fc5bf98ba10fa57c63cf2ed2ae4a054"
84
+ "gitHead": "9c3ba1bdd04699e0150f84a35f2bdbdec073bd59"
82
85
  }