@adaptabletools/adaptable 22.0.0-canary.3 → 22.0.0-canary.5
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/index.css +58 -29
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
- package/src/AdaptableState/AlertState.d.ts +2 -2
- package/src/AdaptableState/ChartingState.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +1 -1
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +3 -4
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
- package/src/AdaptableState/CustomSortState.d.ts +2 -2
- package/src/AdaptableState/DashboardState.d.ts +2 -2
- package/src/AdaptableState/ExportState.d.ts +2 -2
- package/src/AdaptableState/FlashingCellState.d.ts +2 -2
- package/src/AdaptableState/FormatColumnState.d.ts +2 -2
- package/src/AdaptableState/LayoutState.d.ts +8 -3
- package/src/AdaptableState/NamedQueryState.d.ts +2 -2
- package/src/AdaptableState/PlusMinusState.d.ts +2 -2
- package/src/AdaptableState/ShortcutState.d.ts +2 -2
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/ThemeState.d.ts +2 -2
- package/src/Api/CustomSortApi.d.ts +6 -3
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutHelpers.js +7 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
- package/src/Strategy/AlertModule.js +4 -0
- package/src/Strategy/CustomSortModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +5 -0
- package/src/Strategy/FormatColumnModule.js +4 -0
- package/src/Strategy/LayoutModule.js +4 -4
- package/src/Strategy/PlusMinusModule.js +4 -0
- package/src/Strategy/ScheduleModule.js +4 -0
- package/src/Strategy/ShortcutModule.js +4 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +16 -0
- package/src/Utilities/Helpers/FormatHelper.js +9 -2
- package/src/Utilities/ObjectFactory.js +15 -2
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +47 -12
- package/src/View/Alert/Wizard/AlertWizard.js +14 -10
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +84 -33
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +40 -14
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +34 -14
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +14 -10
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +47 -29
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +20 -9
- package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +12 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
- package/src/components/ColorPicker/ColorPicker.js +5 -4
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
- package/src/layout-manager/src/index.js +25 -7
- package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
- package/src/metamodel/adaptable.metamodel.d.ts +30 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +1 -1
- package/src/migration/VersionUpgrade22.d.ts +15 -0
- package/src/migration/VersionUpgrade22.js +160 -0
- package/src/types.d.ts +1 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
- package/src/AdaptableState/Common/SuspendableObject.js +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -632
- package/src/View/Alert/AlertEntityRow.d.ts +0 -11
- package/src/View/Alert/AlertEntityRow.js +0 -28
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -58
- package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
- package/src/View/Components/Buttons/ButtonFunction.js +0 -8
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonGeneral.js +0 -7
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -5
- package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShow.js +0 -7
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShowChart.js +0 -7
- package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonUndo.js +0 -7
- package/src/View/Components/ExpressionWizard.d.ts +0 -24
- package/src/View/Components/ExpressionWizard.js +0 -77
- package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
- package/src/View/Components/FilterForm/Waiting.js +0 -14
- package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
- package/src/View/Components/Panels/PanelFooter.js +0 -9
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
- package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -15
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -26
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
- package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -45
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
- package/src/View/Components/SharedProps/WizardScopeState.js +0 -1
- package/src/View/Components/WizardSummaryRow.d.ts +0 -9
- package/src/View/Components/WizardSummaryRow.js +0 -11
- package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
- package/src/View/CustomSort/CustomSortSummary.js +0 -105
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
- package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -56
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
- package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -35
- package/src/View/Filter/FilterSummary.d.ts +0 -18
- package/src/View/Filter/FilterSummary.js +0 -48
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
- package/src/View/FormatColumn/FormatColumnSummary.js +0 -90
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -88
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -94
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
- package/src/View/PlusMinus/PlusMinusSummary.js +0 -95
- package/src/View/Wizard/WizardLegend.d.ts +0 -12
- package/src/View/Wizard/WizardLegend.js +0 -23
|
@@ -82,6 +82,10 @@ export class ShortcutModule extends AdaptableModuleBase {
|
|
|
82
82
|
return {
|
|
83
83
|
abObject: shortcut,
|
|
84
84
|
items: [
|
|
85
|
+
{
|
|
86
|
+
name: 'Name',
|
|
87
|
+
values: [shortcut.Name],
|
|
88
|
+
},
|
|
85
89
|
getScopeViewItems(shortcut.Scope, this.api),
|
|
86
90
|
getShortcutSettingsViewItems(shortcut),
|
|
87
91
|
getObjectTagsViewItems(shortcut, this.api),
|
|
@@ -17,6 +17,7 @@ export declare function Humanize(str: string): string;
|
|
|
17
17
|
export declare function ReplaceEmptySpacesWithUnderscore(str?: string): string;
|
|
18
18
|
export declare function IsNumeric(str: string): boolean;
|
|
19
19
|
export declare function UnescapeHtmlEntities(str: string): string;
|
|
20
|
+
export declare function ReplaceAllOccurencesExceptLastOne(str: string, searchTerm: string, replacement: string): string;
|
|
20
21
|
export declare const StringExtensions: {
|
|
21
22
|
IsNull: typeof IsNull;
|
|
22
23
|
IsNotNull: typeof IsNotNull;
|
|
@@ -37,5 +38,6 @@ export declare const StringExtensions: {
|
|
|
37
38
|
ReplaceEmptySpacesWithUnderscore: typeof ReplaceEmptySpacesWithUnderscore;
|
|
38
39
|
IsNumeric: typeof IsNumeric;
|
|
39
40
|
UnescapeHtmlEntities: typeof UnescapeHtmlEntities;
|
|
41
|
+
ReplaceAllOccurencesExceptLastOne: typeof ReplaceAllOccurencesExceptLastOne;
|
|
40
42
|
};
|
|
41
43
|
export default StringExtensions;
|
|
@@ -92,6 +92,21 @@ export function UnescapeHtmlEntities(str) {
|
|
|
92
92
|
}
|
|
93
93
|
return preparedStr;
|
|
94
94
|
}
|
|
95
|
+
export function ReplaceAllOccurencesExceptLastOne(str, searchTerm, replacement) {
|
|
96
|
+
// Find the index of the last occurrence of the search string
|
|
97
|
+
const lastIndex = str.lastIndexOf(searchTerm);
|
|
98
|
+
// If the string is not found, return the original string
|
|
99
|
+
if (lastIndex === -1) {
|
|
100
|
+
return str;
|
|
101
|
+
}
|
|
102
|
+
// Slice the string into two parts: before and after the last occurrence
|
|
103
|
+
const partBeforeLast = str.slice(0, lastIndex);
|
|
104
|
+
const partAfterLast = str.slice(lastIndex);
|
|
105
|
+
// Replace all occurrences in the first part
|
|
106
|
+
const replacedPart = partBeforeLast.replaceAll(searchTerm, replacement);
|
|
107
|
+
// Recombine the modified first part with the untouched second part
|
|
108
|
+
return replacedPart + partAfterLast;
|
|
109
|
+
}
|
|
95
110
|
export const StringExtensions = {
|
|
96
111
|
IsNull,
|
|
97
112
|
IsNotNull,
|
|
@@ -112,5 +127,6 @@ export const StringExtensions = {
|
|
|
112
127
|
ReplaceEmptySpacesWithUnderscore,
|
|
113
128
|
IsNumeric,
|
|
114
129
|
UnescapeHtmlEntities,
|
|
130
|
+
ReplaceAllOccurencesExceptLastOne,
|
|
115
131
|
};
|
|
116
132
|
export default StringExtensions;
|
|
@@ -28,7 +28,6 @@ export function NumberFormatter(input, options = {}, rowNode, column, api) {
|
|
|
28
28
|
if (isNaN(n)) {
|
|
29
29
|
return preparedInput.toString();
|
|
30
30
|
}
|
|
31
|
-
const fractionsSepatator = options.FractionSeparator ? options.FractionSeparator : '.';
|
|
32
31
|
let multiplier = options.Multiplier ? options.Multiplier : 1;
|
|
33
32
|
if (options.Multiplier !== undefined) {
|
|
34
33
|
n *= multiplier;
|
|
@@ -65,6 +64,7 @@ export function NumberFormatter(input, options = {}, rowNode, column, api) {
|
|
|
65
64
|
}
|
|
66
65
|
let s;
|
|
67
66
|
let digitsToUse;
|
|
67
|
+
const fractionsSepatator = options.FractionSeparator ?? '.';
|
|
68
68
|
if (options.Truncate || options.Ceiling || options.Round || options.Floor) {
|
|
69
69
|
digitsToUse = 0;
|
|
70
70
|
}
|
|
@@ -84,7 +84,14 @@ export function NumberFormatter(input, options = {}, rowNode, column, api) {
|
|
|
84
84
|
s = s.replace(/\./g, options.FractionSeparator);
|
|
85
85
|
}
|
|
86
86
|
if (options.IntegerSeparator !== undefined) {
|
|
87
|
-
|
|
87
|
+
// if fraction separator is not a comma then simply replace all instances
|
|
88
|
+
if (options.FractionSeparator !== ',') {
|
|
89
|
+
s = s.replace(/\,/g, options.IntegerSeparator);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
// otherwise don't replace the last instance
|
|
93
|
+
s = StringExtensions.ReplaceAllOccurencesExceptLastOne(s, ',', options.IntegerSeparator);
|
|
94
|
+
}
|
|
88
95
|
}
|
|
89
96
|
s = (options.Prefix || '') + s + (options.Suffix || '');
|
|
90
97
|
if (options.Parentheses === true && preparedInput < 0) {
|
|
@@ -6,7 +6,7 @@ import { Bounce, Flip, Slide, Zoom } from '../components/Toastify';
|
|
|
6
6
|
import { BLACK, getHexForName, LIGHT_GRAY } from '../View/UIHelper';
|
|
7
7
|
import { isPivotLayout } from '../Api/Implementation/LayoutHelpers';
|
|
8
8
|
export function CreateEmptyCustomSort() {
|
|
9
|
-
return { Uuid: createUuid(), ColumnId: EMPTY_STRING, SortedValues: [] };
|
|
9
|
+
return { Uuid: createUuid(), Name: EMPTY_STRING, ColumnId: EMPTY_STRING, SortedValues: [] };
|
|
10
10
|
}
|
|
11
11
|
export function CreateAdaptableComment(text, api) {
|
|
12
12
|
const comment = {
|
|
@@ -44,6 +44,7 @@ export function CreateEmptyNamedQuery(expression) {
|
|
|
44
44
|
export function CreateEmptyPlusMinusNudge() {
|
|
45
45
|
return {
|
|
46
46
|
Uuid: createUuid(),
|
|
47
|
+
Name: EMPTY_STRING,
|
|
47
48
|
Scope: undefined,
|
|
48
49
|
Rule: undefined,
|
|
49
50
|
NudgeValue: PLUS_MINUS_DEFAULT_NUDGE_VALUE,
|
|
@@ -81,6 +82,7 @@ export function CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition
|
|
|
81
82
|
export function CreateEmptyAlertDefinition() {
|
|
82
83
|
return {
|
|
83
84
|
Uuid: createUuid(),
|
|
85
|
+
Name: EMPTY_STRING,
|
|
84
86
|
Scope: { All: true },
|
|
85
87
|
Rule: {
|
|
86
88
|
Predicates: [],
|
|
@@ -92,6 +94,7 @@ export function CreateEmptyAlertDefinition() {
|
|
|
92
94
|
export function CreateEmptyFlashingCellDefinition() {
|
|
93
95
|
return {
|
|
94
96
|
Uuid: createUuid(),
|
|
97
|
+
Name: EMPTY_STRING,
|
|
95
98
|
Scope: { ColumnIds: [] },
|
|
96
99
|
Rule: {
|
|
97
100
|
Predicates: [
|
|
@@ -108,6 +111,7 @@ export function CreateInternalAlertDefinitionForMessages(messageType, alertPrope
|
|
|
108
111
|
};
|
|
109
112
|
return {
|
|
110
113
|
Uuid: createUuid(),
|
|
114
|
+
Name: EMPTY_STRING,
|
|
111
115
|
Scope: undefined,
|
|
112
116
|
Rule: {
|
|
113
117
|
Predicates: [],
|
|
@@ -129,6 +133,7 @@ export function CreateEmptyReport() {
|
|
|
129
133
|
export function CreateEmptyBaseSchedule(scheduleType) {
|
|
130
134
|
return {
|
|
131
135
|
Uuid: createUuid(),
|
|
136
|
+
Name: EMPTY_STRING,
|
|
132
137
|
ScheduleType: scheduleType,
|
|
133
138
|
Schedule: CreateEmptySchedule(),
|
|
134
139
|
};
|
|
@@ -136,6 +141,7 @@ export function CreateEmptyBaseSchedule(scheduleType) {
|
|
|
136
141
|
export function CreateEmptyReminderSchedule() {
|
|
137
142
|
return {
|
|
138
143
|
Uuid: createUuid(),
|
|
144
|
+
Name: EMPTY_STRING,
|
|
139
145
|
ScheduleType: ScheduleType.Reminder,
|
|
140
146
|
Schedule: CreateEmptySchedule(),
|
|
141
147
|
Header: EMPTY_STRING,
|
|
@@ -148,6 +154,7 @@ export function CreateEmptyReminderSchedule() {
|
|
|
148
154
|
export function CreateEmptyReportSchedule() {
|
|
149
155
|
return {
|
|
150
156
|
Uuid: createUuid(),
|
|
157
|
+
Name: EMPTY_STRING,
|
|
151
158
|
ScheduleType: ScheduleType.Report,
|
|
152
159
|
Schedule: CreateEmptySchedule(),
|
|
153
160
|
ReportName: EMPTY_STRING,
|
|
@@ -172,6 +179,7 @@ export function CreateEmptyOpenFinReport() {
|
|
|
172
179
|
export function CreateEmptyIPushPullSchedule() {
|
|
173
180
|
return {
|
|
174
181
|
Uuid: createUuid(),
|
|
182
|
+
Name: EMPTY_STRING,
|
|
175
183
|
ScheduleType: ScheduleType.ipushpull,
|
|
176
184
|
Schedule: CreateEmptySchedule(),
|
|
177
185
|
IPushPullReport: CreateEmptyIPushPullReport(),
|
|
@@ -181,6 +189,7 @@ export function CreateEmptyIPushPullSchedule() {
|
|
|
181
189
|
export function CreateEmptyOpenFinSchedule() {
|
|
182
190
|
return {
|
|
183
191
|
Uuid: createUuid(),
|
|
192
|
+
Name: EMPTY_STRING,
|
|
184
193
|
ScheduleType: ScheduleType.OpenFin,
|
|
185
194
|
Schedule: CreateEmptySchedule(),
|
|
186
195
|
OpenFinReport: CreateEmptyOpenFinReport(),
|
|
@@ -190,6 +199,7 @@ export function CreateEmptyOpenFinSchedule() {
|
|
|
190
199
|
export function CreateIPushPullSchedule(iPushPullReport) {
|
|
191
200
|
return {
|
|
192
201
|
Uuid: createUuid(),
|
|
202
|
+
Name: EMPTY_STRING,
|
|
193
203
|
ScheduleType: ScheduleType.ipushpull,
|
|
194
204
|
Schedule: CreateEmptySchedule(),
|
|
195
205
|
IPushPullReport: iPushPullReport,
|
|
@@ -199,6 +209,7 @@ export function CreateIPushPullSchedule(iPushPullReport) {
|
|
|
199
209
|
export function CreateReportSchedule(reportName, reportFormat) {
|
|
200
210
|
return {
|
|
201
211
|
Uuid: createUuid(),
|
|
212
|
+
Name: EMPTY_STRING,
|
|
202
213
|
ScheduleType: ScheduleType.Report,
|
|
203
214
|
Schedule: CreateEmptySchedule(),
|
|
204
215
|
ReportName: reportName,
|
|
@@ -207,7 +218,6 @@ export function CreateReportSchedule(reportName, reportFormat) {
|
|
|
207
218
|
}
|
|
208
219
|
export function CreateEmptySchedule() {
|
|
209
220
|
return {
|
|
210
|
-
Uuid: createUuid(),
|
|
211
221
|
OneOffDate: undefined,
|
|
212
222
|
DaysOfWeek: [],
|
|
213
223
|
Hour: 0,
|
|
@@ -217,6 +227,7 @@ export function CreateEmptySchedule() {
|
|
|
217
227
|
export function CreateEmptyShortcut() {
|
|
218
228
|
return {
|
|
219
229
|
Uuid: createUuid(),
|
|
230
|
+
Name: EMPTY_STRING,
|
|
220
231
|
Scope: undefined,
|
|
221
232
|
ShortcutKey: EMPTY_STRING,
|
|
222
233
|
ShortcutValue: undefined,
|
|
@@ -225,6 +236,8 @@ export function CreateEmptyShortcut() {
|
|
|
225
236
|
}
|
|
226
237
|
export function CreateEmptyFormatColumn() {
|
|
227
238
|
return {
|
|
239
|
+
Uuid: createUuid(),
|
|
240
|
+
Name: EMPTY_STRING,
|
|
228
241
|
Scope: undefined,
|
|
229
242
|
Style: CreateEmptyStyle(),
|
|
230
243
|
DisplayFormat: undefined,
|
|
@@ -13,10 +13,11 @@ export declare const getDefaultAlertDefinition: (alertDefinition: AlertDefinitio
|
|
|
13
13
|
MessageText?: string;
|
|
14
14
|
AlertProperties?: import("../../../types").AlertProperties;
|
|
15
15
|
AlertForm?: string | import("../../../types").AlertButtonForm;
|
|
16
|
-
|
|
16
|
+
Name: string;
|
|
17
17
|
Source?: "InitialState" | "User";
|
|
18
18
|
AdaptableVersion?: import("../../../types").AdaptableVersion;
|
|
19
19
|
IsReadOnly?: boolean;
|
|
20
20
|
Tags?: import("../../../types").AdaptableObjectTag[];
|
|
21
21
|
Metadata?: any;
|
|
22
|
+
IsSuspended?: boolean;
|
|
22
23
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlertType } from '../Utilities/getAlertType';
|
|
3
|
+
import { AdaptableApi, AlertDefinition } from '../../../types';
|
|
4
|
+
export declare const isSettingsValid: (data: AlertDefinition, api: AdaptableApi) => true | "Name is required" | "An Alert already exists with that name";
|
|
3
5
|
export declare const renderAlertTypeSummary: (alertType: AlertType) => React.JSX.Element;
|
|
4
|
-
type
|
|
6
|
+
type AlertTypeWizardSectionProps = {
|
|
5
7
|
onAlertTypeChange: (alertType: AlertType) => void;
|
|
6
8
|
alertType: AlertType | null;
|
|
9
|
+
onChange: (data: AlertDefinition) => void;
|
|
7
10
|
};
|
|
8
|
-
export declare const AlertTypeWizardSection: (props:
|
|
11
|
+
export declare const AlertTypeWizardSection: (props: AlertTypeWizardSectionProps) => React.JSX.Element;
|
|
9
12
|
export {};
|
|
@@ -3,20 +3,55 @@ import { Tabs } from '../../../components/Tabs';
|
|
|
3
3
|
import { AlertType, getAlertTypeText } from '../Utilities/getAlertType';
|
|
4
4
|
import { TypeRadio } from '../../Wizard/TypeRadio';
|
|
5
5
|
import { Tag } from '../../../components/Tag';
|
|
6
|
-
import {
|
|
6
|
+
import { Flex } from '../../../components/Flex';
|
|
7
|
+
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
8
|
+
import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
9
|
+
import Input from '../../../components/Input';
|
|
10
|
+
import { SummaryText } from '../../Wizard/OnePageAdaptableWizard';
|
|
11
|
+
export const isSettingsValid = (data, api) => {
|
|
12
|
+
if (!data.Name?.trim()) {
|
|
13
|
+
return 'Name is required';
|
|
14
|
+
}
|
|
15
|
+
const allAlerts = api.alertApi.getAlertDefinitions();
|
|
16
|
+
const isDuplicateName = allAlerts.some((a) => a.Name === data.Name && a.Uuid !== data.Uuid);
|
|
17
|
+
if (isDuplicateName) {
|
|
18
|
+
return 'An Alert already exists with that name';
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
};
|
|
7
22
|
export const renderAlertTypeSummary = (alertType) => {
|
|
23
|
+
const { data } = useOnePageAdaptableWizardContext();
|
|
8
24
|
const text = getAlertTypeText(alertType);
|
|
9
|
-
return (React.createElement(
|
|
10
|
-
React.createElement(
|
|
25
|
+
return (React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement(SummaryText, null,
|
|
27
|
+
"Name ",
|
|
28
|
+
React.createElement(Tag, null, data.Name || 'Not specified')),
|
|
29
|
+
React.createElement(SummaryText, null,
|
|
30
|
+
"Type ",
|
|
31
|
+
React.createElement(Tag, null, text))));
|
|
11
32
|
};
|
|
12
33
|
export const AlertTypeWizardSection = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
const { data } = useOnePageAdaptableWizardContext();
|
|
35
|
+
const handleNameChange = (event) => {
|
|
36
|
+
props.onChange({
|
|
37
|
+
...data,
|
|
38
|
+
Name: event.target.value,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return (React.createElement(Flex, { flexDirection: "column" },
|
|
42
|
+
React.createElement(Tabs, null,
|
|
43
|
+
React.createElement(Tabs.Tab, null, "Settings"),
|
|
44
|
+
React.createElement(Tabs.Content, null,
|
|
45
|
+
React.createElement(FormLayout, null,
|
|
46
|
+
React.createElement(FormRow, { label: "Name" },
|
|
47
|
+
React.createElement(Input, { "data-name": "alert-name", className: "twa:flex-1 twa:max-w-[200px] twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' }))))),
|
|
48
|
+
React.createElement(Tabs, { className: "twa:mt-2" },
|
|
49
|
+
React.createElement(Tabs.Tab, null, "Alert Type"),
|
|
50
|
+
React.createElement(Tabs.Content, null,
|
|
51
|
+
React.createElement(Flex, { flexDirection: "column" },
|
|
52
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === AlertType.DataChange, onClick: () => props.onAlertTypeChange(AlertType.DataChange) }),
|
|
53
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === AlertType.RowChange, onClick: () => props.onAlertTypeChange(AlertType.RowChange) }),
|
|
54
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(AlertType.Aggregation), checked: props.alertType === AlertType.Aggregation }),
|
|
55
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(AlertType.Observable), checked: props.alertType === AlertType.Observable }),
|
|
56
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === AlertType.Validation, onClick: () => props.onAlertTypeChange(AlertType.Validation) }))))));
|
|
22
57
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import { useState, useCallback } from 'react';
|
|
3
3
|
import { OnePageAdaptableWizard, OnePageWizardSummary } from '../../Wizard/OnePageAdaptableWizard';
|
|
4
4
|
import { cloneObject } from '../../../Utilities/Helpers/Helper';
|
|
5
5
|
import { AlertScopeWizardSection } from './AlertScopeWizardSection';
|
|
@@ -15,7 +15,7 @@ import { useDispatch } from 'react-redux';
|
|
|
15
15
|
import * as AlertRedux from '../../../Redux/ActionsReducers/AlertRedux';
|
|
16
16
|
import { useAdaptable } from '../../AdaptableContext';
|
|
17
17
|
import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
|
|
18
|
-
import { AlertTypeWizardSection, renderAlertTypeSummary } from './AlertTypeWizardSection';
|
|
18
|
+
import { AlertTypeWizardSection, renderAlertTypeSummary, isSettingsValid, } from './AlertTypeWizardSection';
|
|
19
19
|
import { AlertType, getAlertType } from '../Utilities/getAlertType';
|
|
20
20
|
import { mapAlertDefinition } from '../Utilities/mapAlertDefinition';
|
|
21
21
|
import { getDefaultAlertDefinition } from '../Utilities/getDefaultAlertDefinition';
|
|
@@ -25,7 +25,7 @@ export const AlertWizard = (props) => {
|
|
|
25
25
|
const { api } = useAdaptable();
|
|
26
26
|
const dispatch = useDispatch();
|
|
27
27
|
const behaviourSpelling = api.internalApi.getCorrectEnglishVariant('Behaviour');
|
|
28
|
-
const [alertDefinition,
|
|
28
|
+
const [alertDefinition, doSetAlertDefinition] = useState(() => {
|
|
29
29
|
const alertDefinition = props.data
|
|
30
30
|
? cloneObject(props.data)
|
|
31
31
|
: ObjectFactory.CreateEmptyAlertDefinition();
|
|
@@ -45,6 +45,9 @@ export const AlertWizard = (props) => {
|
|
|
45
45
|
alertDefinition.MessageType = alertDefinition.MessageType ?? ALERT_DEFAULT_MESSAGE_TYPE;
|
|
46
46
|
return alertDefinition;
|
|
47
47
|
});
|
|
48
|
+
const setAlertDefinition = useCallback((data) => {
|
|
49
|
+
doSetAlertDefinition(data);
|
|
50
|
+
}, []);
|
|
48
51
|
// Alert type is based initialy on data, but can be changed by the user
|
|
49
52
|
// the default objects do not neccesary have enough information to determine the type
|
|
50
53
|
const [alertType, setAlertType] = useState(() => {
|
|
@@ -59,22 +62,23 @@ export const AlertWizard = (props) => {
|
|
|
59
62
|
}
|
|
60
63
|
props.onCloseWizard();
|
|
61
64
|
};
|
|
62
|
-
const updateAlertDefinition = (newAlertDefinition) => {
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
+
const updateAlertDefinition = useCallback((newAlertDefinition) => {
|
|
66
|
+
doSetAlertDefinition(mapAlertDefinition(api, newAlertDefinition));
|
|
67
|
+
}, [api]);
|
|
65
68
|
const handleAlertTypeChange = (newAlertType) => {
|
|
66
69
|
setAlertType(newAlertType);
|
|
67
|
-
|
|
70
|
+
doSetAlertDefinition(getDefaultAlertDefinition(alertDefinition, newAlertType));
|
|
68
71
|
};
|
|
69
72
|
return (React.createElement(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, modal: props.modal, data: alertDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
70
73
|
{
|
|
71
|
-
title: 'Type',
|
|
74
|
+
title: 'Name & Type',
|
|
75
|
+
isValid: isSettingsValid,
|
|
72
76
|
details: (React.createElement(React.Fragment, null,
|
|
73
|
-
"
|
|
77
|
+
"Enter Name and select ",
|
|
74
78
|
React.createElement("b", null, "what"),
|
|
75
79
|
" type of change in AdapTable will cause the Alert to fire")),
|
|
76
80
|
render: () => (React.createElement(Box, { className: "twa:p-2" },
|
|
77
|
-
React.createElement(AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange }))),
|
|
81
|
+
React.createElement(AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange, onChange: setAlertDefinition }))),
|
|
78
82
|
renderSummary: () => renderAlertTypeSummary(alertType),
|
|
79
83
|
},
|
|
80
84
|
{
|
|
@@ -2,8 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import * as Redux from 'redux';
|
|
3
3
|
import { AccessLevel } from '../../../AdaptableState/Common/Entitlement';
|
|
4
4
|
import { AdaptableSharedEntityConfig } from '../../../AdaptableState/TeamSharingState';
|
|
5
|
-
import { AdaptableObject } from '../../../AdaptableState/Common/AdaptableObject';
|
|
6
|
-
import { SuspendableObject } from '../../../AdaptableState/Common/SuspendableObject';
|
|
5
|
+
import { AdaptableObject, SuspendableObject } from '../../../AdaptableState/Common/AdaptableObject';
|
|
7
6
|
export interface EntityListActionButtonsProps extends React.ClassAttributes<EntityListActionButtons> {
|
|
8
7
|
editClick?: () => void;
|
|
9
8
|
cloneClick?: () => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AdaptableObject } from '../../../../AdaptableState/Common/AdaptableObject';
|
|
2
|
+
import { AdaptableObject, SuspendableObject } from '../../../../AdaptableState/Common/AdaptableObject';
|
|
3
3
|
import { AccessLevel } from '../../../../AdaptableState/Common/Entitlement';
|
|
4
|
-
import { SuspendableObject } from '../../../../AdaptableState/Common/SuspendableObject';
|
|
5
4
|
interface EntityListSuspendButtonProps {
|
|
6
5
|
onSuspend: (adaptableObject: AdaptableObject) => void;
|
|
7
6
|
onUnSuspend: (adaptableObject: AdaptableObject) => void;
|
|
@@ -10,6 +10,7 @@ export interface StyleComponentProps {
|
|
|
10
10
|
hidePreview?: boolean;
|
|
11
11
|
headerText?: string;
|
|
12
12
|
Style: AdaptableStyle;
|
|
13
|
+
/** @deprecated No longer used - font size is always displayed as dropdown */
|
|
13
14
|
showFontSizeAs?: 'radio' | 'dropdown';
|
|
14
15
|
UpdateStyle: (style: AdaptableStyle) => void;
|
|
15
16
|
}
|
|
@@ -5,7 +5,7 @@ import { CheckBox } from '../../components/CheckBox';
|
|
|
5
5
|
import { ColorPicker } from '../../components/ColorPicker';
|
|
6
6
|
import HelpBlock from '../../components/HelpBlock';
|
|
7
7
|
import Panel from '../../components/Panel';
|
|
8
|
-
import
|
|
8
|
+
import { Tabs } from '../../components/Tabs';
|
|
9
9
|
import { Select } from '../../components/Select';
|
|
10
10
|
import { StylePreview } from '../../components/StylePreview';
|
|
11
11
|
import { Toggle, ToggleGroup } from '../../components/Toggle';
|
|
@@ -148,25 +148,85 @@ export const StyleComponent = (props) => {
|
|
|
148
148
|
const styleClassNames = props.api.userInterfaceApi.getStyleClassNames();
|
|
149
149
|
const colourSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('Colour');
|
|
150
150
|
const coloursSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('colours');
|
|
151
|
-
const fontSizes = ['Default', ...EnumExtensions.getNames(FontSize)];
|
|
152
151
|
return (React.createElement(Cmp, { ...cmpProps, className: twMerge(clsx('ab-StyleComponent twa:text-3', props.className)) },
|
|
153
|
-
ArrayExtensions.IsNotNullOrEmpty(styleClassNames)
|
|
154
|
-
React.createElement(
|
|
155
|
-
|
|
156
|
-
React.createElement(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
152
|
+
ArrayExtensions.IsNotNullOrEmpty(styleClassNames) ? (React.createElement(Tabs, { value: showClassName ? 'classname' : 'createstyle', onValueChange: (value) => onShowClassNameChanged(value === 'classname') },
|
|
153
|
+
React.createElement(Tabs.Tab, { "data-name": "show-class-name", value: "classname" }, "Use Style Class Name"),
|
|
154
|
+
React.createElement(Tabs.Tab, { "data-name": "create-style", value: "createstyle" }, "Create Style"),
|
|
155
|
+
React.createElement(Tabs.Content, { value: "classname" },
|
|
156
|
+
React.createElement(Card, { shadow: false },
|
|
157
|
+
React.createElement(Card.Title, null, "CSS Class Name"),
|
|
158
|
+
React.createElement(Card.Body, { gap: 2, className: "twa:p-1" },
|
|
159
|
+
React.createElement(HelpBlock, null, "Select a CSS Class Name"),
|
|
160
|
+
React.createElement(Box, { className: "twa:max-w-[15rem]" },
|
|
161
|
+
React.createElement(Select, { options: ArrayExtensions.IsNullOrEmpty(styleClassNames)
|
|
162
|
+
? []
|
|
163
|
+
: styleClassNames.map((item) => ({
|
|
164
|
+
label: item,
|
|
165
|
+
value: item,
|
|
166
|
+
})), value: componentStyle.ClassName, onChange: (value) => onStyleClassNameChanged(value) })),
|
|
167
|
+
React.createElement(Box, { className: "twa:m-2 twa:flex-2 twa:text-warn" }, 'Please ensure that the styles listed are in the current stylesheet')))),
|
|
168
|
+
React.createElement(Tabs.Content, { value: "createstyle" },
|
|
169
|
+
React.createElement(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row" },
|
|
170
|
+
React.createElement(Card, { shadow: false, className: "twa:flex-1" },
|
|
171
|
+
React.createElement(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1" },
|
|
172
|
+
React.createElement(Card.Title, { className: "twa:col-span-2" },
|
|
173
|
+
colourSpellingVariant,
|
|
174
|
+
" & Border Properties"),
|
|
175
|
+
React.createElement(HelpBlock, { className: "twa:col-span-2" },
|
|
176
|
+
"Set ",
|
|
177
|
+
coloursSpellingVariant,
|
|
178
|
+
" by ticking a checkbox and selecting from the dropdown; leave unchecked to use cell's existing ",
|
|
179
|
+
coloursSpellingVariant),
|
|
180
|
+
React.createElement(CheckBox, { "data-name": "set-background-color", value: "existing", checked: !!componentStyle.BackColor, onChange: (checked) => onUseBackColorCheckChange(checked) },
|
|
181
|
+
"Back ",
|
|
182
|
+
colourSpellingVariant),
|
|
183
|
+
React.createElement(ColorPicker, { disabled: componentStyle.BackColor == null, api: props.api, value: componentStyle.BackColor || '#ffffff', onChange: (x) => onBackColorSelectChange(x) }),
|
|
184
|
+
React.createElement(CheckBox, { "data-name": "set-foreground-color", value: "existing", className: "twa:row-start-4", checked: componentStyle.ForeColor ? true : false, onChange: (checked) => onUseForeColorCheckChange(checked) },
|
|
185
|
+
"Fore ",
|
|
186
|
+
colourSpellingVariant),
|
|
187
|
+
React.createElement(ColorPicker, { className: "twa:row-start-4 twa:col-start-2", disabled: componentStyle.ForeColor == null, api: props.api, value: componentStyle.ForeColor || '#ffffff', onChange: (x) => onForeColorSelectChange(x) }),
|
|
188
|
+
React.createElement(CheckBox, { "data-name": "set-border-color", value: "existing", className: "twa:row-start-5 twa:col-start-1", checked: componentStyle.BorderColor ? true : false, onChange: (checked) => onUseBorderColorCheckChange(checked) },
|
|
189
|
+
"Border ",
|
|
190
|
+
colourSpellingVariant),
|
|
191
|
+
React.createElement(ColorPicker, { disabled: componentStyle.BorderColor == null, api: props.api, className: "twa:row-start-5 twa:col-start-2", value: componentStyle.BorderColor || '#ffffff', onChange: (x) => onBorderColorSelectChange(x) }),
|
|
192
|
+
React.createElement("span", { className: "twa:row-start-6" }, "Border Radius"),
|
|
193
|
+
React.createElement(AdaptableInput, { className: "twa:w-[100px] twa:row-start-6", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
|
|
194
|
+
const number = Number(event.target.value);
|
|
195
|
+
if (isNaN(number)) {
|
|
196
|
+
onBorderRadiusChange(0);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
onBorderRadiusChange(number);
|
|
200
|
+
}
|
|
201
|
+
} }),
|
|
202
|
+
React.createElement(Card.Title, { className: "twa:col-span-2 twa:col-start-3 twa:row-start-1" }, "Font Properties"),
|
|
203
|
+
React.createElement(HelpBlock, { className: "twa:self-stretch twa:col-span-2 twa:col-start-3 twa:row-start-2" }, "Set the font properties of the Style"),
|
|
204
|
+
React.createElement("span", null, "Font Style"),
|
|
205
|
+
React.createElement(ToggleGroup, null,
|
|
206
|
+
React.createElement(Toggle, { pressed: componentStyle.FontStyle == FontStyle.Italic, onPressedChange: (checked) => onFontStyleChange(checked), icon: "italic" }),
|
|
207
|
+
React.createElement(Toggle, { pressed: componentStyle.FontWeight == FontWeight.Bold, onPressedChange: (checked) => onFontWeightChange(checked), icon: "bold" })),
|
|
208
|
+
React.createElement("span", null, "Text Decoration"),
|
|
209
|
+
React.createElement(ToggleGroup, null,
|
|
210
|
+
React.createElement(Toggle, { icon: "underline", pressed: componentStyle.TextDecoration === 'Underline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Underline' : 'None') }),
|
|
211
|
+
React.createElement(Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
|
|
212
|
+
React.createElement(Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })),
|
|
213
|
+
React.createElement("span", null, "Font Size"),
|
|
214
|
+
React.createElement(Flex, { flexDirection: "row", alignItems: "center" },
|
|
215
|
+
React.createElement(Select, { placeholder: "Default", options: [
|
|
216
|
+
{
|
|
217
|
+
label: 'Default',
|
|
218
|
+
value: '',
|
|
219
|
+
},
|
|
220
|
+
...EnumExtensions.getNames(FontSize).map((enumName) => ({
|
|
221
|
+
label: enumName,
|
|
222
|
+
value: enumName,
|
|
223
|
+
})),
|
|
224
|
+
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) })),
|
|
225
|
+
React.createElement("span", null, "Alignment"),
|
|
226
|
+
React.createElement(ToggleGroup, null,
|
|
227
|
+
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }),
|
|
228
|
+
React.createElement(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }),
|
|
229
|
+
React.createElement(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })))))))) : (React.createElement(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row" },
|
|
170
230
|
React.createElement(Card, { shadow: false, className: "twa:flex-1" },
|
|
171
231
|
React.createElement(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1" },
|
|
172
232
|
React.createElement(Card.Title, { className: "twa:col-span-2" },
|
|
@@ -211,7 +271,7 @@ export const StyleComponent = (props) => {
|
|
|
211
271
|
React.createElement(Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
|
|
212
272
|
React.createElement(Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })),
|
|
213
273
|
React.createElement("span", null, "Font Size"),
|
|
214
|
-
|
|
274
|
+
React.createElement(Flex, { flexDirection: "row", alignItems: "center" },
|
|
215
275
|
React.createElement(Select, { placeholder: "Default", options: [
|
|
216
276
|
{
|
|
217
277
|
label: 'Default',
|
|
@@ -221,21 +281,12 @@ export const StyleComponent = (props) => {
|
|
|
221
281
|
label: enumName,
|
|
222
282
|
value: enumName,
|
|
223
283
|
})),
|
|
224
|
-
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) }))
|
|
225
|
-
return (React.createElement(Radio, { onClick: () => onFontSizeChange(enumName), checked: (enumName == 'Default' && !componentStyle.FontSize) ||
|
|
226
|
-
componentStyle.FontSize === enumName, key: enumName }, enumName));
|
|
227
|
-
}))),
|
|
284
|
+
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) })),
|
|
228
285
|
React.createElement("span", null, "Alignment"),
|
|
229
286
|
React.createElement(ToggleGroup, null,
|
|
230
|
-
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
React.createElement(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed
|
|
234
|
-
? onAlignmentChange('Center')
|
|
235
|
-
: onAlignmentChange('Default') }),
|
|
236
|
-
React.createElement(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed
|
|
237
|
-
? onAlignmentChange('Right')
|
|
238
|
-
: onAlignmentChange('Default') })))))),
|
|
287
|
+
React.createElement(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }),
|
|
288
|
+
React.createElement(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }),
|
|
289
|
+
React.createElement(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })))))),
|
|
239
290
|
!props.hidePreview && (React.createElement(Card, { shadow: false },
|
|
240
291
|
React.createElement(Card.Title, null, "Preview"),
|
|
241
292
|
React.createElement(Card.Body, { className: "twa:grid twa:place-items-center" },
|
|
@@ -3,7 +3,8 @@ import { CustomSort } from '../../../AdaptableState/CustomSortState';
|
|
|
3
3
|
export type CustomSortColumnWizardSectionProps = {
|
|
4
4
|
onChange: (data: CustomSort) => void;
|
|
5
5
|
isNew: boolean;
|
|
6
|
+
allCustomSorts: CustomSort[];
|
|
6
7
|
};
|
|
7
8
|
export declare const renderCustomSortColumn: (data: CustomSort) => React.JSX.Element;
|
|
8
|
-
export declare const isValidCustomSortColumn: (data: CustomSort) => true | string;
|
|
9
|
+
export declare const isValidCustomSortColumn: (data: CustomSort, allCustomSorts: CustomSort[]) => true | string;
|
|
9
10
|
export declare const CustomSortColumnWizardSection: (props: CustomSortColumnWizardSectionProps) => React.JSX.Element;
|