angular-generate 2.2.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/README.md +149 -0
- package/explication_conception.md +119 -0
- package/package.json +28 -0
- package/src/api/index.d.ts +2 -0
- package/src/api/index.js +18 -0
- package/src/api/index.js.map +1 -0
- package/src/api/index_spec.d.ts +1 -0
- package/src/api/index_spec.js +23 -0
- package/src/api/index_spec.js.map +1 -0
- package/src/api/schema.json +17 -0
- package/src/collection.json +88 -0
- package/src/component/add/index.d.ts +2 -0
- package/src/component/add/index.js +64 -0
- package/src/component/add/index.js.map +1 -0
- package/src/component/add/index_spec.d.ts +1 -0
- package/src/component/add/index_spec.js +23 -0
- package/src/component/add/index_spec.js.map +1 -0
- package/src/component/deconnexion/index.d.ts +2 -0
- package/src/component/deconnexion/index.js +88 -0
- package/src/component/deconnexion/index.js.map +1 -0
- package/src/component/deconnexion/index_spec.d.ts +1 -0
- package/src/component/deconnexion/index_spec.js +23 -0
- package/src/component/deconnexion/index_spec.js.map +1 -0
- package/src/component/details/index.d.ts +2 -0
- package/src/component/details/index.js +12 -0
- package/src/component/details/index.js.map +1 -0
- package/src/component/details/index_spec.d.ts +1 -0
- package/src/component/details/index_spec.js +23 -0
- package/src/component/details/index_spec.js.map +1 -0
- package/src/component/edit/index.d.ts +2 -0
- package/src/component/edit/index.js +63 -0
- package/src/component/edit/index.js.map +1 -0
- package/src/component/edit/index_spec.d.ts +1 -0
- package/src/component/edit/index_spec.js +23 -0
- package/src/component/edit/index_spec.js.map +1 -0
- package/src/component/header/index.d.ts +2 -0
- package/src/component/header/index.js +311 -0
- package/src/component/header/index.js.map +1 -0
- package/src/component/list/index.d.ts +2 -0
- package/src/component/list/index.js +64 -0
- package/src/component/list/index.js.map +1 -0
- package/src/component/list/index_spec.d.ts +1 -0
- package/src/component/list/index_spec.js +23 -0
- package/src/component/list/index_spec.js.map +1 -0
- package/src/component/login/index.d.ts +2 -0
- package/src/component/login/index.js +314 -0
- package/src/component/login/index.js.map +1 -0
- package/src/component/login/index_spec.d.ts +1 -0
- package/src/component/login/index_spec.js +23 -0
- package/src/component/login/index_spec.js.map +1 -0
- package/src/component/not-found/index.d.ts +2 -0
- package/src/component/not-found/index.js +68 -0
- package/src/component/not-found/index.js.map +1 -0
- package/src/component/not-found/index_spec.d.ts +1 -0
- package/src/component/not-found/index_spec.js +23 -0
- package/src/component/not-found/index_spec.js.map +1 -0
- package/src/component/sidebar/index.d.ts +2 -0
- package/src/component/sidebar/index.js +247 -0
- package/src/component/sidebar/index.js.map +1 -0
- package/src/component/test/index.d.ts +2 -0
- package/src/component/test/index.js +20 -0
- package/src/component/test/index.js.map +1 -0
- package/src/component/test/index_spec.d.ts +1 -0
- package/src/component/test/index_spec.js +23 -0
- package/src/component/test/index_spec.js.map +1 -0
- package/src/component/type/index.d.ts +2 -0
- package/src/component/type/index.js +45 -0
- package/src/component/type/index.js.map +1 -0
- package/src/component/type/index_spec.d.ts +1 -0
- package/src/component/type/index_spec.js +23 -0
- package/src/component/type/index_spec.js.map +1 -0
- package/src/component/wrapper/index.d.ts +2 -0
- package/src/component/wrapper/index.js +175 -0
- package/src/component/wrapper/index.js.map +1 -0
- package/src/component/wrapper/index_spec.d.ts +1 -0
- package/src/component/wrapper/index_spec.js +23 -0
- package/src/component/wrapper/index_spec.js.map +1 -0
- package/src/config/index.d.ts +2 -0
- package/src/config/index.js +166 -0
- package/src/config/index.js.map +1 -0
- package/src/config/index_spec.d.ts +1 -0
- package/src/config/index_spec.js +23 -0
- package/src/config/index_spec.js.map +1 -0
- package/src/config/schema.json +31 -0
- package/src/guard/auth/index.d.ts +2 -0
- package/src/guard/auth/index.js +60 -0
- package/src/guard/auth/index.js.map +1 -0
- package/src/guard/auth/index_spec.d.ts +1 -0
- package/src/guard/auth/index_spec.js +23 -0
- package/src/guard/auth/index_spec.js.map +1 -0
- package/src/guard/permissions/index.d.ts +2 -0
- package/src/guard/permissions/index.js +51 -0
- package/src/guard/permissions/index.js.map +1 -0
- package/src/guard/permissions/index_spec.d.ts +1 -0
- package/src/guard/permissions/index_spec.js +23 -0
- package/src/guard/permissions/index_spec.js.map +1 -0
- package/src/module/index.d.ts +2 -0
- package/src/module/index.js +94 -0
- package/src/module/index.js.map +1 -0
- package/src/module/index_spec.d.ts +1 -0
- package/src/module/index_spec.js +23 -0
- package/src/module/index_spec.js.map +1 -0
- package/src/module/schema.json +17 -0
- package/src/other/taf-add-import-to-module/index.d.ts +2 -0
- package/src/other/taf-add-import-to-module/index.js +20 -0
- package/src/other/taf-add-import-to-module/index.js.map +1 -0
- package/src/other/taf-add-import-to-module/index_spec.d.ts +1 -0
- package/src/other/taf-add-import-to-module/index_spec.js +23 -0
- package/src/other/taf-add-import-to-module/index_spec.js.map +1 -0
- package/src/service/api/index.d.ts +2 -0
- package/src/service/api/index.js +508 -0
- package/src/service/api/index.js.map +1 -0
- package/src/service/api/index_spec.d.ts +1 -0
- package/src/service/api/index_spec.js +23 -0
- package/src/service/api/index_spec.js.map +1 -0
- package/src/templates/add/add.html.d.ts +1 -0
- package/src/templates/add/add.html.js +124 -0
- package/src/templates/add/add.html.js.map +1 -0
- package/src/templates/add/add.ts.d.ts +1 -0
- package/src/templates/add/add.ts.js +112 -0
- package/src/templates/add/add.ts.js.map +1 -0
- package/src/templates/edit/edit.html.d.ts +1 -0
- package/src/templates/edit/edit.html.js +121 -0
- package/src/templates/edit/edit.html.js.map +1 -0
- package/src/templates/edit/edit.ts.d.ts +1 -0
- package/src/templates/edit/edit.ts.js +117 -0
- package/src/templates/edit/edit.ts.js.map +1 -0
- package/src/templates/list/list.html.d.ts +1 -0
- package/src/templates/list/list.html.js +98 -0
- package/src/templates/list/list.html.js.map +1 -0
- package/src/templates/list/list.ts.d.ts +2 -0
- package/src/templates/list/list.ts.js +144 -0
- package/src/templates/list/list.ts.js.map +1 -0
- package/src/templates/test/test.ts.d.ts +4 -0
- package/src/templates/test/test.ts.js +145 -0
- package/src/templates/test/test.ts.js.map +1 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sidebar = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const strings_1 = require("@angular-devkit/core/src/utils/strings");
|
|
6
|
+
function sidebar(options) {
|
|
7
|
+
const { projectName, style = 'scss' } = options;
|
|
8
|
+
const name = 'sidebar';
|
|
9
|
+
const componentName = (0, strings_1.dasherize)(name);
|
|
10
|
+
const fullComponentName = "home/home/" + componentName; // src/app/sidebar
|
|
11
|
+
// const componentClass = classify(componentName);
|
|
12
|
+
return (tree) => {
|
|
13
|
+
const c_path = `/src/app/${fullComponentName}/${componentName}.component.ts`;
|
|
14
|
+
if (tree.exists(c_path)) {
|
|
15
|
+
console.warn(`⚠️ Le composant ${componentName} existe déjà : ${c_path}`);
|
|
16
|
+
return tree;
|
|
17
|
+
}
|
|
18
|
+
return (0, schematics_1.chain)([
|
|
19
|
+
// 1️⃣ Crée un composant Angular de base
|
|
20
|
+
(0, schematics_1.externalSchematic)('@schematics/angular', 'component', {
|
|
21
|
+
name: fullComponentName,
|
|
22
|
+
project: projectName,
|
|
23
|
+
style,
|
|
24
|
+
standalone: true
|
|
25
|
+
}),
|
|
26
|
+
// 2️⃣ Écrase le contenu généré avec ton template custom
|
|
27
|
+
(tree) => {
|
|
28
|
+
tree.overwrite(`src/app/${fullComponentName}/${componentName}.component.html`, get_html_content());
|
|
29
|
+
tree.overwrite(`src/app/${fullComponentName}/${componentName}.component.${style}`, get_css_content());
|
|
30
|
+
tree.overwrite(`src/app/${fullComponentName}/${componentName}.component.ts`, get_ts_content(style));
|
|
31
|
+
}
|
|
32
|
+
]);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.sidebar = sidebar;
|
|
36
|
+
// 🧩 --- Templates ---
|
|
37
|
+
function get_html_content() {
|
|
38
|
+
return `<!-- sidebar.component.html -->
|
|
39
|
+
<aside class="sidebar" [class.mobile-open]="isMobileMenuOpen">
|
|
40
|
+
<div class="sidebar-header">
|
|
41
|
+
<div class="logo-box">
|
|
42
|
+
<img src="https://chitari.tech/logo.png" alt="Logo" />
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<nav class="sidebar-nav">
|
|
47
|
+
@for (menu of api.full_menu[0].items; track menu.path) {
|
|
48
|
+
@if (menu.show_on_sidebar) {
|
|
49
|
+
<a [routerLink]="menu.path" routerLinkActive="active" class="nav-link" (click)="isMobileMenuOpen = false">
|
|
50
|
+
<i [class]="menu.icon"></i>
|
|
51
|
+
<span class="nav-text">{{ menu.text }}</span>
|
|
52
|
+
</a>
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</nav>
|
|
56
|
+
|
|
57
|
+
<div class="sidebar-footer">
|
|
58
|
+
<div class="theme-toggle" (click)="toggleTheme()" [class.active]="isDarkMode">
|
|
59
|
+
<div class="toggle-thumb">
|
|
60
|
+
<i [class]="isDarkMode ? 'bi bi-sun-fill' : 'bi bi-moon-fill'"></i>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</aside>
|
|
65
|
+
|
|
66
|
+
@if (isMobileMenuOpen) {
|
|
67
|
+
<div class="mobile-overlay" (click)="isMobileMenuOpen = false"></div>
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
72
|
+
function get_css_content() {
|
|
73
|
+
return `
|
|
74
|
+
$sidebar-width: 6vw;
|
|
75
|
+
$primary: #233c6c; // Nouvelle couleur primaire
|
|
76
|
+
|
|
77
|
+
:host {
|
|
78
|
+
--bg-main: #fcfcfc;
|
|
79
|
+
--bg-sidebar: #ffffff;
|
|
80
|
+
--text-main: #333333;
|
|
81
|
+
--border-color: #ececec;
|
|
82
|
+
--bg-elements: #f5f5f5;
|
|
83
|
+
display: block;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host-context(body.dark-mode) {
|
|
87
|
+
--bg-main: #121212;
|
|
88
|
+
--bg-sidebar: #1a1a1a;
|
|
89
|
+
--text-main: #e0e0e0;
|
|
90
|
+
--border-color: #2d2d2d;
|
|
91
|
+
--bg-elements: #2d2d2d;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/* SIDEBAR */
|
|
97
|
+
.sidebar {
|
|
98
|
+
width: $sidebar-width;
|
|
99
|
+
height: 100%;
|
|
100
|
+
background: var(--bg-sidebar);
|
|
101
|
+
border-right: 1px solid var(--border-color);
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
align-items: center;
|
|
105
|
+
padding: 25px 0;
|
|
106
|
+
flex-shrink: 0;
|
|
107
|
+
z-index: 1050;
|
|
108
|
+
transition: transform 0.3s ease;
|
|
109
|
+
|
|
110
|
+
.sidebar-header .logo-box {
|
|
111
|
+
width: 42px;
|
|
112
|
+
height: 42px;
|
|
113
|
+
background: rgba($primary, 0.1); // Teinte légère de la couleur primaire
|
|
114
|
+
border-radius: 12px;
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
margin-bottom: 30px;
|
|
119
|
+
img {
|
|
120
|
+
width: 100%;
|
|
121
|
+
height: 100%;
|
|
122
|
+
object-fit: cover;
|
|
123
|
+
border-radius: 12px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.sidebar-nav {
|
|
128
|
+
flex-grow: 1;
|
|
129
|
+
width: 100%;
|
|
130
|
+
overflow-y: auto;
|
|
131
|
+
overflow-x: visible;
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
align-items: center;
|
|
135
|
+
scrollbar-width: none;
|
|
136
|
+
&::-webkit-scrollbar {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.nav-link {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
align-items: center;
|
|
144
|
+
gap: 5px;
|
|
145
|
+
text-decoration: none;
|
|
146
|
+
color: #bababa;
|
|
147
|
+
transition: 0.2s;
|
|
148
|
+
width: 100%;
|
|
149
|
+
padding: 10px 0;
|
|
150
|
+
|
|
151
|
+
i {
|
|
152
|
+
font-size: 1.4rem;
|
|
153
|
+
transition: 0.2s;
|
|
154
|
+
}
|
|
155
|
+
.nav-text {
|
|
156
|
+
font-size: 0.65rem;
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
text-align: center;
|
|
159
|
+
max-width: 80px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&.active,
|
|
163
|
+
&:hover {
|
|
164
|
+
color: var(--text-main);
|
|
165
|
+
i {
|
|
166
|
+
color: $primary;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.sidebar-footer {
|
|
173
|
+
flex-shrink: 0;
|
|
174
|
+
margin-top: 20px;
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 20px;
|
|
179
|
+
.theme-toggle {
|
|
180
|
+
width: 48px;
|
|
181
|
+
height: 24px;
|
|
182
|
+
background: rgba($primary, 0.2);
|
|
183
|
+
border-radius: 20px;
|
|
184
|
+
position: relative;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
.toggle-thumb {
|
|
187
|
+
width: 20px;
|
|
188
|
+
height: 20px;
|
|
189
|
+
background: #000;
|
|
190
|
+
border-radius: 50%;
|
|
191
|
+
position: absolute;
|
|
192
|
+
right: 2px;
|
|
193
|
+
top: 2px;
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
color: #fff;
|
|
198
|
+
font-size: 0.6rem;
|
|
199
|
+
transition: 0.3s;
|
|
200
|
+
}
|
|
201
|
+
&.active {
|
|
202
|
+
background: $primary;
|
|
203
|
+
.toggle-thumb {
|
|
204
|
+
right: 26px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
`;
|
|
212
|
+
}
|
|
213
|
+
function get_ts_content(style) {
|
|
214
|
+
return `import { CommonModule } from '@angular/common';
|
|
215
|
+
import { Component } from '@angular/core';
|
|
216
|
+
import { ApiService } from '../../../service/api/api.service';
|
|
217
|
+
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
218
|
+
|
|
219
|
+
@Component({
|
|
220
|
+
selector: 'app-sidebar',
|
|
221
|
+
standalone: true,
|
|
222
|
+
imports: [RouterLink, CommonModule,RouterLinkActive],
|
|
223
|
+
templateUrl: './sidebar.component.html',
|
|
224
|
+
styleUrl: './sidebar.component.${style}'
|
|
225
|
+
})
|
|
226
|
+
export class Sidebar {
|
|
227
|
+
navCollapsed!: boolean;
|
|
228
|
+
navCollapsedMob!: boolean;
|
|
229
|
+
isDarkMode = false;
|
|
230
|
+
isMobileMenuOpen = false;
|
|
231
|
+
|
|
232
|
+
constructor(public api: ApiService) {
|
|
233
|
+
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
toggleTheme() {
|
|
237
|
+
this.isDarkMode = !this.isDarkMode;
|
|
238
|
+
if (this.isDarkMode) {
|
|
239
|
+
document.body.classList.add('dark-mode');
|
|
240
|
+
} else {
|
|
241
|
+
document.body.classList.remove('dark-mode');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
`;
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAkF;AAClF,oEAAmE;AAEnE,SAAgB,OAAO,CAAC,OAAY;IACh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,CAAC;AAED,SAAS,eAAe;IACpB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0IV,CAAC;AACF,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACjC,OAAO;;;;;;;;;;mCAUwB,KAAK;;;;;;;;;;;;;;;;;;;;;CAqBvC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.test = void 0;
|
|
4
|
+
const strings_1 = require("@angular-devkit/core/src/utils/strings");
|
|
5
|
+
const test_ts_1 = require("../../templates/test/test.ts");
|
|
6
|
+
// You don't have to export the function as default. You can also have more than one rule factory
|
|
7
|
+
// per file.
|
|
8
|
+
function test(options) {
|
|
9
|
+
const { table, parent } = options;
|
|
10
|
+
//console.log("table = ", table)
|
|
11
|
+
return (tree) => {
|
|
12
|
+
// Le composant existe dèja
|
|
13
|
+
let c_path_type = `/${parent + (0, strings_1.dasherize)(table.table)}/config-type/${(0, strings_1.classify)(table.table)}configType`;
|
|
14
|
+
let c_path = `src/app/${(0, strings_1.dasherize)(c_path_type)}.spec.ts`;
|
|
15
|
+
// le composant n'existe pas encore
|
|
16
|
+
return tree.overwrite(c_path, (0, test_ts_1.get_ts_test_list_content)((0, strings_1.classify)(table.table)));
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.test = test;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,oEAA6E;AAC7E,0DAAwE;AAGxE,iGAAiG;AACjG,YAAY;AACZ,SAAgB,IAAI,CAAC,OAAY;IAC/B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IACjC,gCAAgC;IAChC,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,2BAA2B;QAC3B,IAAI,WAAW,GAAG,IAAI,MAAM,GAAG,IAAA,mBAAS,EAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,IAAA,kBAAQ,EAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAA;QACtG,IAAI,MAAM,GAAG,WAAW,IAAA,mBAAS,EAAC,WAAW,CAAC,UAAU,CAAA;QAExD,mCAAmC;QACnC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAA,kCAAwB,EAAC,IAAA,kBAAQ,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAChF,CAAC,CAAA;AACH,CAAC;AAXD,oBAWC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const collectionPath = path.join(__dirname, '../collection.json');
|
|
16
|
+
describe('component/test', () => {
|
|
17
|
+
it('works', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
19
|
+
const tree = yield runner.runSchematic('component/test', {}, schematics_1.Tree.empty());
|
|
20
|
+
expect(tree.files).toEqual([]);
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index_spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,OAAO,EAAE,GAAS,EAAE;QACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,gBAAgB,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAE3E,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.type = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const strings_1 = require("@angular-devkit/core/src/utils/strings");
|
|
6
|
+
const list_ts_1 = require("../../templates/list/list.ts");
|
|
7
|
+
// You don't have to export the function as default. You can also have more than one rule factory
|
|
8
|
+
// per file.
|
|
9
|
+
function type(options) {
|
|
10
|
+
const { table, projectName, parent, Config } = options;
|
|
11
|
+
//console.log("table = ", table)
|
|
12
|
+
return (tree) => {
|
|
13
|
+
// Le composant existe dèja
|
|
14
|
+
let c_path_type = `/${parent + (0, strings_1.dasherize)(table.table)}/config-type/${(0, strings_1.classify)(table.table)}configType`;
|
|
15
|
+
let c_path = `src/app/${(0, strings_1.dasherize)(c_path_type)}.ts`;
|
|
16
|
+
if (tree.exists(c_path)) {
|
|
17
|
+
console.warn(`Le type ${(0, strings_1.classify)(table.table)} existe dèja dans le module ${parent} : ${c_path}`);
|
|
18
|
+
if (Config.forcer) {
|
|
19
|
+
console.warn("Forcer la Mise à jour du composant ...");
|
|
20
|
+
return (0, schematics_1.chain)([
|
|
21
|
+
// modification des fichiers
|
|
22
|
+
(tree, _context) => {
|
|
23
|
+
// modifier le fichier TS config type
|
|
24
|
+
tree.overwrite(`src/app/${(0, strings_1.dasherize)(c_path_type)}.ts`, (0, list_ts_1.get_type_content)(table));
|
|
25
|
+
}
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return tree;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// le composant n'existe pas encore
|
|
33
|
+
return (0, schematics_1.chain)([
|
|
34
|
+
// création de la classe de la table
|
|
35
|
+
(0, schematics_1.externalSchematic)("@schematics/angular", "class", { project: projectName, name: c_path_type }),
|
|
36
|
+
// modification des fichiers
|
|
37
|
+
(tree, _context) => {
|
|
38
|
+
// modifier le fichier TS config type
|
|
39
|
+
tree.overwrite(`src/app/${(0, strings_1.dasherize)(c_path_type)}.ts`, (0, list_ts_1.get_type_content)(table));
|
|
40
|
+
}
|
|
41
|
+
]);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
exports.type = type;
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAoG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C5B,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;gBACzC,qCAAqC;gBACrC,IAAI,CAAC,SAAS,CACZ,WAAW,IAAA,mBAAS,EAAC,WAAW,CAAC,KAAK,EACtC,IAAA,0BAAgB,EAAC,KAAK,CAAC,CACxB,CAAA;YACH,CAAC;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC;AAxCD,oBAwCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const collectionPath = path.join(__dirname, '../collection.json');
|
|
16
|
+
describe('component/type', () => {
|
|
17
|
+
it('works', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
19
|
+
const tree = yield runner.runSchematic('component/type', {}, schematics_1.Tree.empty());
|
|
20
|
+
expect(tree.files).toEqual([]);
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index_spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,OAAO,EAAE,GAAS,EAAE;QACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,gBAAgB,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAE3E,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapper = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const strings_1 = require("@angular-devkit/core/src/utils/strings");
|
|
6
|
+
const test_ts_1 = require("../../templates/test/test.ts");
|
|
7
|
+
// You don't have to export the function as default. You can also have more than one rule factory
|
|
8
|
+
// per file.
|
|
9
|
+
function wrapper(options) {
|
|
10
|
+
const { name, projectName, Config } = options;
|
|
11
|
+
// console.log("options = ", options)
|
|
12
|
+
const componentName = (0, strings_1.dasherize)(name);
|
|
13
|
+
const fullComponentName = name + "/" + componentName; // home/home
|
|
14
|
+
const componentName_class = (0, strings_1.classify)(componentName + "Component"); //"LivreComponent"
|
|
15
|
+
// console.log("fullComponentName= ", fullComponentName)
|
|
16
|
+
return (tree) => {
|
|
17
|
+
// Le composant existe dèja
|
|
18
|
+
let c_path = `/src/app/${fullComponentName}/${componentName}.component.ts`;
|
|
19
|
+
// console.log("c_path= ", c_path)
|
|
20
|
+
if (tree.exists(c_path)) {
|
|
21
|
+
console.warn(`Le composant ${componentName} existe dèja : ${c_path}`);
|
|
22
|
+
return tree;
|
|
23
|
+
}
|
|
24
|
+
// le composant n'existe pas encore
|
|
25
|
+
return (0, schematics_1.chain)([
|
|
26
|
+
// création du composant
|
|
27
|
+
(0, schematics_1.externalSchematic)("@schematics/angular", "component", { project: projectName, name: fullComponentName, style: Config.style, standalone: true }),
|
|
28
|
+
// modification des fichiers
|
|
29
|
+
(tree) => {
|
|
30
|
+
// modifier le fichier HTML
|
|
31
|
+
tree.overwrite(`src/app/${fullComponentName}/${componentName}.component.html`, // home/auteur/lis-auteur/list-auteur.component.html
|
|
32
|
+
get_html_content(name));
|
|
33
|
+
// modifier le fichier CSS
|
|
34
|
+
tree.overwrite(`src/app/${fullComponentName}/${componentName}.component.scss`, // home/auteur/lis-auteur/list-auteur.component.html
|
|
35
|
+
get_css_content(name));
|
|
36
|
+
// modifier le fichier ts
|
|
37
|
+
tree.overwrite(`src/app/${fullComponentName}/${componentName}.component.ts`, // home/auteur/lis-auteur/list-auteur.component.ts
|
|
38
|
+
get_ts_content(Config, name));
|
|
39
|
+
// modifier le fichier TS de test
|
|
40
|
+
tree.overwrite(`src/app/${fullComponentName}/${componentName}.component.spec.ts`, // home/auteur/lis-auteur/list-auteur.component.spec.ts
|
|
41
|
+
(0, test_ts_1.get_ts_test_module_content)(componentName_class));
|
|
42
|
+
}
|
|
43
|
+
]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.wrapper = wrapper;
|
|
47
|
+
function get_html_content(module) {
|
|
48
|
+
if (module == "home") {
|
|
49
|
+
return `<!-- layout.component.html -->
|
|
50
|
+
<div class="dashboard-container">
|
|
51
|
+
<app-sidebar></app-sidebar>
|
|
52
|
+
<div class="main-wrapper">
|
|
53
|
+
<app-header></app-header>
|
|
54
|
+
<main class="page-content">
|
|
55
|
+
<router-outlet></router-outlet>
|
|
56
|
+
</main>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return ` <router-outlet></router-outlet>`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function get_css_content(module) {
|
|
67
|
+
if (module == "home") {
|
|
68
|
+
return `/* layout.component.scss */
|
|
69
|
+
$header-height: 70px;
|
|
70
|
+
$header-width: 94vw;
|
|
71
|
+
:host {
|
|
72
|
+
--bg-main: #fcfcfc;
|
|
73
|
+
--bg-sidebar: #ffffff;
|
|
74
|
+
--text-main: #333333;
|
|
75
|
+
--border-color: #ececec;
|
|
76
|
+
--bg-elements: #f5f5f5;
|
|
77
|
+
display: block;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host-context(body.dark-mode) {
|
|
81
|
+
--bg-main: #121212;
|
|
82
|
+
--bg-sidebar: #1a1a1a;
|
|
83
|
+
--text-main: #e0e0e0;
|
|
84
|
+
--border-color: #2d2d2d;
|
|
85
|
+
--bg-elements: #2d2d2d;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
.dashboard-container {
|
|
90
|
+
display: flex;
|
|
91
|
+
height: 100vh;
|
|
92
|
+
width: 100vw;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
background-color: var(--bg-main);
|
|
95
|
+
color: var(--text-main);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
/* MAIN WRAPPER */
|
|
101
|
+
.main-wrapper {
|
|
102
|
+
flex-grow: 1;
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
height: 100%;
|
|
106
|
+
width: $header-width;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
|
|
109
|
+
.page-content {
|
|
110
|
+
flex-grow: 1;
|
|
111
|
+
overflow-y: auto;
|
|
112
|
+
padding: 1rem;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return ``;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function get_ts_content(Config, module) {
|
|
124
|
+
let les_tables = Config.les_modules.find((un_module) => un_module.module == module).les_tables;
|
|
125
|
+
let items = les_tables.map((une_table) => {
|
|
126
|
+
return `{libelle:"${(0, strings_1.classify)(une_table.table)}",path:"/${module}/${une_table.table}"}`;
|
|
127
|
+
}).join(",\n");
|
|
128
|
+
if (module == "home") {
|
|
129
|
+
return `import { Component } from '@angular/core';
|
|
130
|
+
import { RouterModule } from '@angular/router';
|
|
131
|
+
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
132
|
+
import { Header } from './header/header.component';
|
|
133
|
+
import { Sidebar } from './sidebar/sidebar.component';
|
|
134
|
+
|
|
135
|
+
@Component({
|
|
136
|
+
selector: 'app-${module}',
|
|
137
|
+
standalone: true, // Composant autonome
|
|
138
|
+
imports: [RouterModule,NgbDropdownModule,Header,Sidebar],
|
|
139
|
+
templateUrl: './${module}.component.html',
|
|
140
|
+
styleUrls: ['./${module}.component.${Config.style}']
|
|
141
|
+
})
|
|
142
|
+
export class ${(0, strings_1.classify)(module)}Component {
|
|
143
|
+
menu:any={
|
|
144
|
+
titre:"Menu",
|
|
145
|
+
items:[
|
|
146
|
+
${items}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
`;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
return `import { Component } from '@angular/core';
|
|
154
|
+
import { RouterModule } from '@angular/router';
|
|
155
|
+
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
156
|
+
|
|
157
|
+
@Component({
|
|
158
|
+
selector: 'app-${module}',
|
|
159
|
+
standalone: true, // Composant autonome
|
|
160
|
+
imports: [RouterModule,NgbDropdownModule],
|
|
161
|
+
templateUrl: './${module}.component.html',
|
|
162
|
+
styleUrls: ['./${module}.component.${Config.style}']
|
|
163
|
+
})
|
|
164
|
+
export class ${(0, strings_1.classify)(module)}Component {
|
|
165
|
+
menu:any={
|
|
166
|
+
titre:"Menu",
|
|
167
|
+
items:[
|
|
168
|
+
${items}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
`;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,2DAAkF;AAClF,oEAA6E;AAC7E,0DAA0E;AAG1E,iGAAiG;AACjG,YAAY;AACZ,SAAgB,OAAO,CAAC,OAAY;IAClC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC7C,qCAAqC;IACrC,MAAM,aAAa,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,CAAA;IACrC,MAAM,iBAAiB,GAAG,IAAI,GAAG,GAAG,GAAG,aAAa,CAAA,CAAC,YAAY;IACjE,MAAM,mBAAmB,GAAG,IAAA,kBAAQ,EAAC,aAAa,GAAG,WAAW,CAAC,CAAA,CAAA,kBAAkB;IACnF,wDAAwD;IACxD,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,2BAA2B;QAC3B,IAAI,MAAM,GAAG,YAAY,iBAAiB,IAAI,aAAa,eAAe,CAAA;QAC1E,kCAAkC;QAClC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YACvB,OAAO,CAAC,IAAI,CAAC,gBAAgB,aAAa,kBAAkB,MAAM,EAAE,CAAC,CAAA;YACrE,OAAO,IAAI,CAAA;SACZ;QAED,mCAAmC;QACnC,OAAO,IAAA,kBAAK,EAAC;YACX,wBAAwB;YACxB,IAA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,cAAc,CAAC,MAAW,EAAE,MAAc;IACjD,IAAI,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,SAAc,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,UAAU,CAAA;IACnG,IAAI,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAc,EAAE,EAAE;QAC5C,OAAO,aAAa,IAAA,kBAAQ,EAAC,SAAS,CAAC,KAAK,CAAC,YAAY,MAAM,IAAI,SAAS,CAAC,KAAK,IAAI,CAAA;IACxF,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAEd,IAAI,MAAM,IAAI,MAAM,EAAE;QACpB,OAAO;;;;;;;mBAOQ,MAAM;;;oBAGL,MAAM;mBACP,MAAM,cAAc,MAAM,CAAC,KAAK;;eAEpC,IAAA,kBAAQ,EAAC,MAAM,CAAC;;;;QAIvB,KAAK;;;;CAIZ,CAAA;KACE;SAAM;QAEL,OAAO;;;;;qBAKU,MAAM;;;sBAGL,MAAM;qBACP,MAAM,cAAc,MAAM,CAAC,KAAK;;iBAEpC,IAAA,kBAAQ,EAAC,MAAM,CAAC;;;;UAIvB,KAAK;;;;GAIZ,CAAA;KACA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const collectionPath = path.join(__dirname, '../collection.json');
|
|
16
|
+
describe('wrapper', () => {
|
|
17
|
+
it('works', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
19
|
+
const tree = yield runner.runSchematic('wrapper', {}, schematics_1.Tree.empty());
|
|
20
|
+
expect(tree.files).toEqual([]);
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index_spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,EAAE,CAAC,OAAO,EAAE,GAAS,EAAE;QACrB,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAEpE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|