gbs-add-block 1.0.28 → 1.0.30
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 +3 -3
- package/package.json +1 -1
- package/source/components/bargraph/index.tsx +1 -1
- package/source/components/breadcrumb/index.tsx +1 -1
- package/source/components/button/index.tsx +1 -1
- package/source/components/card/index.tsx +1 -1
- package/source/components/checkbox/index.tsx +1 -1
- package/source/components/contextmenu/ContextMenu.tsx +1 -1
- package/source/components/contextmenu/ContextMenuItem.tsx +1 -1
- package/source/components/contextmenu/types.ts +1 -1
- package/source/components/datagrid/context/GridContext.tsx +2 -2
- package/source/components/datagrid/hooks/useFiltering.ts +1 -1
- package/source/components/datagrid/index.tsx +1 -0
- package/source/components/datagrid/layout/GridBody.tsx +1 -1
- package/source/components/datagrid/type.ts +1 -1
- package/source/components/formrenderer/componentHandles/CheckBoxHandles.tsx +1 -1
- package/source/components/formrenderer/componentHandles/DatePickerHandles.tsx +1 -1
- package/source/components/formrenderer/componentHandles/InputHandles.tsx +1 -1
- package/source/components/formrenderer/componentHandles/MultiHandles.tsx +1 -1
- package/source/components/formrenderer/componentHandles/SelectHandles.tsx +1 -1
- package/source/components/formrenderer/helperFunctions.ts +1 -1
- package/source/components/formrenderer/index.tsx +1 -1
- package/source/components/input/types.ts +1 -1
- package/source/components/materialInput/index.tsx +1 -1
- package/source/components/materialInput/types.ts +1 -1
- package/source/components/modal/index.tsx +1 -1
- package/source/components/navbar/AuthSection.tsx +1 -1
- package/source/components/navbar/MobileToggle.tsx +1 -1
- package/source/components/navbar/NavItemComponent.tsx +1 -1
- package/source/components/navbar/SearchBar.tsx +1 -1
- package/source/components/navbar/index.tsx +1 -1
- package/source/components/sidebar/components/MenuItem.tsx +1 -1
- package/source/components/sidebar/components/MenuSection.tsx +1 -1
- package/source/components/sidebar/components/SidebarFooter.tsx +1 -1
- package/source/components/sidebar/components/SidebarLogo.tsx +1 -1
- package/source/components/sidebar/components/SidebarMenu.tsx +1 -1
- package/source/components/sidebar/components/UserProfile.tsx +1 -1
- package/source/components/sidebar/hooks/useSidebarState.ts +1 -1
- package/source/components/sidebar/index.tsx +1 -1
- package/source/components/tabs/index.tsx +1 -1
- package/source/components/tabs/types.ts +1 -1
- package/source/components/toast/ToastComponent.tsx +1 -1
- package/source/components/toast/ToastIcon.tsx +1 -1
- package/source/components/toast/index.tsx +1 -1
- package/source/components/toast/toastStore.ts +1 -1
- package/source/components/toast/useToast.ts +1 -1
- package/source/icon/iconPaths.ts +21 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# GBS Building Blocks 2.0 (v1.0.
|
|
1
|
+
# GBS Building Blocks 2.0 (v1.0.30)
|
|
2
2
|
|
|
3
3
|
Latest and upgraded version of GBS building blocks with headless UI and removed dependencies.
|
|
4
4
|
|
|
@@ -6,9 +6,9 @@ Latest and upgraded version of GBS building blocks with headless UI and removed
|
|
|
6
6
|
|
|
7
7
|
For detailed documentation on usage and props, Please visit: [Building Block Documentation v2.0](https://gramprokit.vercel.app)
|
|
8
8
|
|
|
9
|
-
## What's New 🎉 (Ver 1.0.
|
|
9
|
+
## What's New 🎉 (Ver 1.0.30)
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- Type Import Update
|
|
12
12
|
|
|
13
13
|
## Authors
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import React from "react";
|
|
|
9
9
|
import { useLocation } from "@grampro/headless-helpers";
|
|
10
10
|
import Icon from "../icon/Icon";
|
|
11
11
|
import { rightArrow } from "../icon/iconPaths";
|
|
12
|
-
import { BreadcrumbsProps } from "./types";
|
|
12
|
+
import type { BreadcrumbsProps } from "./types";
|
|
13
13
|
|
|
14
14
|
export const Breadcrumb = ({
|
|
15
15
|
showHome = true,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React, { ButtonHTMLAttributes, ReactNode } from "react";
|
|
8
|
+
import React, { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
9
9
|
|
|
10
10
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
11
11
|
children?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect, useCallback, MouseEvent } from "react";
|
|
2
|
-
import { ContextMenuProps, Position } from "./types";
|
|
2
|
+
import type { ContextMenuProps, Position } from "./types";
|
|
3
3
|
|
|
4
4
|
export const ContextMenu: React.FC<ContextMenuProps> = ({ children }) => {
|
|
5
5
|
const [isVisible, setIsVisible] = useState<boolean>(false);
|
|
@@ -110,8 +110,8 @@ export const GridProvider: React.FC<{
|
|
|
110
110
|
const { selectedRows, handleSelectAll, handleSelect, isRowSelected } =
|
|
111
111
|
useRowSelection(workingDataSource, onSelectRow);
|
|
112
112
|
|
|
113
|
-
// Page status reporting
|
|
114
|
-
usePageStatus(currentPage, totalPages, pageStatus);
|
|
113
|
+
// Page status reporting - Bug Report - causes re-rendering when currentPage or totalPages change
|
|
114
|
+
// usePageStatus(currentPage, totalPages, pageStatus);
|
|
115
115
|
|
|
116
116
|
// Context value
|
|
117
117
|
const contextValue: GridContextType = {
|
|
@@ -3,7 +3,7 @@ import { useGridContext } from "../context/GridContext";
|
|
|
3
3
|
import FilterPopup from "./FilterPopup";
|
|
4
4
|
import Icon from "../../icon/Icon";
|
|
5
5
|
import { listFilter } from "../../icon/iconPaths";
|
|
6
|
-
import { Column } from "../type";
|
|
6
|
+
import type { Column } from "../type";
|
|
7
7
|
|
|
8
8
|
const GridBody = () => {
|
|
9
9
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from "react";
|
|
2
2
|
import { DatePicker } from "../../datepicker";
|
|
3
|
-
import { DatePickerHandlesProps } from "../types";
|
|
3
|
+
import type { DatePickerHandlesProps } from "../types";
|
|
4
4
|
import { evaluateExpression } from "@grampro/headless-helpers";
|
|
5
5
|
|
|
6
6
|
export default function DatePickerHandles({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState, useCallback } from "react";
|
|
2
2
|
import { validateInput } from "../helperFunctions";
|
|
3
3
|
import { Input } from "../../input";
|
|
4
|
-
import { InputHandlesProps } from "../types";
|
|
4
|
+
import type { InputHandlesProps } from "../types";
|
|
5
5
|
import { evaluateExpression } from "@grampro/headless-helpers";
|
|
6
6
|
import { twMerge } from "tailwind-merge";
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from "react";
|
|
2
|
-
import { MultiSelectHandlesProps } from "../types";
|
|
2
|
+
import type { MultiSelectHandlesProps } from "../types";
|
|
3
3
|
import { MultiSelect } from "../../multiselect";
|
|
4
4
|
import { evaluateExpression } from "@grampro/headless-helpers";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from "react";
|
|
2
2
|
import { Select } from "../../select";
|
|
3
|
-
import { Option, SelectHandlesProps } from "../types";
|
|
3
|
+
import type { Option, SelectHandlesProps } from "../types";
|
|
4
4
|
import { evaluateExpression } from "@grampro/headless-helpers";
|
|
5
5
|
|
|
6
6
|
export default function SelectHandles({
|
|
@@ -3,7 +3,7 @@ import SelectHandles from "./componentHandles/SelectHandles";
|
|
|
3
3
|
import MultiHandles from "./componentHandles/MultiHandles";
|
|
4
4
|
import DatePickerHandles from "./componentHandles/DatePickerHandles";
|
|
5
5
|
import CheckboxHandles from "./componentHandles/CheckBoxHandles";
|
|
6
|
-
import { FormItem } from "./types";
|
|
6
|
+
import type { FormItem } from "./types";
|
|
7
7
|
|
|
8
8
|
// Component Map
|
|
9
9
|
export const COMPONENT_MAP = {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useRef, useState, FormEvent } from "react";
|
|
9
9
|
import { useFormContext } from "@grampro/headless-helpers";
|
|
10
|
-
import { FormItem, FormRendererProps } from "./types";
|
|
10
|
+
import type { FormItem, FormRendererProps } from "./types";
|
|
11
11
|
import { COMPONENT_MAP, validateField } from "./helperFunctions";
|
|
12
12
|
|
|
13
13
|
const FormRenderer: React.FC<FormRendererProps> = ({
|
|
@@ -9,7 +9,7 @@ import React, { useEffect, useCallback, memo, useRef } from "react";
|
|
|
9
9
|
import { twMerge } from "tailwind-merge";
|
|
10
10
|
import Icon from "../icon/Icon";
|
|
11
11
|
import { x } from "../icon/iconPaths";
|
|
12
|
-
import { ModalProps } from "./types";
|
|
12
|
+
import type { ModalProps } from "./types";
|
|
13
13
|
|
|
14
14
|
const defaultClasses = {
|
|
15
15
|
modal:
|
|
@@ -10,7 +10,7 @@ import NavItemComponent from "./NavItemComponent";
|
|
|
10
10
|
import SearchBar from "./SearchBar";
|
|
11
11
|
import AuthSection from "./AuthSection";
|
|
12
12
|
import MobileToggle from "./MobileToggle";
|
|
13
|
-
import { NavbarProps } from "./types";
|
|
13
|
+
import type { NavbarProps } from "./types";
|
|
14
14
|
import {
|
|
15
15
|
getContainerClasses,
|
|
16
16
|
getPositionClasses,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useEffect } from "react";
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
|
-
import { ToastPosition } from "./types";
|
|
5
|
+
import type { ToastPosition } from "./types";
|
|
6
6
|
import { useToastStore } from "./toastStore";
|
|
7
7
|
import { ToastComponent } from "./ToastComponent";
|
|
8
8
|
|
package/source/icon/iconPaths.ts
CHANGED
|
@@ -177,3 +177,24 @@ export const cloudDownload: any = [
|
|
|
177
177
|
key: "ui1hmy",
|
|
178
178
|
},
|
|
179
179
|
];
|
|
180
|
+
|
|
181
|
+
export const plus: any = [
|
|
182
|
+
{ type: "path", d: "M12 5v14", key: "vertical" },
|
|
183
|
+
{ type: "path", d: "M5 12h14", key: "horizontal" },
|
|
184
|
+
];
|
|
185
|
+
|
|
186
|
+
export const trash: any = [
|
|
187
|
+
{
|
|
188
|
+
type: "path",
|
|
189
|
+
d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
|
|
190
|
+
key: "bin",
|
|
191
|
+
fill: "none",
|
|
192
|
+
},
|
|
193
|
+
{ type: "path", d: "M3 6h18", key: "lid", fill: "none" },
|
|
194
|
+
{
|
|
195
|
+
type: "path",
|
|
196
|
+
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
197
|
+
key: "handle",
|
|
198
|
+
fill: "none",
|
|
199
|
+
},
|
|
200
|
+
];
|