w-web-api 1.0.51 → 1.0.53

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 (86) hide show
  1. package/_gh-pages-deploy/.nojekyll +0 -0
  2. package/_gh-pages-deploy/WWebApi.html +898 -0
  3. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  4. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  5. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  6. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  7. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  8. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  9. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  10. package/_gh-pages-deploy/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  11. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  12. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  13. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  14. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  15. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  16. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  17. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  18. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  19. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  20. package/_gh-pages-deploy/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  21. package/_gh-pages-deploy/index.html +84 -0
  22. package/_gh-pages-deploy/scripts/collapse.js +39 -0
  23. package/_gh-pages-deploy/scripts/commonNav.js +28 -0
  24. package/_gh-pages-deploy/scripts/linenumber.js +25 -0
  25. package/_gh-pages-deploy/scripts/nav.js +12 -0
  26. package/_gh-pages-deploy/scripts/polyfill.js +4 -0
  27. package/_gh-pages-deploy/scripts/prettify/Apache-License-2.0.txt +202 -0
  28. package/_gh-pages-deploy/scripts/prettify/lang-css.js +2 -0
  29. package/_gh-pages-deploy/scripts/prettify/prettify.js +28 -0
  30. package/_gh-pages-deploy/scripts/search.js +99 -0
  31. package/{docs/WWebApi.mjs.html → _gh-pages-deploy/server_WWebApi.mjs.html} +118 -41
  32. package/_gh-pages-deploy/src_components_Common_CheckYesNo.vue.html +187 -0
  33. package/_gh-pages-deploy/styles/jsdoc.css +776 -0
  34. package/_gh-pages-deploy/styles/prettify.css +80 -0
  35. package/dist/css/app.fe69497a.css +1 -0
  36. package/dist/index.tmp +4 -2
  37. package/dist/js/app-legacy.15819aa7.js +1 -0
  38. package/dist/js/app.15819aa7.js +1 -0
  39. package/dist/js/chunk-vendors-legacy.c1a32dd1.js +15 -0
  40. package/dist/js/chunk-vendors.c1a32dd1.js +15 -0
  41. package/dist/w-web-api.umd.js +2 -2
  42. package/dist/w-web-api.umd.js.map +1 -1
  43. package/docs/WWebApi.html +2 -2
  44. package/docs/index.html +1 -1
  45. package/docs/server_WWebApi.mjs.html +1012 -0
  46. package/docs/src_components_Common_CheckYesNo.vue.html +187 -0
  47. package/g.getSettings.mjs +3 -0
  48. package/package.json +15 -11
  49. package/public/index.html +9 -2
  50. package/server/WWebApi.mjs +115 -38
  51. package/server/procApis.mjs +62 -0
  52. package/server/procLang.mjs +724 -0
  53. package/server/procProxy.mjs +120 -0
  54. package/server/srLog.mjs +30 -0
  55. package/server/staLogs/staEvent.mjs +129 -0
  56. package/server/staLogs/test_staEvent.mjs +132 -0
  57. package/settings.json +14 -0
  58. package/src/App.vue +11 -7
  59. package/src/assets/scalar-ui.css +113 -0
  60. package/src/components/Common/CheckYes.vue +102 -0
  61. package/src/components/Common/CheckYesNo.vue +115 -0
  62. package/src/components/Common/LoadingWinBar.vue +114 -0
  63. package/src/components/Layout.vue +33 -7
  64. package/src/components/LayoutContent.vue +308 -333
  65. package/src/components/LayoutContentEdit.vue +577 -0
  66. package/src/components/LayoutContentStats.vue +485 -0
  67. package/src/components/LayoutContentTest.vue +799 -0
  68. package/src/components/MdPanel.vue +80 -58
  69. package/src/main.js +8 -0
  70. package/src/plugins/mUI.mjs +58 -71
  71. package/src/schema/tables/apis.mjs +30 -0
  72. package/src/store/mutations.mjs +1 -1
  73. package/srv.mjs +47 -19
  74. package/tableTags.json +1 -1
  75. package/.github/workflows/ci-test.yml +0 -24
  76. package/.vscode/launch.json +0 -18
  77. package/db/wapis/apis/data.mdb +0 -0
  78. package/db/wapis/apis/lock.mdb +0 -0
  79. package/dist/css/app.b5cf2ef5.css +0 -1
  80. package/dist/js/app-legacy.fbfba810.js +0 -1
  81. package/dist/js/app.fbfba810.js +0 -1
  82. package/dist/js/chunk-vendors-legacy.735ec7d6.js +0 -13
  83. package/dist/js/chunk-vendors.735ec7d6.js +0 -13
  84. package/src/plugins/mLang.mjs +0 -250
  85. package/tableTags-web-api.json +0 -1
  86. package/test/all.test.mjs +0 -10
@@ -0,0 +1,62 @@
1
+ import iseobj from 'wsemi/src/iseobj.mjs'
2
+ import isestr from 'wsemi/src/isestr.mjs'
3
+
4
+
5
+ function procApis(deps = {}) {
6
+
7
+ //deps
8
+ let { woItems, procOrm, ds } = deps
9
+
10
+
11
+ let getApisList = async (userId) => {
12
+ return await woItems.apis.select({})
13
+ }
14
+
15
+
16
+ let saveApi = async (userId, row) => {
17
+
18
+ //check(reject err-key,由前端依 lang 反查顯示;邊界 kpFunExt 會 srLog 此 key)
19
+ if (!iseobj(row)) {
20
+ return Promise.reject('errApiRowInvalid')
21
+ }
22
+
23
+ //正規化:funNew 配 id/時間/預設並過濾欄位
24
+ let o = ds.apis.funNew(row)
25
+
26
+ //保留原 id 與創建時間(既有筆)
27
+ if (isestr(row.id)) {
28
+ o.id = row.id
29
+ if (isestr(row.timeCreate)) {
30
+ o.timeCreate = row.timeCreate
31
+ }
32
+ }
33
+
34
+ //save
35
+ let r = await procOrm(userId, 'apis', 'save', [o])
36
+
37
+ return r
38
+ }
39
+
40
+
41
+ let deleteApi = async (userId, id) => {
42
+
43
+ //check(reject err-key,由前端依 lang 反查顯示)
44
+ if (!isestr(id)) {
45
+ return Promise.reject('errApiIdInvalid')
46
+ }
47
+
48
+ let r = await procOrm(userId, 'apis', 'del', { id })
49
+
50
+ return r
51
+ }
52
+
53
+
54
+ return {
55
+ getApisList,
56
+ saveApi,
57
+ deleteApi,
58
+ }
59
+ }
60
+
61
+
62
+ export default procApis