@headless-adminapp/fluent 0.0.17-alpha.52 → 0.0.17-alpha.55
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/AppHeaderContianer.js +13 -11
- package/App/AppLogo.js +1 -2
- package/App/LayoutProvider.js +3 -15
- package/App/NavigationContainer.js +2 -6
- package/App/QuickActionItem.js +1 -1
- package/App/utils.d.ts +1 -1
- package/App/utils.js +3 -4
- package/CommandBar/MenuItem.js +1 -1
- package/CommandBar/MenuItems.js +1 -4
- package/CommandBar/MenuList.js +1 -1
- package/DataGrid/CustomizeColumns/AddColumns.js +33 -34
- package/DataGrid/CustomizeColumns/ColumnItem.js +5 -5
- package/DataGrid/CustomizeColumns/CustomizeColumns.js +2 -3
- package/DataGrid/FormSubgridViewSelector.js +1 -5
- package/DataGrid/GridColumnHeader/ConditionValueControl.js +19 -25
- package/DataGrid/GridColumnHeader/FilterForm.js +6 -9
- package/DataGrid/GridColumnHeader/OperatorSelect.js +1 -1
- package/DataGrid/GridColumnHeader/TableHeaderFilterCell.js +4 -4
- package/DataGrid/GridHeaderDesktop.js +1 -5
- package/DataGrid/GridHeaderMobile.js +1 -4
- package/DataGrid/GridListContainer.js +9 -7
- package/DataGrid/GridPaginationContainer.js +1 -2
- package/DataGrid/GridTableContainer.js +25 -20
- package/DataGrid/TableCell/TableCellBase.js +6 -1
- package/DataGrid/TableCell/TableCellCheckbox.js +2 -2
- package/DataGrid/TableCell/TableCellChoice.js +1 -2
- package/DataGrid/TableCell/TableCellLink.d.ts +1 -1
- package/DataGrid/TableCell/TableCellLink.js +5 -1
- package/DataGrid/useTableColumns.js +85 -41
- package/DialogContainer/AlertDialog.js +3 -6
- package/DialogContainer/ConfirmDialog.js +5 -9
- package/DialogContainer/DialogContainer.js +2 -13
- package/DialogContainer/ErrorDialog.js +3 -6
- package/DialogContainer/PromptDialog.js +22 -31
- package/Insights/CommandBarContainer.js +4 -1
- package/Insights/FilterBarContainer.js +12 -20
- package/Insights/WidgetDataGridContainer.js +11 -2
- package/Insights/WidgetTableContainer.js +2 -3
- package/Insights/WidgetTitleBar.js +1 -2
- package/Insights/charts/ComposedChart.js +1 -2
- package/Insights/charts/CustomTooltipContent.js +1 -1
- package/Insights/charts/OhlcChart.js +8 -7
- package/Insights/charts/PieChart.js +4 -8
- package/Insights/charts/RadarChart.js +2 -3
- package/Insights/charts/ScatterChart.js +4 -9
- package/Insights/charts/formatters.js +4 -6
- package/Insights/charts/renderers.js +1 -2
- package/Insights/hooks/useQueriesData.js +3 -12
- package/Insights/hooks/useWidgetDetail.js +9 -3
- package/OverflowCommandBar/OverflowMenu.js +4 -16
- package/OverflowCommandBar/render.js +3 -4
- package/OverflowCommandBar/utils.js +2 -3
- package/PageBoard/BoardColumnCard.d.ts +1 -1
- package/PageBoard/BoardColumnCard.js +3 -2
- package/PageBoard/BoardColumnUI.js +12 -17
- package/PageBoard/Header.js +3 -12
- package/PageBoard/PageBoard.d.ts +1 -1
- package/PageBoard/PageBoard.js +2 -3
- package/PageEntityForm/PageEntityFormDesktopContainer.js +8 -5
- package/PageEntityForm/RecordCard.js +8 -4
- package/PageEntityForm/RecordCardLoading.js +1 -2
- package/PageEntityForm/RecordSetNavigatorContainer.js +1 -2
- package/PageEntityForm/RelatedViewSelector.js +5 -10
- package/PageEntityForm/SectionContainer.js +7 -6
- package/PageEntityForm/StandardControl.d.ts +3 -3
- package/PageEntityForm/StandardControl.js +33 -32
- package/PageEntityForm/SubgridControl.js +2 -3
- package/ToastNotificationContainer/index.js +1 -2
- package/components/DndProvider.d.ts +12 -0
- package/components/DndProvider.js +68 -0
- package/components/LoginForm.js +5 -21
- package/form/FormControl.js +17 -28
- package/form/controls/AttachmentControl.js +13 -22
- package/form/controls/AttachmentsControl.js +8 -18
- package/form/controls/CurrencyControl.js +4 -4
- package/form/controls/DateControl.js +2 -2
- package/form/controls/DateRangeControl.js +4 -6
- package/form/controls/DateTimeControl.js +7 -7
- package/form/controls/DecimalControl.js +4 -4
- package/form/controls/DurationControl.js +3 -3
- package/form/controls/EmailControl.js +4 -4
- package/form/controls/IntegerControl.js +5 -5
- package/form/controls/LookupControl.d.ts +1 -0
- package/form/controls/LookupControl.js +50 -11
- package/form/controls/MultiSelectControl.js +3 -3
- package/form/controls/MultiSelectLookupControl.js +16 -17
- package/form/controls/PasswordControl.js +1 -1
- package/form/controls/RichTextControl.js +1 -1
- package/form/controls/SelectControl.js +4 -5
- package/form/controls/SwitchControl.js +1 -1
- package/form/controls/TelephoneControl.js +1 -1
- package/form/controls/TextAreaControl.js +4 -4
- package/form/controls/TextControl.js +4 -4
- package/form/controls/UrlControl.js +1 -1
- package/form/controls/useLookupData.js +26 -41
- package/form/layout/FormSection/FormSection.js +10 -3
- package/form/layout/FormTab/FormTab.js +2 -2
- package/package.json +4 -11
- package/utils/avatar.d.ts +2 -0
- package/utils/avatar.js +45 -0
- package/DataGrid/ScrollbarWithMoreDataRequest.d.ts +0 -9
- package/DataGrid/ScrollbarWithMoreDataRequest.js +0 -33
- package/form/controls/NumberControl.d.ts +0 -4
- package/form/controls/NumberControl.js +0 -16
- package/form/controls/utils.d.ts +0 -4
- package/form/controls/utils.js +0 -42
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ScrollbarWithMoreDataRequest = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ScrollView_1 = require("@headless-adminapp/app/components/ScrollView");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
function getReaminingSpace(div) {
|
|
8
|
-
return div.scrollHeight - div.scrollTop - div.clientHeight;
|
|
9
|
-
}
|
|
10
|
-
const ScrollbarWithMoreDataRequest = ({ data, onRequestMore, hasMore, children, rtl }) => {
|
|
11
|
-
const divRef = (0, react_1.useRef)(null);
|
|
12
|
-
const onRequestMoreRef = (0, react_1.useRef)(onRequestMore);
|
|
13
|
-
onRequestMoreRef.current = onRequestMore;
|
|
14
|
-
(0, react_1.useEffect)(() => {
|
|
15
|
-
var _a;
|
|
16
|
-
const div = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
17
|
-
if (!div) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const remainingSpace = getReaminingSpace(div);
|
|
21
|
-
if (remainingSpace <= 0 && hasMore) {
|
|
22
|
-
onRequestMoreRef.current();
|
|
23
|
-
}
|
|
24
|
-
}, [data, hasMore]);
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(ScrollView_1.ScrollView, { autoHide: true, rtl: rtl, onScroll: (e) => {
|
|
26
|
-
const div = e.target;
|
|
27
|
-
const remainingSpace = getReaminingSpace(div);
|
|
28
|
-
if (remainingSpace <= 0 && hasMore) {
|
|
29
|
-
onRequestMoreRef.current();
|
|
30
|
-
}
|
|
31
|
-
}, children: (0, jsx_runtime_1.jsx)("div", { ref: divRef, children: children }) }));
|
|
32
|
-
};
|
|
33
|
-
exports.ScrollbarWithMoreDataRequest = ScrollbarWithMoreDataRequest;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ControlProps } from './types';
|
|
2
|
-
export interface NumberControlProps extends ControlProps<number> {
|
|
3
|
-
}
|
|
4
|
-
export declare function NumberControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, borderOnFocusOnly, readOnly, }: NumberControlProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NumberControl = NumberControl;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
/* eslint-disable unused-imports/no-unused-vars */
|
|
6
|
-
const react_components_1 = require("@fluentui/react-components");
|
|
7
|
-
function NumberControl({ value, onChange, id, name, onBlur, onFocus, error, disabled, placeholder, borderOnFocusOnly, readOnly, }) {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)(react_components_1.Input, { type: "number", placeholder: placeholder, id: id, appearance: "filled-darker", name: name,
|
|
9
|
-
// value={value ?? ''}
|
|
10
|
-
onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value ? Number(e.target.value) : null), onBlur: () => onBlur === null || onBlur === void 0 ? void 0 : onBlur(), onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(),
|
|
11
|
-
// invalid={error}
|
|
12
|
-
// size="sm"
|
|
13
|
-
disabled: disabled, readOnly: readOnly, style: {
|
|
14
|
-
width: '100%',
|
|
15
|
-
} }));
|
|
16
|
-
}
|
package/form/controls/utils.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { FileObject } from '@headless-adminapp/core/attributes/AttachmentAttribute';
|
|
2
|
-
export declare function fileToObject(file: File): Promise<FileObject>;
|
|
3
|
-
export declare function dataUrlToFile(dataUrl: string, name: string): File;
|
|
4
|
-
export declare function urlToFileObject(url: string, name?: string): FileObject;
|
package/form/controls/utils.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fileToObject = fileToObject;
|
|
4
|
-
exports.dataUrlToFile = dataUrlToFile;
|
|
5
|
-
exports.urlToFileObject = urlToFileObject;
|
|
6
|
-
// TODO: Move to core
|
|
7
|
-
function fileToObject(file) {
|
|
8
|
-
return new Promise((resolve, reject) => {
|
|
9
|
-
const reader = new FileReader();
|
|
10
|
-
reader.onload = () => {
|
|
11
|
-
resolve({
|
|
12
|
-
name: file.name,
|
|
13
|
-
type: file.type,
|
|
14
|
-
size: file.size,
|
|
15
|
-
url: reader.result,
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
reader.onerror = (error) => {
|
|
19
|
-
reject(error);
|
|
20
|
-
};
|
|
21
|
-
reader.readAsDataURL(file);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function dataUrlToFile(dataUrl, name) {
|
|
25
|
-
const byteString = atob(dataUrl.split(',')[1]);
|
|
26
|
-
const mimeString = dataUrl.split(',')[0].split(':')[1].split(';')[0];
|
|
27
|
-
const ab = new ArrayBuffer(byteString.length);
|
|
28
|
-
const ia = new Uint8Array(ab);
|
|
29
|
-
for (let i = 0; i < byteString.length; i++) {
|
|
30
|
-
ia[i] = byteString.charCodeAt(i);
|
|
31
|
-
}
|
|
32
|
-
return new File([ab], name, { type: mimeString });
|
|
33
|
-
}
|
|
34
|
-
function urlToFileObject(url, name) {
|
|
35
|
-
const fileName = name || url.split('/').pop() || 'file';
|
|
36
|
-
return {
|
|
37
|
-
name: fileName,
|
|
38
|
-
size: 0,
|
|
39
|
-
type: '',
|
|
40
|
-
url,
|
|
41
|
-
};
|
|
42
|
-
}
|