nexus-shared 1.1.8 → 1.1.10

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-shared",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Nexus shared React components for Next.js",
5
5
  "type": "module",
6
6
  "sideEffects": [ "**/*.css" ],
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import React, { useEffect, useState } from "react";
2
4
  import { CreateClone, DynamicSorting, GetVisibleAndHiddenItems } from "../../helpers/datasource-helpers";
3
5
  import { RenderChildren } from "../../helpers/element-helpers";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import React, { useEffect } from "react";
2
4
  import { GetInputId } from "../../helpers/input-helpers";
3
5
  import { IForm, IFormCreateResults, IInputCreateResults } from "../../interfaces/input-interfaces";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import React, { useEffect } from "react";
2
4
  import { ConvertRemToPixels, IsKeyPressed } from "../../helpers/browser-helpers";
3
5
  import { Debounce, DebouncedFunction } from "../../helpers/utility-helpers";
@@ -1,9 +1,8 @@
1
+ "use server";
2
+ import { Inter } from "next/font/google";
1
3
  import Script from "next/script";
2
4
  import React from "react";
3
- import {
4
- IGlobalLayout,
5
- ROOT_LOADER_IDENTITY,
6
- } from "../../interfaces/layout-interfaces";
5
+ import { IGlobalLayout, ROOT_LOADER_IDENTITY } from "../../interfaces/layout-interfaces";
7
6
  import { FILES } from "../../nexus.environments";
8
7
  import { LayoutHelpers } from "./layout-helpers";
9
8
 
@@ -16,48 +15,40 @@ import "./../../styles/nexus.loader.css";
16
15
  import "./../../styles/nexus.logic.css";
17
16
  import "./../../styles/nexus.utility.css";
18
17
 
19
- export const GlobalLayout = async ({
20
- children,
21
- globalLayout,
22
- }: Readonly<{ children: React.ReactNode; globalLayout: IGlobalLayout }>) => {
18
+ const inter = Inter({ weight: ["300", "400", "500", "600", "700", "800"], subsets: ["latin"] });
19
+
20
+ export const GlobalLayout = async ({ children, globalLayout }: Readonly<{ children: React.ReactNode; globalLayout: IGlobalLayout }>) => {
23
21
  return (
24
- <React.Fragment>
25
- <LayoutHelpers globalLayout={globalLayout} />
26
- <div
27
- style={{
28
- zIndex: "1000",
29
- width: "100vw",
30
- height: "100vh",
31
- position: "fixed",
32
- display: "flex",
33
- justifyContent: "center",
34
- alignItems: "center",
35
- backgroundColor: "rgb(40, 40, 40)",
36
- }}
37
- id={ROOT_LOADER_IDENTITY}
38
- >
39
- <img
40
- src={FILES.LOGO.ICON}
41
- alt={"logo"}
22
+ <html lang="en">
23
+ <head>
24
+ <title>{globalLayout.defaultDocumentTitle}</title>
25
+ <meta name="description" content={globalLayout.defaultDocumentDescription} />
26
+ <meta name="keywords" content={globalLayout.defaultDocumentKeywords.join(", ")} />
27
+ <link rel="icon" href="/favicon.ico" />
28
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
29
+ <style id="nexus-styles"></style>
30
+ </head>
31
+ <body className={inter.className}>
32
+ <LayoutHelpers globalLayout={globalLayout} />
33
+ <div
42
34
  style={{
43
- minHeight: "3rem",
44
- minWidth: "3rem",
45
- width: "3rem",
46
- height: "3rem",
35
+ zIndex: "1000",
36
+ width: "100vw",
37
+ height: "100vh",
38
+ position: "fixed",
39
+ display: "flex",
40
+ justifyContent: "center",
41
+ alignItems: "center",
42
+ backgroundColor: "rgb(40, 40, 40)",
47
43
  }}
48
- />
49
- </div>
50
- {children}
51
- <Script
52
- type="module"
53
- src="https://cdn.jsdelivr.net/npm/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"
54
- strategy="lazyOnload"
55
- ></Script>
56
- <Script
57
- noModule
58
- src="https://cdn.jsdelivr.net/npm/ionicons@5.5.2/dist/ionicons/ionicons.js"
59
- strategy="lazyOnload"
60
- ></Script>
61
- </React.Fragment>
44
+ id={ROOT_LOADER_IDENTITY}
45
+ >
46
+ <img src={FILES.LOGO.ICON} alt={"logo"} style={{ minHeight: "3rem", minWidth: "3rem", width: "3rem", height: "3rem" }} />
47
+ </div>
48
+ {children}
49
+ <Script type="module" src="https://cdn.jsdelivr.net/npm/ionicons@5.5.2/dist/ionicons/ionicons.esm.js" strategy="lazyOnload"></Script>
50
+ <Script noModule src="https://cdn.jsdelivr.net/npm/ionicons@5.5.2/dist/ionicons/ionicons.js" strategy="lazyOnload"></Script>
51
+ </body>
52
+ </html>
62
53
  );
63
54
  };
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import { useEffect } from "react";
2
4
  import { RemoveElement } from "../../helpers/browser-helpers";
3
5
  import { IGlobalLayout, ROOT_LOADER_IDENTITY } from "../../interfaces/layout-interfaces";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import React, { useEffect } from "react";
2
4
  import { GetButton, IButton } from "../../interfaces/button-interfaces";
3
5
  import { EIconTypes } from "../../interfaces/icon-interfaces";