@headless-adminapp/app 0.0.17-alpha.8 → 1.0.0
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/AppProvider.d.ts +0 -3
- package/app/AppProvider.js +10 -33
- package/app/AuthWrapper.d.ts +1 -1
- package/app/AuthWrapper.js +4 -1
- package/app/LayoutProvider.d.ts +8 -7
- package/app/LayoutProvider.js +28 -2
- package/app/context.d.ts +1 -1
- package/auth/AuthProvider.d.ts +1 -1
- package/auth/AuthProvider.js +30 -23
- package/auth/context.d.ts +2 -0
- package/auth/hooks/useIsSkipAuthCheck.d.ts +1 -0
- package/auth/hooks/useIsSkipAuthCheck.js +8 -0
- package/auth/hooks/useLogout.js +1 -1
- package/board/BoardColumnDataResolver.d.ts +1 -0
- package/board/BoardColumnDataResolver.js +64 -0
- package/board/BoardColumnProvider.d.ts +7 -0
- package/board/BoardColumnProvider.js +36 -0
- package/board/context.d.ts +19 -0
- package/board/context.js +6 -0
- package/board/hooks/index.d.ts +6 -0
- package/board/hooks/index.js +15 -0
- package/board/hooks/useBoardColumnConfig.d.ts +2 -0
- package/board/hooks/useBoardColumnConfig.js +8 -0
- package/board/hooks/useBoardColumnData.d.ts +3 -0
- package/board/hooks/useBoardColumnData.js +9 -0
- package/board/hooks/useBoardColumnDataState.d.ts +5 -0
- package/board/hooks/useBoardColumnDataState.js +9 -0
- package/board/hooks/useBoardConfig.d.ts +3 -0
- package/board/hooks/useBoardConfig.js +8 -0
- package/board/hooks/useBoardSchema.d.ts +2 -0
- package/board/hooks/useBoardSchema.js +7 -0
- package/board/hooks/useSearchText.d.ts +1 -0
- package/board/hooks/useSearchText.js +14 -0
- package/board/types.d.ts +47 -0
- package/board/utils.d.ts +3 -0
- package/board/utils.js +6 -0
- package/builders/CommandBuilder/DefaultCommandBuilder.d.ts +15 -6
- package/builders/CommandBuilder/DefaultCommandBuilder.js +42 -20
- package/builders/CommandBuilder/FormCommandBuilder.d.ts +14 -13
- package/builders/CommandBuilder/FormCommandBuilder.js +66 -52
- package/builders/CommandBuilder/SubgridCommandBuilder.d.ts +8 -27
- package/builders/CommandBuilder/SubgridCommandBuilder.js +115 -57
- package/builders/CommandBuilder/ViewCommandBuilder.js +32 -52
- package/builders/CommandBuilder/utils.js +1 -1
- package/builders/DefineFormExperience.d.ts +27 -0
- package/builders/DefineFormExperience.js +99 -0
- package/builders/DefineViewExperience.d.ts +13 -0
- package/builders/DefineViewExperience.js +33 -0
- package/builders/SchemaExperienceBuilder.d.ts +9 -7
- package/builders/SchemaExperienceBuilder.js +62 -40
- package/builders/utils.js +30 -44
- package/calendar/baseEventAttributes.d.ts +35 -0
- package/calendar/baseEventAttributes.js +38 -0
- package/calendar/context.d.ts +6 -0
- package/calendar/context.js +5 -0
- package/calendar/hooks/index.d.ts +1 -0
- package/{appearance → calendar}/hooks/index.js +1 -1
- package/calendar/hooks/useConfig.d.ts +3 -0
- package/calendar/hooks/useConfig.js +8 -0
- package/calendar/types.d.ts +41 -0
- package/calendar/types.js +2 -0
- package/calendar/utils.d.ts +3 -0
- package/calendar/utils.js +6 -0
- package/command/hooks/useBaseCommandHandlerContext.js +15 -6
- package/command/hooks/useCommands.js +1 -1
- package/command/utils/index.js +34 -9
- package/components/ScrollView/index.d.ts +1 -1
- package/components/ScrollView/index.js +2 -2
- package/components/ScrollbarWithMoreDataRequest/index.d.ts +9 -0
- package/components/ScrollbarWithMoreDataRequest/index.js +32 -0
- package/dataform/DataFormProvider/CustomHookExecuter.d.ts +5 -0
- package/dataform/DataFormProvider/CustomHookExecuter.js +14 -0
- package/dataform/DataFormProvider/DataResolver.d.ts +6 -4
- package/dataform/DataFormProvider/DataResolver.js +11 -94
- package/dataform/DataFormProvider/InitialValueResolver.js +3 -2
- package/dataform/DataFormProvider/ReadonlyInfoResolver.js +2 -3
- package/dataform/DataFormProvider/getRecord.d.ts +3 -0
- package/dataform/DataFormProvider/getRecord.js +56 -0
- package/dataform/DataFormProvider/index.d.ts +4 -0
- package/dataform/DataFormProvider/index.js +34 -12
- package/dataform/DataFormProvider/types.d.ts +13 -0
- package/dataform/DataFormProvider/types.js +2 -0
- package/dataform/DataFormProvider/utils.d.ts +23 -0
- package/dataform/DataFormProvider/utils.js +105 -0
- package/dataform/FormManager.d.ts +57 -0
- package/dataform/FormManager.js +247 -0
- package/dataform/constants.d.ts +1 -0
- package/dataform/constants.js +4 -0
- package/dataform/context.d.ts +26 -1
- package/dataform/hooks/index.d.ts +11 -0
- package/dataform/hooks/index.js +11 -0
- package/dataform/hooks/useContextKey.d.ts +1 -0
- package/dataform/hooks/useContextKey.js +8 -0
- package/dataform/hooks/useDisabledControlsManager.d.ts +6 -0
- package/dataform/hooks/useDisabledControlsManager.js +46 -0
- package/dataform/hooks/useEventManager.d.ts +1 -0
- package/dataform/hooks/useEventManager.js +8 -0
- package/dataform/hooks/useFormManager.d.ts +2 -0
- package/dataform/hooks/useFormManager.js +13 -0
- package/dataform/hooks/useFormNotifications.js +2 -2
- package/dataform/hooks/useFormSave.js +28 -31
- package/dataform/hooks/useHiddenControlsManager.d.ts +7 -0
- package/dataform/hooks/useHiddenControlsManager.js +50 -0
- package/dataform/hooks/useIsControlDisabled.d.ts +1 -0
- package/dataform/hooks/useIsControlDisabled.js +27 -0
- package/dataform/hooks/useIsControlHiddenByAttributeName.d.ts +1 -0
- package/dataform/hooks/useIsControlHiddenByAttributeName.js +17 -0
- package/dataform/hooks/useIsControlHiddenByKey.d.ts +1 -0
- package/dataform/hooks/useIsControlHiddenByKey.js +17 -0
- package/dataform/hooks/useIsFieldRequired.d.ts +1 -0
- package/dataform/hooks/useIsFieldRequired.js +25 -0
- package/dataform/hooks/useLoadFormGridPage.js +8 -17
- package/dataform/hooks/useMainFormCommands.d.ts +1 -12
- package/dataform/hooks/useMainFormCommands.js +13 -3
- package/dataform/hooks/useOnFieldValueChangeListener.d.ts +1 -0
- package/dataform/hooks/useOnFieldValueChangeListener.js +30 -0
- package/dataform/hooks/useProcessFlowSteps.d.ts +1 -0
- package/dataform/hooks/useProcessFlowSteps.js +45 -0
- package/dataform/hooks/useRecordTitle.d.ts +3 -1
- package/dataform/hooks/useRecordTitle.js +12 -5
- package/dataform/hooks/useRequiredFieldManager.d.ts +6 -0
- package/dataform/hooks/useRequiredFieldManager.js +49 -0
- package/dataform/test.d.ts +57 -0
- package/dataform/test.js +247 -0
- package/dataform/utils/defaultParameters.d.ts +6 -0
- package/dataform/utils/defaultParameters.js +54 -0
- package/dataform/utils/index.d.ts +6 -24
- package/dataform/utils/index.js +164 -190
- package/dataform/utils/saveRecord.d.ts +27 -0
- package/dataform/utils/saveRecord.js +163 -0
- package/datagrid/DataGridProvider/DataResolver.js +38 -109
- package/datagrid/DataGridProvider/index.d.ts +6 -0
- package/datagrid/DataGridProvider/index.js +18 -8
- package/datagrid/DataGridProvider/transformViewColumns.js +10 -2
- package/datagrid/DataGridProvider/utils.js +8 -8
- package/datagrid/column-filter/constants.js +38 -3
- package/datagrid/column-filter/utils.js +7 -1
- package/datagrid/context.d.ts +6 -0
- package/datagrid/hooks/useChangeView.js +1 -1
- package/datagrid/hooks/useGridColumnFilter.js +4 -1
- package/datagrid/hooks/useGridDisabled.d.ts +1 -0
- package/datagrid/hooks/useGridDisabled.js +8 -0
- package/datagrid/hooks/useLoadMainGridPage.js +1 -1
- package/datagrid/hooks/useMainGridCommands.js +23 -9
- package/datagrid/hooks/useOpenRecord.js +2 -2
- package/datagrid/hooks/useSubGridCommands.js +23 -45
- package/defaults.d.ts +2 -0
- package/defaults.js +5 -0
- package/dialog/hooks/useCloseDialog.js +17 -15
- package/dialog/hooks/useOpenAlertDialog.js +8 -3
- package/dialog/hooks/useOpenConfirmDialog.js +10 -4
- package/dialog/hooks/useOpenDialog.js +7 -5
- package/dialog/hooks/useOpenErrorDialog.js +8 -3
- package/dialog/hooks/useOpenPromptDialog.js +10 -4
- package/form/FormValidationStringContext.d.ts +1 -0
- package/form/FormValidationStringContext.js +1 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +3 -0
- package/hooks/useDebouncedValue.js +0 -1
- package/hooks/useElementLayout.js +1 -1
- package/hooks/useIsMobile.js +0 -1
- package/hooks/useItemsWithKey.d.ts +7 -0
- package/hooks/useItemsWithKey.js +13 -0
- package/hooks/useStorageState.js +1 -2
- package/hooks/useSystemColorScheme.d.ts +1 -1
- package/hooks/useSystemColorScheme.js +0 -1
- package/insights/InsightsProvider.d.ts +8 -0
- package/insights/InsightsProvider.js +27 -0
- package/locale/LocaleProvider.d.ts +2 -1
- package/locale/LocaleProvider.js +3 -3
- package/locale/index.d.ts +1 -0
- package/locale/index.js +1 -0
- package/locale/useCurrencySymbol.d.ts +1 -0
- package/locale/useCurrencySymbol.js +12 -0
- package/locale/utils.js +4 -2
- package/metadata/MetadataProvider.d.ts +8 -4
- package/metadata/MetadataProvider.js +23 -17
- package/metadata/context.d.ts +3 -2
- package/metadata/hooks/index.d.ts +1 -1
- package/metadata/hooks/index.js +1 -1
- package/metadata/hooks/useAppExperience.d.ts +1 -0
- package/metadata/hooks/useAppExperience.js +8 -0
- package/metadata/hooks/useAppStore.d.ts +1 -1
- package/metadata/hooks/useAppStore.js +3 -3
- package/metadata/hooks/useExperienceView.js +2 -11
- package/metadata/hooks/useExperienceViewCommands.d.ts +1 -1
- package/metadata/hooks/useExperienceViewCommands.js +5 -14
- package/metadata/hooks/useExperienceViewLookup.js +2 -11
- package/metadata/hooks/useExperienceViewSubgridCommands.d.ts +1 -1
- package/metadata/hooks/useExperienceViewSubgridCommands.js +5 -14
- package/metadata/hooks/useMetadata.d.ts +11 -10
- package/metadata/hooks/useMetadata.js +4 -16
- package/metadata/hooks/useSchema.d.ts +1 -1
- package/metadata/hooks/useSchema.js +3 -0
- package/mutable/context.d.ts +3 -0
- package/mutable/context.js +8 -0
- package/mutable/utils.js +5 -12
- package/navigation/hooks/useOpenForm.js +4 -0
- package/package.json +6 -10
- package/providers/PageEntityFormProvider/index.d.ts +5 -1
- package/providers/PageEntityFormProvider/index.js +2 -2
- package/recordset/hooks/useRecordSetResult.js +4 -14
- package/route/RouteProvider.d.ts +2 -2
- package/route/RouteProvider.js +4 -1
- package/store/ClientAppStore.js +7 -20
- package/store/ComponentStore.d.ts +1 -1
- package/store/ComponentStore.js +6 -12
- package/store/EventManager.d.ts +2 -2
- package/store/EventManager.js +13 -29
- package/store/SchemaExperienceStore.js +179 -215
- package/store/index.d.ts +0 -1
- package/store/index.js +0 -1
- package/toast-notification/hooks/useCloseToastNotification.js +17 -15
- package/toast-notification/hooks/useOpenToastNotification.js +7 -5
- package/transport/InMemoryDataService/index.js +54 -77
- package/transport/RestDataService/index.d.ts +3 -3
- package/transport/RestDataService/index.js +68 -91
- package/transport/context.d.ts +2 -1
- package/transport/context.js +7 -1
- package/transport/hooks/index.d.ts +1 -0
- package/transport/hooks/index.js +1 -0
- package/transport/hooks/useFileService.d.ts +1 -0
- package/transport/hooks/useFileService.js +9 -0
- package/transport/hooks/useRetriveRecords.d.ts +33 -0
- package/transport/hooks/useRetriveRecords.js +110 -0
- package/utils/calculateColumnWidths.js +1 -1
- package/utils/color.d.ts +1 -0
- package/utils/color.js +14 -0
- package/utils/getAttributeFormattedValue.d.ts +4 -1
- package/utils/getAttributeFormattedValue.js +109 -54
- package/utils/phone.d.ts +13 -0
- package/utils/phone.js +33 -0
- package/appearance/context.d.ts +0 -7
- package/appearance/context.js +0 -5
- package/appearance/hooks/index.d.ts +0 -1
- package/appearance/hooks/useAppearanceContext.d.ts +0 -1
- package/appearance/hooks/useAppearanceContext.js +0 -12
- package/appearance/index.d.ts +0 -2
- package/appearance/index.js +0 -20
- package/builders/CommandBuilder.d.ts +0 -176
- package/builders/CommandBuilder.js +0 -567
- package/locale/types.d.ts +0 -2
- /package/{locale → board}/types.js +0 -0
package/board/types.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CommandContextBase } from '@headless-adminapp/core/experience/command';
|
|
2
|
+
import { SortingState, View } from '@headless-adminapp/core/experience/view';
|
|
3
|
+
import { Schema, SchemaAttributes } from '@headless-adminapp/core/schema';
|
|
4
|
+
import { Filter } from '@headless-adminapp/core/transport';
|
|
5
|
+
import { FC } from 'react';
|
|
6
|
+
import { UtilityContextState } from '../command';
|
|
7
|
+
export interface ItemUpdateContext extends CommandContextBase {
|
|
8
|
+
primaryControl: {
|
|
9
|
+
logicalName: string;
|
|
10
|
+
id: string;
|
|
11
|
+
schema: Schema;
|
|
12
|
+
};
|
|
13
|
+
utility: UtilityContextState;
|
|
14
|
+
}
|
|
15
|
+
export interface Column {
|
|
16
|
+
view: View<SchemaAttributes>;
|
|
17
|
+
accept: string[];
|
|
18
|
+
update?: (context: ItemUpdateContext) => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export type BoardColumnCardPreviewFC = FC<{
|
|
21
|
+
record: any;
|
|
22
|
+
}>;
|
|
23
|
+
export interface DragItem {
|
|
24
|
+
id: string;
|
|
25
|
+
columnId: string;
|
|
26
|
+
record: any;
|
|
27
|
+
}
|
|
28
|
+
export interface BoardColumnConfig {
|
|
29
|
+
columnId: string;
|
|
30
|
+
title: string;
|
|
31
|
+
maxRecords?: number;
|
|
32
|
+
filter: Filter;
|
|
33
|
+
acceptSourceIds: string[];
|
|
34
|
+
updateFn: (context: ItemUpdateContext) => Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
export interface BoardConfig<S extends SchemaAttributes = SchemaAttributes> {
|
|
37
|
+
title: string;
|
|
38
|
+
description: string;
|
|
39
|
+
schema: Schema<S>;
|
|
40
|
+
sorting: SortingState<S>;
|
|
41
|
+
projection: {
|
|
42
|
+
columns: Array<keyof S>;
|
|
43
|
+
expand?: Partial<Record<keyof S, string[]>>;
|
|
44
|
+
};
|
|
45
|
+
columnConfigs: BoardColumnConfig[];
|
|
46
|
+
PreviewComponent: BoardColumnCardPreviewFC;
|
|
47
|
+
}
|
package/board/utils.d.ts
ADDED
package/board/utils.js
ADDED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { EntityMainFormCommandItemExperience } from '@headless-adminapp/core/experience/form';
|
|
2
|
+
import { EntityMainGridCommandItemExperience, SubGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
|
|
1
3
|
import { Localized } from '@headless-adminapp/core/types';
|
|
2
4
|
import { Icon } from '@headless-adminapp/icons';
|
|
5
|
+
import { FormCommandBuilder } from './FormCommandBuilder';
|
|
3
6
|
import { ViewCommandBuilder } from './ViewCommandBuilder';
|
|
4
7
|
export declare namespace DefaultCommandBuilder {
|
|
5
8
|
interface CreateDefaultViewCommandStrings {
|
|
@@ -26,35 +29,41 @@ export declare namespace DefaultCommandBuilder {
|
|
|
26
29
|
strings?: CreateDefaultViewCommandStrings;
|
|
27
30
|
localizedSrings?: Localized<CreateDefaultViewCommandStrings>;
|
|
28
31
|
}
|
|
29
|
-
export function createDefaultViewCommands({ icons, strings, localizedSrings, }: CreateDefaultViewCommandOptions):
|
|
32
|
+
export function createDefaultViewCommands({ icons, strings, localizedSrings, }: CreateDefaultViewCommandOptions): EntityMainGridCommandItemExperience[][];
|
|
30
33
|
interface CreateDefaultFormCommandStrings {
|
|
31
34
|
save: string;
|
|
32
35
|
saveAndClose: string;
|
|
33
36
|
refresh: string;
|
|
37
|
+
delete: string;
|
|
38
|
+
deleteRecordCommandStringSet: FormCommandBuilder.DeleteRecordCommandStringSet;
|
|
34
39
|
}
|
|
35
40
|
interface CreateDefaultFormCommandOptions {
|
|
36
41
|
icons: {
|
|
37
42
|
Save: Icon;
|
|
38
43
|
SaveAndClose: Icon;
|
|
39
44
|
Refresh: Icon;
|
|
45
|
+
Delete: Icon;
|
|
40
46
|
};
|
|
41
47
|
strings?: CreateDefaultFormCommandStrings;
|
|
42
48
|
localizedSrings?: Localized<CreateDefaultFormCommandStrings>;
|
|
43
49
|
}
|
|
44
50
|
export const defaultFormCommandStrings: CreateDefaultFormCommandStrings;
|
|
45
|
-
export function createDefaultFormCommands({ icons, strings, localizedSrings, }: CreateDefaultFormCommandOptions):
|
|
51
|
+
export function createDefaultFormCommands({ icons, strings, localizedSrings, }: CreateDefaultFormCommandOptions): EntityMainFormCommandItemExperience[][];
|
|
46
52
|
interface CreateDefaultSubgridCommandStrings {
|
|
47
53
|
new: string;
|
|
48
54
|
edit: string;
|
|
55
|
+
delete: string;
|
|
49
56
|
refresh: string;
|
|
50
57
|
export: string;
|
|
51
58
|
exportCsv: string;
|
|
52
59
|
exportExcel: string;
|
|
60
|
+
deleteRecordCommandStringSet: ViewCommandBuilder.DeleteRecordCommandStringSet;
|
|
53
61
|
}
|
|
54
62
|
interface CreateDefaultSubgridCommandOptions {
|
|
55
63
|
icons: {
|
|
56
64
|
New: Icon;
|
|
57
65
|
Edit: Icon;
|
|
66
|
+
Delete: Icon;
|
|
58
67
|
Refresh: Icon;
|
|
59
68
|
Export: Icon;
|
|
60
69
|
ExportCsv: Icon;
|
|
@@ -63,7 +72,7 @@ export declare namespace DefaultCommandBuilder {
|
|
|
63
72
|
strings?: CreateDefaultSubgridCommandStrings;
|
|
64
73
|
localizedSrings?: Localized<CreateDefaultSubgridCommandStrings>;
|
|
65
74
|
}
|
|
66
|
-
export function createDefaultSubgridCommands({ icons, strings, localizedSrings, }: CreateDefaultSubgridCommandOptions):
|
|
75
|
+
export function createDefaultSubgridCommands({ icons, strings, localizedSrings, }: CreateDefaultSubgridCommandOptions): SubGridCommandItemExperience[][];
|
|
67
76
|
type CreateDefaultCommandStrings = CreateDefaultViewCommandStrings & CreateDefaultFormCommandStrings & CreateDefaultSubgridCommandStrings;
|
|
68
77
|
interface CreateDefaultCommandOptions {
|
|
69
78
|
icons: CreateDefaultViewCommandOptions['icons'] & CreateDefaultFormCommandOptions['icons'] & CreateDefaultSubgridCommandOptions['icons'];
|
|
@@ -71,9 +80,9 @@ export declare namespace DefaultCommandBuilder {
|
|
|
71
80
|
localizedSrings?: Localized<CreateDefaultCommandStrings>;
|
|
72
81
|
}
|
|
73
82
|
export function createDefaultCommands({ icons, strings, localizedSrings, }: CreateDefaultCommandOptions): {
|
|
74
|
-
view:
|
|
75
|
-
form:
|
|
76
|
-
subgrid:
|
|
83
|
+
view: EntityMainGridCommandItemExperience[][];
|
|
84
|
+
form: EntityMainFormCommandItemExperience[][];
|
|
85
|
+
subgrid: SubGridCommandItemExperience[][];
|
|
77
86
|
};
|
|
78
87
|
export {};
|
|
79
88
|
}
|
|
@@ -31,24 +31,24 @@ var DefaultCommandBuilder;
|
|
|
31
31
|
ViewCommandBuilder_1.ViewCommandBuilder.createNewRecordCommand({
|
|
32
32
|
Icon: icons.New,
|
|
33
33
|
text: strings.new,
|
|
34
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.new),
|
|
34
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.new),
|
|
35
35
|
}),
|
|
36
36
|
ViewCommandBuilder_1.ViewCommandBuilder.createEditRecordCommand({
|
|
37
37
|
Icon: icons.Edit,
|
|
38
38
|
text: strings.edit,
|
|
39
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.edit),
|
|
39
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.edit),
|
|
40
40
|
}),
|
|
41
41
|
ViewCommandBuilder_1.ViewCommandBuilder.createDeleteRecordCommand({
|
|
42
42
|
Icon: icons.Delete,
|
|
43
43
|
text: strings.delete,
|
|
44
|
-
localizedText: extractLocalizedStrings(localizedSrings, x => x.delete),
|
|
44
|
+
localizedText: extractLocalizedStrings(localizedSrings, (x) => x.delete),
|
|
45
45
|
stringSet: strings.deleteRecordCommandStringSet,
|
|
46
|
-
localizedStringSet: extractLocalizedStrings(localizedSrings, x => x.deleteRecordCommandStringSet),
|
|
46
|
+
localizedStringSet: extractLocalizedStrings(localizedSrings, (x) => x.deleteRecordCommandStringSet),
|
|
47
47
|
}),
|
|
48
48
|
ViewCommandBuilder_1.ViewCommandBuilder.createRefreshCommand({
|
|
49
49
|
Icon: icons.Refresh,
|
|
50
50
|
text: strings.refresh,
|
|
51
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.refresh),
|
|
51
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.refresh),
|
|
52
52
|
}),
|
|
53
53
|
],
|
|
54
54
|
[
|
|
@@ -56,17 +56,17 @@ var DefaultCommandBuilder;
|
|
|
56
56
|
button: {
|
|
57
57
|
Icon: icons.Export,
|
|
58
58
|
text: strings.export,
|
|
59
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.export),
|
|
59
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.export),
|
|
60
60
|
},
|
|
61
61
|
csv: {
|
|
62
62
|
Icon: icons.ExportCsv,
|
|
63
63
|
text: strings.exportCsv,
|
|
64
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.exportCsv),
|
|
64
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.exportCsv),
|
|
65
65
|
},
|
|
66
66
|
excel: {
|
|
67
67
|
Icon: icons.ExportExcel,
|
|
68
|
-
text: strings.
|
|
69
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.exportExcel),
|
|
68
|
+
text: strings.exportExcel,
|
|
69
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.exportExcel),
|
|
70
70
|
},
|
|
71
71
|
}),
|
|
72
72
|
],
|
|
@@ -77,6 +77,8 @@ var DefaultCommandBuilder;
|
|
|
77
77
|
save: 'Save',
|
|
78
78
|
saveAndClose: 'Save & Close',
|
|
79
79
|
refresh: 'Refresh',
|
|
80
|
+
delete: 'Delete',
|
|
81
|
+
deleteRecordCommandStringSet: FormCommandBuilder_1.FormCommandBuilder.defaultDeleteRecordStringSet,
|
|
80
82
|
};
|
|
81
83
|
function createDefaultFormCommands({ icons, strings = DefaultCommandBuilder.defaultFormCommandStrings, localizedSrings, }) {
|
|
82
84
|
return [
|
|
@@ -84,17 +86,24 @@ var DefaultCommandBuilder;
|
|
|
84
86
|
FormCommandBuilder_1.FormCommandBuilder.createSaveCommand({
|
|
85
87
|
Icon: icons.Save,
|
|
86
88
|
text: strings.save,
|
|
87
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.save),
|
|
89
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.save),
|
|
88
90
|
}),
|
|
89
91
|
FormCommandBuilder_1.FormCommandBuilder.createSaveAndCloseCommand({
|
|
90
92
|
Icon: icons.SaveAndClose,
|
|
91
93
|
text: strings.saveAndClose,
|
|
92
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.saveAndClose),
|
|
94
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.saveAndClose),
|
|
93
95
|
}),
|
|
94
96
|
FormCommandBuilder_1.FormCommandBuilder.createRefreshCommand({
|
|
95
97
|
Icon: icons.Refresh,
|
|
96
98
|
text: strings.refresh,
|
|
97
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.refresh),
|
|
99
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.refresh),
|
|
100
|
+
}),
|
|
101
|
+
FormCommandBuilder_1.FormCommandBuilder.createDeleteCommand({
|
|
102
|
+
Icon: icons.Delete,
|
|
103
|
+
text: 'Delete',
|
|
104
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.delete),
|
|
105
|
+
stringSet: strings.deleteRecordCommandStringSet,
|
|
106
|
+
localizedStringSet: extractLocalizedStrings(localizedSrings, (x) => x.deleteRecordCommandStringSet),
|
|
98
107
|
}),
|
|
99
108
|
],
|
|
100
109
|
];
|
|
@@ -103,10 +112,12 @@ var DefaultCommandBuilder;
|
|
|
103
112
|
const defaultSubgridCommandStrings = {
|
|
104
113
|
new: 'New',
|
|
105
114
|
edit: 'Edit',
|
|
115
|
+
delete: 'Delete',
|
|
106
116
|
refresh: 'Refresh',
|
|
107
117
|
export: 'Export',
|
|
108
118
|
exportCsv: 'CSV',
|
|
109
119
|
exportExcel: 'Excel',
|
|
120
|
+
deleteRecordCommandStringSet: ViewCommandBuilder_1.ViewCommandBuilder.defaultDeleteRecordStringSet,
|
|
110
121
|
};
|
|
111
122
|
function createDefaultSubgridCommands({ icons, strings = defaultSubgridCommandStrings, localizedSrings, }) {
|
|
112
123
|
return [
|
|
@@ -114,42 +125,53 @@ var DefaultCommandBuilder;
|
|
|
114
125
|
SubgridCommandBuilder_1.SubgridCommandBuilder.createNewRecordCommand({
|
|
115
126
|
Icon: icons.New,
|
|
116
127
|
text: strings.new,
|
|
117
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.new),
|
|
128
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.new),
|
|
118
129
|
}),
|
|
119
130
|
SubgridCommandBuilder_1.SubgridCommandBuilder.createEditRecordCommand({
|
|
120
131
|
Icon: icons.Edit,
|
|
121
132
|
text: strings.edit,
|
|
122
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.edit),
|
|
133
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.edit),
|
|
134
|
+
}),
|
|
135
|
+
SubgridCommandBuilder_1.SubgridCommandBuilder.createDeleteRecordCommand({
|
|
136
|
+
Icon: icons.Delete,
|
|
137
|
+
text: strings.delete,
|
|
138
|
+
localizedText: extractLocalizedStrings(localizedSrings, (x) => x.delete),
|
|
139
|
+
stringSet: strings.deleteRecordCommandStringSet,
|
|
140
|
+
localizedStringSet: extractLocalizedStrings(localizedSrings, (x) => x.deleteRecordCommandStringSet),
|
|
123
141
|
}),
|
|
124
142
|
SubgridCommandBuilder_1.SubgridCommandBuilder.createRefreshCommand({
|
|
125
143
|
Icon: icons.Refresh,
|
|
126
144
|
text: strings.refresh,
|
|
127
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.refresh),
|
|
145
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.refresh),
|
|
128
146
|
}),
|
|
129
147
|
],
|
|
130
148
|
[
|
|
131
|
-
|
|
149
|
+
SubgridCommandBuilder_1.SubgridCommandBuilder.createExportCommand({
|
|
132
150
|
button: {
|
|
133
151
|
Icon: icons.Export,
|
|
134
152
|
text: strings.export,
|
|
135
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.export),
|
|
153
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.export),
|
|
136
154
|
},
|
|
137
155
|
csv: {
|
|
138
156
|
Icon: icons.ExportCsv,
|
|
139
157
|
text: strings.exportCsv,
|
|
140
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.exportCsv),
|
|
158
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.exportCsv),
|
|
141
159
|
},
|
|
142
160
|
excel: {
|
|
143
161
|
Icon: icons.ExportExcel,
|
|
144
162
|
text: strings.exportExcel,
|
|
145
|
-
localizedTexts: extractLocalizedStrings(localizedSrings, x => x.exportExcel),
|
|
163
|
+
localizedTexts: extractLocalizedStrings(localizedSrings, (x) => x.exportExcel),
|
|
146
164
|
},
|
|
147
165
|
}),
|
|
148
166
|
],
|
|
149
167
|
];
|
|
150
168
|
}
|
|
151
169
|
DefaultCommandBuilder.createDefaultSubgridCommands = createDefaultSubgridCommands;
|
|
152
|
-
const defaultCreateCommandStrings =
|
|
170
|
+
const defaultCreateCommandStrings = {
|
|
171
|
+
...DefaultCommandBuilder.defaultViewCommandStrings,
|
|
172
|
+
...DefaultCommandBuilder.defaultFormCommandStrings,
|
|
173
|
+
...defaultSubgridCommandStrings,
|
|
174
|
+
};
|
|
153
175
|
function createDefaultCommands({ icons, strings = defaultCreateCommandStrings, localizedSrings, }) {
|
|
154
176
|
return {
|
|
155
177
|
view: createDefaultViewCommands({
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityMainFormCommandItemExperience } from '@headless-adminapp/core/experience/form';
|
|
2
|
+
import { Localized } from '@headless-adminapp/core/types';
|
|
2
3
|
import { Icon } from '@headless-adminapp/icons';
|
|
3
4
|
export declare namespace FormCommandBuilder {
|
|
4
|
-
|
|
5
|
+
function createSaveCommand({ Icon, text, localizedTexts, }: {
|
|
5
6
|
Icon: Icon;
|
|
6
7
|
text: string;
|
|
7
8
|
localizedTexts?: Record<string, string>;
|
|
8
9
|
}): EntityMainFormCommandItemExperience;
|
|
9
|
-
|
|
10
|
+
function createSaveAndCloseCommand({ Icon, text, localizedTexts, }: {
|
|
10
11
|
Icon: Icon;
|
|
11
12
|
text: string;
|
|
12
13
|
localizedTexts?: Record<string, string>;
|
|
13
14
|
}): EntityMainFormCommandItemExperience;
|
|
14
15
|
interface DeleteRecordCommandStringSet {
|
|
15
16
|
confirmation: {
|
|
16
|
-
title: string;
|
|
17
|
-
text: string;
|
|
17
|
+
title: string | [string, string];
|
|
18
|
+
text: string | [string, string];
|
|
18
19
|
buttonCancel: string;
|
|
19
20
|
buttonConfirm: string;
|
|
20
21
|
};
|
|
21
22
|
status: {
|
|
22
|
-
deleting: string;
|
|
23
|
+
deleting: string | [string, string];
|
|
23
24
|
};
|
|
24
25
|
successNotification: {
|
|
25
|
-
title: string;
|
|
26
|
-
text: string;
|
|
26
|
+
title: string | [string, string];
|
|
27
|
+
text: string | [string, string];
|
|
27
28
|
};
|
|
28
29
|
errorNotification: {
|
|
29
30
|
title: string;
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const defaultDeleteRecordStringSet: DeleteRecordCommandStringSet;
|
|
34
|
+
function createDeleteCommand({ Icon, text, localizedTexts, stringSet, localizedStringSet, }: {
|
|
34
35
|
Icon: Icon;
|
|
35
36
|
text: string;
|
|
36
37
|
localizedTexts?: Record<string, string>;
|
|
37
|
-
stringSet: DeleteRecordCommandStringSet
|
|
38
|
+
stringSet: DeleteRecordCommandStringSet;
|
|
39
|
+
localizedStringSet?: Localized<DeleteRecordCommandStringSet>;
|
|
38
40
|
}): EntityMainFormCommandItemExperience;
|
|
39
|
-
|
|
41
|
+
function createRefreshCommand({ Icon, text, localizedTexts, }: {
|
|
40
42
|
Icon: Icon;
|
|
41
43
|
text: string;
|
|
42
44
|
localizedTexts?: Record<string, string>;
|
|
43
45
|
}): EntityMainFormCommandItemExperience;
|
|
44
|
-
export {};
|
|
45
46
|
}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.FormCommandBuilder = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
var EnabledRules;
|
|
6
|
+
(function (EnabledRules) {
|
|
7
|
+
function HasCreatePermisssion(context) {
|
|
8
|
+
return !context.primaryControl.schema.restrictions?.disableCreate;
|
|
9
|
+
}
|
|
10
|
+
EnabledRules.HasCreatePermisssion = HasCreatePermisssion;
|
|
11
|
+
function HasUpdatePermission(context) {
|
|
12
|
+
return !context.primaryControl.schema.restrictions?.disableUpdate;
|
|
13
|
+
}
|
|
14
|
+
EnabledRules.HasUpdatePermission = HasUpdatePermission;
|
|
15
|
+
function HasDeletePermission(context) {
|
|
16
|
+
return !context.primaryControl.schema.restrictions?.disableDelete;
|
|
17
|
+
}
|
|
18
|
+
EnabledRules.HasDeletePermission = HasDeletePermission;
|
|
19
|
+
})(EnabledRules || (EnabledRules = {}));
|
|
13
20
|
var FormCommandBuilder;
|
|
14
21
|
(function (FormCommandBuilder) {
|
|
15
22
|
function createSaveCommand({ Icon, text, localizedTexts, }) {
|
|
@@ -19,15 +26,22 @@ var FormCommandBuilder;
|
|
|
19
26
|
text,
|
|
20
27
|
localizedText: localizedTexts,
|
|
21
28
|
isQuickAction: true,
|
|
22
|
-
onClick: (context) =>
|
|
23
|
-
|
|
24
|
-
}),
|
|
25
|
-
hidden: (context) => {
|
|
26
|
-
if (context.primaryControl.readonly) {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
return false;
|
|
29
|
+
onClick: async (context) => {
|
|
30
|
+
await context.primaryControl.save('save');
|
|
30
31
|
},
|
|
32
|
+
hidden: [
|
|
33
|
+
(context) => {
|
|
34
|
+
if (context.primaryControl.readonly) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
if (context.primaryControl.recordId) {
|
|
38
|
+
return !EnabledRules.HasUpdatePermission(context);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return !EnabledRules.HasCreatePermisssion(context);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
],
|
|
31
45
|
};
|
|
32
46
|
}
|
|
33
47
|
FormCommandBuilder.createSaveCommand = createSaveCommand;
|
|
@@ -37,15 +51,22 @@ var FormCommandBuilder;
|
|
|
37
51
|
Icon,
|
|
38
52
|
text,
|
|
39
53
|
localizedText: localizedTexts,
|
|
40
|
-
onClick: (context) =>
|
|
41
|
-
|
|
42
|
-
}),
|
|
43
|
-
hidden: (context) => {
|
|
44
|
-
if (context.primaryControl.readonly) {
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
return false;
|
|
54
|
+
onClick: async (context) => {
|
|
55
|
+
await context.primaryControl.save('saveandclose');
|
|
48
56
|
},
|
|
57
|
+
hidden: [
|
|
58
|
+
(context) => {
|
|
59
|
+
if (context.primaryControl.readonly) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
if (context.primaryControl.recordId) {
|
|
63
|
+
return !EnabledRules.HasUpdatePermission(context);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return !EnabledRules.HasCreatePermisssion(context);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
],
|
|
49
70
|
};
|
|
50
71
|
}
|
|
51
72
|
FormCommandBuilder.createSaveAndCloseCommand = createSaveAndCloseCommand;
|
|
@@ -67,7 +88,7 @@ var FormCommandBuilder;
|
|
|
67
88
|
title: 'Error',
|
|
68
89
|
},
|
|
69
90
|
};
|
|
70
|
-
function createDeleteCommand({ Icon, text, localizedTexts, stringSet, }) {
|
|
91
|
+
function createDeleteCommand({ Icon, text, localizedTexts, stringSet, localizedStringSet, }) {
|
|
71
92
|
return {
|
|
72
93
|
Icon: Icon,
|
|
73
94
|
type: 'button',
|
|
@@ -75,45 +96,38 @@ var FormCommandBuilder;
|
|
|
75
96
|
localizedText: localizedTexts,
|
|
76
97
|
danger: true,
|
|
77
98
|
hidden: (context) => {
|
|
78
|
-
var _a;
|
|
79
99
|
if (!context.primaryControl.recordId) {
|
|
80
100
|
return true;
|
|
81
101
|
}
|
|
82
|
-
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
return false;
|
|
102
|
+
return !EnabledRules.HasDeletePermission(context);
|
|
86
103
|
},
|
|
87
|
-
onClick: (context) =>
|
|
104
|
+
onClick: async (context) => {
|
|
88
105
|
const recordId = context.primaryControl.recordId;
|
|
89
106
|
if (!recordId) {
|
|
90
107
|
return;
|
|
91
108
|
}
|
|
92
|
-
if (typeof stringSet === 'function') {
|
|
93
|
-
|
|
94
|
-
}
|
|
109
|
+
// if (typeof stringSet === 'function') {
|
|
110
|
+
// stringSet = stringSet(context);
|
|
111
|
+
// }
|
|
112
|
+
const localizeSelector = (0, utils_1.createLocalizedSelector)(stringSet, localizedStringSet, context.locale.language);
|
|
95
113
|
try {
|
|
96
|
-
const confirmResult =
|
|
97
|
-
title:
|
|
98
|
-
text:
|
|
114
|
+
const confirmResult = await context.utility.openConfirmDialog({
|
|
115
|
+
title: (0, utils_1.plurialize)(1, localizeSelector((s) => s.confirmation.title)),
|
|
116
|
+
text: (0, utils_1.plurialize)(1, localizeSelector((s) => s.confirmation.text)),
|
|
99
117
|
cancelButtonLabel: stringSet.confirmation.buttonCancel,
|
|
100
118
|
confirmButtonLabel: stringSet.confirmation.buttonConfirm,
|
|
101
119
|
});
|
|
102
|
-
if (!
|
|
120
|
+
if (!confirmResult?.confirmed) {
|
|
103
121
|
return;
|
|
104
122
|
}
|
|
105
|
-
context.utility.showProgressIndicator(
|
|
106
|
-
|
|
107
|
-
// await context.dataService.deleteRecord(
|
|
108
|
-
// context.primaryControl.logicalName,
|
|
109
|
-
// recordId
|
|
110
|
-
// );
|
|
123
|
+
context.utility.showProgressIndicator((0, utils_1.plurialize)(1, localizeSelector((s) => s.status.deleting)) + '...');
|
|
124
|
+
await context.dataService.deleteRecord(context.primaryControl.logicalName, recordId);
|
|
111
125
|
context.utility.showNotification({
|
|
112
|
-
title:
|
|
113
|
-
text:
|
|
126
|
+
title: (0, utils_1.plurialize)(1, localizeSelector((s) => s.successNotification.title)),
|
|
127
|
+
text: (0, utils_1.plurialize)(1, localizeSelector((s) => s.successNotification.text)),
|
|
114
128
|
type: 'success',
|
|
115
129
|
});
|
|
116
|
-
|
|
130
|
+
context.primaryControl.close();
|
|
117
131
|
}
|
|
118
132
|
catch (error) {
|
|
119
133
|
context.utility.showNotification({
|
|
@@ -125,7 +139,7 @@ var FormCommandBuilder;
|
|
|
125
139
|
finally {
|
|
126
140
|
context.utility.hideProgressIndicator();
|
|
127
141
|
}
|
|
128
|
-
}
|
|
142
|
+
},
|
|
129
143
|
};
|
|
130
144
|
}
|
|
131
145
|
FormCommandBuilder.createDeleteCommand = createDeleteCommand;
|
|
@@ -135,9 +149,9 @@ var FormCommandBuilder;
|
|
|
135
149
|
type: 'button',
|
|
136
150
|
text,
|
|
137
151
|
localizedText: localizedTexts,
|
|
138
|
-
onClick: (context) =>
|
|
139
|
-
|
|
140
|
-
}
|
|
152
|
+
onClick: async (context) => {
|
|
153
|
+
await context.primaryControl.refresh();
|
|
154
|
+
},
|
|
141
155
|
hidden: (context) => !context.primaryControl.recordId,
|
|
142
156
|
};
|
|
143
157
|
}
|
|
@@ -1,49 +1,31 @@
|
|
|
1
1
|
import { SubGridCommandItemExperience } from '@headless-adminapp/core/experience/view';
|
|
2
2
|
import { Localized } from '@headless-adminapp/core/types';
|
|
3
3
|
import { Icon } from '@headless-adminapp/icons';
|
|
4
|
+
import { ViewCommandBuilder } from './ViewCommandBuilder';
|
|
4
5
|
export declare namespace SubgridCommandBuilder {
|
|
5
|
-
|
|
6
|
+
function createNewRecordCommand({ Icon, text, localizedTexts, }: {
|
|
6
7
|
Icon: Icon;
|
|
7
8
|
text: string;
|
|
8
9
|
localizedTexts?: Record<string, string>;
|
|
9
10
|
}): SubGridCommandItemExperience;
|
|
10
|
-
|
|
11
|
+
function createEditRecordCommand({ Icon, text, localizedTexts, }: {
|
|
11
12
|
Icon: Icon;
|
|
12
13
|
text: string;
|
|
13
14
|
localizedTexts?: Record<string, string>;
|
|
14
15
|
}): SubGridCommandItemExperience;
|
|
15
|
-
|
|
16
|
-
confirmation: {
|
|
17
|
-
title: string | string[];
|
|
18
|
-
text: string | string[];
|
|
19
|
-
buttonCancel: string;
|
|
20
|
-
buttonConfirm: string;
|
|
21
|
-
};
|
|
22
|
-
status: {
|
|
23
|
-
deleting: string | string[];
|
|
24
|
-
};
|
|
25
|
-
successNotification: {
|
|
26
|
-
title: string | string[];
|
|
27
|
-
text: string | string[];
|
|
28
|
-
};
|
|
29
|
-
errorNotification: {
|
|
30
|
-
title: string;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export const defaultDeleteRecordStringSet: DeleteRecordCommandStringSet;
|
|
34
|
-
export function createDeleteRecordCommand({ Icon, localizedText, text, stringSet, localizedStringSet, }: {
|
|
16
|
+
function createDeleteRecordCommand({ Icon, localizedText, text, stringSet, localizedStringSet, }: {
|
|
35
17
|
Icon: Icon;
|
|
36
18
|
text: string;
|
|
37
19
|
localizedText?: Record<string, string>;
|
|
38
|
-
stringSet?: DeleteRecordCommandStringSet;
|
|
39
|
-
localizedStringSet?: Localized<DeleteRecordCommandStringSet>;
|
|
20
|
+
stringSet?: ViewCommandBuilder.DeleteRecordCommandStringSet;
|
|
21
|
+
localizedStringSet?: Localized<ViewCommandBuilder.DeleteRecordCommandStringSet>;
|
|
40
22
|
}): SubGridCommandItemExperience;
|
|
41
|
-
|
|
23
|
+
function createRefreshCommand({ Icon, localizedTexts, text, }: {
|
|
42
24
|
Icon: Icon;
|
|
43
25
|
text: string;
|
|
44
26
|
localizedTexts?: Record<string, string>;
|
|
45
27
|
}): SubGridCommandItemExperience;
|
|
46
|
-
|
|
28
|
+
function createExportCommand({ button, csv, excel, }: {
|
|
47
29
|
button: {
|
|
48
30
|
Icon: Icon;
|
|
49
31
|
text: string;
|
|
@@ -60,5 +42,4 @@ export declare namespace SubgridCommandBuilder {
|
|
|
60
42
|
localizedTexts?: Record<string, string>;
|
|
61
43
|
};
|
|
62
44
|
}): SubGridCommandItemExperience;
|
|
63
|
-
export {};
|
|
64
45
|
}
|