@adaptabletools/adaptable-cjs 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 +17 -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 +48 -12
- package/src/View/Alert/Wizard/AlertWizard.js +12 -8
- 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 +39 -13
- 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 +36 -15
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +13 -9
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +47 -29
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -11
- 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.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
- package/src/AdaptableState/Common/SuspendableObject.js +0 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -633
- package/src/View/Alert/AlertEntityRow.d.ts +0 -11
- package/src/View/Alert/AlertEntityRow.js +0 -33
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -63
- package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
- package/src/View/Components/Buttons/ButtonFunction.js +0 -13
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonGeneral.js +0 -12
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -8
- package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShow.js +0 -12
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShowChart.js +0 -12
- package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonUndo.js +0 -12
- package/src/View/Components/ExpressionWizard.d.ts +0 -24
- package/src/View/Components/ExpressionWizard.js +0 -82
- package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
- package/src/View/Components/FilterForm/Waiting.js +0 -19
- package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
- package/src/View/Components/Panels/PanelFooter.js +0 -14
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
- package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -20
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -31
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
- package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -50
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
- package/src/View/Components/SharedProps/WizardScopeState.js +0 -2
- package/src/View/Components/WizardSummaryRow.d.ts +0 -9
- package/src/View/Components/WizardSummaryRow.js +0 -16
- package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
- package/src/View/CustomSort/CustomSortSummary.js +0 -110
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -24
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -73
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -73
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
- package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -61
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
- package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -40
- package/src/View/Filter/FilterSummary.d.ts +0 -18
- package/src/View/Filter/FilterSummary.js +0 -53
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
- package/src/View/FormatColumn/FormatColumnSummary.js +0 -95
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -93
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -99
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
- package/src/View/PlusMinus/PlusMinusSummary.js +0 -100
- package/src/View/Wizard/WizardLegend.d.ts +0 -12
- package/src/View/Wizard/WizardLegend.js +0 -28
|
@@ -86,6 +86,10 @@ class ShortcutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
86
86
|
return {
|
|
87
87
|
abObject: shortcut,
|
|
88
88
|
items: [
|
|
89
|
+
{
|
|
90
|
+
name: 'Name',
|
|
91
|
+
values: [shortcut.Name],
|
|
92
|
+
},
|
|
89
93
|
(0, getScopeViewItems_1.getScopeViewItems)(shortcut.Scope, this.api),
|
|
90
94
|
(0, getShortcutSettingsViewItems_1.getShortcutSettingsViewItems)(shortcut),
|
|
91
95
|
(0, getObjectTagsViewItems_1.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;
|
|
@@ -20,6 +20,7 @@ exports.Humanize = Humanize;
|
|
|
20
20
|
exports.ReplaceEmptySpacesWithUnderscore = ReplaceEmptySpacesWithUnderscore;
|
|
21
21
|
exports.IsNumeric = IsNumeric;
|
|
22
22
|
exports.UnescapeHtmlEntities = UnescapeHtmlEntities;
|
|
23
|
+
exports.ReplaceAllOccurencesExceptLastOne = ReplaceAllOccurencesExceptLastOne;
|
|
23
24
|
const tslib_1 = require("tslib");
|
|
24
25
|
const startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
|
|
25
26
|
function IsNull(stringToCheck) {
|
|
@@ -115,6 +116,21 @@ function UnescapeHtmlEntities(str) {
|
|
|
115
116
|
}
|
|
116
117
|
return preparedStr;
|
|
117
118
|
}
|
|
119
|
+
function ReplaceAllOccurencesExceptLastOne(str, searchTerm, replacement) {
|
|
120
|
+
// Find the index of the last occurrence of the search string
|
|
121
|
+
const lastIndex = str.lastIndexOf(searchTerm);
|
|
122
|
+
// If the string is not found, return the original string
|
|
123
|
+
if (lastIndex === -1) {
|
|
124
|
+
return str;
|
|
125
|
+
}
|
|
126
|
+
// Slice the string into two parts: before and after the last occurrence
|
|
127
|
+
const partBeforeLast = str.slice(0, lastIndex);
|
|
128
|
+
const partAfterLast = str.slice(lastIndex);
|
|
129
|
+
// Replace all occurrences in the first part
|
|
130
|
+
const replacedPart = partBeforeLast.replaceAll(searchTerm, replacement);
|
|
131
|
+
// Recombine the modified first part with the untouched second part
|
|
132
|
+
return replacedPart + partAfterLast;
|
|
133
|
+
}
|
|
118
134
|
exports.StringExtensions = {
|
|
119
135
|
IsNull,
|
|
120
136
|
IsNotNull,
|
|
@@ -135,5 +151,6 @@ exports.StringExtensions = {
|
|
|
135
151
|
ReplaceEmptySpacesWithUnderscore,
|
|
136
152
|
IsNumeric,
|
|
137
153
|
UnescapeHtmlEntities,
|
|
154
|
+
ReplaceAllOccurencesExceptLastOne,
|
|
138
155
|
};
|
|
139
156
|
exports.default = exports.StringExtensions;
|
|
@@ -34,7 +34,6 @@ function NumberFormatter(input, options = {}, rowNode, column, api) {
|
|
|
34
34
|
if (isNaN(n)) {
|
|
35
35
|
return preparedInput.toString();
|
|
36
36
|
}
|
|
37
|
-
const fractionsSepatator = options.FractionSeparator ? options.FractionSeparator : '.';
|
|
38
37
|
let multiplier = options.Multiplier ? options.Multiplier : 1;
|
|
39
38
|
if (options.Multiplier !== undefined) {
|
|
40
39
|
n *= multiplier;
|
|
@@ -71,6 +70,7 @@ function NumberFormatter(input, options = {}, rowNode, column, api) {
|
|
|
71
70
|
}
|
|
72
71
|
let s;
|
|
73
72
|
let digitsToUse;
|
|
73
|
+
const fractionsSepatator = options.FractionSeparator ?? '.';
|
|
74
74
|
if (options.Truncate || options.Ceiling || options.Round || options.Floor) {
|
|
75
75
|
digitsToUse = 0;
|
|
76
76
|
}
|
|
@@ -90,7 +90,14 @@ function NumberFormatter(input, options = {}, rowNode, column, api) {
|
|
|
90
90
|
s = s.replace(/\./g, options.FractionSeparator);
|
|
91
91
|
}
|
|
92
92
|
if (options.IntegerSeparator !== undefined) {
|
|
93
|
-
|
|
93
|
+
// if fraction separator is not a comma then simply replace all instances
|
|
94
|
+
if (options.FractionSeparator !== ',') {
|
|
95
|
+
s = s.replace(/\,/g, options.IntegerSeparator);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
// otherwise don't replace the last instance
|
|
99
|
+
s = StringExtensions_1.default.ReplaceAllOccurencesExceptLastOne(s, ',', options.IntegerSeparator);
|
|
100
|
+
}
|
|
94
101
|
}
|
|
95
102
|
s = (options.Prefix || '') + s + (options.Suffix || '');
|
|
96
103
|
if (options.Parentheses === true && preparedInput < 0) {
|
|
@@ -48,7 +48,7 @@ const Toastify_1 = require("../components/Toastify");
|
|
|
48
48
|
const UIHelper_1 = require("../View/UIHelper");
|
|
49
49
|
const LayoutHelpers_1 = require("../Api/Implementation/LayoutHelpers");
|
|
50
50
|
function CreateEmptyCustomSort() {
|
|
51
|
-
return { Uuid: (0, Uuid_1.createUuid)(), ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
|
|
51
|
+
return { Uuid: (0, Uuid_1.createUuid)(), Name: GeneralConstants_1.EMPTY_STRING, ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
|
|
52
52
|
}
|
|
53
53
|
function CreateAdaptableComment(text, api) {
|
|
54
54
|
const comment = {
|
|
@@ -86,6 +86,7 @@ function CreateEmptyNamedQuery(expression) {
|
|
|
86
86
|
function CreateEmptyPlusMinusNudge() {
|
|
87
87
|
return {
|
|
88
88
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
89
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
89
90
|
Scope: undefined,
|
|
90
91
|
Rule: undefined,
|
|
91
92
|
NudgeValue: ObjectDefaultConstants_1.PLUS_MINUS_DEFAULT_NUDGE_VALUE,
|
|
@@ -123,6 +124,7 @@ function CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, rowDa
|
|
|
123
124
|
function CreateEmptyAlertDefinition() {
|
|
124
125
|
return {
|
|
125
126
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
127
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
126
128
|
Scope: { All: true },
|
|
127
129
|
Rule: {
|
|
128
130
|
Predicates: [],
|
|
@@ -134,6 +136,7 @@ function CreateEmptyAlertDefinition() {
|
|
|
134
136
|
function CreateEmptyFlashingCellDefinition() {
|
|
135
137
|
return {
|
|
136
138
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
139
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
137
140
|
Scope: { ColumnIds: [] },
|
|
138
141
|
Rule: {
|
|
139
142
|
Predicates: [
|
|
@@ -150,6 +153,7 @@ function CreateInternalAlertDefinitionForMessages(messageType, alertProperties)
|
|
|
150
153
|
};
|
|
151
154
|
return {
|
|
152
155
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
156
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
153
157
|
Scope: undefined,
|
|
154
158
|
Rule: {
|
|
155
159
|
Predicates: [],
|
|
@@ -171,6 +175,7 @@ function CreateEmptyReport() {
|
|
|
171
175
|
function CreateEmptyBaseSchedule(scheduleType) {
|
|
172
176
|
return {
|
|
173
177
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
178
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
174
179
|
ScheduleType: scheduleType,
|
|
175
180
|
Schedule: CreateEmptySchedule(),
|
|
176
181
|
};
|
|
@@ -178,6 +183,7 @@ function CreateEmptyBaseSchedule(scheduleType) {
|
|
|
178
183
|
function CreateEmptyReminderSchedule() {
|
|
179
184
|
return {
|
|
180
185
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
186
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
181
187
|
ScheduleType: Enums_1.ScheduleType.Reminder,
|
|
182
188
|
Schedule: CreateEmptySchedule(),
|
|
183
189
|
Header: GeneralConstants_1.EMPTY_STRING,
|
|
@@ -190,6 +196,7 @@ function CreateEmptyReminderSchedule() {
|
|
|
190
196
|
function CreateEmptyReportSchedule() {
|
|
191
197
|
return {
|
|
192
198
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
199
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
193
200
|
ScheduleType: Enums_1.ScheduleType.Report,
|
|
194
201
|
Schedule: CreateEmptySchedule(),
|
|
195
202
|
ReportName: GeneralConstants_1.EMPTY_STRING,
|
|
@@ -214,6 +221,7 @@ function CreateEmptyOpenFinReport() {
|
|
|
214
221
|
function CreateEmptyIPushPullSchedule() {
|
|
215
222
|
return {
|
|
216
223
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
224
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
217
225
|
ScheduleType: Enums_1.ScheduleType.ipushpull,
|
|
218
226
|
Schedule: CreateEmptySchedule(),
|
|
219
227
|
IPushPullReport: CreateEmptyIPushPullReport(),
|
|
@@ -223,6 +231,7 @@ function CreateEmptyIPushPullSchedule() {
|
|
|
223
231
|
function CreateEmptyOpenFinSchedule() {
|
|
224
232
|
return {
|
|
225
233
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
234
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
226
235
|
ScheduleType: Enums_1.ScheduleType.OpenFin,
|
|
227
236
|
Schedule: CreateEmptySchedule(),
|
|
228
237
|
OpenFinReport: CreateEmptyOpenFinReport(),
|
|
@@ -232,6 +241,7 @@ function CreateEmptyOpenFinSchedule() {
|
|
|
232
241
|
function CreateIPushPullSchedule(iPushPullReport) {
|
|
233
242
|
return {
|
|
234
243
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
244
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
235
245
|
ScheduleType: Enums_1.ScheduleType.ipushpull,
|
|
236
246
|
Schedule: CreateEmptySchedule(),
|
|
237
247
|
IPushPullReport: iPushPullReport,
|
|
@@ -241,6 +251,7 @@ function CreateIPushPullSchedule(iPushPullReport) {
|
|
|
241
251
|
function CreateReportSchedule(reportName, reportFormat) {
|
|
242
252
|
return {
|
|
243
253
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
254
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
244
255
|
ScheduleType: Enums_1.ScheduleType.Report,
|
|
245
256
|
Schedule: CreateEmptySchedule(),
|
|
246
257
|
ReportName: reportName,
|
|
@@ -249,7 +260,6 @@ function CreateReportSchedule(reportName, reportFormat) {
|
|
|
249
260
|
}
|
|
250
261
|
function CreateEmptySchedule() {
|
|
251
262
|
return {
|
|
252
|
-
Uuid: (0, Uuid_1.createUuid)(),
|
|
253
263
|
OneOffDate: undefined,
|
|
254
264
|
DaysOfWeek: [],
|
|
255
265
|
Hour: 0,
|
|
@@ -259,6 +269,7 @@ function CreateEmptySchedule() {
|
|
|
259
269
|
function CreateEmptyShortcut() {
|
|
260
270
|
return {
|
|
261
271
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
272
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
262
273
|
Scope: undefined,
|
|
263
274
|
ShortcutKey: GeneralConstants_1.EMPTY_STRING,
|
|
264
275
|
ShortcutValue: undefined,
|
|
@@ -267,6 +278,8 @@ function CreateEmptyShortcut() {
|
|
|
267
278
|
}
|
|
268
279
|
function CreateEmptyFormatColumn() {
|
|
269
280
|
return {
|
|
281
|
+
Uuid: (0, Uuid_1.createUuid)(),
|
|
282
|
+
Name: GeneralConstants_1.EMPTY_STRING,
|
|
270
283
|
Scope: undefined,
|
|
271
284
|
Style: CreateEmptyStyle(),
|
|
272
285
|
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 {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlertTypeWizardSection = exports.renderAlertTypeSummary = void 0;
|
|
3
|
+
exports.AlertTypeWizardSection = exports.renderAlertTypeSummary = exports.isSettingsValid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Tabs_1 = require("../../../components/Tabs");
|
|
@@ -8,21 +8,57 @@ const getAlertType_1 = require("../Utilities/getAlertType");
|
|
|
8
8
|
const TypeRadio_1 = require("../../Wizard/TypeRadio");
|
|
9
9
|
const Tag_1 = require("../../../components/Tag");
|
|
10
10
|
const Flex_1 = require("../../../components/Flex");
|
|
11
|
+
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
12
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
13
|
+
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
14
|
+
const OnePageAdaptableWizard_2 = require("../../Wizard/OnePageAdaptableWizard");
|
|
15
|
+
const isSettingsValid = (data, api) => {
|
|
16
|
+
if (!data.Name?.trim()) {
|
|
17
|
+
return 'Name is required';
|
|
18
|
+
}
|
|
19
|
+
const allAlerts = api.alertApi.getAlertDefinitions();
|
|
20
|
+
const isDuplicateName = allAlerts.some((a) => a.Name === data.Name && a.Uuid !== data.Uuid);
|
|
21
|
+
if (isDuplicateName) {
|
|
22
|
+
return 'An Alert already exists with that name';
|
|
23
|
+
}
|
|
24
|
+
return true;
|
|
25
|
+
};
|
|
26
|
+
exports.isSettingsValid = isSettingsValid;
|
|
11
27
|
const renderAlertTypeSummary = (alertType) => {
|
|
28
|
+
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
12
29
|
const text = (0, getAlertType_1.getAlertTypeText)(alertType);
|
|
13
|
-
return (React.createElement(
|
|
14
|
-
React.createElement(
|
|
30
|
+
return (React.createElement(React.Fragment, null,
|
|
31
|
+
React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
|
|
32
|
+
"Name ",
|
|
33
|
+
React.createElement(Tag_1.Tag, null, data.Name || 'Not specified')),
|
|
34
|
+
React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
|
|
35
|
+
"Type ",
|
|
36
|
+
React.createElement(Tag_1.Tag, null, text))));
|
|
15
37
|
};
|
|
16
38
|
exports.renderAlertTypeSummary = renderAlertTypeSummary;
|
|
17
39
|
const AlertTypeWizardSection = (props) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
40
|
+
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
41
|
+
const handleNameChange = (event) => {
|
|
42
|
+
props.onChange({
|
|
43
|
+
...data,
|
|
44
|
+
Name: event.target.value,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
return (React.createElement(Flex_1.Flex, { flexDirection: "column" },
|
|
48
|
+
React.createElement(Tabs_1.Tabs, null,
|
|
49
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
50
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
51
|
+
React.createElement(FormLayout_1.default, null,
|
|
52
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
53
|
+
React.createElement(Input_1.default, { "data-name": "alert-name", className: "twa:flex-1 twa:max-w-[200px] twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' }))))),
|
|
54
|
+
React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
|
|
55
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Alert Type"),
|
|
56
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
57
|
+
React.createElement(Flex_1.Flex, { flexDirection: "column" },
|
|
58
|
+
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === getAlertType_1.AlertType.DataChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.DataChange) }),
|
|
59
|
+
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === getAlertType_1.AlertType.RowChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.RowChange) }),
|
|
60
|
+
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Aggregation), checked: props.alertType === getAlertType_1.AlertType.Aggregation }),
|
|
61
|
+
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Observable), checked: props.alertType === getAlertType_1.AlertType.Observable }),
|
|
62
|
+
React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === getAlertType_1.AlertType.Validation, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Validation) }))))));
|
|
27
63
|
};
|
|
28
64
|
exports.AlertTypeWizardSection = AlertTypeWizardSection;
|
|
@@ -29,7 +29,7 @@ const AlertWizard = (props) => {
|
|
|
29
29
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
30
30
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
31
31
|
const behaviourSpelling = api.internalApi.getCorrectEnglishVariant('Behaviour');
|
|
32
|
-
const [alertDefinition,
|
|
32
|
+
const [alertDefinition, doSetAlertDefinition] = (0, react_1.useState)(() => {
|
|
33
33
|
const alertDefinition = props.data
|
|
34
34
|
? (0, Helper_1.cloneObject)(props.data)
|
|
35
35
|
: ObjectFactory_1.default.CreateEmptyAlertDefinition();
|
|
@@ -49,6 +49,9 @@ const AlertWizard = (props) => {
|
|
|
49
49
|
alertDefinition.MessageType = alertDefinition.MessageType ?? ObjectDefaultConstants_1.ALERT_DEFAULT_MESSAGE_TYPE;
|
|
50
50
|
return alertDefinition;
|
|
51
51
|
});
|
|
52
|
+
const setAlertDefinition = (0, react_1.useCallback)((data) => {
|
|
53
|
+
doSetAlertDefinition(data);
|
|
54
|
+
}, []);
|
|
52
55
|
// Alert type is based initialy on data, but can be changed by the user
|
|
53
56
|
// the default objects do not neccesary have enough information to determine the type
|
|
54
57
|
const [alertType, setAlertType] = (0, react_1.useState)(() => {
|
|
@@ -63,22 +66,23 @@ const AlertWizard = (props) => {
|
|
|
63
66
|
}
|
|
64
67
|
props.onCloseWizard();
|
|
65
68
|
};
|
|
66
|
-
const updateAlertDefinition = (newAlertDefinition) => {
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
+
const updateAlertDefinition = (0, react_1.useCallback)((newAlertDefinition) => {
|
|
70
|
+
doSetAlertDefinition((0, mapAlertDefinition_1.mapAlertDefinition)(api, newAlertDefinition));
|
|
71
|
+
}, [api]);
|
|
69
72
|
const handleAlertTypeChange = (newAlertType) => {
|
|
70
73
|
setAlertType(newAlertType);
|
|
71
|
-
|
|
74
|
+
doSetAlertDefinition((0, getDefaultAlertDefinition_1.getDefaultAlertDefinition)(alertDefinition, newAlertType));
|
|
72
75
|
};
|
|
73
76
|
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, modal: props.modal, data: alertDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
74
77
|
{
|
|
75
|
-
title: 'Type',
|
|
78
|
+
title: 'Name & Type',
|
|
79
|
+
isValid: AlertTypeWizardSection_1.isSettingsValid,
|
|
76
80
|
details: (React.createElement(React.Fragment, null,
|
|
77
|
-
"
|
|
81
|
+
"Enter Name and select ",
|
|
78
82
|
React.createElement("b", null, "what"),
|
|
79
83
|
" type of change in AdapTable will cause the Alert to fire")),
|
|
80
84
|
render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
81
|
-
React.createElement(AlertTypeWizardSection_1.AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange }))),
|
|
85
|
+
React.createElement(AlertTypeWizardSection_1.AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange, onChange: setAlertDefinition }))),
|
|
82
86
|
renderSummary: () => (0, AlertTypeWizardSection_1.renderAlertTypeSummary)(alertType),
|
|
83
87
|
},
|
|
84
88
|
{
|
|
@@ -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
|
}
|
|
@@ -9,7 +9,7 @@ const CheckBox_1 = require("../../components/CheckBox");
|
|
|
9
9
|
const ColorPicker_1 = require("../../components/ColorPicker");
|
|
10
10
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
|
|
11
11
|
const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
12
|
-
const
|
|
12
|
+
const Tabs_1 = require("../../components/Tabs");
|
|
13
13
|
const Select_1 = require("../../components/Select");
|
|
14
14
|
const StylePreview_1 = require("../../components/StylePreview");
|
|
15
15
|
const Toggle_1 = require("../../components/Toggle");
|
|
@@ -152,25 +152,85 @@ const StyleComponent = (props) => {
|
|
|
152
152
|
const styleClassNames = props.api.userInterfaceApi.getStyleClassNames();
|
|
153
153
|
const colourSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('Colour');
|
|
154
154
|
const coloursSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('colours');
|
|
155
|
-
const fontSizes = ['Default', ...EnumExtensions_1.EnumExtensions.getNames(Enums_1.FontSize)];
|
|
156
155
|
return (React.createElement(Cmp, { ...cmpProps, className: (0, twMerge_1.twMerge)((0, clsx_1.default)('ab-StyleComponent twa:text-3', props.className)) },
|
|
157
|
-
ArrayExtensions_1.default.IsNotNullOrEmpty(styleClassNames)
|
|
158
|
-
React.createElement(
|
|
159
|
-
|
|
160
|
-
React.createElement(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
156
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(styleClassNames) ? (React.createElement(Tabs_1.Tabs, { value: showClassName ? 'classname' : 'createstyle', onValueChange: (value) => onShowClassNameChanged(value === 'classname') },
|
|
157
|
+
React.createElement(Tabs_1.Tabs.Tab, { "data-name": "show-class-name", value: "classname" }, "Use Style Class Name"),
|
|
158
|
+
React.createElement(Tabs_1.Tabs.Tab, { "data-name": "create-style", value: "createstyle" }, "Create Style"),
|
|
159
|
+
React.createElement(Tabs_1.Tabs.Content, { value: "classname" },
|
|
160
|
+
React.createElement(Card_1.Card, { shadow: false },
|
|
161
|
+
React.createElement(Card_1.Card.Title, null, "CSS Class Name"),
|
|
162
|
+
React.createElement(Card_1.Card.Body, { gap: 2, className: "twa:p-1" },
|
|
163
|
+
React.createElement(HelpBlock_1.default, null, "Select a CSS Class Name"),
|
|
164
|
+
React.createElement(Flex_1.Box, { className: "twa:max-w-[15rem]" },
|
|
165
|
+
React.createElement(Select_1.Select, { options: ArrayExtensions_1.default.IsNullOrEmpty(styleClassNames)
|
|
166
|
+
? []
|
|
167
|
+
: styleClassNames.map((item) => ({
|
|
168
|
+
label: item,
|
|
169
|
+
value: item,
|
|
170
|
+
})), value: componentStyle.ClassName, onChange: (value) => onStyleClassNameChanged(value) })),
|
|
171
|
+
React.createElement(Flex_1.Box, { className: "twa:m-2 twa:flex-2 twa:text-warn" }, 'Please ensure that the styles listed are in the current stylesheet')))),
|
|
172
|
+
React.createElement(Tabs_1.Tabs.Content, { value: "createstyle" },
|
|
173
|
+
React.createElement(Flex_1.Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row" },
|
|
174
|
+
React.createElement(Card_1.Card, { shadow: false, className: "twa:flex-1" },
|
|
175
|
+
React.createElement(Card_1.Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1" },
|
|
176
|
+
React.createElement(Card_1.Card.Title, { className: "twa:col-span-2" },
|
|
177
|
+
colourSpellingVariant,
|
|
178
|
+
" & Border Properties"),
|
|
179
|
+
React.createElement(HelpBlock_1.default, { className: "twa:col-span-2" },
|
|
180
|
+
"Set ",
|
|
181
|
+
coloursSpellingVariant,
|
|
182
|
+
" by ticking a checkbox and selecting from the dropdown; leave unchecked to use cell's existing ",
|
|
183
|
+
coloursSpellingVariant),
|
|
184
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "set-background-color", value: "existing", checked: !!componentStyle.BackColor, onChange: (checked) => onUseBackColorCheckChange(checked) },
|
|
185
|
+
"Back ",
|
|
186
|
+
colourSpellingVariant),
|
|
187
|
+
React.createElement(ColorPicker_1.ColorPicker, { disabled: componentStyle.BackColor == null, api: props.api, value: componentStyle.BackColor || '#ffffff', onChange: (x) => onBackColorSelectChange(x) }),
|
|
188
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "set-foreground-color", value: "existing", className: "twa:row-start-4", checked: componentStyle.ForeColor ? true : false, onChange: (checked) => onUseForeColorCheckChange(checked) },
|
|
189
|
+
"Fore ",
|
|
190
|
+
colourSpellingVariant),
|
|
191
|
+
React.createElement(ColorPicker_1.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) }),
|
|
192
|
+
React.createElement(CheckBox_1.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) },
|
|
193
|
+
"Border ",
|
|
194
|
+
colourSpellingVariant),
|
|
195
|
+
React.createElement(ColorPicker_1.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) }),
|
|
196
|
+
React.createElement("span", { className: "twa:row-start-6" }, "Border Radius"),
|
|
197
|
+
React.createElement(AdaptableInput_1.default, { className: "twa:w-[100px] twa:row-start-6", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
|
|
198
|
+
const number = Number(event.target.value);
|
|
199
|
+
if (isNaN(number)) {
|
|
200
|
+
onBorderRadiusChange(0);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
onBorderRadiusChange(number);
|
|
204
|
+
}
|
|
205
|
+
} }),
|
|
206
|
+
React.createElement(Card_1.Card.Title, { className: "twa:col-span-2 twa:col-start-3 twa:row-start-1" }, "Font Properties"),
|
|
207
|
+
React.createElement(HelpBlock_1.default, { className: "twa:self-stretch twa:col-span-2 twa:col-start-3 twa:row-start-2" }, "Set the font properties of the Style"),
|
|
208
|
+
React.createElement("span", null, "Font Style"),
|
|
209
|
+
React.createElement(Toggle_1.ToggleGroup, null,
|
|
210
|
+
React.createElement(Toggle_1.Toggle, { pressed: componentStyle.FontStyle == Enums_1.FontStyle.Italic, onPressedChange: (checked) => onFontStyleChange(checked), icon: "italic" }),
|
|
211
|
+
React.createElement(Toggle_1.Toggle, { pressed: componentStyle.FontWeight == Enums_1.FontWeight.Bold, onPressedChange: (checked) => onFontWeightChange(checked), icon: "bold" })),
|
|
212
|
+
React.createElement("span", null, "Text Decoration"),
|
|
213
|
+
React.createElement(Toggle_1.ToggleGroup, null,
|
|
214
|
+
React.createElement(Toggle_1.Toggle, { icon: "underline", pressed: componentStyle.TextDecoration === 'Underline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Underline' : 'None') }),
|
|
215
|
+
React.createElement(Toggle_1.Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
|
|
216
|
+
React.createElement(Toggle_1.Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })),
|
|
217
|
+
React.createElement("span", null, "Font Size"),
|
|
218
|
+
React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center" },
|
|
219
|
+
React.createElement(Select_1.Select, { placeholder: "Default", options: [
|
|
220
|
+
{
|
|
221
|
+
label: 'Default',
|
|
222
|
+
value: '',
|
|
223
|
+
},
|
|
224
|
+
...EnumExtensions_1.EnumExtensions.getNames(Enums_1.FontSize).map((enumName) => ({
|
|
225
|
+
label: enumName,
|
|
226
|
+
value: enumName,
|
|
227
|
+
})),
|
|
228
|
+
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) })),
|
|
229
|
+
React.createElement("span", null, "Alignment"),
|
|
230
|
+
React.createElement(Toggle_1.ToggleGroup, null,
|
|
231
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }),
|
|
232
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }),
|
|
233
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })))))))) : (React.createElement(Flex_1.Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row" },
|
|
174
234
|
React.createElement(Card_1.Card, { shadow: false, className: "twa:flex-1" },
|
|
175
235
|
React.createElement(Card_1.Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1" },
|
|
176
236
|
React.createElement(Card_1.Card.Title, { className: "twa:col-span-2" },
|
|
@@ -215,7 +275,7 @@ const StyleComponent = (props) => {
|
|
|
215
275
|
React.createElement(Toggle_1.Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
|
|
216
276
|
React.createElement(Toggle_1.Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })),
|
|
217
277
|
React.createElement("span", null, "Font Size"),
|
|
218
|
-
|
|
278
|
+
React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center" },
|
|
219
279
|
React.createElement(Select_1.Select, { placeholder: "Default", options: [
|
|
220
280
|
{
|
|
221
281
|
label: 'Default',
|
|
@@ -225,21 +285,12 @@ const StyleComponent = (props) => {
|
|
|
225
285
|
label: enumName,
|
|
226
286
|
value: enumName,
|
|
227
287
|
})),
|
|
228
|
-
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) }))
|
|
229
|
-
return (React.createElement(Radio_1.default, { onClick: () => onFontSizeChange(enumName), checked: (enumName == 'Default' && !componentStyle.FontSize) ||
|
|
230
|
-
componentStyle.FontSize === enumName, key: enumName }, enumName));
|
|
231
|
-
}))),
|
|
288
|
+
], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) })),
|
|
232
289
|
React.createElement("span", null, "Alignment"),
|
|
233
290
|
React.createElement(Toggle_1.ToggleGroup, null,
|
|
234
|
-
React.createElement(Toggle_1.Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
React.createElement(Toggle_1.Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed
|
|
238
|
-
? onAlignmentChange('Center')
|
|
239
|
-
: onAlignmentChange('Default') }),
|
|
240
|
-
React.createElement(Toggle_1.Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed
|
|
241
|
-
? onAlignmentChange('Right')
|
|
242
|
-
: onAlignmentChange('Default') })))))),
|
|
291
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }),
|
|
292
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }),
|
|
293
|
+
React.createElement(Toggle_1.Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })))))),
|
|
243
294
|
!props.hidePreview && (React.createElement(Card_1.Card, { shadow: false },
|
|
244
295
|
React.createElement(Card_1.Card.Title, null, "Preview"),
|
|
245
296
|
React.createElement(Card_1.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;
|