@aglyn/shared-ui-jsx 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +63 -0
- package/src/index.d.ts +48 -0
- package/src/index.js +179 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/aglyn-text.d.ts +86 -0
- package/src/lib/components/aglyn-text.js +44 -0
- package/src/lib/components/aglyn-text.js.map +1 -0
- package/src/lib/components/app-link.d.ts +74 -0
- package/src/lib/components/app-link.js +139 -0
- package/src/lib/components/app-link.js.map +1 -0
- package/src/lib/components/aspect-ratio.d.ts +59 -0
- package/src/lib/components/aspect-ratio.js +153 -0
- package/src/lib/components/aspect-ratio.js.map +1 -0
- package/src/lib/components/background-image.component.d.ts +30 -0
- package/src/lib/components/background-image.component.js +42 -0
- package/src/lib/components/background-image.component.js.map +1 -0
- package/src/lib/components/card-columns.d.ts +86 -0
- package/src/lib/components/card-columns.js +148 -0
- package/src/lib/components/card-columns.js.map +1 -0
- package/src/lib/components/card-display.d.ts +36 -0
- package/src/lib/components/card-display.js +158 -0
- package/src/lib/components/card-display.js.map +1 -0
- package/src/lib/components/card-list-item.d.ts +35 -0
- package/src/lib/components/card-list-item.js +137 -0
- package/src/lib/components/card-list-item.js.map +1 -0
- package/src/lib/components/children-function-prop.d.ts +25 -0
- package/src/lib/components/children-function-prop.js +29 -0
- package/src/lib/components/children-function-prop.js.map +1 -0
- package/src/lib/components/confirmation-provider.component.d.ts +19 -0
- package/src/lib/components/confirmation-provider.component.js +83 -0
- package/src/lib/components/confirmation-provider.component.js.map +1 -0
- package/src/lib/components/container.d.ts +25 -0
- package/src/lib/components/container.js +62 -0
- package/src/lib/components/container.js.map +1 -0
- package/src/lib/components/data-table.component.d.ts +54 -0
- package/src/lib/components/data-table.component.js +211 -0
- package/src/lib/components/data-table.component.js.map +1 -0
- package/src/lib/components/dialog-confirm.d.ts +36 -0
- package/src/lib/components/dialog-confirm.js +74 -0
- package/src/lib/components/dialog-confirm.js.map +1 -0
- package/src/lib/components/ellipsis-pulse.component.d.ts +22 -0
- package/src/lib/components/ellipsis-pulse.component.js +51 -0
- package/src/lib/components/ellipsis-pulse.component.js.map +1 -0
- package/src/lib/components/emotion-cache-provider.d.ts +31 -0
- package/src/lib/components/emotion-cache-provider.js +40 -0
- package/src/lib/components/emotion-cache-provider.js.map +1 -0
- package/src/lib/components/empty-state.component.d.ts +63 -0
- package/src/lib/components/empty-state.component.js +214 -0
- package/src/lib/components/empty-state.component.js.map +1 -0
- package/src/lib/components/error-boundary.component.d.ts +28 -0
- package/src/lib/components/error-boundary.component.js +86 -0
- package/src/lib/components/error-boundary.component.js.map +1 -0
- package/src/lib/components/grid-buttons.d.ts +26 -0
- package/src/lib/components/grid-buttons.js +45 -0
- package/src/lib/components/grid-buttons.js.map +1 -0
- package/src/lib/components/grid-items.d.ts +103 -0
- package/src/lib/components/grid-items.js +336 -0
- package/src/lib/components/grid-items.js.map +1 -0
- package/src/lib/components/grid-list.d.ts +37 -0
- package/src/lib/components/grid-list.js +156 -0
- package/src/lib/components/grid-list.js.map +1 -0
- package/src/lib/components/help-tip.component.d.ts +30 -0
- package/src/lib/components/help-tip.component.js +139 -0
- package/src/lib/components/help-tip.component.js.map +1 -0
- package/src/lib/components/link-navigation-reporter.d.ts +24 -0
- package/src/lib/components/link-navigation-reporter.js +64 -0
- package/src/lib/components/link-navigation-reporter.js.map +1 -0
- package/src/lib/components/list-pagination.component.d.ts +57 -0
- package/src/lib/components/list-pagination.component.js +90 -0
- package/src/lib/components/list-pagination.component.js.map +1 -0
- package/src/lib/components/list-table.component.d.ts +155 -0
- package/src/lib/components/list-table.component.js +369 -0
- package/src/lib/components/list-table.component.js.map +1 -0
- package/src/lib/components/loading-layout-app.component.d.ts +35 -0
- package/src/lib/components/loading-layout-app.component.js +42 -0
- package/src/lib/components/loading-layout-app.component.js.map +1 -0
- package/src/lib/components/loading-modal-overlay.d.ts +30 -0
- package/src/lib/components/loading-modal-overlay.js +156 -0
- package/src/lib/components/loading-modal-overlay.js.map +1 -0
- package/src/lib/components/loading-modal.d.ts +19 -0
- package/src/lib/components/loading-modal.js +113 -0
- package/src/lib/components/loading-modal.js.map +1 -0
- package/src/lib/components/loading-text.component.d.ts +21 -0
- package/src/lib/components/loading-text.component.js +40 -0
- package/src/lib/components/loading-text.component.js.map +1 -0
- package/src/lib/components/mdi-icon/index.d.ts +2 -0
- package/src/lib/components/mdi-icon/index.js +4 -0
- package/src/lib/components/mdi-icon/index.js.map +1 -0
- package/src/lib/components/mdi-icon/md-icon-stack.d.ts +31 -0
- package/src/lib/components/mdi-icon/md-icon-stack.js +101 -0
- package/src/lib/components/mdi-icon/md-icon-stack.js.map +1 -0
- package/src/lib/components/mdi-icon/md-icon.d.ts +32 -0
- package/src/lib/components/mdi-icon/md-icon.js +147 -0
- package/src/lib/components/mdi-icon/md-icon.js.map +1 -0
- package/src/lib/components/mdi-icon/mdi-icon-from-id.d.ts +23 -0
- package/src/lib/components/mdi-icon/mdi-icon-from-id.js +35 -0
- package/src/lib/components/mdi-icon/mdi-icon-from-id.js.map +1 -0
- package/src/lib/components/mdi-icon/mdi-icon.d.ts +24 -0
- package/src/lib/components/mdi-icon/mdi-icon.js +46 -0
- package/src/lib/components/mdi-icon/mdi-icon.js.map +1 -0
- package/src/lib/components/measured-figures.component.d.ts +64 -0
- package/src/lib/components/measured-figures.component.js +161 -0
- package/src/lib/components/measured-figures.component.js.map +1 -0
- package/src/lib/components/menu.d.ts +45 -0
- package/src/lib/components/menu.js +229 -0
- package/src/lib/components/menu.js.map +1 -0
- package/src/lib/components/mui-shadow-dom.d.ts +38 -0
- package/src/lib/components/mui-shadow-dom.js +161 -0
- package/src/lib/components/mui-shadow-dom.js.map +1 -0
- package/src/lib/components/navigation-drawer.component.d.ts +31 -0
- package/src/lib/components/navigation-drawer.component.js +76 -0
- package/src/lib/components/navigation-drawer.component.js.map +1 -0
- package/src/lib/components/navigation-intent.d.ts +18 -0
- package/src/lib/components/navigation-intent.js +56 -0
- package/src/lib/components/navigation-intent.js.map +1 -0
- package/src/lib/components/navigation-view/index.d.ts +18 -0
- package/src/lib/components/navigation-view/index.js +19 -0
- package/src/lib/components/navigation-view/index.js.map +1 -0
- package/src/lib/components/navigation-view/navigation-view.d.ts +35 -0
- package/src/lib/components/navigation-view/navigation-view.js +175 -0
- package/src/lib/components/navigation-view/navigation-view.js.map +1 -0
- package/src/lib/components/next-link.d.ts +27 -0
- package/src/lib/components/next-link.js +88 -0
- package/src/lib/components/next-link.js.map +1 -0
- package/src/lib/components/popper-styled.component.d.ts +25 -0
- package/src/lib/components/popper-styled.component.js +129 -0
- package/src/lib/components/popper-styled.component.js.map +1 -0
- package/src/lib/components/quota-readout.component.d.ts +69 -0
- package/src/lib/components/quota-readout.component.js +52 -0
- package/src/lib/components/quota-readout.component.js.map +1 -0
- package/src/lib/components/resizeable-stack.d.ts +4 -0
- package/src/lib/components/resizeable-stack.js +23 -0
- package/src/lib/components/resizeable-stack.js.map +1 -0
- package/src/lib/components/row-actions-menu.component.d.ts +53 -0
- package/src/lib/components/row-actions-menu.component.js +132 -0
- package/src/lib/components/row-actions-menu.component.js.map +1 -0
- package/src/lib/components/ruler-guides.component.d.ts +35 -0
- package/src/lib/components/ruler-guides.component.js +166 -0
- package/src/lib/components/ruler-guides.component.js.map +1 -0
- package/src/lib/components/sandbox-frame.d.ts +42 -0
- package/src/lib/components/sandbox-frame.js +122 -0
- package/src/lib/components/sandbox-frame.js.map +1 -0
- package/src/lib/components/scroll-reaction.d.ts +59 -0
- package/src/lib/components/scroll-reaction.js +43 -0
- package/src/lib/components/scroll-reaction.js.map +1 -0
- package/src/lib/components/scroll-table.component.d.ts +124 -0
- package/src/lib/components/scroll-table.component.js +103 -0
- package/src/lib/components/scroll-table.component.js.map +1 -0
- package/src/lib/components/shadow-dom/index.d.ts +18 -0
- package/src/lib/components/shadow-dom/index.js +19 -0
- package/src/lib/components/shadow-dom/index.js.map +1 -0
- package/src/lib/components/shadow-dom/shadow-dom.d.ts +42 -0
- package/src/lib/components/shadow-dom/shadow-dom.js +123 -0
- package/src/lib/components/shadow-dom/shadow-dom.js.map +1 -0
- package/src/lib/components/splash-screen.d.ts +33 -0
- package/src/lib/components/splash-screen.js +105 -0
- package/src/lib/components/splash-screen.js.map +1 -0
- package/src/lib/components/sr-only.d.ts +20 -0
- package/src/lib/components/sr-only.js +25 -0
- package/src/lib/components/sr-only.js.map +1 -0
- package/src/lib/components/status-screen-plain.component.d.ts +27 -0
- package/src/lib/components/status-screen-plain.component.js +178 -0
- package/src/lib/components/status-screen-plain.component.js.map +1 -0
- package/src/lib/components/usage-meter.component.d.ts +30 -0
- package/src/lib/components/usage-meter.component.js +92 -0
- package/src/lib/components/usage-meter.component.js.map +1 -0
- package/src/lib/components/variable-text-field.component.d.ts +50 -0
- package/src/lib/components/variable-text-field.component.js +188 -0
- package/src/lib/components/variable-text-field.component.js.map +1 -0
- package/src/lib/components/zoomable-panning-component/index.d.ts +1 -0
- package/src/lib/components/zoomable-panning-component/index.js +3 -0
- package/src/lib/components/zoomable-panning-component/index.js.map +1 -0
- package/src/lib/components/zoomable-panning-component/util.d.ts +58 -0
- package/src/lib/components/zoomable-panning-component/util.js +114 -0
- package/src/lib/components/zoomable-panning-component/util.js.map +1 -0
- package/src/lib/components/zoomable-panning-component/zoomable-panning-component.d.ts +132 -0
- package/src/lib/components/zoomable-panning-component/zoomable-panning-component.js +728 -0
- package/src/lib/components/zoomable-panning-component/zoomable-panning-component.js.map +1 -0
- package/src/lib/const/aglyn-besigner-logo-full.d.ts +39 -0
- package/src/lib/const/aglyn-besigner-logo-full.js +146 -0
- package/src/lib/const/aglyn-besigner-logo-full.js.map +1 -0
- package/src/lib/const/aglyn-console-logo-full.d.ts +34 -0
- package/src/lib/const/aglyn-console-logo-full.js +142 -0
- package/src/lib/const/aglyn-console-logo-full.js.map +1 -0
- package/src/lib/const/aglyn-logo-class-keys.d.ts +30 -0
- package/src/lib/const/aglyn-logo-class-keys.js +32 -0
- package/src/lib/const/aglyn-logo-class-keys.js.map +1 -0
- package/src/lib/const/aglyn-logo-full.d.ts +29 -0
- package/src/lib/const/aglyn-logo-full.js +111 -0
- package/src/lib/const/aglyn-logo-full.js.map +1 -0
- package/src/lib/const/list-filter.d.ts +260 -0
- package/src/lib/const/list-filter.js +409 -0
- package/src/lib/const/list-filter.js.map +1 -0
- package/src/lib/const/prebuilt-components.d.ts +17 -0
- package/src/lib/const/prebuilt-components.js +22 -0
- package/src/lib/const/prebuilt-components.js.map +1 -0
- package/src/lib/const/svg-icons.d.ts +75 -0
- package/src/lib/const/svg-icons.js +313 -0
- package/src/lib/const/svg-icons.js.map +1 -0
- package/src/lib/const/table-pagination.d.ts +106 -0
- package/src/lib/const/table-pagination.js +106 -0
- package/src/lib/const/table-pagination.js.map +1 -0
- package/src/lib/contexts/confirmation.context.d.ts +996 -0
- package/src/lib/contexts/confirmation.context.js +49 -0
- package/src/lib/contexts/confirmation.context.js.map +1 -0
- package/src/lib/contexts/loading.context.d.ts +93 -0
- package/src/lib/contexts/loading.context.js +126 -0
- package/src/lib/contexts/loading.context.js.map +1 -0
- package/src/lib/hocs/create-hoc-with-context-consumer.d.ts +36 -0
- package/src/lib/hocs/create-hoc-with-context-consumer.js +44 -0
- package/src/lib/hocs/create-hoc-with-context-consumer.js.map +1 -0
- package/src/lib/hocs/with-hoc.d.ts +32 -0
- package/src/lib/hocs/with-hoc.js +37 -0
- package/src/lib/hocs/with-hoc.js.map +1 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icon.d.ts +20 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icon.js +48 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icon.js.map +1 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icons-fuzzy.d.ts +26 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icons-fuzzy.js +73 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icons-fuzzy.js.map +1 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icons.d.ts +19 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icons.js +49 -0
- package/src/lib/hooks/mdi-icon/use-mdi-icons.js.map +1 -0
- package/src/lib/hooks/router-events.d.ts +56 -0
- package/src/lib/hooks/router-events.js +88 -0
- package/src/lib/hooks/router-events.js.map +1 -0
- package/src/lib/hooks/use-async-effect.d.ts +24 -0
- package/src/lib/hooks/use-async-effect.js +44 -0
- package/src/lib/hooks/use-async-effect.js.map +1 -0
- package/src/lib/hooks/use-callback-param-ref.d.ts +19 -0
- package/src/lib/hooks/use-callback-param-ref.js +29 -0
- package/src/lib/hooks/use-callback-param-ref.js.map +1 -0
- package/src/lib/hooks/use-id.d.ts +21 -0
- package/src/lib/hooks/use-id.js +28 -0
- package/src/lib/hooks/use-id.js.map +1 -0
- package/src/lib/hooks/use-isomorphic-layout-effect.d.ts +19 -0
- package/src/lib/hooks/use-isomorphic-layout-effect.js +20 -0
- package/src/lib/hooks/use-isomorphic-layout-effect.js.map +1 -0
- package/src/lib/hooks/use-merge-refs.d.ts +38 -0
- package/src/lib/hooks/use-merge-refs.js +52 -0
- package/src/lib/hooks/use-merge-refs.js.map +1 -0
- package/src/lib/hooks/use-subscribable.d.ts +29 -0
- package/src/lib/hooks/use-subscribable.js +50 -0
- package/src/lib/hooks/use-subscribable.js.map +1 -0
- package/src/lib/types.d.ts +18 -0
- package/src/lib/types.js +18 -0
- package/src/lib/types.js.map +1 -0
- package/src/lib/utils/make-link-elements.d.ts +24 -0
- package/src/lib/utils/make-link-elements.js +32 -0
- package/src/lib/utils/make-link-elements.js.map +1 -0
- package/src/lib/utils/make-meta-elements.d.ts +24 -0
- package/src/lib/utils/make-meta-elements.js +32 -0
- package/src/lib/utils/make-meta-elements.js.map +1 -0
- package/src/lib/utils/scroll-overflow.d.ts +120 -0
- package/src/lib/utils/scroll-overflow.js +115 -0
- package/src/lib/utils/scroll-overflow.js.map +1 -0
- package/src/lib/utils/vendor.d.ts +17 -0
- package/src/lib/utils/vendor.js +18 -0
- package/src/lib/utils/vendor.js.map +1 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2023 Aglyn LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/ import Button from "@mui/material/Button";
|
|
20
|
+
import Dialog from "@mui/material/Dialog";
|
|
21
|
+
import DialogActions from "@mui/material/DialogActions";
|
|
22
|
+
import DialogContent from "@mui/material/DialogContent";
|
|
23
|
+
import DialogContentText from "@mui/material/DialogContentText";
|
|
24
|
+
import DialogTitle from "@mui/material/DialogTitle";
|
|
25
|
+
import { forwardRef } from "react";
|
|
26
|
+
export const DialogConfirm = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
27
|
+
const { open, options = {
|
|
28
|
+
cancellationText: 'Cancel',
|
|
29
|
+
confirmationText: 'OK'
|
|
30
|
+
}, onCancel, onConfirm, onClose } = props, rest = _object_without_properties_loose(props, [
|
|
31
|
+
"open",
|
|
32
|
+
"options",
|
|
33
|
+
"onCancel",
|
|
34
|
+
"onConfirm",
|
|
35
|
+
"onClose"
|
|
36
|
+
]);
|
|
37
|
+
const { title, description, confirmationText, cancellationText, dialogProps, confirmationButtonProps, cancellationButtonProps } = options;
|
|
38
|
+
return /*#__PURE__*/ _jsxs(Dialog, _extends({
|
|
39
|
+
ref: ref,
|
|
40
|
+
fullWidth: true
|
|
41
|
+
}, rest, dialogProps, {
|
|
42
|
+
open: open,
|
|
43
|
+
onClose: onClose,
|
|
44
|
+
children: [
|
|
45
|
+
title && /*#__PURE__*/ _jsx(DialogTitle, {
|
|
46
|
+
children: title
|
|
47
|
+
}),
|
|
48
|
+
description && /*#__PURE__*/ _jsx(DialogContent, {
|
|
49
|
+
children: /*#__PURE__*/ _jsx(DialogContentText, {
|
|
50
|
+
children: description
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ _jsxs(DialogActions, {
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ _jsx(Button, _extends({}, cancellationButtonProps, {
|
|
56
|
+
onClick: onCancel,
|
|
57
|
+
children: cancellationText
|
|
58
|
+
})),
|
|
59
|
+
/*#__PURE__*/ _jsx(Button, _extends({
|
|
60
|
+
color: "primary"
|
|
61
|
+
}, confirmationButtonProps, {
|
|
62
|
+
onClick: onConfirm,
|
|
63
|
+
children: confirmationText
|
|
64
|
+
}))
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
|
+
DialogConfirm.displayName = 'DialogConfirm';
|
|
71
|
+
DialogConfirm.aglyn = true;
|
|
72
|
+
export default DialogConfirm;
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=dialog-confirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/components/dialog-confirm.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Button, { ButtonProps } from '@mui/material/Button'\nimport Dialog, { DialogProps } from '@mui/material/Dialog'\nimport DialogActions from '@mui/material/DialogActions'\nimport DialogContent from '@mui/material/DialogContent'\nimport DialogContentText, {\n DialogContentTextProps,\n} from '@mui/material/DialogContentText'\nimport DialogTitle, { DialogTitleProps } from '@mui/material/DialogTitle'\nimport { forwardRef } from 'react'\n\nexport interface DialogConfirmOptions {\n cancellationText?: ButtonProps['children']\n confirmationText?: ButtonProps['children']\n cancellationButtonProps?: Partial<ButtonProps>\n confirmationButtonProps?: Partial<ButtonProps>\n dialogProps?: Partial<DialogProps>\n title?: DialogTitleProps['children']\n description?: DialogContentTextProps['children']\n}\n\nexport interface DialogConfirmProps extends DialogProps {\n options?: DialogConfirmOptions\n onConfirm?: ButtonProps['onClick']\n onCancel?: ButtonProps['onClick']\n}\n\nexport const DialogConfirm = forwardRef<any, DialogConfirmProps>(\n (props, ref) => {\n const {\n open,\n options = {\n cancellationText: 'Cancel',\n confirmationText: 'OK',\n },\n onCancel,\n onConfirm,\n onClose,\n ...rest\n } = props\n const {\n title,\n description,\n confirmationText,\n cancellationText,\n dialogProps,\n confirmationButtonProps,\n cancellationButtonProps,\n } = options\n return (\n <Dialog\n ref={ref}\n fullWidth\n {...rest}\n {...dialogProps}\n open={open}\n onClose={onClose}\n >\n {title && <DialogTitle>{title}</DialogTitle>}\n {description && (\n <DialogContent>\n <DialogContentText>{description}</DialogContentText>\n </DialogContent>\n )}\n <DialogActions>\n <Button {...cancellationButtonProps} onClick={onCancel}>\n {cancellationText}\n </Button>\n <Button\n color=\"primary\"\n {...confirmationButtonProps}\n onClick={onConfirm}\n >\n {confirmationText}\n </Button>\n </DialogActions>\n </Dialog>\n )\n },\n)\n\nDialogConfirm.displayName = 'DialogConfirm'\nDialogConfirm.aglyn = true\n\nexport default DialogConfirm\n"],"names":["Button","Dialog","DialogActions","DialogContent","DialogContentText","DialogTitle","forwardRef","DialogConfirm","props","ref","open","options","cancellationText","confirmationText","onCancel","onConfirm","onClose","rest","title","description","dialogProps","confirmationButtonProps","cancellationButtonProps","fullWidth","onClick","color","displayName","aglyn"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAOA,YAA6B,uBAAsB;AAC1D,OAAOC,YAA6B,uBAAsB;AAC1D,OAAOC,mBAAmB,8BAA6B;AACvD,OAAOC,mBAAmB,8BAA6B;AACvD,OAAOC,uBAEA,kCAAiC;AACxC,OAAOC,iBAAuC,4BAA2B;AACzE,SAASC,UAAU,QAAQ,QAAO;AAkBlC,OAAO,MAAMC,8BAAgBD,WAC3B,CAACE,OAAOC;IACN,MAAM,EACJC,IAAI,EACJC,UAAU;QACRC,kBAAkB;QAClBC,kBAAkB;IACpB,CAAC,EACDC,QAAQ,EACRC,SAAS,EACTC,OAAO,EAER,GAAGR,OADCS,wCACDT;;;;;;;IACJ,MAAM,EACJU,KAAK,EACLC,WAAW,EACXN,gBAAgB,EAChBD,gBAAgB,EAChBQ,WAAW,EACXC,uBAAuB,EACvBC,uBAAuB,EACxB,GAAGX;IACJ,qBACE,MAACV;QACCQ,KAAKA;QACLc,SAAS;OACLN,MACAG;QACJV,MAAMA;QACNM,SAASA;;YAERE,uBAAS,KAACb;0BAAaa;;YACvBC,6BACC,KAAChB;0BACC,cAAA,KAACC;8BAAmBe;;;0BAGxB,MAACjB;;kCACC,KAACF,qBAAWsB;wBAAyBE,SAASV;kCAC3CF;;kCAEH,KAACZ;wBACCyB,OAAM;uBACFJ;wBACJG,SAAST;kCAERF;;;;;;AAKX,GACD;AAEDN,cAAcmB,WAAW,GAAG;AAC5BnB,cAAcoB,KAAK,GAAG;AAEtB,eAAepB,cAAa"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type { BoxProps } from '@mui/material';
|
|
18
|
+
export interface EllipsisPulseProps extends BoxProps {
|
|
19
|
+
color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'inherit' | string;
|
|
20
|
+
}
|
|
21
|
+
export declare const EllipsisPulseComponent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & EllipsisPulseProps, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import("react").ClassAttributes<HTMLSpanElement> | keyof import("react").HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
22
|
+
export default EllipsisPulseComponent;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { styled } from "@aglyn/shared-ui-theme";
|
|
17
|
+
export const EllipsisPulseComponent = styled('span', {
|
|
18
|
+
name: 'AglynEllipsisPulse'
|
|
19
|
+
})(({ theme, color })=>{
|
|
20
|
+
const clr = !color || color === 'inherit' ? theme.palette.primary.main : color === 'primary' ? theme.palette.primary.main : color === 'primary' ? theme.palette.primary.main : color === 'error' ? theme.palette.error.main : color === 'info' ? theme.palette.info.main : color === 'success' ? theme.palette.success.main : color === 'warning' ? theme.palette.warning.main : typeof color === 'string' ? color : theme.palette.primary.main;
|
|
21
|
+
return {
|
|
22
|
+
'@keyframes dotPulseAfter': {
|
|
23
|
+
'0%': {
|
|
24
|
+
content: '""'
|
|
25
|
+
},
|
|
26
|
+
'25%': {
|
|
27
|
+
content: '"."'
|
|
28
|
+
},
|
|
29
|
+
'50%': {
|
|
30
|
+
content: '".."'
|
|
31
|
+
},
|
|
32
|
+
'75%': {
|
|
33
|
+
content: '"..."'
|
|
34
|
+
},
|
|
35
|
+
'100%': {
|
|
36
|
+
content: '""'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
'&:after': {
|
|
41
|
+
display: 'inline-block',
|
|
42
|
+
animation: 'dotPulseAfter steps(1, end) 2s infinite',
|
|
43
|
+
content: '""',
|
|
44
|
+
color: clr
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
EllipsisPulseComponent.displayName = 'EllipsisPulseComponent';
|
|
49
|
+
export default EllipsisPulseComponent;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=ellipsis-pulse.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/components/ellipsis-pulse.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { styled } from '@aglyn/shared-ui-theme'\nimport type { BoxProps } from '@mui/material'\n\nexport interface EllipsisPulseProps extends BoxProps {\n color?:\n | 'primary'\n | 'secondary'\n | 'error'\n | 'info'\n | 'success'\n | 'warning'\n | 'inherit'\n | string\n}\n\nexport const EllipsisPulseComponent = styled('span', {\n name: 'AglynEllipsisPulse',\n})<EllipsisPulseProps>(({ theme, color }) => {\n const clr =\n !color || color === 'inherit'\n ? theme.palette.primary.main\n : color === 'primary'\n ? theme.palette.primary.main\n : color === 'primary'\n ? theme.palette.primary.main\n : color === 'error'\n ? theme.palette.error.main\n : color === 'info'\n ? theme.palette.info.main\n : color === 'success'\n ? theme.palette.success.main\n : color === 'warning'\n ? theme.palette.warning.main\n : typeof color === 'string'\n ? color\n : theme.palette.primary.main\n\n return {\n '@keyframes dotPulseAfter': {\n '0%': { content: '\"\"' },\n '25%': { content: '\".\"' },\n '50%': { content: '\"..\"' },\n '75%': { content: '\"...\"' },\n '100%': { content: '\"\"' },\n },\n position: 'absolute',\n\n '&:after': {\n display: 'inline-block',\n animation: 'dotPulseAfter steps(1, end) 2s infinite',\n content: '\"\"',\n color: clr,\n },\n }\n})\nEllipsisPulseComponent.displayName = 'EllipsisPulseComponent'\n\nexport default EllipsisPulseComponent\n"],"names":["styled","EllipsisPulseComponent","name","theme","color","clr","palette","primary","main","error","info","success","warning","content","position","display","animation","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,yBAAwB;AAe/C,OAAO,MAAMC,yBAAyBD,OAAO,QAAQ;IACnDE,MAAM;AACR,GAAuB,CAAC,EAAEC,KAAK,EAAEC,KAAK,EAAE;IACtC,MAAMC,MACJ,CAACD,SAASA,UAAU,YAChBD,MAAMG,OAAO,CAACC,OAAO,CAACC,IAAI,GAC1BJ,UAAU,YACRD,MAAMG,OAAO,CAACC,OAAO,CAACC,IAAI,GAC1BJ,UAAU,YACRD,MAAMG,OAAO,CAACC,OAAO,CAACC,IAAI,GAC1BJ,UAAU,UACRD,MAAMG,OAAO,CAACG,KAAK,CAACD,IAAI,GACxBJ,UAAU,SACRD,MAAMG,OAAO,CAACI,IAAI,CAACF,IAAI,GACvBJ,UAAU,YACRD,MAAMG,OAAO,CAACK,OAAO,CAACH,IAAI,GAC1BJ,UAAU,YACRD,MAAMG,OAAO,CAACM,OAAO,CAACJ,IAAI,GAC1B,OAAOJ,UAAU,WACfA,QACAD,MAAMG,OAAO,CAACC,OAAO,CAACC,IAAI;IAE9C,OAAO;QACL,4BAA4B;YAC1B,MAAM;gBAAEK,SAAS;YAAK;YACtB,OAAO;gBAAEA,SAAS;YAAM;YACxB,OAAO;gBAAEA,SAAS;YAAO;YACzB,OAAO;gBAAEA,SAAS;YAAQ;YAC1B,QAAQ;gBAAEA,SAAS;YAAK;QAC1B;QACAC,UAAU;QAEV,WAAW;YACTC,SAAS;YACTC,WAAW;YACXH,SAAS;YACTT,OAAOC;QACT;IACF;AACF,GAAE;AACFJ,uBAAuBgB,WAAW,GAAG;AAErC,eAAehB,uBAAsB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type CreateEmotionCacheOptions, type EmotionCache } from '@aglyn/shared-ui-theme';
|
|
18
|
+
export type EmotionCacheProps = {
|
|
19
|
+
children?: JSX.Children;
|
|
20
|
+
} & ({
|
|
21
|
+
emotionCache?: EmotionCache;
|
|
22
|
+
cacheOptions?: never;
|
|
23
|
+
} | {
|
|
24
|
+
cacheOptions?: CreateEmotionCacheOptions;
|
|
25
|
+
emotionCache?: never;
|
|
26
|
+
});
|
|
27
|
+
export declare function EmotionCacheProvider(props: EmotionCacheProps): import("react").JSX.Element;
|
|
28
|
+
export declare namespace EmotionCacheProvider {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
export default EmotionCacheProvider;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2023 Aglyn LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/ // eslint-disable-next-line @nx/enforce-module-boundaries
|
|
19
|
+
import { CacheProvider, createEmotionCache } from "@aglyn/shared-ui-theme";
|
|
20
|
+
import { useMemo } from "react";
|
|
21
|
+
export function EmotionCacheProvider(props) {
|
|
22
|
+
const { emotionCache, cacheOptions, children } = props;
|
|
23
|
+
const cache = useMemo(()=>{
|
|
24
|
+
if (emotionCache) return emotionCache;
|
|
25
|
+
return createEmotionCache(_extends({
|
|
26
|
+
key: 'next'
|
|
27
|
+
}, cacheOptions));
|
|
28
|
+
}, [
|
|
29
|
+
emotionCache,
|
|
30
|
+
cacheOptions
|
|
31
|
+
]);
|
|
32
|
+
return /*#__PURE__*/ _jsx(CacheProvider, {
|
|
33
|
+
value: cache,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
EmotionCacheProvider.displayName = 'EmotionCacheComponent';
|
|
38
|
+
export default EmotionCacheProvider;
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=emotion-cache-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/components/emotion-cache-provider.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @nx/enforce-module-boundaries\nimport {\n CacheProvider,\n createEmotionCache,\n type CreateEmotionCacheOptions,\n type EmotionCache,\n} from '@aglyn/shared-ui-theme'\nimport { useMemo } from 'react'\n\nexport type EmotionCacheProps = { children?: JSX.Children } & (\n | { emotionCache?: EmotionCache; cacheOptions?: never }\n | { cacheOptions?: CreateEmotionCacheOptions; emotionCache?: never }\n)\n\nexport function EmotionCacheProvider(props: EmotionCacheProps) {\n const { emotionCache, cacheOptions, children } = props\n\n const cache = useMemo(() => {\n if (emotionCache) return emotionCache\n return createEmotionCache({\n key: 'next',\n ...cacheOptions,\n })\n }, [emotionCache, cacheOptions])\n\n return <CacheProvider value={cache}>{children}</CacheProvider>\n}\nEmotionCacheProvider.displayName = 'EmotionCacheComponent'\n\nexport default EmotionCacheProvider\n"],"names":["CacheProvider","createEmotionCache","useMemo","EmotionCacheProvider","props","emotionCache","cacheOptions","children","cache","key","value","displayName"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,yDAAyD;AACzD,SACEA,aAAa,EACbC,kBAAkB,QAGb,yBAAwB;AAC/B,SAASC,OAAO,QAAQ,QAAO;AAO/B,OAAO,SAASC,qBAAqBC,KAAwB;IAC3D,MAAM,EAAEC,YAAY,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGH;IAEjD,MAAMI,QAAQN,QAAQ;QACpB,IAAIG,cAAc,OAAOA;QACzB,OAAOJ,mBAAmB;YACxBQ,KAAK;WACFH;IAEP,GAAG;QAACD;QAAcC;KAAa;IAE/B,qBAAO,KAACN;QAAcU,OAAOF;kBAAQD;;AACvC;AACAJ,qBAAqBQ,WAAW,GAAG;AAEnC,eAAeR,qBAAoB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type CSSObject, type Theme } from '@aglyn/shared-ui-theme';
|
|
18
|
+
import { type BoxProps } from '@mui/material';
|
|
19
|
+
import type { ReactNode } from 'react';
|
|
20
|
+
/**
|
|
21
|
+
* The wash a grid's no-rows overlay paints, for an empty state that is NOT
|
|
22
|
+
* inside one.
|
|
23
|
+
*
|
|
24
|
+
* Every list built on `DataTableComponent` draws this component inside MUI
|
|
25
|
+
* X's `GridOverlay`, which fills itself with `background.default` at
|
|
26
|
+
* `action.disabledOpacity`. A hand-built table — the screens tree — has no
|
|
27
|
+
* overlay to inherit that from, so its empty cell asks for the fill here
|
|
28
|
+
* instead of spelling the formula a second time.
|
|
29
|
+
*
|
|
30
|
+
* The tokens are read through `theme.vars` wherever the theme has them. On a
|
|
31
|
+
* CSS-variables theme — the console's — `theme.palette` is bound to the
|
|
32
|
+
* DEFAULT color scheme, so a palette read composes the LIGHT value and keeps
|
|
33
|
+
* it through a switch to dark; only the `--mui-palette-*` variables follow
|
|
34
|
+
* the scheme. `theme.alpha` is MUI's theme-bound helper: handed a variable it
|
|
35
|
+
* spells the `rgba(var(--…Channel) / …)` form that stays bound to it, and
|
|
36
|
+
* handed a literal — a published site renders under a plain `createTheme()`,
|
|
37
|
+
* which has no `vars` — it composes a literal `rgba()`.
|
|
38
|
+
*
|
|
39
|
+
* Pass it as an `sx` on its own, or spread it into one that carries more.
|
|
40
|
+
*/
|
|
41
|
+
export declare const emptyStateBackdropSx: (theme: Theme) => CSSObject;
|
|
42
|
+
export interface EmptyStateProps extends Omit<BoxProps, 'title'> {
|
|
43
|
+
/** The headline — what is not here. */
|
|
44
|
+
label: ReactNode;
|
|
45
|
+
/** One sentence on what to do about it. Optional. */
|
|
46
|
+
description?: ReactNode;
|
|
47
|
+
/** The way out: a create button, an upload button. Optional. */
|
|
48
|
+
action?: ReactNode;
|
|
49
|
+
/** Drops the illustration where vertical space is tight. */
|
|
50
|
+
compact?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** The illustration, as its own element so callers can reuse the fills. */
|
|
53
|
+
export declare function EmptyStateIllustration(props: {
|
|
54
|
+
width?: number;
|
|
55
|
+
}): import("react").JSX.Element;
|
|
56
|
+
export declare namespace EmptyStateIllustration {
|
|
57
|
+
var displayName: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function EmptyStateComponent(props: EmptyStateProps): import("react").JSX.Element;
|
|
60
|
+
export declare namespace EmptyStateComponent {
|
|
61
|
+
var displayName: string;
|
|
62
|
+
}
|
|
63
|
+
export default EmptyStateComponent;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2026 Aglyn LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/ import { generateComponentClassKeys, styled } from "@aglyn/shared-ui-theme";
|
|
20
|
+
import { Box, Typography } from "@mui/material";
|
|
21
|
+
/**
|
|
22
|
+
* The console's empty state — one illustration, one sentence, one way out
|
|
23
|
+
* (AGL-2501).
|
|
24
|
+
*
|
|
25
|
+
* Lifted out of `data-table.component.tsx`, where it had been living as the
|
|
26
|
+
* grid's no-rows overlay. Every list built on that grid — screens, layouts,
|
|
27
|
+
* components, templates — has drawn this since AGL-601, and the media library
|
|
28
|
+
* has drawn a bare line of grey text: *"No media here — upload images, video,
|
|
29
|
+
* PDFs and documents to use on your site."* Same product, same moment, two
|
|
30
|
+
* different answers, and the one with no illustration reads like a rendering
|
|
31
|
+
* gap rather than an invitation.
|
|
32
|
+
*
|
|
33
|
+
* NOT in the `@aglyn/shared-ui-jsx` barrel, on purpose — subpath-import it
|
|
34
|
+
* (`@aglyn/shared-ui-jsx/components/empty-state.component`). Nothing in the
|
|
35
|
+
* tenant page graph shows an empty state, and the barrel rule at the top of
|
|
36
|
+
* `src/index.ts` is enforced in CI.
|
|
37
|
+
*/ const classKeys = generateComponentClassKeys('EmptyStateComponent', [
|
|
38
|
+
'label',
|
|
39
|
+
'description',
|
|
40
|
+
'action',
|
|
41
|
+
'img1',
|
|
42
|
+
'img2',
|
|
43
|
+
'img3',
|
|
44
|
+
'img4',
|
|
45
|
+
'img5'
|
|
46
|
+
]);
|
|
47
|
+
const EmptyStateRoot = styled(Box, {
|
|
48
|
+
name: 'AglynEmptyState'
|
|
49
|
+
})(({ theme })=>({
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
textAlign: 'center',
|
|
55
|
+
padding: theme.spacing(3, 2),
|
|
56
|
+
[`& .${classKeys.label}`]: {
|
|
57
|
+
marginTop: theme.spacing(1)
|
|
58
|
+
},
|
|
59
|
+
[`& .${classKeys.description}`]: {
|
|
60
|
+
marginTop: theme.spacing(0.5),
|
|
61
|
+
maxWidth: 420
|
|
62
|
+
},
|
|
63
|
+
[`& .${classKeys.action}`]: {
|
|
64
|
+
marginTop: theme.spacing(2)
|
|
65
|
+
},
|
|
66
|
+
// The five fills the artwork is built from, taken off the theme's grey
|
|
67
|
+
// ramp rather than written as hex (AGL-2501). Still mode-aware — the flat
|
|
68
|
+
// light greys disappear entirely against a dark surface — but the ramp is
|
|
69
|
+
// what decides the tone now, so a host that retunes its greys retunes the
|
|
70
|
+
// illustration with them instead of leaving it behind.
|
|
71
|
+
//
|
|
72
|
+
// The steps are chosen to keep the original stack's ORDER: img4 is the
|
|
73
|
+
// paper the shape sits on, img2/img3 are its faces, img1 is the darkest
|
|
74
|
+
// edge. Two of the originals carried a faint blue cast that the neutral
|
|
75
|
+
// ramp does not; at this size, in a placeholder graphic, the depth
|
|
76
|
+
// ordering is what reads, not the hue.
|
|
77
|
+
[`& .${classKeys.img1}`]: {
|
|
78
|
+
fill: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[900]
|
|
79
|
+
},
|
|
80
|
+
[`& .${classKeys.img2}`]: {
|
|
81
|
+
fill: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[700]
|
|
82
|
+
},
|
|
83
|
+
[`& .${classKeys.img3}`]: {
|
|
84
|
+
fill: theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800]
|
|
85
|
+
},
|
|
86
|
+
[`& .${classKeys.img4}`]: {
|
|
87
|
+
fill: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[900]
|
|
88
|
+
},
|
|
89
|
+
[`& .${classKeys.img5}`]: {
|
|
90
|
+
fillOpacity: theme.palette.mode === 'light' ? '0.8' : '0.08',
|
|
91
|
+
fill: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.common.white
|
|
92
|
+
}
|
|
93
|
+
}));
|
|
94
|
+
/**
|
|
95
|
+
* The wash a grid's no-rows overlay paints, for an empty state that is NOT
|
|
96
|
+
* inside one.
|
|
97
|
+
*
|
|
98
|
+
* Every list built on `DataTableComponent` draws this component inside MUI
|
|
99
|
+
* X's `GridOverlay`, which fills itself with `background.default` at
|
|
100
|
+
* `action.disabledOpacity`. A hand-built table — the screens tree — has no
|
|
101
|
+
* overlay to inherit that from, so its empty cell asks for the fill here
|
|
102
|
+
* instead of spelling the formula a second time.
|
|
103
|
+
*
|
|
104
|
+
* The tokens are read through `theme.vars` wherever the theme has them. On a
|
|
105
|
+
* CSS-variables theme — the console's — `theme.palette` is bound to the
|
|
106
|
+
* DEFAULT color scheme, so a palette read composes the LIGHT value and keeps
|
|
107
|
+
* it through a switch to dark; only the `--mui-palette-*` variables follow
|
|
108
|
+
* the scheme. `theme.alpha` is MUI's theme-bound helper: handed a variable it
|
|
109
|
+
* spells the `rgba(var(--…Channel) / …)` form that stays bound to it, and
|
|
110
|
+
* handed a literal — a published site renders under a plain `createTheme()`,
|
|
111
|
+
* which has no `vars` — it composes a literal `rgba()`.
|
|
112
|
+
*
|
|
113
|
+
* Pass it as an `sx` on its own, or spread it into one that carries more.
|
|
114
|
+
*/ export const emptyStateBackdropSx = (theme)=>{
|
|
115
|
+
var _theme_vars;
|
|
116
|
+
const tokens = (_theme_vars = theme.vars) != null ? _theme_vars : theme;
|
|
117
|
+
return {
|
|
118
|
+
backgroundColor: theme.alpha(tokens.palette.background.default, tokens.palette.action.disabledOpacity)
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
/** The illustration, as its own element so callers can reuse the fills. */ export function EmptyStateIllustration(props) {
|
|
122
|
+
const { width = 120 } = props;
|
|
123
|
+
return /*#__PURE__*/ _jsx("svg", {
|
|
124
|
+
width: width,
|
|
125
|
+
height: width / 120 * 100,
|
|
126
|
+
viewBox: "0 0 184 152",
|
|
127
|
+
"aria-hidden": true,
|
|
128
|
+
focusable: "false",
|
|
129
|
+
children: /*#__PURE__*/ _jsxs("g", {
|
|
130
|
+
fill: "none",
|
|
131
|
+
fillRule: "evenodd",
|
|
132
|
+
children: [
|
|
133
|
+
/*#__PURE__*/ _jsxs("g", {
|
|
134
|
+
transform: "translate(24 31.67)",
|
|
135
|
+
children: [
|
|
136
|
+
/*#__PURE__*/ _jsx("ellipse", {
|
|
137
|
+
className: classKeys.img5,
|
|
138
|
+
cx: "67.797",
|
|
139
|
+
cy: "106.89",
|
|
140
|
+
rx: "67.797",
|
|
141
|
+
ry: "12.668"
|
|
142
|
+
}),
|
|
143
|
+
/*#__PURE__*/ _jsx("path", {
|
|
144
|
+
className: classKeys.img1,
|
|
145
|
+
d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ _jsx("path", {
|
|
148
|
+
className: classKeys.img2,
|
|
149
|
+
d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
|
|
150
|
+
}),
|
|
151
|
+
/*#__PURE__*/ _jsx("path", {
|
|
152
|
+
className: classKeys.img3,
|
|
153
|
+
d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
}),
|
|
157
|
+
/*#__PURE__*/ _jsx("path", {
|
|
158
|
+
className: classKeys.img3,
|
|
159
|
+
d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
|
|
160
|
+
}),
|
|
161
|
+
/*#__PURE__*/ _jsxs("g", {
|
|
162
|
+
className: classKeys.img4,
|
|
163
|
+
transform: "translate(149.65 15.383)",
|
|
164
|
+
children: [
|
|
165
|
+
/*#__PURE__*/ _jsx("ellipse", {
|
|
166
|
+
cx: "20.654",
|
|
167
|
+
cy: "3.167",
|
|
168
|
+
rx: "2.849",
|
|
169
|
+
ry: "2.815"
|
|
170
|
+
}),
|
|
171
|
+
/*#__PURE__*/ _jsx("path", {
|
|
172
|
+
d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
|
|
173
|
+
})
|
|
174
|
+
]
|
|
175
|
+
})
|
|
176
|
+
]
|
|
177
|
+
})
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
EmptyStateIllustration.displayName = 'EmptyStateIllustration';
|
|
181
|
+
export function EmptyStateComponent(props) {
|
|
182
|
+
const { label, description, action, compact, children } = props, rest = _object_without_properties_loose(props, [
|
|
183
|
+
"label",
|
|
184
|
+
"description",
|
|
185
|
+
"action",
|
|
186
|
+
"compact",
|
|
187
|
+
"children"
|
|
188
|
+
]);
|
|
189
|
+
return /*#__PURE__*/ _jsxs(EmptyStateRoot, _extends({}, rest, {
|
|
190
|
+
children: [
|
|
191
|
+
compact ? null : /*#__PURE__*/ _jsx(EmptyStateIllustration, {}),
|
|
192
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
193
|
+
variant: "body2",
|
|
194
|
+
className: classKeys.label,
|
|
195
|
+
children: label
|
|
196
|
+
}),
|
|
197
|
+
description ? /*#__PURE__*/ _jsx(Typography, {
|
|
198
|
+
variant: "body2",
|
|
199
|
+
color: "text.secondary",
|
|
200
|
+
className: classKeys.description,
|
|
201
|
+
children: description
|
|
202
|
+
}) : null,
|
|
203
|
+
action ? /*#__PURE__*/ _jsx(Box, {
|
|
204
|
+
className: classKeys.action,
|
|
205
|
+
children: action
|
|
206
|
+
}) : null,
|
|
207
|
+
children
|
|
208
|
+
]
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
EmptyStateComponent.displayName = 'EmptyStateComponent';
|
|
212
|
+
export default EmptyStateComponent;
|
|
213
|
+
|
|
214
|
+
//# sourceMappingURL=empty-state.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/components/empty-state.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n generateComponentClassKeys,\n styled,\n type CSSObject,\n type Theme,\n} from '@aglyn/shared-ui-theme'\nimport { Box, type BoxProps, Typography } from '@mui/material'\nimport type { ReactNode } from 'react'\n\n/**\n * The console's empty state — one illustration, one sentence, one way out\n * (AGL-2501).\n *\n * Lifted out of `data-table.component.tsx`, where it had been living as the\n * grid's no-rows overlay. Every list built on that grid — screens, layouts,\n * components, templates — has drawn this since AGL-601, and the media library\n * has drawn a bare line of grey text: *\"No media here — upload images, video,\n * PDFs and documents to use on your site.\"* Same product, same moment, two\n * different answers, and the one with no illustration reads like a rendering\n * gap rather than an invitation.\n *\n * NOT in the `@aglyn/shared-ui-jsx` barrel, on purpose — subpath-import it\n * (`@aglyn/shared-ui-jsx/components/empty-state.component`). Nothing in the\n * tenant page graph shows an empty state, and the barrel rule at the top of\n * `src/index.ts` is enforced in CI.\n */\n\nconst classKeys = generateComponentClassKeys('EmptyStateComponent', [\n 'label',\n 'description',\n 'action',\n 'img1',\n 'img2',\n 'img3',\n 'img4',\n 'img5',\n])\n\nconst EmptyStateRoot = styled(Box, { name: 'AglynEmptyState' })(\n ({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n padding: theme.spacing(3, 2),\n [`& .${classKeys.label}`]: {\n marginTop: theme.spacing(1),\n },\n [`& .${classKeys.description}`]: {\n marginTop: theme.spacing(0.5),\n maxWidth: 420,\n },\n [`& .${classKeys.action}`]: {\n marginTop: theme.spacing(2),\n },\n // The five fills the artwork is built from, taken off the theme's grey\n // ramp rather than written as hex (AGL-2501). Still mode-aware — the flat\n // light greys disappear entirely against a dark surface — but the ramp is\n // what decides the tone now, so a host that retunes its greys retunes the\n // illustration with them instead of leaving it behind.\n //\n // The steps are chosen to keep the original stack's ORDER: img4 is the\n // paper the shape sits on, img2/img3 are its faces, img1 is the darkest\n // edge. Two of the originals carried a faint blue cast that the neutral\n // ramp does not; at this size, in a placeholder graphic, the depth\n // ordering is what reads, not the hue.\n [`& .${classKeys.img1}`]: {\n fill:\n theme.palette.mode === 'light'\n ? theme.palette.grey[400]\n : theme.palette.grey[900],\n },\n [`& .${classKeys.img2}`]: {\n fill:\n theme.palette.mode === 'light'\n ? theme.palette.grey[100]\n : theme.palette.grey[700],\n },\n [`& .${classKeys.img3}`]: {\n fill:\n theme.palette.mode === 'light'\n ? theme.palette.grey[300]\n : theme.palette.grey[800],\n },\n [`& .${classKeys.img4}`]: {\n fill:\n theme.palette.mode === 'light'\n ? theme.palette.common.white\n : theme.palette.grey[900],\n },\n [`& .${classKeys.img5}`]: {\n fillOpacity: theme.palette.mode === 'light' ? '0.8' : '0.08',\n fill:\n theme.palette.mode === 'light'\n ? theme.palette.grey[100]\n : theme.palette.common.white,\n },\n }),\n)\n\n/**\n * The wash a grid's no-rows overlay paints, for an empty state that is NOT\n * inside one.\n *\n * Every list built on `DataTableComponent` draws this component inside MUI\n * X's `GridOverlay`, which fills itself with `background.default` at\n * `action.disabledOpacity`. A hand-built table — the screens tree — has no\n * overlay to inherit that from, so its empty cell asks for the fill here\n * instead of spelling the formula a second time.\n *\n * The tokens are read through `theme.vars` wherever the theme has them. On a\n * CSS-variables theme — the console's — `theme.palette` is bound to the\n * DEFAULT color scheme, so a palette read composes the LIGHT value and keeps\n * it through a switch to dark; only the `--mui-palette-*` variables follow\n * the scheme. `theme.alpha` is MUI's theme-bound helper: handed a variable it\n * spells the `rgba(var(--…Channel) / …)` form that stays bound to it, and\n * handed a literal — a published site renders under a plain `createTheme()`,\n * which has no `vars` — it composes a literal `rgba()`.\n *\n * Pass it as an `sx` on its own, or spread it into one that carries more.\n */\nexport const emptyStateBackdropSx = (theme: Theme): CSSObject => {\n const tokens = theme.vars ?? theme\n return {\n backgroundColor: theme.alpha(\n tokens.palette.background.default,\n tokens.palette.action.disabledOpacity,\n ),\n }\n}\n\nexport interface EmptyStateProps extends Omit<BoxProps, 'title'> {\n /** The headline — what is not here. */\n label: ReactNode\n /** One sentence on what to do about it. Optional. */\n description?: ReactNode\n /** The way out: a create button, an upload button. Optional. */\n action?: ReactNode\n /** Drops the illustration where vertical space is tight. */\n compact?: boolean\n}\n\n/** The illustration, as its own element so callers can reuse the fills. */\nexport function EmptyStateIllustration(props: { width?: number }) {\n const { width = 120 } = props\n return (\n <svg\n width={width}\n height={(width / 120) * 100}\n viewBox=\"0 0 184 152\"\n aria-hidden\n focusable=\"false\"\n >\n <g fill=\"none\" fillRule=\"evenodd\">\n <g transform=\"translate(24 31.67)\">\n <ellipse\n className={classKeys.img5}\n cx=\"67.797\"\n cy=\"106.89\"\n rx=\"67.797\"\n ry=\"12.668\"\n />\n <path\n className={classKeys.img1}\n d=\"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z\"\n />\n <path\n className={classKeys.img2}\n d=\"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z\"\n />\n <path\n className={classKeys.img3}\n d=\"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z\"\n />\n </g>\n <path\n className={classKeys.img3}\n d=\"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z\"\n />\n <g className={classKeys.img4} transform=\"translate(149.65 15.383)\">\n <ellipse cx=\"20.654\" cy=\"3.167\" rx=\"2.849\" ry=\"2.815\" />\n <path d=\"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z\" />\n </g>\n </g>\n </svg>\n )\n}\nEmptyStateIllustration.displayName = 'EmptyStateIllustration'\n\nexport function EmptyStateComponent(props: EmptyStateProps) {\n const { label, description, action, compact, children, ...rest } = props\n return (\n <EmptyStateRoot {...rest}>\n {compact ? null : <EmptyStateIllustration />}\n <Typography variant=\"body2\" className={classKeys.label}>\n {label}\n </Typography>\n {description ? (\n <Typography\n variant=\"body2\"\n color=\"text.secondary\"\n className={classKeys.description}\n >\n {description}\n </Typography>\n ) : null}\n {action ? <Box className={classKeys.action}>{action}</Box> : null}\n {children}\n </EmptyStateRoot>\n )\n}\nEmptyStateComponent.displayName = 'EmptyStateComponent'\n\nexport default EmptyStateComponent\n"],"names":["generateComponentClassKeys","styled","Box","Typography","classKeys","EmptyStateRoot","name","theme","display","flexDirection","alignItems","justifyContent","textAlign","padding","spacing","label","marginTop","description","maxWidth","action","img1","fill","palette","mode","grey","img2","img3","img4","common","white","img5","fillOpacity","emptyStateBackdropSx","tokens","vars","backgroundColor","alpha","background","default","disabledOpacity","EmptyStateIllustration","props","width","svg","height","viewBox","aria-hidden","focusable","g","fillRule","transform","ellipse","className","cx","cy","rx","ry","path","d","displayName","EmptyStateComponent","compact","children","rest","variant","color"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,0BAA0B,EAC1BC,MAAM,QAGD,yBAAwB;AAC/B,SAASC,GAAG,EAAiBC,UAAU,QAAQ,gBAAe;AAG9D;;;;;;;;;;;;;;;;CAgBC,GAED,MAAMC,YAAYJ,2BAA2B,uBAAuB;IAClE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,MAAMK,iBAAiBJ,OAAOC,KAAK;IAAEI,MAAM;AAAkB,GAC3D,CAAC,EAAEC,KAAK,EAAE,GAAM,CAAA;QACdC,SAAS;QACTC,eAAe;QACfC,YAAY;QACZC,gBAAgB;QAChBC,WAAW;QACXC,SAASN,MAAMO,OAAO,CAAC,GAAG;QAC1B,CAAC,CAAC,GAAG,EAAEV,UAAUW,KAAK,EAAE,CAAC,EAAE;YACzBC,WAAWT,MAAMO,OAAO,CAAC;QAC3B;QACA,CAAC,CAAC,GAAG,EAAEV,UAAUa,WAAW,EAAE,CAAC,EAAE;YAC/BD,WAAWT,MAAMO,OAAO,CAAC;YACzBI,UAAU;QACZ;QACA,CAAC,CAAC,GAAG,EAAEd,UAAUe,MAAM,EAAE,CAAC,EAAE;YAC1BH,WAAWT,MAAMO,OAAO,CAAC;QAC3B;QACA,uEAAuE;QACvE,0EAA0E;QAC1E,0EAA0E;QAC1E,0EAA0E;QAC1E,uDAAuD;QACvD,EAAE;QACF,uEAAuE;QACvE,wEAAwE;QACxE,wEAAwE;QACxE,mEAAmE;QACnE,uCAAuC;QACvC,CAAC,CAAC,GAAG,EAAEV,UAAUgB,IAAI,EAAE,CAAC,EAAE;YACxBC,MACEd,MAAMe,OAAO,CAACC,IAAI,KAAK,UACnBhB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI,GACvBjB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI;QAC/B;QACA,CAAC,CAAC,GAAG,EAAEpB,UAAUqB,IAAI,EAAE,CAAC,EAAE;YACxBJ,MACEd,MAAMe,OAAO,CAACC,IAAI,KAAK,UACnBhB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI,GACvBjB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI;QAC/B;QACA,CAAC,CAAC,GAAG,EAAEpB,UAAUsB,IAAI,EAAE,CAAC,EAAE;YACxBL,MACEd,MAAMe,OAAO,CAACC,IAAI,KAAK,UACnBhB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI,GACvBjB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI;QAC/B;QACA,CAAC,CAAC,GAAG,EAAEpB,UAAUuB,IAAI,EAAE,CAAC,EAAE;YACxBN,MACEd,MAAMe,OAAO,CAACC,IAAI,KAAK,UACnBhB,MAAMe,OAAO,CAACM,MAAM,CAACC,KAAK,GAC1BtB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI;QAC/B;QACA,CAAC,CAAC,GAAG,EAAEpB,UAAU0B,IAAI,EAAE,CAAC,EAAE;YACxBC,aAAaxB,MAAMe,OAAO,CAACC,IAAI,KAAK,UAAU,QAAQ;YACtDF,MACEd,MAAMe,OAAO,CAACC,IAAI,KAAK,UACnBhB,MAAMe,OAAO,CAACE,IAAI,CAAC,IAAI,GACvBjB,MAAMe,OAAO,CAACM,MAAM,CAACC,KAAK;QAClC;IACF,CAAA;AAGF;;;;;;;;;;;;;;;;;;;;CAoBC,GACD,OAAO,MAAMG,uBAAuB,CAACzB;QACpBA;IAAf,MAAM0B,UAAS1B,cAAAA,MAAM2B,IAAI,YAAV3B,cAAcA;IAC7B,OAAO;QACL4B,iBAAiB5B,MAAM6B,KAAK,CAC1BH,OAAOX,OAAO,CAACe,UAAU,CAACC,OAAO,EACjCL,OAAOX,OAAO,CAACH,MAAM,CAACoB,eAAe;IAEzC;AACF,EAAC;AAaD,yEAAyE,GACzE,OAAO,SAASC,uBAAuBC,KAAyB;IAC9D,MAAM,EAAEC,QAAQ,GAAG,EAAE,GAAGD;IACxB,qBACE,KAACE;QACCD,OAAOA;QACPE,QAAQ,AAACF,QAAQ,MAAO;QACxBG,SAAQ;QACRC,aAAW;QACXC,WAAU;kBAEV,cAAA,MAACC;YAAE3B,MAAK;YAAO4B,UAAS;;8BACtB,MAACD;oBAAEE,WAAU;;sCACX,KAACC;4BACCC,WAAWhD,UAAU0B,IAAI;4BACzBuB,IAAG;4BACHC,IAAG;4BACHC,IAAG;4BACHC,IAAG;;sCAEL,KAACC;4BACCL,WAAWhD,UAAUgB,IAAI;4BACzBsC,GAAE;;sCAEJ,KAACD;4BACCL,WAAWhD,UAAUqB,IAAI;4BACzBiC,GAAE;;sCAEJ,KAACD;4BACCL,WAAWhD,UAAUsB,IAAI;4BACzBgC,GAAE;;;;8BAGN,KAACD;oBACCL,WAAWhD,UAAUsB,IAAI;oBACzBgC,GAAE;;8BAEJ,MAACV;oBAAEI,WAAWhD,UAAUuB,IAAI;oBAAEuB,WAAU;;sCACtC,KAACC;4BAAQE,IAAG;4BAASC,IAAG;4BAAQC,IAAG;4BAAQC,IAAG;;sCAC9C,KAACC;4BAAKC,GAAE;;;;;;;AAKlB;AACAlB,uBAAuBmB,WAAW,GAAG;AAErC,OAAO,SAASC,oBAAoBnB,KAAsB;IACxD,MAAM,EAAE1B,KAAK,EAAEE,WAAW,EAAEE,MAAM,EAAE0C,OAAO,EAAEC,QAAQ,EAAW,GAAGrB,OAATsB,wCAAStB;;;;;;;IACnE,qBACE,MAACpC,6BAAmB0D;;YACjBF,UAAU,qBAAO,KAACrB;0BACnB,KAACrC;gBAAW6D,SAAQ;gBAAQZ,WAAWhD,UAAUW,KAAK;0BACnDA;;YAEFE,4BACC,KAACd;gBACC6D,SAAQ;gBACRC,OAAM;gBACNb,WAAWhD,UAAUa,WAAW;0BAE/BA;iBAED;YACHE,uBAAS,KAACjB;gBAAIkD,WAAWhD,UAAUe,MAAM;0BAAGA;iBAAgB;YAC5D2C;;;AAGP;AACAF,oBAAoBD,WAAW,GAAG;AAElC,eAAeC,oBAAmB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, type ComponentType, type ErrorInfo, type ForwardRefExoticComponent, type PropsWithoutRef, type RefAttributes } from 'react';
|
|
2
|
+
export interface ErrorBoundaryProps {
|
|
3
|
+
children?: JSX.Children;
|
|
4
|
+
fallback?: JSX.Node;
|
|
5
|
+
onCatch?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
6
|
+
}
|
|
7
|
+
type State = {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
error: any;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @see https://reactjs.org/docs/error-boundaries.html
|
|
13
|
+
*/
|
|
14
|
+
declare class ErrorBoundaryComponentClass extends Component<ErrorBoundaryProps, State> {
|
|
15
|
+
static displayName: string;
|
|
16
|
+
static readonly aglyn = true;
|
|
17
|
+
constructor(props: ErrorBoundaryProps);
|
|
18
|
+
static getDerivedStateFromError(error: Error): {
|
|
19
|
+
hasError: boolean;
|
|
20
|
+
error: Error;
|
|
21
|
+
};
|
|
22
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
23
|
+
render(): string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode>>;
|
|
24
|
+
}
|
|
25
|
+
declare const ErrorBoundaryComponent: ForwardRefExoticComponent<ErrorBoundaryProps & RefAttributes<ErrorBoundaryComponentClass>>;
|
|
26
|
+
export declare function withErrorBoundary<P, T>(WrappedComponent: ComponentType<P>, options?: ErrorBoundaryProps): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
|
|
27
|
+
export { ErrorBoundaryComponent };
|
|
28
|
+
export default ErrorBoundaryComponent;
|