@things-factory/compliance 0.0.0-stage → 10.1.255

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 (356) hide show
  1. package/dist-client/bootstrap.d.ts +2 -0
  2. package/dist-client/bootstrap.js +28 -0
  3. package/dist-client/bootstrap.js.map +1 -0
  4. package/dist-client/components/compliance-case-form.d.ts +42 -0
  5. package/dist-client/components/compliance-case-form.js +313 -0
  6. package/dist-client/components/compliance-case-form.js.map +1 -0
  7. package/dist-client/components/compliance-case-sheet.d.ts +35 -0
  8. package/dist-client/components/compliance-case-sheet.js +335 -0
  9. package/dist-client/components/compliance-case-sheet.js.map +1 -0
  10. package/dist-client/components/compliance-my-inventions.d.ts +17 -0
  11. package/dist-client/components/compliance-my-inventions.js +133 -0
  12. package/dist-client/components/compliance-my-inventions.js.map +1 -0
  13. package/dist-client/components/compliance-my-privacy-requests.d.ts +34 -0
  14. package/dist-client/components/compliance-my-privacy-requests.js +232 -0
  15. package/dist-client/components/compliance-my-privacy-requests.js.map +1 -0
  16. package/dist-client/components/compliance-my-reports.d.ts +19 -0
  17. package/dist-client/components/compliance-my-reports.js +137 -0
  18. package/dist-client/components/compliance-my-reports.js.map +1 -0
  19. package/dist-client/components/guide-link.d.ts +13 -0
  20. package/dist-client/components/guide-link.js +55 -0
  21. package/dist-client/components/guide-link.js.map +1 -0
  22. package/dist-client/components/invention-report-form.d.ts +30 -0
  23. package/dist-client/components/invention-report-form.js +188 -0
  24. package/dist-client/components/invention-report-form.js.map +1 -0
  25. package/dist-client/components/legal-todo.d.ts +10 -0
  26. package/dist-client/components/legal-todo.js +43 -0
  27. package/dist-client/components/legal-todo.js.map +1 -0
  28. package/dist-client/components/my-trainings.d.ts +18 -0
  29. package/dist-client/components/my-trainings.js +149 -0
  30. package/dist-client/components/my-trainings.js.map +1 -0
  31. package/dist-client/components/regulation-form.d.ts +26 -0
  32. package/dist-client/components/regulation-form.js +161 -0
  33. package/dist-client/components/regulation-form.js.map +1 -0
  34. package/dist-client/components/seal-use-form.d.ts +47 -0
  35. package/dist-client/components/seal-use-form.js +300 -0
  36. package/dist-client/components/seal-use-form.js.map +1 -0
  37. package/dist-client/components/training-attendance-form.d.ts +37 -0
  38. package/dist-client/components/training-attendance-form.js +186 -0
  39. package/dist-client/components/training-attendance-form.js.map +1 -0
  40. package/dist-client/components/training-certificate-form.d.ts +41 -0
  41. package/dist-client/components/training-certificate-form.js +198 -0
  42. package/dist-client/components/training-certificate-form.js.map +1 -0
  43. package/dist-client/components/training-session-form.d.ts +39 -0
  44. package/dist-client/components/training-session-form.js +270 -0
  45. package/dist-client/components/training-session-form.js.map +1 -0
  46. package/dist-client/components/training-setting-form.d.ts +45 -0
  47. package/dist-client/components/training-setting-form.js +175 -0
  48. package/dist-client/components/training-setting-form.js.map +1 -0
  49. package/dist-client/index.d.ts +4 -0
  50. package/dist-client/index.js +8 -0
  51. package/dist-client/index.js.map +1 -0
  52. package/dist-client/legal-record/dispute-calendar-source.d.ts +1 -0
  53. package/dist-client/legal-record/dispute-calendar-source.js +51 -0
  54. package/dist-client/legal-record/dispute-calendar-source.js.map +1 -0
  55. package/dist-client/legal-record/legal-child-grid.d.ts +31 -0
  56. package/dist-client/legal-record/legal-child-grid.js +76 -0
  57. package/dist-client/legal-record/legal-child-grid.js.map +1 -0
  58. package/dist-client/legal-record/legal-codes.d.ts +3 -0
  59. package/dist-client/legal-record/legal-codes.js +5 -0
  60. package/dist-client/legal-record/legal-codes.js.map +1 -0
  61. package/dist-client/legal-record/legal-grid.d.ts +59 -0
  62. package/dist-client/legal-record/legal-grid.js +68 -0
  63. package/dist-client/legal-record/legal-grid.js.map +1 -0
  64. package/dist-client/legal-record/legal-record-files.d.ts +26 -0
  65. package/dist-client/legal-record/legal-record-files.js +162 -0
  66. package/dist-client/legal-record/legal-record-files.js.map +1 -0
  67. package/dist-client/pages/compliance-case-list.d.ts +35 -0
  68. package/dist-client/pages/compliance-case-list.js +112 -0
  69. package/dist-client/pages/compliance-case-list.js.map +1 -0
  70. package/dist-client/pages/dispute-list.d.ts +57 -0
  71. package/dist-client/pages/dispute-list.js +156 -0
  72. package/dist-client/pages/dispute-list.js.map +1 -0
  73. package/dist-client/pages/invention-list.d.ts +57 -0
  74. package/dist-client/pages/invention-list.js +166 -0
  75. package/dist-client/pages/invention-list.js.map +1 -0
  76. package/dist-client/pages/legal-registration-list.d.ts +63 -0
  77. package/dist-client/pages/legal-registration-list.js +206 -0
  78. package/dist-client/pages/legal-registration-list.js.map +1 -0
  79. package/dist-client/pages/privacy-record-list.d.ts +52 -0
  80. package/dist-client/pages/privacy-record-list.js +225 -0
  81. package/dist-client/pages/privacy-record-list.js.map +1 -0
  82. package/dist-client/pages/regulation-detail.d.ts +43 -0
  83. package/dist-client/pages/regulation-detail.js +370 -0
  84. package/dist-client/pages/regulation-detail.js.map +1 -0
  85. package/dist-client/pages/regulation-list.d.ts +52 -0
  86. package/dist-client/pages/regulation-list.js +144 -0
  87. package/dist-client/pages/regulation-list.js.map +1 -0
  88. package/dist-client/pages/regulations.d.ts +49 -0
  89. package/dist-client/pages/regulations.js +412 -0
  90. package/dist-client/pages/regulations.js.map +1 -0
  91. package/dist-client/pages/seal-use-list.d.ts +57 -0
  92. package/dist-client/pages/seal-use-list.js +168 -0
  93. package/dist-client/pages/seal-use-list.js.map +1 -0
  94. package/dist-client/pages/training-list.d.ts +51 -0
  95. package/dist-client/pages/training-list.js +333 -0
  96. package/dist-client/pages/training-list.js.map +1 -0
  97. package/dist-client/regulation/regulation-fragments.d.ts +1 -0
  98. package/dist-client/regulation/regulation-fragments.js +37 -0
  99. package/dist-client/regulation/regulation-fragments.js.map +1 -0
  100. package/dist-client/regulation/regulation-guide.d.ts +19 -0
  101. package/dist-client/regulation/regulation-guide.js +48 -0
  102. package/dist-client/regulation/regulation-guide.js.map +1 -0
  103. package/dist-client/route.d.ts +1 -0
  104. package/dist-client/route.js +36 -0
  105. package/dist-client/route.js.map +1 -0
  106. package/dist-client/training-words.d.ts +11 -0
  107. package/dist-client/training-words.js +11 -0
  108. package/dist-client/training-words.js.map +1 -0
  109. package/dist-client/tsconfig.tsbuildinfo +1 -0
  110. package/dist-client/words.d.ts +15 -0
  111. package/dist-client/words.js +20 -0
  112. package/dist-client/words.js.map +1 -0
  113. package/dist-server/activities/index.d.ts +6 -0
  114. package/dist-server/activities/index.js +37 -0
  115. package/dist-server/activities/index.js.map +1 -0
  116. package/dist-server/activities/legal-todo-activity-names.d.ts +1 -0
  117. package/dist-server/activities/legal-todo-activity-names.js +5 -0
  118. package/dist-server/activities/legal-todo-activity-names.js.map +1 -0
  119. package/dist-server/activities/legal-todo-activity.d.ts +37 -0
  120. package/dist-server/activities/legal-todo-activity.js +41 -0
  121. package/dist-server/activities/legal-todo-activity.js.map +1 -0
  122. package/dist-server/activities/regulation-activity-names.d.ts +1 -0
  123. package/dist-server/activities/regulation-activity-names.js +5 -0
  124. package/dist-server/activities/regulation-activity-names.js.map +1 -0
  125. package/dist-server/activities/regulation-activity.d.ts +48 -0
  126. package/dist-server/activities/regulation-activity.js +47 -0
  127. package/dist-server/activities/regulation-activity.js.map +1 -0
  128. package/dist-server/activities/seal-use-activity-names.d.ts +2 -0
  129. package/dist-server/activities/seal-use-activity-names.js +6 -0
  130. package/dist-server/activities/seal-use-activity-names.js.map +1 -0
  131. package/dist-server/activities/seal-use-activity.d.ts +48 -0
  132. package/dist-server/activities/seal-use-activity.js +47 -0
  133. package/dist-server/activities/seal-use-activity.js.map +1 -0
  134. package/dist-server/index.d.ts +2 -0
  135. package/dist-server/index.js +21 -0
  136. package/dist-server/index.js.map +1 -0
  137. package/dist-server/role-tasks.d.ts +2 -0
  138. package/dist-server/role-tasks.js +28 -0
  139. package/dist-server/role-tasks.js.map +1 -0
  140. package/dist-server/service/common/correction.d.ts +32 -0
  141. package/dist-server/service/common/correction.js +98 -0
  142. package/dist-server/service/common/correction.js.map +1 -0
  143. package/dist-server/service/common/employee-reader.d.ts +11 -0
  144. package/dist-server/service/common/employee-reader.js +46 -0
  145. package/dist-server/service/common/employee-reader.js.map +1 -0
  146. package/dist-server/service/common/legal-todo.d.ts +19 -0
  147. package/dist-server/service/common/legal-todo.js +37 -0
  148. package/dist-server/service/common/legal-todo.js.map +1 -0
  149. package/dist-server/service/compliance-case/compliance-case-mutation.d.ts +9 -0
  150. package/dist-server/service/compliance-case/compliance-case-mutation.js +73 -0
  151. package/dist-server/service/compliance-case/compliance-case-mutation.js.map +1 -0
  152. package/dist-server/service/compliance-case/compliance-case-query.d.ts +28 -0
  153. package/dist-server/service/compliance-case/compliance-case-query.js +212 -0
  154. package/dist-server/service/compliance-case/compliance-case-query.js.map +1 -0
  155. package/dist-server/service/compliance-case/compliance-case-rules.d.ts +71 -0
  156. package/dist-server/service/compliance-case/compliance-case-rules.js +111 -0
  157. package/dist-server/service/compliance-case/compliance-case-rules.js.map +1 -0
  158. package/dist-server/service/compliance-case/compliance-case-service.d.ts +76 -0
  159. package/dist-server/service/compliance-case/compliance-case-service.js +425 -0
  160. package/dist-server/service/compliance-case/compliance-case-service.js.map +1 -0
  161. package/dist-server/service/compliance-case/compliance-case-type.d.ts +56 -0
  162. package/dist-server/service/compliance-case/compliance-case-type.js +200 -0
  163. package/dist-server/service/compliance-case/compliance-case-type.js.map +1 -0
  164. package/dist-server/service/compliance-case/compliance-case.d.ts +76 -0
  165. package/dist-server/service/compliance-case/compliance-case.js +260 -0
  166. package/dist-server/service/compliance-case/compliance-case.js.map +1 -0
  167. package/dist-server/service/compliance-case/index.d.ts +7 -0
  168. package/dist-server/service/compliance-case/index.js +17 -0
  169. package/dist-server/service/compliance-case/index.js.map +1 -0
  170. package/dist-server/service/dispute/dispute-mutation.d.ts +9 -0
  171. package/dist-server/service/dispute/dispute-mutation.js +64 -0
  172. package/dist-server/service/dispute/dispute-mutation.js.map +1 -0
  173. package/dist-server/service/dispute/dispute-query.d.ts +16 -0
  174. package/dist-server/service/dispute/dispute-query.js +124 -0
  175. package/dist-server/service/dispute/dispute-query.js.map +1 -0
  176. package/dist-server/service/dispute/dispute-rules.d.ts +20 -0
  177. package/dist-server/service/dispute/dispute-rules.js +42 -0
  178. package/dist-server/service/dispute/dispute-rules.js.map +1 -0
  179. package/dist-server/service/dispute/dispute-service.d.ts +17 -0
  180. package/dist-server/service/dispute/dispute-service.js +96 -0
  181. package/dist-server/service/dispute/dispute-service.js.map +1 -0
  182. package/dist-server/service/dispute/dispute-type.d.ts +39 -0
  183. package/dist-server/service/dispute/dispute-type.js +149 -0
  184. package/dist-server/service/dispute/dispute-type.js.map +1 -0
  185. package/dist-server/service/dispute/dispute.d.ts +48 -0
  186. package/dist-server/service/dispute/dispute.js +198 -0
  187. package/dist-server/service/dispute/dispute.js.map +1 -0
  188. package/dist-server/service/dispute/index.d.ts +5 -0
  189. package/dist-server/service/dispute/index.js +9 -0
  190. package/dist-server/service/dispute/index.js.map +1 -0
  191. package/dist-server/service/index.d.ts +46 -0
  192. package/dist-server/service/index.js +112 -0
  193. package/dist-server/service/index.js.map +1 -0
  194. package/dist-server/service/invention/index.d.ts +5 -0
  195. package/dist-server/service/invention/index.js +9 -0
  196. package/dist-server/service/invention/index.js.map +1 -0
  197. package/dist-server/service/invention/invention-mutation.d.ts +10 -0
  198. package/dist-server/service/invention/invention-mutation.js +79 -0
  199. package/dist-server/service/invention/invention-mutation.js.map +1 -0
  200. package/dist-server/service/invention/invention-query.d.ts +18 -0
  201. package/dist-server/service/invention/invention-query.js +141 -0
  202. package/dist-server/service/invention/invention-query.js.map +1 -0
  203. package/dist-server/service/invention/invention-rules.d.ts +28 -0
  204. package/dist-server/service/invention/invention-rules.js +54 -0
  205. package/dist-server/service/invention/invention-rules.js.map +1 -0
  206. package/dist-server/service/invention/invention-service.d.ts +25 -0
  207. package/dist-server/service/invention/invention-service.js +176 -0
  208. package/dist-server/service/invention/invention-service.js.map +1 -0
  209. package/dist-server/service/invention/invention-type.d.ts +34 -0
  210. package/dist-server/service/invention/invention-type.js +129 -0
  211. package/dist-server/service/invention/invention-type.js.map +1 -0
  212. package/dist-server/service/invention/invention.d.ts +55 -0
  213. package/dist-server/service/invention/invention.js +214 -0
  214. package/dist-server/service/invention/invention.js.map +1 -0
  215. package/dist-server/service/legal-record/attachment-readers.d.ts +1 -0
  216. package/dist-server/service/legal-record/attachment-readers.js +27 -0
  217. package/dist-server/service/legal-record/attachment-readers.js.map +1 -0
  218. package/dist-server/service/legal-record/days.d.ts +7 -0
  219. package/dist-server/service/legal-record/days.js +26 -0
  220. package/dist-server/service/legal-record/days.js.map +1 -0
  221. package/dist-server/service/legal-record/legal-record-support.d.ts +24 -0
  222. package/dist-server/service/legal-record/legal-record-support.js +51 -0
  223. package/dist-server/service/legal-record/legal-record-support.js.map +1 -0
  224. package/dist-server/service/legal-registration/centre-change-subscriber.d.ts +9 -0
  225. package/dist-server/service/legal-registration/centre-change-subscriber.js +50 -0
  226. package/dist-server/service/legal-registration/centre-change-subscriber.js.map +1 -0
  227. package/dist-server/service/legal-registration/index.d.ts +7 -0
  228. package/dist-server/service/legal-registration/index.js +11 -0
  229. package/dist-server/service/legal-registration/index.js.map +1 -0
  230. package/dist-server/service/legal-registration/legal-registration-mutation.d.ts +10 -0
  231. package/dist-server/service/legal-registration/legal-registration-mutation.js +77 -0
  232. package/dist-server/service/legal-registration/legal-registration-mutation.js.map +1 -0
  233. package/dist-server/service/legal-registration/legal-registration-query.d.ts +26 -0
  234. package/dist-server/service/legal-registration/legal-registration-query.js +199 -0
  235. package/dist-server/service/legal-registration/legal-registration-query.js.map +1 -0
  236. package/dist-server/service/legal-registration/legal-registration-rules.d.ts +80 -0
  237. package/dist-server/service/legal-registration/legal-registration-rules.js +106 -0
  238. package/dist-server/service/legal-registration/legal-registration-rules.js.map +1 -0
  239. package/dist-server/service/legal-registration/legal-registration-service.d.ts +37 -0
  240. package/dist-server/service/legal-registration/legal-registration-service.js +248 -0
  241. package/dist-server/service/legal-registration/legal-registration-service.js.map +1 -0
  242. package/dist-server/service/legal-registration/legal-registration-type.d.ts +55 -0
  243. package/dist-server/service/legal-registration/legal-registration-type.js +207 -0
  244. package/dist-server/service/legal-registration/legal-registration-type.js.map +1 -0
  245. package/dist-server/service/legal-registration/legal-registration.d.ts +76 -0
  246. package/dist-server/service/legal-registration/legal-registration.js +311 -0
  247. package/dist-server/service/legal-registration/legal-registration.js.map +1 -0
  248. package/dist-server/service/privacy-record/index.d.ts +5 -0
  249. package/dist-server/service/privacy-record/index.js +9 -0
  250. package/dist-server/service/privacy-record/index.js.map +1 -0
  251. package/dist-server/service/privacy-record/privacy-record-mutation.d.ts +7 -0
  252. package/dist-server/service/privacy-record/privacy-record-mutation.js +56 -0
  253. package/dist-server/service/privacy-record/privacy-record-mutation.js.map +1 -0
  254. package/dist-server/service/privacy-record/privacy-record-query.d.ts +18 -0
  255. package/dist-server/service/privacy-record/privacy-record-query.js +131 -0
  256. package/dist-server/service/privacy-record/privacy-record-query.js.map +1 -0
  257. package/dist-server/service/privacy-record/privacy-record-rules.d.ts +52 -0
  258. package/dist-server/service/privacy-record/privacy-record-rules.js +91 -0
  259. package/dist-server/service/privacy-record/privacy-record-rules.js.map +1 -0
  260. package/dist-server/service/privacy-record/privacy-record-service.d.ts +33 -0
  261. package/dist-server/service/privacy-record/privacy-record-service.js +133 -0
  262. package/dist-server/service/privacy-record/privacy-record-service.js.map +1 -0
  263. package/dist-server/service/privacy-record/privacy-record-type.d.ts +40 -0
  264. package/dist-server/service/privacy-record/privacy-record-type.js +153 -0
  265. package/dist-server/service/privacy-record/privacy-record-type.js.map +1 -0
  266. package/dist-server/service/privacy-record/privacy-record.d.ts +69 -0
  267. package/dist-server/service/privacy-record/privacy-record.js +245 -0
  268. package/dist-server/service/privacy-record/privacy-record.js.map +1 -0
  269. package/dist-server/service/regulation/index.d.ts +5 -0
  270. package/dist-server/service/regulation/index.js +9 -0
  271. package/dist-server/service/regulation/index.js.map +1 -0
  272. package/dist-server/service/regulation/regulation-mutation.d.ts +15 -0
  273. package/dist-server/service/regulation/regulation-mutation.js +152 -0
  274. package/dist-server/service/regulation/regulation-mutation.js.map +1 -0
  275. package/dist-server/service/regulation/regulation-query.d.ts +10 -0
  276. package/dist-server/service/regulation/regulation-query.js +109 -0
  277. package/dist-server/service/regulation/regulation-query.js.map +1 -0
  278. package/dist-server/service/regulation/regulation-read.d.ts +21 -0
  279. package/dist-server/service/regulation/regulation-read.js +111 -0
  280. package/dist-server/service/regulation/regulation-read.js.map +1 -0
  281. package/dist-server/service/regulation/regulation-rules.d.ts +83 -0
  282. package/dist-server/service/regulation/regulation-rules.js +170 -0
  283. package/dist-server/service/regulation/regulation-rules.js.map +1 -0
  284. package/dist-server/service/regulation/regulation-service.d.ts +63 -0
  285. package/dist-server/service/regulation/regulation-service.js +365 -0
  286. package/dist-server/service/regulation/regulation-service.js.map +1 -0
  287. package/dist-server/service/regulation/regulation-type.d.ts +61 -0
  288. package/dist-server/service/regulation/regulation-type.js +226 -0
  289. package/dist-server/service/regulation/regulation-type.js.map +1 -0
  290. package/dist-server/service/regulation/regulation.d.ts +113 -0
  291. package/dist-server/service/regulation/regulation.js +382 -0
  292. package/dist-server/service/regulation/regulation.js.map +1 -0
  293. package/dist-server/service/seal-use/index.d.ts +5 -0
  294. package/dist-server/service/seal-use/index.js +9 -0
  295. package/dist-server/service/seal-use/index.js.map +1 -0
  296. package/dist-server/service/seal-use/seal-use-mutation.d.ts +8 -0
  297. package/dist-server/service/seal-use/seal-use-mutation.js +69 -0
  298. package/dist-server/service/seal-use/seal-use-mutation.js.map +1 -0
  299. package/dist-server/service/seal-use/seal-use-query.d.ts +14 -0
  300. package/dist-server/service/seal-use/seal-use-query.js +100 -0
  301. package/dist-server/service/seal-use/seal-use-query.js.map +1 -0
  302. package/dist-server/service/seal-use/seal-use-rules.d.ts +35 -0
  303. package/dist-server/service/seal-use/seal-use-rules.js +64 -0
  304. package/dist-server/service/seal-use/seal-use-rules.js.map +1 -0
  305. package/dist-server/service/seal-use/seal-use-service.d.ts +20 -0
  306. package/dist-server/service/seal-use/seal-use-service.js +168 -0
  307. package/dist-server/service/seal-use/seal-use-service.js.map +1 -0
  308. package/dist-server/service/seal-use/seal-use-type.d.ts +24 -0
  309. package/dist-server/service/seal-use/seal-use-type.js +93 -0
  310. package/dist-server/service/seal-use/seal-use-type.js.map +1 -0
  311. package/dist-server/service/seal-use/seal-use.d.ts +57 -0
  312. package/dist-server/service/seal-use/seal-use.js +181 -0
  313. package/dist-server/service/seal-use/seal-use.js.map +1 -0
  314. package/dist-server/service/training/index.d.ts +5 -0
  315. package/dist-server/service/training/index.js +9 -0
  316. package/dist-server/service/training/index.js.map +1 -0
  317. package/dist-server/service/training/training-checks.d.ts +20 -0
  318. package/dist-server/service/training/training-checks.js +56 -0
  319. package/dist-server/service/training/training-checks.js.map +1 -0
  320. package/dist-server/service/training/training-kinds.d.ts +24 -0
  321. package/dist-server/service/training/training-kinds.js +42 -0
  322. package/dist-server/service/training/training-kinds.js.map +1 -0
  323. package/dist-server/service/training/training-mutation.d.ts +14 -0
  324. package/dist-server/service/training/training-mutation.js +140 -0
  325. package/dist-server/service/training/training-mutation.js.map +1 -0
  326. package/dist-server/service/training/training-query.d.ts +21 -0
  327. package/dist-server/service/training/training-query.js +196 -0
  328. package/dist-server/service/training/training-query.js.map +1 -0
  329. package/dist-server/service/training/training-read.d.ts +5 -0
  330. package/dist-server/service/training/training-read.js +35 -0
  331. package/dist-server/service/training/training-read.js.map +1 -0
  332. package/dist-server/service/training/training-register.d.ts +1 -0
  333. package/dist-server/service/training/training-register.js +27 -0
  334. package/dist-server/service/training/training-register.js.map +1 -0
  335. package/dist-server/service/training/training-rules.d.ts +72 -0
  336. package/dist-server/service/training/training-rules.js +143 -0
  337. package/dist-server/service/training/training-rules.js.map +1 -0
  338. package/dist-server/service/training/training-service.d.ts +98 -0
  339. package/dist-server/service/training/training-service.js +455 -0
  340. package/dist-server/service/training/training-service.js.map +1 -0
  341. package/dist-server/service/training/training-type.d.ts +94 -0
  342. package/dist-server/service/training/training-type.js +352 -0
  343. package/dist-server/service/training/training-type.js.map +1 -0
  344. package/dist-server/service/training/training.d.ts +127 -0
  345. package/dist-server/service/training/training.js +448 -0
  346. package/dist-server/service/training/training.js.map +1 -0
  347. package/dist-server/tsconfig.tsbuildinfo +1 -0
  348. package/package.json +61 -4
  349. package/things-factory.config.js +19 -0
  350. package/translations/en.json +612 -0
  351. package/translations/es.json +612 -0
  352. package/translations/ja.json +612 -0
  353. package/translations/ko.json +612 -0
  354. package/translations/ms.json +612 -0
  355. package/translations/zh.json +612 -0
  356. package/README.md +0 -3
@@ -0,0 +1,335 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/button/filled-button.js';
3
+ import '@material/web/button/text-button.js';
4
+ import '@material/web/icon/icon.js';
5
+ import '@operato/input/ox-input-file.js';
6
+ import '@operato/popup/ox-popup-actions.js';
7
+ import gql from 'graphql-tag';
8
+ import { css, html, LitElement, nothing } from 'lit';
9
+ import { customElement, property, state } from 'lit/decorators.js';
10
+ import { client, uploadContext } from '@operato/graphql';
11
+ import { i18next, localize } from '@operato/i18n';
12
+ import { notify, openPopup } from '@operato/layout';
13
+ import { CommonPopupStyles, FormFieldStyles, PopupBodyStyles, PopupFieldStyles } from '@operato/styles';
14
+ import { failureOf, wordOf } from '../words.js';
15
+ /** Opens one case's sheet; resolves when it closes. */
16
+ export function openComplianceCaseSheet(id) {
17
+ return new Promise(resolve => {
18
+ const popup = openPopup(html `<compliance-case-sheet .caseId=${id} @close=${() => popup.close()}></compliance-case-sheet>`, {
19
+ backdrop: true,
20
+ size: 'large',
21
+ title: i18next.t('title.compliance-case-sheet')
22
+ });
23
+ popup.onclosed = () => resolve();
24
+ });
25
+ }
26
+ const HANDLING = ['investigationStartedOn', 'protectionMeasures', 'victimOpinion', 'finding', 'actionOnAccused', 'resultNotice', 'resultToldOn', 'closedOn'];
27
+ const DAYS = ['investigationStartedOn', 'resultToldOn', 'closedOn'];
28
+ const kebab = (name) => name.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
29
+ const today = () => {
30
+ const now = new Date();
31
+ return new Date(now.getTime() - now.getTimezoneOffset() * 60000).toISOString().slice(0, 10);
32
+ };
33
+ /**
34
+ * 사건 처리 (ADR-0187 decision 21) - one case whole, for its handlers and investigators: the report, who investigates
35
+ * it, the investigation record, the protection of the victim with their view, the finding, what was done to those
36
+ * reported against, the result told and the closing. A value changed keeps a correction; nothing is deleted.
37
+ */
38
+ let ComplianceCaseSheet = class ComplianceCaseSheet extends localize(i18next)(LitElement) {
39
+ constructor() {
40
+ super(...arguments);
41
+ this.caseId = '';
42
+ this.one = null;
43
+ this.form = {};
44
+ this.investigators = [];
45
+ this.found = [];
46
+ this.entryOn = today();
47
+ this.entryBody = '';
48
+ this.entryFiles = [];
49
+ this.working = false;
50
+ this.message = '';
51
+ }
52
+ static { this.styles = [
53
+ CommonPopupStyles,
54
+ PopupBodyStyles,
55
+ FormFieldStyles,
56
+ PopupFieldStyles,
57
+ css `
58
+ [invalid] {
59
+ color: var(--ui-crit, var(--md-sys-color-error));
60
+ font-size: var(--ui-t-small, 11.5px);
61
+ }
62
+ [invalid]:empty {
63
+ display: none;
64
+ }
65
+ dl {
66
+ display: grid;
67
+ grid-template-columns: max-content 1fr;
68
+ gap: 2px var(--spacing-large, 12px);
69
+ margin: 0;
70
+ }
71
+ dt {
72
+ color: var(--ui-muted);
73
+ }
74
+ dd {
75
+ margin: 0;
76
+ white-space: pre-wrap;
77
+ }
78
+ h4 {
79
+ margin: var(--spacing-medium, 8px) 0 0;
80
+ }
81
+ ul {
82
+ margin: 0;
83
+ padding: 0;
84
+ list-style: none;
85
+ }
86
+ li {
87
+ padding: var(--spacing-small, 4px) 0;
88
+ border-top: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));
89
+ white-space: pre-wrap;
90
+ }
91
+ .muted {
92
+ color: var(--ui-muted);
93
+ }
94
+ .chips,
95
+ .found {
96
+ display: flex;
97
+ flex-wrap: wrap;
98
+ gap: var(--spacing-small, 4px);
99
+ }
100
+ .chips button,
101
+ .found button {
102
+ display: inline-flex;
103
+ align-items: center;
104
+ gap: 2px;
105
+ padding: 2px var(--spacing-medium, 8px);
106
+ border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));
107
+ border-radius: 999px;
108
+ background: none;
109
+ color: inherit;
110
+ font: inherit;
111
+ cursor: pointer;
112
+ }
113
+ .chips md-icon {
114
+ --md-icon-size: 14px;
115
+ }
116
+ textarea {
117
+ min-height: 64px;
118
+ }
119
+ `
120
+ ]; }
121
+ connectedCallback() {
122
+ super.connectedCallback();
123
+ this.read();
124
+ }
125
+ render() {
126
+ const one = this.one;
127
+ if (!one)
128
+ return html `<div class="body"><span invalid>${this.message}</span></div>`;
129
+ const closed = !!one.closedOn;
130
+ const fact = (field, value) => (value ? html `<dt>${i18next.t(`field.compliance-case-${field}`)}</dt><dd>${value}</dd>` : nothing);
131
+ return html `
132
+ <div class="body">
133
+ <dl>
134
+ ${fact('kind', wordOf('compliance-case-kind', one.kind))} ${fact('status', wordOf('compliance-case-status', one.status))} ${fact('received-on', one.receivedOn)}
135
+ ${fact('investigation-due-on', one.investigationDueOn)} ${fact('reporter', one.reporter?.name)} ${fact('victim', one.victim?.name)}
136
+ ${fact('accused', (one.accused ?? []).map((person) => person.name).join(', '))} ${fact('occurred-on', one.occurredOn)} ${fact('description', one.description)}
137
+ ${fact('attachments', (one.attachments ?? []).length ? html `${one.attachments.map((file) => html `<a href=${file.fullpath} target="_blank">${file.name}</a> `)}` : '')}
138
+ </dl>
139
+
140
+ <div class="field">
141
+ <span>${i18next.t('field.compliance-case-investigators')}</span>
142
+ <div class="chips">
143
+ ${this.investigators.map(person => html `<button type="button" ?disabled=${closed} aria-label=${i18next.t('button.compliance-case-remove')} @click=${() => (this.investigators = this.investigators.filter(other => other.id !== person.id))}>
144
+ ${person.name}<md-icon>close</md-icon>
145
+ </button>`)}
146
+ </div>
147
+ ${closed
148
+ ? nothing
149
+ : html `<input placeholder=${i18next.t('text.compliance-case-find-person')} @input=${(e) => this.find(e.target.value)} />
150
+ <div class="found">
151
+ ${this.found
152
+ .filter(person => !this.investigators.some(other => other.id === person.id))
153
+ .map(person => html `<button type="button" @click=${() => ((this.investigators = [...this.investigators, person]), (this.found = []))}>${person.note ? `${person.name} · ${person.note}` : person.name}</button>`)}
154
+ </div>`}
155
+ </div>
156
+
157
+ ${HANDLING.map(field => DAYS.includes(field)
158
+ ? html `<label class="field">
159
+ <span>${i18next.t(`field.compliance-case-${kebab(field)}`)}</span>
160
+ <input type="date" ?disabled=${closed} .value=${this.form[field] ?? ''} @input=${(e) => (this.form = { ...this.form, [field]: e.target.value })} />
161
+ </label>`
162
+ : html `<label class="field">
163
+ <span>${i18next.t(`field.compliance-case-${kebab(field)}`)}</span>
164
+ <textarea ?disabled=${closed} .value=${this.form[field] ?? ''} @input=${(e) => (this.form = { ...this.form, [field]: e.target.value })}></textarea>
165
+ </label>`)}
166
+
167
+ <h4>${i18next.t('field.compliance-case-entries')}</h4>
168
+ ${(one.entries ?? []).length
169
+ ? html `<ul>
170
+ ${one.entries.map((entry) => html `<li>
171
+ <span class="muted">${entry.writtenOn} · ${entry.creator?.name ?? ''}</span><br />${entry.body}
172
+ ${(entry.attachments ?? []).map((file) => html ` <a href=${file.fullpath} target="_blank">${file.name}</a>`)}
173
+ </li>`)}
174
+ </ul>`
175
+ : html `<span class="muted">${i18next.t('text.compliance-case-entries-empty')}</span>`}
176
+ ${closed
177
+ ? nothing
178
+ : html `<label class="field">
179
+ <span>${i18next.t('field.compliance-case-entry-written-on')}</span>
180
+ <input type="date" .value=${this.entryOn} @input=${(e) => (this.entryOn = e.target.value)} />
181
+ </label>
182
+ <label class="field">
183
+ <span>${i18next.t('field.compliance-case-entry-body')}</span>
184
+ <textarea .value=${this.entryBody} @input=${(e) => (this.entryBody = e.target.value)}></textarea>
185
+ </label>
186
+ <div class="field">
187
+ <ox-input-file multiple icon="attach_file" @change=${(e) => (this.entryFiles = [...(e.detail ?? [])])}></ox-input-file>
188
+ <md-text-button ?disabled=${this.working || !this.entryBody.trim()} @click=${() => this.addEntry()}>${i18next.t('button.compliance-case-add-entry')}</md-text-button>
189
+ </div>`}
190
+ ${(one.corrections ?? []).length
191
+ ? html `<h4>${i18next.t('field.compliance-case-corrections')}</h4>
192
+ <ul>
193
+ ${one.corrections.map((row) => html `<li class="muted">${new Date(row.createdAt).toLocaleString()} · ${row.creator?.name ?? ''} · ${i18next.t(`field.compliance-case-${kebab(row.field === 'investigatorIds' ? 'investigators' : row.field)}`)}: ${row.before ?? ''} → ${row.after ?? ''}</li>`)}
194
+ </ul>`
195
+ : nothing}
196
+ <span invalid>${this.message}</span>
197
+ </div>
198
+
199
+ <ox-popup-actions>
200
+ <md-text-button slot="cancel" @click=${() => this.dispatchEvent(new CustomEvent('close'))}>${i18next.t('button.close')}</md-text-button>
201
+ ${closed ? nothing : html `<md-filled-button slot="confirm" ?disabled=${this.working} @click=${() => this.save()}>${i18next.t('button.save')}</md-filled-button>`}
202
+ </ox-popup-actions>
203
+ `;
204
+ }
205
+ async read() {
206
+ try {
207
+ const response = await client.query({
208
+ query: gql `
209
+ query ($id: String!) {
210
+ complianceCase(id: $id) {
211
+ id kind status receivedOn investigationDueOn occurredOn description
212
+ investigationStartedOn protectionMeasures victimOpinion finding actionOnAccused resultNotice resultToldOn closedOn
213
+ reporter { id name } victim { id name } accused { id name } investigators { id name email }
214
+ attachments { id name fullpath }
215
+ entries { id writtenOn body creator { id name } attachments { id name fullpath } }
216
+ corrections { id field before after createdAt creator { id name } }
217
+ }
218
+ }
219
+ `,
220
+ variables: { id: this.caseId },
221
+ fetchPolicy: 'network-only'
222
+ });
223
+ if (response.errors?.length)
224
+ throw response;
225
+ const one = response.data.complianceCase;
226
+ this.one = one;
227
+ this.form = Object.fromEntries(HANDLING.map(field => [field, one[field] ?? '']));
228
+ this.investigators = (one.investigators ?? []).map((person) => ({ id: person.id, name: person.name, note: person.email }));
229
+ }
230
+ catch (error) {
231
+ this.message = failureOf(error);
232
+ }
233
+ }
234
+ async find(text) {
235
+ const response = await client.query({
236
+ query: gql `
237
+ query ($text: String!) {
238
+ complianceCaseInvestigatorChoices(text: $text) { id name note }
239
+ }
240
+ `,
241
+ variables: { text },
242
+ fetchPolicy: 'no-cache'
243
+ });
244
+ this.found = response.data?.complianceCaseInvestigatorChoices ?? [];
245
+ }
246
+ async save() {
247
+ await this.call(async () => {
248
+ const changed = HANDLING.filter(field => (this.form[field] ?? '') !== (this.one[field] ?? ''));
249
+ const before = (this.one.investigators ?? []).map((person) => person.id).sort().join();
250
+ const after = this.investigators.map(person => person.id).sort().join();
251
+ const patch = { id: this.one.id, ...Object.fromEntries(changed.map(field => [field, this.form[field] || null])) };
252
+ if (before !== after)
253
+ patch.investigatorIds = this.investigators.map(person => person.id);
254
+ return await client.mutate({ mutation: gql `mutation ($patch: ComplianceCaseHandling!) { handleComplianceCase(patch: $patch) { id } }`, variables: { patch } });
255
+ });
256
+ }
257
+ async addEntry() {
258
+ await this.call(async () => {
259
+ const response = await client.mutate({
260
+ mutation: gql `
261
+ mutation ($caseId: String!, $writtenOn: String!, $body: String!, $attach: [Upload!]) {
262
+ addComplianceCaseEntry(caseId: $caseId, writtenOn: $writtenOn, body: $body, attach: $attach) { id }
263
+ }
264
+ `,
265
+ variables: { caseId: this.one.id, writtenOn: this.entryOn, body: this.entryBody, attach: this.entryFiles },
266
+ ...(this.entryFiles.length ? { context: uploadContext(() => { }) } : {})
267
+ });
268
+ this.entryBody = '';
269
+ this.entryFiles = [];
270
+ return response;
271
+ });
272
+ }
273
+ async call(work) {
274
+ this.message = '';
275
+ this.working = true;
276
+ try {
277
+ const response = await work();
278
+ if (response.errors?.length)
279
+ throw response;
280
+ notify({ message: i18next.t('text.compliance-case-saved') });
281
+ await this.read();
282
+ }
283
+ catch (error) {
284
+ this.message = failureOf(error);
285
+ }
286
+ finally {
287
+ this.working = false;
288
+ }
289
+ }
290
+ };
291
+ __decorate([
292
+ property({ type: String }),
293
+ __metadata("design:type", Object)
294
+ ], ComplianceCaseSheet.prototype, "caseId", void 0);
295
+ __decorate([
296
+ state(),
297
+ __metadata("design:type", Object)
298
+ ], ComplianceCaseSheet.prototype, "one", void 0);
299
+ __decorate([
300
+ state(),
301
+ __metadata("design:type", Object)
302
+ ], ComplianceCaseSheet.prototype, "form", void 0);
303
+ __decorate([
304
+ state(),
305
+ __metadata("design:type", Array)
306
+ ], ComplianceCaseSheet.prototype, "investigators", void 0);
307
+ __decorate([
308
+ state(),
309
+ __metadata("design:type", Array)
310
+ ], ComplianceCaseSheet.prototype, "found", void 0);
311
+ __decorate([
312
+ state(),
313
+ __metadata("design:type", Object)
314
+ ], ComplianceCaseSheet.prototype, "entryOn", void 0);
315
+ __decorate([
316
+ state(),
317
+ __metadata("design:type", Object)
318
+ ], ComplianceCaseSheet.prototype, "entryBody", void 0);
319
+ __decorate([
320
+ state(),
321
+ __metadata("design:type", Array)
322
+ ], ComplianceCaseSheet.prototype, "entryFiles", void 0);
323
+ __decorate([
324
+ state(),
325
+ __metadata("design:type", Object)
326
+ ], ComplianceCaseSheet.prototype, "working", void 0);
327
+ __decorate([
328
+ state(),
329
+ __metadata("design:type", Object)
330
+ ], ComplianceCaseSheet.prototype, "message", void 0);
331
+ ComplianceCaseSheet = __decorate([
332
+ customElement('compliance-case-sheet')
333
+ ], ComplianceCaseSheet);
334
+ export { ComplianceCaseSheet };
335
+ //# sourceMappingURL=compliance-case-sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compliance-case-sheet.js","sourceRoot":"","sources":["../../client/components/compliance-case-sheet.ts"],"names":[],"mappings":";AAAA,OAAO,uCAAuC,CAAA;AAC9C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AACxC,OAAO,oCAAoC,CAAA;AAE3C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EA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,CAAC,UAAU,GAAG,EAAE,CAAA;YACpB,OAAO,QAAQ,CAAA;QACjB,CAAC,CAAC,CAAA;IACJ,CAAC;IAEO,KAAK,CAAC,IAAI,CAAC,IAAwB;QACzC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;QACnB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,EAAE,CAAA;YAC7B,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM;gBAAE,MAAM,QAAQ,CAAA;YAC3C,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,4BAA4B,CAAC,EAAE,CAAC,CAAA;YAC5D,MAAM,IAAI,CAAC,IAAI,EAAE,CAAA;QACnB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;QACjC,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;QACtB,CAAC;IACH,CAAC;;AA7L2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDAAY;AAEtB;IAAhB,KAAK,EAAE;;gDAAwB;AACf;IAAhB,KAAK,EAAE;;iDAA0C;AACjC;IAAhB,KAAK,EAAE;;0DAAqC;AAC5B;IAAhB,KAAK,EAAE;;kDAA6B;AACpB;IAAhB,KAAK,EAAE;;oDAA0B;AACjB;IAAhB,KAAK,EAAE;;sDAAuB;AACd;IAAhB,KAAK,EAAE;;uDAAgC;AACvB;IAAhB,KAAK,EAAE;;oDAAwB;AACf;IAAhB,KAAK,EAAE;;oDAAqB;AAjFlB,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CAqQ/B","sourcesContent":["import '@material/web/button/filled-button.js'\nimport '@material/web/button/text-button.js'\nimport '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-file.js'\nimport '@operato/popup/ox-popup-actions.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { client, uploadContext } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { CommonPopupStyles, FormFieldStyles, PopupBodyStyles, PopupFieldStyles } from '@operato/styles'\n\nimport { failureOf, wordOf } from '../words.js'\n\n/** Opens one case's sheet; resolves when it closes. */\nexport function openComplianceCaseSheet(id: string): Promise<void> {\n return new Promise(resolve => {\n const popup: any = openPopup(html`<compliance-case-sheet .caseId=${id} @close=${() => popup.close()}></compliance-case-sheet>`, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.compliance-case-sheet')\n })\n popup.onclosed = () => resolve()\n })\n}\n\nconst HANDLING = ['investigationStartedOn', 'protectionMeasures', 'victimOpinion', 'finding', 'actionOnAccused', 'resultNotice', 'resultToldOn', 'closedOn']\nconst DAYS = ['investigationStartedOn', 'resultToldOn', 'closedOn']\nconst kebab = (name: string) => name.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()\nconst today = () => {\n const now = new Date()\n return new Date(now.getTime() - now.getTimezoneOffset() * 60000).toISOString().slice(0, 10)\n}\n\ntype Person = { id: string; name: string; note?: string }\n\n/**\n * 사건 처리 (ADR-0187 decision 21) - one case whole, for its handlers and investigators: the report, who investigates\n * it, the investigation record, the protection of the victim with their view, the finding, what was done to those\n * reported against, the result told and the closing. A value changed keeps a correction; nothing is deleted.\n */\n@customElement('compliance-case-sheet')\nexport class ComplianceCaseSheet extends localize(i18next)(LitElement) {\n static styles = [\n CommonPopupStyles,\n PopupBodyStyles,\n FormFieldStyles,\n PopupFieldStyles,\n css`\n [invalid] {\n color: var(--ui-crit, var(--md-sys-color-error));\n font-size: var(--ui-t-small, 11.5px);\n }\n [invalid]:empty {\n display: none;\n }\n dl {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: 2px var(--spacing-large, 12px);\n margin: 0;\n }\n dt {\n color: var(--ui-muted);\n }\n dd {\n margin: 0;\n white-space: pre-wrap;\n }\n h4 {\n margin: var(--spacing-medium, 8px) 0 0;\n }\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li {\n padding: var(--spacing-small, 4px) 0;\n border-top: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n white-space: pre-wrap;\n }\n .muted {\n color: var(--ui-muted);\n }\n .chips,\n .found {\n display: flex;\n flex-wrap: wrap;\n gap: var(--spacing-small, 4px);\n }\n .chips button,\n .found button {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n padding: 2px var(--spacing-medium, 8px);\n border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n border-radius: 999px;\n background: none;\n color: inherit;\n font: inherit;\n cursor: pointer;\n }\n .chips md-icon {\n --md-icon-size: 14px;\n }\n textarea {\n min-height: 64px;\n }\n `\n ]\n\n @property({ type: String }) caseId = ''\n\n @state() private one: any = null\n @state() private form: Record<string, string> = {}\n @state() private investigators: Person[] = []\n @state() private found: Person[] = []\n @state() private entryOn = today()\n @state() private entryBody = ''\n @state() private entryFiles: File[] = []\n @state() private working = false\n @state() private message = ''\n\n connectedCallback() {\n super.connectedCallback()\n this.read()\n }\n\n render() {\n const one = this.one\n if (!one) return html`<div class=\"body\"><span invalid>${this.message}</span></div>`\n const closed = !!one.closedOn\n const fact = (field: string, value: any) => (value ? html`<dt>${i18next.t(`field.compliance-case-${field}`)}</dt><dd>${value}</dd>` : nothing)\n return html`\n <div class=\"body\">\n <dl>\n ${fact('kind', wordOf('compliance-case-kind', one.kind))} ${fact('status', wordOf('compliance-case-status', one.status))} ${fact('received-on', one.receivedOn)}\n ${fact('investigation-due-on', one.investigationDueOn)} ${fact('reporter', one.reporter?.name)} ${fact('victim', one.victim?.name)}\n ${fact('accused', (one.accused ?? []).map((person: any) => person.name).join(', '))} ${fact('occurred-on', one.occurredOn)} ${fact('description', one.description)}\n ${fact('attachments', (one.attachments ?? []).length ? html`${one.attachments.map((file: any) => html`<a href=${file.fullpath} target=\"_blank\">${file.name}</a> `)}` : '')}\n </dl>\n\n <div class=\"field\">\n <span>${i18next.t('field.compliance-case-investigators')}</span>\n <div class=\"chips\">\n ${this.investigators.map(\n person =>\n html`<button type=\"button\" ?disabled=${closed} aria-label=${i18next.t('button.compliance-case-remove')} @click=${() => (this.investigators = this.investigators.filter(other => other.id !== person.id))}>\n ${person.name}<md-icon>close</md-icon>\n </button>`\n )}\n </div>\n ${closed\n ? nothing\n : html`<input placeholder=${i18next.t('text.compliance-case-find-person')} @input=${(e: any) => this.find(e.target.value)} />\n <div class=\"found\">\n ${this.found\n .filter(person => !this.investigators.some(other => other.id === person.id))\n .map(person => html`<button type=\"button\" @click=${() => ((this.investigators = [...this.investigators, person]), (this.found = []))}>${person.note ? `${person.name} · ${person.note}` : person.name}</button>`)}\n </div>`}\n </div>\n\n ${HANDLING.map(field =>\n DAYS.includes(field)\n ? html`<label class=\"field\">\n <span>${i18next.t(`field.compliance-case-${kebab(field)}`)}</span>\n <input type=\"date\" ?disabled=${closed} .value=${this.form[field] ?? ''} @input=${(e: any) => (this.form = { ...this.form, [field]: e.target.value })} />\n </label>`\n : html`<label class=\"field\">\n <span>${i18next.t(`field.compliance-case-${kebab(field)}`)}</span>\n <textarea ?disabled=${closed} .value=${this.form[field] ?? ''} @input=${(e: any) => (this.form = { ...this.form, [field]: e.target.value })}></textarea>\n </label>`\n )}\n\n <h4>${i18next.t('field.compliance-case-entries')}</h4>\n ${(one.entries ?? []).length\n ? html`<ul>\n ${one.entries.map(\n (entry: any) => html`<li>\n <span class=\"muted\">${entry.writtenOn} · ${entry.creator?.name ?? ''}</span><br />${entry.body}\n ${(entry.attachments ?? []).map((file: any) => html` <a href=${file.fullpath} target=\"_blank\">${file.name}</a>`)}\n </li>`\n )}\n </ul>`\n : html`<span class=\"muted\">${i18next.t('text.compliance-case-entries-empty')}</span>`}\n ${closed\n ? nothing\n : html`<label class=\"field\">\n <span>${i18next.t('field.compliance-case-entry-written-on')}</span>\n <input type=\"date\" .value=${this.entryOn} @input=${(e: any) => (this.entryOn = e.target.value)} />\n </label>\n <label class=\"field\">\n <span>${i18next.t('field.compliance-case-entry-body')}</span>\n <textarea .value=${this.entryBody} @input=${(e: any) => (this.entryBody = e.target.value)}></textarea>\n </label>\n <div class=\"field\">\n <ox-input-file multiple icon=\"attach_file\" @change=${(e: CustomEvent) => (this.entryFiles = [...((e.detail as File[]) ?? [])])}></ox-input-file>\n <md-text-button ?disabled=${this.working || !this.entryBody.trim()} @click=${() => this.addEntry()}>${i18next.t('button.compliance-case-add-entry')}</md-text-button>\n </div>`}\n ${(one.corrections ?? []).length\n ? html`<h4>${i18next.t('field.compliance-case-corrections')}</h4>\n <ul>\n ${one.corrections.map(\n (row: any) =>\n html`<li class=\"muted\">${new Date(row.createdAt).toLocaleString()} · ${row.creator?.name ?? ''} · ${i18next.t(`field.compliance-case-${kebab(row.field === 'investigatorIds' ? 'investigators' : row.field)}`)}: ${row.before ?? ''} → ${row.after ?? ''}</li>`\n )}\n </ul>`\n : nothing}\n <span invalid>${this.message}</span>\n </div>\n\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => this.dispatchEvent(new CustomEvent('close'))}>${i18next.t('button.close')}</md-text-button>\n ${closed ? nothing : html`<md-filled-button slot=\"confirm\" ?disabled=${this.working} @click=${() => this.save()}>${i18next.t('button.save')}</md-filled-button>`}\n </ox-popup-actions>\n `\n }\n\n private async read() {\n try {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n complianceCase(id: $id) {\n id kind status receivedOn investigationDueOn occurredOn description\n investigationStartedOn protectionMeasures victimOpinion finding actionOnAccused resultNotice resultToldOn closedOn\n reporter { id name } victim { id name } accused { id name } investigators { id name email }\n attachments { id name fullpath }\n entries { id writtenOn body creator { id name } attachments { id name fullpath } }\n corrections { id field before after createdAt creator { id name } }\n }\n }\n `,\n variables: { id: this.caseId },\n fetchPolicy: 'network-only'\n })\n if (response.errors?.length) throw response\n const one = response.data.complianceCase\n this.one = one\n this.form = Object.fromEntries(HANDLING.map(field => [field, one[field] ?? '']))\n this.investigators = (one.investigators ?? []).map((person: any) => ({ id: person.id, name: person.name, note: person.email }))\n } catch (error) {\n this.message = failureOf(error)\n }\n }\n\n private async find(text: string) {\n const response = await client.query({\n query: gql`\n query ($text: String!) {\n complianceCaseInvestigatorChoices(text: $text) { id name note }\n }\n `,\n variables: { text },\n fetchPolicy: 'no-cache'\n })\n this.found = response.data?.complianceCaseInvestigatorChoices ?? []\n }\n\n private async save() {\n await this.call(async () => {\n const changed = HANDLING.filter(field => (this.form[field] ?? '') !== (this.one[field] ?? ''))\n const before = (this.one.investigators ?? []).map((person: any) => person.id).sort().join()\n const after = this.investigators.map(person => person.id).sort().join()\n const patch: any = { id: this.one.id, ...Object.fromEntries(changed.map(field => [field, this.form[field] || null])) }\n if (before !== after) patch.investigatorIds = this.investigators.map(person => person.id)\n return await client.mutate({ mutation: gql`mutation ($patch: ComplianceCaseHandling!) { handleComplianceCase(patch: $patch) { id } }`, variables: { patch } })\n })\n }\n\n private async addEntry() {\n await this.call(async () => {\n const response = await client.mutate({\n mutation: gql`\n mutation ($caseId: String!, $writtenOn: String!, $body: String!, $attach: [Upload!]) {\n addComplianceCaseEntry(caseId: $caseId, writtenOn: $writtenOn, body: $body, attach: $attach) { id }\n }\n `,\n variables: { caseId: this.one.id, writtenOn: this.entryOn, body: this.entryBody, attach: this.entryFiles },\n ...(this.entryFiles.length ? { context: uploadContext(() => {}) } : {})\n })\n this.entryBody = ''\n this.entryFiles = []\n return response\n })\n }\n\n private async call(work: () => Promise<any>) {\n this.message = ''\n this.working = true\n try {\n const response = await work()\n if (response.errors?.length) throw response\n notify({ message: i18next.t('text.compliance-case-saved') })\n await this.read()\n } catch (error) {\n this.message = failureOf(error)\n } finally {\n this.working = false\n }\n }\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import '@material/web/button/filled-button.js';
2
+ import { LitElement } from 'lit';
3
+ declare const ComplianceMyInventions_base: (new (...args: any[]) => LitElement) & typeof LitElement;
4
+ /**
5
+ * 직무발명 신고 - an employee's own entry (ADR-0187 decisions 10, 24): the inventions one is an inventor of, the day the
6
+ * company is to tell its decision by and what it told, and the way to report another. Nothing of anyone else's.
7
+ */
8
+ export declare class ComplianceMyInventions extends ComplianceMyInventions_base {
9
+ static styles: import("lit").CSSResult;
10
+ private rows;
11
+ private failure;
12
+ connectedCallback(): void;
13
+ private read;
14
+ render(): import("lit-html").TemplateResult<1>;
15
+ private report;
16
+ }
17
+ export {};
@@ -0,0 +1,133 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/button/filled-button.js';
3
+ import gql from 'graphql-tag';
4
+ import { css, html, LitElement } from 'lit';
5
+ import { customElement, state } from 'lit/decorators.js';
6
+ import { client } from '@operato/graphql';
7
+ import { i18next, localize } from '@operato/i18n';
8
+ import { LegalRecordFiles } from '../legal-record/legal-record-files.js';
9
+ import { failureOf, wordOf } from '../words.js';
10
+ import { openInventionReportForm } from './invention-report-form.js';
11
+ /**
12
+ * 직무발명 신고 - an employee's own entry (ADR-0187 decisions 10, 24): the inventions one is an inventor of, the day the
13
+ * company is to tell its decision by and what it told, and the way to report another. Nothing of anyone else's.
14
+ */
15
+ let ComplianceMyInventions = class ComplianceMyInventions extends localize(i18next)(LitElement) {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.rows = [];
19
+ this.failure = '';
20
+ }
21
+ static { this.styles = css `
22
+ :host {
23
+ display: flex;
24
+ flex-direction: column;
25
+ gap: var(--spacing-medium, 8px);
26
+ }
27
+ header {
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: space-between;
31
+ gap: var(--spacing-medium, 8px);
32
+ }
33
+ header p,
34
+ .none {
35
+ margin: 0;
36
+ color: var(--ui-muted, var(--md-sys-color-on-surface-variant));
37
+ }
38
+ table {
39
+ width: 100%;
40
+ border-collapse: collapse;
41
+ }
42
+ th,
43
+ td {
44
+ padding: 6px 4px;
45
+ text-align: left;
46
+ border-bottom: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));
47
+ }
48
+ th {
49
+ color: var(--ui-muted, var(--md-sys-color-on-surface-variant));
50
+ font-weight: normal;
51
+ }
52
+ td.day {
53
+ white-space: nowrap;
54
+ }
55
+ button[quiet] {
56
+ border: none;
57
+ background: none;
58
+ padding: 0;
59
+ color: var(--md-sys-color-primary);
60
+ font: inherit;
61
+ cursor: pointer;
62
+ }
63
+ .failure {
64
+ color: var(--md-sys-color-error);
65
+ }
66
+ `; }
67
+ connectedCallback() {
68
+ super.connectedCallback();
69
+ this.read();
70
+ }
71
+ async read() {
72
+ try {
73
+ const response = await client.query({
74
+ query: gql `query { myInventions { id title reportedOn decisionDueOn decision decisionToldOn inventors { id name } } }`,
75
+ fetchPolicy: 'network-only'
76
+ });
77
+ if (response.errors?.length)
78
+ throw response;
79
+ this.rows = response.data.myInventions;
80
+ }
81
+ catch (error) {
82
+ this.failure = failureOf(error);
83
+ }
84
+ }
85
+ render() {
86
+ return html `
87
+ <header>
88
+ <p>${i18next.t('text.invention-mine-guide')}</p>
89
+ <md-filled-button @click=${() => this.report()}>${i18next.t('button.invention-report')}</md-filled-button>
90
+ </header>
91
+ ${this.failure ? html `<p class="failure">${this.failure}</p>` : ''}
92
+ ${this.rows.length
93
+ ? html `<table>
94
+ <tr>
95
+ <th>${i18next.t('field.invention-title')}</th>
96
+ <th>${i18next.t('field.invention-inventors')}</th>
97
+ <th>${i18next.t('field.invention-reported-on')}</th>
98
+ <th>${i18next.t('field.invention-decision')}</th>
99
+ <th>${i18next.t('field.invention-files')}</th>
100
+ </tr>
101
+ ${this.rows.map(one => html `<tr>
102
+ <td>${one.title}</td>
103
+ <td>${(one.inventors ?? []).map((person) => person.name).join(', ')}</td>
104
+ <td class="day">${one.reportedOn}</td>
105
+ <td class="day">
106
+ ${one.decision
107
+ ? `${wordOf('invention-decision', one.decision)} · ${one.decisionToldOn ?? ''}`
108
+ : i18next.t('text.invention-decision-due', { day: one.decisionDueOn })}
109
+ </td>
110
+ <td><button quiet @click=${() => LegalRecordFiles.open('inventionFiles', 'attachInventionFiles', one.id, one.title)}>${i18next.t('button.legal-record-files')}</button></td>
111
+ </tr>`)}
112
+ </table>`
113
+ : html `<p class="none">${i18next.t('text.invention-mine-empty')}</p>`}
114
+ `;
115
+ }
116
+ async report() {
117
+ if (await openInventionReportForm())
118
+ this.read();
119
+ }
120
+ };
121
+ __decorate([
122
+ state(),
123
+ __metadata("design:type", Array)
124
+ ], ComplianceMyInventions.prototype, "rows", void 0);
125
+ __decorate([
126
+ state(),
127
+ __metadata("design:type", Object)
128
+ ], ComplianceMyInventions.prototype, "failure", void 0);
129
+ ComplianceMyInventions = __decorate([
130
+ customElement('compliance-my-inventions')
131
+ ], ComplianceMyInventions);
132
+ export { ComplianceMyInventions };
133
+ //# sourceMappingURL=compliance-my-inventions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compliance-my-inventions.js","sourceRoot":"","sources":["../../client/components/compliance-my-inventions.ts"],"names":[],"mappings":";AAAA,OAAO,uCAAuC,CAAA;AAE9C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAEpE;;;GAGG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SA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/web/button/filled-button.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\n\nimport { LegalRecordFiles } from '../legal-record/legal-record-files.js'\nimport { failureOf, wordOf } from '../words.js'\nimport { openInventionReportForm } from './invention-report-form.js'\n\n/**\n * 직무발명 신고 - an employee's own entry (ADR-0187 decisions 10, 24): the inventions one is an inventor of, the day the\n * company is to tell its decision by and what it told, and the way to report another. Nothing of anyone else's.\n */\n@customElement('compliance-my-inventions')\nexport class ComplianceMyInventions extends localize(i18next)(LitElement) {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-medium, 8px);\n }\n header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-medium, 8px);\n }\n header p,\n .none {\n margin: 0;\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n }\n table {\n width: 100%;\n border-collapse: collapse;\n }\n th,\n td {\n padding: 6px 4px;\n text-align: left;\n border-bottom: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n }\n th {\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n font-weight: normal;\n }\n td.day {\n white-space: nowrap;\n }\n button[quiet] {\n border: none;\n background: none;\n padding: 0;\n color: var(--md-sys-color-primary);\n font: inherit;\n cursor: pointer;\n }\n .failure {\n color: var(--md-sys-color-error);\n }\n `\n\n @state() private rows: any[] = []\n @state() private failure = ''\n\n connectedCallback() {\n super.connectedCallback()\n this.read()\n }\n\n private async read() {\n try {\n const response = await client.query({\n query: gql`query { myInventions { id title reportedOn decisionDueOn decision decisionToldOn inventors { id name } } }`,\n fetchPolicy: 'network-only'\n })\n if (response.errors?.length) throw response\n this.rows = response.data.myInventions\n } catch (error) {\n this.failure = failureOf(error)\n }\n }\n\n render() {\n return html`\n <header>\n <p>${i18next.t('text.invention-mine-guide')}</p>\n <md-filled-button @click=${() => this.report()}>${i18next.t('button.invention-report')}</md-filled-button>\n </header>\n ${this.failure ? html`<p class=\"failure\">${this.failure}</p>` : ''}\n ${this.rows.length\n ? html`<table>\n <tr>\n <th>${i18next.t('field.invention-title')}</th>\n <th>${i18next.t('field.invention-inventors')}</th>\n <th>${i18next.t('field.invention-reported-on')}</th>\n <th>${i18next.t('field.invention-decision')}</th>\n <th>${i18next.t('field.invention-files')}</th>\n </tr>\n ${this.rows.map(\n one => html`<tr>\n <td>${one.title}</td>\n <td>${(one.inventors ?? []).map((person: any) => person.name).join(', ')}</td>\n <td class=\"day\">${one.reportedOn}</td>\n <td class=\"day\">\n ${one.decision\n ? `${wordOf('invention-decision', one.decision)} · ${one.decisionToldOn ?? ''}`\n : i18next.t('text.invention-decision-due', { day: one.decisionDueOn })}\n </td>\n <td><button quiet @click=${() => LegalRecordFiles.open('inventionFiles', 'attachInventionFiles', one.id, one.title)}>${i18next.t('button.legal-record-files')}</button></td>\n </tr>`\n )}\n </table>`\n : html`<p class=\"none\">${i18next.t('text.invention-mine-empty')}</p>`}\n `\n }\n\n private async report() {\n if (await openInventionReportForm()) this.read()\n }\n}\n"]}
@@ -0,0 +1,34 @@
1
+ import '@material/web/button/filled-button.js';
2
+ import '@material/web/button/filled-tonal-button.js';
3
+ import '@material/web/button/text-button.js';
4
+ import '@operato/input/ox-input-select-buttons.js';
5
+ import '@operato/popup/ox-popup-actions.js';
6
+ import { LitElement } from 'lit';
7
+ /** Opens the request form; resolves with the request raised, or null when closed. */
8
+ export declare function openPrivacyRequestForm(): Promise<any | null>;
9
+ declare const CompliancePrivacyRequestForm_base: (new (...args: any[]) => LitElement) & typeof LitElement;
10
+ /** 내 개인정보 요구 쓰기 - what is asked of one's own personal information. */
11
+ export declare class CompliancePrivacyRequestForm extends CompliancePrivacyRequestForm_base {
12
+ static styles: import("lit").CSSResult[];
13
+ private kind;
14
+ private details;
15
+ private working;
16
+ private message;
17
+ render(): import("lit-html").TemplateResult<1>;
18
+ private raise;
19
+ }
20
+ declare const ComplianceMyPrivacyRequests_base: (new (...args: any[]) => LitElement) & typeof LitElement;
21
+ /**
22
+ * 내 개인정보 요구 (ADR-0187 decisions 10, 22) - inside 「회사 규정과 안내」: ask to see, correct, delete or stop the
23
+ * processing of one's own personal information, and see each one's due day and answer.
24
+ */
25
+ export declare class ComplianceMyPrivacyRequests extends ComplianceMyPrivacyRequests_base {
26
+ static styles: import("lit").CSSResult;
27
+ private requests;
28
+ private message;
29
+ connectedCallback(): void;
30
+ render(): import("lit-html").TemplateResult<1>;
31
+ private read;
32
+ private raise;
33
+ }
34
+ export {};