w-web-perm 1.0.78 → 1.0.80

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 (37) hide show
  1. package/dist/index.tmp +1 -1
  2. package/dist/js/app-legacy.85fce10c.js +1 -0
  3. package/dist/js/app.85fce10c.js +1 -0
  4. package/dist/js/{chunk-vendors-legacy.884ef407.js → chunk-vendors-legacy.b57e1cce.js} +2 -2
  5. package/dist/js/{chunk-vendors.884ef407.js → chunk-vendors.b57e1cce.js} +2 -2
  6. package/dist/w-web-perm.umd.js +2 -2
  7. package/dist/w-web-perm.umd.js.map +1 -1
  8. package/docs/WWebPerm.html +4 -4
  9. package/docs/global.html +610 -0
  10. package/docs/index.html +2 -2
  11. package/docs/{WWebPerm.mjs.html → server_WWebPerm.mjs.html} +84 -94
  12. package/docs/server_procCore.mjs.html +311 -0
  13. package/docs/src_fetchJson.mjs.html +113 -0
  14. package/package.json +18 -19
  15. package/server/WWebPerm.mjs +80 -90
  16. package/server/procCore.mjs +56 -4
  17. package/server/procLang.mjs +3 -3
  18. package/server/provideTabs.mjs +8 -9
  19. package/src/components/LayoutContentGrups.vue +5 -1
  20. package/src/components/LayoutContentPemis.vue +5 -1
  21. package/src/components/LayoutContentTargets.vue +5 -1
  22. package/src/components/LayoutContentUsers.vue +21 -8
  23. package/src/components/VeCgrups.vue +3 -3
  24. package/src/components/VeCpemis.vue +2 -2
  25. package/src/components/VeGrupBlngUsers.vue +2 -2
  26. package/src/components/VePemiBlngGrups.vue +2 -2
  27. package/src/fetchJson.mjs +41 -0
  28. package/src/getPerm.mjs +7 -7
  29. package/src/getPermUserInfor.mjs +7 -7
  30. package/src/main.js +1 -1
  31. package/src/perm.mjs +5 -4
  32. package/src/plugins/mUI.mjs +17 -0
  33. package/srv.mjs +8 -0
  34. package/tableTags-web-perm.json +1 -0
  35. package/dist/js/app-legacy.71fa8c3b.js +0 -1
  36. package/dist/js/app.71fa8c3b.js +0 -1
  37. package/tableTags.json +0 -1
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -80,7 +80,7 @@
80
80
 
81
81
  <dt class="tag-source">Source:</dt>
82
82
  <dd class="tag-source"><ul class="dummy"><li>
83
- <a href="WWebPerm.mjs.html">WWebPerm.mjs</a>, <a href="WWebPerm.mjs.html#line140">line 140</a>
83
+ <a href="server_WWebPerm.mjs.html">server/WWebPerm.mjs</a>, <a href="server_WWebPerm.mjs.html#line140">line 140</a>
84
84
  </li></ul></dd>
85
85
 
86
86
 
@@ -334,7 +334,7 @@
334
334
  </td>
335
335
 
336
336
 
337
- <td class="description last"><p>輸入驗證瀏覽使用者身份之處理函數,函數會傳入使用者資訊物件,通過此函數識別後回傳布林值,允許使用者回傳true,反之回傳false</p></td>
337
+ <td class="description last"><p>輸入驗證瀏覽使用者身份之處理函數,函數會傳入使用者資訊物件(perm users 表之列)與來源字串from,通過此函數識別後回傳布林值(可為Promise),允許使用者回傳true,反之回傳false。from 值域: 'getUserByToken'(登入)、'getPerm'(api/getPerm)、以及資料通道之 apiType 'main'(RPC 與 ORM 執行)、'upload-controller'、'upload-slice'、'download-get-filename'、'download-get-file'、'download';資料通道與登入採同一授權強度(反查 perm users 且 isActive='y' 後再經本函數)</p></td>
338
338
  </tr>
339
339
 
340
340
 
@@ -1045,7 +1045,7 @@
1045
1045
  <br class="clear">
1046
1046
 
1047
1047
  <footer>
1048
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Sep 06 2026 01:04:48 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1048
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Sep 13 2026 15:35:25 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1049
1049
  </footer>
1050
1050
 
1051
1051
  <script>prettyPrint();</script>
@@ -0,0 +1,610 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>Global - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
+ </head>
20
+ <body>
21
+
22
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
+ <label for="nav-trigger" class="navicon-button x">
24
+ <div class="navicon"></div>
25
+ </label>
26
+
27
+ <label for="nav-trigger" class="overlay"></label>
28
+
29
+ <nav >
30
+
31
+
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li></ul>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">Global</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+
48
+ <header>
49
+
50
+ <h2>
51
+
52
+
53
+
54
+ </h2>
55
+
56
+
57
+ </header>
58
+
59
+ <article>
60
+
61
+ <div class="container-overview">
62
+
63
+
64
+
65
+ <dl class="details">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ </dl>
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ </div>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+ <h3 class="subsection-title">Methods</h3>
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <h4 class="name" id="fetchJson"><span class="type-signature type-signature-async">(async) </span>fetchJson<span class="signature">(url, opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <dl class="details">
141
+
142
+ <dt class="tag-description">Description:</dt>
143
+ <dd class="tag-description"><ul class="dummy"><li><p>以瀏覽器與 node(18+) 內建之 fetch 取得 JSON 回應, 取代 axios(2026-09-07 起本套件不再依賴 axios)</p>
144
+ <p>與 axios 之語意對齊:</p>
145
+ <ul>
146
+ <li>網路錯誤或非 2xx: axios 會 reject, fetch 只在網路錯誤 reject, 故此處對 !res.ok 亦 reject, 統一為 { kind: 'request', status, message }</li>
147
+ <li>回應非 JSON: axios 回原字串(呼叫端判 state 失敗), 此處 res.json() 失敗 reject { kind: 'parse', status, message }</li>
148
+ <li>成功: resolve 解析後之 JSON(對應 axios 之 res.data)
149
+ 注意: node 端 fetch(undici) 不讀 HTTP_PROXY / HTTPS_PROXY 環境變數(axios 會), 需走 proxy 之部署須自行以 opt.dispatcher 注入 undici Agent</li>
150
+ </ul></li></ul></dd>
151
+
152
+
153
+
154
+ <dt class="tag-source">Source:</dt>
155
+ <dd class="tag-source"><ul class="dummy"><li>
156
+ <a href="src_fetchJson.mjs.html">src/fetchJson.mjs</a>, <a href="src_fetchJson.mjs.html#line14">line 14</a>
157
+ </li></ul></dd>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+ </dl>
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+ <h5 class="h5-parameters">Parameters:</h5>
204
+
205
+
206
+ <table class="params">
207
+ <thead>
208
+ <tr>
209
+
210
+ <th>Name</th>
211
+
212
+
213
+ <th>Type</th>
214
+
215
+
216
+ <th>Attributes</th>
217
+
218
+
219
+
220
+ <th>Default</th>
221
+
222
+
223
+ <th class="last">Description</th>
224
+ </tr>
225
+ </thead>
226
+
227
+ <tbody>
228
+
229
+
230
+ <tr>
231
+
232
+ <td class="name"><code>url</code></td>
233
+
234
+
235
+ <td class="type">
236
+
237
+
238
+ <span class="param-type">String</span>
239
+
240
+
241
+
242
+
243
+ </td>
244
+
245
+
246
+ <td class="attributes">
247
+
248
+
249
+
250
+
251
+
252
+ </td>
253
+
254
+
255
+
256
+ <td class="default">
257
+
258
+ </td>
259
+
260
+
261
+ <td class="description last"><p>輸入請求網址字串</p></td>
262
+ </tr>
263
+
264
+
265
+
266
+ <tr>
267
+
268
+ <td class="name"><code>opt</code></td>
269
+
270
+
271
+ <td class="type">
272
+
273
+
274
+ <span class="param-type">Object</span>
275
+
276
+
277
+
278
+
279
+ </td>
280
+
281
+
282
+ <td class="attributes">
283
+
284
+ &lt;optional><br>
285
+
286
+
287
+
288
+
289
+
290
+ </td>
291
+
292
+
293
+
294
+ <td class="default">
295
+
296
+ <code>{}</code>
297
+
298
+ </td>
299
+
300
+
301
+ <td class="description last"><p>輸入 fetch 選項物件(method / headers / body / signal / dispatcher 等原樣傳給 fetch), 預設 {}</p></td>
302
+ </tr>
303
+
304
+
305
+ </tbody>
306
+ </table>
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+ <h5 class="h5-returns">Returns:</h5>
324
+
325
+
326
+ <div class="param-desc">
327
+ <p>回傳 Promise, resolve 為 JSON 物件, reject 為 { kind: 'request'|'parse', status, message }</p>
328
+ </div>
329
+
330
+
331
+
332
+ <dl class="param-type">
333
+ <dt>
334
+ Type
335
+ </dt>
336
+ <dd>
337
+
338
+ <span class="param-type">Promise</span>
339
+
340
+
341
+
342
+ </dd>
343
+ </dl>
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+ <h4 class="name" id="mergePickKeysOnly"><span class="type-signature"></span>mergePickKeysOnly<span class="signature">(ltdtDb, rowsIn, keyDetect, pickKeys)</span><span class="type-signature"> &rarr; {Array}</span></h4>
355
+
356
+
357
+
358
+
359
+
360
+
361
+ <dl class="details">
362
+
363
+ <dt class="tag-description">Description:</dt>
364
+ <dd class="tag-description"><ul class="dummy"><li><p>僅採納既有列之指定欄位變更, 其餘欄位、新增列、缺列(刪除)與順序一律以資料庫現值為準</p>
365
+ <p>用於 modeEditUsers='for:grups': 使用者身分由外部單一登入系統同步, 本系統只擁有群組指派(cgrups), 故 API 層須與 UI 一致只接受 cgrups 變更</p></li></ul></dd>
366
+
367
+
368
+
369
+ <dt class="tag-source">Source:</dt>
370
+ <dd class="tag-source"><ul class="dummy"><li>
371
+ <a href="server_procCore.mjs.html">server/procCore.mjs</a>, <a href="server_procCore.mjs.html#line26">line 26</a>
372
+ </li></ul></dd>
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+ </dl>
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+ <h5 class="h5-parameters">Parameters:</h5>
419
+
420
+
421
+ <table class="params">
422
+ <thead>
423
+ <tr>
424
+
425
+ <th>Name</th>
426
+
427
+
428
+ <th>Type</th>
429
+
430
+
431
+
432
+
433
+
434
+ <th class="last">Description</th>
435
+ </tr>
436
+ </thead>
437
+
438
+ <tbody>
439
+
440
+
441
+ <tr>
442
+
443
+ <td class="name"><code>ltdtDb</code></td>
444
+
445
+
446
+ <td class="type">
447
+
448
+
449
+ <span class="param-type">Array</span>
450
+
451
+
452
+
453
+
454
+ </td>
455
+
456
+
457
+
458
+
459
+
460
+ <td class="description last"><p>資料庫現有列(select 結果, 依 order 排序後為基底)</p></td>
461
+ </tr>
462
+
463
+
464
+
465
+ <tr>
466
+
467
+ <td class="name"><code>rowsIn</code></td>
468
+
469
+
470
+ <td class="type">
471
+
472
+
473
+ <span class="param-type">Array</span>
474
+
475
+
476
+
477
+
478
+ </td>
479
+
480
+
481
+
482
+
483
+
484
+ <td class="description last"><p>前端/外部送入之整表列</p></td>
485
+ </tr>
486
+
487
+
488
+
489
+ <tr>
490
+
491
+ <td class="name"><code>keyDetect</code></td>
492
+
493
+
494
+ <td class="type">
495
+
496
+
497
+ <span class="param-type">String</span>
498
+
499
+
500
+
501
+
502
+ </td>
503
+
504
+
505
+
506
+
507
+
508
+ <td class="description last"><p>對應列之鍵欄位(如 'id')</p></td>
509
+ </tr>
510
+
511
+
512
+
513
+ <tr>
514
+
515
+ <td class="name"><code>pickKeys</code></td>
516
+
517
+
518
+ <td class="type">
519
+
520
+
521
+ <span class="param-type">Array</span>
522
+
523
+
524
+
525
+
526
+ </td>
527
+
528
+
529
+
530
+
531
+
532
+ <td class="description last"><p>允許採納之欄位名陣列(如 ['cgrups'])</p></td>
533
+ </tr>
534
+
535
+
536
+ </tbody>
537
+ </table>
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+ <h5 class="h5-returns">Returns:</h5>
555
+
556
+
557
+ <div class="param-desc">
558
+ <p>以資料庫列為基底、僅覆蓋 pickKeys 之新列陣列(順序同資料庫)</p>
559
+ </div>
560
+
561
+
562
+
563
+ <dl class="param-type">
564
+ <dt>
565
+ Type
566
+ </dt>
567
+ <dd>
568
+
569
+ <span class="param-type">Array</span>
570
+
571
+
572
+
573
+ </dd>
574
+ </dl>
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+ </article>
587
+
588
+ </section>
589
+
590
+
591
+
592
+
593
+
594
+
595
+ </div>
596
+
597
+ <br class="clear">
598
+
599
+ <footer>
600
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Sep 13 2026 15:35:25 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
601
+ </footer>
602
+
603
+ <script>prettyPrint();</script>
604
+ <script src="scripts/polyfill.js"></script>
605
+ <script src="scripts/linenumber.js"></script>
606
+
607
+
608
+
609
+ </body>
610
+ </html>
package/docs/index.html CHANGED
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -71,7 +71,7 @@
71
71
  <br class="clear">
72
72
 
73
73
  <footer>
74
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Sep 06 2026 01:04:48 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
74
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Sun Sep 13 2026 15:35:25 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
75
75
  </footer>
76
76
 
77
77
  <script>prettyPrint();</script>