5htp-core 0.4.0-3 → 0.4.0-5
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/package.json +1 -1
- package/src/client/assets/css/components/button.less +13 -6
- package/src/client/assets/css/text/text.less +6 -4
- package/src/client/services/router/components/Page.tsx +5 -3
- package/src/client/services/router/components/router.tsx +1 -2
- package/src/server/services/router/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5htp-core",
|
|
3
3
|
"description": "Convenient TypeScript framework designed for Performance and Productivity.",
|
|
4
|
-
"version": "0.4.0-
|
|
4
|
+
"version": "0.4.0-5",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp-core.git",
|
|
7
7
|
"license": "MIT",
|
|
@@ -259,7 +259,7 @@ ul.row {
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
.btn.icon > .label,
|
|
262
|
-
> li > .btn +
|
|
262
|
+
> li > .btn + .menu {
|
|
263
263
|
position: absolute;
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -269,8 +269,8 @@ ul.row {
|
|
|
269
269
|
position: relative;
|
|
270
270
|
|
|
271
271
|
// Submenu
|
|
272
|
-
&:not(:hover) > .btn +
|
|
273
|
-
> .btn[disabled] +
|
|
272
|
+
&:not(:hover) > .btn + .menu,
|
|
273
|
+
> .btn[disabled] + .menu {
|
|
274
274
|
display: none;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
@@ -321,7 +321,7 @@ ul.col {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
.btn.icon > .label,
|
|
324
|
-
> li > .btn +
|
|
324
|
+
> li > .btn + .menu {
|
|
325
325
|
left: 100%;
|
|
326
326
|
margin-left: @spacing;
|
|
327
327
|
}
|
|
@@ -354,7 +354,7 @@ ul.col {
|
|
|
354
354
|
&.bubble-left {
|
|
355
355
|
|
|
356
356
|
.btn.icon > .label,
|
|
357
|
-
> li > .btn +
|
|
357
|
+
> li > .btn + .menu {
|
|
358
358
|
left: auto;
|
|
359
359
|
margin-left: 0;
|
|
360
360
|
right: 100%;
|
|
@@ -363,10 +363,17 @@ ul.col {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
// Submenu
|
|
366
367
|
ul.row {
|
|
367
368
|
.btn.icon > .label,
|
|
368
|
-
> li > .btn +
|
|
369
|
+
> li > .btn + .menu {
|
|
369
370
|
bottom: 100%;
|
|
370
371
|
margin-bottom: @spacing / 2;
|
|
371
372
|
}
|
|
373
|
+
|
|
374
|
+
> li > .btn + .menu.pos-bottom {
|
|
375
|
+
bottom: auto;
|
|
376
|
+
top: 100%;
|
|
377
|
+
margin-bottom: @spacing / 2;
|
|
378
|
+
}
|
|
372
379
|
}
|
|
@@ -14,15 +14,17 @@ a {
|
|
|
14
14
|
|
|
15
15
|
&.super {
|
|
16
16
|
text-decoration: none;
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
&::before {
|
|
18
19
|
content: ' ';
|
|
19
20
|
position: absolute;
|
|
20
21
|
top: 0; left: 0; right: 0; bottom: 0;
|
|
21
22
|
z-index: 5;
|
|
23
|
+
}
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
> * {
|
|
26
|
+
z-index: 6;
|
|
27
|
+
position: relative;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -21,10 +21,12 @@ export default ({ page }: { page: Page }) => {
|
|
|
21
21
|
----------------------------------*/
|
|
22
22
|
const context = useContext();
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
// Temporary fix: context.page may not be updated at this stage
|
|
25
|
+
// Seems to be the case when we change page, but still same page component with different data
|
|
26
|
+
context.page = page;
|
|
27
27
|
|
|
28
|
+
// Bind data
|
|
29
|
+
const [apiData, setApiData] = React.useState<{[k: string]: any} | null>( page.data || {});
|
|
28
30
|
page.setAllData = setApiData;
|
|
29
31
|
context.data = apiData;
|
|
30
32
|
|
|
@@ -105,9 +105,8 @@ export default ({ service: clientRouter }: { service?: ClientRouter }) => {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// Fetch API data to hydrate the page
|
|
108
|
-
let newData;
|
|
109
108
|
try {
|
|
110
|
-
|
|
109
|
+
await newpage.preRender();
|
|
111
110
|
} catch (error) {
|
|
112
111
|
console.error(LogPrefix, "Unable to fetch data:", error);
|
|
113
112
|
clientRouter.setLoading(false);
|
|
@@ -531,7 +531,7 @@ declare type Routes = {
|
|
|
531
531
|
for (let iKey = 0; iKey < route.keys.length; iKey++) {
|
|
532
532
|
const nomParam = route.keys[iKey];
|
|
533
533
|
if (typeof nomParam === 'string') // number = sans nom
|
|
534
|
-
request.data[nomParam] = match[iKey + 1]
|
|
534
|
+
request.data[nomParam] = decodeURIComponent(match[iKey + 1]);
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
// Run on resolution hooks. Ex: authentication check
|