@os1-platform/dispatch-mobile 2.1.1 → 2.1.3

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 (174) hide show
  1. package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  2. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +9 -4
  3. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  4. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +78 -36
  5. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  6. package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
  7. package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
  8. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +1 -1
  9. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  10. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +1 -1
  11. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  12. package/lib/commonjs/components/executiontasks/forms/FormSchema.js.map +1 -1
  13. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  14. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +2 -3
  15. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  16. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +223 -127
  17. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  18. package/lib/commonjs/components/executiontasks/imageCapture/camera.svg +3 -0
  19. package/lib/commonjs/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
  20. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
  21. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  22. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
  23. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +1 -1
  24. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  25. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
  26. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
  27. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  28. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
  29. package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
  30. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +1 -1
  31. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  32. package/lib/commonjs/constants/constants.js +1 -1
  33. package/lib/commonjs/constants/constants.js.map +1 -1
  34. package/lib/commonjs/index.js +7 -0
  35. package/lib/commonjs/index.js.map +1 -1
  36. package/lib/commonjs/locale/Str.js +3 -1
  37. package/lib/commonjs/locale/Str.js.map +1 -1
  38. package/lib/commonjs/locale/en.json +2 -1
  39. package/lib/commonjs/locale/i18n.js +5 -1
  40. package/lib/commonjs/locale/i18n.js.map +1 -1
  41. package/lib/commonjs/manager/syncmanager/DBConfig.js +1 -1
  42. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  43. package/lib/commonjs/styles/executionTasks/CommonStyles.js +2 -1
  44. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  45. package/lib/commonjs/ui/screens/DeliverScreen.js +24 -5
  46. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/DoodleScreen.js +22 -1
  48. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/DropCashScreen.js +24 -5
  50. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/FormsScreen.js +22 -1
  52. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +24 -5
  54. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/PaymentScreen.js +25 -4
  56. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/PickupScreen.js +31 -5
  58. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  59. package/lib/commonjs/utils/helper.js +46 -3
  60. package/lib/commonjs/utils/helper.js.map +1 -1
  61. package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  62. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +9 -4
  63. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  64. package/lib/module/components/executiontasks/doodle/SignatureET.js +78 -36
  65. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  66. package/lib/module/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
  67. package/lib/module/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
  68. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +1 -1
  69. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  70. package/lib/module/components/executiontasks/forms/FormGenerator.js +1 -1
  71. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  72. package/lib/module/components/executiontasks/forms/FormSchema.js.map +1 -1
  73. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  74. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +2 -3
  75. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  76. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +226 -130
  77. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  78. package/lib/module/components/executiontasks/imageCapture/camera.svg +3 -0
  79. package/lib/module/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
  80. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
  81. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  82. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
  83. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +1 -1
  84. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  85. package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
  86. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
  87. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  88. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
  89. package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
  90. package/lib/module/components/executiontasks/pickup/SLPickupET.js +1 -1
  91. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  92. package/lib/module/constants/constants.js +1 -1
  93. package/lib/module/constants/constants.js.map +1 -1
  94. package/lib/module/index.js +2 -0
  95. package/lib/module/index.js.map +1 -1
  96. package/lib/module/locale/Str.js +3 -1
  97. package/lib/module/locale/Str.js.map +1 -1
  98. package/lib/module/locale/en.json +2 -1
  99. package/lib/module/locale/i18n.js +5 -1
  100. package/lib/module/locale/i18n.js.map +1 -1
  101. package/lib/module/manager/syncmanager/DBConfig.js +1 -1
  102. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  103. package/lib/module/styles/executionTasks/CommonStyles.js +2 -1
  104. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  105. package/lib/module/ui/screens/DeliverScreen.js +24 -5
  106. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  107. package/lib/module/ui/screens/DoodleScreen.js +22 -1
  108. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  109. package/lib/module/ui/screens/DropCashScreen.js +25 -5
  110. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  111. package/lib/module/ui/screens/FormsScreen.js +22 -1
  112. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  113. package/lib/module/ui/screens/ImageCaptureScreen.js +24 -5
  114. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  115. package/lib/module/ui/screens/PaymentScreen.js +25 -4
  116. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  117. package/lib/module/ui/screens/PickupScreen.js +31 -5
  118. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  119. package/lib/module/utils/helper.js +46 -4
  120. package/lib/module/utils/helper.js.map +1 -1
  121. package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +1 -0
  122. package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +1 -0
  123. package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +1 -0
  124. package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +1 -0
  125. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +1 -0
  126. package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +6 -1
  127. package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +1 -2
  128. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +1 -0
  129. package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +1 -0
  130. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +1 -0
  131. package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +1 -0
  132. package/lib/typescript/constants/constants.d.ts +1 -1
  133. package/lib/typescript/index.d.ts +2 -0
  134. package/lib/typescript/locale/Str.d.ts +2 -0
  135. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +1 -1
  136. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +1 -0
  137. package/lib/typescript/utils/helper.d.ts +4 -3
  138. package/package.json +4 -5
  139. package/src/components/executiontasks/deliver/DeliverETInput.ts +1 -0
  140. package/src/components/executiontasks/deliver/SLDeliverET.tsx +13 -6
  141. package/src/components/executiontasks/doodle/SignatureET.tsx +48 -43
  142. package/src/components/executiontasks/doodle/SignatureSchema.ts +1 -0
  143. package/src/components/executiontasks/dropCash/DropCashSchema.ts +1 -0
  144. package/src/components/executiontasks/dropCash/SLDropCash.tsx +4 -4
  145. package/src/components/executiontasks/forms/FormGenerator.tsx +4 -3
  146. package/src/components/executiontasks/forms/FormSchema.ts +1 -0
  147. package/src/components/executiontasks/imageCapture/CaptureSchema.ts +1 -0
  148. package/src/components/executiontasks/imageCapture/CaptureUtils.ts +4 -9
  149. package/src/components/executiontasks/imageCapture/ImageCapture.tsx +279 -185
  150. package/src/components/executiontasks/imageCapture/camera.svg +3 -0
  151. package/src/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
  152. package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +2 -1
  153. package/src/components/executiontasks/payments/completePayment/CompletePaymentSchema.ts +1 -0
  154. package/src/components/executiontasks/payments/init/InitPaymentET.tsx +2 -3
  155. package/src/components/executiontasks/payments/init/InitPaymentSchema.ts +1 -0
  156. package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +3 -2
  157. package/src/components/executiontasks/payments/processPayment/ProcessPaymentSchema.ts +1 -0
  158. package/src/components/executiontasks/pickup/PickpSchema.ts +1 -0
  159. package/src/components/executiontasks/pickup/SLPickupET.tsx +5 -3
  160. package/src/constants/constants.ts +1 -1
  161. package/src/index.tsx +4 -2
  162. package/src/locale/Str.ts +3 -1
  163. package/src/locale/en.json +2 -1
  164. package/src/locale/i18n.ts +5 -1
  165. package/src/manager/syncmanager/DBConfig.ts +1 -1
  166. package/src/styles/executionTasks/CommonStyles.ts +1 -0
  167. package/src/ui/screens/DeliverScreen.tsx +27 -8
  168. package/src/ui/screens/DoodleScreen.tsx +25 -2
  169. package/src/ui/screens/DropCashScreen.tsx +27 -8
  170. package/src/ui/screens/FormsScreen.tsx +23 -1
  171. package/src/ui/screens/ImageCaptureScreen.tsx +29 -11
  172. package/src/ui/screens/PaymentScreen.tsx +32 -10
  173. package/src/ui/screens/PickupScreen.tsx +35 -8
  174. package/src/utils/helper.ts +47 -4
@@ -1,9 +1,23 @@
1
- import Network from './../resources/network';
1
+ import Network from '../resources/network';
2
+ import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
3
+ import ETTransition from '@os1-platform/platform-coreos-execution-engine-sdk/';
4
+
2
5
  /**
3
6
  *
4
7
  * @class Helper
5
8
  */
6
- class Helper {
9
+ export default class Helper {
10
+
11
+ private static instance: Helper;
12
+
13
+
14
+ public static getInstance(): Helper {
15
+ if (!Helper.instance) {
16
+ Helper.instance = new Helper();
17
+ }
18
+ return Helper.instance;
19
+ }
20
+
7
21
  /**
8
22
  * Check the availability of a network for an app.
9
23
  *
@@ -18,7 +32,36 @@ class Helper {
18
32
  return false;
19
33
  }
20
34
  }
35
+
36
+
37
+ async isSelfLoopExistOnET(workflowId: string,
38
+ sourceTaskName: string): Promise<boolean> {
39
+ try {
40
+ console.log("isSelfLoopExistOnET::sourceTaskName => ", sourceTaskName)
41
+ //
42
+ let isSelfLoopExist: boolean = false;
43
+ const dummyETTransitionObj = [{ sourceTaskName: "", targetTaskName: "", condition: "" }]
44
+ const transitionsFromCurrentET = await dispatchExecutor.queryWorkflowTransitionData(workflowId, sourceTaskName);
45
+
46
+ outerLoop: for (const obj of transitionsFromCurrentET ?? dummyETTransitionObj) {
47
+ if ((obj.targetTaskName as string).toLocaleLowerCase() === sourceTaskName.toLowerCase()) {
48
+ isSelfLoopExist = true;
49
+ break outerLoop;
50
+ }
51
+ }
52
+
53
+ // transitionsFromCurrentET?.forEach( (obj) => {
54
+ // if((obj.targetTaskName as string).toLocaleLowerCase() === sourceTaskName.toLowerCase()){
55
+ // isSelfLoopExist = true;
56
+ // break;
57
+ // }
58
+ // });
59
+ return isSelfLoopExist;
60
+ } catch (e: any) {
61
+ console.log("isSelfLoopExistOnET-Error", JSON.stringify(e));
62
+ return false;
63
+ }
64
+ }
65
+
21
66
  }
22
67
 
23
- const helper = new Helper();
24
- export default helper;