@headless-adminapp/fluent 1.4.6 → 1.4.8
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/App/Navigation/NavigationContainer.js +0 -13
- package/App/Navigation/utils.js +3 -7
- package/CommandBar/Label.js +1 -1
- package/DataGrid/ActionCell.js +1 -1
- package/DataGrid/CustomizeColumns/AddColumns.d.ts +1 -1
- package/DataGrid/GridColumnHeader/ConditionValueControl.d.ts +1 -1
- package/DataGrid/GridColumnHeader/ConditionValueControl.js +4 -17
- package/DataGrid/GridColumnHeader/OperatorSelect.d.ts +1 -1
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.d.ts +1 -8
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +1 -8
- package/DataGrid/GridListContainer.js +1 -1
- package/DataGrid/GridTableContainer.d.ts +0 -1
- package/DataGrid/TableCell/TableCellChoice.d.ts +1 -7
- package/DataGrid/TableCell/TableCellText.js +1 -1
- package/DataGrid/useTableColumns.js +6 -7
- package/DialogContainer/AlertDialog.d.ts +1 -1
- package/DialogContainer/ConfirmDialog.d.ts +1 -1
- package/DialogContainer/ErrorDialog.d.ts +1 -1
- package/DialogContainer/ErrorDialog.js +2 -1
- package/DialogContainer/PromptDialog.d.ts +1 -1
- package/Insights/WidgetTitleBar.d.ts +1 -1
- package/Insights/WidgetTitleBar.js +1 -1
- package/Insights/charts/AreaChart.d.ts +2 -2
- package/Insights/charts/ComposedChart.d.ts +2 -2
- package/Insights/charts/CustomTooltipContent.d.ts +2 -2
- package/Insights/charts/FunnelCustomTooltipContent.d.ts +2 -2
- package/Insights/charts/GaugeChart.d.ts +2 -2
- package/PageBoard/BoardColumn.d.ts +1 -1
- package/PageEntityForm/FormTabRelated.d.ts +1 -1
- package/PageEntityForm/FormTabRelated.js +1 -2
- package/PageEntityForm/PageEntityFormDesktopContainer.js +1 -1
- package/PageEntityForm/ProcessFlow.d.ts +1 -1
- package/PageEntityForm/RecordAvatar.js +1 -1
- package/PageEntityForm/RecordCard.js +1 -1
- package/PageEntityForm/RecordCardLoading.d.ts +2 -3
- package/PageEntityForm/RecordSetNavigatorContainer.js +2 -5
- package/PageEntityForm/RelatedViewSelector.d.ts +1 -1
- package/PageEntityForm/StandardControl.js +6 -10
- package/PageEntityForm/SubgridControl.d.ts +1 -1
- package/PageEntityView/PageEntityViewMobileContainer.js +1 -2
- package/components/ComponentBroken.d.ts +1 -1
- package/components/ComponentBroken.js +1 -1
- package/components/DndProvider.js +2 -6
- package/components/LoginForm.d.ts +1 -1
- package/components/PageBroken.d.ts +1 -1
- package/components/PageBroken.js +1 -1
- package/components/PageLoading.d.ts +1 -1
- package/components/PageLogin.d.ts +1 -1
- package/form/controls/AttachmentControl.js +3 -3
- package/form/controls/DecimalControl.d.ts +1 -1
- package/form/controls/DurationControl.js +4 -4
- package/form/controls/EmailControl.js +12 -8
- package/form/controls/MultiSelectControl.d.ts +1 -1
- package/form/controls/MultiSelectLookupControl.d.ts +0 -5
- package/form/controls/MultiSelectLookupControl.js +3 -7
- package/form/controls/PasswordControl.d.ts +1 -1
- package/form/controls/PasswordControl.js +1 -1
- package/form/controls/RegardingControl.d.ts +1 -5
- package/form/controls/TelephoneControl.js +1 -1
- package/form/controls/TextAreaControl.d.ts +1 -1
- package/form/controls/TextControl.d.ts +1 -1
- package/form/controls/TextControl.js +11 -7
- package/form/controls/UrlControl.js +2 -2
- package/package.json +2 -2
|
@@ -47,19 +47,6 @@ const NavigationContainer = ({ open, type, onOpenChange, isMini, }) => {
|
|
|
47
47
|
isRouteActive,
|
|
48
48
|
pathname,
|
|
49
49
|
]);
|
|
50
|
-
// const activeCategories = useMemo(
|
|
51
|
-
// () =>
|
|
52
|
-
// sections
|
|
53
|
-
// .map((section) => section.items)
|
|
54
|
-
// .flat()
|
|
55
|
-
// .filter(
|
|
56
|
-
// (item) =>
|
|
57
|
-
// item.type === 'category' &&
|
|
58
|
-
// item.items.some((subItem) => subItem.active)
|
|
59
|
-
// )
|
|
60
|
-
// .map((item) => item.key),
|
|
61
|
-
// [sections]
|
|
62
|
-
// );
|
|
63
50
|
const handleNavigation = (item) => {
|
|
64
51
|
if (type === 'overlay') {
|
|
65
52
|
onOpenChange(false);
|
package/App/Navigation/utils.js
CHANGED
|
@@ -64,13 +64,9 @@ function transformNavPageItem({ item, schemaMetadataDic: schemaMetadataObject, l
|
|
|
64
64
|
if (item.type === 'entityview') {
|
|
65
65
|
const metadata = schemaMetadataObject?.[item.logicalName];
|
|
66
66
|
if (metadata) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
if (!Icon) {
|
|
72
|
-
Icon = metadata.Icon;
|
|
73
|
-
}
|
|
67
|
+
label ??=
|
|
68
|
+
metadata.localizedPluralLabels?.[language] ?? metadata.pluralLabel;
|
|
69
|
+
Icon ??= metadata.Icon;
|
|
74
70
|
}
|
|
75
71
|
}
|
|
76
72
|
return {
|
package/CommandBar/Label.js
CHANGED
|
@@ -18,6 +18,6 @@ const useStyles = (0, react_components_1.makeStyles)({
|
|
|
18
18
|
});
|
|
19
19
|
exports.CommandLabel = (0, react_1.memo)((0, react_1.forwardRef)(function CommandLabel({ Icon, text }, ref) {
|
|
20
20
|
const styles = useStyles();
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(react_components_1.ToolbarButton, { ref: ref, type: "button", icon:
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.ToolbarButton, { ref: ref, type: "button", icon: Icon ? (0, jsx_runtime_1.jsx)(Icon, { size: 20 }) : undefined, className: (0, react_components_1.mergeClasses)(styles.root), children: text }));
|
|
22
22
|
}));
|
|
23
23
|
exports.CommandLabel.displayName = 'CommandLabel';
|
package/DataGrid/ActionCell.js
CHANGED
|
@@ -5,8 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const locale_1 = require("@headless-adminapp/app/locale");
|
|
6
6
|
const mutable_1 = require("@headless-adminapp/app/mutable");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const TableCell_1 = require("../DataGrid/TableCell");
|
|
9
8
|
const OverflowCommandBar_1 = require("../OverflowCommandBar");
|
|
9
|
+
const TableCell_1 = require("./TableCell");
|
|
10
10
|
exports.ActionCell = (0, react_1.memo)(function ActionCell({ onOpen, mutableState, }) {
|
|
11
11
|
const transformedCommands = (0, mutable_1.useMutableStateSelector)(mutableState, (state) => state);
|
|
12
12
|
const { language } = (0, locale_1.useLocale)();
|
|
@@ -6,5 +6,5 @@ interface AddColumnsProps {
|
|
|
6
6
|
opened: boolean;
|
|
7
7
|
onClose: () => void;
|
|
8
8
|
}
|
|
9
|
-
export declare function AddColumns({ onColumnAdd, onColumnRemove, columns, opened, onClose, }: AddColumnsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function AddColumns({ onColumnAdd, onColumnRemove, columns, opened, onClose, }: Readonly<AddColumnsProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -5,5 +5,5 @@ interface ConditionValueControlProps {
|
|
|
5
5
|
value: any;
|
|
6
6
|
onChange?: (value: any) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function ConditionValueControl({ attribute, type, value, onChange, }: ConditionValueControlProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export declare function ConditionValueControl({ attribute, type, value, onChange, }: Readonly<ConditionValueControlProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
export {};
|
|
@@ -10,7 +10,7 @@ const transport_1 = require("@headless-adminapp/app/transport");
|
|
|
10
10
|
const FormControl_1 = __importDefault(require("../../form/FormControl"));
|
|
11
11
|
function ConditionValueControl({ attribute, type, value, onChange, }) {
|
|
12
12
|
const dataService = (0, transport_1.useDataService)();
|
|
13
|
-
const { schemaStore
|
|
13
|
+
const { schemaStore } = (0, hooks_1.useMetadata)();
|
|
14
14
|
switch (type) {
|
|
15
15
|
case 'string':
|
|
16
16
|
return ((0, jsx_runtime_1.jsx)(FormControl_1.default, { type: "text", value: value ?? null, onChange: (value) => {
|
|
@@ -28,22 +28,9 @@ function ConditionValueControl({ attribute, type, value, onChange, }) {
|
|
|
28
28
|
if (attribute.type !== 'lookup') {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(FormControl_1.default, { type: "lookups",
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(FormControl_1.default, { type: "lookups", dataService: dataService, schema: schemaStore.getSchema(attribute.entity), value: value ?? null, onChange: (value) => {
|
|
32
32
|
onChange?.(value ?? []);
|
|
33
33
|
} }));
|
|
34
|
-
// return (
|
|
35
|
-
// <FormControl
|
|
36
|
-
// type="lookup"
|
|
37
|
-
// async
|
|
38
|
-
// dataService={dataService}
|
|
39
|
-
// schema={schemaStore.getSchema(attribute.entity)}
|
|
40
|
-
// experienceStore={experienceStore}
|
|
41
|
-
// value={value?.[0] ?? null}
|
|
42
|
-
// onChange={(value) => {
|
|
43
|
-
// onChange?.(value ? [value] : []);
|
|
44
|
-
// }}
|
|
45
|
-
// />
|
|
46
|
-
// );
|
|
47
34
|
case 'date':
|
|
48
35
|
return ((0, jsx_runtime_1.jsx)(FormControl_1.default, { type: "date", value: value ?? null, onChange: (value) => {
|
|
49
36
|
onChange?.(value);
|
|
@@ -65,18 +52,18 @@ function ConditionValueControl({ attribute, type, value, onChange, }) {
|
|
|
65
52
|
onChange?.(value?.map((x) => x === 'true') ?? []);
|
|
66
53
|
} }));
|
|
67
54
|
case 'choice':
|
|
68
|
-
case 'choices':
|
|
55
|
+
case 'choices': {
|
|
69
56
|
if (attribute.type !== 'choice' && attribute.type !== 'choices') {
|
|
70
57
|
return null;
|
|
71
58
|
}
|
|
72
59
|
const isNumeric = 'number' in attribute && attribute.number === true;
|
|
73
|
-
// const isString = 'string' in attribute && attribute.string === true;
|
|
74
60
|
return ((0, jsx_runtime_1.jsx)(FormControl_1.default, { type: "multi-select", options: attribute.options.map((x) => ({
|
|
75
61
|
label: x.label,
|
|
76
62
|
value: isNumeric ? x.value?.toString() : x.value,
|
|
77
63
|
})), value: value?.map((x) => (isNumeric ? x.toString() : x)) ?? [], onChange: (value) => {
|
|
78
64
|
onChange?.(value?.map((x) => (isNumeric ? +x : x)) ?? []);
|
|
79
65
|
} }));
|
|
66
|
+
}
|
|
80
67
|
default:
|
|
81
68
|
return null;
|
|
82
69
|
}
|
|
@@ -5,5 +5,5 @@ interface OperatorSelectProps {
|
|
|
5
5
|
value: OperatorKey | null;
|
|
6
6
|
onChange?: (operator: OperatorKey) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function OperatorSelect({ attribute, value, onChange, }: OperatorSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function OperatorSelect({ attribute, value, onChange, }: Readonly<OperatorSelectProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import { TransformedViewColumn } from '@headless-adminapp/app/datagrid';
|
|
2
|
-
import type { Attribute } from '@headless-adminapp/core/attributes';
|
|
3
|
-
import { ColumnCondition } from '@headless-adminapp/core/experience/view';
|
|
4
2
|
import { FC, PropsWithChildren } from 'react';
|
|
5
3
|
interface TableHeaderFilterCellProps {
|
|
6
|
-
sortDirection?: 'asc' | 'desc';
|
|
7
|
-
columnName: string;
|
|
4
|
+
sortDirection?: 'asc' | 'desc' | false;
|
|
8
5
|
onChangeSortDirection?: (direction: 'asc' | 'desc') => void;
|
|
9
|
-
filterCondition?: ColumnCondition;
|
|
10
|
-
onChangeFilterCondition?: (condition: ColumnCondition | undefined) => void;
|
|
11
|
-
attribute: Attribute;
|
|
12
6
|
minWidth?: number;
|
|
13
|
-
onChangeWidth?: (width: number) => void;
|
|
14
7
|
column: TransformedViewColumn;
|
|
15
8
|
onResetSize?: () => void;
|
|
16
9
|
resizeHandler?: (event: unknown) => void;
|
|
@@ -51,14 +51,7 @@ const useStyles = (0, react_components_1.makeStyles)({
|
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
53
|
});
|
|
54
|
-
const TableHeaderFilterCell = ({ children, sortDirection,
|
|
55
|
-
// onChangeFilterCondition,
|
|
56
|
-
onChangeSortDirection,
|
|
57
|
-
// attribute,
|
|
58
|
-
// filterCondition,
|
|
59
|
-
minWidth,
|
|
60
|
-
// onChangeWidth,
|
|
61
|
-
column, onResetSize, resizeHandler, resizable, disableFilter, disableSort, }) => {
|
|
54
|
+
const TableHeaderFilterCell = ({ children, sortDirection, onChangeSortDirection, minWidth, column, onResetSize, resizeHandler, resizable, disableFilter, disableSort, }) => {
|
|
62
55
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
63
56
|
const schema = (0, hooks_1.useDataGridSchema)();
|
|
64
57
|
const { schemaStore } = (0, hooks_2.useMetadata)();
|
|
@@ -89,6 +89,6 @@ const GridListContainer = () => {
|
|
|
89
89
|
width: '100%',
|
|
90
90
|
position: 'absolute',
|
|
91
91
|
transform: `translateY(${virtualSize}px)`,
|
|
92
|
-
}, children: Array.from({ length: 10 }).map((_, index) => ((0, jsx_runtime_1.jsx)(RecordCardLoading_1.RecordCardLoading, { cardView: view.experience.card
|
|
92
|
+
}, children: Array.from({ length: 10 }).map((_, index) => ((0, jsx_runtime_1.jsx)(RecordCardLoading_1.RecordCardLoading, { cardView: view.experience.card }, index))) }))] }) }) }) }));
|
|
93
93
|
};
|
|
94
94
|
exports.GridListContainer = GridListContainer;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { ChoiceAttribute } from '@headless-adminapp/core/attributes';
|
|
2
|
-
import { ViewColumn } from '@headless-adminapp/core/experience/view';
|
|
3
|
-
import { Schema } from '@headless-adminapp/core/schema';
|
|
4
|
-
import { UniqueRecord } from '../types';
|
|
5
2
|
interface TableCellChoiceProps {
|
|
6
|
-
column: ViewColumn;
|
|
7
|
-
schema: Schema;
|
|
8
|
-
record: UniqueRecord;
|
|
9
3
|
value: unknown;
|
|
10
4
|
attribute: ChoiceAttribute<string | number>;
|
|
11
5
|
formattedValue: string;
|
|
12
6
|
width: number;
|
|
13
7
|
}
|
|
14
|
-
export declare function TableCellChoice(props: TableCellChoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TableCellChoice(props: Readonly<TableCellChoiceProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
9
|
export {};
|
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const TableCellBase_1 = require("./TableCellBase");
|
|
7
7
|
exports.TableCellText = (0, react_1.memo)(({ value, width, textAlignment }) => {
|
|
8
8
|
return ((0, jsx_runtime_1.jsx)(TableCellBase_1.TableCellBase, { style: {
|
|
9
|
-
textAlign: textAlignment
|
|
9
|
+
textAlign: textAlignment ?? 'left',
|
|
10
10
|
textOverflow: 'ellipsis',
|
|
11
11
|
overflow: 'hidden',
|
|
12
12
|
whiteSpace: 'nowrap',
|
|
@@ -17,12 +17,12 @@ const app_1 = require("@headless-adminapp/core/experience/app");
|
|
|
17
17
|
const react_table_1 = require("@tanstack/react-table");
|
|
18
18
|
const react_1 = require("react");
|
|
19
19
|
const componentStore_1 = require("../componentStore");
|
|
20
|
-
const GridColumnHeader_1 = require("../DataGrid/GridColumnHeader");
|
|
21
|
-
const TableCell_1 = require("../DataGrid/TableCell");
|
|
22
|
-
const TableCellLink_1 = require("../DataGrid/TableCell/TableCellLink");
|
|
23
20
|
const avatar_1 = require("../utils/avatar");
|
|
24
21
|
const ActionCell_1 = require("./ActionCell");
|
|
22
|
+
const GridColumnHeader_1 = require("./GridColumnHeader");
|
|
23
|
+
const TableCell_1 = require("./TableCell");
|
|
25
24
|
const TableCellChoice_1 = require("./TableCell/TableCellChoice");
|
|
25
|
+
const TableCellLink_1 = require("./TableCell/TableCellLink");
|
|
26
26
|
const columnHelper = (0, react_table_1.createColumnHelper)();
|
|
27
27
|
const useStyles = (0, react_components_1.makeStyles)({
|
|
28
28
|
selectionCell: {
|
|
@@ -213,7 +213,6 @@ function useTableColumns({ disableSelection, disableContextMenu, disableColumnRe
|
|
|
213
213
|
disableColumnFilter,
|
|
214
214
|
disableColumnSort,
|
|
215
215
|
onChangeSortDirection,
|
|
216
|
-
attribute: schema.attributes[column.name],
|
|
217
216
|
});
|
|
218
217
|
},
|
|
219
218
|
cell: (info) => renderCellContent({
|
|
@@ -250,8 +249,8 @@ function useTableColumns({ disableSelection, disableContextMenu, disableColumnRe
|
|
|
250
249
|
return [...selectionColumns, ...restColumns, ...actionColumns];
|
|
251
250
|
}, [selectionColumns, restColumns, actionColumns]);
|
|
252
251
|
}
|
|
253
|
-
function renderCellHeaderContent({ column, props, disableColumnResize, disableColumnFilter, disableColumnSort, onChangeSortDirection,
|
|
254
|
-
return ((0, jsx_runtime_1.jsx)(GridColumnHeader_1.TableHeaderFilterCell, {
|
|
252
|
+
function renderCellHeaderContent({ column, props, disableColumnResize, disableColumnFilter, disableColumnSort, onChangeSortDirection, }) {
|
|
253
|
+
return ((0, jsx_runtime_1.jsx)(GridColumnHeader_1.TableHeaderFilterCell, { sortDirection: props.column.getIsSorted(), minWidth: props.header.getSize(), column: column, resizable: !disableColumnResize, disableFilter: disableColumnFilter, disableSort: disableColumnSort, onChangeSortDirection: onChangeSortDirection, onResetSize: props.column.resetSize, resizeHandler: props.header.getResizeHandler(), children: column.label }, column.id));
|
|
255
254
|
}
|
|
256
255
|
function renderCellContent({ info, column, schema, schemaStore, locale, routeResolver, openRecord, router, }) {
|
|
257
256
|
let attribute;
|
|
@@ -339,7 +338,7 @@ function renderCellContent({ info, column, schema, schemaStore, locale, routeRes
|
|
|
339
338
|
return ((0, jsx_runtime_1.jsx)(TableCellLink_1.TableCellLink, { value: formattedValue, width: info.column.getSize(), href: url, target: "_blank" }, column.id));
|
|
340
339
|
}
|
|
341
340
|
case 'choice':
|
|
342
|
-
return ((0, jsx_runtime_1.jsx)(TableCellChoice_1.TableCellChoice, {
|
|
341
|
+
return ((0, jsx_runtime_1.jsx)(TableCellChoice_1.TableCellChoice, { value: value, attribute: attribute, formattedValue: formattedValue, width: info.column.getSize() }));
|
|
343
342
|
}
|
|
344
343
|
if (attribute.type === 'string' && attribute.format === 'phone') {
|
|
345
344
|
const parsedNumber = (0, phone_1.parsePhoneNumber)(value, locale.region);
|
|
@@ -6,5 +6,5 @@ interface AlertDialogProps {
|
|
|
6
6
|
onDismiss?: () => void;
|
|
7
7
|
confirmText?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function AlertDialog(props: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function AlertDialog(props: Readonly<AlertDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -8,5 +8,5 @@ interface ConfirmDialogProps {
|
|
|
8
8
|
confirmText?: string;
|
|
9
9
|
cancelText?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare function ConfirmDialog(props: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function ConfirmDialog(props: Readonly<ConfirmDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -6,5 +6,5 @@ interface ErrorDialogProps {
|
|
|
6
6
|
onDismiss?: () => void;
|
|
7
7
|
confirmText?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function ErrorDialog(props: ErrorDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ErrorDialog(props: Readonly<ErrorDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ErrorDialog = ErrorDialog;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
+
const utils_1 = require("@headless-adminapp/core/utils");
|
|
6
7
|
const icons_1 = require("@headless-adminapp/icons");
|
|
7
8
|
function ErrorDialog(props) {
|
|
8
9
|
return ((0, jsx_runtime_1.jsx)(react_components_1.Dialog, { open: props.open, onOpenChange: () => {
|
|
@@ -13,7 +14,7 @@ function ErrorDialog(props) {
|
|
|
13
14
|
display: 'inline-flex',
|
|
14
15
|
alignItems: 'center',
|
|
15
16
|
marginRight: react_components_1.tokens.spacingHorizontalS,
|
|
16
|
-
}, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Error, {}) }), props.title
|
|
17
|
+
}, children: (0, jsx_runtime_1.jsx)(icons_1.Icons.Error, {}) }), (0, utils_1.stringWithDefault)(props.title, 'Error')] }), (0, jsx_runtime_1.jsx)(react_components_1.DialogContent, { children: props.message }), (0, jsx_runtime_1.jsx)(react_components_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "primary", style: { background: react_components_1.tokens.colorPaletteRedBackground3 }, onClick: () => {
|
|
17
18
|
props.onConfirm?.();
|
|
18
19
|
}, children: props.confirmText ?? 'Close' }) })] }) }) }));
|
|
19
20
|
}
|
|
@@ -14,7 +14,7 @@ interface PromptDialogProps<SA extends SchemaAttributes = SchemaAttributes> {
|
|
|
14
14
|
onCancel?: PromptDialogOptions<SA>['onCancel'];
|
|
15
15
|
onDismiss?: PromptDialogOptions<SA>['onDismiss'];
|
|
16
16
|
}
|
|
17
|
-
export declare function PromptDialog(props: PromptDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function PromptDialog(props: Readonly<PromptDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export declare const formValidator: (<A extends SchemaAttributes = SchemaAttributes>({ attributes, language, strings, region, }: {
|
|
19
19
|
attributes: A;
|
|
20
20
|
language: string;
|
|
@@ -3,5 +3,5 @@ interface WidgetTitleBarProps {
|
|
|
3
3
|
title: string;
|
|
4
4
|
commands?: CommandItemState[][];
|
|
5
5
|
}
|
|
6
|
-
export declare function WidgetTitleBar({ title, commands }: WidgetTitleBarProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function WidgetTitleBar({ title, commands, }: Readonly<WidgetTitleBarProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -9,7 +9,7 @@ const react_components_1 = require("@fluentui/react-components");
|
|
|
9
9
|
const locale_1 = require("@headless-adminapp/app/locale");
|
|
10
10
|
const CommandBar_1 = __importDefault(require("../CommandBar"));
|
|
11
11
|
const OverflowCommandBar_1 = require("../OverflowCommandBar");
|
|
12
|
-
function WidgetTitleBar({ title, commands }) {
|
|
12
|
+
function WidgetTitleBar({ title, commands, }) {
|
|
13
13
|
const { language } = (0, locale_1.useLocale)();
|
|
14
14
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
15
15
|
display: 'flex',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AreaChartInfo } from '@headless-adminapp/core/experience/insights';
|
|
2
|
-
export declare function AreaChart({ dataset, chartInfo, }: {
|
|
2
|
+
export declare function AreaChart({ dataset, chartInfo, }: Readonly<{
|
|
3
3
|
dataset: any[];
|
|
4
4
|
chartInfo: AreaChartInfo;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default AreaChart;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComposedChartInfo } from '@headless-adminapp/core/experience/insights';
|
|
2
|
-
export declare function ComposedChart({ dataset, chartInfo, }: {
|
|
2
|
+
export declare function ComposedChart({ dataset, chartInfo, }: Readonly<{
|
|
3
3
|
dataset: any[];
|
|
4
4
|
chartInfo: ComposedChartInfo;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default ComposedChart;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CustomTooltipContent: ({ active, payload, label, xAxisFormatter, yAxisFormatter, rightYAxisFormatter, yAxisIdResolver, }: {
|
|
1
|
+
export declare const CustomTooltipContent: ({ active, payload, label, xAxisFormatter, yAxisFormatter, rightYAxisFormatter, yAxisIdResolver, }: Readonly<{
|
|
2
2
|
active?: boolean;
|
|
3
3
|
payload?: any[];
|
|
4
4
|
label: string;
|
|
@@ -6,4 +6,4 @@ export declare const CustomTooltipContent: ({ active, payload, label, xAxisForma
|
|
|
6
6
|
yAxisFormatter: (value: unknown) => string;
|
|
7
7
|
rightYAxisFormatter?: (value: unknown) => string;
|
|
8
8
|
yAxisIdResolver?: (dataKey: string) => "left" | "right";
|
|
9
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const FunnelCustomTooltipContent: ({ active, payload, valueFormatter, }: {
|
|
1
|
+
export declare const FunnelCustomTooltipContent: ({ active, payload, valueFormatter, }: Readonly<{
|
|
2
2
|
active?: boolean;
|
|
3
3
|
payload?: any[];
|
|
4
4
|
valueFormatter: (value: unknown) => string;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GaugeChartInfo } from '@headless-adminapp/core/experience/insights';
|
|
2
|
-
export declare function GaugeChart(_props: {
|
|
2
|
+
export declare function GaugeChart(_props: Readonly<{
|
|
3
3
|
dataset: any[];
|
|
4
4
|
chartInfo: GaugeChartInfo;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default GaugeChart;
|
|
@@ -2,4 +2,4 @@ import { BoardColumnConfig } from '@headless-adminapp/app/board/types';
|
|
|
2
2
|
export type BoardColumnProps = {
|
|
3
3
|
config: BoardColumnConfig;
|
|
4
4
|
};
|
|
5
|
-
export declare function BoardColumn(props: BoardColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function BoardColumn(props: Readonly<BoardColumnProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { RelatedItemInfo } from '@headless-adminapp/app/dataform/context';
|
|
|
2
2
|
interface FormTabRelatedProps {
|
|
3
3
|
selectedRelatedItem: RelatedItemInfo | null;
|
|
4
4
|
}
|
|
5
|
-
export declare function FormTabRelated({ selectedRelatedItem }: FormTabRelatedProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function FormTabRelated({ selectedRelatedItem, }: Readonly<FormTabRelatedProps>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -7,10 +7,9 @@ const hooks_1 = require("@headless-adminapp/app/dataform/hooks");
|
|
|
7
7
|
const historystate_1 = require("@headless-adminapp/app/historystate");
|
|
8
8
|
const FormTab_1 = require("../form/layout/FormTab");
|
|
9
9
|
const SubgridControl_1 = require("./SubgridControl");
|
|
10
|
-
function FormTabRelated({ selectedRelatedItem }) {
|
|
10
|
+
function FormTabRelated({ selectedRelatedItem, }) {
|
|
11
11
|
const recordId = (0, hooks_1.useRecordId)();
|
|
12
12
|
const schema = (0, hooks_1.useDataFormSchema)();
|
|
13
|
-
const historyKey = (0, historystate_1.useHistoryStateKey)();
|
|
14
13
|
return ((0, jsx_runtime_1.jsx)(FormTab_1.FormTab, { value: "related", noWrapper: true, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
15
14
|
display: 'flex',
|
|
16
15
|
flexDirection: 'column',
|
|
@@ -99,7 +99,7 @@ const PageEntityFormDesktopContainer = () => {
|
|
|
99
99
|
alignItems: 'center',
|
|
100
100
|
}, children: [(0, jsx_runtime_1.jsx)(react_components_1.Subtitle2, { children: recordTitle }), (0, jsx_runtime_1.jsx)(react_components_1.Caption1, { style: { color: react_components_1.tokens.colorNeutralForeground4 }, children: isDirty
|
|
101
101
|
? `- ${strings.unsaved}`
|
|
102
|
-
:
|
|
102
|
+
: record
|
|
103
103
|
? `- ${strings.saved}`
|
|
104
104
|
: '' })] }), (0, jsx_runtime_1.jsx)(react_components_1.Body1, { style: { color: react_components_1.tokens.colorNeutralForeground3 }, children: (0, utils_1.localizedLabel)(language, schema) })] })), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'row' }, children: formConfig.experience.headerControls?.map((controlName, index) => {
|
|
105
105
|
const attribute = schema.attributes[controlName];
|
|
@@ -7,5 +7,5 @@ interface ProcessFlowProps {
|
|
|
7
7
|
}>;
|
|
8
8
|
skeleton?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function ProcessFlow({ height, rounded, items, skeleton, }: ProcessFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function ProcessFlow({ height, rounded, items, skeleton, }: Readonly<ProcessFlowProps>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -43,7 +43,7 @@ function RecordCard({ schema, cardView, record, selected, }) {
|
|
|
43
43
|
const initials = createIntial(recordTitle);
|
|
44
44
|
let avatarSrc = '';
|
|
45
45
|
if (cardView.showAvatar) {
|
|
46
|
-
const avatarColumn = cardView.avatarColumn
|
|
46
|
+
const avatarColumn = cardView.avatarColumn ?? schema.avatarAttribute;
|
|
47
47
|
if (avatarColumn) {
|
|
48
48
|
const avatarAttribute = schema.attributes[avatarColumn];
|
|
49
49
|
if (avatarAttribute.type === 'attachment' &&
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { CardView } from '@headless-adminapp/core/experience/view';
|
|
2
|
-
import {
|
|
2
|
+
import { SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
3
3
|
interface RecordCardLoadingProps<S extends SchemaAttributes = SchemaAttributes> {
|
|
4
|
-
schema: Schema<S>;
|
|
5
4
|
cardView: CardView<S>;
|
|
6
5
|
}
|
|
7
|
-
export declare function RecordCardLoading<S extends SchemaAttributes = SchemaAttributes>({ cardView }: RecordCardLoadingProps<S
|
|
6
|
+
export declare function RecordCardLoading<S extends SchemaAttributes = SchemaAttributes>({ cardView }: Readonly<RecordCardLoadingProps<S>>): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -58,15 +58,12 @@ const RecordSetNavigatorContainer = () => {
|
|
|
58
58
|
flexDirection: 'column',
|
|
59
59
|
paddingInline: 16,
|
|
60
60
|
paddingBlock: 8,
|
|
61
|
-
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Body1Strong, { children: schema.localizedPluralLabels?.[language] ?? schema?.pluralLabel }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: false, style: { opacity: 0.2 } }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flex: 1, flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(ScrollView_1.ScrollView, { autoHide: true, rtl: direction === 'rtl', children: data?.map((record) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { role: "button", className: (0, react_components_1.mergeClasses)(styles.item, recordId ===
|
|
62
|
-
record[schema.idAttribute] &&
|
|
63
|
-
styles.selected), onClick: () => {
|
|
61
|
+
}, children: (0, jsx_runtime_1.jsx)(react_components_1.Body1Strong, { children: schema.localizedPluralLabels?.[language] ?? schema?.pluralLabel }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: false, style: { opacity: 0.2 } }) }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flex: 1, flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(ScrollView_1.ScrollView, { autoHide: true, rtl: direction === 'rtl', children: data?.map((record) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { role: "button", className: (0, react_components_1.mergeClasses)(styles.item, recordId === record[schema.idAttribute] && styles.selected), onClick: () => {
|
|
64
62
|
openForm({
|
|
65
63
|
logicalName: schema.logicalName,
|
|
66
64
|
id: record[schema.idAttribute],
|
|
67
65
|
replace: true,
|
|
68
66
|
});
|
|
69
|
-
}, children: (0, jsx_runtime_1.jsx)(RecordCard_1.RecordCard, { cardView: cardView, record: record, schema: schema, selected: recordId ===
|
|
70
|
-
record[schema.idAttribute] }) }), (0, jsx_runtime_1.jsx)("div", { style: { paddingInline: react_components_1.tokens.spacingHorizontalL }, children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: false, style: { opacity: 0.2 } }) })] }, record[schema.idAttribute]))) }) })] }) }));
|
|
67
|
+
}, children: (0, jsx_runtime_1.jsx)(RecordCard_1.RecordCard, { cardView: cardView, record: record, schema: schema, selected: recordId === record[schema.idAttribute] }) }), (0, jsx_runtime_1.jsx)("div", { style: { paddingInline: react_components_1.tokens.spacingHorizontalL }, children: (0, jsx_runtime_1.jsx)(react_components_1.Divider, { vertical: false, style: { opacity: 0.2 } }) })] }, record[schema.idAttribute]))) }) })] }) }));
|
|
71
68
|
};
|
|
72
69
|
exports.RecordSetNavigatorContainer = RecordSetNavigatorContainer;
|
|
@@ -2,5 +2,5 @@ import { RelatedItemInfo } from '@headless-adminapp/app/dataform/context';
|
|
|
2
2
|
interface RelatedViewSelectorProps {
|
|
3
3
|
onSelect: (item: RelatedItemInfo) => void;
|
|
4
4
|
}
|
|
5
|
-
export declare function RelatedViewSelector(props: RelatedViewSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
export declare function RelatedViewSelector(props: Readonly<RelatedViewSelectorProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
export {};
|
|
@@ -7,7 +7,6 @@ exports.StandardControl = void 0;
|
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const hooks_1 = require("@headless-adminapp/app/metadata/hooks");
|
|
9
9
|
const transport_1 = require("@headless-adminapp/app/transport");
|
|
10
|
-
const react_1 = require("react");
|
|
11
10
|
const componentStore_1 = require("../componentStore");
|
|
12
11
|
const AttachmentControl_1 = require("../form/controls/AttachmentControl");
|
|
13
12
|
const AttachmentsControl_1 = require("../form/controls/AttachmentsControl");
|
|
@@ -47,15 +46,12 @@ const StandardControl = (props) => {
|
|
|
47
46
|
// quickViewControl,
|
|
48
47
|
allowNavigation, allowNewRecord, autoHeight, maxHeight, skeleton, } = props;
|
|
49
48
|
const isDisabled = readOnly;
|
|
50
|
-
// const label = hideLabel ? undefined : _label ?? attribute.label;
|
|
51
49
|
const placeholder = hidePlaceholder
|
|
52
50
|
? undefined
|
|
53
51
|
: _placeholder ?? _label ?? attribute.label;
|
|
54
|
-
// const required = quickViewControl ? false : attribute.required;
|
|
55
52
|
const dataService = (0, transport_1.useDataService)();
|
|
56
53
|
const fileService = (0, transport_1.useFileService)();
|
|
57
|
-
const { schemaStore
|
|
58
|
-
// const { openQuickCreate } = useQuickCreateForm();
|
|
54
|
+
const { schemaStore } = (0, hooks_1.useMetadata)();
|
|
59
55
|
switch (attribute.type) {
|
|
60
56
|
case 'id': {
|
|
61
57
|
const controlProps = {
|
|
@@ -111,7 +107,7 @@ const StandardControl = (props) => {
|
|
|
111
107
|
return (0, jsx_runtime_1.jsx)(Control, { ...controlProps });
|
|
112
108
|
}
|
|
113
109
|
default:
|
|
114
|
-
return
|
|
110
|
+
return null;
|
|
115
111
|
}
|
|
116
112
|
}
|
|
117
113
|
case 'number': {
|
|
@@ -133,7 +129,7 @@ const StandardControl = (props) => {
|
|
|
133
129
|
return ((0, jsx_runtime_1.jsx)(Control, { name: name, placeholder: placeholder, value: value, onChange: onChange, onBlur: onBlur, error: isError, disabled: isDisabled, readOnly: readOnly, skeleton: skeleton }));
|
|
134
130
|
}
|
|
135
131
|
default: {
|
|
136
|
-
return
|
|
132
|
+
return null;
|
|
137
133
|
}
|
|
138
134
|
}
|
|
139
135
|
}
|
|
@@ -184,11 +180,11 @@ const StandardControl = (props) => {
|
|
|
184
180
|
}
|
|
185
181
|
case 'lookups': {
|
|
186
182
|
const Control = componentStore_1.componentStore.getComponent('Form.MultiSelectLookupControl') ?? MultiSelectLookupControl_1.MultiSelectLookupControl;
|
|
187
|
-
return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, placeholder: placeholder, disabled: isDisabled, dataService: dataService, schema: schemaStore.getSchema(attribute.entity),
|
|
183
|
+
return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, placeholder: placeholder, disabled: isDisabled, dataService: dataService, schema: schemaStore.getSchema(attribute.entity), allowNavigation: allowNavigation, allowNewRecord: allowNewRecord, skeleton: skeleton }));
|
|
188
184
|
}
|
|
189
185
|
case 'regarding': {
|
|
190
186
|
const Control = componentStore_1.componentStore.getComponent('Form.RegardingControl') ?? RegardingControl_1.RegardingControl;
|
|
191
|
-
return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, placeholder: placeholder, disabled: isDisabled, dataService: dataService, entities: attribute.entities, schemaStore: schemaStore,
|
|
187
|
+
return ((0, jsx_runtime_1.jsx)(Control, { name: name, value: value, onChange: onChange, onBlur: onBlur, placeholder: placeholder, disabled: isDisabled, dataService: dataService, entities: attribute.entities, schemaStore: schemaStore, allowNavigation: allowNavigation, skeleton: skeleton }));
|
|
192
188
|
}
|
|
193
189
|
case 'boolean': {
|
|
194
190
|
const Control = componentStore_1.componentStore.getComponent('Form.SwitchControl') ?? SwitchControl_1.SwitchControl;
|
|
@@ -215,6 +211,6 @@ const StandardControl = (props) => {
|
|
|
215
211
|
if (FallBackControl) {
|
|
216
212
|
return (0, jsx_runtime_1.jsx)(FallBackControl, { ...props });
|
|
217
213
|
}
|
|
218
|
-
return
|
|
214
|
+
return null;
|
|
219
215
|
};
|
|
220
216
|
exports.StandardControl = StandardControl;
|
|
@@ -10,5 +10,5 @@ interface SubgridControlProps {
|
|
|
10
10
|
};
|
|
11
11
|
ContainerComponent?: React.ComponentType<any> | null;
|
|
12
12
|
}
|
|
13
|
-
export declare function SubgridControl(props: SubgridControlProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function SubgridControl(props: Readonly<SubgridControlProps>): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageEntityViewMobileContainer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
5
|
const CommandContainer_1 = require("../DataGrid/CommandContainer");
|
|
7
6
|
const GridHeaderMobile_1 = require("../DataGrid/GridHeaderMobile");
|
|
8
7
|
const GridListContainer_1 = require("../DataGrid/GridListContainer");
|
|
9
8
|
const PageEntityViewMobileFrame_1 = require("./PageEntityViewMobileFrame");
|
|
10
9
|
const PageEntityViewMobileContainer = () => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(PageEntityViewMobileFrame_1.PageEntityViewMobileFrame, { commandBar: (0, jsx_runtime_1.jsx)(CommandContainer_1.CommandContainer, {}), header: (0, jsx_runtime_1.jsx)(GridHeaderMobile_1.GridHeaderMobile, {}), content: (0, jsx_runtime_1.jsx)(GridListContainer_1.GridListContainer, {}) }));
|
|
12
11
|
};
|
|
13
12
|
exports.PageEntityViewMobileContainer = PageEntityViewMobileContainer;
|
|
@@ -3,5 +3,5 @@ interface ComponentBrokenProps {
|
|
|
3
3
|
message?: string;
|
|
4
4
|
Icon?: Icon;
|
|
5
5
|
}
|
|
6
|
-
export declare function ComponentBroken({ message, Icon }: ComponentBrokenProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function ComponentBroken({ message, Icon, }: Readonly<ComponentBrokenProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ComponentBroken = ComponentBroken;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
function ComponentBroken({ message, Icon }) {
|
|
6
|
+
function ComponentBroken({ message, Icon, }) {
|
|
7
7
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
8
8
|
display: 'flex',
|
|
9
9
|
flex: 1,
|
|
@@ -34,12 +34,8 @@ const DndContext = (0, react_1.createContext)(null);
|
|
|
34
34
|
const DndProvider = ({ children }) => {
|
|
35
35
|
const [context, setContext] = (0, react_1.useState)(null);
|
|
36
36
|
(0, react_1.useEffect)(() => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
if (!ReactDndPromise) {
|
|
41
|
-
ReactDndPromise = Promise.resolve().then(() => __importStar(require('react-dnd')));
|
|
42
|
-
}
|
|
37
|
+
HTML5BackendPromise ??= Promise.resolve().then(() => __importStar(require('react-dnd-html5-backend'))).then((mod) => mod.HTML5Backend);
|
|
38
|
+
ReactDndPromise ??= Promise.resolve().then(() => __importStar(require('react-dnd')));
|
|
43
39
|
Promise.all([HTML5BackendPromise, ReactDndPromise])
|
|
44
40
|
.then(([backend, mod]) => {
|
|
45
41
|
setContext({
|
|
@@ -10,5 +10,5 @@ interface LoginFormProps {
|
|
|
10
10
|
subtitle?: string;
|
|
11
11
|
defaultValues?: LoginFormData;
|
|
12
12
|
}
|
|
13
|
-
export declare function LoginForm(props: LoginFormProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function LoginForm(props: Readonly<LoginFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -4,5 +4,5 @@ interface PageBrokenProps {
|
|
|
4
4
|
message?: string;
|
|
5
5
|
Icon?: Icon;
|
|
6
6
|
}
|
|
7
|
-
export declare function PageBroken({ title, message, Icon }: PageBrokenProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function PageBroken({ title, message, Icon, }: Readonly<PageBrokenProps>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
package/components/PageBroken.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageBroken = PageBroken;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
|
-
function PageBroken({ title, message, Icon }) {
|
|
6
|
+
function PageBroken({ title, message, Icon, }) {
|
|
7
7
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
8
8
|
display: 'flex',
|
|
9
9
|
flex: 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface PageLoadingProps {
|
|
2
2
|
message?: string;
|
|
3
3
|
}
|
|
4
|
-
export declare function PageLoading({ message }: PageLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function PageLoading({ message }: Readonly<PageLoadingProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -8,5 +8,5 @@ interface LoginPageProps {
|
|
|
8
8
|
subtitle?: string;
|
|
9
9
|
defaultValues?: LoginFormData;
|
|
10
10
|
}
|
|
11
|
-
export declare function PageLogin(props: LoginPageProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function PageLogin(props: Readonly<LoginPageProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -84,7 +84,7 @@ const AttachmentImageControl = ({ value, disabled, readOnly, onChange, fileServi
|
|
|
84
84
|
maxWidth: '100%',
|
|
85
85
|
height: 100,
|
|
86
86
|
position: 'relative',
|
|
87
|
-
}, children: [(0, jsx_runtime_1.jsx)("img", { src: value.url, style: {
|
|
87
|
+
}, children: [(0, jsx_runtime_1.jsx)("img", { src: value.url, alt: value.name ?? 'Attachment', style: {
|
|
88
88
|
maxHeight: '100%',
|
|
89
89
|
maxWidth: '100%',
|
|
90
90
|
objectFit: 'contain',
|
|
@@ -163,7 +163,7 @@ const AttachmentControl = ({ value, disabled, readOnly, id, name, onBlur, onChan
|
|
|
163
163
|
textOverflow: 'ellipsis',
|
|
164
164
|
whiteSpace: 'nowrap',
|
|
165
165
|
flex: 1,
|
|
166
|
-
}, children: placeholder
|
|
166
|
+
}, children: placeholder ?? 'Select a file' }), isProcessing && ((0, jsx_runtime_1.jsx)("div", { style: { paddingRight: react_components_1.tokens.spacingHorizontalS }, children: (0, jsx_runtime_1.jsx)(react_components_1.Spinner, { size: "extra-tiny" }) }))] }) }) }));
|
|
167
167
|
}
|
|
168
168
|
return ((0, jsx_runtime_1.jsx)("div", { style: { position: 'relative', overflow: 'hidden' }, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
169
169
|
width: '100%',
|
|
@@ -182,7 +182,7 @@ const AttachmentControl = ({ value, disabled, readOnly, id, name, onBlur, onChan
|
|
|
182
182
|
textOverflow: 'ellipsis',
|
|
183
183
|
whiteSpace: 'nowrap',
|
|
184
184
|
flex: 1,
|
|
185
|
-
}, children: value.name
|
|
185
|
+
}, children: value.name ?? value.url }), isProcessing && ((0, jsx_runtime_1.jsx)("div", { style: { paddingRight: react_components_1.tokens.spacingHorizontalS }, children: (0, jsx_runtime_1.jsx)(react_components_1.Spinner, { size: "extra-tiny" }) })), !isProcessing && ((0, jsx_runtime_1.jsx)(ActionMenu, { format: format, value: value, disabled: disabled, readOnly: readOnly, onChange: onChange, onChangeClick: () => selectFile(accept) }))] }) }) }));
|
|
186
186
|
};
|
|
187
187
|
exports.AttachmentControl = AttachmentControl;
|
|
188
188
|
const ActionMenu = ({ format, value, disabled, readOnly, onChange, onChangeClick, }) => {
|
|
@@ -2,4 +2,4 @@ import { ControlProps } from './types';
|
|
|
2
2
|
export interface DecimalControlProps extends ControlProps<number> {
|
|
3
3
|
decimalPlaces?: number;
|
|
4
4
|
}
|
|
5
|
-
export declare function DecimalControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, borderOnFocusOnly, readOnly, decimalPlaces, skeleton, }: DecimalControlProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function DecimalControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, borderOnFocusOnly, readOnly, decimalPlaces, skeleton, }: Readonly<DecimalControlProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -154,24 +154,24 @@ function resolveValue(value) {
|
|
|
154
154
|
if (!isNaN(numberValue)) {
|
|
155
155
|
return numberValue;
|
|
156
156
|
}
|
|
157
|
-
const timeFormat = /^(\d+):[0-5]
|
|
157
|
+
const timeFormat = /^(\d+):[0-5]\d$/;
|
|
158
158
|
if (timeFormat.test(value)) {
|
|
159
159
|
const [hours, minutes] = value.split(':').map(Number);
|
|
160
160
|
return hours * 60 + minutes;
|
|
161
161
|
}
|
|
162
162
|
const minutesFormat = /^(\d+(\.\d+)?) m/;
|
|
163
163
|
if (minutesFormat.test(value)) {
|
|
164
|
-
const [, minutes] =
|
|
164
|
+
const [, minutes] = minutesFormat.exec(value);
|
|
165
165
|
return Math.floor(Number(minutes));
|
|
166
166
|
}
|
|
167
167
|
const hoursFormat = /^(\d+(\.\d+)?) h/;
|
|
168
168
|
if (hoursFormat.test(value)) {
|
|
169
|
-
const [, hours] =
|
|
169
|
+
const [, hours] = hoursFormat.exec(value);
|
|
170
170
|
return Math.floor(Number(hours) * 60);
|
|
171
171
|
}
|
|
172
172
|
const daysFormat = /^(\d+(\.\d+)?) d/;
|
|
173
173
|
if (daysFormat.test(value)) {
|
|
174
|
-
const [, days] =
|
|
174
|
+
const [, days] = daysFormat.exec(value);
|
|
175
175
|
return Math.floor(Number(days) * 1440);
|
|
176
176
|
}
|
|
177
177
|
return undefined;
|
|
@@ -9,19 +9,23 @@ function EmailControl({ value, onChange, id, name, onBlur, onFocus, placeholder,
|
|
|
9
9
|
if (skeleton) {
|
|
10
10
|
return (0, jsx_runtime_1.jsx)(SkeletonControl_1.SkeletonControl, {});
|
|
11
11
|
}
|
|
12
|
+
const handleOnChange = (e) => {
|
|
13
|
+
let value = e.target.value;
|
|
14
|
+
if (textTransform === 'uppercase') {
|
|
15
|
+
value = value.toUpperCase();
|
|
16
|
+
}
|
|
17
|
+
else if (textTransform === 'lowercase') {
|
|
18
|
+
value = value.toLowerCase();
|
|
19
|
+
}
|
|
20
|
+
onChange?.(value);
|
|
21
|
+
};
|
|
12
22
|
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { type: "email", placeholder: placeholder, id: id, appearance: "filled-darker", name: name,
|
|
13
23
|
// size="sm"
|
|
14
|
-
value: value
|
|
15
|
-
textTransform === 'uppercase'
|
|
16
|
-
? onChange?.(e.target.value.toUpperCase())
|
|
17
|
-
: textTransform === 'lowercase'
|
|
18
|
-
? onChange?.(e.target.value.toLowerCase())
|
|
19
|
-
: onChange?.(e.target.value);
|
|
20
|
-
}, onBlur: () => onBlur?.(), onFocus: () => onFocus?.(),
|
|
24
|
+
value: value ?? '', onChange: handleOnChange, onBlur: () => onBlur?.(), onFocus: () => onFocus?.(),
|
|
21
25
|
// invalid={error}
|
|
22
26
|
readOnly: disabled || readOnly, autoComplete: autoComplete, style: {
|
|
23
27
|
flex: 1,
|
|
24
28
|
paddingRight: react_components_1.tokens.spacingHorizontalXS,
|
|
25
29
|
width: '100%',
|
|
26
|
-
}, contentAfter:
|
|
30
|
+
}, contentAfter: value ? ((0, jsx_runtime_1.jsx)(react_components_1.Button, { onClick: () => window.open(`mailto:${value}`, '_blank'), color: "primary", appearance: "transparent", icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Mail, {}), size: "small" })) : undefined }));
|
|
27
31
|
}
|
|
@@ -3,4 +3,4 @@ import { ControlProps } from './types';
|
|
|
3
3
|
export interface MultiSelectControlProps<T> extends ControlProps<T[]> {
|
|
4
4
|
options: Lookup<T>[];
|
|
5
5
|
}
|
|
6
|
-
export default function MultiSelectControl<T extends string | number>({ value, onChange, options, id, name, disabled, onBlur, onFocus, placeholder, skeleton, }: MultiSelectControlProps<T
|
|
6
|
+
export default function MultiSelectControl<T extends string | number>({ value, onChange, options, id, name, disabled, onBlur, onFocus, placeholder, skeleton, }: Readonly<MultiSelectControlProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Schema } from '@headless-adminapp/core/schema';
|
|
2
|
-
import { ISchemaExperienceStore } from '@headless-adminapp/core/store';
|
|
3
2
|
import { IDataService } from '@headless-adminapp/core/transport';
|
|
4
3
|
import { ControlProps } from './types';
|
|
5
4
|
export interface LookupOption {
|
|
@@ -13,12 +12,8 @@ export type DataLookup = {
|
|
|
13
12
|
logicalName: string;
|
|
14
13
|
};
|
|
15
14
|
export type MultiSelectLookupControlProps = ControlProps<DataLookup[]> & {
|
|
16
|
-
async?: boolean;
|
|
17
|
-
lookupKey?: string;
|
|
18
|
-
openRecord?: (id: string) => void;
|
|
19
15
|
dataService: IDataService;
|
|
20
16
|
schema: Schema;
|
|
21
|
-
experienceStore: ISchemaExperienceStore;
|
|
22
17
|
viewId?: string;
|
|
23
18
|
allowNavigation?: boolean;
|
|
24
19
|
allowNewRecord?: boolean;
|
|
@@ -4,6 +4,7 @@ exports.MultiSelectLookupControl = MultiSelectLookupControl;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_components_1 = require("@fluentui/react-components");
|
|
6
6
|
const hooks_1 = require("@headless-adminapp/app/hooks");
|
|
7
|
+
const useRecentItemStore_1 = require("@headless-adminapp/app/metadata/hooks/useRecentItemStore");
|
|
7
8
|
const hooks_2 = require("@headless-adminapp/app/route/hooks");
|
|
8
9
|
const app_1 = require("@headless-adminapp/core/experience/app");
|
|
9
10
|
const icons_1 = require("@headless-adminapp/icons");
|
|
@@ -36,6 +37,7 @@ const LookupControlMd = ({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
36
37
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
37
38
|
const [searchText, setSearchText] = (0, react_1.useState)('');
|
|
38
39
|
const { lookupStrings } = (0, AppStringContext_1.useAppStrings)();
|
|
40
|
+
const recentItemStore = (0, useRecentItemStore_1.useRecentItemStore)();
|
|
39
41
|
(0, react_1.useEffect)(() => {
|
|
40
42
|
if (open)
|
|
41
43
|
setLookupEnabled(true);
|
|
@@ -81,13 +83,6 @@ const LookupControlMd = ({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
81
83
|
clearInterval(timer);
|
|
82
84
|
};
|
|
83
85
|
}, []);
|
|
84
|
-
// useEffect(() => {
|
|
85
|
-
// if (value) {
|
|
86
|
-
// // setSearchText(value.name); // TODO:
|
|
87
|
-
// } else {
|
|
88
|
-
// setSearchText('');
|
|
89
|
-
// }
|
|
90
|
-
// }, [value]);
|
|
91
86
|
const handleAdd = (selectedValue) => {
|
|
92
87
|
setSearchText('');
|
|
93
88
|
if (!value) {
|
|
@@ -141,6 +136,7 @@ const LookupControlMd = ({ value, onChange, id, name, onBlur, onFocus, placehold
|
|
|
141
136
|
const _item = data?.records.find((x) => String(x[schema.idAttribute]) === String(item.optionValue));
|
|
142
137
|
if (!_item)
|
|
143
138
|
return;
|
|
139
|
+
recentItemStore.addItem((0, useLookupData_1.createLookupRecentKey)(schema.logicalName), _item[schema.idAttribute], _item[schema.idAttribute]);
|
|
144
140
|
handleAdd(_item);
|
|
145
141
|
}, disableAutoFocus: true, onBlur: onBlur, onFocus: onFocus, id: id, autoFocus: autoFocus, children: [data?.records.map((item) => ((0, jsx_runtime_1.jsx)(react_components_1.Option, { value: item[schema.idAttribute], className: (0, react_components_1.mergeClasses)(styles.option), text: item[schema.primaryAttribute], children: (0, jsx_runtime_1.jsx)(RecordCard_1.RecordCard, { cardView: view?.experience.card, record: item, schema: schema }) }, item[schema.idAttribute]))), !isLoading && !data?.records.length && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
146
142
|
paddingInline: react_components_1.tokens.spacingHorizontalL,
|
|
@@ -3,4 +3,4 @@ import { ControlProps } from './types';
|
|
|
3
3
|
export interface PasswordControlProps extends ControlProps<string> {
|
|
4
4
|
appearance?: InputProps['appearance'];
|
|
5
5
|
}
|
|
6
|
-
export declare function PasswordControl({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, autoFocus, appearance, }: PasswordControlProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function PasswordControl({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, autoFocus, appearance, }: Readonly<PasswordControlProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ const icons_1 = require("@headless-adminapp/icons");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
function PasswordControl({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, autoFocus, appearance = 'filled-darker', }) {
|
|
9
9
|
const [showPassword, setShowPassword] = (0, react_1.useState)(false);
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, name: name, appearance: appearance, type: showPassword ? 'text' : 'password', autoFocus: autoFocus, value: value
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, name: name, appearance: appearance, type: showPassword ? 'text' : 'password', autoFocus: autoFocus, value: value ?? '', onChange: (e) => onChange?.(e.target.value), onBlur: () => onBlur?.(), onFocus: () => onFocus?.(),
|
|
11
11
|
// invalid={error}
|
|
12
12
|
disabled: disabled, contentAfter: (0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "transparent", size: "small", onClick: () => setShowPassword(!showPassword), icon: showPassword ? (0, jsx_runtime_1.jsx)(icons_1.Icons.EyeOff, { size: 18 }) : (0, jsx_runtime_1.jsx)(icons_1.Icons.Eye, { size: 18 }) }) }));
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISchemaStore } from '@headless-adminapp/core/store';
|
|
2
2
|
import { IDataService } from '@headless-adminapp/core/transport';
|
|
3
3
|
import { ControlProps } from './types';
|
|
4
4
|
export interface LookupOption {
|
|
@@ -13,13 +13,9 @@ export type DataLookup = {
|
|
|
13
13
|
avatar?: string;
|
|
14
14
|
};
|
|
15
15
|
export type RegardingControlProps = ControlProps<DataLookup> & {
|
|
16
|
-
lookupKey?: string;
|
|
17
16
|
dataService: IDataService;
|
|
18
17
|
entities: string[];
|
|
19
18
|
schemaStore: ISchemaStore;
|
|
20
|
-
experienceStore: ISchemaExperienceStore;
|
|
21
|
-
viewId?: string;
|
|
22
19
|
allowNavigation?: boolean;
|
|
23
|
-
allowNewRecord?: boolean;
|
|
24
20
|
};
|
|
25
21
|
export declare function RegardingControl(props: RegardingControlProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -38,5 +38,5 @@ function TelephoneControl({ value, onChange, id, name, onBlur, onFocus, placehol
|
|
|
38
38
|
paddingRight: react_components_1.tokens.spacingHorizontalXS,
|
|
39
39
|
},
|
|
40
40
|
// size="sm"
|
|
41
|
-
contentAfter:
|
|
41
|
+
contentAfter: number?.uri ? ((0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "transparent", size: "small", onClick: () => window.open(number.uri, '_blank'), title: number.uri, icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.Phone, {}) })) : undefined }));
|
|
42
42
|
}
|
|
@@ -5,4 +5,4 @@ export interface TextAreaControlProps extends ControlProps<string> {
|
|
|
5
5
|
autoHeight?: boolean;
|
|
6
6
|
maxHeight?: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function TextAreaControl({ value, onChange, id, name, placeholder, onBlur, onFocus, disabled, readOnly, rows, textTransform, autoHeight, maxHeight, skeleton, }: TextAreaControlProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function TextAreaControl({ value, onChange, id, name, placeholder, onBlur, onFocus, disabled, readOnly, rows, textTransform, autoHeight, maxHeight, skeleton, }: Readonly<TextAreaControlProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,4 +8,4 @@ export interface TextControlProps extends ControlProps<string> {
|
|
|
8
8
|
appearance?: InputProps['appearance'];
|
|
9
9
|
maxLength?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare function TextControl({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, autoComplete, autoFocus, autoCapitalize, autoCorrect, textTransform, readOnly, appearance, maxLength, skeleton, }: TextControlProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function TextControl({ value, onChange, id, name, onBlur, onFocus, placeholder, disabled, autoComplete, autoFocus, autoCapitalize, autoCorrect, textTransform, readOnly, appearance, maxLength, skeleton, }: Readonly<TextControlProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,13 +13,17 @@ readOnly, appearance = 'filled-darker', maxLength, skeleton, }) {
|
|
|
13
13
|
if (skeleton) {
|
|
14
14
|
return (0, jsx_runtime_1.jsx)(SkeletonControl_1.SkeletonControl, {});
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const handleOnChange = (e) => {
|
|
17
|
+
let value = e.target.value;
|
|
18
|
+
if (textTransform === 'uppercase') {
|
|
19
|
+
value = value.toUpperCase();
|
|
20
|
+
}
|
|
21
|
+
else if (textTransform === 'lowercase') {
|
|
22
|
+
value = value.toLowerCase();
|
|
23
|
+
}
|
|
24
|
+
onChange?.(value);
|
|
25
|
+
};
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { placeholder: placeholder, id: id, name: name, autoFocus: autoFocus, appearance: appearance, value: value ?? '', onChange: handleOnChange, onBlur: () => onBlur?.(), onFocus: () => onFocus?.(),
|
|
23
27
|
// invalid={error}
|
|
24
28
|
// readOnly={readOnly || disabled}
|
|
25
29
|
readOnly: readonly, autoComplete: autoComplete, autoCorrect: autoCorrect, autoCapitalize: autoCapitalize, className: (0, react_components_1.mergeClasses)(readonly && 'TextControl_readonly'), style: {
|
|
@@ -9,12 +9,12 @@ function UrlControl({ value, onChange, id, name, onBlur, onFocus, placeholder, d
|
|
|
9
9
|
if (skeleton) {
|
|
10
10
|
return (0, jsx_runtime_1.jsx)(SkeletonControl_1.SkeletonControl, {});
|
|
11
11
|
}
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { type: "url", placeholder: placeholder, id: id, appearance: "filled-darker", name: name, value: value
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { type: "url", placeholder: placeholder, id: id, appearance: "filled-darker", name: name, value: value ?? '', onChange: (e) => onChange?.(e.target.value), onBlur: () => onBlur?.(), onFocus: () => onFocus?.(),
|
|
13
13
|
// invalid={error}
|
|
14
14
|
readOnly: disabled || readOnly, autoComplete: "off", style: {
|
|
15
15
|
width: '100%',
|
|
16
16
|
paddingRight: react_components_1.tokens.spacingHorizontalXS,
|
|
17
17
|
},
|
|
18
18
|
// size="sm"
|
|
19
|
-
contentAfter:
|
|
19
|
+
contentAfter: value ? ((0, jsx_runtime_1.jsx)(react_components_1.Button, { appearance: "transparent", size: "small", onClick: () => window.open(value, '_blank'), icon: (0, jsx_runtime_1.jsx)(icons_1.Icons.OpenInNew, {}) })) : undefined }));
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/fluent",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"uuid": "11.0.3",
|
|
53
53
|
"yup": "^1.4.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "f25faf823d592f7d9c0356c1ca238e9019b8e7c0"
|
|
56
56
|
}
|