w-web-sso 1.0.0

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 (102) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +55 -0
  4. package/.github/workflows/ci-test.yml +24 -0
  5. package/.jsdoc +25 -0
  6. package/.vscode/launch.json +20 -0
  7. package/LICENSE +21 -0
  8. package/README.md +25 -0
  9. package/SECURITY.md +5 -0
  10. package/babel.config.js +15 -0
  11. package/dist/css/app.969ad1db.css +1 -0
  12. package/dist/index.tmp +3 -0
  13. package/dist/js/app-legacy.ff64be1c.js +2 -0
  14. package/dist/js/app-legacy.ff64be1c.js.map +1 -0
  15. package/dist/js/app.ff64be1c.js +2 -0
  16. package/dist/js/app.ff64be1c.js.map +1 -0
  17. package/dist/js/chunk-vendors-legacy.0bb7a31b.js +13 -0
  18. package/dist/js/chunk-vendors-legacy.0bb7a31b.js.map +1 -0
  19. package/dist/js/chunk-vendors.0bb7a31b.js +13 -0
  20. package/dist/js/chunk-vendors.0bb7a31b.js.map +1 -0
  21. package/dist/w-web-sso.umd.js +7 -0
  22. package/dist/w-web-sso.umd.js.map +1 -0
  23. package/docs/WWebSso.html +938 -0
  24. package/docs/WWebSso.mjs.html +721 -0
  25. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  26. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  27. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  28. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  29. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  30. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  31. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  32. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  33. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  34. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  35. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  36. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  37. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  38. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  39. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  40. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  41. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  42. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  43. package/docs/index.html +84 -0
  44. package/docs/scripts/collapse.js +39 -0
  45. package/docs/scripts/commonNav.js +28 -0
  46. package/docs/scripts/linenumber.js +25 -0
  47. package/docs/scripts/nav.js +12 -0
  48. package/docs/scripts/polyfill.js +4 -0
  49. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  50. package/docs/scripts/prettify/lang-css.js +2 -0
  51. package/docs/scripts/prettify/prettify.js +28 -0
  52. package/docs/scripts/search.js +99 -0
  53. package/docs/styles/jsdoc.css +776 -0
  54. package/docs/styles/prettify.css +80 -0
  55. package/g.backupDb.mjs +10 -0
  56. package/g.getSettings.mjs +17 -0
  57. package/g.initialData.mjs +94 -0
  58. package/g.initialTestData.mjs +21 -0
  59. package/g.mOrm.mjs +24 -0
  60. package/g.provideUsers.mjs +45 -0
  61. package/package.json +70 -0
  62. package/public/index.html +30 -0
  63. package/script.txt +22 -0
  64. package/server/WWebSso.mjs +649 -0
  65. package/server/hashPassword.mjs +27 -0
  66. package/server/proc.mjs +543 -0
  67. package/server/provideUsers.mjs +68 -0
  68. package/src/App.vue +123 -0
  69. package/src/components/Common/CheckYes.vue +85 -0
  70. package/src/components/Common/CheckYesNo.vue +91 -0
  71. package/src/components/Common/LabelItem.vue +106 -0
  72. package/src/components/Common/LoadingWinBar.vue +115 -0
  73. package/src/components/Layout.vue +160 -0
  74. package/src/components/LayoutContent.vue +193 -0
  75. package/src/components/LayoutContentUsers.vue +498 -0
  76. package/src/components/LayoutState.vue +91 -0
  77. package/src/components/PageLogin.vue +524 -0
  78. package/src/components/VeUser.vue +446 -0
  79. package/src/components/ruleGroup.vue +645 -0
  80. package/src/main.js +97 -0
  81. package/src/plugins/mDataSelectorSchema.mjs +30 -0
  82. package/src/plugins/mDataSupport.mjs +23 -0
  83. package/src/plugins/mShare.mjs +229 -0
  84. package/src/plugins/mUI.mjs +229 -0
  85. package/src/schema/gi.mjs +8 -0
  86. package/src/schema/index.mjs +18 -0
  87. package/src/schema/tables/tokens.mjs +70 -0
  88. package/src/schema/tables/users.mjs +110 -0
  89. package/src/store/actions.mjs +1 -0
  90. package/src/store/getters.mjs +1 -0
  91. package/src/store/index.mjs +25 -0
  92. package/src/store/mutations.mjs +333 -0
  93. package/src/store/types.mjs +15 -0
  94. package/srv.mjs +84 -0
  95. package/tableTags-web-sso.json +1 -0
  96. package/test/all.test.mjs +10 -0
  97. package/toolg/addVersion.mjs +4 -0
  98. package/toolg/cleanFolder.mjs +4 -0
  99. package/toolg/gDistRollup.mjs +36 -0
  100. package/toolg/genEntry.mjs +23 -0
  101. package/toolg/modifyReadme.mjs +4 -0
  102. package/vue.config.js +15 -0
@@ -0,0 +1,645 @@
1
+ <template>
2
+ <div
3
+ :changeGroup="changeGroup"
4
+ v-if="treeBlocks!==null"
5
+ >
6
+
7
+ <div
8
+ style=""
9
+ v-domresize
10
+ @domresize="resizeHead"
11
+ v-if="showHead"
12
+ >
13
+
14
+ <div
15
+ style="padding:15px; border-bottom:1px solid #ddd;"
16
+ v-if="editable"
17
+ >
18
+
19
+ <div style="padding:5px 0px; display:flex; align-items:center;">
20
+ <div style="padding-right:5px; font-size:0.9rem; color:#888;">
21
+ {{$t('name')}}:
22
+ </div>
23
+ <div style="">
24
+ <WText
25
+ style="width:300px;"
26
+ :value="getName(group)"
27
+ @input="(v)=>{updateProp('name',v)}"
28
+ ></WText>
29
+ </div>
30
+ </div>
31
+
32
+ <div style="padding:5px 0px; display:flex; align-items:center;">
33
+ <div style="padding-right:5px; font-size:0.9rem; color:#888;">
34
+ {{$t('description')}}:
35
+ </div>
36
+ <div style="">
37
+ <WText
38
+ style="width:300px;"
39
+ :value="getDescription(group)"
40
+ @input="(v)=>{updateProp('description',v)}"
41
+ ></WText>
42
+ </div>
43
+ </div>
44
+
45
+ </div>
46
+
47
+ <div
48
+ style="padding:15px; border-bottom:1px solid #ddd;"
49
+ v-else
50
+ >
51
+
52
+ <div style="font-size:1.2rem; white-space:nowrap;">
53
+ {{group.name}}
54
+ </div>
55
+
56
+ <div style="color:#888; font-size:0.8rem; white-space:nowrap;">
57
+ {{getDescription(group)}}
58
+ </div>
59
+
60
+ </div>
61
+
62
+ <div
63
+ style="display:flex; align-items:center; padding:20px 15px 15px 15px; background:#eee; border-bottom:1px solid #ddd;"
64
+ v-if="false"
65
+ >
66
+
67
+ <div style="margin-right:10px;">{{$t('allDefaults')}}:</div>
68
+
69
+ <div style="margin-right:10px; display:flex; align-items:center;">
70
+ <div style="margin-right:5px;">{{$t('show')}}</div>
71
+ <div>
72
+ <WSwitch
73
+ :value="defaultShow"
74
+ @input="(b)=>{setDefaultShow(b)}"
75
+ ></WSwitch>
76
+ </div>
77
+ </div>
78
+
79
+ <div style="margin-right:10px; display:flex; align-items:center;">
80
+ <div style="margin-right:5px;">{{$t('active')}}</div>
81
+ <div>
82
+ <WSwitch
83
+ :value="defaultActive"
84
+ @input="(b)=>{setDefaultActive(b)}"
85
+ ></WSwitch>
86
+ </div>
87
+ </div>
88
+
89
+ </div>
90
+
91
+ </div>
92
+
93
+ <WTree
94
+ :viewHeightMax="treeHeight"
95
+ :indent="0.5"
96
+ :iconToggleColor="'#666'"
97
+ :iconToggleBackgroundColor="'transparent'"
98
+ :iconToggleBackgroundColorHover="'transparent'"
99
+ :data="treeBlocks"
100
+ >
101
+ <template v-slot:item="props">
102
+ <div style="display:flex; align-items:center; min-height:34px;">
103
+
104
+ <div style="">
105
+ {{props.data.text}}
106
+ </div>
107
+
108
+ </div>
109
+ <div style="position:absolute; top:5px; right:15px;">
110
+
111
+ <div style="margin-left:10px; display:inline-block;" v-if="editable">
112
+
113
+ <WButtonCircle
114
+ :icon="mdiEyeCheck"
115
+ :iconSize="18"
116
+ :paddingStyle="{v:4,h:4}"
117
+ :shadow="false"
118
+ :tooltip="$t('showChildren')"
119
+ :backgroundColor="'rgba(200,200,200,0.2)'"
120
+ :backgroundColorHover="'rgba(255,150,100,0.2)'"
121
+ :backgroundColorFocus="'rgba(255,150,100,0.2)'"
122
+ :iconColor="'#444'"
123
+ :iconColorHover="'#EF6C00'"
124
+ :iconColorFocus="'#EF6C00'"
125
+ @click="treeToogleShowAndActive(props.data,true,'show')"
126
+ ></WButtonCircle>
127
+
128
+ <WButtonCircle
129
+ :icon="mdiEyeOff"
130
+ :iconSize="18"
131
+ :paddingStyle="{v:4,h:4}"
132
+ :shadow="false"
133
+ :tooltip="$t('hideChildren')"
134
+ :backgroundColor="'rgba(200,200,200,0.2)'"
135
+ :backgroundColorHover="'rgba(255,150,100,0.2)'"
136
+ :backgroundColorFocus="'rgba(255,150,100,0.2)'"
137
+ :iconColor="'#444'"
138
+ :iconColorHover="'#EF6C00'"
139
+ :iconColorFocus="'#EF6C00'"
140
+ @click="treeToogleShowAndActive(props.data,false,'show')"
141
+ ></WButtonCircle>
142
+
143
+ <WButtonCircle
144
+ :icon="mdiEyedropper"
145
+ :iconSize="18"
146
+ :paddingStyle="{v:4,h:4}"
147
+ :shadow="false"
148
+ :tooltip="$t('activateChildren')"
149
+ :backgroundColor="'rgba(200,200,200,0.2)'"
150
+ :backgroundColorHover="'rgba(255,150,100,0.2)'"
151
+ :backgroundColorFocus="'rgba(255,150,100,0.2)'"
152
+ :iconColor="'#444'"
153
+ :iconColorHover="'#EF6C00'"
154
+ :iconColorFocus="'#EF6C00'"
155
+ @click="treeToogleShowAndActive(props.data,true,'active')"
156
+ ></WButtonCircle>
157
+
158
+ <WButtonCircle
159
+ :icon="mdiEyedropperOff"
160
+ :iconSize="18"
161
+ :paddingStyle="{v:4,h:4}"
162
+ :shadow="false"
163
+ :tooltip="$t('deactivateChildren')"
164
+ :backgroundColor="'rgba(200,200,200,0.2)'"
165
+ :backgroundColorHover="'rgba(255,150,100,0.2)'"
166
+ :backgroundColorFocus="'rgba(255,150,100,0.2)'"
167
+ :iconColor="'#444'"
168
+ :iconColorHover="'#EF6C00'"
169
+ :iconColorFocus="'#EF6C00'"
170
+ @click="treeToogleShowAndActive(props.data,false,'active')"
171
+ ></WButtonCircle>
172
+
173
+ </div>
174
+
175
+ <div style="margin-left:10px; display:inline-block;">
176
+ <div style="display:flex; align-items:center;">
177
+ <div style="margin-right:3px; font-size:0.8rem;">{{$t('show')}}</div>
178
+ <WCheckbox
179
+ :checkedIconColor="'yellow darken-4'"
180
+ :uncheckedIconColor="'yellow darken-4'"
181
+ :value="getShow(props.data)"
182
+ :editable="editable"
183
+ @input="toogleShow(props.data)"
184
+ ></WCheckbox>
185
+ </div>
186
+ </div>
187
+
188
+ <div style="margin-left:10px; display:inline-block;">
189
+ <div style="display:flex; align-items:center;">
190
+ <div style="margin-right:3px; font-size:0.8rem;">{{$t('active')}}</div>
191
+ <WCheckbox
192
+ :checkedIconColor="'yellow darken-4'"
193
+ :uncheckedIconColor="'yellow darken-4'"
194
+ :value="getActive(props.data)"
195
+ :editable="editable"
196
+ @input="toogleActive(props.data)"
197
+ ></WCheckbox>
198
+ </div>
199
+ </div>
200
+
201
+ </div>
202
+ </template>
203
+ >
204
+ </WTree>
205
+
206
+ </div>
207
+ </template>
208
+
209
+ <script>
210
+ import { mdiEyeCheck, mdiEyeOff, mdiEyedropper, mdiEyedropperOff } from '@mdi/js/mdi.js'
211
+ import JSON5 from 'json5'
212
+ import get from 'lodash-es/get.js'
213
+ import set from 'lodash-es/set.js'
214
+ import each from 'lodash-es/each.js'
215
+ import size from 'lodash-es/size.js'
216
+ import cloneDeep from 'lodash-es/cloneDeep.js'
217
+ import iseobj from 'wsemi/src/iseobj.mjs'
218
+ import isobj from 'wsemi/src/isobj.mjs'
219
+ import isestr from 'wsemi/src/isestr.mjs'
220
+ import haskey from 'wsemi/src/haskey.mjs'
221
+ import debounce from 'wsemi/src/debounce.mjs'
222
+ import WButtonCircle from 'w-component-vue/src/components/WButtonCircle.vue'
223
+ import WTree from 'w-component-vue/src/components/WTree.vue'
224
+ import WCheckbox from 'w-component-vue/src/components/WCheckbox.vue'
225
+ import WText from 'w-component-vue/src/components/WText.vue'
226
+ import { getTreeBlocks } from '../plugins/mShare.mjs'
227
+
228
+
229
+ export default {
230
+ components: {
231
+ WButtonCircle,
232
+ WTree,
233
+ WCheckbox,
234
+ WText,
235
+ },
236
+ props: {
237
+ height: {
238
+ type: Number,
239
+ default: 100,
240
+ },
241
+ group: {
242
+ type: Object,
243
+ default: () => {},
244
+ },
245
+ showHead: {
246
+ type: Boolean,
247
+ default: true,
248
+ },
249
+ editable: {
250
+ type: Boolean,
251
+ default: false,
252
+ },
253
+ },
254
+ data: function() {
255
+ return {
256
+ dbc: debounce(),
257
+
258
+ mdiEyeCheck,
259
+ mdiEyeOff,
260
+ mdiEyedropper,
261
+ mdiEyedropperOff,
262
+
263
+ headHeight: 100,
264
+
265
+ groupTrans: null,
266
+
267
+ }
268
+ },
269
+ computed: {
270
+
271
+ changeGroup: function() {
272
+ // console.log('computed changeGroup')
273
+
274
+ let vo = this
275
+
276
+ //save
277
+ let group = cloneDeep(vo.group)
278
+
279
+ //save rules
280
+ let rules = JSON5.parse(group.crules)
281
+ group.rules = rules
282
+ // console.log('rules', rules)
283
+
284
+ //delete
285
+ delete group.crules
286
+
287
+ //save
288
+ vo.groupTrans = group
289
+ // console.log('group', group)
290
+
291
+ return ''
292
+ },
293
+
294
+ treeHeight: function() {
295
+ let vo = this
296
+
297
+ //h
298
+ let h = vo.height - vo.headHeight
299
+ h = Math.max(h, 0)
300
+
301
+ return h
302
+ },
303
+
304
+ targets: function() {
305
+ return get(this, `$store.state.targets`)
306
+ },
307
+
308
+ treeBlocks: function() {
309
+ // console.log('computed treeBlocks')
310
+
311
+ let vo = this
312
+
313
+ //check
314
+ if (size(vo.targets) === 0) {
315
+ return null
316
+ }
317
+
318
+ //getTreeBlocks
319
+ let r = getTreeBlocks(vo.targets)
320
+
321
+ return r
322
+ },
323
+
324
+ defaultShow: function() {
325
+ let r = get(this.groupTrans, 'rules.___all___.show', 'n')
326
+ return r === 'y'
327
+ },
328
+
329
+ defaultActive: function() {
330
+ let r = get(this.groupTrans, 'rules.___all___.active', 'n')
331
+ return r === 'y'
332
+ },
333
+
334
+ },
335
+ methods: {
336
+
337
+ resizeHead: function(msg) {
338
+ // console.log('methods resizeHead', msg)
339
+
340
+ let vo = this
341
+
342
+ //headHeight
343
+ vo.headHeight = msg.snew.offsetHeight
344
+
345
+ },
346
+
347
+ getName: function(g) {
348
+ // console.log('methods getName', g)
349
+
350
+ //r
351
+ let r = get(g, 'name', '')
352
+
353
+ //check
354
+ if (!isestr(r)) {
355
+ r = '無名稱'
356
+ }
357
+
358
+ return r
359
+ },
360
+
361
+ getDescription: function(g) {
362
+ // console.log('methods getDescription', g)
363
+
364
+ //r
365
+ let r = get(g, 'description', '')
366
+
367
+ //check
368
+ if (!isestr(r)) {
369
+ r = '無說明'
370
+ }
371
+
372
+ return r
373
+ },
374
+
375
+ setDefaultShow: function(b) {
376
+ let r = b ? 'y' : 'n'
377
+ return set(this.groupTrans, 'rules.___all___.show', r)
378
+ },
379
+
380
+ setDefaultActive: function(b) {
381
+ let r = b ? 'y' : 'n'
382
+ return set(this.groupTrans, 'rules.___all___.active', r)
383
+ },
384
+
385
+ getShowAndActive: function(item, key, def) {
386
+ // console.log('getShowAndActive', item, key, def)
387
+
388
+ let vo = this
389
+
390
+ //rules
391
+ let rules = get(vo.groupTrans, 'rules', null)
392
+
393
+ //rule
394
+ let rule = null
395
+ if (haskey(rules, item.id)) {
396
+ rule = rules[item.id]
397
+ }
398
+
399
+ //r
400
+ let r = get(rule, key, null)
401
+ // console.log(item.id, r, def)
402
+
403
+ //b
404
+ let b = def
405
+ if (r === 'y' || r === 'n') { //若權限內有定義則優先使用(覆蓋)
406
+ b = r === 'y'
407
+ }
408
+
409
+ return b
410
+ },
411
+
412
+ getShow: function(item) {
413
+ // console.log('getShow', item)
414
+
415
+ let vo = this
416
+
417
+ //def
418
+ let def = vo.defaultShow
419
+
420
+ //getShowAndActive
421
+ let b = vo.getShowAndActive(item, 'show', def)
422
+
423
+ return b
424
+ },
425
+
426
+ getActive: function(item) {
427
+ // console.log('getActive', item)
428
+
429
+ let vo = this
430
+
431
+ //def
432
+ let def = vo.defaultActive
433
+
434
+ //getShowAndActive
435
+ let b = vo.getShowAndActive(item, 'active', def)
436
+
437
+ return b
438
+ },
439
+
440
+ getDefaultShowAndActive: function(key) {
441
+ if (key === 'show') {
442
+ return this.defaultShow
443
+ }
444
+ return this.defaultActive
445
+ },
446
+
447
+ toogleShowAndActive: function(id, b, key) {
448
+ // console.log('toogleShowAndActive', id, b, key)
449
+
450
+ let vo = this
451
+
452
+ //def
453
+ let def = vo.getDefaultShowAndActive(key)
454
+
455
+ //groupTrans
456
+ let groupTrans = cloneDeep(vo.groupTrans)
457
+
458
+ //cb
459
+ let cb = b ? 'y' : 'n'
460
+
461
+ //rules
462
+ let rules = get(vo.groupTrans, 'rules', null)
463
+
464
+ //rule
465
+ let rule = null
466
+ if (haskey(rules, id)) {
467
+ rule = rules[id]
468
+ }
469
+
470
+ //r
471
+ let r = get(rule, key, null)
472
+
473
+ //toogle
474
+ if (r === 'y' || r === 'n') { //若權限內有定義則優先使用(覆蓋)
475
+ // console.log('權限內有定義')
476
+
477
+ //check
478
+ if (b === def) { //欲切換值與預設值相同
479
+
480
+ //delete
481
+ delete rule[key]
482
+
483
+ }
484
+ else {
485
+
486
+ //save rule
487
+ rule[key] = cb
488
+
489
+ }
490
+
491
+ }
492
+ else {
493
+ // console.log('權限內無定義')
494
+
495
+ //check
496
+ if (b === def) { //欲切換值與預設值相同, 不變更
497
+ // console.log('不變更')
498
+ }
499
+ else {
500
+
501
+ //save rule
502
+ if (isobj(rule)) {
503
+ rule[key] = cb
504
+ }
505
+ else {
506
+ rule = {
507
+ [key]: cb,
508
+ }
509
+ }
510
+
511
+ }
512
+
513
+ }
514
+
515
+ //check
516
+ if (iseobj(rule)) {
517
+
518
+ //save rule
519
+ groupTrans.rules[id] = rule
520
+
521
+ }
522
+ else {
523
+
524
+ //delete rule
525
+ delete groupTrans.rules[id]
526
+
527
+ }
528
+
529
+ //save groupTrans
530
+ vo.groupTrans = groupTrans
531
+ // console.log('groupTrans', cloneDeep(vo.groupTrans))
532
+
533
+ //emitGroupDebounce
534
+ vo.emitGroupDebounce()
535
+
536
+ },
537
+
538
+ toogleShow: function(item) {
539
+ // console.log('toogleShow', item)
540
+
541
+ let vo = this
542
+
543
+ //check
544
+ if (!vo.editable) {
545
+ return
546
+ }
547
+
548
+ //b
549
+ let b = !vo.getShow(item)
550
+
551
+ //toogleShowAndActive
552
+ vo.toogleShowAndActive(item.id, b, 'show')
553
+
554
+ },
555
+
556
+ toogleActive: function(item) {
557
+ // console.log('toogleActive', item)
558
+
559
+ let vo = this
560
+
561
+ //check
562
+ if (!vo.editable) {
563
+ return
564
+ }
565
+
566
+ //b
567
+ let b = !vo.getActive(item)
568
+
569
+ //toogleShowAndActive
570
+ vo.toogleShowAndActive(item.id, b, 'active')
571
+
572
+ },
573
+
574
+ treeToogleShowAndActive: function(item, b, key) {
575
+ // console.log('treeToogleShowAndActive', item, b, key)
576
+
577
+ let vo = this
578
+
579
+ //self
580
+ vo.toogleShowAndActive(item.id, b, key)
581
+
582
+ //children
583
+ each(item.children, (v) => {
584
+ vo.treeToogleShowAndActive(v, b, key)
585
+ })
586
+
587
+ },
588
+
589
+ updateProp: function(key, value) {
590
+ // console.log('methods updateProp', key, value)
591
+
592
+ let vo = this
593
+
594
+ //groupTrans
595
+ let groupTrans = cloneDeep(vo.groupTrans)
596
+
597
+ //save value
598
+ groupTrans[key] = value
599
+
600
+ //save groupTrans
601
+ vo.groupTrans = groupTrans
602
+ // console.log('groupTrans', cloneDeep(vo.groupTrans))
603
+
604
+ //emitGroupDebounce
605
+ vo.emitGroupDebounce()
606
+
607
+ },
608
+
609
+ emitGroupDebounce: function() {
610
+ //console.log('methods emitGroupDebounce')
611
+
612
+ let vo = this
613
+
614
+ //dbc
615
+ vo.dbc(() => {
616
+
617
+ //emitGroup
618
+ vo.emitGroup()
619
+
620
+ })
621
+
622
+ },
623
+
624
+ emitGroup: function() {
625
+ //console.log('methods emitGroup')
626
+
627
+ let vo = this
628
+
629
+ //groupTrans
630
+ let groupTrans = cloneDeep(vo.groupTrans)
631
+
632
+ //save crules
633
+ groupTrans.crules = JSON.stringify(vo.groupTrans.rules)
634
+
635
+ //emit
636
+ vo.$emit('update', groupTrans)
637
+
638
+ },
639
+
640
+ }
641
+ }
642
+ </script>
643
+
644
+ <style scoped>
645
+ </style>