awing-library 2.1.2-dev.57 → 2.1.2-dev.59
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.
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { type ModalDrawerProps } from './Drawer';
|
|
2
|
-
|
|
1
|
+
import { type ModalDrawerProps, type DrawerHandle } from './Drawer';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const DrawerWrapper: (props: ModalDrawerProps & {
|
|
4
|
+
ref?: React.Ref<DrawerHandle>;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
export { CloseAction } from './Drawer';
|
|
4
|
-
export { type ModalDrawerProps };
|
|
7
|
+
export { type ModalDrawerProps, type DrawerHandle };
|
|
5
8
|
export default DrawerWrapper;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { DrawerBaseProps } from './ClassicBaseDrawer';
|
|
2
3
|
export interface ModalDrawerProps extends Omit<DrawerBaseProps, 'open'> {
|
|
3
4
|
confirmExit?: boolean;
|
|
@@ -6,6 +7,11 @@ export interface ModalDrawerProps extends Omit<DrawerBaseProps, 'open'> {
|
|
|
6
7
|
onSubmit?: () => Promise<any> | void;
|
|
7
8
|
onClose?: () => void;
|
|
8
9
|
}
|
|
10
|
+
export interface DrawerHandle {
|
|
11
|
+
handleClose: () => void;
|
|
12
|
+
handleSubmit: () => void;
|
|
13
|
+
closeDrawer: (action?: string) => void;
|
|
14
|
+
}
|
|
9
15
|
export declare const enum CloseAction {
|
|
10
16
|
Reload = "Reload",
|
|
11
17
|
Close = "Close",
|
|
@@ -18,5 +24,7 @@ export declare const enum CloseAction {
|
|
|
18
24
|
* @param{ModalDrawerProps} props
|
|
19
25
|
* @returns
|
|
20
26
|
*/
|
|
21
|
-
export declare const Drawer: (props: ModalDrawerProps
|
|
27
|
+
export declare const Drawer: (props: ModalDrawerProps & {
|
|
28
|
+
ref?: React.Ref<DrawerHandle>;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
export default Drawer;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { EnumTypeConvert } from 'Features/types';
|
|
2
1
|
import { NotificationFilter } from './types';
|
|
3
|
-
interface NotificationFilterInput {
|
|
4
|
-
[key: string]: string | number | undefined;
|
|
5
|
-
}
|
|
6
2
|
export declare const checkValid: (currentNotificationFilterInput: NotificationFilter) => boolean;
|
|
7
|
-
|
|
3
|
+
interface GenericObject {
|
|
4
|
+
[key: string]: string | number | boolean | null | undefined | object;
|
|
5
|
+
}
|
|
6
|
+
export declare const compareObjects: <T extends GenericObject>(original: T, changed: T) => Partial<T>;
|
|
8
7
|
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -165399,9 +165399,10 @@ const Drawer = props => {
|
|
|
165399
165399
|
confirmSave,
|
|
165400
165400
|
onSubmit,
|
|
165401
165401
|
onClose,
|
|
165402
|
-
messageConfirmSave
|
|
165402
|
+
messageConfirmSave,
|
|
165403
|
+
ref
|
|
165403
165404
|
} = props,
|
|
165404
|
-
other = __rest$1(props, ["confirmExit", "confirmSave", "onSubmit", "onClose", "messageConfirmSave"]);
|
|
165405
|
+
other = __rest$1(props, ["confirmExit", "confirmSave", "onSubmit", "onClose", "messageConfirmSave", "ref"]);
|
|
165405
165406
|
const {
|
|
165406
165407
|
confirm,
|
|
165407
165408
|
snackbar
|
|
@@ -165475,6 +165476,14 @@ const Drawer = props => {
|
|
|
165475
165476
|
closeDrawer();
|
|
165476
165477
|
}
|
|
165477
165478
|
};
|
|
165479
|
+
// Expose methods to parent components via ref if ref exists
|
|
165480
|
+
if (ref && typeof ref === 'object' && 'current' in ref) {
|
|
165481
|
+
ref.current = {
|
|
165482
|
+
handleClose,
|
|
165483
|
+
handleSubmit,
|
|
165484
|
+
closeDrawer
|
|
165485
|
+
};
|
|
165486
|
+
}
|
|
165478
165487
|
return jsxRuntimeExports.jsx(DrawerBase, Object.assign({
|
|
165479
165488
|
open: open,
|
|
165480
165489
|
onSubmit: onSubmit ? handleSubmit : undefined,
|
|
@@ -182608,6 +182617,17 @@ const NotificationFilterContainer = () => {
|
|
|
182608
182617
|
const checkValid$1 = currentNotificationFilterInput => {
|
|
182609
182618
|
return Object.values(currentNotificationFilterInput).every(value => value !== undefined && "".concat(value).trim() !== '');
|
|
182610
182619
|
};
|
|
182620
|
+
const compareObjects = (original, changed) => {
|
|
182621
|
+
const differences = {};
|
|
182622
|
+
// Lặp qua các key của object original
|
|
182623
|
+
Object.keys(original).forEach(key => {
|
|
182624
|
+
// So sánh giá trị của key trong cả hai object
|
|
182625
|
+
if (original[key] !== changed[key]) {
|
|
182626
|
+
differences[key] = changed[key];
|
|
182627
|
+
}
|
|
182628
|
+
});
|
|
182629
|
+
return differences;
|
|
182630
|
+
};
|
|
182611
182631
|
|
|
182612
182632
|
const CreateOrEdit$5 = () => {
|
|
182613
182633
|
var _a;
|
|
@@ -182698,17 +182718,6 @@ const CreateOrEdit$5 = () => {
|
|
|
182698
182718
|
name: filter.name
|
|
182699
182719
|
};
|
|
182700
182720
|
};
|
|
182701
|
-
const compareObjects = (original, changed) => {
|
|
182702
|
-
const differences = {};
|
|
182703
|
-
// Lặp qua các key của object original
|
|
182704
|
-
Object.keys(original).forEach(key => {
|
|
182705
|
-
// So sánh giá trị của key trong cả hai object
|
|
182706
|
-
if (original[key] !== changed[key]) {
|
|
182707
|
-
differences[key] = changed[key];
|
|
182708
|
-
}
|
|
182709
|
-
});
|
|
182710
|
-
return differences;
|
|
182711
|
-
};
|
|
182712
182721
|
const handleSubmit = async () => {
|
|
182713
182722
|
var _a;
|
|
182714
182723
|
if (notificationFilterId) {
|
|
@@ -187175,7 +187184,7 @@ const convertWorkflow = (isCreate, workflow) => {
|
|
|
187175
187184
|
} = workflow,
|
|
187176
187185
|
rest = __rest$1(workflow, ["workflowMatrices", "workflowStates"]);
|
|
187177
187186
|
let temp = Object.assign({}, rest);
|
|
187178
|
-
temp = lodashExports.omit(temp, ['id']);
|
|
187187
|
+
temp = lodashExports.omit(temp, ['id', 'versionId']);
|
|
187179
187188
|
temp.workflowStates = reconvertWorkflowStates(isCreate, workflowStates !== null && workflowStates !== void 0 ? workflowStates : []);
|
|
187180
187189
|
return temp;
|
|
187181
187190
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1842,13 +1842,20 @@ interface ModalDrawerProps extends Omit<DrawerBaseProps, 'open'> {
|
|
|
1842
1842
|
onSubmit?: () => Promise<any> | void;
|
|
1843
1843
|
onClose?: () => void;
|
|
1844
1844
|
}
|
|
1845
|
+
interface DrawerHandle {
|
|
1846
|
+
handleClose: () => void;
|
|
1847
|
+
handleSubmit: () => void;
|
|
1848
|
+
closeDrawer: (action?: string) => void;
|
|
1849
|
+
}
|
|
1845
1850
|
declare const enum CloseAction {
|
|
1846
1851
|
Reload = "Reload",
|
|
1847
1852
|
Close = "Close",
|
|
1848
1853
|
ReloadDirectory = "ReloadDirectory"
|
|
1849
1854
|
}
|
|
1850
1855
|
|
|
1851
|
-
declare const DrawerWrapper: (props: ModalDrawerProps
|
|
1856
|
+
declare const DrawerWrapper: (props: ModalDrawerProps & {
|
|
1857
|
+
ref?: React__default.Ref<DrawerHandle>;
|
|
1858
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1852
1859
|
|
|
1853
1860
|
interface EnhancedDialogProps {
|
|
1854
1861
|
title?: string;
|
|
@@ -3412,4 +3419,4 @@ declare function ThemeProvider(props: {
|
|
|
3412
3419
|
};
|
|
3413
3420
|
}): react_jsx_runtime.JSX.Element;
|
|
3414
3421
|
|
|
3415
|
-
export { Container$4 as Action, type ActionsProps, AdvancedSearch, type AdvancedSearchField, type AdvancedSearchProps, type AnalyticDataProviderModel, AppContext, AppProvider, AsyncAutocomplete, type AsyncAutocompleteProps, type AsynchronousAutocompleteProps, AwingContext, BarLineChart, type BaseDirectoryPermission, type BaseFieldDefinition, type BaseFieldRender, type BinaryTreeNode, BoxResizableSplit, type BoxResizableSplitProps, ButtonDateRangePicker, type ButtonDateRangePickerProps, ButtonSelect, type ButtonSelectProps, type Cell, type CellDefinition, type ChartContentProps, CircularProgress, DrawerBase as ClassicBaseDrawer, DrawerWrapper as ClassicDrawer, CloseAction, type ColumnDefinition, type CombinedProps, ContentHeader, type OwnProps as ContentHeaderProps, ControlPanels, CopyButton, type CopyButtonProps, CronTab, type CronTabProps, type CronTabValue, type DataExportEntity, DataForm, type DataFormProps, DataGrid, type DataGridColumnDefinitionBase, DataGridGroup, type DataGridProps, DataGridSortType, InputFactory as DataInput, type DataSet, DateAutoFormat, type DateAutoFormatProps, Container$2 as DatePicker, type DatePickerProps, type DateRange, DateRangePicker, Container$3 as DateRangePickerOld, type DateRangePickerOldProps, type DateRangePickerProps, type DayInterval, type DayIntervalPickerProps, EnhancedDialog as DeprecatedEnhancedDialog, type Directory$2 as Directory, CreateDirectory as DirectoryForm, PermissionWarpper as DirectoryPermission, type DirectoryPermissionServices, type DirectoryProps, DirectoryRoot, DirectorySystem, DirectoryTree, type DirectoryTreeProps, DrawerWrapper$1 as Drawer, type DrawerBaseProps, DrawerNavigate, type DrawerNavigateProps, type DrawerProps, DrawerStateEnum, Container$1 as EnhancedAutoComplete, type EnhancedAutoCompleteProps, type EnhancedDialogProps, EnumFieldInputType, EnumSelectedPlaceType, FIELD_TYPE, type FieldDefinitionProps, type FileResponse, type FilterExpression, type FilterGroup, type FilterItem, FilterNotification, FilterOperationType, FilterTreeView, type FilterTreeViewProps, type FiltersType, FooterContainer as Footer, type FunctionStructure, GoogleMap, type GridSortDirection, type GridSortModel, type GroupComponentProps, type GroupFilter, GroupSystem, GroupTable, type GroupTableProps, type HeadCell, HierarchyTree, I18nProvider, type IChartJsContainer, type ICircularProgress, type IConfigChart, type IControlPanel, type DataGridGroupsProps as IDataGridGroups, type IDirectoryTreeViewProps, type IFilterField, type IGoogleMapProps, type IMenu, type IMonacoEditorProps, type IMultipleChoiceComponentProps, type IMultipleChoiceProps, type IMultipleHierarchicalChoice, type IMultipleHierarchicalChoiceInput, type IMultipleHierarchicalChoiceProps, type IMultipleSelect, INT_NUMBER_LIMIT, type IOption, type IPieContainer, type IStatisticsProps, type ITag, Container as Layout, Notifications as LayoutNotifications, type Locale, LogicExpressionInput as LogicExpression, type LogicExpressionInputProps, LogicalOperatorType, MemoWrap, type MemoWrapProps, type MenuOption, type ModalDrawerProps, MonacoEditor, MultipleChoice, type MultipleHierarChicalChoiceComponentProps, MultipleHierarchicalChoice, NoData, NotificationConfig, NotificationFilter$1 as NotificationObjectFilter, NumberFormat, type ObjectDefinition$4 as ObjectDefinition, type ObjectStructure, AsynchronousAutocomplete as OldAsyncAutoComplete, Page, PageManagement, type PageManagementProps, type PageProps, Pagination, type PermissionContainerProps, PieChart, PlaceFilter, type PlaceFilterProps, type QueryInput, type QueryInputStatistics, type Role, type RoleServices, RoleSystem, type RoleTag$3 as RoleTag, type RoleTagServices, RoleTagSystem, type Row, type RowActionDefinition, type RowId, type RowProps, type SchedulePermission, SchemaSystem, SearchBox, type SearchBoxProps, type SearchType, type SharingProps, Sharing as SharingSystem, ShowTreeItem, SimpleTreeItemWrapper, SortEnumType, Sortable, SortableTree, type SortableTreeProps, StatisticsCommon as Statistics, SubscriptionConfig, TIMELINE_TYPE, TYPE_CHART, TYPE_FILTERS, TabLabel, TableCellEditable, type TableCellEditableProps, TableEditable, TableEditableBody, type TableEditableBodyProps, type TableEditableProps, type TableGridProps, TableHeader, type TableHeaderProps, type TableLabelProps, TablePaginationActions, type TablePaginationActionsProps, Template as TemplateConfig, ThemeProvider, type Timestamp, ToolbarLayout as Toolbar, TopBarActions, type TopBarActionsProps, type TreeItem, type TreeItemOption, TreeItemWithAction, type TreeItemWithActionProps, type TreeItems, User as UserSystem, type Value, type ValueBase, WMAPEcalculator, WorkflowFeature as WorkflowSystem, WorkspaceType, Wrapper, arrayIsNotEmptyValid, calculateValue, calculatorDirectoryIdRoot, changeToAlias, checkValidMacAddress, checkValidStringListAP, checkValidUrl, colorValid, containsOnlyDigits, convertArrayFiltersToCondition, convertArrayToObject, convertDataSetPattern, convertDateTimeToTimestamp, convertFilterExpressionToCondition, convertFormulaToBinaryTree, convertTimeLine, convertTimelineToDateTime, convertTimestampToDateTime, convertToPostfix, darkTheme, dateRangeValid, dateTimeToString, dateToString, dateToStringDDMMYYYY, dateValid, download, downloadWithDataSet, emailValid, fillMissingDates, flattenTree, formatChartNumber, formatJSON, formatNumberByLocale, formatNumberWithLanguage, generateUUID, getCookie, getGUID, getPrecedence, getQueryVariable, getRandomKey, getRoutePath, getStartOfDay, getToday, handleExportExcel, i18n as i18nLib, isOperand, isOperator, lightTheme, nameExportStandard, notNullValid, numberNotNullValid, numberOnlyValid, numberPercentageNotNullValid, off, offlinePaginate, parseJSON, passwordValid, positiveNumberNotNullValid, pub, replaceFieldsValue, roundDecimalNumber, setObject, stringNotNullValid, stringNullableValid, sub, textValidation, timestampToStringDDMMYYYY, toCapitalize, tokenize, updateGUID, updateObjectFields, urlValid, useAppHelper, useAwing, useDrawer, useGetContext, useGetData, usePath, validateNumber };
|
|
3422
|
+
export { Container$4 as Action, type ActionsProps, AdvancedSearch, type AdvancedSearchField, type AdvancedSearchProps, type AnalyticDataProviderModel, AppContext, AppProvider, AsyncAutocomplete, type AsyncAutocompleteProps, type AsynchronousAutocompleteProps, AwingContext, BarLineChart, type BaseDirectoryPermission, type BaseFieldDefinition, type BaseFieldRender, type BinaryTreeNode, BoxResizableSplit, type BoxResizableSplitProps, ButtonDateRangePicker, type ButtonDateRangePickerProps, ButtonSelect, type ButtonSelectProps, type Cell, type CellDefinition, type ChartContentProps, CircularProgress, DrawerBase as ClassicBaseDrawer, DrawerWrapper as ClassicDrawer, CloseAction, type ColumnDefinition, type CombinedProps, ContentHeader, type OwnProps as ContentHeaderProps, ControlPanels, CopyButton, type CopyButtonProps, CronTab, type CronTabProps, type CronTabValue, type DataExportEntity, DataForm, type DataFormProps, DataGrid, type DataGridColumnDefinitionBase, DataGridGroup, type DataGridProps, DataGridSortType, InputFactory as DataInput, type DataSet, DateAutoFormat, type DateAutoFormatProps, Container$2 as DatePicker, type DatePickerProps, type DateRange, DateRangePicker, Container$3 as DateRangePickerOld, type DateRangePickerOldProps, type DateRangePickerProps, type DayInterval, type DayIntervalPickerProps, EnhancedDialog as DeprecatedEnhancedDialog, type Directory$2 as Directory, CreateDirectory as DirectoryForm, PermissionWarpper as DirectoryPermission, type DirectoryPermissionServices, type DirectoryProps, DirectoryRoot, DirectorySystem, DirectoryTree, type DirectoryTreeProps, DrawerWrapper$1 as Drawer, type DrawerBaseProps, type DrawerHandle, DrawerNavigate, type DrawerNavigateProps, type DrawerProps, DrawerStateEnum, Container$1 as EnhancedAutoComplete, type EnhancedAutoCompleteProps, type EnhancedDialogProps, EnumFieldInputType, EnumSelectedPlaceType, FIELD_TYPE, type FieldDefinitionProps, type FileResponse, type FilterExpression, type FilterGroup, type FilterItem, FilterNotification, FilterOperationType, FilterTreeView, type FilterTreeViewProps, type FiltersType, FooterContainer as Footer, type FunctionStructure, GoogleMap, type GridSortDirection, type GridSortModel, type GroupComponentProps, type GroupFilter, GroupSystem, GroupTable, type GroupTableProps, type HeadCell, HierarchyTree, I18nProvider, type IChartJsContainer, type ICircularProgress, type IConfigChart, type IControlPanel, type DataGridGroupsProps as IDataGridGroups, type IDirectoryTreeViewProps, type IFilterField, type IGoogleMapProps, type IMenu, type IMonacoEditorProps, type IMultipleChoiceComponentProps, type IMultipleChoiceProps, type IMultipleHierarchicalChoice, type IMultipleHierarchicalChoiceInput, type IMultipleHierarchicalChoiceProps, type IMultipleSelect, INT_NUMBER_LIMIT, type IOption, type IPieContainer, type IStatisticsProps, type ITag, Container as Layout, Notifications as LayoutNotifications, type Locale, LogicExpressionInput as LogicExpression, type LogicExpressionInputProps, LogicalOperatorType, MemoWrap, type MemoWrapProps, type MenuOption, type ModalDrawerProps, MonacoEditor, MultipleChoice, type MultipleHierarChicalChoiceComponentProps, MultipleHierarchicalChoice, NoData, NotificationConfig, NotificationFilter$1 as NotificationObjectFilter, NumberFormat, type ObjectDefinition$4 as ObjectDefinition, type ObjectStructure, AsynchronousAutocomplete as OldAsyncAutoComplete, Page, PageManagement, type PageManagementProps, type PageProps, Pagination, type PermissionContainerProps, PieChart, PlaceFilter, type PlaceFilterProps, type QueryInput, type QueryInputStatistics, type Role, type RoleServices, RoleSystem, type RoleTag$3 as RoleTag, type RoleTagServices, RoleTagSystem, type Row, type RowActionDefinition, type RowId, type RowProps, type SchedulePermission, SchemaSystem, SearchBox, type SearchBoxProps, type SearchType, type SharingProps, Sharing as SharingSystem, ShowTreeItem, SimpleTreeItemWrapper, SortEnumType, Sortable, SortableTree, type SortableTreeProps, StatisticsCommon as Statistics, SubscriptionConfig, TIMELINE_TYPE, TYPE_CHART, TYPE_FILTERS, TabLabel, TableCellEditable, type TableCellEditableProps, TableEditable, TableEditableBody, type TableEditableBodyProps, type TableEditableProps, type TableGridProps, TableHeader, type TableHeaderProps, type TableLabelProps, TablePaginationActions, type TablePaginationActionsProps, Template as TemplateConfig, ThemeProvider, type Timestamp, ToolbarLayout as Toolbar, TopBarActions, type TopBarActionsProps, type TreeItem, type TreeItemOption, TreeItemWithAction, type TreeItemWithActionProps, type TreeItems, User as UserSystem, type Value, type ValueBase, WMAPEcalculator, WorkflowFeature as WorkflowSystem, WorkspaceType, Wrapper, arrayIsNotEmptyValid, calculateValue, calculatorDirectoryIdRoot, changeToAlias, checkValidMacAddress, checkValidStringListAP, checkValidUrl, colorValid, containsOnlyDigits, convertArrayFiltersToCondition, convertArrayToObject, convertDataSetPattern, convertDateTimeToTimestamp, convertFilterExpressionToCondition, convertFormulaToBinaryTree, convertTimeLine, convertTimelineToDateTime, convertTimestampToDateTime, convertToPostfix, darkTheme, dateRangeValid, dateTimeToString, dateToString, dateToStringDDMMYYYY, dateValid, download, downloadWithDataSet, emailValid, fillMissingDates, flattenTree, formatChartNumber, formatJSON, formatNumberByLocale, formatNumberWithLanguage, generateUUID, getCookie, getGUID, getPrecedence, getQueryVariable, getRandomKey, getRoutePath, getStartOfDay, getToday, handleExportExcel, i18n as i18nLib, isOperand, isOperator, lightTheme, nameExportStandard, notNullValid, numberNotNullValid, numberOnlyValid, numberPercentageNotNullValid, off, offlinePaginate, parseJSON, passwordValid, positiveNumberNotNullValid, pub, replaceFieldsValue, roundDecimalNumber, setObject, stringNotNullValid, stringNullableValid, sub, textValidation, timestampToStringDDMMYYYY, toCapitalize, tokenize, updateGUID, updateObjectFields, urlValid, useAppHelper, useAwing, useDrawer, useGetContext, useGetData, usePath, validateNumber };
|