@adaptabletools/adaptable 18.0.1 → 18.0.2
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/package.json +1 -1
- package/src/Api/ColumnApi.d.ts +2 -2
- package/src/View/DataImport/systemFileHandlers.js +1 -1
- package/src/View/Note/NotePopup.js +4 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +17 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +8 -2
- package/src/env.js +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.2",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -250,9 +250,9 @@ export interface ColumnApi {
|
|
|
250
250
|
*/
|
|
251
251
|
isColumnInGrid(columnId: string): boolean;
|
|
252
252
|
/**
|
|
253
|
-
* Retrieves current Primary Key Column in AdapTable
|
|
253
|
+
* Retrieves current Primary Key Column in AdapTable. It may be undefined if the primary key is auto-generated, or it is NOT mapped to a column.
|
|
254
254
|
*/
|
|
255
|
-
getPrimaryKeyColumn(): AdaptableColumn;
|
|
255
|
+
getPrimaryKeyColumn(): AdaptableColumn | undefined;
|
|
256
256
|
/**
|
|
257
257
|
* Returns the default Aggregation Function for a Column
|
|
258
258
|
* @param columnId Column to Check
|
|
@@ -16,7 +16,7 @@ export const parseCSV = (content) => {
|
|
|
16
16
|
const item = {};
|
|
17
17
|
for (let j = 0; j < headers.length; j++) {
|
|
18
18
|
const value = values[j];
|
|
19
|
-
item[headers[j]] = value === '' || isNaN(Number(value)) ? value : Number(value);
|
|
19
|
+
item[headers[j]] = value === '' || isNaN(Number(value)) ? value : Number(value); // '0012345'
|
|
20
20
|
}
|
|
21
21
|
data.push(item);
|
|
22
22
|
}
|
|
@@ -7,6 +7,7 @@ import { useAdaptable } from '../AdaptableContext';
|
|
|
7
7
|
import { AdaptableButtonComponent } from '../Components/AdaptableButton';
|
|
8
8
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
9
9
|
import { DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME } from '../../Utilities/Constants/GeneralConstants';
|
|
10
|
+
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
10
11
|
const tableDOMProps = {
|
|
11
12
|
style: {
|
|
12
13
|
height: '100%',
|
|
@@ -17,7 +18,9 @@ const tableDOMProps = {
|
|
|
17
18
|
export const NotePopup = (props) => {
|
|
18
19
|
var _a, _b, _c, _d;
|
|
19
20
|
const adaptable = useAdaptable();
|
|
20
|
-
const primaryKeyHeader = adaptable.api.columnApi.
|
|
21
|
+
const primaryKeyHeader = adaptable.api.columnApi.getPrimaryKeyColumn()
|
|
22
|
+
? adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId)
|
|
23
|
+
: StringExtensions.Humanize(adaptable.adaptableOptions.primaryKey);
|
|
21
24
|
const dateFormat = (_d = (_c = (_b = (_a = adaptable.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getNoteOptions) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.dateFormat) !== null && _d !== void 0 ? _d : DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
|
|
22
25
|
const allNotes = useSelector((state) => GetAllNotesSelector(state.Note));
|
|
23
26
|
const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
|
|
@@ -77,7 +77,23 @@ export const StyledColumnWizard = (props) => {
|
|
|
77
77
|
React.createElement(StyledColumnWizardStyleSection, { onChange: setStyledColumn })));
|
|
78
78
|
},
|
|
79
79
|
title: 'Style',
|
|
80
|
-
|
|
80
|
+
isValid: () => {
|
|
81
|
+
var _a, _b, _c;
|
|
82
|
+
const columnComparison = (_b = (_a = styledColumn.GradientStyle) === null || _a === void 0 ? void 0 : _a.ColumnComparison) !== null && _b !== void 0 ? _b : (_c = styledColumn.PercentBarStyle) === null || _c === void 0 ? void 0 : _c.ColumnComparison;
|
|
83
|
+
return columnComparison
|
|
84
|
+
? columnComparison.MaxValue == undefined && columnComparison.MinValue == undefined
|
|
85
|
+
? 'Define Min and Max Values for the Column Comparison'
|
|
86
|
+
: columnComparison.MaxValue == undefined
|
|
87
|
+
? 'Define a Max Value for the Column Comparison'
|
|
88
|
+
: columnComparison.MinValue == undefined
|
|
89
|
+
? 'Define a Min Value for the Column Comparison'
|
|
90
|
+
: true
|
|
91
|
+
: true;
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
// Only available for Badge
|
|
95
|
+
// AdditionalSettingSection
|
|
96
|
+
);
|
|
81
97
|
}
|
|
82
98
|
else if (styledColumn.BadgeStyle) {
|
|
83
99
|
specificSteps.push({
|
|
@@ -56,6 +56,10 @@ const getColumnComparison = (columnComparison, api) => {
|
|
|
56
56
|
} })));
|
|
57
57
|
};
|
|
58
58
|
export const renderStyledColumnStyleSummary = (data, api) => {
|
|
59
|
+
if (!api) {
|
|
60
|
+
const { api: adaptableApi } = useOnePageAdaptableWizardContext();
|
|
61
|
+
api = adaptableApi;
|
|
62
|
+
}
|
|
59
63
|
if (data.GradientStyle) {
|
|
60
64
|
if (data.GradientStyle.CellRanges) {
|
|
61
65
|
return getRanges(data.GradientStyle.CellRanges, data.GradientStyle.RangeValueType);
|
|
@@ -91,8 +95,10 @@ export const StyledColumnWizardStyleSection = (props) => {
|
|
|
91
95
|
const scope = { ColumnIds: [data.ColumnId] }; // TODO: remove scope when format column columnStyle is removed
|
|
92
96
|
// gradient
|
|
93
97
|
const onUpdateGradientStyleRanges = (ranges) => {
|
|
94
|
-
const
|
|
95
|
-
|
|
98
|
+
const gradientStyle = Object.assign(Object.assign({}, data.GradientStyle), { CellRanges: ranges });
|
|
99
|
+
// delete gradientStyle.ColumnComparison in case we are switching from ColumnComparison to CellRanges
|
|
100
|
+
delete gradientStyle.ColumnComparison;
|
|
101
|
+
props.onChange(Object.assign(Object.assign({}, data), { GradientStyle: gradientStyle }));
|
|
96
102
|
};
|
|
97
103
|
const onUpdateGradientStyleColumnComparison = (columnComparison) => {
|
|
98
104
|
const GradientStyle = {
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "18.0.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1713453383420 || Date.now(),
|
|
4
|
+
VERSION: "18.0.2" || '--current-version--',
|
|
5
5
|
};
|