@uniformdev/mesh-sdk 18.35.1-alpha.26 → 18.38.1-alpha.10

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/dist/index.d.ts CHANGED
@@ -654,7 +654,7 @@ type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, undefined
654
654
  * Defines methods used for interacting with a Mesh location
655
655
  * To receive useful typings, check the `type` property of the location to narrow the typing.
656
656
  */
657
- type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | DataSourceLocation | DataTypeLocation | DataResourceLocation;
657
+ type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | DataSourceLocation | DataTypeLocation | DataTypeInstanceLocation | DataResourceLocation;
658
658
  interface MeshContextData {
659
659
  locationKey: string;
660
660
  locationType: MeshLocationTypes;
@@ -779,6 +779,8 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
779
779
  type: TType;
780
780
  /** If true, any editable fields on the current location should be disabled as the user does not have permission or otherwise cannot change them. */
781
781
  isReadOnly: boolean;
782
+ /** @deprecated use value property instead */
783
+ getValue: () => TValue;
782
784
  /** The current value of the location. Some locations have fixed types (i.e. dataType), and others have user-selected types (i.e. paramType) */
783
785
  value: TValue;
784
786
  /**
@@ -787,11 +789,18 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
787
789
  * The 'settings' location writes to the database each time its value is set, and it should be treated as a form with a submit button.
788
790
  */
789
791
  setValue: SetLocationFunction<TSetValue>;
792
+ /** @deprecated use metadata property instead */
793
+ getMetadata: () => TMetadata;
790
794
  /**
791
795
  * Gets the current location metadata, context data which is provided from the Uniform app to assist in rendering the Mesh UI
792
796
  * Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
793
797
  */
794
798
  metadata: TMetadata;
799
+ /**
800
+ * Instructs Uniform to set the validity of the location in the parent app.
801
+ * @deprecated - use setValue(value, validationResult) instead
802
+ */
803
+ setValidationResult: (value: ValidationResult) => Promise<void>;
795
804
  /**
796
805
  * Context of a location when it is rendering inside a dialog in the Uniform app.
797
806
  * This is set when:
@@ -812,7 +821,9 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
812
821
  /**
813
822
  * Known location types that can be passed to a mesh location
814
823
  */
815
- type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'settings' | 'dataSource' | 'dataType' | 'dataResource';
824
+ type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'settings' | 'dataSource' | 'dataType'
825
+ /** @deprecated use dataResource */
826
+ | 'dataTypeInstance' | 'dataResource';
816
827
  type SetValueOptions = ValidationResult;
817
828
  type SetValueMessage = {
818
829
  uniformMeshLocationValue: unknown;
@@ -843,6 +854,8 @@ type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = {
843
854
  };
844
855
  type DataTypeLocation = MeshLocationCore<DataTypeLocationValue, DataTypeLocationMetadata, DataTypeLocationValue, 'dataType'> & GetDataResourceLocation;
845
856
 
857
+ /** @deprecated use DataResourceLocationMetadata */
858
+ type DataTypeInstanceLocationMetadata<TIntegrationConfiguration = unknown> = DataResourceLocationMetadata<TIntegrationConfiguration>;
846
859
  type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = {
847
860
  /** Settings defined at the integration level (arbitrary type used on settings location) */
848
861
  settings: TIntegrationConfiguration;
@@ -860,6 +873,8 @@ type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = {
860
873
  projectId: string;
861
874
  };
862
875
  type DataResourceLocation = MeshLocationCore<DataResourceVariables, DataResourceLocationMetadata, DataResourceVariables, 'dataResource'> & GetDataResourceLocation;
876
+ /** @deprecated use DataResourceLocation */
877
+ type DataTypeInstanceLocation = MeshLocationCore<DataResourceVariables, DataResourceLocationMetadata, DataResourceVariables, 'dataTypeInstance'>;
863
878
 
864
879
  type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = {
865
880
  /** Settings defined at the integration level (arbitrary type used on settings location) */
@@ -953,6 +968,8 @@ interface UniformMeshSDK {
953
968
  }>['setValue']>[0]> | undefined>;
954
969
  /** Explicitly close a location dialog. Called when rendering current location in the dialog. */
955
970
  closeCurrentLocationDialog(): Promise<void>;
971
+ /** @deprecated prefer getCurrentLocation().dialogContext */
972
+ dialogContext?: DialogContext;
956
973
  }
957
974
  declare global {
958
975
  interface Window {
@@ -967,4 +984,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
967
984
  autoResizingDisabled?: boolean;
968
985
  }): Promise<UniformMeshSDK | undefined>;
969
986
 
970
- export { CSSHeight, CloseDialogMessage, CloseLocationDialogOptions, DataConnectorInfo, DataResourceLocation, DataResourceLocationMetadata, DataSourceLocation, DataSourceLocationMetadata, DataSourceLocationValue, DataTypeLocation, DataTypeLocationMetadata, DataTypeLocationValue, DialogContext, DialogOptions, DialogParamValue, DialogParams, DialogResponseData, DialogResponseHandler, DialogResponseHandlers, DialogType, GetDataResourceLocation, GetDataResourceMessage, IntegrationDefinitionClient, IntegrationDefinitionDeleteParameters, IntegrationDefinitionGetParameters, IntegrationDefinitionGetResponse, IntegrationDefinitionPutParameters, IntegrationDefinitionPutResponse, IntegrationInstallationClient, IntegrationInstallationDeleteParameters, IntegrationInstallationGetParameters, IntegrationInstallationGetResponse, IntegrationInstallationPutParameters, LocationDialogResponse, MeshContextData, MeshLocation, MeshLocationCore, MeshLocationTypes, MeshSDKEventInterface, OpenConfirmationDialogOptions, OpenConfirmationDialogResult, OpenDialogMessage, OpenDialogResult, OpenLocationDialogOptions, ParamTypeConfigLocation, ParamTypeConfigLocationMetadata, ParamTypeLocation, ParamTypeLocationMetadata, SdkWindow, SetLocationFunction, SetValueMessage, SetValueOptions, SettingsLocation, UniformMeshSDK, UniformMeshSDKEvents, ValidationResult, initializeUniformMeshSDK };
987
+ export { CSSHeight, CloseDialogMessage, CloseLocationDialogOptions, DataConnectorInfo, DataResourceLocation, DataResourceLocationMetadata, DataSourceLocation, DataSourceLocationMetadata, DataSourceLocationValue, DataTypeInstanceLocation, DataTypeInstanceLocationMetadata, DataTypeLocation, DataTypeLocationMetadata, DataTypeLocationValue, DialogContext, DialogOptions, DialogParamValue, DialogParams, DialogResponseData, DialogResponseHandler, DialogResponseHandlers, DialogType, GetDataResourceLocation, GetDataResourceMessage, IntegrationDefinitionClient, IntegrationDefinitionDeleteParameters, IntegrationDefinitionGetParameters, IntegrationDefinitionGetResponse, IntegrationDefinitionPutParameters, IntegrationDefinitionPutResponse, IntegrationInstallationClient, IntegrationInstallationDeleteParameters, IntegrationInstallationGetParameters, IntegrationInstallationGetResponse, IntegrationInstallationPutParameters, LocationDialogResponse, MeshContextData, MeshLocation, MeshLocationCore, MeshLocationTypes, MeshSDKEventInterface, OpenConfirmationDialogOptions, OpenConfirmationDialogResult, OpenDialogMessage, OpenDialogResult, OpenLocationDialogOptions, ParamTypeConfigLocation, ParamTypeConfigLocationMetadata, ParamTypeLocation, ParamTypeLocationMetadata, SdkWindow, SetLocationFunction, SetValueMessage, SetValueOptions, SettingsLocation, UniformMeshSDK, UniformMeshSDKEvents, ValidationResult, initializeUniformMeshSDK };
package/dist/index.esm.js CHANGED
@@ -606,6 +606,9 @@ async function initializeUniformMeshSDK({
606
606
  getDataResource: parent.getDataResource,
607
607
  type: contextData.locationType,
608
608
  isReadOnly: contextData.isReadOnly,
609
+ getValue: () => {
610
+ return location.value;
611
+ },
609
612
  value: contextData.locationValue,
610
613
  setValue: async (value, options) => {
611
614
  if (contextData.dialogContext) {
@@ -617,7 +620,12 @@ async function initializeUniformMeshSDK({
617
620
  sdk.events.emit("onValueChanged", { newValue: value });
618
621
  await parent.setValue({ uniformMeshLocationValue: value, options });
619
622
  },
623
+ // DEPRECATED
624
+ getMetadata: () => currentMetadata,
620
625
  metadata: currentMetadata,
626
+ setValidationResult: async (value) => {
627
+ await location.setValue(contextData.locationValue, value);
628
+ },
621
629
  dialogContext: contextData.dialogContext ? {
622
630
  ...contextData.dialogContext,
623
631
  params: currentMetadata.dialogParams,
@@ -676,6 +684,8 @@ async function initializeUniformMeshSDK({
676
684
  return;
677
685
  }
678
686
  return {
687
+ /** @deprecated don't use this */
688
+ dialogId: result.dialogId,
679
689
  value: result.value,
680
690
  closeDialog: async () => {
681
691
  await parent.closeDialog({ dialogId: void 0, dialogType: "confirm" });
@@ -704,7 +714,8 @@ async function initializeUniformMeshSDK({
704
714
  },
705
715
  closeCurrentLocationDialog: async () => {
706
716
  await parent.closeDialog({ dialogId: void 0, dialogType: "location" });
707
- }
717
+ },
718
+ dialogContext: contextData.dialogContext
708
719
  };
709
720
  window.UniformMeshSDK = sdk;
710
721
  initializing = false;
package/dist/index.js CHANGED
@@ -643,6 +643,9 @@ async function initializeUniformMeshSDK({
643
643
  getDataResource: parent.getDataResource,
644
644
  type: contextData.locationType,
645
645
  isReadOnly: contextData.isReadOnly,
646
+ getValue: () => {
647
+ return location.value;
648
+ },
646
649
  value: contextData.locationValue,
647
650
  setValue: async (value, options) => {
648
651
  if (contextData.dialogContext) {
@@ -654,7 +657,12 @@ async function initializeUniformMeshSDK({
654
657
  sdk.events.emit("onValueChanged", { newValue: value });
655
658
  await parent.setValue({ uniformMeshLocationValue: value, options });
656
659
  },
660
+ // DEPRECATED
661
+ getMetadata: () => currentMetadata,
657
662
  metadata: currentMetadata,
663
+ setValidationResult: async (value) => {
664
+ await location.setValue(contextData.locationValue, value);
665
+ },
658
666
  dialogContext: contextData.dialogContext ? {
659
667
  ...contextData.dialogContext,
660
668
  params: currentMetadata.dialogParams,
@@ -713,6 +721,8 @@ async function initializeUniformMeshSDK({
713
721
  return;
714
722
  }
715
723
  return {
724
+ /** @deprecated don't use this */
725
+ dialogId: result.dialogId,
716
726
  value: result.value,
717
727
  closeDialog: async () => {
718
728
  await parent.closeDialog({ dialogId: void 0, dialogType: "confirm" });
@@ -741,7 +751,8 @@ async function initializeUniformMeshSDK({
741
751
  },
742
752
  closeCurrentLocationDialog: async () => {
743
753
  await parent.closeDialog({ dialogId: void 0, dialogType: "location" });
744
- }
754
+ },
755
+ dialogContext: contextData.dialogContext
745
756
  };
746
757
  window.UniformMeshSDK = sdk;
747
758
  initializing = false;
package/dist/index.mjs CHANGED
@@ -606,6 +606,9 @@ async function initializeUniformMeshSDK({
606
606
  getDataResource: parent.getDataResource,
607
607
  type: contextData.locationType,
608
608
  isReadOnly: contextData.isReadOnly,
609
+ getValue: () => {
610
+ return location.value;
611
+ },
609
612
  value: contextData.locationValue,
610
613
  setValue: async (value, options) => {
611
614
  if (contextData.dialogContext) {
@@ -617,7 +620,12 @@ async function initializeUniformMeshSDK({
617
620
  sdk.events.emit("onValueChanged", { newValue: value });
618
621
  await parent.setValue({ uniformMeshLocationValue: value, options });
619
622
  },
623
+ // DEPRECATED
624
+ getMetadata: () => currentMetadata,
620
625
  metadata: currentMetadata,
626
+ setValidationResult: async (value) => {
627
+ await location.setValue(contextData.locationValue, value);
628
+ },
621
629
  dialogContext: contextData.dialogContext ? {
622
630
  ...contextData.dialogContext,
623
631
  params: currentMetadata.dialogParams,
@@ -676,6 +684,8 @@ async function initializeUniformMeshSDK({
676
684
  return;
677
685
  }
678
686
  return {
687
+ /** @deprecated don't use this */
688
+ dialogId: result.dialogId,
679
689
  value: result.value,
680
690
  closeDialog: async () => {
681
691
  await parent.closeDialog({ dialogId: void 0, dialogType: "confirm" });
@@ -704,7 +714,8 @@ async function initializeUniformMeshSDK({
704
714
  },
705
715
  closeCurrentLocationDialog: async () => {
706
716
  await parent.closeDialog({ dialogId: void 0, dialogType: "location" });
707
- }
717
+ },
718
+ dialogContext: contextData.dialogContext
708
719
  };
709
720
  window.UniformMeshSDK = sdk;
710
721
  initializing = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "18.35.1-alpha.26+277d77ae3",
3
+ "version": "18.38.1-alpha.10+13f006c1d",
4
4
  "description": "Uniform Mesh Framework SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -32,9 +32,9 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@uniformdev/canvas": "18.35.1-alpha.26+277d77ae3",
36
- "@uniformdev/context": "18.35.1-alpha.26+277d77ae3",
35
+ "@uniformdev/canvas": "18.38.1-alpha.10+13f006c1d",
36
+ "@uniformdev/context": "18.38.1-alpha.10+13f006c1d",
37
37
  "mitt": "^3.0.0"
38
38
  },
39
- "gitHead": "277d77ae3e30655fb8319c7f221757981e8e00af"
39
+ "gitHead": "13f006c1d5ebbe593d33f3446a8de84b4a2d42d1"
40
40
  }