@adaptabletools/adaptable 15.0.0-canary.6 → 15.0.0-canary.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "15.0.0-canary.6",
3
+ "version": "15.0.0-canary.7",
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",
@@ -1,2 +1,2 @@
1
- declare const _default: 1676465416898;
1
+ declare const _default: 1676552062102;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1676465416898;
3
+ exports.default = 1676552062102;
@@ -6,11 +6,11 @@ import { AdaptableModule, AdaptableSharedEntityConfig } from '../types';
6
6
  */
7
7
  export interface TeamSharingApi {
8
8
  /**
9
- * Retrieves all currently shared entities; async op leveraging `TeamSharingOptions.loadSharedEntities(...)` method
9
+ * Retrieves all currently shared entities; async operation leveraging `TeamSharingOptions.loadSharedEntities(...)` method
10
10
  */
11
11
  loadSharedEntities(): Promise<SharedEntity[]>;
12
12
  /**
13
- * Sets currently shared entities; async op leveraging `TeamSharingOptions.persistSharedEntities(...)` method
13
+ * Sets currently shared entities; async operation leveraging `TeamSharingOptions.persistSharedEntities(...)` method
14
14
  * @param sharedEntities the shared entities
15
15
  * @return either TRUE if the shared entities were successfully set or FALSE if the shared entities were not set
16
16
  */
@@ -50,7 +50,7 @@ export interface TeamSharingApi {
50
50
  */
51
51
  unshareEntity(entityId: string): void;
52
52
  /**
53
- * Import shared entry.
53
+ * Import the given Shared Entity. In case of `CustomSharedEntity`, the import logic will be delegated to `TeamSharingOptions.handleCustomSharedEntityImport(...)`.
54
54
  *
55
55
  * @param sharedEntity shared entry to import
56
56
  */
@@ -23,11 +23,11 @@ export interface TeamSharingState extends InternalState {
23
23
  importProcessInProgress: boolean;
24
24
  }
25
25
  /**
26
- * Defines an object used in Team Sharing
26
+ * Defines an object used in Team Sharing. The union type is discriminated by the `EntityType` property (`adaptableEntity` / `customEntity`).
27
27
  */
28
28
  export declare type SharedEntity = AdaptableSharedEntity | CustomSharedEntity;
29
29
  export declare const isAdaptableSharedEntity: (entity: SharedEntity) => entity is AdaptableSharedEntity;
30
- export declare const isCustomSharedEntity: (entity: SharedEntity) => entity is CustomSharedEntity;
30
+ export declare const isCustomSharedEntity: (entity: SharedEntity) => entity is CustomSharedEntity<any>;
31
31
  /**
32
32
  * Defines an AdaptableObject shared with Team Sharing
33
33
  */
@@ -80,7 +80,7 @@ export interface AdaptableSharedEntity extends AdaptableObject {
80
80
  /**
81
81
  *
82
82
  */
83
- export interface CustomSharedEntity {
83
+ export interface CustomSharedEntity<T = any> {
84
84
  /**
85
85
  * Type of shared entity (either Adaptable specific or custom object)
86
86
  */
@@ -100,7 +100,7 @@ export interface CustomSharedEntity {
100
100
  /**
101
101
  * Custom Object being shared
102
102
  */
103
- Entity: any;
103
+ Entity: T;
104
104
  /**
105
105
  * When the object was shared
106
106
  */
@@ -117,6 +117,10 @@ export interface CustomSharedEntity {
117
117
  * Last time when the object was changed
118
118
  */
119
119
  ChangedAt: number;
120
+ /**
121
+ * Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')
122
+ */
123
+ IsReadOnly?: boolean;
120
124
  /**
121
125
  * List of Tags associated with the Object
122
126
  */
@@ -85,7 +85,7 @@ const CustomToolbarWrapper = (props) => {
85
85
  const disabled = button.disabled && button.disabled(button, dashboardContext);
86
86
  let buttonVariant = buttonStyle && buttonStyle.variant ? buttonStyle.variant : 'outlined';
87
87
  let buttonTone = buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'neutral';
88
- return (React.createElement(SimpleButton_1.default, { style: { marginLeft: index ? 'var(--ab-space-1)' : 0 }, key: index, disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, variant: buttonVariant, tone: buttonTone, onClick: () => {
88
+ return (React.createElement(SimpleButton_1.default, { style: { marginLeft: index ? 'var(--ab-space-1)' : 0 }, key: index, disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, variant: buttonVariant, tone: buttonTone, className: (buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className) || '', onClick: () => {
89
89
  button.onClick ? button.onClick(button, dashboardContext) : null;
90
90
  setTimeout(() => {
91
91
  // mutate state to force a re-rendering