@talxis/base-controls 1.2410.5 → 1.2411.1
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/dist/components/DatasetControl/DatasetControl.js +5 -3
- package/dist/components/DatasetControl/DatasetControl.js.map +1 -1
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/Grid/core/components/AgGrid/AgGrid.d.ts +2 -0
- package/dist/components/Grid/core/components/AgGrid/AgGrid.js +141 -27
- package/dist/components/Grid/core/components/AgGrid/AgGrid.js.map +1 -1
- package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/LoadingOverlay.js +3 -4
- package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/LoadingOverlay.js.map +1 -1
- package/dist/components/Grid/core/components/AgGrid/model/AgGrid.js +19 -7
- package/dist/components/Grid/core/components/AgGrid/model/AgGrid.js.map +1 -1
- package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.d.ts +3 -3
- package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.js +32 -96
- package/dist/components/Grid/core/components/Cell/EditableCell/EditableCell.js.map +1 -1
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/Notifications.js +23 -22
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/Notifications/Notifications.js.map +1 -1
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.js +41 -36
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/ReadOnlyCell.js.map +1 -1
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.d.ts +5 -0
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.js +21 -3
- package/dist/components/Grid/core/components/Cell/ReadOnlyCell/styles.js.map +1 -1
- package/dist/components/Grid/core/components/ColumnHeader/styles.d.ts +2 -0
- package/dist/components/Grid/core/components/ColumnHeader/styles.js +2 -0
- package/dist/components/Grid/core/components/ColumnHeader/styles.js.map +1 -1
- package/dist/components/Grid/core/components/Component/Component.d.ts +2 -2
- package/dist/components/Grid/core/components/Component/Component.js.map +1 -1
- package/dist/components/Grid/core/components/Component/model/Component.d.ts +1 -0
- package/dist/components/Grid/core/components/Component/model/Component.js +57 -20
- package/dist/components/Grid/core/components/Component/model/Component.js.map +1 -1
- package/dist/components/Grid/core/components/Save/Save.js +33 -20
- package/dist/components/Grid/core/components/Save/Save.js.map +1 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.d.ts +5 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.js +46 -15
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/ChangeEditor.js.map +1 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/ChangeGrid.d.ts +10 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/ChangeGrid.js +187 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/ChangeGrid.js.map +1 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/styles.d.ts +39 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/styles.js +45 -0
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/ChangeGrid/styles.js.map +1 -0
- package/dist/components/Grid/core/components/Save/styles.d.ts +2 -4
- package/dist/components/Grid/core/components/Save/styles.js +2 -4
- package/dist/components/Grid/core/components/Save/styles.js.map +1 -1
- package/dist/components/Grid/core/controllers/useGridController.js +2 -2
- package/dist/components/Grid/core/controllers/useGridController.js.map +1 -1
- package/dist/components/Grid/core/model/Grid.d.ts +1 -2
- package/dist/components/Grid/core/model/Grid.js +11 -9
- package/dist/components/Grid/core/model/Grid.js.map +1 -1
- package/dist/components/Grid/core/services/KeyListener.d.ts +2 -0
- package/dist/components/Grid/core/services/KeyListener.js +6 -0
- package/dist/components/Grid/core/services/KeyListener.js.map +1 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.js +0 -2
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionOperator/ConditionOperator.js.map +1 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.js +45 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/ConditionValue.js.map +1 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.js +4 -1
- package/dist/components/Grid/filtering/components/FilterCallout/components/ConditionValue/model/ConditionComponentValue.js.map +1 -1
- package/dist/components/Grid/filtering/model/Condition.js +19 -4
- package/dist/components/Grid/filtering/model/Condition.js.map +1 -1
- package/dist/components/Grid/interfaces.d.ts +4 -1
- package/dist/components/Grid/paging/components/Paging/Paging.js +6 -5
- package/dist/components/Grid/paging/components/Paging/Paging.js.map +1 -1
- package/dist/components/Grid/translations.d.ts +36 -0
- package/dist/components/Grid/translations.js +11 -2
- package/dist/components/Grid/translations.js.map +1 -1
- package/dist/components/TextField/TextField.js +14 -5
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/hooks/useControl.js +2 -2
- package/dist/hooks/useControl.js.map +1 -1
- package/dist/hooks/useRerender.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/package.json +4 -4
- package/dist/components/DatasetControl/hooks/useRerender.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/styles.d.ts +0 -44
- package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/styles.js +0 -82
- package/dist/components/Grid/core/components/AgGrid/components/LoadingOverlay/styles.js.map +0 -1
- package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.d.ts +0 -20
- package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.js +0 -173
- package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.js.map +0 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.d.ts +0 -7
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.js +0 -144
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/RecordGrids.js.map +0 -1
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/styles.d.ts +0 -48
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/styles.js +0 -54
- package/dist/components/Grid/core/components/Save/components/ChangeEditor/components/RecordGrids/styles.js.map +0 -1
- package/dist/components/Grid/core/components/Save/hooks/useSave.d.ts +0 -12
- package/dist/components/Grid/core/components/Save/hooks/useSave.js +0 -45
- package/dist/components/Grid/core/components/Save/hooks/useSave.js.map +0 -1
- package/dist/components/Grid/core/constants.d.ts +0 -1
- package/dist/components/Grid/core/constants.js +0 -4
- package/dist/components/Grid/core/constants.js.map +0 -1
- package/dist/components/Grid/core/hooks/useRerender.d.ts +0 -1
- package/dist/components/Grid/core/services/RecordUpdateService/controllers/useRecordUpdateServiceController.d.ts +0 -14
- package/dist/components/Grid/core/services/RecordUpdateService/controllers/useRecordUpdateServiceController.js +0 -25
- package/dist/components/Grid/core/services/RecordUpdateService/controllers/useRecordUpdateServiceController.js.map +0 -1
- package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.d.ts +0 -30
- package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.js +0 -186
- package/dist/components/Grid/core/services/RecordUpdateService/model/RecordUpdateService.js.map +0 -1
- package/dist/components/Grid/validation/controllers/useRecordValidationController.d.ts +0 -8
- package/dist/components/Grid/validation/controllers/useRecordValidationController.js +0 -25
- package/dist/components/Grid/validation/controllers/useRecordValidationController.js.map +0 -1
- package/dist/components/Grid/validation/model/ColumnValidation.d.ts +0 -11
- package/dist/components/Grid/validation/model/ColumnValidation.js +0 -90
- package/dist/components/Grid/validation/model/ColumnValidation.js.map +0 -1
- /package/dist/{components/DatasetControl/hooks → hooks}/useRerender.d.ts +0 -0
- /package/dist/{components/DatasetControl/hooks → hooks}/useRerender.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../../src/components/Grid/core/components/Cell/ReadOnlyCell/styles.ts"],"sourcesContent":["import { ITheme, mergeStyleSets, keyframes } from \"@fluentui/react\";\n\nconst shimmer = keyframes({\n '100%': {\n backgroundPosition: '150px 0'\n },\n});\n\n\n\nexport const getReadOnlyCellStyles = (theme: ITheme) => {\n return mergeStyleSets({\n loading: {\n height: '100%',\n alignItems: 'center',\n display: 'flex',\n '.ms-Shimmer-shimmerWrapper': {\n height: 10\n }\n },\n root: {\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n },\n text: {\n fontSize: 14,\n overflow: 'hidden',\n textOverflow: 'ellipsis'
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../../src/components/Grid/core/components/Cell/ReadOnlyCell/styles.ts"],"sourcesContent":["import { ITheme, mergeStyleSets, keyframes, mergeStyles } from \"@fluentui/react\";\n\nconst shimmer = keyframes({\n '100%': {\n backgroundPosition: '150px 0'\n },\n});\n\n\n\nexport const getReadOnlyCellStyles = (theme: ITheme) => {\n return mergeStyleSets({\n loading: {\n height: '100%',\n alignItems: 'center',\n display: 'flex',\n '.ms-Shimmer-shimmerWrapper': {\n height: 10\n }\n },\n root: {\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n },\n text: {\n fontSize: 14,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n link: {\n fontSize: 14,\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n fileWrapper: {\n display: 'flex',\n gap: 3\n },\n image: {\n marginRight: 5,\n 'img': {\n width: 32\n }\n },\n cellContent: {\n flex: 1,\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'center',\n height: '100%',\n },\n cellContentWrapper: {\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n overflow: 'hidden',\n flexShrink: 1,\n flexGrow: 0,\n ':global(.talxis-cell-align-right &)': {\n order: 2\n },\n ':only-child': {\n flexGrow: 1\n }\n },\n uneditableNotification: {\n 'i': {\n color: `${theme.semanticColors.infoIcon} !important`\n }\n },\n notificationsWrapper: {\n display: 'flex',\n flexGrow: 1,\n flexShrink: 0,\n flexBasis: 0,\n justifyContent: 'flex-end',\n minWidth: 'var(--test, 0px)',\n alignItems: 'center',\n overflow: 'hidden',\n ':global(.talxis-cell-align-right &)': {\n order: 1,\n justifyContent: 'flex-start',\n '.ms-CommandBar .ms-CommandBar-primaryCommand': {\n justifyContent: 'flex-start'\n }\n }\n },\n notifications: {\n minWidth: 0,\n flex: 1,\n ':global(.talxis-cell-align-right &)': {\n order: 2\n }\n },\n loadingLine: {\n height: 7,\n borderRadius: 5,\n width: '100%',\n animation: `${shimmer} 2s infinite`,\n backgroundSize: '1000px 100%',\n background: `linear-gradient(to right, color-mix(in oklab, ${theme.palette.white}, ${theme.palette.black} 8%) 4%, color-mix(in oklab, ${theme.palette.white}, ${theme.palette.black} 5%) 25%, color-mix(in oklab, ${theme.palette.white}, ${theme.palette.black} 8%) 36%)`\n },\n multiline: {\n alignSelf: 'baseline',\n whiteSpace: 'normal'\n }\n })\n}\n\nexport const getMultilineStyle = (height: number) => {\n const clamp = Math.floor(height / 20);\n return mergeStyles({\n alignSelf: 'baseline',\n whiteSpace: 'normal',\n display: '-webkit-box',\n textAlign: 'left',\n overflowWrap: 'break-word',\n lineHeight: \"1.2\",\n paddingTop: 2,\n '-webkit-line-clamp': clamp.toString(),\n '-webkit-box-orient': 'vertical'\n })\n}"],"names":[],"mappings":";;AAEA,MAAM,OAAO,GAAG,SAAS,CAAC;AACtB,IAAA,MAAM,EAAE;AACJ,QAAA,kBAAkB,EAAE,SAAS;AAChC,KAAA;AACJ,CAAA,CAAC,CAAC;AAIU,MAAA,qBAAqB,GAAG,CAAC,KAAa,KAAI;AACnD,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,OAAO,EAAE;AACL,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,UAAU,EAAE,QAAQ;AACpB,YAAA,OAAO,E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AAK,EAAA,EAAA,KAAK,CAAC,OAAO,CAAC,KAAK,CAAW,SAAA,CAAA;AAC7Q,SAAA;AACD,QAAA,SAAS,EAAE;AACP,YAAA,SAAS,EAAE,UAAU;AACrB,YAAA,UAAU,EAAE,QAAQ;AACvB,SAAA;AACJ,KAAA,CAAC,CAAA;AACN,EAAC;AAEY,MAAA,iBAAiB,GAAG,CAAC,MAAc,KAAI;IAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACtC,IAAA,OAAO,WAAW,CAAC;AACf,QAAA,SAAS,EAAE,UAAU;AACrB,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,OAAO,EAAE,aAAa;AACtB,QAAA,SAAS,EAAE,MAAM;AACjB,QAAA,YAAY,EAAE,YAAY;AAC1B,QAAA,UAAU,EAAE,KAAK;AACjB,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,oBAAoB,EAAE,KAAK,CAAC,QAAQ,EAAE;AACtC,QAAA,oBAAoB,EAAE,UAAU;AACnC,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
@@ -6,8 +6,10 @@ export declare const getColumnHeaderStyles: (theme: ITheme) => import("@fluentui
|
|
|
6
6
|
height: number;
|
|
7
7
|
paddingLeft: number;
|
|
8
8
|
paddingRight: number;
|
|
9
|
+
justifyContent: string;
|
|
9
10
|
'.ms-Button-flexContainer': {
|
|
10
11
|
justifyContent: string;
|
|
12
|
+
width: string;
|
|
11
13
|
gap: number;
|
|
12
14
|
pointerEvents: string;
|
|
13
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../../src/components/Grid/core/components/ColumnHeader/styles.ts"],"sourcesContent":["import { ITheme, mergeStyleSets } from \"@fluentui/react\";\n\nexport const getColumnHeaderStyles = (theme: ITheme) => {\n return mergeStyleSets({\n root: {\n width: '100%',\n textAlign: 'left',\n height: 42,\n paddingLeft: 10,\n paddingRight: 10,\n '.ms-Button-flexContainer': {\n justifyContent: 'flex-start',\n gap: 2,\n pointerEvents: 'none'\n }\n },\n labelWrapper: {\n flex: 1,\n display: 'flex',\n minWidth: 0\n },\n label: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n cursor: 'pointer',\n },\n requiredSymbol: {\n color: theme.semanticColors.errorIcon,\n position: 'relative',\n top: 4,\n left: 2\n },\n filterSortIcons: {\n display: 'flex',\n gap: 2\n },\n editIcon: {\n marginRight: 3\n }\n })\n}"],"names":[],"mappings":";;AAEa,MAAA,qBAAqB,GAAG,CAAC,KAAa,KAAI;AACnD,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,IAAI,EAAE;AACF,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,SAAS,EAAE,MAAM;AACjB,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,YAAY,EAAE,EAAE;AAChB,YAAA,0BAA0B,EAAE;AACxB,gBAAA,cAAc,EAAE,YAAY;AAC5B,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,aAAa,EAAE,MAAM;AACxB,aAAA;AACJ,SAAA;AACD,QAAA,YAAY,EAAE;AACV,YAAA,IAAI,EAAE,CAAC;AACP,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,QAAQ,EAAE,CAAC;AACd,SAAA;AACD,QAAA,KAAK,EAAE;AACH,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,YAAY,EAAE,UAAU;AACxB,YAAA,MAAM,EAAE,SAAS;AACpB,SAAA;AACD,QAAA,cAAc,EAAE;AACZ,YAAA,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS;AACrC,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,GAAG,EAAE,CAAC;AACN,YAAA,IAAI,EAAE,CAAC;AACV,SAAA;AACD,QAAA,eAAe,EAAE;AACb,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,GAAG,EAAE,CAAC;AACT,SAAA;AACD,QAAA,QAAQ,EAAE;AACN,YAAA,WAAW,EAAE,CAAC;AACjB,SAAA;AACJ,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../src/components/Grid/core/components/ColumnHeader/styles.ts"],"sourcesContent":["import { ITheme, mergeStyleSets } from \"@fluentui/react\";\n\nexport const getColumnHeaderStyles = (theme: ITheme) => {\n return mergeStyleSets({\n root: {\n width: '100%',\n textAlign: 'left',\n height: 42,\n paddingLeft: 10,\n paddingRight: 10,\n justifyContent: 'flex-start',\n '.ms-Button-flexContainer': {\n justifyContent: 'flex-start',\n width: '100%',\n gap: 2,\n pointerEvents: 'none'\n }\n },\n labelWrapper: {\n flex: 1,\n display: 'flex',\n minWidth: 0\n },\n label: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n cursor: 'pointer',\n },\n requiredSymbol: {\n color: theme.semanticColors.errorIcon,\n position: 'relative',\n top: 4,\n left: 2\n },\n filterSortIcons: {\n display: 'flex',\n gap: 2\n },\n editIcon: {\n marginRight: 3\n }\n })\n}"],"names":[],"mappings":";;AAEa,MAAA,qBAAqB,GAAG,CAAC,KAAa,KAAI;AACnD,IAAA,OAAO,cAAc,CAAC;AAClB,QAAA,IAAI,EAAE;AACF,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,SAAS,EAAE,MAAM;AACjB,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,YAAY,EAAE,EAAE;AAChB,YAAA,cAAc,EAAE,YAAY;AAC5B,YAAA,0BAA0B,EAAE;AACxB,gBAAA,cAAc,EAAE,YAAY;AAC5B,gBAAA,KAAK,EAAE,MAAM;AACb,gBAAA,GAAG,EAAE,CAAC;AACN,gBAAA,aAAa,EAAE,MAAM;AACxB,aAAA;AACJ,SAAA;AACD,QAAA,YAAY,EAAE;AACV,YAAA,IAAI,EAAE,CAAC;AACP,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,QAAQ,EAAE,CAAC;AACd,SAAA;AACD,QAAA,KAAK,EAAE;AACH,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,YAAY,EAAE,UAAU;AACxB,YAAA,MAAM,EAAE,SAAS;AACpB,SAAA;AACD,QAAA,cAAc,EAAE;AACZ,YAAA,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS;AACrC,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,GAAG,EAAE,CAAC;AACN,YAAA,IAAI,EAAE,CAAC;AACV,SAAA;AACD,QAAA,eAAe,EAAE;AACb,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,GAAG,EAAE,CAAC;AACT,SAAA;AACD,QAAA,QAAQ,EAAE;AACN,YAAA,WAAW,EAAE,CAAC;AACjB,SAAA;AACJ,KAAA,CAAC,CAAA;AACN;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IGridColumn } from "../../interfaces/IGridColumn";
|
|
3
3
|
import { IControl } from "../../../../../interfaces/context";
|
|
4
|
+
import { IRecord } from "@talxis/client-libraries";
|
|
4
5
|
export interface IControlProps {
|
|
5
6
|
column: IGridColumn;
|
|
6
|
-
|
|
7
|
-
formattedValue?: string;
|
|
7
|
+
record: IRecord;
|
|
8
8
|
onNotifyOutputChanged: (value: any) => void;
|
|
9
9
|
onOverrideControlProps?: (props: IControl<any, any, any, any>) => IControl<any, any, any, any>;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../../../../src/components/Grid/core/components/Component/Component.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../../../../src/components/Grid/core/components/Component/Component.tsx"],"sourcesContent":["import { DateTime } from \"../../../../DateTime/DateTime\";\nimport { Decimal } from \"../../../../Decimal/Decimal\";\nimport { Lookup } from \"../../../../Lookup/Lookup\";\nimport { MultiSelectOptionSet } from \"../../../../MultiSelectOptionSet/MultiSelectOptionSet\";\nimport { OptionSet } from \"../../../../OptionSet/OptionSet\";\nimport { TextField } from \"../../../../TextField/TextField\";\nimport { TwoOptions } from \"../../../../TwoOptions/TwoOptions\";\nimport { Duration } from \"../../../../Duration/Duration\";\nimport { DataType } from \"../../enums/DataType\";\nimport { IGridColumn } from \"../../interfaces/IGridColumn\";\nimport { useComponentController } from \"./controller/useComponentController\";\nimport { IControl } from \"../../../../../interfaces/context\";\nimport { IRecord } from \"@talxis/client-libraries\";\n\nexport interface IControlProps {\n column: IGridColumn;\n record: IRecord\n onNotifyOutputChanged: (value: any) => void;\n onOverrideControlProps?: (props: IControl<any, any, any, any>) => IControl<any, any, any, any>;\n}\n\nexport const Component = (props: IControlProps) => {\n const controller = useComponentController(props);\n const {column, componentProps} = {...controller};\n if(!column) {\n return <></>\n }\n switch(column.dataType) {\n case DataType.TWO_OPTIONS: {\n return <TwoOptions {...componentProps!} />\n }\n case DataType.OPTIONSET: {\n return <OptionSet {...componentProps!} />\n }\n case DataType.MULTI_SELECT_OPTIONSET: {\n return <MultiSelectOptionSet {...componentProps!} />\n }\n case DataType.DATE_AND_TIME_DATE_AND_TIME:\n case DataType.DATE_AND_TIME_DATE_ONLY: {\n return <DateTime {...componentProps!} />\n }\n case DataType.DECIMAL:\n case DataType.WHOLE_NONE:\n case DataType.CURRENCY: {\n return <Decimal {...componentProps!} />\n }\n case DataType.LOOKUP_SIMPLE:\n case DataType.LOOKUP_OWNER:\n case DataType.LOOKUP_CUSTOMER: {\n return <Lookup {...componentProps!} />\n }\n case DataType.WHOLE_DURATION: {\n return <Duration {...componentProps!} />\n }\n default: {\n return <TextField {...componentProps!} />\n }\n }\n}"],"names":["_jsx"],"mappings":";;;;;;;;;;;;AAqBa,MAAA,SAAS,GAAG,CAAC,KAAoB,KAAI;AAC9C,IAAA,MAAM,UAAU,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,EAAC,MAAM,EAAE,cAAc,EA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A;AAC3C,SAAA;AACD,QAAA,SAAS;AACL,YAAA,OAAOA,GAAC,CAAA,SAAS,EAAK,EAAA,GAAA,cAAe,GAAI,CAAA;AAC5C,SAAA;AACJ,KAAA;AACL;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
import { ColumnValidation } from '../../../../validation/model/ColumnValidation.js';
|
|
3
2
|
import { DataType } from '../../../enums/DataType.js';
|
|
4
3
|
import { GridDependency } from '../../../model/GridDependency.js';
|
|
5
|
-
import { Attribute } from '@talxis/client-libraries';
|
|
4
|
+
import { Attribute, Sanitizer, DataTypes } from '@talxis/client-libraries';
|
|
6
5
|
|
|
7
6
|
const debounce = (func, wait) => {
|
|
8
7
|
let timeout = null;
|
|
@@ -25,9 +24,15 @@ class Component extends GridDependency {
|
|
|
25
24
|
this._debouncedGetLookupValue = debounce(this._getLookupValue.bind(this), 50);
|
|
26
25
|
}
|
|
27
26
|
async getControlProps(props) {
|
|
28
|
-
const { column,
|
|
29
|
-
const
|
|
30
|
-
const
|
|
27
|
+
const { column, onNotifyOutputChanged, record } = { ...props };
|
|
28
|
+
const value = this._getComponentValue(column, record.getValue(column.name));
|
|
29
|
+
const formattedValue = record.getFormattedValue(column.name);
|
|
30
|
+
const validation = record.getColumnInfo(column.name);
|
|
31
|
+
const onOverrideControlProps = (passedProps) => {
|
|
32
|
+
const overridenProps = props?.onOverrideControlProps?.(passedProps) ?? passedProps;
|
|
33
|
+
overridenProps.parameters = record.ui?.getCellEditorParameters(column.name, overridenProps.parameters) ?? overridenProps.parameters;
|
|
34
|
+
return overridenProps;
|
|
35
|
+
};
|
|
31
36
|
const attributeName = Attribute.GetNameFromAlias(column.name);
|
|
32
37
|
switch (column.dataType) {
|
|
33
38
|
case DataType.LOOKUP_SIMPLE:
|
|
@@ -70,8 +75,8 @@ class Component extends GridDependency {
|
|
|
70
75
|
Targets: targets,
|
|
71
76
|
DisplayName: displayName
|
|
72
77
|
},
|
|
73
|
-
error:
|
|
74
|
-
errorMessage:
|
|
78
|
+
error: validation?.error === false,
|
|
79
|
+
errorMessage: validation?.errorMessage ?? "",
|
|
75
80
|
}
|
|
76
81
|
},
|
|
77
82
|
onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)
|
|
@@ -86,8 +91,8 @@ class Component extends GridDependency {
|
|
|
86
91
|
parameters: {
|
|
87
92
|
value: {
|
|
88
93
|
raw: twoOptionsValue === true ? true : false,
|
|
89
|
-
error:
|
|
90
|
-
errorMessage:
|
|
94
|
+
error: validation?.error === false,
|
|
95
|
+
errorMessage: validation?.errorMessage ?? "",
|
|
91
96
|
attributes: {
|
|
92
97
|
Options: options
|
|
93
98
|
}
|
|
@@ -104,8 +109,8 @@ class Component extends GridDependency {
|
|
|
104
109
|
parameters: {
|
|
105
110
|
value: {
|
|
106
111
|
raw: optionSetValue ?? null,
|
|
107
|
-
error:
|
|
108
|
-
errorMessage:
|
|
112
|
+
error: validation?.error === false,
|
|
113
|
+
errorMessage: validation?.errorMessage ?? "",
|
|
109
114
|
attributes: {
|
|
110
115
|
Options: options
|
|
111
116
|
}
|
|
@@ -122,8 +127,8 @@ class Component extends GridDependency {
|
|
|
122
127
|
parameters: {
|
|
123
128
|
value: {
|
|
124
129
|
raw: optionSetValue ?? null,
|
|
125
|
-
error:
|
|
126
|
-
errorMessage:
|
|
130
|
+
error: validation?.error === false,
|
|
131
|
+
errorMessage: validation?.errorMessage ?? "",
|
|
127
132
|
attributes: {
|
|
128
133
|
Options: options
|
|
129
134
|
}
|
|
@@ -142,8 +147,8 @@ class Component extends GridDependency {
|
|
|
142
147
|
parameters: {
|
|
143
148
|
value: {
|
|
144
149
|
raw: date.isValid() ? date.toDate() : dateTimeValue,
|
|
145
|
-
error:
|
|
146
|
-
errorMessage:
|
|
150
|
+
error: validation?.error === false,
|
|
151
|
+
errorMessage: validation?.errorMessage ?? "",
|
|
147
152
|
attributes: {
|
|
148
153
|
Behavior: metadata.Attributes.get(attributeName).Behavior,
|
|
149
154
|
Format: column.dataType
|
|
@@ -165,17 +170,18 @@ class Component extends GridDependency {
|
|
|
165
170
|
parameters: {
|
|
166
171
|
value: {
|
|
167
172
|
raw: decimalValue ?? null,
|
|
168
|
-
error:
|
|
173
|
+
error: validation?.error === false,
|
|
169
174
|
//formatted value is only used for currency => there is no way to get the currency symbol so the formatCurrency method is useless
|
|
170
175
|
formatted: formattedValue,
|
|
171
|
-
errorMessage:
|
|
176
|
+
errorMessage: validation?.errorMessage ?? "",
|
|
172
177
|
type: column.dataType,
|
|
173
178
|
attributes: {
|
|
174
179
|
Precision: precision
|
|
175
180
|
}
|
|
176
181
|
},
|
|
177
182
|
NotifyOutputChangedOnUnmount: {
|
|
178
|
-
|
|
183
|
+
//duration is ComboBox => no need to do this
|
|
184
|
+
raw: column.dataType !== DataType.WHOLE_DURATION,
|
|
179
185
|
}
|
|
180
186
|
},
|
|
181
187
|
onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)
|
|
@@ -193,8 +199,9 @@ class Component extends GridDependency {
|
|
|
193
199
|
},
|
|
194
200
|
value: {
|
|
195
201
|
raw: value,
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
type: column.dataType,
|
|
203
|
+
error: validation?.error === false,
|
|
204
|
+
errorMessage: validation?.errorMessage ?? ""
|
|
198
205
|
}
|
|
199
206
|
},
|
|
200
207
|
onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)
|
|
@@ -225,6 +232,36 @@ class Component extends GridDependency {
|
|
|
225
232
|
}
|
|
226
233
|
return value;
|
|
227
234
|
}
|
|
235
|
+
//map because getValue API does not return values 1:1 to PCF bindings
|
|
236
|
+
_getComponentValue(column, value) {
|
|
237
|
+
switch (column.dataType) {
|
|
238
|
+
//getValue always returns string for TwoOptions
|
|
239
|
+
case DataTypes.TwoOptions: {
|
|
240
|
+
value = value == '1' ? true : false;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
//getValue always returns string for OptionSet
|
|
244
|
+
case DataType.OPTIONSET: {
|
|
245
|
+
value = value ? parseInt(value) : null;
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
case DataType.MULTI_SELECT_OPTIONSET: {
|
|
249
|
+
value = value ? value.split(',').map((x) => parseInt(x)) : null;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
case DataType.LOOKUP_SIMPLE:
|
|
253
|
+
case DataType.LOOKUP_CUSTOMER:
|
|
254
|
+
case DataType.LOOKUP_OWNER: {
|
|
255
|
+
//our implementation returns array, Power Apps returns object
|
|
256
|
+
if (value && !Array.isArray(value)) {
|
|
257
|
+
value = [value];
|
|
258
|
+
}
|
|
259
|
+
value = value?.map((x) => Sanitizer.Lookup.getLookupValue(x));
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return value;
|
|
264
|
+
}
|
|
228
265
|
}
|
|
229
266
|
Component._lookupSavedQueriesCache = new Map;
|
|
230
267
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../../../../../src/components/Grid/core/components/Component/model/Component.ts"],"sourcesContent":["import dayjs from \"dayjs\";\nimport { IControl } from \"../../../../../../interfaces/context\";\nimport { IDateTime } from \"../../../../../DateTime/interfaces\";\nimport { IDecimal } from \"../../../../../Decimal/interfaces\";\nimport { ILookup } from \"../../../../../Lookup/interfaces\";\nimport { IMultiSelectOptionSet } from \"../../../../../MultiSelectOptionSet/interfaces\";\nimport { IOptionSet } from \"../../../../../OptionSet/interfaces\";\nimport { ITextField } from \"../../../../../TextField/interfaces\";\nimport { ITwoOptions } from \"../../../../../TwoOptions/interfaces\";\nimport { ColumnValidation } from \"../../../../validation/model/ColumnValidation\";\nimport { DataType } from \"../../../enums/DataType\";\nimport { GridDependency } from \"../../../model/GridDependency\";\nimport { IControlProps } from \"../Component\";\nimport { Attribute } from \"@talxis/client-libraries\";\n\nconst debounce = (func: (...args: any[]) => Promise<any>, wait: number) => {\n let timeout: NodeJS.Timeout | null = null;\n let promiseCache: Promise<any> | null = null;\n\n return async (...args: any[]) => {\n if (!promiseCache) {\n promiseCache = func(...args);\n }\n\n if (timeout) clearTimeout(timeout);\n\n timeout = setTimeout(() => {\n promiseCache = null;\n }, wait);\n\n return promiseCache;\n };\n};\n\nexport class Component extends GridDependency {\n private _debouncedGetLookupValue = debounce(this._getLookupValue.bind(this), 50);\n private static _lookupSavedQueriesCache = new Map<string, Promise<ComponentFramework.WebApi.Entity>>;\n\n public async getControlProps(props: IControlProps): Promise<IControl<any, any, any, any>> {\n const { column, value, onNotifyOutputChanged, formattedValue } = { ...props };\n const [isValid, validationErrorMessage] = new ColumnValidation(this._grid, props.column).validate(value);\n const onOverrideControlProps = props?.onOverrideControlProps ?? ((props: IControl<any, any, any, any>) => props);\n const attributeName = Attribute.GetNameFromAlias(column.name);\n switch (column.dataType) {\n case DataType.LOOKUP_SIMPLE:\n case DataType.LOOKUP_OWNER:\n case DataType.LOOKUP_CUSTOMER: {\n const columnMetadata = await this._grid.metadata.get(column.name);\n const targets = columnMetadata.Attributes.get(attributeName).attributeDescriptor.Targets ?? [];\n //@ts-ignore - typings\n if (column.dataType === DataType.LOOKUP_OWNER && window.TALXIS.Portal) {\n targets.push('systemuser', 'team')\n }\n let displayName = \"\";\n if(targets.length === 1) {\n displayName = (await this._pcfContext.utils.getEntityMetadata(targets[0])).DisplayName;\n }\n const result = {\n context: this._pcfContext,\n parameters: {\n value: {\n getAllViews: async (entityName: string, __queryType: number = 64) => {\n const cacheKey = `${entityName}_${__queryType}`\n if (!Component._lookupSavedQueriesCache.get(cacheKey)) {\n Component._lookupSavedQueriesCache.set(cacheKey, new Promise(async (resolve) => {\n const response = await this._pcfContext.webAPI.retrieveMultipleRecords('savedquery', `?$filter=returnedtypecode eq '${entityName}' and querytype eq ${__queryType} and isdefault eq true&$select=name,savedqueryid,fetchxml`);\n resolve(response.entities[0])\n }))\n }\n const result = await Component._lookupSavedQueriesCache.get(cacheKey)!;\n return [\n {\n isDefault: true,\n viewName: result.name,\n viewId: result.savedqueryid,\n fetchXml: result.fetchxml\n }\n ]\n },\n raw: await this._debouncedGetLookupValue(targets, value),\n attributes: {\n Targets: targets,\n DisplayName: displayName\n },\n error: !isValid,\n errorMessage: validationErrorMessage,\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n\n } as ILookup;\n return onOverrideControlProps(result);\n }\n case DataType.TWO_OPTIONS: {\n const twoOptionsValue = value as boolean | undefined | null;\n const [defaultValue, options] = await this._grid.metadata.getOptions(column.name)\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: twoOptionsValue === true ? true : false,\n error: !isValid,\n errorMessage: validationErrorMessage,\n attributes: {\n Options: options\n }\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as ITwoOptions)\n }\n case DataType.OPTIONSET: {\n const optionSetValue = value as number | null | undefined;\n const [defaultValue, options] = await this._grid.metadata.getOptions(column.name)\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: optionSetValue ?? null,\n error: !isValid,\n errorMessage: validationErrorMessage,\n attributes: {\n Options: options\n }\n },\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as IOptionSet);\n }\n case DataType.MULTI_SELECT_OPTIONSET: {\n const [defaultValue, options] = await this._grid.metadata.getOptions(column.name)\n const optionSetValue = value as number[] | null | undefined;\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: optionSetValue ?? null,\n error: !isValid,\n errorMessage: validationErrorMessage,\n attributes: {\n Options: options\n }\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as IMultiSelectOptionSet);\n }\n case DataType.DATE_AND_TIME_DATE_AND_TIME:\n case DataType.DATE_AND_TIME_DATE_ONLY: {\n const dateTimeValue = value as Date | null | undefined;\n const metadata = await this._grid.metadata.get(column.name);\n const date = dayjs(dateTimeValue);\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: date.isValid() ? date.toDate() : dateTimeValue,\n error: !isValid,\n errorMessage: validationErrorMessage,\n attributes: {\n Behavior: metadata.Attributes.get(attributeName).Behavior,\n Format: column.dataType\n }\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as IDateTime);\n }\n case DataType.WHOLE_NONE:\n case DataType.DECIMAL:\n case DataType.CURRENCY:\n case DataType.WHOLE_DURATION: {\n const decimalValue = value as number | null | undefined\n const metadata = await this._grid.metadata.get(column.name);\n const precision = metadata.Attributes.get(attributeName).Precision;\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: decimalValue ?? null,\n error: !isValid,\n //formatted value is only used for currency => there is no way to get the currency symbol so the formatCurrency method is useless\n formatted: formattedValue,\n errorMessage: validationErrorMessage,\n type: column.dataType,\n attributes: {\n Precision: precision\n }\n },\n NotifyOutputChangedOnUnmount: {\n raw: true,\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n\n } as IDecimal);\n }\n default: {\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n isResizable: {\n raw: false\n },\n NotifyOutputChangedOnUnmount: {\n raw: true,\n },\n value: {\n raw: value,\n error: !isValid,\n errorMessage: validationErrorMessage\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as ITextField);\n }\n }\n }\n private async _getLookupValue(targets: string[], value: ComponentFramework.LookupValue[] | null | undefined): Promise<ComponentFramework.LookupValue[]> {\n if (!value || value.length === 0) {\n return [];\n }\n //this is case from filters where we only have the id to work it => we need to go through targets and search for the records\n if (!value[0].entityType) {\n for (const lookup of value) {\n for (const target of targets) {\n try {\n const lookupEntityMetadata = await this._pcfContext.utils.getEntityMetadata(target, []);\n const response = await this._pcfContext.webAPI.retrieveRecord(target, lookup.id, `?$select=${lookupEntityMetadata.PrimaryNameAttribute}`);\n lookup.entityType = target;\n lookup.name = response[lookupEntityMetadata.PrimaryNameAttribute];\n break;\n }\n catch (err) {\n continue;\n }\n }\n }\n }\n return value;\n }\n}"],"names":[],"mappings":";;;;;;AAeA,MAAM,QAAQ,GAAG,CAAC,IAAsC,EAAE,IAAY,KAAI;IACtE,IAAI,OAAO,GAA0B,IAAI,CAAC;IAC1C,IAAI,YAAY,GAAwB,IAAI,CAAC;AAE7C,IAAA,OAAO,OAAO,GAAG,IAAW,KAAI;QAC5B,IAAI,CAAC,YAAY,EAAE;AACf,YAAA,YAAY,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AAChC,SAAA;AAED,QAAA,IAAI,OAAO;YAAE,YAAY,CAAC,OAAO,CAAC,CAAC;AAEnC,QAAA,OAAO,GAAG,UAAU,CAAC,MAAK;YACtB,YAAY,GAAG,IAAI,CAAC;SACvB,EAAE,IAAI,CAAC,CAAC;AAET,QAAA,OAAO,YAAY,CAAC;AACxB,KAAC,CAAC;AACN,CAAC,CAAC;AAEI,MAAO,SAAU,SAAQ,cAAc,CAAA;AAA7C,IAAA,WAAA,GAAA;;AACY,QAAA,IAAA,CAAA,wBAAwB,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;KA8MpF;IA3MU,MAAM,eAAe,CAAC,KAAoB,EAAA;AAC7C,QAAA,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;QAC9E,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzG,QAAA,MAAM,sBAAsB,GAAG,KAAK,EAAE,sBAAsB,KAAK,CAAC,KAAmC,KAAK,KAAK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AC;AAC1I,wBAAA,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC;wBAC3B,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;wBAClE,MAAM;AACT,qBAAA;AACD,oBAAA,OAAO,GAAG,EAAE;wBACR,SAAS;AACZ,qBAAA;AACJ,iBAAA;AACJ,aAAA;AACJ,SAAA;AACD,QAAA,OAAO,KAAK,CAAC;KAChB;;AA5Mc,SAAwB,CAAA,wBAAA,GAAG,IAAI,GAAsD;;;;"}
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../../../../../src/components/Grid/core/components/Component/model/Component.ts"],"sourcesContent":["import dayjs from \"dayjs\";\nimport { IControl } from \"../../../../../../interfaces/context\";\nimport { IDateTime } from \"../../../../../DateTime/interfaces\";\nimport { IDecimal } from \"../../../../../Decimal/interfaces\";\nimport { ILookup } from \"../../../../../Lookup/interfaces\";\nimport { IMultiSelectOptionSet } from \"../../../../../MultiSelectOptionSet/interfaces\";\nimport { IOptionSet } from \"../../../../../OptionSet/interfaces\";\nimport { ITextField } from \"../../../../../TextField/interfaces\";\nimport { ITwoOptions } from \"../../../../../TwoOptions/interfaces\";\nimport { DataType } from \"../../../enums/DataType\";\nimport { GridDependency } from \"../../../model/GridDependency\";\nimport { IControlProps } from \"../Component\";\nimport { Attribute, DataTypes, Sanitizer } from \"@talxis/client-libraries\";\nimport { IGridColumn } from \"../../../interfaces/IGridColumn\";\n\nconst debounce = (func: (...args: any[]) => Promise<any>, wait: number) => {\n let timeout: NodeJS.Timeout | null = null;\n let promiseCache: Promise<any> | null = null;\n\n return async (...args: any[]) => {\n if (!promiseCache) {\n promiseCache = func(...args);\n }\n\n if (timeout) clearTimeout(timeout);\n\n timeout = setTimeout(() => {\n promiseCache = null;\n }, wait);\n\n return promiseCache;\n };\n};\n\nexport class Component extends GridDependency {\n private _debouncedGetLookupValue = debounce(this._getLookupValue.bind(this), 50);\n private static _lookupSavedQueriesCache = new Map<string, Promise<ComponentFramework.WebApi.Entity>>;\n\n public async getControlProps(props: IControlProps): Promise<IControl<any, any, any, any>> {\n const { column, onNotifyOutputChanged, record} = { ...props };\n const value = this._getComponentValue(column, record.getValue(column.name));\n const formattedValue = record.getFormattedValue(column.name);\n const validation = record.getColumnInfo(column.name);\n const onOverrideControlProps = (passedProps: IControl<any, any, any, any>): any => {\n const overridenProps = props?.onOverrideControlProps?.(passedProps) ?? passedProps;\n overridenProps.parameters = record.ui?.getCellEditorParameters(column.name, overridenProps.parameters) ?? overridenProps.parameters;\n return overridenProps;\n }\n const attributeName = Attribute.GetNameFromAlias(column.name);\n switch (column.dataType) {\n case DataType.LOOKUP_SIMPLE:\n case DataType.LOOKUP_OWNER:\n case DataType.LOOKUP_CUSTOMER: {\n const columnMetadata = await this._grid.metadata.get(column.name);\n const targets = columnMetadata.Attributes.get(attributeName).attributeDescriptor.Targets ?? [];\n //@ts-ignore - typings\n if (column.dataType === DataType.LOOKUP_OWNER && window.TALXIS.Portal) {\n targets.push('systemuser', 'team')\n }\n let displayName = \"\";\n if(targets.length === 1) {\n displayName = (await this._pcfContext.utils.getEntityMetadata(targets[0])).DisplayName;\n }\n const result = {\n context: this._pcfContext,\n parameters: {\n value: {\n getAllViews: async (entityName: string, __queryType: number = 64) => {\n const cacheKey = `${entityName}_${__queryType}`\n if (!Component._lookupSavedQueriesCache.get(cacheKey)) {\n Component._lookupSavedQueriesCache.set(cacheKey, new Promise(async (resolve) => {\n const response = await this._pcfContext.webAPI.retrieveMultipleRecords('savedquery', `?$filter=returnedtypecode eq '${entityName}' and querytype eq ${__queryType} and isdefault eq true&$select=name,savedqueryid,fetchxml`);\n resolve(response.entities[0])\n }))\n }\n const result = await Component._lookupSavedQueriesCache.get(cacheKey)!;\n return [\n {\n isDefault: true,\n viewName: result.name,\n viewId: result.savedqueryid,\n fetchXml: result.fetchxml\n }\n ]\n },\n raw: await this._debouncedGetLookupValue(targets, value),\n attributes: {\n Targets: targets,\n DisplayName: displayName\n },\n error: validation?.error === false,\n errorMessage: validation?.errorMessage ?? \"\",\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n\n } as ILookup;\n return onOverrideControlProps(result);\n }\n case DataType.TWO_OPTIONS: {\n const twoOptionsValue = value as boolean | undefined | null;\n const [defaultValue, options] = await this._grid.metadata.getOptions(column.name)\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: twoOptionsValue === true ? true : false,\n error: validation?.error === false,\n errorMessage: validation?.errorMessage ?? \"\",\n attributes: {\n Options: options\n }\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as ITwoOptions)\n }\n case DataType.OPTIONSET: {\n const optionSetValue = value as number | null | undefined;\n const [defaultValue, options] = await this._grid.metadata.getOptions(column.name)\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: optionSetValue ?? null,\n error: validation?.error === false,\n errorMessage: validation?.errorMessage ?? \"\",\n attributes: {\n Options: options\n }\n },\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as IOptionSet);\n }\n case DataType.MULTI_SELECT_OPTIONSET: {\n const [defaultValue, options] = await this._grid.metadata.getOptions(column.name)\n const optionSetValue = value as number[] | null | undefined;\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: optionSetValue ?? null,\n error: validation?.error === false,\n errorMessage: validation?.errorMessage ?? \"\",\n attributes: {\n Options: options\n }\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as IMultiSelectOptionSet);\n }\n case DataType.DATE_AND_TIME_DATE_AND_TIME:\n case DataType.DATE_AND_TIME_DATE_ONLY: {\n const dateTimeValue = value as Date | null | undefined;\n const metadata = await this._grid.metadata.get(column.name);\n const date = dayjs(dateTimeValue);\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: date.isValid() ? date.toDate() : dateTimeValue,\n error: validation?.error === false,\n errorMessage: validation?.errorMessage ?? \"\",\n attributes: {\n Behavior: metadata.Attributes.get(attributeName).Behavior,\n Format: column.dataType\n }\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n \n } as IDateTime);\n }\n case DataType.WHOLE_NONE:\n case DataType.DECIMAL:\n case DataType.CURRENCY:\n case DataType.WHOLE_DURATION: {\n const decimalValue = value as number | null | undefined\n const metadata = await this._grid.metadata.get(column.name);\n const precision = metadata.Attributes.get(attributeName).Precision;\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n value: {\n raw: decimalValue ?? null,\n error: validation?.error === false,\n //formatted value is only used for currency => there is no way to get the currency symbol so the formatCurrency method is useless\n formatted: formattedValue,\n errorMessage: validation?.errorMessage ?? \"\",\n type: column.dataType,\n attributes: {\n Precision: precision\n }\n },\n NotifyOutputChangedOnUnmount: {\n //duration is ComboBox => no need to do this\n raw: column.dataType !== DataType.WHOLE_DURATION,\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n\n } as IDecimal);\n }\n default: {\n return onOverrideControlProps({\n context: this._pcfContext,\n parameters: {\n isResizable: {\n raw: false\n },\n NotifyOutputChangedOnUnmount: {\n raw: true,\n },\n value: {\n raw: value,\n type: column.dataType,\n error: validation?.error === false,\n errorMessage: validation?.errorMessage ?? \"\"\n }\n },\n onNotifyOutputChanged: (outputs) => onNotifyOutputChanged(outputs.value)\n } as ITextField);\n }\n }\n }\n private async _getLookupValue(targets: string[], value: ComponentFramework.LookupValue[] | null | undefined): Promise<ComponentFramework.LookupValue[]> {\n if (!value || value.length === 0) {\n return [];\n }\n //this is case from filters where we only have the id to work it => we need to go through targets and search for the records\n if (!value[0].entityType) {\n for (const lookup of value) {\n for (const target of targets) {\n try {\n const lookupEntityMetadata = await this._pcfContext.utils.getEntityMetadata(target, []);\n const response = await this._pcfContext.webAPI.retrieveRecord(target, lookup.id, `?$select=${lookupEntityMetadata.PrimaryNameAttribute}`);\n lookup.entityType = target;\n lookup.name = response[lookupEntityMetadata.PrimaryNameAttribute];\n break;\n }\n catch (err) {\n continue;\n }\n }\n }\n }\n return value;\n }\n\n\n //map because getValue API does not return values 1:1 to PCF bindings\n private _getComponentValue(column: IGridColumn, value: any) {\n switch(column.dataType) {\n //getValue always returns string for TwoOptions\n case DataTypes.TwoOptions: {\n value = value == '1' ? true : false\n break;\n }\n //getValue always returns string for OptionSet\n case DataType.OPTIONSET: {\n value = value ? parseInt(value) : null;\n break;\n }\n case DataType.MULTI_SELECT_OPTIONSET: {\n value = value ? value.split(',').map((x: string) => parseInt(x)) : null;\n break;\n }\n case DataType.LOOKUP_SIMPLE:\n case DataType.LOOKUP_CUSTOMER:\n case DataType.LOOKUP_OWNER: {\n //our implementation returns array, Power Apps returns object\n if(value && !Array.isArray(value)) {\n value = [value];\n }\n value = value?.map((x: ComponentFramework.EntityReference) => Sanitizer.Lookup.getLookupValue(x))\n break;\n }\n }\n return value;\n }\n}"],"names":[],"mappings":";;;;;AAeA,MAAM,QAAQ,GAAG,CAAC,IAAsC,EAAE,IAAY,KAAI;IACtE,IAAI,OAAO,GAA0B,IAAI,CAAC;IAC1C,IAAI,YAAY,GAAwB,IAAI,CAAC;AAE7C,IAAA,OAAO,OAAO,GAAG,IAAW,KAAI;QAC5B,IAAI,CAAC,YAAY,EAAE;AACf,YAAA,YAAY,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AAChC,SAAA;AAED,QAAA,IAAI,OAAO;YAAE,YAAY,CAAC,OAAO,CAAC,CAAC;AAEnC,QAAA,OAAO,GAAG,UAAU,CAAC,MAAK;YACtB,YAAY,GAAG,IAAI,CAAC;SACvB,EAAE,IAAI,CAAC,CAAC;AAET,QAAA,OAAO,YAAY,CAAC;AACxB,KAAC,CAAC;AACN,CAAC,CAAC;AAEI,MAAO,SAAU,SAAQ,cAAc,CAAA;AAA7C,IAAA,WAAA,GAAA;;AACY,QAAA,IAAA,CAAA,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qC,KAAK,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;gBACjG,MAAM;AACT,aAAA;AACJ,SAAA;AACD,QAAA,OAAO,KAAK,CAAC;KAChB;;AArPc,SAAwB,CAAA,wBAAA,GAAG,IAAI,GAAsD;;;;"}
|
|
@@ -1,45 +1,58 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { MessageBar, MessageBarType, CommandBarButton
|
|
2
|
+
import { MessageBar, MessageBarType, CommandBarButton } from '@fluentui/react';
|
|
3
3
|
import { useGridInstance } from '../../hooks/useGridInstance.js';
|
|
4
|
-
import { useSave } from './hooks/useSave.js';
|
|
5
4
|
import { useState } from 'react';
|
|
6
5
|
import { getSaveStyles } from './styles.js';
|
|
7
6
|
import { ChangeEditor } from './components/ChangeEditor/ChangeEditor.js';
|
|
8
|
-
import { useRecordUpdateServiceController } from '../../services/RecordUpdateService/controllers/useRecordUpdateServiceController.js';
|
|
9
7
|
|
|
10
8
|
const Save = () => {
|
|
11
9
|
const grid = useGridInstance();
|
|
12
10
|
const labels = grid.labels;
|
|
13
|
-
const styles = getSaveStyles();
|
|
14
|
-
const
|
|
15
|
-
const { isSaving, saveBtnProps, save } = useSave();
|
|
11
|
+
const styles = getSaveStyles(grid.parameters.EnableChangeEditor?.raw !== false);
|
|
12
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
16
13
|
const [changeEditorOpened, setChangeEditorOpened] = useState(false);
|
|
14
|
+
const hasInvalidRecords = grid.dataset.hasInvalidChanges?.();
|
|
15
|
+
const isDirty = grid.dataset.isDirty?.();
|
|
16
|
+
const numOfChanges = Object.keys(grid.dataset.getChanges?.() ?? []).length;
|
|
17
17
|
const onMessageClick = () => {
|
|
18
|
-
if (!isDirty) {
|
|
18
|
+
if (!isDirty || isSaving || grid.parameters.EnableChangeEditor?.raw === false) {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
setChangeEditorOpened(true);
|
|
22
22
|
};
|
|
23
|
-
return (jsxs(Fragment, { children: [jsx("div", { onClick: onMessageClick, className: styles.root
|
|
24
|
-
iconName:
|
|
25
|
-
}, onClick: (e) => {
|
|
23
|
+
return (jsxs(Fragment, { children: [jsx("div", { onClick: onMessageClick, className: `${styles.root} talxis__grid-control__notification-bar`, children: jsx(MessageBar, { messageBarType: !hasInvalidRecords ? MessageBarType.info : MessageBarType.error, actions: jsxs("div", { className: styles.actions, children: [jsx(CommandBarButton, { disabled: hasInvalidRecords || grid.dataset.loading, text: isSaving ? grid.labels["saving-saving"]() : undefined, iconProps: {
|
|
24
|
+
iconName: 'Save',
|
|
25
|
+
}, onClick: async (e) => {
|
|
26
26
|
e.stopPropagation();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
27
|
+
setIsSaving(true);
|
|
28
|
+
await grid.dataset.paging.loadExactPage(grid.paging.pageNumber, true);
|
|
29
|
+
setIsSaving(false);
|
|
30
|
+
} }), jsx(CommandBarButton, { text: grid.labels['saving-discard-changes'](), disabled: isSaving || grid.dataset.loading, iconProps: {
|
|
31
|
+
iconName: 'EraseTool'
|
|
32
|
+
}, onClick: async (e) => {
|
|
31
33
|
e.stopPropagation();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
if (window.confirm(grid.labels['saving-discard-all-confirmation']())) {
|
|
35
|
+
grid.dataset.clearChanges?.();
|
|
36
|
+
grid.pcfContext.factory.requestRender();
|
|
37
|
+
}
|
|
38
|
+
} })] }), isMultiline: false, children: jsx("span", { className: styles.notificationText, dangerouslySetInnerHTML: {
|
|
39
|
+
__html: (() => {
|
|
40
|
+
let message = labels["saving-changenotification"]({ numOfChanges: numOfChanges });
|
|
41
|
+
if (grid.parameters.EnableChangeEditor?.raw !== false) {
|
|
42
|
+
message += ` ${grid.labels['saving-clickreview']()}`;
|
|
43
|
+
}
|
|
44
|
+
return message;
|
|
45
|
+
})()
|
|
46
|
+
} }) }) }), changeEditorOpened &&
|
|
47
|
+
jsx(ChangeEditor, { onDismiss: (e, shouldRefresh) => {
|
|
38
48
|
//@ts-ignore
|
|
39
49
|
if (e?.code === 'Escape') {
|
|
40
50
|
return;
|
|
41
51
|
}
|
|
42
52
|
setChangeEditorOpened(false);
|
|
53
|
+
if (shouldRefresh) {
|
|
54
|
+
grid.dataset.paging.loadExactPage(grid.dataset.paging.pageNumber);
|
|
55
|
+
}
|
|
43
56
|
} })] }));
|
|
44
57
|
};
|
|
45
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Save.js","sources":["../../../../../../src/components/Grid/core/components/Save/Save.tsx"],"sourcesContent":["import { CommandBarButton, MessageBar, MessageBarType
|
|
1
|
+
{"version":3,"file":"Save.js","sources":["../../../../../../src/components/Grid/core/components/Save/Save.tsx"],"sourcesContent":["import { CommandBarButton, MessageBar, MessageBarType } from \"@fluentui/react\";\nimport { useGridInstance } from \"../../hooks/useGridInstance\";\nimport { useState } from 'react';\nimport { getSaveStyles } from \"./styles\";\nimport { ChangeEditor } from \"./components/ChangeEditor/ChangeEditor\";\n\n\nexport const Save = () => {\n const grid = useGridInstance();\n const labels = grid.labels;\n const styles = getSaveStyles(grid.parameters.EnableChangeEditor?.raw !== false);\n const [isSaving, setIsSaving] = useState(false);\n const [changeEditorOpened, setChangeEditorOpened] = useState<boolean>(false);\n const hasInvalidRecords = grid.dataset.hasInvalidChanges?.()\n const isDirty = grid.dataset.isDirty?.();\n const numOfChanges = Object.keys(grid.dataset.getChanges?.() ?? []).length;\n\n const onMessageClick = () => {\n if (!isDirty || isSaving || grid.parameters.EnableChangeEditor?.raw === false) {\n return;\n }\n setChangeEditorOpened(true);\n }\n return (\n <>\n <div onClick={onMessageClick} className={`${styles.root} talxis__grid-control__notification-bar`}>\n <MessageBar\n messageBarType={!hasInvalidRecords ? MessageBarType.info : MessageBarType.error}\n actions={\n <div className={styles.actions}>\n <CommandBarButton\n disabled={hasInvalidRecords || grid.dataset.loading}\n text={isSaving ? grid.labels[\"saving-saving\"]() : undefined}\n iconProps={{\n iconName: 'Save',\n }}\n onClick={async (e) => {\n e.stopPropagation()\n setIsSaving(true);\n await grid.dataset.paging.loadExactPage(grid.paging.pageNumber, true);\n setIsSaving(false);\n }}\n />\n <CommandBarButton\n text={grid.labels['saving-discard-changes']()}\n disabled={isSaving || grid.dataset.loading}\n iconProps={{\n iconName: 'EraseTool'\n }}\n onClick={async (e) => {\n e.stopPropagation();\n if (window.confirm(grid.labels['saving-discard-all-confirmation']())) {\n grid.dataset.clearChanges?.();\n grid.pcfContext.factory.requestRender();\n }\n }}\n />\n </div>\n } isMultiline={false}>\n <span className={styles.notificationText} dangerouslySetInnerHTML={{\n __html: (() => {\n let message = labels[\"saving-changenotification\"]({ numOfChanges: numOfChanges })\n if (grid.parameters.EnableChangeEditor?.raw !== false) {\n message += ` ${grid.labels['saving-clickreview']()}`\n }\n return message;\n })()\n }}></span>\n </MessageBar>\n </div>\n {changeEditorOpened &&\n <ChangeEditor onDismiss={(e, shouldRefresh) => {\n //@ts-ignore\n if (e?.code === 'Escape') {\n return;\n }\n setChangeEditorOpened(false);\n if(shouldRefresh) {\n grid.dataset.paging.loadExactPage(grid.dataset.paging.pageNumber);\n }\n }} />\n }\n </>\n )\n};"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;AAOO,MAAM,IAAI,GAAG,MAAK;AACrB,IAAA,MAAM,IAAI,GAAG,eAAe,EAAE,CAAC;AAC/B,IAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAC3B,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC;IAChF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,kBAAkB,EA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E,CAAA,CAAE,CAAA;AACvD,iCAAA;AACD,gCAAA,OAAO,OAAO,CAAC;AACnB,6BAAC,GAAG;yBACP,EAAS,CAAA,EAAA,CACD,EACX,CAAA,EACL,kBAAkB;gBACfA,GAAC,CAAA,YAAY,IAAC,SAAS,EAAE,CAAC,CAAC,EAAE,aAAa,KAAI;;AAE1C,wBAAA,IAAI,CAAC,EAAE,IAAI,KAAK,QAAQ,EAAE;4BACtB,OAAO;AACV,yBAAA;wBACD,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAC7B,wBAAA,IAAG,aAAa,EAAE;AACd,4BAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACrE,yBAAA;qBACJ,EAAA,CAAI,CAEV,EAAA,CAAA,EACN;AACL;;;;"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IDialogProps } from "@fluentui/react";
|
|
3
|
-
|
|
3
|
+
interface IChangeDialogProps extends IDialogProps {
|
|
4
|
+
onDismiss: (ev?: React.MouseEvent<HTMLButtonElement>, shoulRefreshGrid?: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ChangeEditor: (props: IChangeDialogProps) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,26 +1,46 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useTheme, DialogFooter, PrimaryButton,
|
|
3
|
-
import { useEffect } from 'react';
|
|
2
|
+
import { useTheme, DialogFooter, PrimaryButton, DefaultButton } from '@fluentui/react';
|
|
4
3
|
import { useGridInstance } from '../../../../hooks/useGridInstance.js';
|
|
5
|
-
import { useRecordUpdateServiceController } from '../../../../services/RecordUpdateService/controllers/useRecordUpdateServiceController.js';
|
|
6
4
|
import Dialog from '../../../Dialog/index.js';
|
|
7
|
-
import { RecordGrids } from './components/RecordGrids/RecordGrids.js';
|
|
8
5
|
import { getChangeEditorStyles } from './styles.js';
|
|
9
|
-
import {
|
|
6
|
+
import { ChangeGrid } from './components/ChangeGrid/ChangeGrid.js';
|
|
7
|
+
import { useState, useRef, useEffect } from 'react';
|
|
10
8
|
|
|
11
9
|
const ChangeEditor = (props) => {
|
|
12
10
|
const grid = useGridInstance();
|
|
11
|
+
const recordChanges = grid.dataset.getChanges?.() ?? [];
|
|
13
12
|
const labels = grid.labels;
|
|
14
|
-
const
|
|
15
|
-
const { isSaving, saveBtnProps, save } = useSave();
|
|
16
|
-
const updatedRecords = controller.updatedRecords;
|
|
13
|
+
const [activeSaveOperationsCount, setActiveSaveOperationsCount] = useState(0);
|
|
17
14
|
const styles = getChangeEditorStyles(useTheme());
|
|
15
|
+
const datasetsRef = useRef(new Set());
|
|
16
|
+
const shouldRefreshOnDismissRef = useRef(false);
|
|
17
|
+
const onDismiss = (ev) => {
|
|
18
|
+
//do not close the dialog if we have pending save operations
|
|
19
|
+
if (activeSaveOperationsCount > 0) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
props.onDismiss?.(ev, shouldRefreshOnDismissRef.current);
|
|
23
|
+
};
|
|
24
|
+
const isSaveDisabled = () => {
|
|
25
|
+
if (activeSaveOperationsCount > 0) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
if ([...datasetsRef.current.values()].find(x => x.hasInvalidChanges?.())) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
};
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
return () => {
|
|
35
|
+
props.onDismiss?.(undefined, shouldRefreshOnDismissRef.current);
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
18
38
|
useEffect(() => {
|
|
19
|
-
if (
|
|
20
|
-
|
|
39
|
+
if (activeSaveOperationsCount > 0) {
|
|
40
|
+
shouldRefreshOnDismissRef.current = true;
|
|
21
41
|
}
|
|
22
|
-
}, [
|
|
23
|
-
return jsxs(Dialog, { ...props, width: 1000, minWidth: '80%', modalProps: {
|
|
42
|
+
}, [activeSaveOperationsCount]);
|
|
43
|
+
return jsxs(Dialog, { ...props, onDismiss: onDismiss, width: 1000, minWidth: '80%', modalProps: {
|
|
24
44
|
isBlocking: true,
|
|
25
45
|
className: styles.root,
|
|
26
46
|
layerProps: {
|
|
@@ -29,10 +49,21 @@ const ChangeEditor = (props) => {
|
|
|
29
49
|
}, dialogContentProps: {
|
|
30
50
|
showCloseButton: true,
|
|
31
51
|
title: labels["saving-changepreview-title"]({
|
|
32
|
-
numOfChanges:
|
|
52
|
+
numOfChanges: Object.keys(recordChanges).length
|
|
33
53
|
})
|
|
34
|
-
}, hidden: false, children: [jsx("div", { className: styles.recordGrids, children:
|
|
35
|
-
|
|
54
|
+
}, hidden: false, children: [jsx("div", { className: styles.recordGrids, children: Object.values(recordChanges).map(recordChange => jsx(ChangeGrid, { onDatasetDestroyed: (dataset) => datasetsRef.current.delete(dataset), onDatasetReady: (dataset) => datasetsRef.current.add(dataset), onIsSaving: (value) => {
|
|
55
|
+
setActiveSaveOperationsCount(count => value ? count + 1 : count - 1);
|
|
56
|
+
}, recordChange: recordChange }, recordChange.record.getRecordId())) }), jsxs(DialogFooter, { children: [jsx(PrimaryButton, { className: styles.saveBtn, disabled: isSaveDisabled(), text: activeSaveOperationsCount > 0 ? grid.labels['saving-saving']() : grid.labels['saving-save-all'](), onClick: async () => {
|
|
57
|
+
setActiveSaveOperationsCount(count => count + 1);
|
|
58
|
+
await Promise.all([...datasetsRef.current.values()].map(dataset => dataset.save?.()));
|
|
59
|
+
grid.dataset.clearChanges?.();
|
|
60
|
+
setActiveSaveOperationsCount(count => count - 1);
|
|
61
|
+
} }), jsx(DefaultButton, { text: grid.labels['saving-discard-all'](), disabled: activeSaveOperationsCount > 0, onClick: async () => {
|
|
62
|
+
if (window.confirm(grid.labels['saving-discard-all-confirmation']())) {
|
|
63
|
+
grid.dataset.clearChanges?.();
|
|
64
|
+
grid.pcfContext.factory.requestRender();
|
|
65
|
+
}
|
|
66
|
+
} })] })] });
|
|
36
67
|
};
|
|
37
68
|
|
|
38
69
|
export { ChangeEditor };
|