@panneau/core 4.0.8 → 4.0.14

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.
@@ -1,133 +0,0 @@
1
- /**
2
- * Core UI Types
3
- * TypeScript interfaces corresponding to PanneauPropTypes
4
- */
5
- import { ReactNode } from 'react';
6
-
7
- /**
8
- * Internationalization message definition
9
- */
10
- export interface Message {
11
- id: string;
12
- defaultMessage?: string;
13
- }
14
-
15
- /**
16
- * Label can be either a message object or any React node
17
- */
18
- export type Label = Message | ReactNode;
19
-
20
- /**
21
- * HTTP status code (number or string)
22
- */
23
- export type StatusCode = number | string;
24
-
25
- /**
26
- * Menu item definition
27
- */
28
- export interface MenuItem {
29
- id?: number | string;
30
- label?: Label;
31
- url?: string;
32
- external?: boolean;
33
- active?: boolean;
34
- }
35
-
36
- /**
37
- * Button definition
38
- */
39
- export interface Button {
40
- id?: string;
41
- label?: Label;
42
- onClick?: () => void;
43
- href?: string;
44
- target?: string;
45
- theme?: ButtonTheme;
46
- size?: ButtonSize;
47
- type?: ButtonType;
48
- disabled?: boolean;
49
- external?: boolean;
50
- }
51
-
52
- /**
53
- * Button theme variants (Bootstrap 5)
54
- */
55
- export type ButtonTheme =
56
- | 'primary'
57
- | 'secondary'
58
- | 'success'
59
- | 'danger'
60
- | 'warning'
61
- | 'info'
62
- | 'light'
63
- | 'dark'
64
- | null;
65
-
66
- /**
67
- * Button size variants
68
- */
69
- export type ButtonSize = 'lg' | 'md' | 'sm' | null;
70
-
71
- /**
72
- * Button type attribute
73
- */
74
- export type ButtonType = 'button' | 'submit';
75
-
76
- /**
77
- * Dropdown alignment
78
- */
79
- export type DropdownAlign = 'start' | 'end';
80
-
81
- /**
82
- * Form control size
83
- */
84
- export type ControlSize = 'lg' | 'sm' | null;
85
-
86
- /**
87
- * Form status states
88
- */
89
- export type FormStatus = 'loading' | 'success' | 'error' | null;
90
-
91
- /**
92
- * Form feedback states
93
- */
94
- export type Feedback = 'valid' | 'invalid' | 'loading' | null;
95
-
96
- /**
97
- * Form error object
98
- */
99
- export interface FormError {
100
- message?: string;
101
- }
102
-
103
- /**
104
- * Toggle definition
105
- */
106
- export interface Toggle {
107
- key?: string;
108
- label?: string;
109
- }
110
-
111
- /**
112
- * Breadcrumb definition
113
- */
114
- export interface Breadcrumb {
115
- url?: string;
116
- }
117
-
118
- /**
119
- * Font definition
120
- */
121
- export interface Font {
122
- // Properties to be defined based on requirements
123
- }
124
-
125
- /**
126
- * Tracking variables
127
- */
128
- export type TrackingVariables = Record<string, unknown>;
129
-
130
- /**
131
- * Trigger update identifier
132
- */
133
- export type TriggerUpdate = string;
@@ -1,58 +0,0 @@
1
- /**
2
- * Form Types
3
- * TypeScript interfaces for form-related components
4
- */
5
- import { ReactNode } from 'react';
6
-
7
- import { Label } from './core';
8
-
9
- /**
10
- * Field option for select/radio inputs
11
- */
12
- export interface FieldOption {
13
- value?: string;
14
- label?: string;
15
- }
16
-
17
- /**
18
- * Select option (more flexible than FieldOption)
19
- */
20
- export type SelectOption =
21
- | string
22
- | number
23
- | {
24
- value?: unknown;
25
- label?: Label | string;
26
- }
27
- | Record<string, unknown>;
28
-
29
- /**
30
- * Field definition
31
- */
32
- export interface Field {
33
- name?: string; // Not required on localized fields
34
- type?: string;
35
- component?: string;
36
- label?: ReactNode;
37
- }
38
-
39
- /**
40
- * Form definition
41
- */
42
- export interface Form {
43
- title: ReactNode;
44
- fields?: Field[];
45
- }
46
-
47
- /**
48
- * Table column definition
49
- */
50
- export type TableColumn =
51
- | string
52
- | {
53
- id?: string;
54
- component?: string;
55
- path?: string;
56
- field?: string;
57
- columnClassName?: string;
58
- };
@@ -1,39 +0,0 @@
1
- /**
2
- * Panneau TypeScript Type Definitions
3
- *
4
- * This module exports TypeScript interfaces corresponding to the PanneauPropTypes
5
- * defined in packages/core/src/lib/PropTypes.js
6
- *
7
- * @module @panneau/core/types
8
- */
9
-
10
- // Core UI Types
11
- export type {
12
- Message,
13
- Label,
14
- StatusCode,
15
- MenuItem,
16
- Button,
17
- ButtonTheme,
18
- ButtonSize,
19
- ButtonType,
20
- DropdownAlign,
21
- ControlSize,
22
- FormStatus,
23
- Feedback,
24
- FormError,
25
- Toggle,
26
- Breadcrumb,
27
- Font,
28
- TrackingVariables,
29
- TriggerUpdate,
30
- } from './core';
31
-
32
- // Form Types
33
- export type { FieldOption, SelectOption, Field, Form, TableColumn } from './form';
34
-
35
- // Resource Types
36
- export type { Intl, Resource, Item, User, Media, Preview, Modal, Filter, Uppy } from './resource';
37
-
38
- // Panneau Definition Types
39
- export type { Routes, Page, PanneauDefinition, Definition } from './panneau';
@@ -1,49 +0,0 @@
1
- /**
2
- * Panneau Definition Types
3
- * TypeScript interfaces for main Panneau configuration and definitions
4
- */
5
- import { Intl, Resource } from './resource';
6
-
7
- /**
8
- * Panneau route configuration
9
- */
10
- export interface Routes {
11
- 'resources.index': string;
12
- 'resources.create': string;
13
- 'resources.store': string;
14
- 'resources.show': string;
15
- 'resources.edit': string;
16
- 'resources.update': string;
17
- 'resources.delete': string;
18
- 'resources.destroy': string;
19
- 'resources.duplicate': string;
20
- 'resources.clone': string;
21
- 'resources.restore': string;
22
- }
23
-
24
- /**
25
- * Page definition
26
- */
27
- export interface Page {
28
- component: string;
29
- [key: string]: unknown;
30
- }
31
-
32
- /**
33
- * Panneau definition (main configuration)
34
- */
35
- export interface PanneauDefinition {
36
- name?: string;
37
- resources?: Resource[];
38
- routes?: Routes;
39
- pages?: Record<string, Page>;
40
- intl?: Intl;
41
- }
42
-
43
- /**
44
- * Generic definition
45
- */
46
- export interface Definition {
47
- name?: string;
48
- [key: string]: unknown;
49
- }
@@ -1,93 +0,0 @@
1
- /**
2
- * Resource Types
3
- * TypeScript interfaces for resources, items, users, media, and other entities
4
- */
5
- import { Field } from './form';
6
-
7
- /**
8
- * Internationalization configuration
9
- */
10
- export interface Intl {
11
- locale?: string;
12
- messages?: Record<string, string>;
13
- values?: Record<string, string>;
14
- }
15
-
16
- /**
17
- * Resource definition
18
- */
19
- export interface Resource {
20
- id: string;
21
- name: string;
22
- intl?: Intl;
23
- fields?: Field[];
24
- forms?: Record<string, unknown>;
25
- shows_in_navbar?: boolean;
26
- }
27
-
28
- /**
29
- * Generic item (base interface for data items)
30
- */
31
- export interface Item {
32
- id: string;
33
- [key: string]: unknown;
34
- }
35
-
36
- /**
37
- * User definition
38
- */
39
- export interface User {
40
- id?: number | string;
41
- [key: string]: unknown;
42
- }
43
-
44
- /**
45
- * Media file definition
46
- */
47
- export interface Media {
48
- id: string;
49
- name: string;
50
- type: string;
51
- thumbnail_url?: string;
52
- [key: string]: unknown;
53
- }
54
-
55
- /**
56
- * Preview definition
57
- */
58
- export interface Preview {
59
- id?: string;
60
- [key: string]: unknown;
61
- }
62
-
63
- /**
64
- * Modal definition
65
- */
66
- export interface Modal {
67
- name?: string;
68
- [key: string]: unknown;
69
- }
70
-
71
- /**
72
- * Filter definition
73
- */
74
- export interface Filter {
75
- id?: string;
76
- component?: string;
77
- [key: string]: unknown;
78
- }
79
-
80
- /**
81
- * Uppy configuration
82
- */
83
- export interface Uppy {
84
- tus?: Record<string, unknown>;
85
- [key: string]: unknown;
86
- }
87
-
88
- /**
89
- * Uppy instance
90
- */
91
- export interface uppy {
92
- [key: string]: unknown;
93
- }
package/hooks.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('./lib/hooks');