w-web-perm 1.1.9 → 1.1.11

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 (45) hide show
  1. package/README.md +8 -0
  2. package/dist/index.tmp +1 -1
  3. package/dist/js/app-legacy.963e800c.js +1 -0
  4. package/dist/js/app.963e800c.js +1 -0
  5. package/dist/js/{chunk-vendors-legacy.da785a99.js → chunk-vendors-legacy.3e9e3ef1.js} +3 -3
  6. package/dist/js/{chunk-vendors.da785a99.js → chunk-vendors.3e9e3ef1.js} +3 -3
  7. package/dist/w-web-perm.umd.js +2 -2
  8. package/dist/w-web-perm.umd.js.map +1 -1
  9. package/docs/WWebPerm.html +2 -2
  10. package/docs/global.html +651 -9
  11. package/docs/index.html +2 -2
  12. package/docs/server_WWebPerm.mjs.html +23 -3
  13. package/docs/server_dataChannel.mjs.html +2 -2
  14. package/docs/server_lockSave.mjs.html +2 -2
  15. package/docs/server_maskLog.mjs.html +2 -2
  16. package/docs/server_procCore.mjs.html +28 -12
  17. package/docs/server_staLogs_resolveShellWorker.mjs.html +2 -2
  18. package/docs/server_validateRows.mjs.html +17 -16
  19. package/docs/server_wrapInjected.mjs.html +2 -2
  20. package/docs/src_fetchJson.mjs.html +2 -2
  21. package/docs/src_js_eachOwn.mjs.html +119 -0
  22. package/docs/src_js_getOwn.mjs.html +110 -0
  23. package/docs/src_js_getRuleEnable.mjs.html +96 -0
  24. package/docs/src_js_legendFit.mjs.html +2 -2
  25. package/docs/src_plugins_reuseDeletedIds.mjs.html +2 -2
  26. package/docs/src_plugins_submitGuard.mjs.html +2 -2
  27. package/package.json +14 -14
  28. package/server/WWebPerm.mjs +21 -1
  29. package/server/procCore.mjs +26 -10
  30. package/server/validateRows.mjs +15 -14
  31. package/src/components/LayoutContentGrups.vue +4 -3
  32. package/src/components/LayoutContentPemis.vue +4 -3
  33. package/src/components/LayoutContentUsers.vue +2 -1
  34. package/src/components/VeCgrups.vue +4 -3
  35. package/src/components/VeCpemis.vue +4 -3
  36. package/src/components/VeCrules.vue +4 -4
  37. package/src/components/VeGrupBlngUsers.vue +4 -3
  38. package/src/components/VePemiBlngGrups.vue +4 -3
  39. package/src/js/eachOwn.mjs +47 -0
  40. package/src/js/getOwn.mjs +38 -0
  41. package/src/js/getRuleEnable.mjs +24 -0
  42. package/src/perm.mjs +6 -3
  43. package/src/plugins/mShare.mjs +25 -12
  44. package/dist/js/app-legacy.ecb7ce08.js +0 -1
  45. package/dist/js/app.ecb7ce08.js +0 -1
package/docs/global.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><h3>Global</h3><ul><li><a href="global.html#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</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#createAuthorizeExec">createAuthorizeExec</a></li><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#eachOwn">eachOwn</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#getOwn">getOwn</a></li><li><a href="global.html#getRuleEnable">getRuleEnable</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#resolveShellWorker">resolveShellWorker</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#validateRowsBeforeWrite">validateRowsBeforeWrite</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li><li><a href="global.html#wrapOperOrm">wrapOperOrm</a></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -984,6 +984,207 @@ operatorId 可為操作者 id 或「操作者 id + 列識別」(只擋同一列
984
984
 
985
985
 
986
986
 
987
+ <h4 class="name" id="eachOwn"><span class="type-signature"></span>eachOwn<span class="signature">(o, fn)</span><span class="type-signature"> &rarr; {Array|Object}</span></h4>
988
+
989
+
990
+
991
+
992
+
993
+
994
+ <dl class="details">
995
+
996
+ <dt class="tag-description">Description:</dt>
997
+ <dd class="tag-description"><ul class="dummy"><li><p>迭代陣列或物件, 物件只依自有可列舉字串鍵(lodash each 對具非負整數 length 鍵之物件會改走索引 0..length-1, 真實鍵被略過且迭代次數即 length 之值)</p>
998
+ <p>真陣列(Array.isArray, 不用依 Object.prototype.toString 之 isarr: 可被 Symbol.toStringTag 偽稱)依索引由小到大迭代, 空洞以 undefined 迭代, 長度於開始時取一次, 同 lodash each;
999
+ 一般物件依 Object.keys 之順序迭代, length 與其他鍵同為一般鍵, 成本只依實際鍵數, 與 length 之值無關;
1000
+ 其餘(null、undefined、字串、數字、布林、函數、Symbol)不迭代, 原樣回傳(lodash each 對字串會逐字元迭代, 本函數不做)</p></li></ul></dd>
1001
+
1002
+
1003
+
1004
+ <dt class="tag-source">Source:</dt>
1005
+ <dd class="tag-source"><ul class="dummy"><li>
1006
+ <a href="src_js_eachOwn.mjs.html">src/js/eachOwn.mjs</a>, <a href="src_js_eachOwn.mjs.html#line26">line 26</a>
1007
+ </li></ul></dd>
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+ </dl>
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+ <h5 class="h5-examples">Example</h5>
1052
+
1053
+ <pre class="prettyprint"><code>let ks = []
1054
+ eachOwn({ id: 'a', length: 1, name: 'x' }, (v, k) => {
1055
+ ks.push(k)
1056
+ })
1057
+ console.log(ks)
1058
+ // => ['id', 'length', 'name']</code></pre>
1059
+
1060
+
1061
+
1062
+
1063
+ <h5 class="h5-parameters">Parameters:</h5>
1064
+
1065
+
1066
+ <table class="params">
1067
+ <thead>
1068
+ <tr>
1069
+
1070
+ <th>Name</th>
1071
+
1072
+
1073
+ <th>Type</th>
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+ <th class="last">Description</th>
1080
+ </tr>
1081
+ </thead>
1082
+
1083
+ <tbody>
1084
+
1085
+
1086
+ <tr>
1087
+
1088
+ <td class="name"><code>o</code></td>
1089
+
1090
+
1091
+ <td class="type">
1092
+
1093
+
1094
+ <span class="param-type">Array</span>
1095
+ |
1096
+
1097
+ <span class="param-type">Object</span>
1098
+
1099
+
1100
+
1101
+
1102
+ </td>
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+ <td class="description last"><p>輸入陣列或物件</p></td>
1109
+ </tr>
1110
+
1111
+
1112
+
1113
+ <tr>
1114
+
1115
+ <td class="name"><code>fn</code></td>
1116
+
1117
+
1118
+ <td class="type">
1119
+
1120
+
1121
+ <span class="param-type">function</span>
1122
+
1123
+
1124
+
1125
+
1126
+ </td>
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+ <td class="description last"><p>輸入回呼函數(值, 鍵或索引, 原輸入), 回傳false時跳出, 其他回傳值(含undefined、true)皆繼續</p></td>
1133
+ </tr>
1134
+
1135
+
1136
+ </tbody>
1137
+ </table>
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+ <h5 class="h5-returns">Returns:</h5>
1155
+
1156
+
1157
+ <div class="param-desc">
1158
+ <p>回傳原輸入</p>
1159
+ </div>
1160
+
1161
+
1162
+
1163
+ <dl class="param-type">
1164
+ <dt>
1165
+ Type
1166
+ </dt>
1167
+ <dd>
1168
+
1169
+ <span class="param-type">Array</span>
1170
+ |
1171
+
1172
+ <span class="param-type">Object</span>
1173
+
1174
+
1175
+
1176
+ </dd>
1177
+ </dl>
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+
1187
+
987
1188
  <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>
988
1189
 
989
1190
 
@@ -1385,6 +1586,444 @@ reject 之 message 只含例外名稱與代碼(如 'TypeError ECONNREFUSED'、'S
1385
1586
 
1386
1587
 
1387
1588
 
1589
+ <h4 class="name" id="getOwn"><span class="type-signature"></span>getOwn<span class="signature">(o, k, def<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4>
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+ <dl class="details">
1597
+
1598
+ <dt class="tag-description">Description:</dt>
1599
+ <dd class="tag-description"><ul class="dummy"><li><p>取物件之自有屬性值, 不解析路徑、不取繼承屬性(lodash get 會把含 . 或 [ 之字串鍵解析為路徑, 並可取到繼承屬性)</p>
1600
+ <p>鍵為使用端資料(標的 id、群組/權限/規則名稱、列 id)時一律用本函數: 只授權 A 時, lodash get(kp, 'A.0') 經字串索引得 'y'、'A.length' 得 1、
1601
+ 'toString' 得繼承函數; 本函數對這些鍵回預設值. 自有屬性存在時回其值(含 0、''、null、false、undefined), 精確鍵(整串即鍵名, 如 'A.0')照常.
1602
+ 輸入非物件(null、undefined、字串、數字、布林)一律回預設值.</p></li></ul></dd>
1603
+
1604
+
1605
+
1606
+ <dt class="tag-source">Source:</dt>
1607
+ <dd class="tag-source"><ul class="dummy"><li>
1608
+ <a href="src_js_getOwn.mjs.html">src/js/getOwn.mjs</a>, <a href="src_js_getOwn.mjs.html#line30">line 30</a>
1609
+ </li></ul></dd>
1610
+
1611
+
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+
1621
+
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+
1640
+
1641
+ </dl>
1642
+
1643
+
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+
1651
+
1652
+
1653
+ <h5 class="h5-examples">Example</h5>
1654
+
1655
+ <pre class="prettyprint"><code>let kp = { A: 'y', 'B.0': 'y' }
1656
+ console.log(getOwn(kp, 'A', 'n'))
1657
+ // => 'y'
1658
+ console.log(getOwn(kp, 'A.0', 'n'))
1659
+ // => 'n'
1660
+ console.log(getOwn(kp, 'B.0', 'n'))
1661
+ // => 'y'
1662
+ console.log(getOwn(kp, 'toString', 'n'))
1663
+ // => 'n'</code></pre>
1664
+
1665
+
1666
+
1667
+
1668
+ <h5 class="h5-parameters">Parameters:</h5>
1669
+
1670
+
1671
+ <table class="params">
1672
+ <thead>
1673
+ <tr>
1674
+
1675
+ <th>Name</th>
1676
+
1677
+
1678
+ <th>Type</th>
1679
+
1680
+
1681
+ <th>Attributes</th>
1682
+
1683
+
1684
+
1685
+
1686
+ <th class="last">Description</th>
1687
+ </tr>
1688
+ </thead>
1689
+
1690
+ <tbody>
1691
+
1692
+
1693
+ <tr>
1694
+
1695
+ <td class="name"><code>o</code></td>
1696
+
1697
+
1698
+ <td class="type">
1699
+
1700
+
1701
+ <span class="param-type">Object</span>
1702
+
1703
+
1704
+
1705
+
1706
+ </td>
1707
+
1708
+
1709
+ <td class="attributes">
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+ </td>
1716
+
1717
+
1718
+
1719
+
1720
+ <td class="description last"><p>輸入物件(可為一般物件或無原型物件)</p></td>
1721
+ </tr>
1722
+
1723
+
1724
+
1725
+ <tr>
1726
+
1727
+ <td class="name"><code>k</code></td>
1728
+
1729
+
1730
+ <td class="type">
1731
+
1732
+
1733
+ <span class="param-type">String</span>
1734
+ |
1735
+
1736
+ <span class="param-type">Number</span>
1737
+
1738
+
1739
+
1740
+
1741
+ </td>
1742
+
1743
+
1744
+ <td class="attributes">
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+ </td>
1751
+
1752
+
1753
+
1754
+
1755
+ <td class="description last"><p>輸入鍵(整串視為鍵名)</p></td>
1756
+ </tr>
1757
+
1758
+
1759
+
1760
+ <tr>
1761
+
1762
+ <td class="name"><code>def</code></td>
1763
+
1764
+
1765
+ <td class="type">
1766
+
1767
+
1768
+ <span class="param-type">*</span>
1769
+
1770
+
1771
+
1772
+
1773
+ </td>
1774
+
1775
+
1776
+ <td class="attributes">
1777
+
1778
+ &lt;optional><br>
1779
+
1780
+
1781
+
1782
+
1783
+
1784
+ </td>
1785
+
1786
+
1787
+
1788
+
1789
+ <td class="description last"><p>輸入無自有屬性時回傳之預設值, 預設undefined</p></td>
1790
+ </tr>
1791
+
1792
+
1793
+ </tbody>
1794
+ </table>
1795
+
1796
+
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+
1804
+
1805
+
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+ <h5 class="h5-returns">Returns:</h5>
1812
+
1813
+
1814
+ <div class="param-desc">
1815
+ <p>回傳自有屬性值或預設值</p>
1816
+ </div>
1817
+
1818
+
1819
+
1820
+ <dl class="param-type">
1821
+ <dt>
1822
+ Type
1823
+ </dt>
1824
+ <dd>
1825
+
1826
+ <span class="param-type">*</span>
1827
+
1828
+
1829
+
1830
+ </dd>
1831
+ </dl>
1832
+
1833
+
1834
+
1835
+
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+
1842
+ <h4 class="name" id="getRuleEnable"><span class="type-signature"></span>getRuleEnable<span class="signature">(kp, name)</span><span class="type-signature"> &rarr; {String}</span></h4>
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+ <dl class="details">
1850
+
1851
+ <dt class="tag-description">Description:</dt>
1852
+ <dd class="tag-description"><ul class="dummy"><li><p>取得規則(標的)於 JSON5 解析結果(crules)中之啟用狀態</p>
1853
+ <p>與 getUserRules 之解碼一致: 名稱為資料不是路徑(僅以自有屬性精確查值, 規則帳本 R-AUTH-PATH-01),
1854
+ 值為物件(如 { isActive: 'y' })時取其 isActive, 其餘取值本身; 僅 'y' 為啟用, 其餘(含缺漏、非字串、物件值無 isActive)皆為 'n'.
1855
+ 使編輯對話框顯示之狀態與實際授權結果一致, 存檔時不致把有效授權靜默改成 n</p></li></ul></dd>
1856
+
1857
+
1858
+
1859
+ <dt class="tag-source">Source:</dt>
1860
+ <dd class="tag-source"><ul class="dummy"><li>
1861
+ <a href="src_js_getRuleEnable.mjs.html">src/js/getRuleEnable.mjs</a>, <a href="src_js_getRuleEnable.mjs.html#line15">line 15</a>
1862
+ </li></ul></dd>
1863
+
1864
+
1865
+
1866
+
1867
+
1868
+
1869
+
1870
+
1871
+
1872
+
1873
+
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+
1882
+
1883
+
1884
+
1885
+
1886
+
1887
+
1888
+
1889
+
1890
+
1891
+
1892
+
1893
+
1894
+ </dl>
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+
1906
+
1907
+
1908
+ <h5 class="h5-parameters">Parameters:</h5>
1909
+
1910
+
1911
+ <table class="params">
1912
+ <thead>
1913
+ <tr>
1914
+
1915
+ <th>Name</th>
1916
+
1917
+
1918
+ <th>Type</th>
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+ <th class="last">Description</th>
1925
+ </tr>
1926
+ </thead>
1927
+
1928
+ <tbody>
1929
+
1930
+
1931
+ <tr>
1932
+
1933
+ <td class="name"><code>kp</code></td>
1934
+
1935
+
1936
+ <td class="type">
1937
+
1938
+
1939
+ <span class="param-type">Object</span>
1940
+
1941
+
1942
+
1943
+
1944
+ </td>
1945
+
1946
+
1947
+
1948
+
1949
+
1950
+ <td class="description last"><p>輸入 JSON5.parse(crules) 之結果, 鍵為規則(標的)名稱</p></td>
1951
+ </tr>
1952
+
1953
+
1954
+
1955
+ <tr>
1956
+
1957
+ <td class="name"><code>name</code></td>
1958
+
1959
+
1960
+ <td class="type">
1961
+
1962
+
1963
+ <span class="param-type">String</span>
1964
+
1965
+
1966
+
1967
+
1968
+ </td>
1969
+
1970
+
1971
+
1972
+
1973
+
1974
+ <td class="description last"><p>輸入規則(標的)名稱</p></td>
1975
+ </tr>
1976
+
1977
+
1978
+ </tbody>
1979
+ </table>
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+
1995
+
1996
+ <h5 class="h5-returns">Returns:</h5>
1997
+
1998
+
1999
+ <div class="param-desc">
2000
+ <p>回傳 'y' 或 'n'</p>
2001
+ </div>
2002
+
2003
+
2004
+
2005
+ <dl class="param-type">
2006
+ <dt>
2007
+ Type
2008
+ </dt>
2009
+ <dd>
2010
+
2011
+ <span class="param-type">String</span>
2012
+
2013
+
2014
+
2015
+ </dd>
2016
+ </dl>
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+
1388
2027
  <h4 class="name" id="maskQuery"><span class="type-signature"></span>maskQuery<span class="signature">(q)</span><span class="type-signature"> &rarr; {Object|String|Array}</span></h4>
1389
2028
 
1390
2029
 
@@ -1900,7 +2539,7 @@ reject 之 message 只含例外名稱與代碼(如 'TypeError ECONNREFUSED'、'S
1900
2539
 
1901
2540
  <dt class="tag-source">Source:</dt>
1902
2541
  <dd class="tag-source"><ul class="dummy"><li>
1903
- <a href="server_procCore.mjs.html">server/procCore.mjs</a>, <a href="server_procCore.mjs.html#line28">line 28</a>
2542
+ <a href="server_procCore.mjs.html">server/procCore.mjs</a>, <a href="server_procCore.mjs.html#line33">line 33</a>
1904
2543
  </li></ul></dd>
1905
2544
 
1906
2545
 
@@ -2013,7 +2652,7 @@ reject 之 message 只含例外名稱與代碼(如 'TypeError ECONNREFUSED'、'S
2013
2652
 
2014
2653
 
2015
2654
 
2016
- <td class="description last"><p>前端/外部送入之整表列</p></td>
2655
+ <td class="description last"><p>前端/外部送入之整表列; 須為真陣列(Array.isArray), 非陣列(含帶 length 之物件)視同未送入任何列, 不依其 length 迭代(規則帳本 R-OBJ-ITER-01)</p></td>
2017
2656
  </tr>
2018
2657
 
2019
2658
 
@@ -2905,14 +3544,17 @@ opt.hold 為函數, 輸入流程結果, 回傳 true 時保持占位與按鈕鎖(
2905
3544
  且批內不得重複(以 String(id) 比對: w-serv-orm 1.1.11 起數字主鍵存為其字串形式, 數字與其字串形式為同一主鍵).</li>
2906
3545
  <li>任一字串欄位之值會被 wsemi 之 clearXSS 改寫者(含 HTML 標記, 如「&lt;」後接英文字母)即拒絕——與 w-serv-orm 寫入前之 adjustData 同一函數,
2907
3546
  主鍵被改寫時 ORM 拒絕整批, 其他欄位則會被靜默改寫(存值與送入值不同), 兩者皆於此擋下, 使送入值即儲存值.
2908
- 本函數為純函數: 不修改輸入、不呼叫 ORM; 主鍵是否必填由呼叫端以 opt.idRequired 指定(未給主鍵之列由 ORM 自動補主鍵者可不要求).</li>
3547
+ 本函數為純函數: 不修改輸入、不呼叫 ORM; 主鍵是否必填由呼叫端以 opt.idRequired 指定(未給主鍵之列由 ORM 自動補主鍵者可不要求).
3548
+ 列物件之欄位一律依自有可列舉字串鍵逐一檢查(規則帳本 R-OBJ-ITER-01): 名為 length 之欄位與其他欄位同為一般欄位, 即使其值為非負整數(0、1、2**32-1)亦然——
3549
+ lodash each 對這類物件會改走索引 0..length-1 而略過全部字串欄位, 且迭代次數即 length 之值; rows 與 rowsIdOnly 須為真陣列(Array.isArray),
3550
+ 以 Symbol.toStringTag 偽稱 Array 之物件不是陣列(rows → rowsInvalid、rowsIdOnly → 視為未給), 不依其 length 迭代.</li>
2909
3551
  </ol></li></ul></dd>
2910
3552
 
2911
3553
 
2912
3554
 
2913
3555
  <dt class="tag-source">Source:</dt>
2914
3556
  <dd class="tag-source"><ul class="dummy"><li>
2915
- <a href="server_validateRows.mjs.html">server/validateRows.mjs</a>, <a href="server_validateRows.mjs.html#line30">line 30</a>
3557
+ <a href="server_validateRows.mjs.html">server/validateRows.mjs</a>, <a href="server_validateRows.mjs.html#line31">line 31</a>
2916
3558
  </li></ul></dd>
2917
3559
 
2918
3560
 
@@ -3017,7 +3659,7 @@ opt.hold 為函數, 輸入流程結果, 回傳 true 時保持占位與按鈕鎖(
3017
3659
  </td>
3018
3660
 
3019
3661
 
3020
- <td class="description last"><p>輸入待寫入之列陣列, 各列為物件</p></td>
3662
+ <td class="description last"><p>輸入待寫入之列陣列, 各列為物件; 非真陣列回傳 { reason: 'rowsInvalid', k: -1, field: '' }</p></td>
3021
3663
  </tr>
3022
3664
 
3023
3665
 
@@ -3160,7 +3802,7 @@ opt.hold 為函數, 輸入流程結果, 回傳 true 時保持占位與按鈕鎖(
3160
3802
  </td>
3161
3803
 
3162
3804
 
3163
- <td class="description last"><p>輸入只參與主鍵檢查(重複、長度)而不檢查欄位標記之列陣列(如整表儲存中不會被寫入之既有列), 預設[]</p></td>
3805
+ <td class="description last"><p>輸入只參與主鍵檢查(重複、長度)而不檢查欄位標記之列陣列(如整表儲存中不會被寫入之既有列), 非真陣列視為未給, 預設[]</p></td>
3164
3806
  </tr>
3165
3807
 
3166
3808
 
@@ -3193,7 +3835,7 @@ opt.hold 為函數, 輸入流程結果, 回傳 true 時保持占位與按鈕鎖(
3193
3835
 
3194
3836
 
3195
3837
  <div class="param-desc">
3196
- <p>回傳第一個違規 { reason, k, field }, reason 為 'idInvalid'、'idTooLong'、'idDuplicate'、'htmlMarkup' 之一, k 為該列於 rows 之位置(rowsIdOnly 之列為 -1), field 為欄位名; 皆通過回傳 null</p>
3838
+ <p>回傳第一個違規 { reason, k, field }, reason 為 'rowsInvalid'、'idInvalid'、'idTooLong'、'idDuplicate'、'htmlMarkup' 之一, k 為該列於 rows 之位置(rowsIdOnly 之列為 -1), field 為欄位名; 皆通過回傳 null</p>
3197
3839
  </div>
3198
3840
 
3199
3841
 
@@ -3795,7 +4437,7 @@ opt.hold 為函數, 輸入流程結果, 回傳 true 時保持占位與按鈕鎖(
3795
4437
  <br class="clear">
3796
4438
 
3797
4439
  <footer>
3798
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 16 2026 13:07:24 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
4440
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Tue Oct 20 2026 14:44:45 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
3799
4441
  </footer>
3800
4442
 
3801
4443
  <script>prettyPrint();</script>