w-web-perm 1.0.82 → 1.0.83

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * w-web-perm v1.0.82
2
+ * w-web-perm v1.0.83
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
@@ -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 Mon Sep 14 2026 15:08:40 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 Mon Sep 14 2026 20:15:18 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1049
1049
  </footer>
1050
1050
 
1051
1051
  <script>prettyPrint();</script>
package/docs/global.html CHANGED
@@ -597,7 +597,7 @@
597
597
  <br class="clear">
598
598
 
599
599
  <footer>
600
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 15:08:40 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
600
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:18 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
601
601
  </footer>
602
602
 
603
603
  <script>prettyPrint();</script>
package/docs/index.html CHANGED
@@ -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 Mon Sep 14 2026 15:08:40 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 Mon Sep 14 2026 20:15:18 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
75
75
  </footer>
76
76
 
77
77
  <script>prettyPrint();</script>
@@ -1221,7 +1221,7 @@ export default WWebPerm
1221
1221
  <br class="clear">
1222
1222
 
1223
1223
  <footer>
1224
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 15:08:40 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1224
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:18 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1225
1225
  </footer>
1226
1226
 
1227
1227
  <script>prettyPrint();</script>
@@ -298,7 +298,7 @@ export default proc
298
298
  <br class="clear">
299
299
 
300
300
  <footer>
301
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 15:08:40 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
301
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:18 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
302
302
  </footer>
303
303
 
304
304
  <script>prettyPrint();</script>
@@ -100,7 +100,7 @@ export default fetchJson
100
100
  <br class="clear">
101
101
 
102
102
  <footer>
103
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 15:08:40 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
103
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Sep 14 2026 20:15:18 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
104
104
  </footer>
105
105
 
106
106
  <script>prettyPrint();</script>
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "w-web-perm",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
4
4
  "main": "dist/w-web-perm.umd.js",
5
5
  "dependencies": {
6
6
  "json5": "^2.2.3",
7
7
  "w-aggrid-vue": "^2.0.86",
8
- "w-component-vue": "^2.5.14",
8
+ "w-component-vue": "^2.5.15",
9
9
  "w-data-collector": "^1.0.37",
10
10
  "w-echarts-vue": "^1.0.11",
11
11
  "w-serv-hapi": "^1.0.88",
@@ -36,10 +36,46 @@
36
36
  <input id="staShowTotal" type="checkbox" v-model="showTotal" @change="updateChartsDebounce" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500">
37
37
  <label for="staShowTotal" class="ml-2 text-sm font-medium text-gray-900">{{$t('staTotal')}}</label>
38
38
  </div>
39
- <select v-model="timeInterval" @change="changeTimeInterval" class="border rounded px-2 py-1 text-sm">
40
- <option value="hr">{{$t('staTimeHr')}}</option>
41
- <option value="day">{{$t('staTimeDay')}}</option>
42
- </select>
39
+ <!-- 時間分組下拉改自製 WTextSelect 取代原生 <select>(全域 §10.6-3: 原生下拉彈出清單之選中/hover 色由 OS 決定, CSS 不可控, 與本頁主題不一致; 同 w-web-sso LayoutContentStaInfor / w-web-api LayoutContentStats, 三專案統一).
40
+ 色票沿用本頁既有 Tailwind 類別實值: 邊線 border #e5e7eb、底 bg-white #ffffff、文字同鄰接勾選框標籤 text-gray-900 #111827、
41
+ 項目 hover 底 gray-100 #f3f4f6、焦點邊線同勾選框 focus:ring-blue-500 #3b82f6、展開圖標同副標 text-gray-500 #6b7280、圓角 rounded 4; 字級 text-sm 0.875rem; 內距同原 px-2 py-1.
42
+ 寬度依當前語系最長選項文字計算(computed timeIntervalSelWidth, 同原生 select 依最長選項定寬, §10.6-5); id 供 e2e 定位, labelContent 供 e2e 定位 teleport 至 body 之清單.
43
+ 清單對齊(§10.6-6): w-component-vue 2.5.14 實測(tmp/probe-stasel.mjs, 2026-09-14)清單左緣錨定「觸發區文字左緣」(外框左緣 + 邊框 1 + 內距 8), 故 placementDistX=-9 把清單左緣拉回外框左緣,
44
+ 再以項目左內距 9 使項目文字與觸發區文字左緣貼齊(同 w-web-api 之 -9; sso 之 0 為其自量, 兩者差異未究). 清單寬固定同觸發區. -->
45
+ <WTextSelect
46
+ id="staTimeIntervalSel"
47
+ :style="`width:${timeIntervalSelWidth}px;`"
48
+ :items="timeIntervalOptions"
49
+ :value="timeInterval"
50
+ :shadow="false"
51
+ :borderRadius="4"
52
+ :paddingStyle="{ v: 4, h: 8 }"
53
+ :backgroundColor="'#ffffff'"
54
+ :backgroundColorHover="'#ffffff'"
55
+ :backgroundColorFocus="'#ffffff'"
56
+ :borderColor="'#e5e7eb'"
57
+ :borderColorHover="'#e5e7eb'"
58
+ :borderColorFocus="'#3b82f6'"
59
+ :textColor="'#111827'"
60
+ :textFontSize="'0.875rem'"
61
+ :itemTextFontSize="'0.875rem'"
62
+ :itemTextColor="'#111827'"
63
+ :itemTextColorHover="'#111827'"
64
+ :itemBackgroundColor="'#ffffff'"
65
+ :itemBackgroundColorHover="'#f3f4f6'"
66
+ :itemPaddingStyle="{ v: 6, h: 9 }"
67
+ :placementDistX="-9"
68
+ :autoFitMinWidth="false"
69
+ :autoFitMaxWidth="false"
70
+ :minWidth="timeIntervalSelWidth"
71
+ :maxWidth="timeIntervalSelWidth"
72
+ :expansionIconColor="'#6b7280'"
73
+ :labelContent="'staTimeIntervalSel'"
74
+ @input="onInputTimeInterval"
75
+ >
76
+ <template v-slot:select="props">{{getTimeIntervalText(props.item)}}</template>
77
+ <template v-slot:item="props">{{getTimeIntervalText(props.item)}}</template>
78
+ </WTextSelect>
43
79
  </div>
44
80
 
45
81
  </div>
@@ -148,10 +184,16 @@ import sortBy from 'lodash-es/sortBy.js'
148
184
  import reverse from 'lodash-es/reverse.js'
149
185
  import debounce from 'wsemi/src/debounce.mjs'
150
186
  import isearr from 'wsemi/src/isearr.mjs'
187
+ import isestr from 'wsemi/src/isestr.mjs'
151
188
  import WEchartsVue from 'w-echarts-vue/src/components/WEchartsVue.vue'
152
189
  import { mdiChartBoxOutline, mdiTableLarge } from '@mdi/js/mdi.js'
153
190
  import WIcon from 'w-component-vue/src/components/WIcon.vue'
154
191
  import WIconLoading from 'w-component-vue/src/components/WIconLoading.vue'
192
+ import WTextSelect from 'w-component-vue/src/components/WTextSelect.vue'
193
+
194
+
195
+ //時間分組下拉之結構寬度(px): 左右內距 8+8、左右邊框 1+1、展開圖標 18、圖標與文字間隙 2 (同 w-web-sso LayoutContentStaInfor / w-web-api LayoutContentStats 之 SEL_STRUCT_WIDTH)
196
+ let SEL_STRUCT_WIDTH = 8 + 8 + 1 + 1 + 18 + 2
155
197
 
156
198
 
157
199
  export default {
@@ -159,6 +201,7 @@ export default {
159
201
  WEchartsVue,
160
202
  WIcon,
161
203
  WIconLoading,
204
+ WTextSelect,
162
205
  },
163
206
  props: {
164
207
  drawer: {
@@ -183,6 +226,8 @@ export default {
183
226
 
184
227
  timeLength: 7,
185
228
  timeInterval: 'hr',
229
+ timeIntervalOptions: ['hr', 'day'], //時間分組下拉之選項鍵, 顯示文字經 getTimeIntervalText 走 i18n(staTimeHr / staTimeDay)
230
+ fontSel: '', //時間分組下拉觸發區之實際字型(mounted 自 computed style 取得), 供 timeIntervalSelWidth 量文字實寬
186
231
 
187
232
  showTotal: false,
188
233
 
@@ -199,6 +244,11 @@ export default {
199
244
 
200
245
  let vo = this
201
246
 
247
+ //時間分組下拉觸發區字型: 字級 0.875rem(同原 text-sm)× 根字級, 字族/字重承襲本頁; 供 timeIntervalSelWidth 以 canvas 量最長選項文字實寬(同 sso)
248
+ let cs = getComputedStyle(vo.$el)
249
+ let rootPx = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16
250
+ vo.fontSel = `${cs.fontWeight} ${rootPx * 0.875}px ${cs.fontFamily}`
251
+
202
252
  //errMsg
203
253
  vo.errMsg = ''
204
254
 
@@ -212,6 +262,20 @@ export default {
212
262
  },
213
263
  computed: {
214
264
 
265
+ //時間分組下拉觸發區寬度(全域 §10.6-5: 固定尺寸須計算): 當前語系「最長選項文字」實寬(canvas measureText, 字型同觸發區)+ 結構寬 SEL_STRUCT_WIDTH;
266
+ //語系切換即重算($t 為響應式). why 不寫死: 原生 select 依最長選項自動定寬, 自製下拉須重現, 否則另一語系右側大片留白.
267
+ timeIntervalSelWidth: function() {
268
+ let vo = this
269
+ let texts = vo.timeIntervalOptions.map((k) => vo.getTimeIntervalText(k))
270
+ let wText = 0
271
+ if (isestr(vo.fontSel)) {
272
+ let c = document.createElement('canvas').getContext('2d')
273
+ c.font = vo.fontSel
274
+ wText = Math.max(...texts.map((t) => c.measureText(t).width))
275
+ }
276
+ return Math.ceil(wText + SEL_STRUCT_WIDTH)
277
+ },
278
+
215
279
  lang: function() {
216
280
  let vo = this
217
281
  return get(vo, `$store.state.lang`, '')
@@ -435,6 +499,20 @@ export default {
435
499
  return num.toLocaleString()
436
500
  },
437
501
 
502
+ getTimeIntervalText: function(k) {
503
+ let vo = this
504
+ return k === 'day' ? vo.$t('staTimeDay') : vo.$t('staTimeHr')
505
+ },
506
+
507
+ onInputTimeInterval: function(v) {
508
+ let vo = this
509
+ if (v === vo.timeInterval) {
510
+ return //重選同值不重取
511
+ }
512
+ vo.timeInterval = v
513
+ vo.changeTimeInterval()
514
+ },
515
+
438
516
  changeTimeInterval: function() {
439
517
  let vo = this
440
518
 
@@ -1 +1 @@
1
- {"grups":"2026-09-14T15:09:21+08:00|WlPNEm","pemis":"2026-09-14T15:08:53+08:00|hfOSVy","targets":"2026-09-14T15:08:53+08:00|B018QW","users":"2026-09-14T15:08:53+08:00|ijcR8Z"}
1
+ {"grups":"2026-09-14T20:16:24+08:00|0BKvMO","pemis":"2026-09-14T20:16:24+08:00|cIqWD1","targets":"2026-09-14T20:16:24+08:00|qPAT0o","users":"2026-09-14T20:16:24+08:00|zhkupi"}
@@ -1 +0,0 @@
1
- .bg-gray-100[data-v-a21eb034]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-50[data-v-a21eb034]{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-white[data-v-a21eb034]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.border[data-v-a21eb034]{border-width:1px}.border-collapse[data-v-a21eb034]{border-collapse:collapse}.border-solid[data-v-a21eb034]{border-style:solid}.border-gray-200[data-v-a21eb034]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300[data-v-a21eb034]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.flex[data-v-a21eb034]{display:-webkit-box;display:-ms-flexbox;display:flex}.focus\:ring-blue-500[data-v-a21eb034]:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.font-medium[data-v-a21eb034]{font-weight:500}.font-semibold[data-v-a21eb034]{font-weight:600}.h-4[data-v-a21eb034]{height:1rem}.hover\:bg-gray-50[data-v-a21eb034]:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.items-center[data-v-a21eb034]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.justify-end[data-v-a21eb034]{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.mb-8[data-v-a21eb034]{margin-bottom:2rem}.ml-2[data-v-a21eb034]{margin-left:.5rem}.mr-2[data-v-a21eb034]{margin-right:.5rem}.mt-2[data-v-a21eb034]{margin-top:.5rem}.overflow-x-auto[data-v-a21eb034]{overflow-x:auto}.p-5[data-v-a21eb034]{padding:1.25rem}.pb-2[data-v-a21eb034]{padding-bottom:.5rem}.px-2[data-v-a21eb034]{padding-left:.5rem;padding-right:.5rem}.px-6[data-v-a21eb034]{padding-left:1.5rem;padding-right:1.5rem}.py-1[data-v-a21eb034]{padding-top:.25rem;padding-bottom:.25rem}.py-3[data-v-a21eb034]{padding-top:.75rem;padding-bottom:.75rem}.py-4[data-v-a21eb034]{padding-top:1rem;padding-bottom:1rem}.relative[data-v-a21eb034]{position:relative}.rounded[data-v-a21eb034]{border-radius:.25rem}.rounded-lg[data-v-a21eb034]{border-radius:.5rem}.shadow-md[data-v-a21eb034]{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.space-x-4[data-v-a21eb034]>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-8[data-v-a21eb034]>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.text-blue-600[data-v-a21eb034]{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.text-gray-500[data-v-a21eb034]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-700[data-v-a21eb034]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-900[data-v-a21eb034]{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-left[data-v-a21eb034]{text-align:left}.text-lg[data-v-a21eb034]{font-size:1.125rem;line-height:1.75rem}.text-purple-600[data-v-a21eb034]{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity,1))}.text-sm[data-v-a21eb034]{font-size:.875rem;line-height:1.25rem}.text-xs[data-v-a21eb034]{font-size:.75rem;line-height:1rem}.transition-colors[data-v-a21eb034]{-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.w-4[data-v-a21eb034]{width:1rem}.w-full[data-v-a21eb034]{width:100%}.staCtrl[data-v-a21eb034]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:12px;padding:8px 0}.staCtrlRight[data-v-a21eb034],.staCtrl[data-v-a21eb034]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.staCtrlRight[data-v-a21eb034]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:16px}body,html{font-family:微軟正黑體,Microsoft JhengHei,MicrosoftJhengHeiRegular,Avenir,Helvetica,Arial,sans-serif;overflow-y:hidden}a,button,div,input,p,pre,span,textarea{font-family:inherit}.fade-enter-active{-webkit-animation:go 1s;animation:go 1s}.fade-leave-active{-webkit-animation:back 1s;animation:back 1s}@-webkit-keyframes go{0%{opacity:0}to{opacity:1}}@keyframes go{0%{opacity:0}to{opacity:1}}@-webkit-keyframes back{0%{opacity:1}to{opacity:0}}@keyframes back{0%{opacity:1}to{opacity:0}}