@blackcube/aurelia2-bleet 1.0.0
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/blackcube-aurelia2-bleet-1.0.0.tgz +0 -0
- package/dist/index.es.js +4514 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +4549 -0
- package/dist/index.js.map +1 -0
- package/dist/types/attributes/ajaxify-trigger.d.ts +36 -0
- package/dist/types/attributes/ajaxify-trigger.d.ts.map +1 -0
- package/dist/types/attributes/alert.d.ts +15 -0
- package/dist/types/attributes/alert.d.ts.map +1 -0
- package/dist/types/attributes/badge.d.ts +13 -0
- package/dist/types/attributes/badge.d.ts.map +1 -0
- package/dist/types/attributes/burger.d.ts +11 -0
- package/dist/types/attributes/burger.d.ts.map +1 -0
- package/dist/types/attributes/drawer-trigger.d.ts +16 -0
- package/dist/types/attributes/drawer-trigger.d.ts.map +1 -0
- package/dist/types/attributes/dropdown.d.ts +38 -0
- package/dist/types/attributes/dropdown.d.ts.map +1 -0
- package/dist/types/attributes/index.d.ts +16 -0
- package/dist/types/attributes/index.d.ts.map +1 -0
- package/dist/types/attributes/menu.d.ts +32 -0
- package/dist/types/attributes/menu.d.ts.map +1 -0
- package/dist/types/attributes/modal-trigger.d.ts +16 -0
- package/dist/types/attributes/modal-trigger.d.ts.map +1 -0
- package/dist/types/attributes/pager.d.ts +13 -0
- package/dist/types/attributes/pager.d.ts.map +1 -0
- package/dist/types/attributes/password.d.ts +15 -0
- package/dist/types/attributes/password.d.ts.map +1 -0
- package/dist/types/attributes/profile.d.ts +24 -0
- package/dist/types/attributes/profile.d.ts.map +1 -0
- package/dist/types/attributes/select.d.ts +24 -0
- package/dist/types/attributes/select.d.ts.map +1 -0
- package/dist/types/attributes/tabs.d.ts +16 -0
- package/dist/types/attributes/tabs.d.ts.map +1 -0
- package/dist/types/attributes/toaster-trigger.d.ts +19 -0
- package/dist/types/attributes/toaster-trigger.d.ts.map +1 -0
- package/dist/types/attributes/upload.d.ts +57 -0
- package/dist/types/attributes/upload.d.ts.map +1 -0
- package/dist/types/codecs/ajaxify-codec.d.ts +5 -0
- package/dist/types/codecs/ajaxify-codec.d.ts.map +1 -0
- package/dist/types/codecs/csrf-codec.d.ts +7 -0
- package/dist/types/codecs/csrf-codec.d.ts.map +1 -0
- package/dist/types/codecs/request-codec.d.ts +5 -0
- package/dist/types/codecs/request-codec.d.ts.map +1 -0
- package/dist/types/components/bleet-ajaxify.d.ts +17 -0
- package/dist/types/components/bleet-ajaxify.d.ts.map +1 -0
- package/dist/types/components/bleet-ajaxify.html.d.ts +3 -0
- package/dist/types/components/bleet-ajaxify.html.d.ts.map +1 -0
- package/dist/types/components/bleet-drawer.d.ts +40 -0
- package/dist/types/components/bleet-drawer.d.ts.map +1 -0
- package/dist/types/components/bleet-drawer.html.d.ts +3 -0
- package/dist/types/components/bleet-drawer.html.d.ts.map +1 -0
- package/dist/types/components/bleet-modal.d.ts +46 -0
- package/dist/types/components/bleet-modal.d.ts.map +1 -0
- package/dist/types/components/bleet-modal.html.d.ts +3 -0
- package/dist/types/components/bleet-modal.html.d.ts.map +1 -0
- package/dist/types/components/bleet-overlay.d.ts +21 -0
- package/dist/types/components/bleet-overlay.d.ts.map +1 -0
- package/dist/types/components/bleet-quilljs.d.ts +19 -0
- package/dist/types/components/bleet-quilljs.d.ts.map +1 -0
- package/dist/types/components/bleet-quilljs.html.d.ts +3 -0
- package/dist/types/components/bleet-quilljs.html.d.ts.map +1 -0
- package/dist/types/components/bleet-toast.d.ts +26 -0
- package/dist/types/components/bleet-toast.d.ts.map +1 -0
- package/dist/types/components/bleet-toast.html.d.ts +3 -0
- package/dist/types/components/bleet-toast.html.d.ts.map +1 -0
- package/dist/types/components/bleet-toaster-trigger.d.ts +20 -0
- package/dist/types/components/bleet-toaster-trigger.d.ts.map +1 -0
- package/dist/types/components/bleet-toaster.d.ts +15 -0
- package/dist/types/components/bleet-toaster.d.ts.map +1 -0
- package/dist/types/components/bleet-toaster.html.d.ts +3 -0
- package/dist/types/components/bleet-toaster.html.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +9 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/configure.d.ts +35 -0
- package/dist/types/configure.d.ts.map +1 -0
- package/dist/types/enums/api.d.ts +11 -0
- package/dist/types/enums/api.d.ts.map +1 -0
- package/dist/types/enums/event-aggregator.d.ts +123 -0
- package/dist/types/enums/event-aggregator.d.ts.map +1 -0
- package/dist/types/index.d.ts +26 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/interfaces/api.d.ts +56 -0
- package/dist/types/interfaces/api.d.ts.map +1 -0
- package/dist/types/interfaces/dialog.d.ts +18 -0
- package/dist/types/interfaces/dialog.d.ts.map +1 -0
- package/dist/types/interfaces/event-aggregator.d.ts +75 -0
- package/dist/types/interfaces/event-aggregator.d.ts.map +1 -0
- package/dist/types/services/api-service.d.ts +64 -0
- package/dist/types/services/api-service.d.ts.map +1 -0
- package/dist/types/services/http-service.d.ts +22 -0
- package/dist/types/services/http-service.d.ts.map +1 -0
- package/dist/types/services/socketio-service.d.ts +23 -0
- package/dist/types/services/socketio-service.d.ts.map +1 -0
- package/dist/types/services/storage-service.d.ts +13 -0
- package/dist/types/services/storage-service.d.ts.map +1 -0
- package/dist/types/services/svg-service.d.ts +17 -0
- package/dist/types/services/svg-service.d.ts.map +1 -0
- package/dist/types/services/transition-service.d.ts +13 -0
- package/dist/types/services/transition-service.d.ts.map +1 -0
- package/dist/types/services/trap-focus-service.d.ts +28 -0
- package/dist/types/services/trap-focus-service.d.ts.map +1 -0
- package/doc/bleet-api-reference.md +1333 -0
- package/doc/bleet-model-api-reference.md +379 -0
- package/doc/bleet-typescript-api-reference.md +1037 -0
- package/package.json +43 -0
- package/resource.d.ts +22 -0
- package/src/attributes/ajaxify-trigger.ts +218 -0
- package/src/attributes/alert.ts +55 -0
- package/src/attributes/badge.ts +39 -0
- package/src/attributes/burger.ts +36 -0
- package/src/attributes/drawer-trigger.ts +53 -0
- package/src/attributes/dropdown.ts +377 -0
- package/src/attributes/index.ts +15 -0
- package/src/attributes/menu.ts +179 -0
- package/src/attributes/modal-trigger.ts +53 -0
- package/src/attributes/pager.ts +43 -0
- package/src/attributes/password.ts +47 -0
- package/src/attributes/profile.ts +112 -0
- package/src/attributes/select.ts +214 -0
- package/src/attributes/tabs.ts +99 -0
- package/src/attributes/toaster-trigger.ts +54 -0
- package/src/attributes/upload.ts +380 -0
- package/src/codecs/ajaxify-codec.ts +16 -0
- package/src/codecs/csrf-codec.ts +41 -0
- package/src/codecs/request-codec.ts +16 -0
- package/src/components/bleet-ajaxify.html.ts +4 -0
- package/src/components/bleet-ajaxify.ts +62 -0
- package/src/components/bleet-drawer.html.ts +36 -0
- package/src/components/bleet-drawer.ts +236 -0
- package/src/components/bleet-modal.html.ts +30 -0
- package/src/components/bleet-modal.ts +274 -0
- package/src/components/bleet-overlay.ts +111 -0
- package/src/components/bleet-quilljs.html.ts +4 -0
- package/src/components/bleet-quilljs.ts +73 -0
- package/src/components/bleet-toast.html.ts +44 -0
- package/src/components/bleet-toast.ts +133 -0
- package/src/components/bleet-toaster-trigger.ts +66 -0
- package/src/components/bleet-toaster.html.ts +11 -0
- package/src/components/bleet-toaster.ts +72 -0
- package/src/components/index.ts +8 -0
- package/src/configure.ts +121 -0
- package/src/enums/api.ts +12 -0
- package/src/enums/event-aggregator.ts +131 -0
- package/src/index.ts +220 -0
- package/src/interfaces/api.ts +64 -0
- package/src/interfaces/dialog.ts +25 -0
- package/src/interfaces/event-aggregator.ts +88 -0
- package/src/services/api-service.ts +387 -0
- package/src/services/http-service.ts +166 -0
- package/src/services/socketio-service.ts +138 -0
- package/src/services/storage-service.ts +36 -0
- package/src/services/svg-service.ts +35 -0
- package/src/services/transition-service.ts +39 -0
- package/src/services/trap-focus-service.ts +213 -0
- package/src/types/css.d.ts +4 -0
- package/src/types/html.d.ts +12 -0
- package/src/types/svg.d.ts +4 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { IContainer, IRegistry } from 'aurelia';
|
|
2
|
+
import { ConfigInterface, IBleetConfiguration } from './configure';
|
|
3
|
+
import { Transport, TransportConfig } from './enums/api';
|
|
4
|
+
import { ITransport } from './interfaces/api';
|
|
5
|
+
import { IHttpService } from './services/http-service';
|
|
6
|
+
import { ISvgService } from './services/svg-service';
|
|
7
|
+
import { IApiService } from './services/api-service';
|
|
8
|
+
import { ISocketioService } from './services/socketio-service';
|
|
9
|
+
import { IStorageService } from './services/storage-service';
|
|
10
|
+
import { ITransitionService } from './services/transition-service';
|
|
11
|
+
import { ITrapFocusService } from './services/trap-focus-service';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
BleetAlertCustomAttribute,
|
|
15
|
+
BleetBadgeCustomAttribute,
|
|
16
|
+
BleetBurgerCustomAttribute,
|
|
17
|
+
BleetDrawerTriggerCustomAttribute,
|
|
18
|
+
BleetDropdownCustomAttribute,
|
|
19
|
+
BleetMenuCustomAttribute,
|
|
20
|
+
BleetModalTriggerCustomAttribute,
|
|
21
|
+
BleetPagerCustomAttribute,
|
|
22
|
+
BleetPasswordCustomAttribute,
|
|
23
|
+
BleetProfileCustomAttribute,
|
|
24
|
+
BleetSelectCustomAttribute,
|
|
25
|
+
BleetTabsCustomAttribute,
|
|
26
|
+
BleetToasterTriggerCustomAttribute,
|
|
27
|
+
BleetUploadCustomAttribute,
|
|
28
|
+
BleetAjaxifyTriggerCustomAttribute
|
|
29
|
+
} from './attributes';
|
|
30
|
+
|
|
31
|
+
import {
|
|
32
|
+
BleetOverlay,
|
|
33
|
+
BleetToast,
|
|
34
|
+
BleetToaster,
|
|
35
|
+
BleetToasterTrigger,
|
|
36
|
+
BleetModal,
|
|
37
|
+
BleetDrawer,
|
|
38
|
+
BleetAjaxify,
|
|
39
|
+
BleetQuilljs
|
|
40
|
+
} from './components';
|
|
41
|
+
|
|
42
|
+
import {
|
|
43
|
+
Channels,
|
|
44
|
+
OverlayAction,
|
|
45
|
+
OverlayStatus,
|
|
46
|
+
ProfileAction,
|
|
47
|
+
ProfileStatus,
|
|
48
|
+
ModalAction,
|
|
49
|
+
ModalStatus,
|
|
50
|
+
DrawerAction,
|
|
51
|
+
DrawerStatus,
|
|
52
|
+
ToasterAction,
|
|
53
|
+
ToasterStatus,
|
|
54
|
+
MenuAction,
|
|
55
|
+
MenuStatus,
|
|
56
|
+
BadgeAction,
|
|
57
|
+
UiColor,
|
|
58
|
+
UiToastIcon,
|
|
59
|
+
UiIcon,
|
|
60
|
+
DialogAction,
|
|
61
|
+
AjaxifyAction
|
|
62
|
+
} from './enums/event-aggregator';
|
|
63
|
+
|
|
64
|
+
import { IDialogResponse } from './interfaces/dialog';
|
|
65
|
+
|
|
66
|
+
import {
|
|
67
|
+
IOverlay,
|
|
68
|
+
IOverlayStatus,
|
|
69
|
+
IModal,
|
|
70
|
+
IModalStatus,
|
|
71
|
+
IDrawer,
|
|
72
|
+
IDrawerStatus,
|
|
73
|
+
IToaster,
|
|
74
|
+
IToasterStatus,
|
|
75
|
+
IToast,
|
|
76
|
+
IMenu,
|
|
77
|
+
IMenuStatus,
|
|
78
|
+
IBadge,
|
|
79
|
+
IProfile,
|
|
80
|
+
IProfileStatus,
|
|
81
|
+
IAjaxify
|
|
82
|
+
} from './interfaces/event-aggregator';
|
|
83
|
+
|
|
84
|
+
import { AjaxifyCodec } from './codecs/ajaxify-codec';
|
|
85
|
+
import { RequestCodec } from './codecs/request-codec';
|
|
86
|
+
import { CsrfCodec } from './codecs/csrf-codec';
|
|
87
|
+
import { CsrfConfig } from './configure';
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
// attributes
|
|
91
|
+
BleetAlertCustomAttribute,
|
|
92
|
+
BleetBadgeCustomAttribute,
|
|
93
|
+
BleetBurgerCustomAttribute,
|
|
94
|
+
BleetDrawerTriggerCustomAttribute,
|
|
95
|
+
BleetDropdownCustomAttribute,
|
|
96
|
+
BleetMenuCustomAttribute,
|
|
97
|
+
BleetModalTriggerCustomAttribute,
|
|
98
|
+
BleetPagerCustomAttribute,
|
|
99
|
+
BleetPasswordCustomAttribute,
|
|
100
|
+
BleetProfileCustomAttribute,
|
|
101
|
+
BleetSelectCustomAttribute,
|
|
102
|
+
BleetTabsCustomAttribute,
|
|
103
|
+
BleetToasterTriggerCustomAttribute,
|
|
104
|
+
BleetUploadCustomAttribute,
|
|
105
|
+
BleetAjaxifyTriggerCustomAttribute,
|
|
106
|
+
// components
|
|
107
|
+
BleetOverlay,
|
|
108
|
+
BleetToast,
|
|
109
|
+
BleetToaster,
|
|
110
|
+
BleetToasterTrigger,
|
|
111
|
+
BleetModal,
|
|
112
|
+
BleetDrawer,
|
|
113
|
+
BleetAjaxify,
|
|
114
|
+
BleetQuilljs,
|
|
115
|
+
// enums
|
|
116
|
+
Channels,
|
|
117
|
+
OverlayAction,
|
|
118
|
+
OverlayStatus,
|
|
119
|
+
ProfileAction,
|
|
120
|
+
ProfileStatus,
|
|
121
|
+
ModalAction,
|
|
122
|
+
ModalStatus,
|
|
123
|
+
DrawerAction,
|
|
124
|
+
DrawerStatus,
|
|
125
|
+
ToasterAction,
|
|
126
|
+
AjaxifyAction,
|
|
127
|
+
ToasterStatus,
|
|
128
|
+
MenuAction,
|
|
129
|
+
MenuStatus,
|
|
130
|
+
BadgeAction,
|
|
131
|
+
UiColor,
|
|
132
|
+
UiToastIcon,
|
|
133
|
+
UiIcon,
|
|
134
|
+
DialogAction,
|
|
135
|
+
Transport,
|
|
136
|
+
// types
|
|
137
|
+
TransportConfig,
|
|
138
|
+
// interfaces
|
|
139
|
+
ITransport,
|
|
140
|
+
IOverlay,
|
|
141
|
+
IOverlayStatus,
|
|
142
|
+
IModal,
|
|
143
|
+
IModalStatus,
|
|
144
|
+
IDrawer,
|
|
145
|
+
IDrawerStatus,
|
|
146
|
+
IToaster,
|
|
147
|
+
IToasterStatus,
|
|
148
|
+
IToast,
|
|
149
|
+
IMenu,
|
|
150
|
+
IMenuStatus,
|
|
151
|
+
IBadge,
|
|
152
|
+
IProfile,
|
|
153
|
+
IProfileStatus,
|
|
154
|
+
IDialogResponse,
|
|
155
|
+
IAjaxify,
|
|
156
|
+
AjaxifyCodec,
|
|
157
|
+
RequestCodec,
|
|
158
|
+
CsrfCodec,
|
|
159
|
+
CsrfConfig,
|
|
160
|
+
// services
|
|
161
|
+
IHttpService,
|
|
162
|
+
IApiService,
|
|
163
|
+
ISocketioService,
|
|
164
|
+
IStorageService,
|
|
165
|
+
ITransitionService,
|
|
166
|
+
ITrapFocusService,
|
|
167
|
+
ISvgService
|
|
168
|
+
};
|
|
169
|
+
const DefaultComponents: IRegistry[] = [
|
|
170
|
+
// attributes
|
|
171
|
+
BleetAlertCustomAttribute as unknown as IRegistry,
|
|
172
|
+
BleetBurgerCustomAttribute as unknown as IRegistry,
|
|
173
|
+
BleetDrawerTriggerCustomAttribute as unknown as IRegistry,
|
|
174
|
+
BleetDropdownCustomAttribute as unknown as IRegistry,
|
|
175
|
+
BleetMenuCustomAttribute as unknown as IRegistry,
|
|
176
|
+
BleetModalTriggerCustomAttribute as unknown as IRegistry,
|
|
177
|
+
BleetPagerCustomAttribute as unknown as IRegistry,
|
|
178
|
+
BleetProfileCustomAttribute as unknown as IRegistry,
|
|
179
|
+
BleetPasswordCustomAttribute as unknown as IRegistry,
|
|
180
|
+
BleetSelectCustomAttribute as unknown as IRegistry,
|
|
181
|
+
BleetBadgeCustomAttribute as unknown as IRegistry,
|
|
182
|
+
BleetTabsCustomAttribute as unknown as IRegistry,
|
|
183
|
+
BleetToasterTriggerCustomAttribute as unknown as IRegistry,
|
|
184
|
+
BleetUploadCustomAttribute as unknown as IRegistry,
|
|
185
|
+
BleetAjaxifyTriggerCustomAttribute as unknown as IRegistry,
|
|
186
|
+
// components
|
|
187
|
+
BleetOverlay as unknown as IRegistry,
|
|
188
|
+
BleetToast as unknown as IRegistry,
|
|
189
|
+
BleetToaster as unknown as IRegistry,
|
|
190
|
+
BleetToasterTrigger as unknown as IRegistry,
|
|
191
|
+
BleetModal as unknown as IRegistry,
|
|
192
|
+
BleetDrawer as unknown as IRegistry,
|
|
193
|
+
BleetAjaxify as unknown as IRegistry,
|
|
194
|
+
BleetQuilljs as unknown as IRegistry
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
function createBleetConfiguration(optionsCallback?: (options: ConfigInterface) => void) {
|
|
198
|
+
return {
|
|
199
|
+
register(container: IContainer) {
|
|
200
|
+
const configClass = container.get(IBleetConfiguration);
|
|
201
|
+
configClass.setContainer(container);
|
|
202
|
+
|
|
203
|
+
if (optionsCallback) {
|
|
204
|
+
const options = configClass.getConfig();
|
|
205
|
+
optionsCallback(options);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Enregistrer l'interface HTTP (toujours disponible)
|
|
209
|
+
configClass.registerTransportInterface(Transport.Http, IHttpService);
|
|
210
|
+
// Socketio sera résolu à la demande dans getTransport()
|
|
211
|
+
|
|
212
|
+
return container.register(...DefaultComponents);
|
|
213
|
+
},
|
|
214
|
+
customize(callback: (options: ConfigInterface) => void) {
|
|
215
|
+
return createBleetConfiguration(callback);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export const BleetConfiguration = createBleetConfiguration();
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {Transport} from '../enums/api';
|
|
2
|
+
|
|
3
|
+
export interface ITransport {
|
|
4
|
+
readonly type: Transport;
|
|
5
|
+
isAvailable(): boolean;
|
|
6
|
+
prepareRequest(ctx: IHttpRequest): IHttpRequest;
|
|
7
|
+
execute<T>(ctx: IHttpRequest, responseType?: string): Promise<IHttpResponse<T>>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IHttpResponse<T = any> {
|
|
11
|
+
statusCode: number;
|
|
12
|
+
headers: Record<string, string>;
|
|
13
|
+
body: T;
|
|
14
|
+
pagination?: IPagination;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IPagination {
|
|
18
|
+
page: number;
|
|
19
|
+
pageCount: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
totalCount: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IHttpRequest<T = any> {
|
|
25
|
+
url: string;
|
|
26
|
+
method: string;
|
|
27
|
+
headers: Record<string, string>;
|
|
28
|
+
data?: T;
|
|
29
|
+
pathParams?: Record<string, any>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ICodec<TIn = any, TOut = any> {
|
|
33
|
+
encode?: (ctx: IHttpRequest<TIn>) => Promise<IHttpRequest<TIn>>;
|
|
34
|
+
decode?: (ctx: IHttpResponse<TOut>) => Promise<IHttpResponse<TOut>>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ICacheConfig {
|
|
38
|
+
ttl?: number;
|
|
39
|
+
storage?: 'memory' | 'session';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IPaginationConfig {
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
page?: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IBuiltRequest {
|
|
48
|
+
url: string;
|
|
49
|
+
method: string;
|
|
50
|
+
headers: Record<string, string>;
|
|
51
|
+
data?: any;
|
|
52
|
+
pathParams?: Record<string, any>;
|
|
53
|
+
responseType: 'json' | 'text' | 'blob' | 'arraybuffer' | 'auto';
|
|
54
|
+
inputCodecs: ICodec[];
|
|
55
|
+
outputCodecs: ICodec[];
|
|
56
|
+
pagination: IPaginationConfig | null;
|
|
57
|
+
cache: ICacheConfig | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ICacheEntry {
|
|
61
|
+
data: any;
|
|
62
|
+
expires: number | null;
|
|
63
|
+
created: number;
|
|
64
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DialogAction, UiColor } from '../enums/event-aggregator';
|
|
2
|
+
import {IAjaxify, IToast} from './event-aggregator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Réponse serveur pour load URL et submit form
|
|
6
|
+
*/
|
|
7
|
+
export interface IDialogResponse {
|
|
8
|
+
// Style — optionnels avec défauts
|
|
9
|
+
color?: UiColor;
|
|
10
|
+
icon?: string | null; // Clé UiIcon ou SVG inline
|
|
11
|
+
|
|
12
|
+
// Contenu HTML à injecter
|
|
13
|
+
header?: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
footer?: string;
|
|
16
|
+
|
|
17
|
+
// Action primaire (obligatoire)
|
|
18
|
+
action: DialogAction;
|
|
19
|
+
|
|
20
|
+
// Actions secondaires (combinables)
|
|
21
|
+
toast?: IToast;
|
|
22
|
+
ajaxify?: IAjaxify,
|
|
23
|
+
redirect?: string;
|
|
24
|
+
refresh?: boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UiColor,
|
|
3
|
+
DrawerAction,
|
|
4
|
+
ModalAction,
|
|
5
|
+
OverlayAction,
|
|
6
|
+
ToasterAction,
|
|
7
|
+
UiToastIcon,
|
|
8
|
+
MenuAction, OverlayStatus, ToasterStatus, MenuStatus, DrawerStatus, ModalStatus, BadgeAction, ProfileAction,
|
|
9
|
+
ProfileStatus, AjaxifyAction
|
|
10
|
+
} from '../enums/event-aggregator';
|
|
11
|
+
|
|
12
|
+
export interface IOverlay {
|
|
13
|
+
action: OverlayAction;
|
|
14
|
+
}
|
|
15
|
+
export interface IOverlayStatus {
|
|
16
|
+
status: OverlayStatus;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IModal {
|
|
20
|
+
action: ModalAction;
|
|
21
|
+
id?: string;
|
|
22
|
+
url?: string;
|
|
23
|
+
color?: string;
|
|
24
|
+
content?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IModalStatus {
|
|
27
|
+
status: ModalStatus;
|
|
28
|
+
id?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IDrawer {
|
|
32
|
+
action: DrawerAction;
|
|
33
|
+
id?: string;
|
|
34
|
+
url?: string;
|
|
35
|
+
color?: string;
|
|
36
|
+
content?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IDrawerStatus {
|
|
39
|
+
status: DrawerStatus;
|
|
40
|
+
id?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface IToaster {
|
|
44
|
+
action: ToasterAction;
|
|
45
|
+
toast?: IToast;
|
|
46
|
+
}
|
|
47
|
+
export interface IToasterStatus {
|
|
48
|
+
status: ToasterStatus;
|
|
49
|
+
id?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface IToast {
|
|
53
|
+
id?: string;
|
|
54
|
+
icon?: UiToastIcon;
|
|
55
|
+
color: UiColor;
|
|
56
|
+
title?: string;
|
|
57
|
+
content: string;
|
|
58
|
+
duration?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface IMenuStatus {
|
|
61
|
+
status: MenuStatus;
|
|
62
|
+
}
|
|
63
|
+
export interface IMenu {
|
|
64
|
+
action: MenuAction;
|
|
65
|
+
}
|
|
66
|
+
export interface IBadge {
|
|
67
|
+
action: BadgeAction;
|
|
68
|
+
id?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface IProfileStatus {
|
|
71
|
+
status: ProfileStatus;
|
|
72
|
+
id?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface IProfile {
|
|
75
|
+
action: ProfileAction;
|
|
76
|
+
id?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface IAjaxify {
|
|
79
|
+
action: AjaxifyAction;
|
|
80
|
+
id?: string;
|
|
81
|
+
url?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface IAjaxifyResponse {
|
|
84
|
+
element?: string;
|
|
85
|
+
checked?: boolean;
|
|
86
|
+
toast?: IToast;
|
|
87
|
+
ajaxify?: IAjaxify;
|
|
88
|
+
}
|