@panneau/core 4.0.14 → 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/contexts.d.ts +72 -72
- package/dist/contexts.js +148 -148
- package/dist/hooks.d.ts +15 -15
- package/dist/hooks.js +56 -56
- package/dist/utils.d.ts +19 -19
- package/dist/utils.js +49 -50
- package/package.json +2 -2
package/dist/contexts.d.ts
CHANGED
|
@@ -52,75 +52,75 @@ declare const ComponentsContext: react.Context<ComponentsManager>;
|
|
|
52
52
|
/**
|
|
53
53
|
* Hooks
|
|
54
54
|
*/
|
|
55
|
-
declare
|
|
56
|
-
declare
|
|
57
|
-
declare
|
|
55
|
+
declare function useComponentsManager(namespace?: string | null): ComponentsManager;
|
|
56
|
+
declare function useComponents(namespace?: string | null, defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
57
|
+
declare function useComponent(name: unknown, defaultComponent?: unknown, namespace?: string | null): unknown;
|
|
58
58
|
/**
|
|
59
59
|
* Fields hooks
|
|
60
60
|
*/
|
|
61
|
-
declare
|
|
62
|
-
declare
|
|
63
|
-
declare
|
|
61
|
+
declare function useFieldsComponentsManager(): ComponentsManager;
|
|
62
|
+
declare function useFieldsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
63
|
+
declare function useFieldComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
64
64
|
/**
|
|
65
65
|
* Forms hooks
|
|
66
66
|
*/
|
|
67
|
-
declare
|
|
68
|
-
declare
|
|
69
|
-
declare
|
|
67
|
+
declare function useFormsComponentsManager(): ComponentsManager;
|
|
68
|
+
declare function useFormsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
69
|
+
declare function useFormComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
70
70
|
/**
|
|
71
71
|
* Modals hooks
|
|
72
72
|
*/
|
|
73
|
-
declare
|
|
74
|
-
declare
|
|
75
|
-
declare
|
|
73
|
+
declare function useModalsComponentsManager(): ComponentsManager;
|
|
74
|
+
declare function useModalsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
75
|
+
declare function useModalComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
76
76
|
/**
|
|
77
77
|
* Filters hooks
|
|
78
78
|
*/
|
|
79
|
-
declare
|
|
80
|
-
declare
|
|
81
|
-
declare
|
|
79
|
+
declare function useFiltersComponentsManager(): ComponentsManager;
|
|
80
|
+
declare function useFiltersComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
81
|
+
declare function useFilterComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
82
82
|
/**
|
|
83
83
|
* Lists hooks
|
|
84
84
|
*/
|
|
85
|
-
declare
|
|
86
|
-
declare
|
|
87
|
-
declare
|
|
85
|
+
declare function useListsComponentsManager(): ComponentsManager;
|
|
86
|
+
declare function useListsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
87
|
+
declare function useListComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
88
88
|
/**
|
|
89
89
|
* Displays hooks
|
|
90
90
|
*/
|
|
91
|
-
declare
|
|
92
|
-
declare
|
|
93
|
-
declare
|
|
91
|
+
declare function useDisplaysComponentsManager(): ComponentsManager;
|
|
92
|
+
declare function useDisplaysComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
93
|
+
declare function useDisplayComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
94
94
|
/**
|
|
95
95
|
* Actions hooks
|
|
96
96
|
*/
|
|
97
|
-
declare
|
|
98
|
-
declare
|
|
99
|
-
declare
|
|
97
|
+
declare function useActionsComponentsManager(): ComponentsManager;
|
|
98
|
+
declare function useActionsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
99
|
+
declare function useActionComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
100
100
|
/**
|
|
101
101
|
* Buttons hooks
|
|
102
102
|
*/
|
|
103
|
-
declare
|
|
104
|
-
declare
|
|
105
|
-
declare
|
|
103
|
+
declare function useButtonsComponentsManager(): ComponentsManager;
|
|
104
|
+
declare function useButtonsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
105
|
+
declare function useButtonComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
106
106
|
/**
|
|
107
107
|
* Pages hooks
|
|
108
108
|
*/
|
|
109
|
-
declare
|
|
110
|
-
declare
|
|
111
|
-
declare
|
|
109
|
+
declare function usePagesComponentsManager(): ComponentsManager;
|
|
110
|
+
declare function usePagesComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
111
|
+
declare function usePageComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
112
112
|
/**
|
|
113
113
|
* Previews hooks
|
|
114
114
|
*/
|
|
115
|
-
declare
|
|
116
|
-
declare
|
|
117
|
-
declare
|
|
115
|
+
declare function usePreviewsComponentsManager(): ComponentsManager;
|
|
116
|
+
declare function usePreviewsComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
117
|
+
declare function usePreviewComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
118
118
|
/**
|
|
119
119
|
* App hooks
|
|
120
120
|
*/
|
|
121
|
-
declare
|
|
122
|
-
declare
|
|
123
|
-
declare
|
|
121
|
+
declare function useAppComponentsManager(): ComponentsManager;
|
|
122
|
+
declare function useAppComponents(defaultComponents?: Record<string, unknown>): Record<string, unknown>;
|
|
123
|
+
declare function useAppComponent(name: unknown, defaultComponent?: unknown): unknown;
|
|
124
124
|
/**
|
|
125
125
|
* Provider
|
|
126
126
|
*/
|
|
@@ -261,8 +261,8 @@ interface Definition {
|
|
|
261
261
|
[key: string]: unknown;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
declare
|
|
265
|
-
declare
|
|
264
|
+
declare function useDefinitionContext(): Definition | null;
|
|
265
|
+
declare function useDefinition(): Definition | null;
|
|
266
266
|
interface DefinitionProviderProps {
|
|
267
267
|
definition: Definition;
|
|
268
268
|
children: ReactNode;
|
|
@@ -270,9 +270,9 @@ interface DefinitionProviderProps {
|
|
|
270
270
|
declare function DefinitionProvider({ definition, children }: DefinitionProviderProps): react_jsx_runtime.JSX.Element;
|
|
271
271
|
|
|
272
272
|
declare const FieldsContext: react.Context<FieldsManager>;
|
|
273
|
-
declare
|
|
274
|
-
declare
|
|
275
|
-
declare
|
|
273
|
+
declare function useFieldsManager(): FieldsManager | null;
|
|
274
|
+
declare function useField(id: string): Field | null;
|
|
275
|
+
declare function useFields(): Field[];
|
|
276
276
|
interface FieldsProviderProps {
|
|
277
277
|
fields?: Field[] | null;
|
|
278
278
|
manager?: FieldsManager | null;
|
|
@@ -287,13 +287,13 @@ interface FontsContextValue {
|
|
|
287
287
|
setGoogleFonts?: ((fonts: Font[]) => void) | null;
|
|
288
288
|
}
|
|
289
289
|
declare const FontsContext: react.Context<FontsContextValue>;
|
|
290
|
-
declare
|
|
290
|
+
declare function useGoogleFonts({ disabled, setFonts, }?: {
|
|
291
291
|
disabled?: boolean;
|
|
292
292
|
setFonts?: ((fonts: Font[]) => void) | null;
|
|
293
|
-
})
|
|
294
|
-
declare
|
|
293
|
+
}): Font[] | null;
|
|
294
|
+
declare function useFonts({ withoutGoogleFonts, }?: {
|
|
295
295
|
withoutGoogleFonts?: boolean;
|
|
296
|
-
})
|
|
296
|
+
}): FontsContextValue;
|
|
297
297
|
interface FontsProviderProps {
|
|
298
298
|
children: ReactNode;
|
|
299
299
|
systemFonts?: (Font | string)[] | null;
|
|
@@ -305,9 +305,9 @@ interface FormContextValue {
|
|
|
305
305
|
value: Record<string, unknown>;
|
|
306
306
|
setValue: (value: Record<string, unknown>) => void;
|
|
307
307
|
}
|
|
308
|
-
declare
|
|
309
|
-
declare
|
|
310
|
-
declare
|
|
308
|
+
declare function useFormContext(): FormContextValue | null;
|
|
309
|
+
declare function useFormValue(): Record<string, unknown>;
|
|
310
|
+
declare function useFormSetValue(): (value: Record<string, unknown>) => void;
|
|
311
311
|
interface FormProviderProps {
|
|
312
312
|
value: Record<string, unknown>;
|
|
313
313
|
setValue: (value: Record<string, unknown>) => void;
|
|
@@ -316,8 +316,8 @@ interface FormProviderProps {
|
|
|
316
316
|
declare function FormProvider({ value, setValue, children }: FormProviderProps): react_jsx_runtime.JSX.Element;
|
|
317
317
|
|
|
318
318
|
declare const GoogleApiClientContext: react.Context<any>;
|
|
319
|
-
declare
|
|
320
|
-
declare
|
|
319
|
+
declare function useGoogleApiClient(): any | null;
|
|
320
|
+
declare function withGoogleApiClient(WrappedComponent: ComponentType<any>): {
|
|
321
321
|
(props: any): react_jsx_runtime.JSX.Element;
|
|
322
322
|
displayName: string;
|
|
323
323
|
};
|
|
@@ -330,7 +330,7 @@ interface GoogleKeysContextValue {
|
|
|
330
330
|
apiKey: string | null;
|
|
331
331
|
}
|
|
332
332
|
declare const GoogleKeysContext: react.Context<GoogleKeysContextValue>;
|
|
333
|
-
declare
|
|
333
|
+
declare function useGoogleKeys(): GoogleKeysContextValue;
|
|
334
334
|
interface GoogleKeysProviderProps {
|
|
335
335
|
children: ReactNode;
|
|
336
336
|
apiKey?: string | null;
|
|
@@ -338,8 +338,8 @@ interface GoogleKeysProviderProps {
|
|
|
338
338
|
declare function GoogleKeysProvider({ children, apiKey }: GoogleKeysProviderProps): react_jsx_runtime.JSX.Element;
|
|
339
339
|
|
|
340
340
|
declare const GoogleMapsClientContext: react.Context<any>;
|
|
341
|
-
declare
|
|
342
|
-
declare
|
|
341
|
+
declare function useGoogleMapsClient(): any | null;
|
|
342
|
+
declare function withGoogleMapsClient(WrappedComponent: ComponentType<any>): {
|
|
343
343
|
(props: any): react_jsx_runtime.JSX.Element;
|
|
344
344
|
displayName: string;
|
|
345
345
|
};
|
|
@@ -354,9 +354,9 @@ interface LocalesContextValue {
|
|
|
354
354
|
locales: string[];
|
|
355
355
|
}
|
|
356
356
|
declare const LocalesContext: react.Context<LocalesContextValue>;
|
|
357
|
-
declare
|
|
358
|
-
declare
|
|
359
|
-
declare
|
|
357
|
+
declare function useLocalesContext(): LocalesContextValue;
|
|
358
|
+
declare function useLocales(): string[];
|
|
359
|
+
declare function useOtherLocales(): string[];
|
|
360
360
|
interface LocalesProviderProps {
|
|
361
361
|
locales?: string[];
|
|
362
362
|
children: ReactNode;
|
|
@@ -378,7 +378,7 @@ interface ModalContextValue {
|
|
|
378
378
|
getModalById: (modalId: string) => ModalData | null;
|
|
379
379
|
}
|
|
380
380
|
declare const ModalContext: react.Context<ModalContextValue>;
|
|
381
|
-
declare
|
|
381
|
+
declare function useModal(): ModalContextValue;
|
|
382
382
|
interface ModalProviderProps {
|
|
383
383
|
children: ReactNode;
|
|
384
384
|
container?: unknown | null;
|
|
@@ -397,8 +397,8 @@ interface PanelsContextValue {
|
|
|
397
397
|
unregister: (id: string) => void;
|
|
398
398
|
}
|
|
399
399
|
declare const PanelsContext: react.Context<PanelsContextValue>;
|
|
400
|
-
declare
|
|
401
|
-
declare
|
|
400
|
+
declare function usePanels(): PanelsContextValue;
|
|
401
|
+
declare function withPanels(WrappedComponent: ComponentType<any>): {
|
|
402
402
|
(props: any): react_jsx_runtime.JSX.Element;
|
|
403
403
|
displayName: string;
|
|
404
404
|
};
|
|
@@ -408,39 +408,39 @@ interface PanelsProviderProps {
|
|
|
408
408
|
}
|
|
409
409
|
declare function PanelsProvider({ children, container: initialContainer }: PanelsProviderProps): react_jsx_runtime.JSX.Element;
|
|
410
410
|
|
|
411
|
-
declare
|
|
412
|
-
declare
|
|
413
|
-
declare
|
|
414
|
-
declare
|
|
411
|
+
declare function usePanneau(): PanneauDefinition | null;
|
|
412
|
+
declare function usePanneauResources(): Resource[];
|
|
413
|
+
declare function usePanneauResource(id: string): Resource | null;
|
|
414
|
+
declare function usePanneauColorScheme(): {
|
|
415
415
|
theme: string;
|
|
416
416
|
background: string | null;
|
|
417
417
|
text: string | null;
|
|
418
418
|
sidebarPosition?: string | null;
|
|
419
419
|
};
|
|
420
|
-
declare
|
|
421
|
-
declare
|
|
422
|
-
declare
|
|
423
|
-
declare
|
|
420
|
+
declare function usePanneauComponents(): Record<string, unknown>;
|
|
421
|
+
declare function usePanneauComponent(namespace: string | null, name: string): string | null;
|
|
422
|
+
declare function usePanneauAuth(): Record<string, unknown>;
|
|
423
|
+
declare function usePanneauSettings(): Record<string, unknown>;
|
|
424
424
|
interface PanneauProviderProps {
|
|
425
425
|
definition: PanneauDefinition;
|
|
426
426
|
children: ReactNode;
|
|
427
427
|
}
|
|
428
428
|
declare function PanneauProvider({ definition, children }: PanneauProviderProps): react_jsx_runtime.JSX.Element;
|
|
429
429
|
|
|
430
|
-
declare
|
|
430
|
+
declare function useResource(): Resource | null;
|
|
431
431
|
interface ResourceProviderProps {
|
|
432
432
|
resource: Resource;
|
|
433
433
|
children: ReactNode;
|
|
434
434
|
}
|
|
435
435
|
declare function ResourceProvider({ resource, children }: ResourceProviderProps): react_jsx_runtime.JSX.Element;
|
|
436
436
|
|
|
437
|
-
declare
|
|
437
|
+
declare function useRoutePush(): (route: string | {
|
|
438
438
|
pathname?: string | null;
|
|
439
439
|
search?: string | null;
|
|
440
|
-
}, data?: unknown, ...args: unknown[]) => void
|
|
441
|
-
declare
|
|
440
|
+
}, data?: unknown, ...args: unknown[]) => void;
|
|
441
|
+
declare function useRouteBack(): () => void;
|
|
442
442
|
|
|
443
|
-
declare
|
|
443
|
+
declare function useTracking(): any;
|
|
444
444
|
interface TrackingProviderProps {
|
|
445
445
|
children: ReactNode;
|
|
446
446
|
variables?: TrackingVariables | null;
|