lucid-extension-sdk 0.0.455 → 0.0.457

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.
Files changed (30) hide show
  1. package/commandtypes.d.ts +36 -34
  2. package/core/cardintegration/lucidcardintegration.d.ts +4 -4
  3. package/core/data/datasource/sourceforeignkeys.d.ts +9 -9
  4. package/core/data/fieldspecification.d.ts +1 -1
  5. package/core/data/fieldtypedefinition/deserializedmapenumfieldtype.d.ts +5 -5
  6. package/core/data/serializedfield/serializedfielddefinition.d.ts +11 -3
  7. package/core/data/serializedfield/serializedfielddefinition.js +2 -0
  8. package/core/data/serializedfield/serializedfields.d.ts +2 -2
  9. package/core/defer.d.ts +1 -1
  10. package/core/iframe/iframeutils.d.ts +3 -3
  11. package/core/primitivedata.js +12 -4
  12. package/core/rules/serializeddatagraphic.d.ts +2 -2
  13. package/core/rules/serializedstencilgraphic.d.ts +3 -3
  14. package/core/sharedcardintegration/cardintegrationdefinitions.d.ts +8 -5
  15. package/core/unfurl/unfurldetails.d.ts +4 -4
  16. package/core/unfurl/unfurliframe.d.ts +2 -2
  17. package/core/validators/compactvalidatorsandpruners.d.ts +1 -1
  18. package/core/xhr.d.ts +1 -1
  19. package/data/displayoptiondefinition.d.ts +1 -1
  20. package/data/fieldconstraintdefinition.d.ts +10 -3
  21. package/data/fieldconstraintdefinition.js +2 -0
  22. package/data/referencekeydefinition.d.ts +3 -3
  23. package/data/schemadefinition.d.ts +1 -1
  24. package/dataconnector/datasourceupdatetypes.d.ts +5 -5
  25. package/document/blockclasses/tableblockproxy.js +1 -1
  26. package/document/linetextareapositioning.d.ts +2 -2
  27. package/message/unfurleventmessage.d.ts +2 -2
  28. package/package.json +1 -1
  29. package/ui/menu.d.ts +8 -8
  30. package/ui/viewport.js +2 -2
package/commandtypes.d.ts CHANGED
@@ -757,7 +757,7 @@ export type AddCardsActions = {
757
757
  };
758
758
  export type DependencyMappingSettings = {
759
759
  /** Whether to enable dependency mapping for this integration */
760
- 'sdm'?: boolean;
760
+ 'sdm'?: boolean | undefined;
761
761
  /**
762
762
  * Import dependencies action
763
763
  * Inconsistent naming convention, to avoid calling this "ID"
@@ -769,60 +769,60 @@ export type DependencyMappingSettings = {
769
769
  */
770
770
  'dmp'?: {
771
771
  /** Entrypoint text */
772
- 'ep'?: string;
772
+ 'ep'?: string | undefined;
773
773
  /**
774
774
  * Text for on-card badge for dependency mapping
775
775
  * String, not a function itself; this is the name of the client's registered action hook
776
776
  */
777
- 'cl'?: string;
777
+ 'cl'?: string | undefined;
778
778
  /** Text for the dependency manager */
779
779
  'm'?: {
780
780
  /** Header */
781
- 'h'?: string;
781
+ 'h'?: string | undefined;
782
782
  /** All links label */
783
- 'all'?: string;
783
+ 'all'?: string | undefined;
784
784
  /** Show all links button text */
785
- 'salb'?: string;
785
+ 'salb'?: string | undefined;
786
786
  /** Hide all links button text */
787
- 'halb'?: string;
787
+ 'halb'?: string | undefined;
788
788
  /** Show all links tooltip text (when disabled) */
789
- 'dsalt'?: string;
789
+ 'dsalt'?: string | undefined;
790
790
  /** Hide all links tooltip text (when disabled) */
791
- 'dhalt'?: string;
791
+ 'dhalt'?: string | undefined;
792
792
  /** Text for various empty states */
793
793
  'es'?: {
794
794
  /** Create link instruction text */
795
- 'cli'?: string;
795
+ 'cli'?: string | undefined;
796
796
  /** Instructional text when no items are selected */
797
- 'nssi'?: string;
797
+ 'nssi'?: string | undefined;
798
798
  /** Heading text when no items are selected */
799
- 'nssh'?: string;
799
+ 'nssh'?: string | undefined;
800
800
  /**
801
801
  * Heading text when selected item has no links
802
802
  * String, not a function itself; this is the name of the client's registered action hook
803
803
  */
804
- 'ndh'?: string;
804
+ 'ndh'?: string | undefined;
805
805
  /** Text when multiple items are selected and have no links */
806
- 'mikwnl'?: string;
807
- };
808
- };
806
+ 'mikwnl'?: string | undefined;
807
+ } | undefined;
808
+ } | undefined;
809
809
  /** Text for editing a dependency */
810
810
  'ed'?: {
811
- 'ch'?: string;
812
- 'cnlo'?: string;
813
- 'dh'?: string;
814
- 'dd'?: string;
815
- 'dab'?: string;
811
+ 'ch'?: string | undefined;
812
+ 'cnlo'?: string | undefined;
813
+ 'dh'?: string | undefined;
814
+ 'dd'?: string | undefined;
815
+ 'dab'?: string | undefined;
816
816
  /**
817
817
  * Selected issue heading
818
818
  * String, not a function itself; this is the name of the client's registered action hook
819
819
  */
820
- 'sih'?: string;
821
- };
820
+ 'sih'?: string | undefined;
821
+ } | undefined;
822
822
  /**
823
823
  * Item label phrase
824
824
  */
825
- 'ilp'?: string;
825
+ 'ilp'?: string | undefined;
826
826
  } | undefined;
827
827
  };
828
828
  export type AutoSyncSettings = {
@@ -869,7 +869,7 @@ export type SerializedFieldConfiguration = {
869
869
  /** Default search callback for searching for legal field values in an enum */
870
870
  'dsc'?: string | undefined;
871
871
  /** Custom field display settings */
872
- 'cfds'?: SerializedCustomFieldDisplaySettings;
872
+ 'cfds'?: SerializedCustomFieldDisplaySettings | undefined;
873
873
  /** Non-customizable fields */
874
874
  'ncf'?: string[] | undefined;
875
875
  /** Callback to get fields to edit related to a field passed as an argument */
@@ -1080,9 +1080,9 @@ export type AddShapeDataResult = undefined;
1080
1080
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
1081
1081
  export type AddSpreadsheetIntegrationQuery = {
1082
1082
  /** Item label */
1083
- 'il'?: string;
1083
+ 'il'?: string | undefined;
1084
1084
  /** Items label */
1085
- 'isl'?: string;
1085
+ 'isl'?: string | undefined;
1086
1086
  /** labelDescription */
1087
1087
  'ld': string;
1088
1088
  /** labelIconUrl */
@@ -1100,20 +1100,22 @@ export type AddSpreadsheetIntegrationQuery = {
1100
1100
  /** Primary Icon Url */
1101
1101
  'pi': string;
1102
1102
  /** Light Icon URl */
1103
- 'li'?: string;
1103
+ 'li'?: string | undefined;
1104
1104
  /** Dark Icon URl */
1105
- 'di'?: string;
1105
+ 'di'?: string | undefined;
1106
1106
  } | undefined;
1107
1107
  /** importDescription */
1108
1108
  'id'?: string | undefined;
1109
1109
  /** addCardsIntegration */
1110
- 'c'?: boolean;
1110
+ 'c'?: boolean | undefined;
1111
1111
  /** getUpstreamSourceUrl */
1112
- 'gu'?: string;
1112
+ 'gu'?: string | undefined;
1113
1113
  /** If specified, add-card settings */
1114
1114
  'ac'?: AddCardsActions | undefined;
1115
1115
  /** fieldConfiguration */
1116
- 'fc'?: Partial<SerializedFieldConfiguration>;
1116
+ 'fc'?: {
1117
+ [K in keyof SerializedFieldConfiguration]?: SerializedFieldConfiguration[K] | undefined;
1118
+ } | undefined;
1117
1119
  'dm'?: DependencyMappingSettings | undefined;
1118
1120
  };
1119
1121
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
@@ -1844,9 +1846,9 @@ export type RegisterPanelQuery = {
1844
1846
  /** Icon URL, preferably a base64-encoded URL */
1845
1847
  'i': string;
1846
1848
  /** tooltip */
1847
- 'to'?: string;
1849
+ 'to'?: string | undefined;
1848
1850
  /** If true, we will persist the panel's iframe */
1849
- 'p'?: boolean;
1851
+ 'p'?: boolean | undefined;
1850
1852
  /** Desired panel width */
1851
1853
  'w'?: number | undefined;
1852
1854
  /** Desired panel height */
@@ -120,7 +120,7 @@ export declare abstract class LucidCardIntegration implements CardIntegrationDep
120
120
  * @deprecated Use AuthorizationFlowHandlerRegistry.registerAuthorizationFlowHandler.
121
121
  * WARNING: Currently unused and does nothing.
122
122
  */
123
- showIntro?: () => void;
123
+ showIntro?: (() => void) | undefined;
124
124
  /**
125
125
  * Provide the default configuration for a new import
126
126
  */
@@ -129,7 +129,7 @@ export declare abstract class LucidCardIntegration implements CardIntegrationDep
129
129
  * This allows the user to import cards by selecting items from within a modal. You can either create a custom
130
130
  * import modal or the standard import modal can be used.
131
131
  */
132
- importModal?: LucidCardIntegrationStandardImportModal | LucidCardIntegrationCustomImportModal;
132
+ importModal?: LucidCardIntegrationStandardImportModal | LucidCardIntegrationCustomImportModal | undefined;
133
133
  /**
134
134
  * If specified, allow the user to create new cards and convert other shapes to cards
135
135
  */
@@ -147,11 +147,11 @@ export declare abstract class LucidCardIntegration implements CardIntegrationDep
147
147
  collection: CollectionProxy;
148
148
  primaryKey: string;
149
149
  }>;
150
- };
150
+ } | undefined;
151
151
  /**
152
152
  * If specified, allows the user to use query to sync with timelines.
153
153
  */
154
- autoSync?: CardIntegrationAutoSyncConfig;
154
+ autoSync?: CardIntegrationAutoSyncConfig | undefined;
155
155
  showCardImport(name: string): ImportCardsResult;
156
156
  showDependencyMapping?: boolean;
157
157
  /**
@@ -38,18 +38,18 @@ export type HierarchicalRelationshipFilterConfig = {
38
38
  * Example: ADO "Child" FK shows parent on child cards (has inward),
39
39
  * but is filtered out on parent cards (no inward).
40
40
  */
41
- showOnlyIfHasInward?: boolean;
41
+ showOnlyIfHasInward?: boolean | undefined;
42
42
  /**
43
43
  * @deprecated Use `suppressLinkedItems` instead.
44
44
  * If true, skip outward relationships in linked items display.
45
45
  */
46
- skipOutwardRelationships?: boolean;
46
+ skipOutwardRelationships?: boolean | undefined;
47
47
  /**
48
48
  * If true, only show this FK when the item has outward relationships.
49
49
  * Example: Jira "Child" FK shows parent on child cards (child has outward "parent" field),
50
50
  * but is filtered out on parent cards (parent has no outward "parent" field).
51
51
  */
52
- showOnlyIfHasOutward?: boolean;
52
+ showOnlyIfHasOutward?: boolean | undefined;
53
53
  /**
54
54
  * Controls which directions of this foreign key relationship are hidden from
55
55
  * the linked items panel.
@@ -64,29 +64,29 @@ export type HierarchicalRelationshipFilterConfig = {
64
64
  *
65
65
  * When omitted, both directions are shown normally.
66
66
  */
67
- suppressLinkedItems?: SuppressLinkedItems;
67
+ suppressLinkedItems?: SuppressLinkedItems | undefined;
68
68
  };
69
69
  export type SourceForeignKey = {
70
70
  id: string;
71
71
  sourceFields: string[];
72
- relationshipType?: string;
73
- represents?: string;
72
+ relationshipType?: string | undefined;
73
+ represents?: string | undefined;
74
74
  outwardLabel: string;
75
75
  inwardLabel: string;
76
76
  /**
77
77
  * This exists to handle the rare situation when there are fields on the target item that reference the source item.
78
78
  * Please reach out to #dev-data-platform before setting this to a defined value.
79
79
  */
80
- targetFields?: string[];
80
+ targetFields?: string[] | undefined;
81
81
  /**
82
82
  * Indicates whether this relationship is bi-directional.
83
83
  * "Related To" is a good example of a bi-directional relationship.
84
84
  */
85
- isBidirectional?: boolean;
85
+ isBidirectional?: boolean | undefined;
86
86
  /**
87
87
  * @experimental Optional configuration for filtering hierarchical relationships.
88
88
  */
89
- hierarchicalFilterConfig?: HierarchicalRelationshipFilterConfig;
89
+ hierarchicalFilterConfig?: HierarchicalRelationshipFilterConfig | undefined;
90
90
  };
91
91
  export declare function serializeHierarchicalFilterConfig(config: HierarchicalRelationshipFilterConfig): SerializedHierarchicalRelationshipFilterConfig;
92
92
  export declare function deserializeHierarchicalFilterConfig(config: SerializedHierarchicalRelationshipFilterConfig): HierarchicalRelationshipFilterConfig;
@@ -29,7 +29,7 @@ type TsTypeOf<X> = X extends typeof ScalarFieldTypeEnum.ANY ? unknown : X extend
29
29
  export declare function declareSchema<Names extends string, Types extends Readonly<FieldTypeDefinition>, Constraint extends FieldConstraintDefinition, DisplayOption extends DisplayOptionDefinition, Fields extends {
30
30
  [Name in Names]: {
31
31
  type: Types;
32
- constraints?: readonly Constraint[];
32
+ constraints?: readonly Constraint[] | undefined;
33
33
  mapping?: readonly SemanticKind[] | readonly SemanticFields[] | readonly LucidFields[] | undefined;
34
34
  displayOptions?: DisplayOption[] | undefined;
35
35
  syncSchema?: string | undefined;
@@ -16,11 +16,11 @@ export type SerializedMapEnumFieldType = {
16
16
  };
17
17
  export declare function isSerializedMapEnumFieldType(fieldType: any): fieldType is SerializedMapEnumFieldType;
18
18
  export interface DeserializedMapEnumFieldTypeEntry {
19
- name?: string | null;
20
- description?: string | null;
21
- color?: string | null;
22
- iconUrl?: string | null;
23
- category?: string | null;
19
+ name?: string | null | undefined;
20
+ description?: string | null | undefined;
21
+ color?: string | null | undefined;
22
+ iconUrl?: string | null | undefined;
23
+ category?: string | null | undefined;
24
24
  }
25
25
  export interface SerializedEnumEntry {
26
26
  'Id': EnumKeyType;
@@ -14,6 +14,8 @@ export declare const FieldConstraintType: {
14
14
  readonly NO_WHITESPACE: "noWhitespace";
15
15
  readonly UNIQUE_EDIT: "uniqueEditType";
16
16
  readonly MAX_LENGTH: "maxLength";
17
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
18
+ /** @deprecated Use MAX_DECIMAL_PLACES instead. This key mapped to the wrong string value and never matched the backend. */
17
19
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
18
20
  };
19
21
  export type FieldConstraintType = (typeof FieldConstraintType)[keyof typeof FieldConstraintType];
@@ -26,8 +28,10 @@ export declare const isFieldConstraintType: (x: unknown) => x is {} extends {
26
28
  readonly NO_WHITESPACE: "noWhitespace";
27
29
  readonly UNIQUE_EDIT: "uniqueEditType";
28
30
  readonly MAX_LENGTH: "maxLength";
31
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
32
+ /** @deprecated Use MAX_DECIMAL_PLACES instead. This key mapped to the wrong string value and never matched the backend. */
29
33
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
30
- } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalLength";
34
+ } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalPlaces" | "maxDecimalLength";
31
35
  export type SerializedFieldConstraint = {
32
36
  'Type': FieldConstraintType;
33
37
  'Details'?: UnsafeJsonSerializableOrUndefined;
@@ -43,8 +47,10 @@ export declare const isSerializedFieldConstraint: (subject: unknown) => subject
43
47
  readonly NO_WHITESPACE: "noWhitespace";
44
48
  readonly UNIQUE_EDIT: "uniqueEditType";
45
49
  readonly MAX_LENGTH: "maxLength";
50
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
51
+ /** @deprecated Use MAX_DECIMAL_PLACES instead. This key mapped to the wrong string value and never matched the backend. */
46
52
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
47
- } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalLength";
53
+ } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalPlaces" | "maxDecimalLength";
48
54
  Details: (x: unknown) => x is any | undefined;
49
55
  Reason: (x: unknown) => x is string | null | undefined;
50
56
  }>;
@@ -69,8 +75,10 @@ export declare const isSerializedFieldDefinition: (subject: unknown) => subject
69
75
  readonly NO_WHITESPACE: "noWhitespace";
70
76
  readonly UNIQUE_EDIT: "uniqueEditType";
71
77
  readonly MAX_LENGTH: "maxLength";
78
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
79
+ /** @deprecated Use MAX_DECIMAL_PLACES instead. This key mapped to the wrong string value and never matched the backend. */
72
80
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
73
- } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalLength";
81
+ } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalPlaces" | "maxDecimalLength";
74
82
  Details: (x: unknown) => x is any | undefined;
75
83
  Reason: (x: unknown) => x is string | null | undefined;
76
84
  }>[] | undefined;
@@ -17,6 +17,8 @@ exports.FieldConstraintType = {
17
17
  NO_WHITESPACE: 'noWhitespace',
18
18
  UNIQUE_EDIT: 'uniqueEditType',
19
19
  MAX_LENGTH: 'maxLength',
20
+ MAX_DECIMAL_PLACES: 'maxDecimalPlaces',
21
+ /** @deprecated Use MAX_DECIMAL_PLACES instead. This key mapped to the wrong string value and never matched the backend. */
20
22
  MAX_DECIMAL_LENGTH: 'maxDecimalLength',
21
23
  };
22
24
  exports.isFieldConstraintType = (0, validators_1.enumValidator)(exports.FieldConstraintType);
@@ -23,11 +23,11 @@ export type SerializedFields = {
23
23
  };
24
24
  export type SerializedIsoDateObject = {
25
25
  'isoDate': string;
26
- 'displayTimezone'?: string | null;
26
+ 'displayTimezone'?: string | null | undefined;
27
27
  };
28
28
  export type SerializedMillisecondsDateObject = {
29
29
  'ms': number;
30
- 'isDateOnly'?: boolean;
30
+ 'isDateOnly'?: boolean | undefined;
31
31
  };
32
32
  export type SerializedLucidDateObject = SerializedMillisecondsDateObject | SerializedIsoDateObject;
33
33
  export type SerializedLucidDateRangeObject = {
package/core/defer.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export interface DeferredPromise<T> extends Promise<T> {
1
+ export interface DeferredPromise<T = void> extends Promise<T> {
2
2
  resolve: (p1: T | PromiseLike<T>) => any;
3
3
  reject: (p1?: any) => any;
4
4
  promise: Promise<T>;
@@ -29,15 +29,15 @@ export type IframeAttributes =
29
29
  /**
30
30
  * The iFrame height
31
31
  */
32
- height?: number;
32
+ height?: number | undefined;
33
33
  /**
34
34
  * The iFrame width
35
35
  */
36
- width?: number;
36
+ width?: number | undefined;
37
37
  /**
38
38
  * The iFrame title for accessibility
39
39
  */
40
- title?: string;
40
+ title?: string | undefined;
41
41
  };
42
42
  /**
43
43
  * Generate iframe HTML from the IFrameAttributes object
@@ -108,8 +108,12 @@ function generateNullish() {
108
108
  function generatePartialRecord(keyGenerator, valueGenerator) {
109
109
  return function () {
110
110
  const result = {};
111
- for (const { key, value } of (0, iterable_1.zipHoldShorter)({ key: keyGenerator(), value: valueGenerator() })) {
112
- result[key] = value;
111
+ const keys = Array.from(keyGenerator());
112
+ const values = Array.from(valueGenerator());
113
+ if (keys.length > 0 && values.length > 0) {
114
+ for (const { key, value } of (0, iterable_1.zipHoldShorter)({ key: keys, value: values })) {
115
+ result[key] = value;
116
+ }
113
117
  }
114
118
  return [{}, result];
115
119
  };
@@ -118,8 +122,12 @@ function generatePartialRecord(keyGenerator, valueGenerator) {
118
122
  function generateMapEntries(keyGenerator, valueGenerator) {
119
123
  return function () {
120
124
  const result = [];
121
- for (const { key, value } of (0, iterable_1.zipHoldShorter)({ key: keyGenerator(), value: valueGenerator() })) {
122
- result.push([key, value]);
125
+ const keys = Array.from(keyGenerator());
126
+ const values = Array.from(valueGenerator());
127
+ if (keys.length > 0 && values.length > 0) {
128
+ for (const { key, value } of (0, iterable_1.zipHoldShorter)({ key: keys, value: values })) {
129
+ result.push([key, value]);
130
+ }
123
131
  }
124
132
  return [[], result];
125
133
  };
@@ -4,8 +4,8 @@ export type SerializedDataGraphic = {
4
4
  'Set': DataGraphicIconSets;
5
5
  'Index': number;
6
6
  'Position': SerializedBadgeEnumPosition;
7
- 'Color'?: string;
8
- 'Image'?: SerializedDataGraphicImage;
7
+ 'Color'?: string | undefined;
8
+ 'Image'?: SerializedDataGraphicImage | undefined;
9
9
  };
10
10
  export type SerializedDataGraphicImage = {
11
11
  'url': string;
@@ -9,8 +9,8 @@ export type SerializedStencilGraphic = {
9
9
  * AutoHide used to be an undefined property that should default to true.
10
10
  * Either continue handling undefined case when deserializing, or write a BCU that changes undefined to true.
11
11
  */
12
- 'AutoHide'?: boolean;
13
- 'Badge'?: SerializedBadgeEnumPosition;
14
- 'BoxFit'?: BadgeBoxFit;
12
+ 'AutoHide'?: boolean | undefined;
13
+ 'Badge'?: SerializedBadgeEnumPosition | undefined;
14
+ 'BoxFit'?: BadgeBoxFit | undefined;
15
15
  };
16
16
  export declare const isSerializedStencilGraphic: (v: unknown) => v is SerializedStencilGraphic;
@@ -177,8 +177,9 @@ export declare const isSerializedExtensionCardFieldDefinition: (subject: unknown
177
177
  readonly NO_WHITESPACE: "noWhitespace";
178
178
  readonly UNIQUE_EDIT: "uniqueEditType";
179
179
  readonly MAX_LENGTH: "maxLength";
180
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
180
181
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
181
- } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalLength";
182
+ } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalPlaces" | "maxDecimalLength";
182
183
  Details: (x: unknown) => x is any | undefined;
183
184
  Reason: (x: unknown) => x is string | null | undefined;
184
185
  }>[] | undefined;
@@ -224,8 +225,9 @@ export declare const isSerializedExtensionCardFieldsGroup: (subject: unknown) =>
224
225
  readonly NO_WHITESPACE: "noWhitespace";
225
226
  readonly UNIQUE_EDIT: "uniqueEditType";
226
227
  readonly MAX_LENGTH: "maxLength";
228
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
227
229
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
228
- } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalLength";
230
+ } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalPlaces" | "maxDecimalLength";
229
231
  Details: (x: unknown) => x is any | undefined;
230
232
  Reason: (x: unknown) => x is string | null | undefined;
231
233
  }>[] | undefined;
@@ -259,8 +261,9 @@ export declare const isSerializedExtensionCardFieldsGroupArray: (val: unknown) =
259
261
  readonly NO_WHITESPACE: "noWhitespace";
260
262
  readonly UNIQUE_EDIT: "uniqueEditType";
261
263
  readonly MAX_LENGTH: "maxLength";
264
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
262
265
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
263
- } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalLength";
266
+ } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalPlaces" | "maxDecimalLength";
264
267
  Details: (x: unknown) => x is any | undefined;
265
268
  Reason: (x: unknown) => x is string | null | undefined;
266
269
  }>[] | undefined;
@@ -283,8 +286,8 @@ export declare function deserializeExtensionCardFieldsGroupArray(serializedGroup
283
286
  export interface SearchResultPerCollection {
284
287
  partialImportMetadata?: {
285
288
  collectionId: string;
286
- syncDataSourceId?: string;
287
- };
289
+ syncDataSourceId?: string | undefined;
290
+ } | undefined;
288
291
  data: CollectionDefinition;
289
292
  fields: ExtensionCardFieldDefinition[];
290
293
  fieldNameTakesRemainingWidth?: string | undefined;
@@ -17,21 +17,21 @@ export interface UnfurlDetails {
17
17
  /**
18
18
  * The title associated with the link being unfurled. For example, the document or web page title.
19
19
  */
20
- unfurlTitle?: string;
20
+ unfurlTitle?: string | undefined;
21
21
  /**
22
22
  * If the unfurl supports an expandable iframe, this configuration defines its properties.
23
23
  */
24
- iframe?: UnfurlIframe;
24
+ iframe?: UnfurlIframe | undefined;
25
25
  /**
26
26
  * If the unfurl contains one or more images, this configuration defines those properties.
27
27
  */
28
- thumbnails?: UnfurlThumbnail[];
28
+ thumbnails?: UnfurlThumbnail[] | undefined;
29
29
  /**
30
30
  * The url to show if there are no thumbnails.
31
31
  *
32
32
  * This can be useful to show an initial image while using other mechanisms to add all thumbnails after the unfurl is created.
33
33
  */
34
- previewImageUrl?: string;
34
+ previewImageUrl?: string | undefined;
35
35
  }
36
36
  /** @ignore */
37
37
  export interface SerializedUnfurlDetails {
@@ -40,11 +40,11 @@ export interface UnfurlIframe {
40
40
  * The size of the iframe requested
41
41
  * If not provided, 16:9
42
42
  */
43
- aspectRatio?: UnfurlIframeAspectRatio;
43
+ aspectRatio?: UnfurlIframeAspectRatio | undefined;
44
44
  /**
45
45
  * The iframe title for accessibility
46
46
  */
47
- iframeTitle?: string;
47
+ iframeTitle?: string | undefined;
48
48
  }
49
49
  /** @ignore */
50
50
  export interface SerializedUnfurlIframe {
@@ -32,7 +32,7 @@ export interface PrunerResult {
32
32
  */
33
33
  export interface ValidatorWithOptionalPruner<TO = unknown> {
34
34
  'validator': Validator<TO>;
35
- 'pruner'?: Pruner;
35
+ 'pruner'?: Pruner | undefined;
36
36
  }
37
37
  export interface ValidatorWithPruner<TO = unknown> {
38
38
  'validator': Validator<TO>;
package/core/xhr.d.ts CHANGED
@@ -45,7 +45,7 @@ export interface BaseXHRResponse {
45
45
  [key: string]: string;
46
46
  };
47
47
  /** True if this request failed due to a timeout */
48
- timeout?: boolean;
48
+ timeout?: boolean | undefined;
49
49
  }
50
50
  export interface TextXHRResponse extends BaseXHRResponse {
51
51
  responseFormat: 'utf8';
@@ -5,7 +5,7 @@ export interface DisplayMultiUserEditDisplayOptionDefinition {
5
5
  }
6
6
  export interface HelperTextDisplayOptionDefinition {
7
7
  type: typeof DisplayOptionType.HelperText;
8
- value?: string;
8
+ value?: string | undefined;
9
9
  }
10
10
  export type DisplayOptionDefinition = DisplayMultiUserEditDisplayOptionDefinition | HelperTextDisplayOptionDefinition;
11
11
  export declare function createDisplayOptionDefinition(type: DisplayOptionType, value?: number | string): DisplayOptionDefinition;
@@ -41,13 +41,19 @@ export interface MaxLengthConstraintDefinition {
41
41
  reason?: string | undefined;
42
42
  }
43
43
  export interface MaxDecimalPlacesConstraintDefinition {
44
+ type: typeof FieldConstraintType.MAX_DECIMAL_PLACES;
45
+ value: number;
46
+ reason?: string | undefined;
47
+ }
48
+ /** @deprecated Use MaxDecimalPlacesConstraintDefinition instead. */
49
+ export interface MaxDecimalLengthConstraintDefinition {
44
50
  type: typeof FieldConstraintType.MAX_DECIMAL_LENGTH;
45
51
  value: number;
46
52
  reason?: string | undefined;
47
53
  }
48
- export type FieldConstraintDefinition = RequiredFieldConstraintDefinition | LockedFieldConstraintDefinition | MinValueFieldConstraintDefinition | MaxValueFieldConstraintDefinition | SingleLineFieldConstraintDefinition | NoWhitespaceFieldConstraintDefinition | UniqueEditFieldConstraintDefinition | MaxLengthConstraintDefinition | MaxDecimalPlacesConstraintDefinition;
54
+ export type FieldConstraintDefinition = RequiredFieldConstraintDefinition | LockedFieldConstraintDefinition | MinValueFieldConstraintDefinition | MaxValueFieldConstraintDefinition | SingleLineFieldConstraintDefinition | NoWhitespaceFieldConstraintDefinition | UniqueEditFieldConstraintDefinition | MaxLengthConstraintDefinition | MaxDecimalPlacesConstraintDefinition | MaxDecimalLengthConstraintDefinition;
49
55
  export declare function createFieldConstraintDefinition(type: FieldConstraintType, value?: number, reason?: string): FieldConstraintDefinition;
50
- export declare function numericFieldConstraintValidator(val: unknown): val is typeof FieldConstraintType.MIN_VALUE | typeof FieldConstraintType.MAX_VALUE | typeof FieldConstraintType.MAX_LENGTH | typeof FieldConstraintType.MAX_DECIMAL_LENGTH;
56
+ export declare function numericFieldConstraintValidator(val: unknown): val is typeof FieldConstraintType.MIN_VALUE | typeof FieldConstraintType.MAX_VALUE | typeof FieldConstraintType.MAX_LENGTH | typeof FieldConstraintType.MAX_DECIMAL_PLACES | typeof FieldConstraintType.MAX_DECIMAL_LENGTH;
51
57
  export declare const isFieldConstraintDefinition: (x: unknown) => x is import("..").DestructureGuardedTypeObj<{
52
58
  type: (x: unknown) => x is {} extends {
53
59
  readonly REQUIRED: "required";
@@ -58,8 +64,9 @@ export declare const isFieldConstraintDefinition: (x: unknown) => x is import(".
58
64
  readonly NO_WHITESPACE: "noWhitespace";
59
65
  readonly UNIQUE_EDIT: "uniqueEditType";
60
66
  readonly MAX_LENGTH: "maxLength";
67
+ readonly MAX_DECIMAL_PLACES: "maxDecimalPlaces";
61
68
  readonly MAX_DECIMAL_LENGTH: "maxDecimalLength";
62
- } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalLength";
69
+ } ? never : "locked" | "required" | "minValue" | "maxValue" | "singleLineOnly" | "noWhitespace" | "uniqueEditType" | "maxLength" | "maxDecimalPlaces" | "maxDecimalLength";
63
70
  }> & (import("..").DestructureGuardedTypeObj<{
64
71
  type: typeof numericFieldConstraintValidator;
65
72
  value: typeof isNumber;
@@ -16,6 +16,7 @@ function createFieldConstraintDefinition(type, value, reason) {
16
16
  case serializedfielddefinition_1.FieldConstraintType.MIN_VALUE:
17
17
  case serializedfielddefinition_1.FieldConstraintType.MAX_VALUE:
18
18
  case serializedfielddefinition_1.FieldConstraintType.MAX_LENGTH:
19
+ case serializedfielddefinition_1.FieldConstraintType.MAX_DECIMAL_PLACES:
19
20
  case serializedfielddefinition_1.FieldConstraintType.MAX_DECIMAL_LENGTH:
20
21
  if (value === undefined) {
21
22
  throw new Error('Invalid constraint value');
@@ -36,6 +37,7 @@ function numericFieldConstraintValidator(val) {
36
37
  return (val === serializedfielddefinition_1.FieldConstraintType.MIN_VALUE ||
37
38
  val === serializedfielddefinition_1.FieldConstraintType.MAX_VALUE ||
38
39
  val === serializedfielddefinition_1.FieldConstraintType.MAX_LENGTH ||
40
+ val === serializedfielddefinition_1.FieldConstraintType.MAX_DECIMAL_PLACES ||
39
41
  val === serializedfielddefinition_1.FieldConstraintType.MAX_DECIMAL_LENGTH);
40
42
  }
41
43
  exports.isFieldConstraintDefinition = (0, validators_1.both)((0, validators_1.objectValidator)({
@@ -14,13 +14,13 @@ export interface CollectionReferenceKeyDefinition {
14
14
  /** The [primary key](#classes_data_dataitemproxy-DataItemProxy_primarykey) of the data item referenced */
15
15
  primaryKey: string;
16
16
  /** If true, prevent the user from editing the field values of this reference key through the normal UI */
17
- readonly?: boolean;
17
+ readonly?: boolean | undefined;
18
18
  /**
19
19
  * If specified, only expose this list of fields through this reference key. This can be used to limit
20
20
  * namespace pollution in shape data from lots of unnecessary fields, or just to hide information you'd
21
21
  * prefer not to be visible in the UI or through formulas.
22
22
  */
23
- fieldWhitelist?: string[];
23
+ fieldWhitelist?: string[] | undefined;
24
24
  }
25
25
  /**
26
26
  * A reference key that has the field values embedded directly in the reference definition. This can be
@@ -30,7 +30,7 @@ export interface CollectionReferenceKeyDefinition {
30
30
  */
31
31
  export interface FlattenedReferenceDefinition {
32
32
  /** Name to display to the user for the reference key (what would normally be the collection name) */
33
- name?: string;
33
+ name?: string | undefined;
34
34
  /** Schema of the data stored at this key */
35
35
  schema: SchemaDefinition;
36
36
  /** Field values available at this reference key */
@@ -37,7 +37,7 @@ export interface SchemaDefinition {
37
37
  * Maps field names to labels to display in the UI when necessary. If any field name
38
38
  * is not present as a key in this label map, the field name itself will be the label.
39
39
  */
40
- fieldLabels?: Record<string, string>;
40
+ fieldLabels?: Record<string, string> | undefined;
41
41
  }
42
42
  /** @ignore */
43
43
  export declare function serializeFieldDefinition(field: FieldDefinition): SerializedFieldDefinition;
@@ -47,9 +47,9 @@ type SerializedFieldDefinitionForApi = {
47
47
  'name': string;
48
48
  'type': SerializedFieldTypeDefinition;
49
49
  'constraints': SerializedFieldConstraintForApi[];
50
- 'syncSchema'?: string;
51
- 'mapping'?: readonly SemanticKind[] | readonly LucidFields[] | readonly SemanticFields[];
52
- 'displayOptions'?: SerializedDisplayOptionForApi[];
50
+ 'syncSchema'?: string | undefined;
51
+ 'mapping'?: readonly SemanticKind[] | readonly LucidFields[] | readonly SemanticFields[] | undefined;
52
+ 'displayOptions'?: SerializedDisplayOptionForApi[] | undefined;
53
53
  };
54
54
  export type SerializedSchemaForApi = {
55
55
  'fields': SerializedFieldDefinitionForApi[];
@@ -61,9 +61,9 @@ type serializedPropertiesForApi = {
61
61
  'Name'?: string;
62
62
  };
63
63
  export interface SerializedCollectionPatch {
64
- 'schema'?: SerializedSchemaForApi;
64
+ 'schema'?: SerializedSchemaForApi | undefined;
65
65
  'itemsPatch': SerializedItemsPatch;
66
- 'properties'?: serializedPropertiesForApi;
66
+ 'properties'?: serializedPropertiesForApi | undefined;
67
67
  }
68
68
  /** Represents a standard, incremental update to a collection. */
69
69
  export declare class ItemsPatchInexhaustive {
@@ -20,7 +20,7 @@ class TableCellProxy {
20
20
  return this.table.textStyles.get(`Cell_${this.row},${this.column}`);
21
21
  }
22
22
  setTextStyle(style) {
23
- this.table.textStyles.set(`Cell_${this.row},${this.column}`, style);
23
+ void this.table.textStyles.set(`Cell_${this.row},${this.column}`, style);
24
24
  }
25
25
  setFill(fill) {
26
26
  this.table.properties.set(`CellFill_${this.row},${this.column}`, (0, fillcolor_1.serializeSimpleFill)(fill));
@@ -15,13 +15,13 @@ export interface LineTextAreaPositioning {
15
15
  * Normally text on a line is not allowed to overlap a block that is connected to either end of the
16
16
  * line. If `allowOverBlock` is true, then the text is allowed to overlap an attached block.
17
17
  */
18
- allowOverBlock?: boolean;
18
+ allowOverBlock?: boolean | undefined;
19
19
  }
20
20
  /** @ignore */
21
21
  export type SerializedLineTextAreaPositioning = {
22
22
  'Location': number;
23
23
  'Side': -1 | 0 | 1;
24
- 'AllowOverBlock'?: boolean;
24
+ 'AllowOverBlock'?: boolean | undefined;
25
25
  };
26
26
  /** @ignore */
27
27
  export declare function isSerializedLineTextAreaPositioning(raw: unknown): raw is SerializedLineTextAreaPositioning;
@@ -9,14 +9,14 @@ export interface UnfurlEventMessage {
9
9
  /** @ignore */
10
10
  unfurlCallbackType: UnfurlCallbackType;
11
11
  /** @ignore */
12
- blockId?: string;
12
+ blockId?: string | undefined;
13
13
  }
14
14
  /** @ignore */
15
15
  export interface SerializedUnfurlEventMessage extends JsonObject {
16
16
  'id': string;
17
17
  'u': string;
18
18
  't': UnfurlCallbackType;
19
- 'b'?: string;
19
+ 'b'?: string | undefined;
20
20
  }
21
21
  /** @ignore */
22
22
  export declare function deserializeUnfurlEventMessage(raw: SerializedUnfurlEventMessage): UnfurlEventMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.455",
3
+ "version": "0.0.457",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/ui/menu.d.ts CHANGED
@@ -84,17 +84,17 @@ export interface CustomMenuItem {
84
84
  *
85
85
  * NOTE: Not all menuTypes support displaying an icon
86
86
  */
87
- iconUrl?: string;
87
+ iconUrl?: string | undefined;
88
88
  /** The registered action to run when the menu item is clicked */
89
- action?: string;
89
+ action?: string | undefined;
90
90
  /** If specified, what action's return value should determine if this menu item is visible? */
91
- visibleAction?: string;
91
+ visibleAction?: string | undefined;
92
92
  /** If specified, what action's return value should determine if this menu item is disabled? */
93
- disabledAction?: string;
93
+ disabledAction?: string | undefined;
94
94
  /** Which menu to display this item in */
95
95
  menuType: MenuType;
96
96
  /** Where in that menu to display this item */
97
- location?: MenuLocation;
97
+ location?: MenuLocation | undefined;
98
98
  /** If specified, this menu item should launch a file picker */
99
99
  file?: {
100
100
  /** An action registered with EditorClient.registerFileUploadAction */
@@ -102,10 +102,10 @@ export interface CustomMenuItem {
102
102
  /** An [accept string](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept) as specified for HTML file inputs */
103
103
  accept: string;
104
104
  /** If true, only allow a single file to be selected for upload */
105
- singleFileOnly?: boolean;
105
+ singleFileOnly?: boolean | undefined;
106
106
  /** If true, send the file contents to the callback action as a Uint8Array as well as a plain text string */
107
- binary?: boolean;
108
- };
107
+ binary?: boolean | undefined;
108
+ } | undefined;
109
109
  }
110
110
  export interface FileUploadData {
111
111
  fileName: string;
package/ui/viewport.js CHANGED
@@ -60,7 +60,7 @@ class Viewport {
60
60
  * @param page The page to view
61
61
  */
62
62
  setCurrentPage(page) {
63
- this.client.sendCommand(commandtypes_1.CommandName.SetCurrentPage, page.id);
63
+ void this.client.sendCommand(commandtypes_1.CommandName.SetCurrentPage, page.id);
64
64
  }
65
65
  /**
66
66
  * @returns the box for the current viewport location
@@ -77,7 +77,7 @@ class Viewport {
77
77
  const bb = (0, math_1.combinedBoundingBox)(items.map((e) => e.getBoundingBox()));
78
78
  if (bb && items[0]) {
79
79
  //TODO: A reasonable max zoom level (e.g. 200%)
80
- this.client.sendCommand(commandtypes_1.CommandName.AnimateViewport, {
80
+ void this.client.sendCommand(commandtypes_1.CommandName.AnimateViewport, {
81
81
  'bb': (0, math_1.padBox)(bb, 80),
82
82
  'p': items[0].getPage().id,
83
83
  });