@adaptabletools/adaptable-vue3-aggrid 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 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;
@@ -14,34 +14,12 @@ const PASS_THROUGH_PROPS = [
14
14
  ];
15
15
  const watch = _ALL_GRID_OPTIONS_KEYS.reduce((acc, key) => {
16
16
  acc[key] = function (newValue) {
17
- /**
18
- * We need to unwrap all potential refs inside the new grid option.
19
- */
20
17
  this.agGridApi.setGridOption(key, deepToRaw(newValue));
21
18
  };
22
19
  return acc;
23
20
  }, {});
24
21
  export const AdaptableAgGridVue = defineComponent({
25
22
  name: 'adaptable-ag-grid-vue',
26
- /**
27
- * Ag-Grid Vue only has typings for a few props, of which a few cannot find docs:
28
- * - gridOptions
29
- * - modules
30
- *
31
- * Not documented
32
- * - componentDependencies
33
- * - plugins
34
- * - modelValue
35
- *
36
- * Other props have a flag of 'VUE_OMITTED_PROPERTY', that work, but are not typed.
37
- * https://github.com/ag-grid/ag-grid/blob/latest/packages/ag-grid-vue3/src/Utils.ts#L16
38
- *
39
- * We let pass through:
40
- * - class
41
- * - style
42
- *
43
- * The rest we add to gridOptions, and we intercept when they change
44
- */
45
23
  props: {
46
24
  class: {
47
25
  type: String,
@@ -51,7 +29,6 @@ export const AdaptableAgGridVue = defineComponent({
51
29
  type: [String, Object],
52
30
  required: false,
53
31
  },
54
- // Internal types, that are passed through, defined in ag-grid-vue3.
55
32
  modelValue: {
56
33
  type: Array,
57
34
  default: undefined,
@@ -62,8 +39,6 @@ export const AdaptableAgGridVue = defineComponent({
62
39
  default: () => [],
63
40
  },
64
41
  plugins: [],
65
- // These are not defined in AgGridVue typings
66
- // But are useful for users to control via props
67
42
  columnDefs: {
68
43
  type: Array,
69
44
  required: false,
@@ -72,11 +47,6 @@ export const AdaptableAgGridVue = defineComponent({
72
47
  setup(props) {
73
48
  const { class: className, style } = props;
74
49
  const { gridOptions, transition, setAgGridProps, setTransition, modules, agGridApi } = inject(AdaptableProviderContextKey);
75
- /**
76
- * We pick up props that are on gridOptions.
77
- * We send these to the the provider, where are added to gridOptions.
78
- * These props do not make it to the AgGridVue component.
79
- */
80
50
  const agGridProps = Object.entries(props).reduce((acc, [key, value]) => {
81
51
  if (PASS_THROUGH_PROPS.includes(key)) {
82
52
  return acc;
@@ -105,9 +75,6 @@ export const AdaptableAgGridVue = defineComponent({
105
75
  if (this.transition !== AdaptableAgGridStateTransitions.INITIALIZE_AG_GRID) {
106
76
  return null;
107
77
  }
108
- /**
109
- * We pass through props that are internal, and adaptable does not use/change.
110
- */
111
78
  const passedThroughProps = Object.entries(this.$props).reduce((acc, [key, value]) => {
112
79
  if (!PASS_THROUGH_PROPS.includes(key)) {
113
80
  return acc;
@@ -1,9 +1,5 @@
1
1
  import { defineComponent, provide, ref } from 'vue';
2
2
  import { AdaptableAgGridStateTransitions, AdaptableProviderContextKey, } from './AdaptableProviderContext';
3
- /**
4
- * The provider handles the communication between the Adaptable and Ag-Grid.
5
- * Steps are very similar to the react wrapper.
6
- */
7
3
  export const AdaptableProvider = defineComponent({
8
4
  name: 'adaptable-provider',
9
5
  props: {
@@ -31,7 +27,6 @@ export const AdaptableProvider = defineComponent({
31
27
  },
32
28
  setup(props, { emit }) {
33
29
  const currentTransition = ref(AdaptableAgGridStateTransitions.AG_GRID_EMIT_PROPS);
34
- // destructure gridOptions, to ensure we don't mutate the outer object
35
30
  const gridOptions = ref({ ...props.gridOptions });
36
31
  const agGridApi = ref(null);
37
32
  const agGridProps = ref(null);
@@ -58,7 +53,6 @@ export const AdaptableProvider = defineComponent({
58
53
  setTransition: (transition) => {
59
54
  currentTransition.value = transition;
60
55
  },
61
- // AG GRID
62
56
  modules: props.modules,
63
57
  gridOptions,
64
58
  setGridOptions: (gridOptions) => {
@@ -69,7 +63,6 @@ export const AdaptableProvider = defineComponent({
69
63
  setAgGridProps: (props) => {
70
64
  agGridProps.value = props;
71
65
  },
72
- // ADAPTABLE
73
66
  renderAgGridFrameworkComponent,
74
67
  onAdaptableReady(adaptableReadyInfo) {
75
68
  emit('onAdaptableReady', adaptableReadyInfo);
@@ -79,9 +72,6 @@ export const AdaptableProvider = defineComponent({
79
72
  provide(AdaptableProviderContextKey, context);
80
73
  },
81
74
  render() {
82
- /**
83
- * This just renders whatever are passed as children.
84
- */
85
75
  return this.$slots.default && this.$slots.default();
86
76
  },
87
77
  });
@@ -1,4 +1,3 @@
1
- // AdaptableUI.ts
2
1
  import { ColumnApiModule } from 'ag-grid-enterprise';
3
2
  import { _AdaptableAgGrid, _AdaptableLogger } from '@adaptabletools/adaptable';
4
3
  import { defineComponent, h, inject, onMounted, onUnmounted, ref, watch, toRaw } from 'vue';
@@ -22,7 +21,6 @@ export const AdaptableUI = defineComponent({
22
21
  const isInitialized = ref(false);
23
22
  const initializeAdaptable = async () => {
24
23
  if (isInitialized.value) {
25
- // Adaptable already initialized
26
24
  logger.value?.warn('Adaptable already initialized');
27
25
  return;
28
26
  }
@@ -45,12 +43,6 @@ export const AdaptableUI = defineComponent({
45
43
  },
46
44
  gridOptions: {
47
45
  ...toRaw(gridOptions.value),
48
- /**
49
- * Because `columnDefs` are define in props, it is defined in props
50
- * and it's value is 'undefined'.
51
- * We need to allow gridOptions passed to provider to override undefined
52
- * values that come from props.
53
- */
54
46
  ...deleteUndefinedShallow(rawAgGridProps),
55
47
  },
56
48
  variant: 'vue',
@@ -65,20 +57,17 @@ export const AdaptableUI = defineComponent({
65
57
  logger.value?.error('Failed to initialize Adaptable:', error);
66
58
  }
67
59
  };
68
- // Watch for transition changes after mount
69
60
  watch(transition, async (newTransition) => {
70
61
  if (newTransition !== AdaptableAgGridStateTransitions.INITIALIZE_ADAPTABLE) {
71
62
  return;
72
63
  }
73
64
  await initializeAdaptable();
74
65
  });
75
- // Ensure initialization after mount if transition is already correct
76
66
  onMounted(async () => {
77
67
  if (transition.value === AdaptableAgGridStateTransitions.INITIALIZE_ADAPTABLE) {
78
68
  await initializeAdaptable();
79
69
  }
80
70
  });
81
- // Cleanup
82
71
  onUnmounted(() => {
83
72
  logger.value?.info('Destroying Adaptable...');
84
73
  if (adaptableApi.value) {
@@ -91,7 +80,6 @@ export const AdaptableUI = defineComponent({
91
80
  else {
92
81
  logger.value?.warn('Adaptable API not available for destruction');
93
82
  }
94
- // Clear logger reference
95
83
  logger.value = null;
96
84
  });
97
85
  return () => h('div', {
package/lib/utils.js CHANGED
@@ -20,7 +20,6 @@ export function deepToRaw(sourceObj) {
20
20
  export function deleteUndefinedShallow(sourceObj) {
21
21
  return Object.keys(sourceObj).reduce((acc, key) => {
22
22
  if (sourceObj[key] !== undefined) {
23
- // @ts-ignore
24
23
  acc[key] = sourceObj[key];
25
24
  }
26
25
  return acc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-vue3-aggrid",
3
- "version": "23.0.4",
3
+ "version": "23.0.5-canary.1",
4
4
  "type": "module",
5
5
  "typings": "lib/index.d.ts",
6
6
  "peerDependencies": {
@@ -9,7 +9,7 @@
9
9
  "vue": "^3.0.0"
10
10
  },
11
11
  "dependencies": {
12
- "@adaptabletools/adaptable": "23.0.4"
12
+ "@adaptabletools/adaptable": "23.0.5-canary.1"
13
13
  },
14
14
  "module": "lib/index.js"
15
15
  }