@nodeblocks/frontend-list-organization-block 0.0.4 → 0.1.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/dist/blocks.d.ts +5 -5
- package/dist/blocks.d.ts.map +1 -1
- package/dist/context.d.ts +51 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/index.cjs.js +9162 -8154
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +9150 -8142
- package/dist/index.esm.js.map +1 -1
- package/dist/lib.d.ts +72 -20
- package/dist/lib.d.ts.map +1 -1
- package/dist/list-organizations.d.ts +74 -0
- package/dist/list-organizations.d.ts.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
- package/readme.md +9 -2
- package/dist/GridLayout/GridLayout.d.ts +0 -60
- package/dist/GridLayout/GridLayout.d.ts.map +0 -1
- package/dist/GridLayout/index.d.ts +0 -2
- package/dist/GridLayout/index.d.ts.map +0 -1
- package/dist/ListOrganizations.d.ts +0 -67
- package/dist/ListOrganizations.d.ts.map +0 -1
- package/dist/TableLayout/TableLayout.d.ts +0 -90
- package/dist/TableLayout/TableLayout.d.ts.map +0 -1
- package/dist/TableLayout/index.d.ts +0 -2
- package/dist/TableLayout/index.d.ts.map +0 -1
package/dist/lib.d.ts
CHANGED
|
@@ -1,26 +1,81 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentProps, FunctionComponent, ReactElement, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* The function to be passed into a block component as `children` to selectively override default blocks, or just a `ReactNode`.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* @example
|
|
6
|
+
* <Block>
|
|
7
|
+
* {({ defaultBlocks: { header, ...defaultBlocks }, defaultBlockOrder }) => ({
|
|
8
|
+
* blocks: {
|
|
9
|
+
* ...defaultBlocks,
|
|
10
|
+
* header: {
|
|
11
|
+
* ...header,
|
|
12
|
+
* props: {
|
|
13
|
+
* ...header.props,
|
|
14
|
+
* label: "Custom Label"
|
|
15
|
+
* }
|
|
16
|
+
* },
|
|
17
|
+
* subheader: <CustomComponent />
|
|
18
|
+
* },
|
|
19
|
+
* blockOrder: ["header", "subheader", "body", "footer"]
|
|
20
|
+
* })}
|
|
21
|
+
* </Block>
|
|
9
22
|
*/
|
|
10
|
-
type
|
|
23
|
+
export type BlocksOverride<DefaultBlocks, CustomBlocks> = (({ defaultBlocks, defaultBlockOrder, }: {
|
|
11
24
|
defaultBlocks: DefaultBlocks;
|
|
25
|
+
defaultBlockOrder: readonly (keyof DefaultBlocks)[];
|
|
26
|
+
}) => {
|
|
27
|
+
blocks: Partial<DefaultBlocks> & CustomBlocks;
|
|
28
|
+
blockOrder: readonly (keyof DefaultBlocks)[] | readonly (keyof CustomBlocks)[];
|
|
29
|
+
}) | ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a strongly typed `defaultBlocks` object, allowing for types to propagate into block override objects.
|
|
32
|
+
*
|
|
33
|
+
* @param components - A map of default block keys to component functions.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const defaultBlocks = createDefaultBlocks({
|
|
37
|
+
* title: Title,
|
|
38
|
+
* description: Description,
|
|
39
|
+
* form: Form,
|
|
40
|
+
* });
|
|
41
|
+
*/
|
|
42
|
+
export declare function createDefaultBlocks<T extends Record<string, FunctionComponent<any>>>(components: T): {
|
|
43
|
+
[K in keyof T]: ReactElement<ComponentProps<T[K]>, T[K]>;
|
|
12
44
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
45
|
+
/**
|
|
46
|
+
* A component for rendering {@link BlocksOverride|`BlocksOverride`} results.
|
|
47
|
+
* Exposes the evaluated `blocks` and `blockOrder` as arguments to the `children` function.
|
|
48
|
+
*
|
|
49
|
+
* @param props
|
|
50
|
+
* @param props.blocksOverride - The {@link BlocksOverride|`BlocksOverride`} (i.e. `children` of outer component).
|
|
51
|
+
* @param props.defaultBlocks - The default blocks of outer component.
|
|
52
|
+
* @param props.children - A function returning the JSX to render.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <BlocksOverrideComponent
|
|
56
|
+
* defaultBlocks={defaultFormBlocks}
|
|
57
|
+
* blocksOverride={children}
|
|
58
|
+
* >
|
|
59
|
+
* {({ blocks, blockOrder }) =>
|
|
60
|
+
* blockOrder.map((key) => (
|
|
61
|
+
* <Fragment key={String(key)}>{blocks[key]}</Fragment>
|
|
62
|
+
* ))
|
|
63
|
+
* }
|
|
64
|
+
* </BlocksOverrideComponent>
|
|
65
|
+
*/
|
|
66
|
+
export declare function BlocksOverrideComponent<DefaultBlocks extends Record<string, ReactNode>, CustomBlocks extends Record<string, ReactNode>>({ blocksOverride, defaultBlocks, defaultBlockOrder, children, }: {
|
|
67
|
+
blocksOverride: BlocksOverride<DefaultBlocks, CustomBlocks>;
|
|
68
|
+
defaultBlocks: DefaultBlocks;
|
|
69
|
+
defaultBlockOrder: (keyof DefaultBlocks)[];
|
|
70
|
+
children: ({ blocks, blockOrder, }: {
|
|
71
|
+
blocks: Partial<DefaultBlocks> & Partial<CustomBlocks>;
|
|
72
|
+
blockOrder: readonly (keyof DefaultBlocks | keyof CustomBlocks)[];
|
|
73
|
+
}) => ReactNode;
|
|
74
|
+
}): ReactNode;
|
|
75
|
+
type MergeTypes<Object1, Object2> = {
|
|
76
|
+
[K in keyof Object1 | keyof Object2]: K extends keyof Object1 ? Object1[K] : K extends keyof Object2 ? Object2[K] : never;
|
|
23
77
|
};
|
|
78
|
+
export declare function deepMerge<A extends Record<string, any>, B extends Record<string, any>>(obj1: A, obj2: B): MergeTypes<B, A>;
|
|
24
79
|
type ClassName = string | ClassName[] | undefined | null;
|
|
25
80
|
/**
|
|
26
81
|
* Utility function to join class names together, ignoring undefined or nil values.
|
|
@@ -28,8 +83,5 @@ type ClassName = string | ClassName[] | undefined | null;
|
|
|
28
83
|
* @returns The joined class names.
|
|
29
84
|
*/
|
|
30
85
|
export declare function classNames(...classes: ClassName[]): string;
|
|
31
|
-
export declare function deepMerge(obj1: Record<string, any>, obj2: Record<string, any>): {
|
|
32
|
-
[x: string]: any;
|
|
33
|
-
};
|
|
34
86
|
export {};
|
|
35
87
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,cAAc,CAAC,aAAa,EAAE,YAAY,IAClD,CAAC,CAAC,EACA,aAAa,EACb,iBAAiB,GAClB,EAAE;IACD,aAAa,EAAE,aAAa,CAAC;IAC7B,iBAAiB,EAAE,SAAS,CAAC,MAAM,aAAa,CAAC,EAAE,CAAC;CACrD,KAAK;IACJ,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,YAAY,CAAC;IAE9C,UAAU,EAAE,SAAS,CAAC,MAAM,aAAa,CAAC,EAAE,GAAG,SAAS,CAAC,MAAM,YAAY,CAAC,EAAE,CAAC;CAChF,CAAC,GACF,SAAS,CAAC;AAEd;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAClF,UAA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AE,CAAC,CAAC,CAClC;AAED,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAE1D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { PaginationProps, Spacing, Tab, Table, Typography } from '@basaldev/blocks-frontend-framework';
|
|
2
|
+
import '@basaldev/blocks-frontend-framework/dist/style.css';
|
|
3
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
4
|
+
import { BlocksOverride } from './lib';
|
|
5
|
+
import './list-organizations.css';
|
|
6
|
+
export interface ListOrganizationsRowData {
|
|
7
|
+
id: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
name: string;
|
|
10
|
+
joinDate: string;
|
|
11
|
+
auditStatus: string;
|
|
12
|
+
}
|
|
13
|
+
declare const ListOrganizations: {
|
|
14
|
+
<Tabs extends ComponentProps<typeof Tab>["tabs"], CustomBlocks extends Record<string, ReactNode> = {}>({ listOrganizationsTitle, labels, isLoading, onSearchFieldChange, onActionClick, onNavigate, onRowActionClick, pagination, data, rowHref, tabs, currentTab, onTabChange, className, children, ...props }: Omit<ComponentProps<"div">, "children"> & {
|
|
15
|
+
/** Loading state for table */
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
/** Table Labels */
|
|
18
|
+
labels: {
|
|
19
|
+
emptyStateMessage: string;
|
|
20
|
+
searchFieldPlaceholder: string;
|
|
21
|
+
actions: {
|
|
22
|
+
headerAction: ReactNode;
|
|
23
|
+
rowAction: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
headerRow: {
|
|
26
|
+
createdAt: string;
|
|
27
|
+
name: string;
|
|
28
|
+
joinDate: string;
|
|
29
|
+
auditStatus: string;
|
|
30
|
+
};
|
|
31
|
+
cellData: {
|
|
32
|
+
statusApproved: ReactNode;
|
|
33
|
+
statusRejected: ReactNode;
|
|
34
|
+
statusWaitingForReview: ReactNode;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
onSearchFieldChange: (value: string) => void;
|
|
38
|
+
onActionClick: () => void;
|
|
39
|
+
/** Callback for navigating to job page */
|
|
40
|
+
onNavigate: (to: string) => void;
|
|
41
|
+
onRowActionClick: (rowData: ListOrganizationsRowData) => void;
|
|
42
|
+
/** Callback for pagination display */
|
|
43
|
+
pagination?: PaginationProps;
|
|
44
|
+
/** Job order list table data */
|
|
45
|
+
data: ListOrganizationsRowData[];
|
|
46
|
+
/** Callback for linking to show page */
|
|
47
|
+
rowHref: (row: ListOrganizationsRowData) => string;
|
|
48
|
+
/** Tabs configuration */
|
|
49
|
+
tabs: Tabs;
|
|
50
|
+
/** Current tab to show as selected */
|
|
51
|
+
currentTab?: Tabs[number]["label"];
|
|
52
|
+
/** Callback when tab is clicked */
|
|
53
|
+
onTabChange?: (tab: Tabs[number]["label"]) => void;
|
|
54
|
+
listOrganizationsTitle: ReactNode;
|
|
55
|
+
children?: BlocksOverride<typeof defaultBlocks, CustomBlocks>;
|
|
56
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
Title(props: Partial<ComponentProps<typeof Typography>>): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
Action(props: Partial<ComponentProps<typeof Spacing>>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
Header(props: Partial<ComponentProps<"div">>): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
Loader(props: Partial<ComponentProps<"div">>): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
Content(props: Partial<ComponentProps<"div">>): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
Tabs<Tabs extends ComponentProps<typeof Tab>["tabs"]>(props: Partial<ComponentProps<typeof Tab>>): import("react/jsx-runtime").JSX.Element | undefined;
|
|
63
|
+
Table<Tabs extends ComponentProps<typeof Tab>["tabs"]>(props: Partial<ComponentProps<typeof Table<ListOrganizationsRowData>>>): import("react/jsx-runtime").JSX.Element | undefined;
|
|
64
|
+
};
|
|
65
|
+
declare const defaultBlocks: {
|
|
66
|
+
title: import("react").ReactElement<Partial<import("@basaldev/blocks-frontend-framework").TypographyProps>, (props: Partial<ComponentProps<typeof Typography>>) => import("react/jsx-runtime").JSX.Element>;
|
|
67
|
+
action: import("react").ReactElement<Partial<import("@basaldev/blocks-frontend-framework").SpacingProps>, (props: Partial<ComponentProps<typeof Spacing>>) => import("react/jsx-runtime").JSX.Element>;
|
|
68
|
+
header: import("react").ReactElement<Partial<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, (props: Partial<ComponentProps<"div">>) => import("react/jsx-runtime").JSX.Element>;
|
|
69
|
+
content: import("react").ReactElement<Partial<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, (props: Partial<ComponentProps<"div">>) => import("react/jsx-runtime").JSX.Element>;
|
|
70
|
+
tabs: import("react").ReactElement<Partial<import("@basaldev/blocks-frontend-framework").TabProps>, <Tabs extends ComponentProps<typeof Tab>["tabs"]>(props: Partial<ComponentProps<typeof Tab>>) => import("react/jsx-runtime").JSX.Element | undefined>;
|
|
71
|
+
table: import("react").ReactElement<Partial<import("@basaldev/blocks-frontend-framework").TableProps<ListOrganizationsRowData>>, <Tabs extends ComponentProps<typeof Tab>["tabs"]>(props: Partial<ComponentProps<typeof Table<ListOrganizationsRowData>>>) => import("react/jsx-runtime").JSX.Element | undefined>;
|
|
72
|
+
};
|
|
73
|
+
export default ListOrganizations;
|
|
74
|
+
//# sourceMappingURL=list-organizations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-organizations.d.ts","sourceRoot":"","sources":["../src/list-organizations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,eAAe,EACf,OAAO,EACP,GAAG,EACH,KAAK,EAEL,UAAU,EACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,oDAAoD,CAAC;AAE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AAU,CAAC,CAAC;sHAUzC,OAAO,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;6JAoBvC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;8JAyB7B,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;yGAkBxC,IAAI,SAAS,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,SAChE,OAAO,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC;sIAOjB,IAAI,SAAS,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,SACjE,OAAO,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC;CAkGtE,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,EAAE,IAAI;IAC7D,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxB,GAAG,CAAC,CAAC;AAEN,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,CAC/D,MAAM,EAAE;IACN,aAAa,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,CAAC,OAAO,CAAA;KAAE,CAAC;IACxD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,GAAG,CAAC,KACF;IAAE,MAAM,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodeblocks/frontend-list-organization-block",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"browser": "dist/index.iife.js",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "rollup -c",
|
|
14
|
-
"watch": "rollup -c --watch"
|
|
14
|
+
"watch": "rm -rf dist && cross-env NODE_ENV=development rollup -c --watch"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": "^18.3.1",
|
|
18
|
-
"react-dom": "^18.
|
|
18
|
+
"react-dom": "^18.3.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
21
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
22
22
|
"@rollup/plugin-json": "^6.1.0",
|
|
23
23
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
24
24
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
@@ -26,13 +26,14 @@
|
|
|
26
26
|
"@types/react-dom": "^18.3.1",
|
|
27
27
|
"rollup": "^4.28.0",
|
|
28
28
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
29
|
+
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
29
30
|
"rollup-plugin-postcss": "^4.0.2",
|
|
30
31
|
"rollup-plugin-serve": "^1.1.1",
|
|
31
32
|
"tslib": "^2.8.1",
|
|
32
33
|
"typescript": "^5.7.2"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@basaldev/blocks-frontend-framework": "^
|
|
36
|
-
"@tanstack/react-table": "^8.
|
|
36
|
+
"@basaldev/blocks-frontend-framework": "^5.1.0",
|
|
37
|
+
"@tanstack/react-table": "^8.21.2"
|
|
37
38
|
}
|
|
38
39
|
}
|
package/readme.md
CHANGED
|
@@ -3,24 +3,29 @@
|
|
|
3
3
|
Welcome to the Nodeblocks Frontend Starter Kit! 🎉 This kit is designed to make building frontend libraries in React super easy, helping you streamline your development workflow with minimal fuss. Let's dive in! 🤿
|
|
4
4
|
|
|
5
5
|
### ✨ Features
|
|
6
|
+
|
|
6
7
|
- **🚀 Bundling with Rollup:** Get a clean, minimalistic approach to bundling your JavaScript files for smoother frontend development.
|
|
7
8
|
- **💙 TypeScript Support:** We've included a pre-configured `tsconfig.json` to ensure your TypeScript setup is strict, efficient, and ready to go.
|
|
8
9
|
- **⚙️ Peer Dependencies:** Keep bundle sizes lean with React and React DOM set as peer dependencies.
|
|
9
10
|
- **🎨 CSS Support:** Easily import and process CSS files, giving you more control over your styles.
|
|
10
11
|
|
|
11
12
|
### 🛠️ How to Use
|
|
13
|
+
|
|
12
14
|
1. **Clone this repository** 🌀:
|
|
15
|
+
|
|
13
16
|
```bash
|
|
14
17
|
git clone <repository-url>
|
|
15
18
|
cd <repository-directory>
|
|
16
19
|
```
|
|
17
20
|
|
|
18
21
|
2. **Install dependencies** 📦:
|
|
22
|
+
|
|
19
23
|
```bash
|
|
20
24
|
npm install
|
|
21
25
|
```
|
|
22
26
|
|
|
23
27
|
3. **Start development** 🛠️:
|
|
28
|
+
|
|
24
29
|
```bash
|
|
25
30
|
npm run watch
|
|
26
31
|
```
|
|
@@ -48,10 +53,12 @@ This ensures Nodeblocks libraries integrate seamlessly with different workflows.
|
|
|
48
53
|
npm link
|
|
49
54
|
```
|
|
50
55
|
2. In the test project you want to run:
|
|
56
|
+
|
|
51
57
|
```bash
|
|
52
58
|
npm i
|
|
53
59
|
npm link @basaldev/frontend-starter-kit
|
|
54
60
|
```
|
|
55
|
-
(Note that in real life your library would not be called frontend-starter-kit.)
|
|
56
61
|
|
|
57
|
-
|
|
62
|
+
(Note that in real life your library would not be called frontend-starter-kit.)
|
|
63
|
+
|
|
64
|
+
3. Then you can follow your usual workflow either with **Create React App** (`npm start`) or with Vite (`npm run dev`). This will give you a development environment where whenever you change your library it will be available in your test project.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ChipProps, IconType } from "@basaldev/blocks-frontend-framework";
|
|
2
|
-
import { BlocksOverride } from "../types";
|
|
3
|
-
import "./GridLayout.css";
|
|
4
|
-
export type GridCardProps = {
|
|
5
|
-
imageUrl?: string;
|
|
6
|
-
href?: string;
|
|
7
|
-
onNavigate?: "standard-html-link";
|
|
8
|
-
labels?: string;
|
|
9
|
-
subtitle?: string;
|
|
10
|
-
subtitleImageUrl?: string;
|
|
11
|
-
summary?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
chips?: {
|
|
14
|
-
/** Additional class names for chip */
|
|
15
|
-
className?: string;
|
|
16
|
-
/** Specify chip color */
|
|
17
|
-
color?: ChipProps["color"];
|
|
18
|
-
/** Specify chip type */
|
|
19
|
-
fill?: "solid" | "outline";
|
|
20
|
-
/** Specify chip text */
|
|
21
|
-
label: string;
|
|
22
|
-
/** Icon on the left of the text */
|
|
23
|
-
leftIcon?: IconType;
|
|
24
|
-
/** Icon on the right of the text */
|
|
25
|
-
rightIcon?: IconType;
|
|
26
|
-
/** Specify size of chip */
|
|
27
|
-
size?: "XS" | "S" | "M";
|
|
28
|
-
}[];
|
|
29
|
-
tags?: {
|
|
30
|
-
/** adds IconType icon to tag */
|
|
31
|
-
icon?: IconType | undefined;
|
|
32
|
-
/** adds label or joins labels with / separator */
|
|
33
|
-
label: string | string[];
|
|
34
|
-
/** font and icon size */
|
|
35
|
-
size?: "XS" | "S";
|
|
36
|
-
}[];
|
|
37
|
-
};
|
|
38
|
-
declare const GridCard: ({ imageUrl, href, onNavigate, subtitle, subtitleImageUrl, summary, title, chips, tags, }: GridCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
declare const GridLayout: {
|
|
40
|
-
<T extends {} = GridCardProps>({ subtitle, data, title, titleAlignment, topBottomPaddingSize, titleGapSize, children, }: {
|
|
41
|
-
/** product cards */
|
|
42
|
-
data?: T[];
|
|
43
|
-
/** secondary title */
|
|
44
|
-
subtitle?: string;
|
|
45
|
-
/** main title for list */
|
|
46
|
-
title?: string | React.ReactNode;
|
|
47
|
-
/** title alignment */
|
|
48
|
-
titleAlignment?: "stretch" | "start" | "center" | "end" | "stretch-text-center";
|
|
49
|
-
/** Gap size between title and cards */
|
|
50
|
-
titleGapSize?: "none" | "4XS" | "3XS" | "XXS" | "XS" | "S" | "M" | "L" | "XL";
|
|
51
|
-
/** Top and bottom padding size */
|
|
52
|
-
topBottomPaddingSize?: "none" | "XS" | "S" | "M" | "L" | "XL";
|
|
53
|
-
children?: BlocksOverride<{
|
|
54
|
-
data?: T[];
|
|
55
|
-
}>;
|
|
56
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
displayName: string;
|
|
58
|
-
};
|
|
59
|
-
export { GridLayout, GridCard };
|
|
60
|
-
//# sourceMappingURL=GridLayout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridLayout.d.ts","sourceRoot":"","sources":["../../src/GridLayout/GridLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAET,QAAQ,EAIT,MAAM,qCAAqC,CAAC;AAQ7C,OAAO,EAAU,cAAc,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,kBAAkB,CAAC;AAE1B,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI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AC;QACjC,sBAAsB;QACtB,cAAc,CAAC,EACX,SAAS,GACT,OAAO,GACP,QAAQ,GACR,KAAK,GACL,qBAAqB,CAAC;QAC1B,uCAAuC;QACvC,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;QAC9E,kCAAkC;QAClC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;QAE9D,QAAQ,CAAC,EAAE,cAAc,CAAC;YAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAA;SAAE,CAAC,CAAC;KAC3C;;CAqEA,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/GridLayout/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { DefaultBlocks, TabBarProps, SectionHeaderProps, TableListProps } from "./blocks";
|
|
2
|
-
import { ColumnDef } from "@tanstack/react-table";
|
|
3
|
-
import "@basaldev/blocks-frontend-framework/dist/style.css";
|
|
4
|
-
import "./ListOrganizations.css";
|
|
5
|
-
type RowData = unknown | object | any[];
|
|
6
|
-
declare const ListOrganizations: {
|
|
7
|
-
<TData extends RowData>({ children, columns, data, fieldOptions, showTabs, }: {
|
|
8
|
-
showTabs?: boolean;
|
|
9
|
-
columns?: Array<ColumnDef<TData, any>>;
|
|
10
|
-
fieldOptions?: {
|
|
11
|
-
HeaderSection?: SectionHeaderProps["fieldOptions"];
|
|
12
|
-
TabSection?: TabBarProps;
|
|
13
|
-
ContentSection?: TableListProps<TData>;
|
|
14
|
-
name?: {
|
|
15
|
-
headerRow?: {
|
|
16
|
-
title?: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
joinDate?: {
|
|
20
|
-
headerRow?: {
|
|
21
|
-
title?: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
createdAt?: {
|
|
25
|
-
headerRow?: {
|
|
26
|
-
title?: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
auditStatus?: {
|
|
30
|
-
headerRow?: {
|
|
31
|
-
title?: string;
|
|
32
|
-
};
|
|
33
|
-
cellData?: {
|
|
34
|
-
statusApproved?: string;
|
|
35
|
-
statusRejected?: string;
|
|
36
|
-
statusWaitingForReview?: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
actions?: {
|
|
40
|
-
onNavigate?: () => void;
|
|
41
|
-
onClick?: () => void;
|
|
42
|
-
button?: {
|
|
43
|
-
label?: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
} | {
|
|
47
|
-
[k: string]: any;
|
|
48
|
-
};
|
|
49
|
-
data?: any[];
|
|
50
|
-
children?: (input: {
|
|
51
|
-
defaultBlocks: DefaultBlocks;
|
|
52
|
-
fieldOptions: {
|
|
53
|
-
[k: string]: any;
|
|
54
|
-
};
|
|
55
|
-
}) => {
|
|
56
|
-
blocks: {
|
|
57
|
-
[k: string]: any;
|
|
58
|
-
};
|
|
59
|
-
fieldOptions: {
|
|
60
|
-
[k: string]: any;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
64
|
-
displayName: string;
|
|
65
|
-
};
|
|
66
|
-
export { ListOrganizations };
|
|
67
|
-
//# sourceMappingURL=ListOrganizations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListOrganizations.d.ts","sourceRoot":"","sources":["../src/ListOrganizations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,cAAc,EACf,MAAM,UAAU,CAAC;AAEl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;oBAAE,KAAK,CAAC,EAAE,MAAM,CAAA;iBAAE,CAAC;aAC7B,CAAC;SACH,GACD;YAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;QACzB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;YACjB,aAAa,EAAE,aAAa,CAAC;YAC7B,YAAY,EAAE;gBAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;aAAE,CAAC;SACpC,KAAK;YAAE,MAAM,EAAE;gBAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;aAAE,CAAC;YAAC,YAAY,EAAE;gBAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;aAAE,CAAA;SAAE,CAAC;KAC5E;;CAyJA,CAAC;AAIF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MP 2024.12.18, 2025.01.15
|
|
3
|
-
* NOTE
|
|
4
|
-
* For now, we are just migrating and colocating in big handfuls the common blocks.
|
|
5
|
-
* This requires heavy refactoring to effectively allow an common interface between product list layouts.
|
|
6
|
-
*/
|
|
7
|
-
import { PaginationProps } from "@basaldev/blocks-frontend-framework";
|
|
8
|
-
import { ReactNode } from "react";
|
|
9
|
-
import { BlocksOverride } from "../types";
|
|
10
|
-
import './TableLayout.css';
|
|
11
|
-
export type ProductsListTableSupportedTab = "beforePublication" | "published" | "publicationEnded" | "notPublished" | "archive";
|
|
12
|
-
export interface ListProductTableRowData {
|
|
13
|
-
category: string;
|
|
14
|
-
createdAt: string;
|
|
15
|
-
id: string;
|
|
16
|
-
numberOfApplicants: string;
|
|
17
|
-
publication?: {
|
|
18
|
-
since?: string;
|
|
19
|
-
status?: string;
|
|
20
|
-
until?: string;
|
|
21
|
-
};
|
|
22
|
-
title: string;
|
|
23
|
-
updatedAt: string;
|
|
24
|
-
}
|
|
25
|
-
declare const TableLayout: {
|
|
26
|
-
({ children, updateRowHref, title, labels, isLoading, onNavigate, onProductPublic, onProductPrivate, onProductArchive, onProductUnarchive, pagination, rowData, rowHref, currentTab, onTabChange, createHref, showHeader, }: {
|
|
27
|
-
/** Show Header */
|
|
28
|
-
showHeader?: boolean;
|
|
29
|
-
/** Loading state for table */
|
|
30
|
-
isLoading?: boolean;
|
|
31
|
-
/** Table Labels */
|
|
32
|
-
labels: {
|
|
33
|
-
emptyStateMessage: string;
|
|
34
|
-
actions: {
|
|
35
|
-
createProduct: string;
|
|
36
|
-
};
|
|
37
|
-
headerRow: {
|
|
38
|
-
createdAt: string;
|
|
39
|
-
numberOfApplicants: string;
|
|
40
|
-
publicationPeriod: string;
|
|
41
|
-
title: string;
|
|
42
|
-
updatedAt: string;
|
|
43
|
-
};
|
|
44
|
-
rowActions: {
|
|
45
|
-
archive: string;
|
|
46
|
-
edit: string;
|
|
47
|
-
private: string;
|
|
48
|
-
public: string;
|
|
49
|
-
unarchive: string;
|
|
50
|
-
};
|
|
51
|
-
tabs: {
|
|
52
|
-
archive: string;
|
|
53
|
-
beforePublication: string;
|
|
54
|
-
notPublished: string;
|
|
55
|
-
publicationEnded: string;
|
|
56
|
-
published: string;
|
|
57
|
-
};
|
|
58
|
-
unsetDateMessage: string;
|
|
59
|
-
};
|
|
60
|
-
/** Callback for navigating to job page */
|
|
61
|
-
onNavigate: (to: string) => void;
|
|
62
|
-
/** Callback for archiving job */
|
|
63
|
-
onProductArchive: (product: ListProductTableRowData["id"], title: ListProductTableRowData["title"]) => void;
|
|
64
|
-
/** Callback for making job private */
|
|
65
|
-
onProductPrivate: (product: ListProductTableRowData["id"], title: ListProductTableRowData["title"]) => void;
|
|
66
|
-
/** Callback for making job public */
|
|
67
|
-
onProductPublic: (product: ListProductTableRowData["id"], title: ListProductTableRowData["title"]) => void;
|
|
68
|
-
/** Callback for un-archiving job */
|
|
69
|
-
onProductUnarchive: (product: ListProductTableRowData["id"]) => void;
|
|
70
|
-
/** Callback for pagination display */
|
|
71
|
-
pagination?: PaginationProps;
|
|
72
|
-
/** Job product list table data */
|
|
73
|
-
rowData: ListProductTableRowData[];
|
|
74
|
-
/** Callback for linking to show page */
|
|
75
|
-
rowHref: (row: ListProductTableRowData) => string;
|
|
76
|
-
/** Tabs configuration */
|
|
77
|
-
/** Current tab to show as selected */
|
|
78
|
-
currentTab?: ProductsListTableSupportedTab;
|
|
79
|
-
/** Callback when tab is clicked */
|
|
80
|
-
onTabChange?: (tab: ProductsListTableSupportedTab) => void;
|
|
81
|
-
/** Callback for linking to update page */
|
|
82
|
-
updateRowHref: (row: ListProductTableRowData) => string;
|
|
83
|
-
title: ReactNode;
|
|
84
|
-
createHref: string;
|
|
85
|
-
children?: BlocksOverride;
|
|
86
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
87
|
-
displayName: string;
|
|
88
|
-
};
|
|
89
|
-
export { TableLayout };
|
|
90
|
-
//# sourceMappingURL=TableLayout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableLayout.d.ts","sourceRoot":"","sources":["../../src/TableLayout/TableLayout.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAQL,eAAe,EAMhB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAY,SAAS,EAAwB,MAAM,OAAO,CAAC;AAClE,OAAO,EAAU,cAAc,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,mBAAmB,CAAC;AAE3B,MAAM,MAAM,6BAA6B,GACrC,mBAAmB,GACnB,WAAW,GACX,kBAAkB,GAClB,cAAc,GACd,SAAS,CAAC;AAEd,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,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