@j2inn/fin5-ui-utils 8.2.0 → 8.3.0

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 (214) hide show
  1. package/README.md +5 -5
  2. package/dist/fantomProps/createFin5Props/index.d.ts +12 -12
  3. package/dist/fantomProps/createFin5Props/index.js +146 -146
  4. package/dist/fantomProps/createFin5Props/runCreateFin5Props.d.ts +2 -2
  5. package/dist/fantomProps/createFin5Props/runCreateFin5Props.js +20 -20
  6. package/dist/fantomProps/fantomPropsToObject.d.ts +8 -8
  7. package/dist/fantomProps/fantomPropsToObject.js +183 -183
  8. package/dist/fantomProps/generateJsonFromFantomPropsFile.d.ts +4 -4
  9. package/dist/fantomProps/generateJsonFromFantomPropsFile.js +41 -41
  10. package/dist/fantomProps/localePropsToJson.d.ts +1 -1
  11. package/dist/fantomProps/localePropsToJson.js +50 -50
  12. package/dist/fantomProps/readFantomPropsFile.d.ts +5 -5
  13. package/dist/fantomProps/readFantomPropsFile.js +65 -65
  14. package/dist/fin5Top/fin5FileUpload.d.ts +24 -24
  15. package/dist/fin5Top/fin5FileUpload.js +51 -51
  16. package/dist/fin5Top/fin5Top.d.ts +188 -188
  17. package/dist/fin5Top/fin5Top.js +86 -86
  18. package/dist/fin5Top/finEdge2Cloud.d.ts +6 -6
  19. package/dist/fin5Top/finEdge2Cloud.js +15 -15
  20. package/dist/fin5Top/getFin5BinUrl.d.ts +2 -2
  21. package/dist/fin5Top/getFin5BinUrl.js +9 -9
  22. package/dist/fin5Top/openFin5Alarm.d.ts +22 -22
  23. package/dist/fin5Top/openFin5Alarm.js +23 -23
  24. package/dist/fin5Top/openFin5Historian.d.ts +3 -3
  25. package/dist/fin5Top/openFin5Historian.js +19 -19
  26. package/dist/fin5Top/useFin5AppURLHashParameter.d.ts +18 -18
  27. package/dist/fin5Top/useFin5AppURLHashParameter.js +133 -133
  28. package/dist/index.d.ts +35 -35
  29. package/dist/index.js +69 -69
  30. package/dist/jobs/jobUtils.d.ts +14 -14
  31. package/dist/jobs/jobUtils.js +15 -15
  32. package/dist/react/app/Fin5AppContainer.d.ts +36 -36
  33. package/dist/react/app/Fin5AppContainer.js +161 -161
  34. package/dist/react/app/Fin5AppRootStore.d.ts +42 -42
  35. package/dist/react/app/Fin5AppRootStore.js +114 -114
  36. package/dist/react/components/ErrorBoundary.d.ts +57 -57
  37. package/dist/react/components/ErrorBoundary.js +150 -150
  38. package/dist/react/components/ErrorDisplayer.d.ts +19 -19
  39. package/dist/react/components/ErrorDisplayer.js +36 -36
  40. package/dist/react/components/Loader.d.ts +9 -9
  41. package/dist/react/components/Loader.js +17 -17
  42. package/dist/react/components/LoadingSpinner.d.ts +2 -2
  43. package/dist/react/components/LoadingSpinner.js +27 -27
  44. package/dist/react/components/RecordImage.d.ts +20 -20
  45. package/dist/react/components/RecordImage.js +51 -51
  46. package/dist/react/components/charts/QRCode.d.ts +25 -25
  47. package/dist/react/components/charts/QRCode.js +82 -82
  48. package/dist/react/components/charts/line-bar/Chart.d.ts +166 -166
  49. package/dist/react/components/charts/line-bar/Chart.js +442 -442
  50. package/dist/react/components/charts/line-bar/HGridChart.d.ts +58 -58
  51. package/dist/react/components/charts/line-bar/HGridChart.js +285 -285
  52. package/dist/react/components/charts/pie/PieChart.d.ts +94 -94
  53. package/dist/react/components/charts/pie/PieChart.js +204 -204
  54. package/dist/react/components/charts/pie/SimplePieChart.d.ts +21 -21
  55. package/dist/react/components/charts/pie/SimplePieChart.js +55 -55
  56. package/dist/react/components/graphics/GraphicViewer.d.ts +10 -10
  57. package/dist/react/components/graphics/GraphicViewer.js +29 -29
  58. package/dist/react/components/graphics/GraphicsTabViewer.d.ts +17 -17
  59. package/dist/react/components/graphics/GraphicsTabViewer.js +90 -90
  60. package/dist/react/components/makeCustomElement.d.ts +16 -16
  61. package/dist/react/components/makeCustomElement.js +150 -150
  62. package/dist/react/components/navigation/BasicLayout.d.ts +41 -41
  63. package/dist/react/components/navigation/BasicLayout.js +155 -155
  64. package/dist/react/components/navigation/HeaderSiderLayout.d.ts +13 -13
  65. package/dist/react/components/navigation/HeaderSiderLayout.js +110 -110
  66. package/dist/react/components/navigation/MenuPage.d.ts +37 -37
  67. package/dist/react/components/navigation/MenuPage.js +36 -36
  68. package/dist/react/components/navigation/MenuTrigger.d.ts +9 -9
  69. package/dist/react/components/navigation/MenuTrigger.js +33 -33
  70. package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.d.ts +11 -11
  71. package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.js +25 -25
  72. package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.js.map +1 -1
  73. package/dist/react/components/navigation/ReactRouterLayout.d.ts +45 -46
  74. package/dist/react/components/navigation/ReactRouterLayout.js +132 -132
  75. package/dist/react/components/navigation/ReactRouterLayout.js.map +1 -1
  76. package/dist/react/components/navigation/customRouting/Router.d.ts +12 -12
  77. package/dist/react/components/navigation/customRouting/Router.js +45 -45
  78. package/dist/react/components/navigation/customRouting/RouterLayout.d.ts +11 -11
  79. package/dist/react/components/navigation/customRouting/RouterLayout.js +61 -61
  80. package/dist/react/components/resolvable/configurationForm/ConfigurationForm.d.ts +27 -27
  81. package/dist/react/components/resolvable/configurationForm/ConfigurationForm.js +95 -95
  82. package/dist/react/components/resolvable/configurationForm/ConfigurationFormEntry.d.ts +16 -16
  83. package/dist/react/components/resolvable/configurationForm/ConfigurationFormEntry.js +88 -88
  84. package/dist/react/components/resolvable/configurationForm/getSectionDefault.d.ts +16 -16
  85. package/dist/react/components/resolvable/configurationForm/getSectionDefault.js +99 -99
  86. package/dist/react/hooks/useFin5BinUrl.d.ts +6 -6
  87. package/dist/react/hooks/useFin5BinUrl.js +15 -15
  88. package/dist/react/hooks/useFin5ColorScheme.d.ts +2 -2
  89. package/dist/react/hooks/useFin5ColorScheme.js +56 -56
  90. package/dist/react/hooks/useScreenSize.d.ts +7 -7
  91. package/dist/react/hooks/useScreenSize.js +31 -31
  92. package/dist_es/fantomProps/createFin5Props/index.d.ts +12 -12
  93. package/dist_es/fantomProps/createFin5Props/index.js +140 -140
  94. package/dist_es/fantomProps/createFin5Props/runCreateFin5Props.d.ts +2 -2
  95. package/dist_es/fantomProps/createFin5Props/runCreateFin5Props.js +15 -15
  96. package/dist_es/fantomProps/fantomPropsToObject.d.ts +8 -8
  97. package/dist_es/fantomProps/fantomPropsToObject.js +178 -178
  98. package/dist_es/fantomProps/generateJsonFromFantomPropsFile.d.ts +4 -4
  99. package/dist_es/fantomProps/generateJsonFromFantomPropsFile.js +12 -12
  100. package/dist_es/fantomProps/localePropsToJson.d.ts +1 -1
  101. package/dist_es/fantomProps/localePropsToJson.js +21 -21
  102. package/dist_es/fantomProps/readFantomPropsFile.d.ts +5 -5
  103. package/dist_es/fantomProps/readFantomPropsFile.js +39 -39
  104. package/dist_es/fin5Top/fin5FileUpload.d.ts +24 -24
  105. package/dist_es/fin5Top/fin5FileUpload.js +47 -47
  106. package/dist_es/fin5Top/fin5Top.d.ts +188 -188
  107. package/dist_es/fin5Top/fin5Top.js +81 -81
  108. package/dist_es/fin5Top/finEdge2Cloud.d.ts +6 -6
  109. package/dist_es/fin5Top/finEdge2Cloud.js +11 -11
  110. package/dist_es/fin5Top/getFin5BinUrl.d.ts +2 -2
  111. package/dist_es/fin5Top/getFin5BinUrl.js +5 -5
  112. package/dist_es/fin5Top/openFin5Alarm.d.ts +22 -22
  113. package/dist_es/fin5Top/openFin5Alarm.js +19 -19
  114. package/dist_es/fin5Top/openFin5Historian.d.ts +3 -3
  115. package/dist_es/fin5Top/openFin5Historian.js +15 -15
  116. package/dist_es/fin5Top/useFin5AppURLHashParameter.d.ts +18 -18
  117. package/dist_es/fin5Top/useFin5AppURLHashParameter.js +124 -124
  118. package/dist_es/index.d.ts +35 -35
  119. package/dist_es/index.js +53 -53
  120. package/dist_es/jobs/jobUtils.d.ts +14 -14
  121. package/dist_es/jobs/jobUtils.js +9 -9
  122. package/dist_es/react/app/Fin5AppContainer.d.ts +36 -36
  123. package/dist_es/react/app/Fin5AppContainer.js +132 -132
  124. package/dist_es/react/app/Fin5AppRootStore.d.ts +42 -42
  125. package/dist_es/react/app/Fin5AppRootStore.js +110 -110
  126. package/dist_es/react/components/ErrorBoundary.d.ts +57 -57
  127. package/dist_es/react/components/ErrorBoundary.js +123 -123
  128. package/dist_es/react/components/ErrorDisplayer.d.ts +19 -19
  129. package/dist_es/react/components/ErrorDisplayer.js +28 -28
  130. package/dist_es/react/components/Loader.d.ts +9 -9
  131. package/dist_es/react/components/Loader.js +12 -12
  132. package/dist_es/react/components/LoadingSpinner.d.ts +2 -2
  133. package/dist_es/react/components/LoadingSpinner.js +20 -20
  134. package/dist_es/react/components/RecordImage.d.ts +20 -20
  135. package/dist_es/react/components/RecordImage.js +24 -24
  136. package/dist_es/react/components/charts/QRCode.d.ts +25 -25
  137. package/dist_es/react/components/charts/QRCode.js +52 -52
  138. package/dist_es/react/components/charts/line-bar/Chart.d.ts +166 -166
  139. package/dist_es/react/components/charts/line-bar/Chart.js +415 -415
  140. package/dist_es/react/components/charts/line-bar/HGridChart.d.ts +58 -58
  141. package/dist_es/react/components/charts/line-bar/HGridChart.js +250 -250
  142. package/dist_es/react/components/charts/pie/PieChart.d.ts +94 -94
  143. package/dist_es/react/components/charts/pie/PieChart.js +177 -177
  144. package/dist_es/react/components/charts/pie/SimplePieChart.d.ts +21 -21
  145. package/dist_es/react/components/charts/pie/SimplePieChart.js +25 -25
  146. package/dist_es/react/components/graphics/GraphicViewer.d.ts +10 -10
  147. package/dist_es/react/components/graphics/GraphicViewer.js +22 -22
  148. package/dist_es/react/components/graphics/GraphicsTabViewer.d.ts +17 -17
  149. package/dist_es/react/components/graphics/GraphicsTabViewer.js +60 -60
  150. package/dist_es/react/components/makeCustomElement.d.ts +16 -16
  151. package/dist_es/react/components/makeCustomElement.js +142 -142
  152. package/dist_es/react/components/navigation/BasicLayout.d.ts +41 -41
  153. package/dist_es/react/components/navigation/BasicLayout.js +124 -124
  154. package/dist_es/react/components/navigation/HeaderSiderLayout.d.ts +13 -13
  155. package/dist_es/react/components/navigation/HeaderSiderLayout.js +80 -80
  156. package/dist_es/react/components/navigation/MenuPage.d.ts +37 -37
  157. package/dist_es/react/components/navigation/MenuPage.js +30 -30
  158. package/dist_es/react/components/navigation/MenuTrigger.d.ts +9 -9
  159. package/dist_es/react/components/navigation/MenuTrigger.js +28 -28
  160. package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.d.ts +11 -11
  161. package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.js +18 -18
  162. package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.js.map +1 -1
  163. package/dist_es/react/components/navigation/ReactRouterLayout.d.ts +45 -46
  164. package/dist_es/react/components/navigation/ReactRouterLayout.js +99 -99
  165. package/dist_es/react/components/navigation/ReactRouterLayout.js.map +1 -1
  166. package/dist_es/react/components/navigation/customRouting/Router.d.ts +12 -12
  167. package/dist_es/react/components/navigation/customRouting/Router.js +18 -18
  168. package/dist_es/react/components/navigation/customRouting/RouterLayout.d.ts +11 -11
  169. package/dist_es/react/components/navigation/customRouting/RouterLayout.js +34 -34
  170. package/dist_es/react/components/resolvable/configurationForm/ConfigurationForm.d.ts +27 -27
  171. package/dist_es/react/components/resolvable/configurationForm/ConfigurationForm.js +64 -64
  172. package/dist_es/react/components/resolvable/configurationForm/ConfigurationFormEntry.d.ts +16 -16
  173. package/dist_es/react/components/resolvable/configurationForm/ConfigurationFormEntry.js +58 -58
  174. package/dist_es/react/components/resolvable/configurationForm/getSectionDefault.d.ts +16 -16
  175. package/dist_es/react/components/resolvable/configurationForm/getSectionDefault.js +94 -94
  176. package/dist_es/react/hooks/useFin5BinUrl.d.ts +6 -6
  177. package/dist_es/react/hooks/useFin5BinUrl.js +11 -11
  178. package/dist_es/react/hooks/useFin5ColorScheme.d.ts +2 -2
  179. package/dist_es/react/hooks/useFin5ColorScheme.js +52 -52
  180. package/dist_es/react/hooks/useScreenSize.d.ts +7 -7
  181. package/dist_es/react/hooks/useScreenSize.js +27 -27
  182. package/package.json +5 -3
  183. package/dist_es/react/app/Fin5AppContainer.jsx +0 -82
  184. package/dist_es/react/app/Fin5AppContainer.jsx.map +0 -1
  185. package/dist_es/react/components/ErrorBoundary.jsx +0 -150
  186. package/dist_es/react/components/ErrorBoundary.jsx.map +0 -1
  187. package/dist_es/react/components/ErrorDisplayer.jsx +0 -36
  188. package/dist_es/react/components/ErrorDisplayer.jsx.map +0 -1
  189. package/dist_es/react/components/Loader.jsx +0 -13
  190. package/dist_es/react/components/Loader.jsx.map +0 -1
  191. package/dist_es/react/components/LoadingSpinner.jsx +0 -22
  192. package/dist_es/react/components/LoadingSpinner.jsx.map +0 -1
  193. package/dist_es/react/components/charts/line-bar/ZincGridChart.d.ts +0 -12
  194. package/dist_es/react/components/charts/line-bar/ZincGridChart.js +0 -17
  195. package/dist_es/react/components/charts/line-bar/ZincGridChart.js.map +0 -1
  196. package/dist_es/react/components/graphics/GraphicViewer.jsx +0 -23
  197. package/dist_es/react/components/graphics/GraphicViewer.jsx.map +0 -1
  198. package/dist_es/react/components/graphics/GraphicsTabViewer.jsx +0 -63
  199. package/dist_es/react/components/graphics/GraphicsTabViewer.jsx.map +0 -1
  200. package/dist_es/react/components/navigation/BasicLayout.jsx +0 -133
  201. package/dist_es/react/components/navigation/BasicLayout.jsx.map +0 -1
  202. package/dist_es/react/components/navigation/MenuPage.jsx +0 -31
  203. package/dist_es/react/components/navigation/MenuPage.jsx.map +0 -1
  204. package/dist_es/react/components/navigation/Router.d.ts +0 -12
  205. package/dist_es/react/components/navigation/Router.js +0 -19
  206. package/dist_es/react/components/navigation/Router.js.map +0 -1
  207. package/dist_es/react/components/navigation/Router.jsx +0 -19
  208. package/dist_es/react/components/navigation/Router.jsx.map +0 -1
  209. package/dist_es/react/components/navigation/react-router/BasicLayout.d.ts +0 -23
  210. package/dist_es/react/components/navigation/react-router/BasicLayout.js +0 -82
  211. package/dist_es/react/components/navigation/react-router/BasicLayout.js.map +0 -1
  212. package/dist_es/react/components/navigation/react-router/ReactRouterBasicLayout.d.ts +0 -24
  213. package/dist_es/react/components/navigation/react-router/ReactRouterBasicLayout.js +0 -82
  214. package/dist_es/react/components/navigation/react-router/ReactRouterBasicLayout.js.map +0 -1
@@ -1,188 +1,188 @@
1
- import { AlarmFilter } from './openFin5Alarm';
2
- import { HistorianArgs, HistorianType } from './openFin5Historian';
3
- export declare const getFin5top: (notifyFailure?: () => void) => Fin5Top | null;
4
- export declare const fin5Top: Fin5Top | null;
5
- export declare function isWindowTopFin5(notifyFailure?: () => void): boolean;
6
- interface RemotePopupStatus {
7
- isOpen: boolean;
8
- isMinimized: boolean;
9
- id: string | null;
10
- }
11
- /**
12
- * Check the status of the Folio popup.
13
- * @returns an object containing the status of the Folio popup, including whether it's open,
14
- * minimized, and its id.
15
- */
16
- export declare const getFolioPopupState: () => Promise<RemotePopupStatus>;
17
- export interface Fin5Top extends Window {
18
- app: Fin5App;
19
- languageManager: LanguageManager;
20
- finstack?: {
21
- projectName?: string;
22
- device?: {
23
- currentUser?: {
24
- toObj: () => unknown;
25
- };
26
- };
27
- };
28
- }
29
- export interface Fin5App {
30
- /**
31
- * Toggles FIN right side menu.
32
- * The forceTo parameter can be used to enforce a specific status instead of a toggling behaviour,
33
- * where: true -> menu closed, false -> menu open
34
- */
35
- ToggleCollapse: (forceTo: boolean) => void;
36
- /**
37
- * Returns current target record id.
38
- */
39
- TargetRef: () => TargetRef;
40
- /**
41
- * Updates the current target record id.
42
- * Navigates the current app to the specified
43
- * <code>targetRef</code>. Target Ref is the id of any equip/site etc..
44
- */
45
- NavigateToTargetRef: (targetRef: TargetRef, maintainView: boolean) => void;
46
- /**
47
- * Navigates to a particular application (trends, notes .. etc) under a specific target.
48
- * @param {Fin5AppNames} appName name of the application
49
- * @param {TargetRef} targetRef id of the target. Is the id of the equip/site.. etc to where the app should navigate
50
- * @param {boolean} skipRef is the flag indicating where to ignore the target ref if not mentioned. If this flag is true and the target ref is not provided, then the navigation will be made to the root target ref and will not be obtained from where the app already is
51
- */
52
- NavigateToApp: (appName: Fin5AppNames, targetRef?: TargetRef, skipRef?: boolean, params?: string[]) => Promise<void>;
53
- /**
54
- * Method to open a url on the application LHS. The LHS here is the <code>iframe</code> where all
55
- * the graphics etc are opened.
56
- *
57
- * @method LoadApplication
58
- * @param {string} url - Is the url which is to be loaded
59
- * @param {string} title - Specifies the title to be displayed on the iframe object
60
- * @param {string} targetId - Specifies the id of the equip (etc) to which the main navigation update.
61
- * @param {object} settings - Is the set of extra settings which will be also passed down to NavigateToApp
62
- * @param {string} settings.app - the name of the application on the RHS
63
- * @param {string[]} settings.params - overridden/additional params to pass to NavigateToApp
64
- */
65
- LoadApplication: (url: string, title?: string, targetRef?: TargetRef, settings?: {
66
- app?: string;
67
- params?: string[];
68
- }) => Promise<void>;
69
- /**
70
- * As the name suggests, this method logs out the user and resets the current session.
71
- */
72
- Logout: () => void;
73
- /**
74
- * Get the currently active color scheme.
75
- */
76
- GetColorScheme: () => ColorScheme;
77
- /**
78
- * Get the filters object from the alarms application.
79
- */
80
- GetAlarmFilters: () => AlarmFilter;
81
- /**
82
- * Sets the filter settings for the alarms.
83
- * @param {AlarmFilter} filters Is the object that defines the filter properties.
84
- * @param {boolean} historical Flag indicating if the filter properties need to be applied to the historical alarms.
85
- */
86
- SetAlarmFilters: (filters: AlarmFilter, historical?: boolean) => void;
87
- /**
88
- * Navigates to the historian app and loads the graphs as per the passed arguments. The graph will be drawn for the passed "point" ids or for a "query" id or for a "string" query
89
- * @param {HistorianType} type is the type of graph arg. Available args are:
90
- * - point : the args will have point ids in an array
91
- * - query : the arg will be the id of a saved chart query
92
- * - string : the arg will be a query string
93
- * @param {HistorianArgs} args is the array/string for point ids, the query id or the raw query string
94
- */
95
- OpenHistorianWithOptions: (type: HistorianType, args: HistorianArgs) => void;
96
- /**
97
- * Removes the remove-content-popup from the screen identified by the id.
98
- * If the id is not specified, then removes the last popup added remote popup object.
99
- * @param {string} [id] - is the id/identifier of the popup. The <code>id</code> of the HTML element should give you the id
100
- */
101
- RemoveRemotePopup: (id?: string) => void;
102
- /**
103
- * Open the Alarms application with the specified targetRef.
104
- * @since FIN 5.2.0
105
- * @param {TargetRef} [targetRef] - id of the target to be shown in the alarms app. If not provided, it will open with the current target ref.
106
- */
107
- OpenAlarms: (targetRef?: TargetRef) => Promise<void>;
108
- /**
109
- * Open the Schedules application with the specified targetRef and params
110
- * @since FIN 5.2.0
111
- * @param {TargetRef} [targetRef] - id of the target to be shown in the schedules app. If not provided, it will open with the current target ref.
112
- * @param {ScheduleParams} [params] - additional parameters for the schedules app (id, appId, message).
113
- */
114
- OpenSchedules: (targetRef?: TargetRef, params?: SchedulesParams) => Promise<void>;
115
- /**
116
- * Navigates to the Charts App and loads the appropriate chart
117
- * based on the chart id parameter. Removes any previous charts
118
- * URL params.
119
- * @since FIN 5.2.0
120
- * @param {string} chartId - the id of the chart to be opened. If not provided, it will open the charts app without any chart loaded.
121
- * @param {TargetRef} targetRef - id of the target to be shown in the charts app. If not provided, it will open with the current target ref.
122
- */
123
- OpenCharts: (chartId?: string, targetRef?: TargetRef) => Promise<void>;
124
- /**
125
- * Gets the name of the current application. Eg: notes, trends etc..
126
- *
127
- * @method CurrentAppName
128
- * @param {boolean} isSpecialAppId : if true, returns the special app id (iframe app name) which is the url hash without the underscore
129
- * @return {string | boolean} if false, there's no app currently open. Otherwise, returns the identifier of the app.
130
- */
131
- CurrentAppName: (isSpecialAppId?: boolean) => string | boolean;
132
- findComponent: (name: string) => Fin5AppComponent;
133
- findAllComponents: (name: string) => Fin5AppComponent[];
134
- /**
135
- * @see https://ractive.js.org/api/#ractiveobserve
136
- */
137
- observe: (keypath: string, callback: (newValue: unknown, oldValue: unknown, keypath: string) => void) => {
138
- cancel: () => void;
139
- };
140
- set: (name: string, value: unknown) => Promise<undefined>;
141
- get: (name: string) => Promise<unknown>;
142
- APP_NAMES: typeof Fin5AppNames;
143
- }
144
- export declare enum Fin5AppNames {
145
- EQUIP = "equip",
146
- GRAPHICS = "graphics",
147
- POINTS = "points",
148
- ALARMS = "alarms",
149
- NOTES = "notes",
150
- SUMMARY = "summary",
151
- SUMMARY_TOPICS = "summaryList",
152
- TOOLS = "tools",
153
- SCHEDULES = "schedules",
154
- SCHEDULE_LIST = "scheduleList",
155
- HISTORIAN = "trends",
156
- TREND_LIST = "trendList",
157
- CHARTS = "charts",
158
- CHART_LIST = "chartList",
159
- SEARCH = "search",
160
- LOGOUT = "logout",
161
- GENERIC = "generic",
162
- REPORTS = "reports",
163
- FLOOR = "floor",
164
- BUILDER = "builder",
165
- FILES = "files",
166
- HOME = "home",
167
- DASHBOARD = "dashboard",
168
- SETTINGS = "settings"
169
- }
170
- interface LanguageManager {
171
- currentLang: string;
172
- }
173
- interface Fin5AppComponent {
174
- set: (value: unknown) => Promise<undefined>;
175
- get: (value: unknown) => unknown;
176
- }
177
- export declare type TargetRef = string | null | undefined;
178
- export interface SchedulesParams {
179
- id?: string;
180
- appId?: string;
181
- message?: string;
182
- }
183
- export interface ColorScheme {
184
- primary: string;
185
- bodyBackground: string;
186
- sidebarBackground: string;
187
- }
188
- export {};
1
+ import { AlarmFilter } from './openFin5Alarm';
2
+ import { HistorianArgs, HistorianType } from './openFin5Historian';
3
+ export declare const getFin5top: (notifyFailure?: () => void) => Fin5Top | null;
4
+ export declare const fin5Top: Fin5Top | null;
5
+ export declare function isWindowTopFin5(notifyFailure?: () => void): boolean;
6
+ interface RemotePopupStatus {
7
+ isOpen: boolean;
8
+ isMinimized: boolean;
9
+ id: string | null;
10
+ }
11
+ /**
12
+ * Check the status of the Folio popup.
13
+ * @returns an object containing the status of the Folio popup, including whether it's open,
14
+ * minimized, and its id.
15
+ */
16
+ export declare const getFolioPopupState: () => Promise<RemotePopupStatus>;
17
+ export interface Fin5Top extends Window {
18
+ app: Fin5App;
19
+ languageManager: LanguageManager;
20
+ finstack?: {
21
+ projectName?: string;
22
+ device?: {
23
+ currentUser?: {
24
+ toObj: () => unknown;
25
+ };
26
+ };
27
+ };
28
+ }
29
+ export interface Fin5App {
30
+ /**
31
+ * Toggles FIN right side menu.
32
+ * The forceTo parameter can be used to enforce a specific status instead of a toggling behaviour,
33
+ * where: true -> menu closed, false -> menu open
34
+ */
35
+ ToggleCollapse: (forceTo: boolean) => void;
36
+ /**
37
+ * Returns current target record id.
38
+ */
39
+ TargetRef: () => TargetRef;
40
+ /**
41
+ * Updates the current target record id.
42
+ * Navigates the current app to the specified
43
+ * <code>targetRef</code>. Target Ref is the id of any equip/site etc..
44
+ */
45
+ NavigateToTargetRef: (targetRef: TargetRef, maintainView: boolean) => void;
46
+ /**
47
+ * Navigates to a particular application (trends, notes .. etc) under a specific target.
48
+ * @param {Fin5AppNames} appName name of the application
49
+ * @param {TargetRef} targetRef id of the target. Is the id of the equip/site.. etc to where the app should navigate
50
+ * @param {boolean} skipRef is the flag indicating where to ignore the target ref if not mentioned. If this flag is true and the target ref is not provided, then the navigation will be made to the root target ref and will not be obtained from where the app already is
51
+ */
52
+ NavigateToApp: (appName: Fin5AppNames, targetRef?: TargetRef, skipRef?: boolean, params?: string[]) => Promise<void>;
53
+ /**
54
+ * Method to open a url on the application LHS. The LHS here is the <code>iframe</code> where all
55
+ * the graphics etc are opened.
56
+ *
57
+ * @method LoadApplication
58
+ * @param {string} url - Is the url which is to be loaded
59
+ * @param {string} title - Specifies the title to be displayed on the iframe object
60
+ * @param {string} targetId - Specifies the id of the equip (etc) to which the main navigation update.
61
+ * @param {object} settings - Is the set of extra settings which will be also passed down to NavigateToApp
62
+ * @param {string} settings.app - the name of the application on the RHS
63
+ * @param {string[]} settings.params - overridden/additional params to pass to NavigateToApp
64
+ */
65
+ LoadApplication: (url: string, title?: string, targetRef?: TargetRef, settings?: {
66
+ app?: string;
67
+ params?: string[];
68
+ }) => Promise<void>;
69
+ /**
70
+ * As the name suggests, this method logs out the user and resets the current session.
71
+ */
72
+ Logout: () => void;
73
+ /**
74
+ * Get the currently active color scheme.
75
+ */
76
+ GetColorScheme: () => ColorScheme;
77
+ /**
78
+ * Get the filters object from the alarms application.
79
+ */
80
+ GetAlarmFilters: () => AlarmFilter;
81
+ /**
82
+ * Sets the filter settings for the alarms.
83
+ * @param {AlarmFilter} filters Is the object that defines the filter properties.
84
+ * @param {boolean} historical Flag indicating if the filter properties need to be applied to the historical alarms.
85
+ */
86
+ SetAlarmFilters: (filters: AlarmFilter, historical?: boolean) => void;
87
+ /**
88
+ * Navigates to the historian app and loads the graphs as per the passed arguments. The graph will be drawn for the passed "point" ids or for a "query" id or for a "string" query
89
+ * @param {HistorianType} type is the type of graph arg. Available args are:
90
+ * - point : the args will have point ids in an array
91
+ * - query : the arg will be the id of a saved chart query
92
+ * - string : the arg will be a query string
93
+ * @param {HistorianArgs} args is the array/string for point ids, the query id or the raw query string
94
+ */
95
+ OpenHistorianWithOptions: (type: HistorianType, args: HistorianArgs) => void;
96
+ /**
97
+ * Removes the remove-content-popup from the screen identified by the id.
98
+ * If the id is not specified, then removes the last popup added remote popup object.
99
+ * @param {string} [id] - is the id/identifier of the popup. The <code>id</code> of the HTML element should give you the id
100
+ */
101
+ RemoveRemotePopup: (id?: string) => void;
102
+ /**
103
+ * Open the Alarms application with the specified targetRef.
104
+ * @since FIN 5.2.0
105
+ * @param {TargetRef} [targetRef] - id of the target to be shown in the alarms app. If not provided, it will open with the current target ref.
106
+ */
107
+ OpenAlarms: (targetRef?: TargetRef) => Promise<void>;
108
+ /**
109
+ * Open the Schedules application with the specified targetRef and params
110
+ * @since FIN 5.2.0
111
+ * @param {TargetRef} [targetRef] - id of the target to be shown in the schedules app. If not provided, it will open with the current target ref.
112
+ * @param {ScheduleParams} [params] - additional parameters for the schedules app (id, appId, message).
113
+ */
114
+ OpenSchedules: (targetRef?: TargetRef, params?: SchedulesParams) => Promise<void>;
115
+ /**
116
+ * Navigates to the Charts App and loads the appropriate chart
117
+ * based on the chart id parameter. Removes any previous charts
118
+ * URL params.
119
+ * @since FIN 5.2.0
120
+ * @param {string} chartId - the id of the chart to be opened. If not provided, it will open the charts app without any chart loaded.
121
+ * @param {TargetRef} targetRef - id of the target to be shown in the charts app. If not provided, it will open with the current target ref.
122
+ */
123
+ OpenCharts: (chartId?: string, targetRef?: TargetRef) => Promise<void>;
124
+ /**
125
+ * Gets the name of the current application. Eg: notes, trends etc..
126
+ *
127
+ * @method CurrentAppName
128
+ * @param {boolean} isSpecialAppId : if true, returns the special app id (iframe app name) which is the url hash without the underscore
129
+ * @return {string | boolean} if false, there's no app currently open. Otherwise, returns the identifier of the app.
130
+ */
131
+ CurrentAppName: (isSpecialAppId?: boolean) => string | boolean;
132
+ findComponent: (name: string) => Fin5AppComponent;
133
+ findAllComponents: (name: string) => Fin5AppComponent[];
134
+ /**
135
+ * @see https://ractive.js.org/api/#ractiveobserve
136
+ */
137
+ observe: (keypath: string, callback: (newValue: unknown, oldValue: unknown, keypath: string) => void) => {
138
+ cancel: () => void;
139
+ };
140
+ set: (name: string, value: unknown) => Promise<undefined>;
141
+ get: (name: string) => Promise<unknown>;
142
+ APP_NAMES: typeof Fin5AppNames;
143
+ }
144
+ export declare enum Fin5AppNames {
145
+ EQUIP = "equip",
146
+ GRAPHICS = "graphics",
147
+ POINTS = "points",
148
+ ALARMS = "alarms",
149
+ NOTES = "notes",
150
+ SUMMARY = "summary",
151
+ SUMMARY_TOPICS = "summaryList",
152
+ TOOLS = "tools",
153
+ SCHEDULES = "schedules",
154
+ SCHEDULE_LIST = "scheduleList",
155
+ HISTORIAN = "trends",
156
+ TREND_LIST = "trendList",
157
+ CHARTS = "charts",
158
+ CHART_LIST = "chartList",
159
+ SEARCH = "search",
160
+ LOGOUT = "logout",
161
+ GENERIC = "generic",
162
+ REPORTS = "reports",
163
+ FLOOR = "floor",
164
+ BUILDER = "builder",
165
+ FILES = "files",
166
+ HOME = "home",
167
+ DASHBOARD = "dashboard",
168
+ SETTINGS = "settings"
169
+ }
170
+ interface LanguageManager {
171
+ currentLang: string;
172
+ }
173
+ interface Fin5AppComponent {
174
+ set: (value: unknown) => Promise<undefined>;
175
+ get: (value: unknown) => unknown;
176
+ }
177
+ export declare type TargetRef = string | null | undefined;
178
+ export interface SchedulesParams {
179
+ id?: string;
180
+ appId?: string;
181
+ message?: string;
182
+ }
183
+ export interface ColorScheme {
184
+ primary: string;
185
+ bodyBackground: string;
186
+ sidebarBackground: string;
187
+ }
188
+ export {};
@@ -1,87 +1,87 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2022, J2 Innovations. All Rights Reserved
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Fin5AppNames = exports.getFolioPopupState = exports.isWindowTopFin5 = exports.fin5Top = exports.getFin5top = void 0;
7
- class Fin5TopRetriever {
8
- static _fin5Top;
9
- static get fin5Top() {
10
- return this.getFin5top();
11
- }
12
- static getFin5top = (notifyFailure) => {
13
- if (this._fin5Top === undefined) {
14
- this._fin5Top = isWindowTopFin5(notifyFailure)
15
- ? window.top // Cast to unknown to obscure properties from Window to simplify usage.
16
- : null;
17
- }
18
- return this._fin5Top;
19
- };
20
- }
21
- exports.getFin5top = Fin5TopRetriever.getFin5top;
22
- exports.fin5Top = Fin5TopRetriever.fin5Top;
23
- function isWindowTopFin5(notifyFailure) {
24
- try {
25
- window?.top?.origin;
26
- if (window.top.finstack) {
27
- return true;
28
- }
29
- }
30
- catch { }
31
- notifyFailure?.();
32
- return false;
33
- }
34
- exports.isWindowTopFin5 = isWindowTopFin5;
35
- /**
36
- * Check the status of the Folio popup.
37
- * @returns an object containing the status of the Folio popup, including whether it's open,
38
- * minimized, and its id.
39
- */
40
- const getFolioPopupState = async () => {
41
- const stack = ((await exports.fin5Top?.app?.get('remotePopupStack')) ??
42
- []);
43
- const folio = stack.find((p) => {
44
- const url = (p.url || '').toLowerCase();
45
- const title = p.settings?.headerContent?.title?.toLowerCase() ?? '';
46
- return url.includes('folio') || title.includes('folio');
47
- });
48
- if (!folio) {
49
- return { isOpen: false, isMinimized: false, id: null };
50
- }
51
- const popups = exports.fin5Top?.app?.findAllComponents('remotecontentpopup') || [];
52
- const popup = popups.find((c) => c.get('identifier') === folio.id);
53
- return {
54
- isOpen: true,
55
- isMinimized: popup ? !!popup.get('isMinimized') : false,
56
- id: folio.id,
57
- };
58
- };
59
- exports.getFolioPopupState = getFolioPopupState;
60
- var Fin5AppNames;
61
- (function (Fin5AppNames) {
62
- Fin5AppNames["EQUIP"] = "equip";
63
- Fin5AppNames["GRAPHICS"] = "graphics";
64
- Fin5AppNames["POINTS"] = "points";
65
- Fin5AppNames["ALARMS"] = "alarms";
66
- Fin5AppNames["NOTES"] = "notes";
67
- Fin5AppNames["SUMMARY"] = "summary";
68
- Fin5AppNames["SUMMARY_TOPICS"] = "summaryList";
69
- Fin5AppNames["TOOLS"] = "tools";
70
- Fin5AppNames["SCHEDULES"] = "schedules";
71
- Fin5AppNames["SCHEDULE_LIST"] = "scheduleList";
72
- Fin5AppNames["HISTORIAN"] = "trends";
73
- Fin5AppNames["TREND_LIST"] = "trendList";
74
- Fin5AppNames["CHARTS"] = "charts";
75
- Fin5AppNames["CHART_LIST"] = "chartList";
76
- Fin5AppNames["SEARCH"] = "search";
77
- Fin5AppNames["LOGOUT"] = "logout";
78
- Fin5AppNames["GENERIC"] = "generic";
79
- Fin5AppNames["REPORTS"] = "reports";
80
- Fin5AppNames["FLOOR"] = "floor";
81
- Fin5AppNames["BUILDER"] = "builder";
82
- Fin5AppNames["FILES"] = "files";
83
- Fin5AppNames["HOME"] = "home";
84
- Fin5AppNames["DASHBOARD"] = "dashboard";
85
- Fin5AppNames["SETTINGS"] = "settings";
86
- })(Fin5AppNames = exports.Fin5AppNames || (exports.Fin5AppNames = {}));
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022, J2 Innovations. All Rights Reserved
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Fin5AppNames = exports.getFolioPopupState = exports.isWindowTopFin5 = exports.fin5Top = exports.getFin5top = void 0;
7
+ class Fin5TopRetriever {
8
+ static _fin5Top;
9
+ static get fin5Top() {
10
+ return this.getFin5top();
11
+ }
12
+ static getFin5top = (notifyFailure) => {
13
+ if (this._fin5Top === undefined) {
14
+ this._fin5Top = isWindowTopFin5(notifyFailure)
15
+ ? window.top // Cast to unknown to obscure properties from Window to simplify usage.
16
+ : null;
17
+ }
18
+ return this._fin5Top;
19
+ };
20
+ }
21
+ exports.getFin5top = Fin5TopRetriever.getFin5top;
22
+ exports.fin5Top = Fin5TopRetriever.fin5Top;
23
+ function isWindowTopFin5(notifyFailure) {
24
+ try {
25
+ window?.top?.origin;
26
+ if (window.top.finstack) {
27
+ return true;
28
+ }
29
+ }
30
+ catch { }
31
+ notifyFailure?.();
32
+ return false;
33
+ }
34
+ exports.isWindowTopFin5 = isWindowTopFin5;
35
+ /**
36
+ * Check the status of the Folio popup.
37
+ * @returns an object containing the status of the Folio popup, including whether it's open,
38
+ * minimized, and its id.
39
+ */
40
+ const getFolioPopupState = async () => {
41
+ const stack = ((await exports.fin5Top?.app?.get('remotePopupStack')) ??
42
+ []);
43
+ const folio = stack.find((p) => {
44
+ const url = (p.url || '').toLowerCase();
45
+ const title = p.settings?.headerContent?.title?.toLowerCase() ?? '';
46
+ return url.includes('folio') || title.includes('folio');
47
+ });
48
+ if (!folio) {
49
+ return { isOpen: false, isMinimized: false, id: null };
50
+ }
51
+ const popups = exports.fin5Top?.app?.findAllComponents('remotecontentpopup') || [];
52
+ const popup = popups.find((c) => c.get('identifier') === folio.id);
53
+ return {
54
+ isOpen: true,
55
+ isMinimized: popup ? !!popup.get('isMinimized') : false,
56
+ id: folio.id,
57
+ };
58
+ };
59
+ exports.getFolioPopupState = getFolioPopupState;
60
+ var Fin5AppNames;
61
+ (function (Fin5AppNames) {
62
+ Fin5AppNames["EQUIP"] = "equip";
63
+ Fin5AppNames["GRAPHICS"] = "graphics";
64
+ Fin5AppNames["POINTS"] = "points";
65
+ Fin5AppNames["ALARMS"] = "alarms";
66
+ Fin5AppNames["NOTES"] = "notes";
67
+ Fin5AppNames["SUMMARY"] = "summary";
68
+ Fin5AppNames["SUMMARY_TOPICS"] = "summaryList";
69
+ Fin5AppNames["TOOLS"] = "tools";
70
+ Fin5AppNames["SCHEDULES"] = "schedules";
71
+ Fin5AppNames["SCHEDULE_LIST"] = "scheduleList";
72
+ Fin5AppNames["HISTORIAN"] = "trends";
73
+ Fin5AppNames["TREND_LIST"] = "trendList";
74
+ Fin5AppNames["CHARTS"] = "charts";
75
+ Fin5AppNames["CHART_LIST"] = "chartList";
76
+ Fin5AppNames["SEARCH"] = "search";
77
+ Fin5AppNames["LOGOUT"] = "logout";
78
+ Fin5AppNames["GENERIC"] = "generic";
79
+ Fin5AppNames["REPORTS"] = "reports";
80
+ Fin5AppNames["FLOOR"] = "floor";
81
+ Fin5AppNames["BUILDER"] = "builder";
82
+ Fin5AppNames["FILES"] = "files";
83
+ Fin5AppNames["HOME"] = "home";
84
+ Fin5AppNames["DASHBOARD"] = "dashboard";
85
+ Fin5AppNames["SETTINGS"] = "settings";
86
+ })(Fin5AppNames = exports.Fin5AppNames || (exports.Fin5AppNames = {}));
87
87
  //# sourceMappingURL=fin5Top.js.map
@@ -1,6 +1,6 @@
1
- /**
2
- * Get the URI to register the FIN instance to Edge2Cloud.
3
- * The URI can be used to provide a link, or to create the registration QR code.
4
- * @returns the URI as a string
5
- */
6
- export declare const getEdge2CloudRegistrationUri: () => Promise<string>;
1
+ /**
2
+ * Get the URI to register the FIN instance to Edge2Cloud.
3
+ * The URI can be used to provide a link, or to create the registration QR code.
4
+ * @returns the URI as a string
5
+ */
6
+ export declare const getEdge2CloudRegistrationUri: () => Promise<string>;
@@ -1,16 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEdge2CloudRegistrationUri = void 0;
4
- const haystack_nclient_1 = require("haystack-nclient");
5
- /**
6
- * Get the URI to register the FIN instance to Edge2Cloud.
7
- * The URI can be used to provide a link, or to create the registration QR code.
8
- * @returns the URI as a string
9
- */
10
- const getEdge2CloudRegistrationUri = async () => {
11
- const response = await (0, haystack_nclient_1.finCsrfFetch)('/finEdge2Cloud/devreg');
12
- const json = await response.json();
13
- return json.uri;
14
- };
15
- exports.getEdge2CloudRegistrationUri = getEdge2CloudRegistrationUri;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getEdge2CloudRegistrationUri = void 0;
4
+ const haystack_nclient_1 = require("haystack-nclient");
5
+ /**
6
+ * Get the URI to register the FIN instance to Edge2Cloud.
7
+ * The URI can be used to provide a link, or to create the registration QR code.
8
+ * @returns the URI as a string
9
+ */
10
+ const getEdge2CloudRegistrationUri = async () => {
11
+ const response = await (0, haystack_nclient_1.finCsrfFetch)('/finEdge2Cloud/devreg');
12
+ const json = await response.json();
13
+ return json.uri;
14
+ };
15
+ exports.getEdge2CloudRegistrationUri = getEdge2CloudRegistrationUri;
16
16
  //# sourceMappingURL=finEdge2Cloud.js.map
@@ -1,2 +1,2 @@
1
- import { HRef } from 'haystack-core';
2
- export declare const getFin5BinUrl: (id: HRef, projectName?: string | undefined) => string;
1
+ import { HRef } from 'haystack-core';
2
+ export declare const getFin5BinUrl: (id: HRef, projectName?: string | undefined) => string;
@@ -1,10 +1,10 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2022, J2 Innovations. All Rights Reserved
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getFin5BinUrl = void 0;
7
- const fin5Top_1 = require("./fin5Top");
8
- const getFin5BinUrl = (id, projectName = fin5Top_1.fin5Top?.finstack?.projectName) => `/finGetFile/${projectName}?fileRef=${id?.toAxon()}`;
9
- exports.getFin5BinUrl = getFin5BinUrl;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022, J2 Innovations. All Rights Reserved
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getFin5BinUrl = void 0;
7
+ const fin5Top_1 = require("./fin5Top");
8
+ const getFin5BinUrl = (id, projectName = fin5Top_1.fin5Top?.finstack?.projectName) => `/finGetFile/${projectName}?fileRef=${id?.toAxon()}`;
9
+ exports.getFin5BinUrl = getFin5BinUrl;
10
10
  //# sourceMappingURL=getFin5BinUrl.js.map