@trackunit/react-core-contexts-api 0.2.139 → 0.2.141

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/index.cjs.js CHANGED
@@ -92,9 +92,7 @@ const validateStringAsAssetSortByProperty = (input) => {
92
92
  customFieldDefinitionId: input,
93
93
  };
94
94
  }
95
- return {
96
- sortBy: (_a = stringToEnum[input]) !== null && _a !== void 0 ? _a : fallback,
97
- };
95
+ return { sortBy: (_a = stringToEnum[input]) !== null && _a !== void 0 ? _a : fallback };
98
96
  };
99
97
  exports.SortOrder = void 0;
100
98
  (function (SortOrder) {
package/index.esm.js CHANGED
@@ -88,9 +88,7 @@ const validateStringAsAssetSortByProperty = (input) => {
88
88
  customFieldDefinitionId: input,
89
89
  };
90
90
  }
91
- return {
92
- sortBy: (_a = stringToEnum[input]) !== null && _a !== void 0 ? _a : fallback,
93
- };
91
+ return { sortBy: (_a = stringToEnum[input]) !== null && _a !== void 0 ? _a : fallback };
94
92
  };
95
93
  var SortOrder;
96
94
  (function (SortOrder) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-api",
3
- "version": "0.2.139",
3
+ "version": "0.2.141",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
package/src/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./confirmationDialogContext";
5
5
  export * from "./currentUserContext";
6
6
  export * from "./environmentContext";
7
7
  export * from "./filterBarContext";
8
+ export * from "./modalDialogContext";
8
9
  export * from "./navigationContext";
9
10
  export * from "./oemBrandingContext";
10
11
  export * from "./toastContext";
@@ -0,0 +1,13 @@
1
+ export interface ModalDialogContextValue {
2
+ /**
3
+ * Informs the host that a modal will be shown, this will resize the iris app to allow a full screen modal.
4
+ */
5
+ openModal: ({ scrollX, scrollY }?: {
6
+ scrollX: number;
7
+ scrollY: number;
8
+ }) => Promise<void>;
9
+ /**
10
+ * Informs the host that a modal will be closed this will resize the iris app back to the size before the modal was shown.
11
+ */
12
+ closeModal: () => Promise<void>;
13
+ }
@@ -11,7 +11,7 @@ type SubPage = {
11
11
  subPage?: string;
12
12
  };
13
13
  type Search = {
14
- search?: Object;
14
+ search?: Record<string, any>;
15
15
  };
16
16
  type NeverPage = {
17
17
  page?: never;
@@ -2,7 +2,7 @@
2
2
  export type ToastColors = "info" | "warning" | "danger" | "success";
3
3
  export type ToastAction = {
4
4
  label: string;
5
- onClick: () => void;
5
+ onClick?: () => void;
6
6
  loading?: boolean;
7
7
  };
8
8
  export interface Toast {