lucid-extension-sdk 0.0.372 → 0.0.374
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/commandtypes.d.ts +2 -0
- package/core/cardintegration/extensionimportmodalwidthbreakpoint.d.ts +20 -0
- package/core/cardintegration/extensionimportmodalwidthbreakpoint.js +24 -0
- package/core/cardintegration/lucidcardintegrationregistry.js +3 -0
- package/core/cardintegration/lucidcardintegrationstandardimportmodal.d.ts +2 -0
- package/data/collectionproxy.d.ts +6 -0
- package/data/collectionproxy.js +10 -0
- package/package.json +1 -1
package/commandtypes.d.ts
CHANGED
|
@@ -773,6 +773,8 @@ export type AddCardIntegrationQuery = {
|
|
|
773
773
|
'im'?: {
|
|
774
774
|
/** Import Modal Heading */
|
|
775
775
|
'imh'?: string;
|
|
776
|
+
/** Maximum import modal width enum value */
|
|
777
|
+
'mmw'?: number | undefined;
|
|
776
778
|
/** Use Isolated Search Bar */
|
|
777
779
|
'uisbui'?: boolean;
|
|
778
780
|
/** Get search fields action */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These values designate the maximum width to which the import modal will expand if given the space.
|
|
3
|
+
* The import modal will remain responsive should the screen size be too small for the designated width.
|
|
4
|
+
*
|
|
5
|
+
* SMALL = 496px,
|
|
6
|
+
* MEDIUM = 656px,
|
|
7
|
+
* LARGE = 816px,
|
|
8
|
+
* XLARGE = 1344px,
|
|
9
|
+
* TINY = 296px,
|
|
10
|
+
* MLARGE (Medium Large) = 1024px
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare enum ExtensionImportModalWidthBreakpoint {
|
|
14
|
+
SMALL = 0,
|
|
15
|
+
MEDIUM = 1,
|
|
16
|
+
LARGE = 2,
|
|
17
|
+
XLARGE = 3,
|
|
18
|
+
TINY = 4,
|
|
19
|
+
MLARGE = 5
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtensionImportModalWidthBreakpoint = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* These values designate the maximum width to which the import modal will expand if given the space.
|
|
6
|
+
* The import modal will remain responsive should the screen size be too small for the designated width.
|
|
7
|
+
*
|
|
8
|
+
* SMALL = 496px,
|
|
9
|
+
* MEDIUM = 656px,
|
|
10
|
+
* LARGE = 816px,
|
|
11
|
+
* XLARGE = 1344px,
|
|
12
|
+
* TINY = 296px,
|
|
13
|
+
* MLARGE (Medium Large) = 1024px
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
var ExtensionImportModalWidthBreakpoint;
|
|
17
|
+
(function (ExtensionImportModalWidthBreakpoint) {
|
|
18
|
+
ExtensionImportModalWidthBreakpoint[ExtensionImportModalWidthBreakpoint["SMALL"] = 0] = "SMALL";
|
|
19
|
+
ExtensionImportModalWidthBreakpoint[ExtensionImportModalWidthBreakpoint["MEDIUM"] = 1] = "MEDIUM";
|
|
20
|
+
ExtensionImportModalWidthBreakpoint[ExtensionImportModalWidthBreakpoint["LARGE"] = 2] = "LARGE";
|
|
21
|
+
ExtensionImportModalWidthBreakpoint[ExtensionImportModalWidthBreakpoint["XLARGE"] = 3] = "XLARGE";
|
|
22
|
+
ExtensionImportModalWidthBreakpoint[ExtensionImportModalWidthBreakpoint["TINY"] = 4] = "TINY";
|
|
23
|
+
ExtensionImportModalWidthBreakpoint[ExtensionImportModalWidthBreakpoint["MLARGE"] = 5] = "MLARGE";
|
|
24
|
+
})(ExtensionImportModalWidthBreakpoint || (exports.ExtensionImportModalWidthBreakpoint = ExtensionImportModalWidthBreakpoint = {}));
|
|
@@ -215,6 +215,9 @@ class LucidCardIntegrationRegistry {
|
|
|
215
215
|
if (importModal.useIsolatedSearchBarUI) {
|
|
216
216
|
serialized['im']['uisbui'] = importModal.useIsolatedSearchBarUI;
|
|
217
217
|
}
|
|
218
|
+
if (importModal.maxModalWidth !== undefined) {
|
|
219
|
+
serialized['im']['mmw'] = importModal.maxModalWidth;
|
|
220
|
+
}
|
|
218
221
|
client.registerAction(serialized['im']['gsf'], async ({ 's': searchSoFar }) => {
|
|
219
222
|
const result = await importModal.getSearchFields(new Map(searchSoFar));
|
|
220
223
|
return (0, cardintegrationdefinitions_1.serializeCardFieldArrayDefinition)(result);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SerializedFieldType } from '../data/serializedfield/serializedfields';
|
|
2
2
|
import { ExtensionCardFieldDefinition, ImportResult, SearchResult } from '../sharedcardintegration/cardintegrationdefinitions';
|
|
3
|
+
import { ExtensionImportModalWidthBreakpoint } from './extensionimportmodalwidthbreakpoint';
|
|
3
4
|
/**
|
|
4
5
|
* You can use the standard import modal can be used by providing the following data:
|
|
5
6
|
*
|
|
@@ -36,6 +37,7 @@ export interface LucidCardIntegrationStandardImportModal {
|
|
|
36
37
|
*/
|
|
37
38
|
importModalHeading?: string;
|
|
38
39
|
useIsolatedSearchBarUI?: boolean;
|
|
40
|
+
maxModalWidth?: ExtensionImportModalWidthBreakpoint;
|
|
39
41
|
getSearchFields: (searchSoFar: Map<string, SerializedFieldType>) => Promise<ExtensionCardFieldDefinition[]>;
|
|
40
42
|
search: (fields: Map<string, SerializedFieldType>) => Promise<SearchResult | SearchResult[]>;
|
|
41
43
|
import: (primaryKeys: string[], searchFields: Map<string, SerializedFieldType>) => Promise<ImportResult | ImportResult[]>;
|
|
@@ -31,6 +31,12 @@ export declare class CollectionProxy extends PropertyStoreProxy {
|
|
|
31
31
|
* is not a branch
|
|
32
32
|
*/
|
|
33
33
|
getBranchedFrom(): CollectionProxy | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Certain collections, such as metadata collections, may be hidden from the data panel with the `hideFromDataPanel`
|
|
36
|
+
* argument of `CollectionPatch`. This method identifies whether this collection has been hidden from the data panel
|
|
37
|
+
* via this mechanism.
|
|
38
|
+
*/
|
|
39
|
+
isHiddenFromDataPanel(): boolean;
|
|
34
40
|
/**
|
|
35
41
|
* @returns information about any changes made locally to the collection that have not been synchronized
|
|
36
42
|
* with the external data source.
|
package/data/collectionproxy.js
CHANGED
|
@@ -53,6 +53,16 @@ class CollectionProxy extends propertystoreproxy_1.PropertyStoreProxy {
|
|
|
53
53
|
const id = this.properties.get('BranchedFrom');
|
|
54
54
|
return id ? new CollectionProxy(id, this.client) : undefined;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Certain collections, such as metadata collections, may be hidden from the data panel with the `hideFromDataPanel`
|
|
58
|
+
* argument of `CollectionPatch`. This method identifies whether this collection has been hidden from the data panel
|
|
59
|
+
* via this mechanism.
|
|
60
|
+
*/
|
|
61
|
+
isHiddenFromDataPanel() {
|
|
62
|
+
var _a;
|
|
63
|
+
const isHiddenFromDataPanel = (_a = this.getBranchedFrom()) === null || _a === void 0 ? void 0 : _a.properties.get('IsHiddenFromDataPanel');
|
|
64
|
+
return !!isHiddenFromDataPanel;
|
|
65
|
+
}
|
|
56
66
|
/**
|
|
57
67
|
* @returns information about any changes made locally to the collection that have not been synchronized
|
|
58
68
|
* with the external data source.
|