lucid-extension-sdk 0.0.373 → 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 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[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.373",
3
+ "version": "0.0.374",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",