slicejs-cli 1.0.54 → 1.0.55

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.
Files changed (85) hide show
  1. package/commands/listComponents/listComponents.js +63 -30
  2. package/package.json +1 -1
  3. package/PROJECT_TEMPLATES/Basic/Slice/Components/Provider/TestProvider/TestProvider.js +0 -0
  4. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/FetchManager/FetchManager.js +0 -134
  5. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/IndexedDbManager/IndexedDbManager.js +0 -138
  6. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/LocalStorageManager/LocalStorageManager.js +0 -45
  7. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/Translator/Translator.js +0 -59
  8. package/PROJECT_TEMPLATES/Basic/Slice/Components/Service/Translator/messages.json +0 -50
  9. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Controller/Controller.js +0 -106
  10. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Debugger/Debugger.css +0 -95
  11. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Debugger/Debugger.html +0 -10
  12. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Debugger/Debugger.js +0 -250
  13. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Logger/Log.js +0 -10
  14. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/Logger/Logger.js +0 -112
  15. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/StylesManager/CustomStylesManager/CustomStylesManager.js +0 -52
  16. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/StylesManager/StylesManager.js +0 -42
  17. package/PROJECT_TEMPLATES/Basic/Slice/Components/Structural/StylesManager/ThemeManager/ThemeManager.js +0 -25
  18. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Button/Button.css +0 -44
  19. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Button/Button.html +0 -5
  20. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Button/Button.js +0 -39
  21. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Card/Card.css +0 -63
  22. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Card/Card.html +0 -7
  23. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Card/Card.js +0 -110
  24. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Checkbox/Checkbox.css +0 -87
  25. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Checkbox/Checkbox.html +0 -8
  26. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Checkbox/Checkbox.js +0 -87
  27. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/CodeValidator/CodeValidator.css +0 -97
  28. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/CodeValidator/CodeValidator.html +0 -18
  29. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/CodeValidator/CodeValidator.js +0 -86
  30. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/Icon.css +0 -505
  31. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/Icon.html +0 -1
  32. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/Icon.js +0 -95
  33. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.eot +0 -0
  34. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.json +0 -550
  35. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.styl +0 -502
  36. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.svg +0 -1470
  37. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.symbol.svg +0 -1035
  38. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.ttf +0 -0
  39. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.woff +0 -0
  40. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Icon/slc.woff2 +0 -0
  41. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Input/Input.css +0 -87
  42. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Input/Input.html +0 -4
  43. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Input/Input.js +0 -210
  44. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Loading/Loading.css +0 -56
  45. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Loading/Loading.html +0 -83
  46. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Loading/Loading.js +0 -39
  47. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Navbar/Navbar.css +0 -30
  48. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Navbar/Navbar.html +0 -6
  49. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Navbar/Navbar.js +0 -39
  50. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Select/Select.css +0 -91
  51. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Select/Select.html +0 -8
  52. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Select/Select.js +0 -210
  53. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Switch/Switch.css +0 -76
  54. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Switch/Switch.html +0 -8
  55. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Switch/Switch.js +0 -109
  56. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/TestComponent/TestComponent.css +0 -0
  57. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/TestComponent/TestComponent.html +0 -0
  58. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/TestComponent/TestComponent.js +0 -0
  59. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester/Tester.css +0 -34
  60. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester/Tester.html +0 -7
  61. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester/Tester.js +0 -33
  62. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester2/Tester2.css +0 -34
  63. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester2/Tester2.html +0 -43
  64. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/Tester2/Tester2.js +0 -39
  65. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/ToastAlert/ToastAlert.css +0 -110
  66. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/ToastAlert/ToastAlert.html +0 -12
  67. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/ToastAlert/ToastAlert.js +0 -65
  68. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/complexNavbar/complexNavbar.css +0 -163
  69. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/complexNavbar/complexNavbar.html +0 -15
  70. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/complexNavbar/complexNavbar.js +0 -48
  71. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/imageCarousel/img-carousel.css +0 -56
  72. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/imageCarousel/img-carousel.html +0 -6
  73. package/PROJECT_TEMPLATES/Basic/Slice/Components/Visual/imageCarousel/img-carousel.js +0 -119
  74. package/PROJECT_TEMPLATES/Basic/Slice/Components/components.js +0 -23
  75. package/PROJECT_TEMPLATES/Basic/Slice/Slice.js +0 -194
  76. package/PROJECT_TEMPLATES/Basic/Slice/Styles/Custom/custom.css +0 -23
  77. package/PROJECT_TEMPLATES/Basic/Slice/Styles/sliceStyles.css +0 -10
  78. package/PROJECT_TEMPLATES/Basic/Slice/Themes/Dark.css +0 -38
  79. package/PROJECT_TEMPLATES/Basic/Slice/Themes/Light.css +0 -31
  80. package/PROJECT_TEMPLATES/Basic/Slice/Themes/Slice.css +0 -30
  81. package/PROJECT_TEMPLATES/Basic/Slice/package.json +0 -12
  82. package/PROJECT_TEMPLATES/Basic/Slice/sliceConfig.json +0 -32
  83. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.html +0 -14
  84. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/index.js +0 -395
  85. package/PROJECT_TEMPLATES/Basic/src/Views/LandingPage/style.css +0 -0
@@ -1,395 +0,0 @@
1
- import sliceConfig from "./Slice/sliceConfig.json" assert { type: "json" };
2
-
3
- let theme = sliceConfig.stylesManager.defaultTheme;
4
-
5
- async function hola() {
6
- if (theme === "Slice") {
7
- await slice.stylesManager.setTheme("Light");
8
- theme = "Light";
9
- changeThemeButton.value = "Cambiar al tema Dark";
10
- } else if (theme === "Light") {
11
- await slice.stylesManager.setTheme("Dark");
12
- theme = "Dark";
13
- changeThemeButton.value = "Cambiar al tema Slice";
14
- } else if (theme === "Dark") {
15
- await slice.stylesManager.setTheme("Slice");
16
- theme = "Slice";
17
- changeThemeButton.value = "Cambiar al tema Light";
18
- }
19
- }
20
-
21
- let changeThemeButton = await slice.build("Button", {
22
- value: "Cambiar Tema",
23
- onClickCallback: hola,
24
- });
25
-
26
- document.body.insertBefore(changeThemeButton, document.body.firstChild);
27
-
28
- //append the component to the body first element
29
-
30
- const tester = await slice.build("Tester", {
31
- id: "tester",
32
- sliceId: "tester",
33
- subject: "Hola",
34
- description: "Saludo",
35
- });
36
- //
37
- // Form
38
- //
39
- const name1 = await slice.build("Input", {
40
- id: "nombre",
41
- placeholder: "Name",
42
- required: true,
43
- sliceId: "myInput",
44
- });
45
-
46
- const lastname = await slice.build("Input", {
47
- placeholder: "Last Name",
48
- });
49
-
50
- const password = await slice.build("Input", {
51
- placeholder: "Password",
52
- type: "password",
53
- required: true,
54
- secret: true,
55
- });
56
-
57
- const confirmPassword = await slice.build("Input", {
58
- placeholder: "Confirm Password",
59
- type: "password",
60
- required: true,
61
- secret: false,
62
- disabled: true,
63
- conditions: {
64
- // regex: "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}$",
65
- minLength: 8,
66
- maxLength: 10,
67
- minMinusc: 1,
68
- maxMinusc: 4,
69
- minMayusc: 1,
70
- maxMayusc: 6,
71
- minNumber: 1,
72
- maxNumber: 6,
73
- minSymbol: 1,
74
- maxSymbol: 10,
75
- },
76
- });
77
-
78
- function testSliceButton() {
79
- if (slice.translator.currentLanguage === "es") {
80
- slice.translator.changeLanguage("en");
81
- } else {
82
- slice.translator.changeLanguage("es");
83
- }
84
-
85
- sliceSwitch.label = slice.translator.currentLanguage;
86
- }
87
-
88
- const dateInput = await slice.build("Input", {
89
- placeholder: "Birthday",
90
- type: "date",
91
- });
92
- const ageInput = await slice.build("Input", {
93
- placeholder: "Age",
94
- type: "number",
95
- });
96
-
97
- const button = await slice.build("Button", {
98
- value: "Slice",
99
- sliceId: "gio",
100
- onClickCallback: () => {
101
- password.triggerError();
102
- password.triggerError();
103
- select.value = [
104
- { value: "Hola", id: 0 },
105
- { value: "Hello", id: 1 },
106
- { value: "Hi", id: 3 },
107
- ];
108
- },
109
- });
110
-
111
- const form = document.getElementById("form");
112
-
113
- form.appendChild(name1);
114
- form.appendChild(lastname);
115
- form.appendChild(password);
116
- form.appendChild(confirmPassword);
117
- form.appendChild(dateInput);
118
- form.appendChild(ageInput);
119
-
120
- const checkbox = await slice.build("Checkbox", {
121
- label: "Check",
122
- position: "top",
123
- customColor: "yellow",
124
- });
125
- const checkbox2 = await slice.build("Checkbox", {
126
- label: "Check",
127
- position: "left",
128
- });
129
-
130
- const sliceSwitch = await slice.build("Switch", {
131
- label: slice.translator.currentLanguage,
132
- customColor: "black",
133
- toggle: testSliceButton,
134
- });
135
- const sliceSwitch2 = await slice.build("Switch", {
136
- label: "Switch",
137
- position: "bottom",
138
- });
139
-
140
- const select = await slice.build("Select", {
141
- options: [
142
- { value: "Hola", id: 0 },
143
- { value: "Hello", id: 1 },
144
- { value: "Hallo", id: 2 },
145
- { value: "Hi", id: 3 },
146
- { value: "Hola", id: 4 },
147
- { value: "Hello", id: 5 },
148
- { value: "Hallo", id: 6 },
149
- { value: "Hi", id: 7 },
150
- ],
151
- visibleProp: "id",
152
- label: "Elige una opcion",
153
- multiple: true,
154
- });
155
-
156
- const select2 = await slice.build("Select", {
157
- options: [
158
- { value: "Hola", id: 0 },
159
- { value: "Hello", id: 1 },
160
- { value: "Hallo", id: 2 },
161
- { value: "Hi", id: 3 },
162
- ],
163
- visibleProp: "id",
164
- label: "Elige una opcion",
165
- multiple: false,
166
- onOptionSelect: function xd() {
167
- select.value = [select2.value];
168
- },
169
- });
170
-
171
- form.appendChild(checkbox);
172
- form.appendChild(checkbox2);
173
- form.appendChild(sliceSwitch);
174
- form.appendChild(sliceSwitch2);
175
- form.appendChild(select);
176
- form.appendChild(select2);
177
-
178
- form.appendChild(button);
179
-
180
- const button2 = await slice.build("Button", {
181
- value: "Cambiar Idioma",
182
- customColor: "red",
183
- onClickCallback: () => {
184
- if (slice.translator.currentLanguage === "es") {
185
- slice.translator.changeLanguage("en");
186
- } else {
187
- slice.translator.changeLanguage("es");
188
- }
189
- },
190
- sliceId: "buttonLanguage",
191
- });
192
-
193
- form.appendChild(button2);
194
-
195
- const loading = await slice.build("Loading", {});
196
- /*
197
- const fetchManager = await slice.build("FetchManager", {
198
- baseUrl: "https://jsonplaceholder.typicode.com",
199
- });
200
-
201
- // Definimos una función para manejar el éxito de la solicitud
202
- const handleSuccess = (data, response) => {
203
- console.log("Solicitud exitosa:", response);
204
- };
205
-
206
- // Definimos una función para manejar el error de la solicitud
207
- const handleError = (data, response) => {
208
- console.error("Error en la solicitud:", response);
209
- console.error("Datos enviados:", data);
210
- hola();
211
- };
212
-
213
- // Realizamos una solicitud GET
214
- fetchManager
215
- .request("GET", null, "/posts", handleSuccess, handleError)
216
- .then((responseData) => {
217
- console.log("Respuesta recibida:", responseData);
218
- })
219
- .catch((error) => {
220
- console.error("Error:", error);
221
- });
222
- */
223
- const navBar = await slice.build("NavBar", {
224
- items: [
225
- {
226
- text: "Home",
227
- href: "",
228
- },
229
- {
230
- text: "About Us",
231
- href: "",
232
- },
233
- {
234
- text: "Contact Us",
235
- href: "",
236
- },
237
- select,
238
- ],
239
- });
240
-
241
- document.body.insertBefore(navBar, document.body.firstChild);
242
-
243
- const cardYoutube = await slice.build("Card", {
244
- title: "Youtube",
245
- text: "Plataforma para ver videos",
246
- icon: {
247
- name: "youtube",
248
- iconStyle: "filled",
249
- },
250
- customColor: {
251
- card: "red",
252
- icon: "white",
253
- },
254
- sliceId: "cardYoutube",
255
- });
256
-
257
- const cardTwitter = await slice.build("Card", {
258
- title: "Twitter",
259
- text: "Plataforma donde nada te nutre",
260
- icon: {
261
- name: "twitter",
262
- iconStyle: "filled",
263
- },
264
- customColor: {
265
- card: "#1DA1F2",
266
- icon: "white",
267
- },
268
- sliceId: "cardTwitter",
269
- });
270
-
271
- const cardFacebook = await slice.build("Card", {
272
- title: "Facebook",
273
- text: "Plataforma para responder en marketplace y vender 1 vez a la cuaresma",
274
- icon: {
275
- name: "facebook",
276
- iconStyle: "filled",
277
- },
278
- customColor: {
279
- card: "#1877F2",
280
- icon: "white",
281
- },
282
- sliceId: "cardFacebook",
283
- });
284
-
285
- const cardLinkedin = await slice.build("Card", {
286
- title: "Linkedin",
287
- text: "Plataforma para buscar trabajo",
288
- icon: {
289
- name: "linkedin",
290
- iconStyle: "filled",
291
- },
292
- customColor: {
293
- card: "#0A66C2",
294
- icon: "white",
295
- },
296
- });
297
-
298
- const cardGoogle = await slice.build("Card", {
299
- title: "Google",
300
- text: "Plataforma para buscar cosas",
301
- icon: {
302
- name: "google",
303
- iconStyle: "filled",
304
- },
305
- customColor: {
306
- card: "white",
307
- icon: "black",
308
- },
309
- sliceId: "cardGoogle",
310
- });
311
-
312
- const cardApple = await slice.build("Card", {
313
- title: "Apple",
314
- text: "Plataforma para comprar cosas caras",
315
- icon: {
316
- name: "apple",
317
- iconStyle: "filled",
318
- },
319
- customColor: {
320
- card: "black",
321
- icon: "white",
322
- },
323
- });
324
-
325
- const cardStackoverflow = await slice.build("Card", {
326
- title: "Stackoverflow",
327
- text: "Plataforma para preguntar cosas",
328
- icon: {
329
- name: "stackoverflow",
330
- iconStyle: "filled",
331
- },
332
- customColor: {
333
- card: "#F48024",
334
- icon: "white",
335
- },
336
- });
337
-
338
- const cardGithub = await slice.build("Card", {
339
- title: "Github",
340
- text: "Plataforma para compartir código",
341
- icon: {
342
- name: "github",
343
- iconStyle: "filled",
344
- },
345
- customColor: {
346
- card: "black",
347
- icon: "white",
348
- },
349
- });
350
-
351
- const cardDiscord = await slice.build("Card", {
352
- title: "Discord",
353
- text: "Plataforma para hablar con amigos y fumar porro y la tarea de Eli",
354
- icon: {
355
- name: "discord",
356
- iconStyle: "filled",
357
- },
358
- customColor: {
359
- card: "#5865F2",
360
- icon: "white",
361
- },
362
- });
363
-
364
- const cardHTML = await slice.build("Card", {
365
- title: "HTML",
366
- text: "Lenguaje de marcado",
367
- icon: {
368
- name: "html",
369
- iconStyle: "filled",
370
- },
371
- customColor: {
372
- card: "orange",
373
- icon: "white",
374
- },
375
- });
376
-
377
- const gridDiv = document.createElement("div");
378
- gridDiv.style.display = "grid";
379
- gridDiv.style.gridTemplateColumns = "repeat(5, 1fr)";
380
- gridDiv.style.gap = "1rem";
381
- gridDiv.style.padding = "1rem";
382
- gridDiv.style.height = "600px";
383
-
384
- gridDiv.appendChild(cardYoutube);
385
- gridDiv.appendChild(cardTwitter);
386
- gridDiv.appendChild(cardFacebook);
387
- gridDiv.appendChild(cardLinkedin);
388
- gridDiv.appendChild(cardGithub);
389
- gridDiv.appendChild(cardGoogle);
390
- gridDiv.appendChild(cardApple);
391
- gridDiv.appendChild(cardStackoverflow);
392
- gridDiv.appendChild(cardDiscord);
393
- gridDiv.appendChild(cardHTML);
394
-
395
- document.body.appendChild(gridDiv);