@bigbinary/neeto-molecules 1.0.94-beta → 1.0.95-beta
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 +1 -0
- package/dist/CustomDomainDashboard.cjs.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +1 -1
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/Header.cjs.js +1 -1
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +1 -1
- package/dist/Header.js.map +1 -1
- package/dist/NavigationHeader.cjs.js +615 -0
- package/dist/NavigationHeader.cjs.js.map +1 -0
- package/dist/NavigationHeader.js +609 -0
- package/dist/NavigationHeader.js.map +1 -0
- package/dist/PublishBlock.cjs.js +60 -25
- package/dist/PublishBlock.cjs.js.map +1 -1
- package/dist/PublishBlock.js +61 -26
- package/dist/PublishBlock.js.map +1 -1
- package/dist/Schedule.cjs.js +2 -2
- package/dist/Schedule.cjs.js.map +1 -1
- package/dist/Schedule.js +1 -1
- package/dist/Schedule.js.map +1 -1
- package/dist/Security.cjs.js +1 -1
- package/dist/Security.cjs.js.map +1 -1
- package/dist/Security.js +1 -1
- package/dist/Security.js.map +1 -1
- package/dist/Sidebar.cjs.js +26 -16
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +27 -17
- package/dist/Sidebar.js.map +1 -1
- package/package.json +3 -3
- package/src/translations/en.json +5 -0
- package/types/Header.d.ts +1 -2
- package/types/NavigationHeader.d.ts +145 -0
- package/types/Schedule.d.ts +2 -2
- package/types/Sidebar.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.95-beta",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@bigbinary/neeto-filters-frontend": "^2.11.15",
|
|
54
54
|
"@bigbinary/neeto-icons": "^1.14.0",
|
|
55
55
|
"@bigbinary/neeto-molecules": "^1.0.5",
|
|
56
|
+
"@bigbinary/neeto-time-zones": "^0.5.0",
|
|
56
57
|
"@bigbinary/neetoui": "^5.1.5",
|
|
57
58
|
"@faker-js/faker": "7.6.0",
|
|
58
59
|
"@honeybadger-io/react": "2.0.1",
|
|
59
|
-
"@neetohq/timezones": "^0.2.0",
|
|
60
60
|
"@rails/activestorage": "^7.0.5",
|
|
61
61
|
"@rollup/plugin-alias": "^3.1.9",
|
|
62
62
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -161,9 +161,9 @@
|
|
|
161
161
|
"@bigbinary/neeto-filters-frontend": "latest",
|
|
162
162
|
"@bigbinary/neeto-icons": "latest",
|
|
163
163
|
"@bigbinary/neeto-molecules": "latest",
|
|
164
|
+
"@bigbinary/neeto-time-zones": "latest",
|
|
164
165
|
"@bigbinary/neetoui": "latest",
|
|
165
166
|
"@honeybadger-io/react": "2.0.1",
|
|
166
|
-
"@neetohq/timezones": "latest",
|
|
167
167
|
"@svgr/webpack": "^6.5.1",
|
|
168
168
|
"antd": "5.9.2",
|
|
169
169
|
"axios": "^0.27.2",
|
package/src/translations/en.json
CHANGED
|
@@ -303,6 +303,11 @@
|
|
|
303
303
|
"integrationDisconnectAlert": {
|
|
304
304
|
"disconnect": "Disconnect"
|
|
305
305
|
},
|
|
306
|
+
"navigationHeader": {
|
|
307
|
+
"home": "Home",
|
|
308
|
+
"resetDescription": "Are you sure you want to reset this form to the last published version? This cannot be undone.",
|
|
309
|
+
"resetTitle": "Reset form"
|
|
310
|
+
},
|
|
306
311
|
"publishBlock": {
|
|
307
312
|
"viewDraftVersion": "View draft version",
|
|
308
313
|
"deleteDraftVersion": "Delete draft version. It'll not impact the published version",
|
package/types/Header.d.ts
CHANGED
|
@@ -23,10 +23,9 @@ const Header: React.FC<{
|
|
|
23
23
|
searchProps?: object;
|
|
24
24
|
breadcrumbs?: {
|
|
25
25
|
text: string;
|
|
26
|
-
link
|
|
26
|
+
link?: string;
|
|
27
27
|
}[];
|
|
28
28
|
size?: keyof typeof SIZES;
|
|
29
29
|
renderDropdown?: (Dropdown: React.FC<DropdownProps>) => JSX.Element;
|
|
30
|
-
menuBarToggle?: (...args: any[]) => any;
|
|
31
30
|
}>;
|
|
32
31
|
export default Header;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Rename from "./Rename";
|
|
3
|
+
type TooltipPropType = {
|
|
4
|
+
content: string;
|
|
5
|
+
position: string;
|
|
6
|
+
};
|
|
7
|
+
type HomeButtonPropType = {
|
|
8
|
+
tooltip: TooltipPropType;
|
|
9
|
+
icon: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
type HeaderLinkPropType = {
|
|
12
|
+
key: string;
|
|
13
|
+
to: string;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
type RightActionBlockPropTypes = {
|
|
17
|
+
isDraftBlockHidden: boolean;
|
|
18
|
+
previewDraftUrl: string;
|
|
19
|
+
isResetDraftButtonVisible: boolean;
|
|
20
|
+
onResetClick: () => void;
|
|
21
|
+
isResetting: boolean;
|
|
22
|
+
isPublishDisabled: boolean;
|
|
23
|
+
isPublishing: boolean;
|
|
24
|
+
handlePublish: () => void;
|
|
25
|
+
isPublishPreviewDisabled: boolean;
|
|
26
|
+
previewPublishedUrl: string;
|
|
27
|
+
isPublishButtonVisible: boolean;
|
|
28
|
+
isResetAlertOpen: boolean;
|
|
29
|
+
setIsResetAlertOpen: () => void;
|
|
30
|
+
handleReset: () => void;
|
|
31
|
+
publishAlertTitle: string;
|
|
32
|
+
publishAlertDescription: string;
|
|
33
|
+
};
|
|
34
|
+
type NavigationLinkPropsType = {
|
|
35
|
+
headerLinks: HeaderLinkPropType[];
|
|
36
|
+
};
|
|
37
|
+
type LeftBlockPropTypes = {
|
|
38
|
+
homeButtonProps?: HomeButtonPropType;
|
|
39
|
+
homeUrl: string;
|
|
40
|
+
renameProps?: Rename;
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* A common component to use as navigation header.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
*
|
|
49
|
+
* import React from "react";
|
|
50
|
+
* import NavigationHeader from "@bigbinary/neeto-molecules/NavigationHeader";
|
|
51
|
+
*
|
|
52
|
+
* const Page = () => (
|
|
53
|
+
* <NavigationHeader
|
|
54
|
+
* leftActionBlock={<NavigationHeader.LeftActionBlock {...leftBlockProps} />}
|
|
55
|
+
* rightActionBlock={<NavigationHeader.RightActionBlock {...rightBlockProps} />}
|
|
56
|
+
* navigationLinks={<NavigationHeader.NavigationLinks {...navigationLinkProps} />}
|
|
57
|
+
* />
|
|
58
|
+
* );
|
|
59
|
+
* @endexample
|
|
60
|
+
* To specify the content to be rendered in the left side of the NavigationHeader.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
*
|
|
64
|
+
* import React from "react";
|
|
65
|
+
* import NavigationHeader from "@bigbinary/neeto-molecules/NavigationHeader";
|
|
66
|
+
*
|
|
67
|
+
* const Page = () => (
|
|
68
|
+
* <NavigationHeader
|
|
69
|
+
* leftActionBlock={<NavigationHeader.LeftActionBlock
|
|
70
|
+
* homeButtonProps={{ tooltip: { position: "right" } }}
|
|
71
|
+
* homeUrl={homeUrl}
|
|
72
|
+
* renameProps={{
|
|
73
|
+
* disabled: false,
|
|
74
|
+
* dropdownItems: [{ label: "Clone", onClick: noop }],
|
|
75
|
+
* placeholder: "Enter a name",
|
|
76
|
+
* value: "Feedback form",
|
|
77
|
+
* onRename: () => noop,
|
|
78
|
+
* }}
|
|
79
|
+
* />}
|
|
80
|
+
* rightActionBlock={<NavigationHeader.RightActionBlock {...rightBlockProps} />}
|
|
81
|
+
* navigationLinks={<NavigationHeader.NavigationLinks {...navigationLinkProps} />}
|
|
82
|
+
* />
|
|
83
|
+
* );
|
|
84
|
+
* @endexample
|
|
85
|
+
* To specify the content to be rendered at the center of the NavigationHeader.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
*
|
|
89
|
+
* import React from "react";
|
|
90
|
+
* import NavigationHeader from "@bigbinary/neeto-molecules/NavigationHeader";
|
|
91
|
+
*
|
|
92
|
+
* const Page = () => (
|
|
93
|
+
* <NavigationHeader
|
|
94
|
+
* navigationLinks={<NavigationHeader.NavigationLinks
|
|
95
|
+
* headerLinks={[
|
|
96
|
+
* { key: "build", to: "/build", label: "Build" },
|
|
97
|
+
* { key: "design", to: "/design", label: "Design" },
|
|
98
|
+
* { key: "configure", to: "/configure", label: "Configure" },
|
|
99
|
+
* ]}
|
|
100
|
+
* />}
|
|
101
|
+
* rightActionBlock={<NavigationHeader.RightActionBlock {...rightBlockProps} />}
|
|
102
|
+
* leftActionBlock={<NavigationHeader.LeftActionBlock {...leftBlockProps} />}
|
|
103
|
+
* />
|
|
104
|
+
* );
|
|
105
|
+
* @endexample
|
|
106
|
+
* To specify the content to be rendered in the right side of the NavigationHeader
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
*
|
|
110
|
+
* import React from "react";
|
|
111
|
+
* import NavigationHeader from "@bigbinary/neeto-molecules/NavigationHeader";
|
|
112
|
+
*
|
|
113
|
+
* const Page = () => (
|
|
114
|
+
* <NavigationHeader
|
|
115
|
+
* rightActionBlock={<NavigationHeader.RightActionBlock
|
|
116
|
+
* isPublishButtonVisible={false}
|
|
117
|
+
* draftPreviewUrl="/preview/draft"
|
|
118
|
+
* isDraftBlockHidden={false}
|
|
119
|
+
* isResetDraftButtonVisible={true}
|
|
120
|
+
* isResetting={false}
|
|
121
|
+
* onResetClick={noop}
|
|
122
|
+
* isPublishDisabled={true}
|
|
123
|
+
* isPublishing={false}
|
|
124
|
+
* handlePublish={noop}
|
|
125
|
+
* isPublishPreviewDisabled={true}
|
|
126
|
+
* publishedPreviewUrl="/preview/published"
|
|
127
|
+
* setIsResetAlertOpen={noop}
|
|
128
|
+
* handleReset={noop}
|
|
129
|
+
* />}
|
|
130
|
+
* navigationLinks={<NavigationHeader.NavigationLinks {...navigationLinkProps} />}
|
|
131
|
+
* leftActionBlock={<NavigationHeader.LeftActionBlock {...leftBlockProps} />}
|
|
132
|
+
* />
|
|
133
|
+
* );
|
|
134
|
+
* @endexample
|
|
135
|
+
*/
|
|
136
|
+
const NavigationHeader: React.FC<{
|
|
137
|
+
leftActionBlock?: React.ReactNode;
|
|
138
|
+
navigationLinks?: React.ReactNode;
|
|
139
|
+
rightActionBlock?: React.ReactNode;
|
|
140
|
+
}> & {
|
|
141
|
+
RightActionBlock: React.FC<RightActionBlockPropTypes>;
|
|
142
|
+
NavigationLinks: React.FC<NavigationLinkPropsType>;
|
|
143
|
+
LeftActionBlock: React.FC<LeftBlockPropTypes>;
|
|
144
|
+
};
|
|
145
|
+
export default NavigationHeader;
|
package/types/Schedule.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import React from "react";
|
|
|
3
3
|
*
|
|
4
4
|
* It is a component which allows setting working hours for the week.
|
|
5
5
|
*
|
|
6
|
-
* To use this component, you should install @
|
|
6
|
+
* To use this component, you should install @bigbinary/neeto-time-zones package.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
*
|
|
10
|
-
* yarn add @
|
|
10
|
+
* yarn add @bigbinary/neeto-time-zones
|
|
11
11
|
* @endexample
|
|
12
12
|
* 
|
|
13
13
|
*
|