5htp-core 0.6.0 → 0.6.1
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/client/app/component.tsx +1 -0
- package/client/assets/css/colors.less +46 -25
- package/client/assets/css/components/button.less +14 -5
- package/client/assets/css/components/card.less +5 -10
- package/client/assets/css/components/mantine.less +6 -5
- package/client/assets/css/components/table.less +1 -1
- package/client/assets/css/text/icons.less +1 -1
- package/client/assets/css/text/text.less +4 -0
- package/client/assets/css/utils/borders.less +1 -1
- package/client/assets/css/utils/layouts.less +8 -5
- package/client/components/Button.tsx +20 -17
- package/client/components/Checkbox.tsx +6 -1
- package/client/components/ConnectedInput.tsx +34 -0
- package/client/components/DropDown.tsx +21 -4
- package/client/components/Input.tsx +2 -2
- package/client/components/Rte/Editor.tsx +23 -9
- package/client/components/Rte/ToolbarPlugin/ElementFormat.tsx +1 -1
- package/client/components/Rte/ToolbarPlugin/index.tsx +272 -183
- package/client/components/Rte/currentEditor.ts +31 -2
- package/client/components/Rte/index.tsx +3 -0
- package/client/components/Rte/plugins/FloatingTextFormatToolbarPlugin/index.tsx +4 -1
- package/client/components/Select.tsx +29 -16
- package/client/components/Table/index.tsx +27 -11
- package/client/components/containers/Popover/index.tsx +21 -4
- package/client/components/index.ts +4 -2
- package/client/services/router/index.tsx +7 -5
- package/common/errors/index.tsx +27 -3
- package/common/router/index.ts +4 -1
- package/common/utils/rte.ts +183 -0
- package/package.json +3 -2
- package/server/app/container/console/index.ts +62 -42
- package/server/app/container/index.ts +4 -0
- package/server/app/service/index.ts +4 -2
- package/server/services/auth/index.ts +28 -14
- package/server/services/auth/router/index.ts +1 -1
- package/server/services/auth/router/request.ts +4 -4
- package/server/services/email/index.ts +8 -51
- package/server/services/prisma/Facet.ts +118 -0
- package/server/services/prisma/index.ts +24 -0
- package/server/services/router/http/index.ts +0 -2
- package/server/services/router/index.ts +220 -86
- package/server/services/router/response/index.ts +0 -15
- package/server/utils/rte.ts +21 -132
- package/types/global/utils.d.ts +4 -22
- package/types/icons.d.ts +1 -1
- package/server/services/email/service.json +0 -6
- package/server/services/email/templates.ts +0 -49
- package/server/services/email/transporter.ts +0 -31
package/types/global/utils.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ declare type With<
|
|
|
13
13
|
TAdditionnal
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
+
declare type NonNullFields<T, K extends keyof T> = Omit<T, K> & {
|
|
17
|
+
[P in K]: NonNullable<T[P]>;
|
|
18
|
+
};
|
|
19
|
+
|
|
16
20
|
declare type ValueOf<T> = T[keyof T];
|
|
17
21
|
|
|
18
22
|
// Extrait la valeur de retour d'une promise
|
|
@@ -78,26 +82,4 @@ type TServiceRef = {
|
|
|
78
82
|
|
|
79
83
|
type TServiceSubservices = {
|
|
80
84
|
[key: string]: TServiceSetup | TServiceRef
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
declare module '@cli/app' {
|
|
84
|
-
type App = {
|
|
85
|
-
|
|
86
|
-
env: TEnvConfig;
|
|
87
|
-
|
|
88
|
-
use: (referenceName: string) => TServiceRef;
|
|
89
|
-
|
|
90
|
-
setup: (...args: [
|
|
91
|
-
// { user: app.setup('Core/User') }
|
|
92
|
-
servicePath: string,
|
|
93
|
-
serviceConfig?: {}
|
|
94
|
-
] | [
|
|
95
|
-
// app.setup('User', 'Core/User')
|
|
96
|
-
serviceName: string,
|
|
97
|
-
servicePath: string,
|
|
98
|
-
serviceConfig?: {}
|
|
99
|
-
]) => TServiceSetup;
|
|
100
|
-
}
|
|
101
|
-
const app: App;
|
|
102
|
-
export = app;
|
|
103
85
|
}
|
package/types/icons.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TIcones = "solid/spinner-third"|"times-circle"|"
|
|
1
|
+
export type TIcones = "solid/spinner-third"|"long-arrow-right"|"times-circle"|"brands/whatsapp"|"times"|"search"|"user"|"rocket"|"globe"|"bullhorn"|"briefcase"|"chart-line"|"handshake"|"ellipsis-h"|"brands/google"|"brands/reddit-alien"|"brands/linkedin-in"|"brands/github"|"robot"|"comments"|"user-friends"|"angle-down"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"info-circle"|"check-circle"|"exclamation-circle"|"chart-bar"|"power-off"|"heart"|"lock"|"eye"|"credit-card"|"at"|"brands/linkedin"|"key"|"exclamation"|"solid/download"|"bars"|"font"|"tag"|"compress"|"bolt"|"puzzle-piece"|"planet-ringed"|"database"|"solid/fire"|"usd-circle"|"lightbulb"|"solid/dollar-sign"|"download"|"code"|"solid/clock"|"seedling"|"palette"|"car"|"plane"|"university"|"hard-hat"|"graduation-cap"|"cogs"|"film"|"leaf"|"tshirt"|"utensils"|"map-marked-alt"|"dumbbell"|"stethoscope"|"concierge-bell"|"book"|"shield-alt"|"gavel"|"industry"|"square-root-alt"|"newspaper"|"pills"|"medal"|"capsules"|"balance-scale"|"home"|"praying-hands"|"shopping-cart"|"flask"|"futbol"|"microchip"|"satellite-dish"|"shipping-fast"|"passport"|"tools"|"user-circle"|"plus-circle"|"brands/twitter"|"brands/facebook"|"comment-alt"|"paper-plane"|"check"|"angle-left"|"angle-right"|"trash"|"arrow-left"|"arrow-right"|"meh-rolling-eyes"|"bold"|"italic"|"underline"|"link"|"strikethrough"|"subscript"|"superscript"|"empty-set"|"horizontal-rule"|"page-break"|"image"|"table"|"poll"|"columns"|"sticky-note"|"caret-right"|"file"|"unlink"|"pen"|"plus"|"list-ul"|"check-square"|"h1"|"h2"|"h3"|"h4"|"list-ol"|"paragraph"|"quote-left"|"align-left"|"align-center"|"align-right"|"align-justify"|"indent"|"outdent"
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*----------------------------------
|
|
2
|
-
- DEPENDANCES
|
|
3
|
-
----------------------------------*/
|
|
4
|
-
|
|
5
|
-
import Handlebars, { TemplateDelegate } from 'handlebars';
|
|
6
|
-
|
|
7
|
-
//import * as templates from '@cache/serveur/emails';
|
|
8
|
-
import templatesDefault from '@root/default/serveur/emails/*.hbs';
|
|
9
|
-
import templatesProjet from '@/*/serveur/emails/*.hbs';
|
|
10
|
-
const templates = { ...templatesDefault, ...templatesProjet }
|
|
11
|
-
import url from '@commun/routeur/url';
|
|
12
|
-
|
|
13
|
-
/*----------------------------------
|
|
14
|
-
- HELPERS
|
|
15
|
-
----------------------------------*/
|
|
16
|
-
|
|
17
|
-
Handlebars.registerHelper('plur', (mot: string, nb: number) =>
|
|
18
|
-
mot + (nb > 1 ? 's' : '')
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
Handlebars.registerHelper('url', (route: string, params?: any, absolu?: boolean) =>
|
|
22
|
-
url(route, params, absolu)
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
/*----------------------------------
|
|
26
|
-
- FONCTIONS
|
|
27
|
-
----------------------------------*/
|
|
28
|
-
const cache: {[nomTemplate: string]: TemplateDelegate} = {}
|
|
29
|
-
|
|
30
|
-
export const compiler = async () => {
|
|
31
|
-
|
|
32
|
-
console.log(`[boot] Précompilation de ${Object.keys(templates).length} templates email`);
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
for (const nomTemplate in templates) {
|
|
36
|
-
|
|
37
|
-
const template = templates[nomTemplate];
|
|
38
|
-
|
|
39
|
-
cache[ nomTemplate ] = Handlebars.compile(template, {
|
|
40
|
-
strict: true, // Erreur quand variable inexistante
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
} catch (error) {
|
|
45
|
-
console.error(`Erreur lors de la précompilation des templates email:`, error);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default cache
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*----------------------------------
|
|
2
|
-
- DEPENDANCES
|
|
3
|
-
----------------------------------*/
|
|
4
|
-
|
|
5
|
-
// Npm
|
|
6
|
-
|
|
7
|
-
// Core
|
|
8
|
-
import type Application from "@server/app";
|
|
9
|
-
import Service from '@server/app/service';
|
|
10
|
-
import type EmailService from '@server/services/email';
|
|
11
|
-
|
|
12
|
-
// Specific
|
|
13
|
-
import type { TCompleteEmail } from ".";
|
|
14
|
-
|
|
15
|
-
/*----------------------------------
|
|
16
|
-
- TYPES
|
|
17
|
-
----------------------------------*/
|
|
18
|
-
|
|
19
|
-
export type TBasicConfig = {
|
|
20
|
-
api: string,
|
|
21
|
-
debug: boolean
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/*----------------------------------
|
|
25
|
-
- CLASS
|
|
26
|
-
----------------------------------*/
|
|
27
|
-
export abstract class Transporter<TConfig extends TBasicConfig = TBasicConfig>
|
|
28
|
-
extends Service<TConfig, {}, Application> {
|
|
29
|
-
|
|
30
|
-
public abstract send( emails: TCompleteEmail[] ): Promise<void>;
|
|
31
|
-
}
|