@adaptabletools/adaptable-vue3-aggrid-cjs 23.0.4 → 23.0.5-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +0 -64
- package/lib/AdaptableAgGridVue.js +0 -33
- package/lib/AdaptableProvider.js +0 -10
- package/lib/AdaptableUI.js +0 -12
- package/lib/utils.js +0 -1
- package/package.json +2 -2
package/index.css
CHANGED
|
@@ -420,12 +420,6 @@
|
|
|
420
420
|
.twa\:mx-3 {
|
|
421
421
|
margin-inline: calc(var(--ab-base-space) * 3);
|
|
422
422
|
}
|
|
423
|
-
.twa\:mx-\[1px\] {
|
|
424
|
-
margin-inline: 1px;
|
|
425
|
-
}
|
|
426
|
-
.twa\:mx-\[px\] {
|
|
427
|
-
margin-inline: px;
|
|
428
|
-
}
|
|
429
423
|
.twa\:my-0 {
|
|
430
424
|
margin-block: 0;
|
|
431
425
|
}
|
|
@@ -444,9 +438,6 @@
|
|
|
444
438
|
.twa\:my-3 {
|
|
445
439
|
margin-block: calc(var(--ab-base-space) * 3);
|
|
446
440
|
}
|
|
447
|
-
.twa\:my-\[2px\] {
|
|
448
|
-
margin-block: 2px;
|
|
449
|
-
}
|
|
450
441
|
.twa\:\!mt-0 {
|
|
451
442
|
margin-top: 0 !important;
|
|
452
443
|
}
|
|
@@ -498,9 +489,6 @@
|
|
|
498
489
|
.twa\:mr-6 {
|
|
499
490
|
margin-right: calc(var(--ab-base-space) * 6);
|
|
500
491
|
}
|
|
501
|
-
.twa\:mr-\[2px\] {
|
|
502
|
-
margin-right: 2px;
|
|
503
|
-
}
|
|
504
492
|
.twa\:mb-0 {
|
|
505
493
|
margin-bottom: 0;
|
|
506
494
|
}
|
|
@@ -1161,9 +1149,6 @@
|
|
|
1161
1149
|
.twa\:min-w-\[min\(calc\(var\(--anchor-width\)\+--spacing\(7\)\)\,var\(--available-width\)\,80vw\)\] {
|
|
1162
1150
|
min-width: min(calc(var(--anchor-width) + calc(var(--ab-base-space) * 7)), var(--available-width), 80vw);
|
|
1163
1151
|
}
|
|
1164
|
-
.twa\:min-w-max {
|
|
1165
|
-
min-width: max-content;
|
|
1166
|
-
}
|
|
1167
1152
|
.twa\:flex-0 {
|
|
1168
1153
|
flex: 0;
|
|
1169
1154
|
}
|
|
@@ -1700,18 +1685,6 @@
|
|
|
1700
1685
|
.twa\:bg-accentlight {
|
|
1701
1686
|
background-color: var(--ab-color-accentlight);
|
|
1702
1687
|
}
|
|
1703
|
-
.twa\:bg-action-clone {
|
|
1704
|
-
background-color: var(--ab-color-action-clone);
|
|
1705
|
-
}
|
|
1706
|
-
.twa\:bg-action-delete {
|
|
1707
|
-
background-color: var(--ab-color-action-delete);
|
|
1708
|
-
}
|
|
1709
|
-
.twa\:bg-action-edit {
|
|
1710
|
-
background-color: var(--ab-color-action-edit);
|
|
1711
|
-
}
|
|
1712
|
-
.twa\:bg-action-share {
|
|
1713
|
-
background-color: var(--ab-color-action-share);
|
|
1714
|
-
}
|
|
1715
1688
|
.twa\:bg-background {
|
|
1716
1689
|
background-color: var(--ab-color-background);
|
|
1717
1690
|
}
|
|
@@ -1798,18 +1771,6 @@
|
|
|
1798
1771
|
.twa\:bg-clip-padding {
|
|
1799
1772
|
background-clip: padding-box;
|
|
1800
1773
|
}
|
|
1801
|
-
.twa\:fill-action-clone-foreground {
|
|
1802
|
-
fill: var(--ab-color-action-clone-foreground);
|
|
1803
|
-
}
|
|
1804
|
-
.twa\:fill-action-delete-foreground {
|
|
1805
|
-
fill: var(--ab-color-action-delete-foreground);
|
|
1806
|
-
}
|
|
1807
|
-
.twa\:fill-action-edit-foreground {
|
|
1808
|
-
fill: var(--ab-color-action-edit-foreground);
|
|
1809
|
-
}
|
|
1810
|
-
.twa\:fill-action-share-foreground {
|
|
1811
|
-
fill: var(--ab-color-action-share-foreground);
|
|
1812
|
-
}
|
|
1813
1774
|
.twa\:fill-current {
|
|
1814
1775
|
fill: currentcolor;
|
|
1815
1776
|
}
|
|
@@ -2144,18 +2105,6 @@
|
|
|
2144
2105
|
.twa\:text-accentlight {
|
|
2145
2106
|
color: var(--ab-color-accentlight);
|
|
2146
2107
|
}
|
|
2147
|
-
.twa\:text-action-clone-foreground {
|
|
2148
|
-
color: var(--ab-color-action-clone-foreground);
|
|
2149
|
-
}
|
|
2150
|
-
.twa\:text-action-delete-foreground {
|
|
2151
|
-
color: var(--ab-color-action-delete-foreground);
|
|
2152
|
-
}
|
|
2153
|
-
.twa\:text-action-edit-foreground {
|
|
2154
|
-
color: var(--ab-color-action-edit-foreground);
|
|
2155
|
-
}
|
|
2156
|
-
.twa\:text-action-share-foreground {
|
|
2157
|
-
color: var(--ab-color-action-share-foreground);
|
|
2158
|
-
}
|
|
2159
2108
|
.twa\:text-background {
|
|
2160
2109
|
color: var(--ab-color-background);
|
|
2161
2110
|
}
|
|
@@ -6532,15 +6481,6 @@
|
|
|
6532
6481
|
input.ab-Radio-input:checked:disabled::after {
|
|
6533
6482
|
background-color: #656565;
|
|
6534
6483
|
}
|
|
6535
|
-
.ab-Table td,.ab-Table th {
|
|
6536
|
-
padding: calc(var(--ab-base-space) * 2);
|
|
6537
|
-
}
|
|
6538
|
-
.ab-Table th {
|
|
6539
|
-
border-bottom: 2px solid var(--ab-color-primarydark);
|
|
6540
|
-
}
|
|
6541
|
-
.ab-Table tr:not(last-child) td {
|
|
6542
|
-
border-bottom: 1px solid var(--ab-color-primarylight);
|
|
6543
|
-
}
|
|
6544
6484
|
.ab-CheckBox,.ab-CheckBox *,.ab-CheckBox *:before,.ab-CheckBox *:after {
|
|
6545
6485
|
box-sizing: border-box;
|
|
6546
6486
|
}
|
|
@@ -6936,10 +6876,6 @@
|
|
|
6936
6876
|
.ab-FileDroppable,.ab-FileDroppable *,.ab-FileDroppable *:before,.ab-FileDroppable *:after {
|
|
6937
6877
|
box-sizing: border-box;
|
|
6938
6878
|
}
|
|
6939
|
-
.ab-WizardPanel > .ab-Panel__body {
|
|
6940
|
-
display: flex;
|
|
6941
|
-
flex-flow: column;
|
|
6942
|
-
}
|
|
6943
6879
|
.ab-Dashboard {
|
|
6944
6880
|
z-index: 1000;
|
|
6945
6881
|
user-select: none;
|
|
@@ -17,34 +17,12 @@ const PASS_THROUGH_PROPS = [
|
|
|
17
17
|
];
|
|
18
18
|
const watch = _ALL_GRID_OPTIONS_KEYS.reduce((acc, key) => {
|
|
19
19
|
acc[key] = function (newValue) {
|
|
20
|
-
/**
|
|
21
|
-
* We need to unwrap all potential refs inside the new grid option.
|
|
22
|
-
*/
|
|
23
20
|
this.agGridApi.setGridOption(key, (0, utils_1.deepToRaw)(newValue));
|
|
24
21
|
};
|
|
25
22
|
return acc;
|
|
26
23
|
}, {});
|
|
27
24
|
exports.AdaptableAgGridVue = (0, vue_1.defineComponent)({
|
|
28
25
|
name: 'adaptable-ag-grid-vue',
|
|
29
|
-
/**
|
|
30
|
-
* Ag-Grid Vue only has typings for a few props, of which a few cannot find docs:
|
|
31
|
-
* - gridOptions
|
|
32
|
-
* - modules
|
|
33
|
-
*
|
|
34
|
-
* Not documented
|
|
35
|
-
* - componentDependencies
|
|
36
|
-
* - plugins
|
|
37
|
-
* - modelValue
|
|
38
|
-
*
|
|
39
|
-
* Other props have a flag of 'VUE_OMITTED_PROPERTY', that work, but are not typed.
|
|
40
|
-
* https://github.com/ag-grid/ag-grid/blob/latest/packages/ag-grid-vue3/src/Utils.ts#L16
|
|
41
|
-
*
|
|
42
|
-
* We let pass through:
|
|
43
|
-
* - class
|
|
44
|
-
* - style
|
|
45
|
-
*
|
|
46
|
-
* The rest we add to gridOptions, and we intercept when they change
|
|
47
|
-
*/
|
|
48
26
|
props: {
|
|
49
27
|
class: {
|
|
50
28
|
type: String,
|
|
@@ -54,7 +32,6 @@ exports.AdaptableAgGridVue = (0, vue_1.defineComponent)({
|
|
|
54
32
|
type: [String, Object],
|
|
55
33
|
required: false,
|
|
56
34
|
},
|
|
57
|
-
// Internal types, that are passed through, defined in ag-grid-vue3.
|
|
58
35
|
modelValue: {
|
|
59
36
|
type: Array,
|
|
60
37
|
default: undefined,
|
|
@@ -65,8 +42,6 @@ exports.AdaptableAgGridVue = (0, vue_1.defineComponent)({
|
|
|
65
42
|
default: () => [],
|
|
66
43
|
},
|
|
67
44
|
plugins: [],
|
|
68
|
-
// These are not defined in AgGridVue typings
|
|
69
|
-
// But are useful for users to control via props
|
|
70
45
|
columnDefs: {
|
|
71
46
|
type: Array,
|
|
72
47
|
required: false,
|
|
@@ -75,11 +50,6 @@ exports.AdaptableAgGridVue = (0, vue_1.defineComponent)({
|
|
|
75
50
|
setup(props) {
|
|
76
51
|
const { class: className, style } = props;
|
|
77
52
|
const { gridOptions, transition, setAgGridProps, setTransition, modules, agGridApi } = (0, vue_1.inject)(AdaptableProviderContext_1.AdaptableProviderContextKey);
|
|
78
|
-
/**
|
|
79
|
-
* We pick up props that are on gridOptions.
|
|
80
|
-
* We send these to the the provider, where are added to gridOptions.
|
|
81
|
-
* These props do not make it to the AgGridVue component.
|
|
82
|
-
*/
|
|
83
53
|
const agGridProps = Object.entries(props).reduce((acc, [key, value]) => {
|
|
84
54
|
if (PASS_THROUGH_PROPS.includes(key)) {
|
|
85
55
|
return acc;
|
|
@@ -108,9 +78,6 @@ exports.AdaptableAgGridVue = (0, vue_1.defineComponent)({
|
|
|
108
78
|
if (this.transition !== AdaptableProviderContext_1.AdaptableAgGridStateTransitions.INITIALIZE_AG_GRID) {
|
|
109
79
|
return null;
|
|
110
80
|
}
|
|
111
|
-
/**
|
|
112
|
-
* We pass through props that are internal, and adaptable does not use/change.
|
|
113
|
-
*/
|
|
114
81
|
const passedThroughProps = Object.entries(this.$props).reduce((acc, [key, value]) => {
|
|
115
82
|
if (!PASS_THROUGH_PROPS.includes(key)) {
|
|
116
83
|
return acc;
|
package/lib/AdaptableProvider.js
CHANGED
|
@@ -3,10 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AdaptableProvider = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const AdaptableProviderContext_1 = require("./AdaptableProviderContext");
|
|
6
|
-
/**
|
|
7
|
-
* The provider handles the communication between the Adaptable and Ag-Grid.
|
|
8
|
-
* Steps are very similar to the react wrapper.
|
|
9
|
-
*/
|
|
10
6
|
exports.AdaptableProvider = (0, vue_1.defineComponent)({
|
|
11
7
|
name: 'adaptable-provider',
|
|
12
8
|
props: {
|
|
@@ -34,7 +30,6 @@ exports.AdaptableProvider = (0, vue_1.defineComponent)({
|
|
|
34
30
|
},
|
|
35
31
|
setup(props, { emit }) {
|
|
36
32
|
const currentTransition = (0, vue_1.ref)(AdaptableProviderContext_1.AdaptableAgGridStateTransitions.AG_GRID_EMIT_PROPS);
|
|
37
|
-
// destructure gridOptions, to ensure we don't mutate the outer object
|
|
38
33
|
const gridOptions = (0, vue_1.ref)({ ...props.gridOptions });
|
|
39
34
|
const agGridApi = (0, vue_1.ref)(null);
|
|
40
35
|
const agGridProps = (0, vue_1.ref)(null);
|
|
@@ -61,7 +56,6 @@ exports.AdaptableProvider = (0, vue_1.defineComponent)({
|
|
|
61
56
|
setTransition: (transition) => {
|
|
62
57
|
currentTransition.value = transition;
|
|
63
58
|
},
|
|
64
|
-
// AG GRID
|
|
65
59
|
modules: props.modules,
|
|
66
60
|
gridOptions,
|
|
67
61
|
setGridOptions: (gridOptions) => {
|
|
@@ -72,7 +66,6 @@ exports.AdaptableProvider = (0, vue_1.defineComponent)({
|
|
|
72
66
|
setAgGridProps: (props) => {
|
|
73
67
|
agGridProps.value = props;
|
|
74
68
|
},
|
|
75
|
-
// ADAPTABLE
|
|
76
69
|
renderAgGridFrameworkComponent,
|
|
77
70
|
onAdaptableReady(adaptableReadyInfo) {
|
|
78
71
|
emit('onAdaptableReady', adaptableReadyInfo);
|
|
@@ -82,9 +75,6 @@ exports.AdaptableProvider = (0, vue_1.defineComponent)({
|
|
|
82
75
|
(0, vue_1.provide)(AdaptableProviderContext_1.AdaptableProviderContextKey, context);
|
|
83
76
|
},
|
|
84
77
|
render() {
|
|
85
|
-
/**
|
|
86
|
-
* This just renders whatever are passed as children.
|
|
87
|
-
*/
|
|
88
78
|
return this.$slots.default && this.$slots.default();
|
|
89
79
|
},
|
|
90
80
|
});
|
package/lib/AdaptableUI.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdaptableUI = void 0;
|
|
4
|
-
// AdaptableUI.ts
|
|
5
4
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
6
5
|
const adaptable_1 = require("@adaptabletools/adaptable-cjs");
|
|
7
6
|
const vue_1 = require("vue");
|
|
@@ -25,7 +24,6 @@ exports.AdaptableUI = (0, vue_1.defineComponent)({
|
|
|
25
24
|
const isInitialized = (0, vue_1.ref)(false);
|
|
26
25
|
const initializeAdaptable = async () => {
|
|
27
26
|
if (isInitialized.value) {
|
|
28
|
-
// Adaptable already initialized
|
|
29
27
|
logger.value?.warn('Adaptable already initialized');
|
|
30
28
|
return;
|
|
31
29
|
}
|
|
@@ -48,12 +46,6 @@ exports.AdaptableUI = (0, vue_1.defineComponent)({
|
|
|
48
46
|
},
|
|
49
47
|
gridOptions: {
|
|
50
48
|
...(0, vue_1.toRaw)(gridOptions.value),
|
|
51
|
-
/**
|
|
52
|
-
* Because `columnDefs` are define in props, it is defined in props
|
|
53
|
-
* and it's value is 'undefined'.
|
|
54
|
-
* We need to allow gridOptions passed to provider to override undefined
|
|
55
|
-
* values that come from props.
|
|
56
|
-
*/
|
|
57
49
|
...(0, utils_1.deleteUndefinedShallow)(rawAgGridProps),
|
|
58
50
|
},
|
|
59
51
|
variant: 'vue',
|
|
@@ -68,20 +60,17 @@ exports.AdaptableUI = (0, vue_1.defineComponent)({
|
|
|
68
60
|
logger.value?.error('Failed to initialize Adaptable:', error);
|
|
69
61
|
}
|
|
70
62
|
};
|
|
71
|
-
// Watch for transition changes after mount
|
|
72
63
|
(0, vue_1.watch)(transition, async (newTransition) => {
|
|
73
64
|
if (newTransition !== AdaptableProviderContext_1.AdaptableAgGridStateTransitions.INITIALIZE_ADAPTABLE) {
|
|
74
65
|
return;
|
|
75
66
|
}
|
|
76
67
|
await initializeAdaptable();
|
|
77
68
|
});
|
|
78
|
-
// Ensure initialization after mount if transition is already correct
|
|
79
69
|
(0, vue_1.onMounted)(async () => {
|
|
80
70
|
if (transition.value === AdaptableProviderContext_1.AdaptableAgGridStateTransitions.INITIALIZE_ADAPTABLE) {
|
|
81
71
|
await initializeAdaptable();
|
|
82
72
|
}
|
|
83
73
|
});
|
|
84
|
-
// Cleanup
|
|
85
74
|
(0, vue_1.onUnmounted)(() => {
|
|
86
75
|
logger.value?.info('Destroying Adaptable...');
|
|
87
76
|
if (adaptableApi.value) {
|
|
@@ -94,7 +83,6 @@ exports.AdaptableUI = (0, vue_1.defineComponent)({
|
|
|
94
83
|
else {
|
|
95
84
|
logger.value?.warn('Adaptable API not available for destruction');
|
|
96
85
|
}
|
|
97
|
-
// Clear logger reference
|
|
98
86
|
logger.value = null;
|
|
99
87
|
});
|
|
100
88
|
return () => (0, vue_1.h)('div', {
|
package/lib/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-vue3-aggrid-cjs",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.5-canary.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "lib/index.d.ts",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"vue": "^3.0.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@adaptabletools/adaptable-cjs": "23.0.
|
|
12
|
+
"@adaptabletools/adaptable-cjs": "23.0.5-canary.1"
|
|
13
13
|
}
|
|
14
14
|
}
|