@star-insure/sdk 3.1.1 → 3.1.3
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/lib/page.d.ts +1 -1
- package/dist/sdk.cjs.development.js +9 -3
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +9 -3
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/misc/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/filter/Back.tsx +1 -0
- package/src/components/filter/PageHeader.tsx +6 -2
- package/src/lib/page.tsx +1 -1
- package/src/types/misc/index.ts +1 -0
package/dist/lib/page.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { AuthContext, Breadcrumb, Environment } from '../types';
|
|
|
5
5
|
*/
|
|
6
6
|
declare type CustomPageProps = {
|
|
7
7
|
env: Environment;
|
|
8
|
-
breadcrumbs
|
|
8
|
+
breadcrumbs?: Breadcrumb[];
|
|
9
9
|
links: Record<string, string>;
|
|
10
10
|
access_token?: string;
|
|
11
11
|
impersonate_id?: number;
|
|
@@ -2253,7 +2253,8 @@ function BackButton(_ref) {
|
|
|
2253
2253
|
|
|
2254
2254
|
React__default.useEffect(function () {
|
|
2255
2255
|
if (typeof window !== 'undefined') {
|
|
2256
|
-
// Set back button URL
|
|
2256
|
+
if (!breadcrumbs) return; // Set back button URL
|
|
2257
|
+
|
|
2257
2258
|
if (back && typeof back === 'boolean') {
|
|
2258
2259
|
// If we haven't provided a path as a prop, use the last breadcrumb that's not the current one
|
|
2259
2260
|
var crumb = breadcrumbs.slice(breadcrumbs.length - 2, breadcrumbs.length - 1);
|
|
@@ -2900,6 +2901,11 @@ function PageHeader(_ref) {
|
|
|
2900
2901
|
checkScroll();
|
|
2901
2902
|
}
|
|
2902
2903
|
|
|
2904
|
+
var filteredActions = React__default.useMemo(function () {
|
|
2905
|
+
return actions.filter(function (action) {
|
|
2906
|
+
return !action.hidden;
|
|
2907
|
+
});
|
|
2908
|
+
}, [actions]);
|
|
2903
2909
|
return React__default.createElement("section", {
|
|
2904
2910
|
className: cn('col-span-full max-w-full rounded-lg bg-white p-2 shadow', className)
|
|
2905
2911
|
}, React__default.createElement("div", {
|
|
@@ -2936,13 +2942,13 @@ function PageHeader(_ref) {
|
|
|
2936
2942
|
})), hasScroll && React__default.createElement(hi2.HiChevronRight, {
|
|
2937
2943
|
onClick: clickRight,
|
|
2938
2944
|
className: "w-5 h-5 text-gray-400 stroke-[1.25]"
|
|
2939
|
-
}))),
|
|
2945
|
+
}))), filteredActions.length > 0 && React__default.createElement("div", {
|
|
2940
2946
|
className: "flex items-center gap-3"
|
|
2941
2947
|
}, filterOptions.length > 0 && React__default.createElement("div", {
|
|
2942
2948
|
className: "w-[1px] h-full bg-gray-300"
|
|
2943
2949
|
}), React__default.createElement("nav", {
|
|
2944
2950
|
className: "flex items-center gap-2"
|
|
2945
|
-
},
|
|
2951
|
+
}, filteredActions.map(function (action) {
|
|
2946
2952
|
return React__default.createElement(Action, Object.assign({
|
|
2947
2953
|
key: action.title + "-" + action.as + "-" + action.href
|
|
2948
2954
|
}, action));
|