@adaptabletools/adaptable-cjs 18.0.0 → 18.0.2-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Api/ColumnApi.d.ts +2 -2
- package/src/Api/ConfigApi.d.ts +9 -3
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ConfigApiImpl.js +5 -1
- 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.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "18.0.0",
|
|
3
|
+
"version": "18.0.2-canary.0",
|
|
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
|
package/src/Api/ConfigApi.d.ts
CHANGED
|
@@ -21,11 +21,17 @@ import { AdaptableSearchState, AdaptableSortState, NamedQueryState, PredefinedCo
|
|
|
21
21
|
*/
|
|
22
22
|
export interface ConfigApi {
|
|
23
23
|
/**
|
|
24
|
-
* Changes the key used for persisting the AdaptableState into localStorage
|
|
25
|
-
* @param adaptableStateKey key for persisting the AdaptableState into localStorage
|
|
24
|
+
* Changes the key used for persisting the AdaptableState into localStorage. Optionally provides a predefinedConfig to load.
|
|
25
|
+
* @param adaptableStateKey - key for persisting the AdaptableState into localStorage
|
|
26
|
+
* @param config.predefinedConfig - new predefinedConfig to load
|
|
27
|
+
* @param config.flushCurrentState - whether to flush(persist) the current state before loading the new predefinedConfig
|
|
28
|
+
* @param config.progressIndicatorLabel - label for the progress indicator
|
|
29
|
+
*
|
|
26
30
|
*/
|
|
27
31
|
setAdaptableStateKey(adaptableStateKey: string, config?: {
|
|
28
|
-
predefinedConfig
|
|
32
|
+
predefinedConfig?: PredefinedConfig;
|
|
33
|
+
flushCurrentState?: boolean;
|
|
34
|
+
progressIndicatorLabel?: string;
|
|
29
35
|
}): Promise<void>;
|
|
30
36
|
/**
|
|
31
37
|
* Returns current Predefined Config
|
|
@@ -37,8 +37,9 @@ export declare class ConfigApiImpl extends ApiBase implements ConfigApi {
|
|
|
37
37
|
getAdaptableSortState(): AdaptableSortState;
|
|
38
38
|
getAdaptableOptions(): Readonly<AdaptableOptions>;
|
|
39
39
|
setAdaptableStateKey(adaptableStateKey: string, config?: {
|
|
40
|
-
predefinedConfig
|
|
40
|
+
predefinedConfig?: PredefinedConfig;
|
|
41
41
|
flushCurrentState?: boolean;
|
|
42
|
+
progressIndicatorLabel?: string;
|
|
42
43
|
}): Promise<void>;
|
|
43
44
|
getDescriptionForModule(module: AdaptableModule): string;
|
|
44
45
|
getHelpPageForModule(module: AdaptableModule): string;
|
|
@@ -114,7 +114,8 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
114
114
|
}
|
|
115
115
|
setAdaptableStateKey(adaptableStateKey, config) {
|
|
116
116
|
return new Promise((resolve, reject) => {
|
|
117
|
-
|
|
117
|
+
var _a;
|
|
118
|
+
this.getAdaptableApi().internalApi.executeWithProgressIndicator((_a = config === null || config === void 0 ? void 0 : config.progressIndicatorLabel) !== null && _a !== void 0 ? _a : `Initialising...`, () => {
|
|
118
119
|
const flushCurrentState = !config || config.flushCurrentState !== false;
|
|
119
120
|
// make sure we persist any "pending" changes to state - since stateOptions.debounceStateDelay can cause
|
|
120
121
|
// the state to be persisted with a delay, which we dont want in this case
|
|
@@ -149,6 +150,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
149
150
|
})
|
|
150
151
|
.catch((e) => {
|
|
151
152
|
this.logError('Error setting Adaptable State Key', e);
|
|
153
|
+
})
|
|
154
|
+
.finally(() => {
|
|
155
|
+
this.getUserInterfaceApi().hideProgressIndicator();
|
|
152
156
|
});
|
|
153
157
|
});
|
|
154
158
|
});
|
|
@@ -19,7 +19,7 @@ const parseCSV = (content) => {
|
|
|
19
19
|
const item = {};
|
|
20
20
|
for (let j = 0; j < headers.length; j++) {
|
|
21
21
|
const value = values[j];
|
|
22
|
-
item[headers[j]] = value === '' || isNaN(Number(value)) ? value : Number(value);
|
|
22
|
+
item[headers[j]] = value === '' || isNaN(Number(value)) ? value : Number(value); // '0012345'
|
|
23
23
|
}
|
|
24
24
|
data.push(item);
|
|
25
25
|
}
|
|
@@ -11,6 +11,7 @@ const AdaptableContext_1 = require("../AdaptableContext");
|
|
|
11
11
|
const AdaptableButton_1 = require("../Components/AdaptableButton");
|
|
12
12
|
const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
13
13
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
14
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
14
15
|
const tableDOMProps = {
|
|
15
16
|
style: {
|
|
16
17
|
height: '100%',
|
|
@@ -21,7 +22,9 @@ const tableDOMProps = {
|
|
|
21
22
|
const NotePopup = (props) => {
|
|
22
23
|
var _a, _b, _c, _d;
|
|
23
24
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
24
|
-
const primaryKeyHeader = adaptable.api.columnApi.
|
|
25
|
+
const primaryKeyHeader = adaptable.api.columnApi.getPrimaryKeyColumn()
|
|
26
|
+
? adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId)
|
|
27
|
+
: StringExtensions_1.default.Humanize(adaptable.adaptableOptions.primaryKey);
|
|
25
28
|
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 : GeneralConstants_1.DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
|
|
26
29
|
const allNotes = (0, react_redux_1.useSelector)((state) => (0, NoteRedux_1.GetAllNotesSelector)(state.Note));
|
|
27
30
|
const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
|
|
@@ -81,7 +81,23 @@ const StyledColumnWizard = (props) => {
|
|
|
81
81
|
React.createElement(StyledColumnWizardStyleSection_1.StyledColumnWizardStyleSection, { onChange: setStyledColumn })));
|
|
82
82
|
},
|
|
83
83
|
title: 'Style',
|
|
84
|
-
|
|
84
|
+
isValid: () => {
|
|
85
|
+
var _a, _b, _c;
|
|
86
|
+
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;
|
|
87
|
+
return columnComparison
|
|
88
|
+
? columnComparison.MaxValue == undefined && columnComparison.MinValue == undefined
|
|
89
|
+
? 'Define Min and Max Values for the Column Comparison'
|
|
90
|
+
: columnComparison.MaxValue == undefined
|
|
91
|
+
? 'Define a Max Value for the Column Comparison'
|
|
92
|
+
: columnComparison.MinValue == undefined
|
|
93
|
+
? 'Define a Min Value for the Column Comparison'
|
|
94
|
+
: true
|
|
95
|
+
: true;
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
// Only available for Badge
|
|
99
|
+
// AdditionalSettingSection
|
|
100
|
+
);
|
|
85
101
|
}
|
|
86
102
|
else if (styledColumn.BadgeStyle) {
|
|
87
103
|
specificSteps.push({
|
|
@@ -61,6 +61,10 @@ const getColumnComparison = (columnComparison, api) => {
|
|
|
61
61
|
} })));
|
|
62
62
|
};
|
|
63
63
|
const renderStyledColumnStyleSummary = (data, api) => {
|
|
64
|
+
if (!api) {
|
|
65
|
+
const { api: adaptableApi } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
66
|
+
api = adaptableApi;
|
|
67
|
+
}
|
|
64
68
|
if (data.GradientStyle) {
|
|
65
69
|
if (data.GradientStyle.CellRanges) {
|
|
66
70
|
return getRanges(data.GradientStyle.CellRanges, data.GradientStyle.RangeValueType);
|
|
@@ -97,8 +101,10 @@ const StyledColumnWizardStyleSection = (props) => {
|
|
|
97
101
|
const scope = { ColumnIds: [data.ColumnId] }; // TODO: remove scope when format column columnStyle is removed
|
|
98
102
|
// gradient
|
|
99
103
|
const onUpdateGradientStyleRanges = (ranges) => {
|
|
100
|
-
const
|
|
101
|
-
|
|
104
|
+
const gradientStyle = Object.assign(Object.assign({}, data.GradientStyle), { CellRanges: ranges });
|
|
105
|
+
// delete gradientStyle.ColumnComparison in case we are switching from ColumnComparison to CellRanges
|
|
106
|
+
delete gradientStyle.ColumnComparison;
|
|
107
|
+
props.onChange(Object.assign(Object.assign({}, data), { GradientStyle: gradientStyle }));
|
|
102
108
|
};
|
|
103
109
|
const onUpdateGradientStyleColumnComparison = (columnComparison) => {
|
|
104
110
|
const GradientStyle = {
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "18.0.0" || '--current-version--',
|
|
5
|
+
PUBLISH_TIMESTAMP: 1713452251297 || Date.now(),
|
|
6
|
+
VERSION: "18.0.2-canary.0" || '--current-version--',
|
|
7
7
|
};
|