gnui 1.1.8 → 1.2.12

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 (105) hide show
  1. package/@types/gnui.d.ts +202 -154
  2. package/README.md +9 -3
  3. package/assets/NotoSansKR-Black.otf +0 -0
  4. package/assets/NotoSansKR-Black.woff +0 -0
  5. package/assets/NotoSansKR-Black.woff2 +0 -0
  6. package/assets/NotoSansKR-Bold.otf +0 -0
  7. package/assets/NotoSansKR-Bold.woff +0 -0
  8. package/assets/NotoSansKR-Bold.woff2 +0 -0
  9. package/assets/NotoSansKR-DemiLight.otf +0 -0
  10. package/assets/NotoSansKR-DemiLight.woff +0 -0
  11. package/assets/NotoSansKR-DemiLight.woff2 +0 -0
  12. package/assets/NotoSansKR-Light.otf +0 -0
  13. package/assets/NotoSansKR-Light.woff +0 -0
  14. package/assets/NotoSansKR-Light.woff2 +0 -0
  15. package/assets/NotoSansKR-Medium.otf +0 -0
  16. package/assets/NotoSansKR-Medium.woff +0 -0
  17. package/assets/NotoSansKR-Medium.woff2 +0 -0
  18. package/assets/NotoSansKR-Regular.otf +0 -0
  19. package/assets/NotoSansKR-Regular.woff +0 -0
  20. package/assets/NotoSansKR-Regular.woff2 +0 -0
  21. package/assets/NotoSansKR-Thin.otf +0 -0
  22. package/assets/NotoSansKR-Thin.woff +0 -0
  23. package/assets/NotoSansKR-Thin.woff2 +0 -0
  24. package/assets/{LICENSE_OFL.txt → OFL.txt} +93 -92
  25. package/assets/images/flags.png +0 -0
  26. package/package.json +53 -37
  27. package/assets/NotoSansCJKkr-Black.otf +0 -0
  28. package/assets/NotoSansCJKkr-Bold.otf +0 -0
  29. package/assets/NotoSansCJKkr-DemiLight.otf +0 -0
  30. package/assets/NotoSansCJKkr-Light.otf +0 -0
  31. package/assets/NotoSansCJKkr-Medium.otf +0 -0
  32. package/assets/NotoSansCJKkr-Regular.otf +0 -0
  33. package/assets/NotoSansCJKkr-Thin.otf +0 -0
  34. package/assets/NotoSansMonoCJKkr-Bold.otf +0 -0
  35. package/assets/NotoSansMonoCJKkr-Regular.otf +0 -0
  36. package/assets/README +0 -11
  37. package/dist/js/gnui.esm.js +0 -22174
  38. package/dist/js/gnui.js +0 -22473
  39. package/dist/js/gnui.min.js +0 -1
  40. package/dist/styles/default.css +0 -3
  41. package/dist/styles/gpi.css +0 -3
  42. package/dist/styles/insights.css +0 -3
  43. package/dist/styles/nac.css +0 -3
  44. package/dist/styles/zt-nac.css +0 -3
  45. package/styleguide/assets/components.js +0 -1280
  46. package/styleguide/assets/guide.js +0 -45
  47. package/styleguide/assets/image.png +0 -0
  48. package/styleguide/assets/okadia.css +0 -124
  49. package/styleguide/assets/theme.css +0 -506
  50. package/styleguide/category/COLOR/index.html +0 -158
  51. package/styleguide/category/COMPONENT/Alert(js)/index.html +0 -421
  52. package/styleguide/category/COMPONENT/Bignumber/index.html +0 -273
  53. package/styleguide/category/COMPONENT/Breadcrumb/index.html +0 -328
  54. package/styleguide/category/COMPONENT/Calendar(js)/index.html +0 -239
  55. package/styleguide/category/COMPONENT/Card/index.html +0 -188
  56. package/styleguide/category/COMPONENT/Chart(js)/index.html +0 -558
  57. package/styleguide/category/COMPONENT/Datagrid(js)/index.html +0 -545
  58. package/styleguide/category/COMPONENT/Growl(js)/index.html +0 -288
  59. package/styleguide/category/COMPONENT/JsonView(js)/index.html +0 -829
  60. package/styleguide/category/COMPONENT/Message(js)/index.html +0 -391
  61. package/styleguide/category/COMPONENT/Modal(js)/index.html +0 -410
  62. package/styleguide/category/COMPONENT/Pagination/index.html +0 -352
  63. package/styleguide/category/COMPONENT/Panel/index.html +0 -309
  64. package/styleguide/category/COMPONENT/Progressbar(js)/index.html +0 -316
  65. package/styleguide/category/COMPONENT/Tab(js)/index.html +0 -444
  66. package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +0 -261
  67. package/styleguide/category/COMPONENT/Time(js)/index.html +0 -244
  68. package/styleguide/category/COMPONENT/Tooltip(js)/index.html +0 -317
  69. package/styleguide/category/COMPONENT/Tree(js)/index.html +0 -401
  70. package/styleguide/category/CONTROLS/Button(js)/index.html +0 -440
  71. package/styleguide/category/CONTROLS/Checkbox/index.html +0 -198
  72. package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +0 -209
  73. package/styleguide/category/CONTROLS/Datepicker(js)/index.html +0 -260
  74. package/styleguide/category/CONTROLS/Dropdown(js)/index.html +0 -1033
  75. package/styleguide/category/CONTROLS/File/index.html +0 -316
  76. package/styleguide/category/CONTROLS/Form/Control/index.html +0 -231
  77. package/styleguide/category/CONTROLS/Form/Field/index.html +0 -258
  78. package/styleguide/category/CONTROLS/Form/Plain/index.html +0 -197
  79. package/styleguide/category/CONTROLS/Input/index.html +0 -334
  80. package/styleguide/category/CONTROLS/MenuButton(js)/index.html +0 -257
  81. package/styleguide/category/CONTROLS/MultiText(js)/index.html +0 -260
  82. package/styleguide/category/CONTROLS/Picklist(js)/index.html +0 -699
  83. package/styleguide/category/CONTROLS/Radio/index.html +0 -201
  84. package/styleguide/category/CONTROLS/Select/index.html +0 -442
  85. package/styleguide/category/CONTROLS/SelectButton(js)/index.html +0 -236
  86. package/styleguide/category/CONTROLS/Slider/index.html +0 -193
  87. package/styleguide/category/CONTROLS/Switch(js)/index.html +0 -333
  88. package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +0 -483
  89. package/styleguide/category/CONTROLS/Textarea/index.html +0 -189
  90. package/styleguide/category/ELEMENTS/Box/index.html +0 -167
  91. package/styleguide/category/ELEMENTS/Icon/index.html +0 -265
  92. package/styleguide/category/ELEMENTS/Image/index.html +0 -213
  93. package/styleguide/category/ELEMENTS/List/index.html +0 -396
  94. package/styleguide/category/ELEMENTS/Table/index.html +0 -483
  95. package/styleguide/category/ELEMENTS/Tag/index.html +0 -255
  96. package/styleguide/category/ELEMENTS/Title/index.html +0 -186
  97. package/styleguide/category/LAYOUT/Container/index.html +0 -235
  98. package/styleguide/category/LAYOUT/Grid/index.html +0 -400
  99. package/styleguide/category/LAYOUT/Splitter(js)/index.html +0 -278
  100. package/styleguide/category/UTILITY/index.html +0 -367
  101. package/styleguide/category/Utils/index.html +0 -305
  102. package/styleguide/color.html +0 -168
  103. package/styleguide/index.html +0 -168
  104. package/styleguide/tag/javascript/index.html +0 -6224
  105. package/styleguide/tag/v.0.1.0/index.html +0 -10807
@@ -1,1280 +0,0 @@
1
-
2
- var components = {
3
- Alert: function(){
4
- Gn.create('button', {
5
- target: '.new-alert',
6
- onClick: function(){
7
- Gn.create('alert', {
8
- textSets : { alertText: 'alert이 생성됩니다.'},
9
- hasClose: false,
10
- hasConfirm: true,
11
- hasCancel: true,
12
- onConfirm: function(){
13
- console.log('확인 되었습니다.');
14
- },
15
- onClose: function(){
16
- console.log('취소 되었습니다.');
17
- }
18
- });
19
- }
20
- });
21
- },
22
- Button: function(){
23
- Gn.create('button', {
24
- target: 'button[name=new-button]',
25
- size: 'medium',
26
- icon: 'home',
27
- onClick: function(){
28
- console.log('버튼을 클릭했습니다.');
29
- }
30
- });
31
- },
32
- Calendar: function(){
33
- Gn.create('calendar', {
34
- target: '.new-calendar',
35
- value: '2021-04-01',
36
- onSelect: function (v) {
37
- console.log('선택한 날짜: '+ v)
38
- },
39
- max: '2021-04-30',
40
- min: '2021-03-01'
41
- });
42
- Gn.create('calendar', {
43
- target: '.new-calendar1',
44
- onSelect: function (v) {
45
- console.log('선택한 날짜: '+ v)
46
- },
47
- dateType: 'datetime',
48
- max: '1M',
49
- min: '-1M'
50
- });
51
- },
52
- Chart: function(){
53
- let clickEvt = {
54
- dataPointSelection: function(event, chartContext, {seriesIndex, dataPointIndex, w}) {
55
- console.log(w.config.series)
56
- event && console.log('data', seriesIndex, dataPointIndex)
57
- },
58
- markerClick: function(event, chartContext, {seriesIndex, dataPointIndex, w}) {
59
- console.log(w.config.series[seriesIndex])
60
- console.log('marker', seriesIndex, dataPointIndex)
61
- }
62
- }
63
- Gn.create('chart', {
64
- target: '.lineChart',
65
- type: 'line',
66
- chart: {
67
- events: clickEvt
68
- },
69
- series: [{
70
- name: 'data1',
71
- data: [30, 200, 100, 400, 150, 250],
72
- },{
73
- name: 'data2',
74
- data: [50, 20, 10, 40, 15, 25]
75
- }],
76
- xaxis: {
77
- type: 'datetime',
78
- categories: ['2018-09-19T00:00:00.000Z', '2018-09-19T01:30:00.000Z', '2018-09-19T02:30:00.000Z', '2018-09-19T03:30:00.000Z', '2018-09-19T04:30:00.000Z', '2018-09-19T05:30:00.000Z']
79
- },
80
- width: '45%'
81
- });
82
- Gn.create('chart', {
83
- target: '.splineChart',
84
- type: 'spline',
85
- chart: {
86
- events: clickEvt
87
- },
88
- series: [{
89
- name: 'data1',
90
- data: [30, 200, 100, 400, 150, 250],
91
- }],
92
- xaxis: {
93
- type: 'datetime',
94
- categories: ['2018-09-19T00:00:00.000Z', '2018-09-19T01:30:00.000Z', '2018-09-19T02:30:00.000Z', '2018-09-19T03:30:00.000Z', '2018-09-19T04:30:00.000Z', '2018-09-19T05:30:00.000Z']
95
- },
96
- width: '45%'
97
- });
98
- Gn.create('chart', {
99
- target: '.columnChart',
100
- type: 'column',
101
- chart: {
102
- stacked: true,
103
- events: clickEvt
104
- },
105
- series: [{
106
- name: 'data1',
107
- data: [30, 200, 100, 400, 150, 250],
108
- },{
109
- name: 'data2',
110
- data: [50, 20, 10, 40, 15, 25]
111
- }],
112
- width: '45%'
113
- });
114
- Gn.create('chart', {
115
- target: '.barChart',
116
- type: 'bar',
117
- chart: {
118
- events: clickEvt
119
- },
120
- series: [{
121
- data: [30, 200, 100, 400, 150, 250],
122
- }],
123
- xaxis: {
124
- categories: ['data1','data2','data3','data4','data5','data6']
125
- },
126
- width: '45%'
127
- });
128
- Gn.create('chart', {
129
- target: '.pieChart',
130
- type: 'pie',
131
- chart: {
132
- events: clickEvt
133
- },
134
- series: [30, 200, 100, 400],
135
- labels: ['data1','data2','data3','data4']
136
- });
137
- Gn.create('chart', {
138
- target: '.donutChart',
139
- type: 'donut',
140
- chart: {
141
- events: clickEvt
142
- },
143
- series: [30, 200, 100, 400, 150, 250],
144
- labels: ['data1','data2','data3','data4','data5','data6']
145
- });
146
- Gn.create('chart', {
147
- target: '.gaugeChart',
148
- type: 'gauge',
149
- chart: {
150
- events: clickEvt
151
- },
152
- series: [30],
153
- labels: ['data1']
154
- });
155
- Gn.create('chart', {
156
- target: '.radialChart',
157
- type: 'radial',
158
- chart: {
159
- events: clickEvt
160
- },
161
- series: [30],
162
- labels: ['data1']
163
- });
164
- Gn.util.each(Gn.util.$$('.aigis-module > p'), function(_blank){
165
- Gn.util.remove(_blank)
166
- })
167
- },
168
- Colorpicker: function(){
169
- Gn.create('colorpicker', {
170
- target: '.colorPicker',
171
- size: 'large'
172
- });
173
- Gn.create('colorpicker', {
174
- target: '.colorPicker2',
175
- value: '#27290e'
176
- });
177
- },
178
- Datepicker: function(){
179
- Gn.create('datepicker', {
180
- target: '.new-datepicker',
181
- value: '',
182
- dateFormat: 'yyyy-MM-DD',
183
- min: '-1M',
184
- max: '1M',
185
- type: 'date'
186
- });
187
- Gn.create('datepicker', {
188
- target: '.new-datetimepicker',
189
- type: 'datetime',
190
- value: '2021-10-10 10:01:11',
191
- hasIcon: false
192
- });
193
- },
194
- Dropdown: function(){
195
- Gn.create('dropdown', {
196
- target: '.new-dropdown1',
197
- className: 'is-top',
198
- onChange: function(val, txt, values){
199
- console.log('선택된 값은 [ ' + val + ' ]입니다.')
200
- },
201
- width: '150px',
202
- value: 'item2,item5',
203
- type: 'opened',
204
- multiple: true,
205
- data: [
206
- { value: 'item1', text: '항목1' },
207
- { value: 'item2', text: '항목2' },
208
- { value: 'item3', text: '항목3' },
209
- { value: 'item4', text: '항목4' },
210
- { value: 'item5', text: '항목5' },
211
- { value: 'item6', text: '항목6' },
212
- { value: 'item7', text: '항목7' }
213
- ]
214
- });
215
- Gn.create('dropdown', {
216
- target: '.new-dropdown2',
217
- onChange: function(val, txt){
218
- console.log('선택된 항목은 [ ' + txt + ' ]입니다.')
219
- },
220
- textSets: {
221
- selectText: '골라라'
222
- },
223
- value: 'item2',
224
- hasSearch: true,
225
- color: 'danger'
226
- });
227
- Gn.create('dropdown', {
228
- target: '.new-dropdown3',
229
- data: [
230
- { value: 'item1', text: '항목1' },
231
- { value: 'item2', text: '항목2' },
232
- { value: 'item3', text: '항목3' },
233
- { value: 'item4', text: '항목4' },
234
- { value: 'item5', text: '항목5', html: '<p><strong>text</strong>가 있는 항목은 선택 시 <u>text</u>로 대체됩니다.</p>' },
235
- { value: 'item6', html: '<p><strong>text</strong>가 없는 항목은 <u>선택</u>할 수 없습니다.</p>' }
236
- ],
237
- width: 150,
238
- scrollHeight: 100
239
- });
240
- Gn.create('dropdown', {
241
- target: '.new-dropdown4',
242
- data: [
243
- [
244
- { value: 'item1', text: 'Group1-항목1' },
245
- { value: 'item2', text: 'Group1-항목2' },
246
- { value: 'item3', text: 'Group1-항목3' }
247
- ],[
248
- { value: 'item4', text: 'Group2-항목4' },
249
- { value: 'item5', text: 'Group2-항목5' }
250
- ]
251
- ]
252
- });
253
- },
254
- Datagrid: function(){
255
- Gn.create('datagrid', {
256
- target: '.new-grid',
257
- headers: [{
258
- label: 'no',
259
- key: 'number',
260
- onSelect: function(){
261
- console.log(arguments)
262
- },
263
- template: function(k, d) {
264
- return '<span>'+d[k]+'</span>'
265
- },
266
- draggable: true,
267
- sortable: true,
268
- sort: 'asc'
269
- }, {
270
- label: '제목',
271
- key: 'title',
272
- style: {
273
- width: '250px'
274
- },
275
- className: 'has-text-right',
276
- draggable: true,
277
- bodyClass: 'has-text-left',
278
- sortable: true
279
- }, {
280
- label: '날짜',
281
- key: 'date',
282
- style: {
283
- width: '150px'
284
- },
285
- className: 'has-text-center',
286
- bodyClass: 'has-text-left',
287
- }],
288
- data:[{
289
- number: '1',
290
- title: '하나',
291
- date: '2020-09-19',
292
- desc: 'hello, world',
293
- child : [{
294
- number: '1-1',
295
- title: '1-하나',
296
- date: '2020-09-19'
297
- }, {
298
- number: '1-2',
299
- title: '1-둘',
300
- date: '2020-09-19',
301
- desc: 'hello, world',
302
- child: [{
303
- number: '1-2-1',
304
- title: '1-둘-1',
305
- date: '2020-09-19',
306
- desc: 'hello, world',
307
- child: [{
308
- number: '1-2-1-1',
309
- title: '1-둘-1-1',
310
- desc: 'hello, world',
311
- date: '2020-09-19'
312
- }]
313
- }]
314
- }]
315
- }, {
316
- number: '2',
317
- title: '둘',
318
- date: '2020-09-19',
319
- desc: 'hello, world'
320
- }],
321
- onSort: function(column){
322
- console.log('column',column);
323
- },
324
- onDragEnd: function(col, position){
325
- console.log(col, position)
326
- },
327
- onToggle: function(type, row, n){
328
- /* console.log(type, row, n)
329
- // 이렇게 하면 펼쳐질때마다 해당 로우에 2개의 자식을 바인딩한다.
330
- type === 'expanded' && this.addChild(n, [{
331
- number: '000',
332
- title: '추가된 자식1',
333
- date: '2020-02-02'
334
- },{
335
- number: '001',
336
- title: '추가된 자식2',
337
- date: '2020-02-02'
338
- }]) */
339
- },
340
- onCheckAll: function(ggg){
341
- console.log('ggg',ggg)
342
- },
343
- onDoubleClick: function(e){
344
- console.log('dbclick', e)
345
- },
346
- hasCheck: true
347
- });
348
- Gn.create('datagrid', {
349
- target: '.new-grid2',
350
- headers: [{
351
- label: 'row data numbers',
352
- key: 'number',
353
- style: { width: '50px'},
354
- sortable: true,
355
- draggable: true
356
- }, {
357
- label: '제목',
358
- key: 'title',
359
- sortable: true,
360
- draggable: true
361
- }, {
362
- label: '날짜를 표시하는 컬럼입니다',
363
- key: 'date',
364
- style: {
365
- width: '100px'
366
- },
367
- tipField: 'desc'
368
- }, {
369
- label: '헤더명도길어집니다',
370
- key: 'desc',
371
- style: { width: '50px' }
372
- }],
373
- data:[
374
- {
375
- number: '1',
376
- title: '하나',
377
- date: '2020-09-19'
378
- }, {
379
- number: '232342333',
380
- title: 'Lorem labore culpa voluptate proident ad et id nostrud excepteur incididunt ut officia et ullamco.',
381
- date: '2020-09-19',
382
- desc: 'Voluptate enim culpa anim dolor magna excepteur ullamco id aliquip consequat ullamco voluptate consectetur.'
383
- },{
384
- number: '1',
385
- title: '하나',
386
- date: '2020-09-19'
387
- }, {
388
- number: '232342333',
389
- title: 'Lorem labore culpa voluptate proident ad et id nostrud excepteur incididunt ut officia et ullamco.',
390
- date: '2020-09-19',
391
- desc: 'Voluptate enim culpa anim dolor magna excepteur ullamco id aliquip consequat ullamco voluptate consectetur.'
392
- },{
393
- number: '1',
394
- title: '하나',
395
- date: '2020-09-19'
396
- }, {
397
- number: '232342333',
398
- title: 'Lorem labore culpa voluptate proident ad et id nostrud excepteur incididunt ut officia et ullamco.Lorem labore culpa voluptate proident ad et id nostrud excepteur incididunt ut officia et ullamco.',
399
- date: '2020-09-19',
400
- desc: 'Voluptate enim culpa anim dolor magna excepteur ullamco id aliquip consequat ullamco voluptate consectetur.'
401
- },{
402
- number: '1',
403
- title: '하나',
404
- date: '2020-09-19'
405
- }, {
406
- number: '232342333',
407
- title: 'Lorem labore culpa voluptate proident ad et id nostrud excepteur incididunt ut officia et ullamco.',
408
- date: '2020-09-19',
409
- desc: 'Voluptate enim culpa anim dolor magna excepteur ullamco id aliquip consequat ullamco voluptate consectetur.'
410
- },{
411
- number: '1',
412
- title: '하나',
413
- date: '2020-09-19'
414
- }, {
415
- number: '232342333',
416
- title: 'Lorem labore culpa voluptate proident ad et id nostrud excepteur incididunt ut officia et ullamco.',
417
- date: '2020-09-19',
418
- desc: 'Voluptate enim culpa anim dolor magna excepteur ullamco id aliquip consequat ullamco voluptate consectetur.'
419
- }
420
- ],
421
- sort: function(column){
422
- console.log('column',column);
423
- },
424
- onSelect: function(row, index){
425
- console.log('row',row, index)
426
- },
427
- onDoubleClick: function(e){
428
- console.log('dbclick', e)
429
- },
430
- isEllipsis: true,
431
- hasCheck: true,
432
- fixHeader: true
433
- })
434
- },
435
- Growl: function() {
436
- Gn.create('button', {
437
- target: '.new-growl1',
438
- onClick: function(){
439
- Gn.create('growl', {
440
- textSets : {message: '메세지가 생성됩니다!'},
441
- duration: 3000,
442
- positionX: 'right',
443
- positionY: 'top',
444
- color: 'danger'
445
- });
446
- }
447
- });
448
- Gn.create('button', {
449
- target: '.new-growl2',
450
- onClick: function(){
451
- Gn.create('growl', {
452
- textSets : {message: '메세지가 생성됩니다!'},
453
- duration: 3000
454
- });
455
- }
456
- });
457
- },
458
- JsonView: function(){
459
- Gn.create('jsonview', {
460
- target: '.new-jsonview',
461
- schema: {
462
- Type: "object",
463
- Disp: "aws sample 정보",
464
- Description: "aws sample 정보 설명",
465
- Properties: {
466
- _id : {
467
- Type: "string",
468
- Disp: "인스턴스ID",
469
- Description: "인스턴스ID입니다."
470
- },
471
- _type: {
472
- Type: "string",
473
- Disp: "수집기타입"
474
- },
475
- test1: {
476
- Type: "number",
477
- Disp: "Test1 Value"
478
- },
479
- test2: {
480
- Type: "number",
481
- Disp: "Test2 Value"
482
- },
483
- updated: {
484
- Type: "datetime",
485
- Disp: '마지막 업데이트'
486
- },
487
- nodes: {
488
- Type: "object",
489
- Disp: "노드정보",
490
- Properties: {
491
- obj1: {
492
- Type: "string",
493
- Disp: "obj1"
494
- },
495
- obj2: {
496
- Type: "integer",
497
- Disp: "obj2"
498
- }
499
- }
500
- },
501
- datas: {
502
- $ref: '#/$defs/Datas'
503
- }
504
- },
505
- $defs: {
506
- Datas: {
507
- Type: "array",
508
- Disp: "추가 데이터 정보",
509
- Items: {
510
- Type: "object",
511
- Properties: {
512
- field1: {
513
- Type: "string",
514
- Disp: '필드 1',
515
- RefURL: 'https://search.naver.com/search.naver?query={{parent.field2}}'
516
- },
517
- field2: {
518
- Type: "number"
519
- },
520
- datas: {
521
- Type: ["array","string"],
522
- Items: {
523
- Type: "object",
524
- Properties: {
525
- id: {
526
- Type: 'number',
527
- Disp: null
528
- },
529
- text: {
530
- Type: 'string',
531
- Disp: null
532
- }
533
- }
534
- }
535
- }
536
- }
537
- }
538
- }
539
- },
540
- Required: ['_id', '_type'],
541
- Hidden: ['test1', 'test2']
542
- },
543
- data: {
544
- _id: 'd3185f78-7221-103a-8002-0272452c0706',
545
- _type: 'aws',
546
- test1: 1234,
547
- test2: 1231.23,
548
- updated: 1603427314109,
549
- nodes : {
550
- obj1: 'value',
551
- obj2: 123
552
- },
553
- datas: [
554
- {
555
- field1: 'test1',
556
- field2: 123,
557
- datas: [
558
- {
559
- id:1,
560
- text: 'data1'
561
- },{
562
- id:2,
563
- text: 'data2'
564
- }
565
- ]
566
- },
567
- {
568
- field1: 'test2',
569
- field2: 321,
570
- datas: [
571
- {
572
- id: 1,
573
- text: 'data3'
574
- },{
575
- id: 2,
576
- text: 'data4'
577
- }
578
- ]
579
- },
580
- {
581
- field1: 'test2',
582
- field2: 321,
583
- datas: "just text"
584
- }
585
- ]
586
- }
587
- });
588
- Gn.create('jsonview', {
589
- target: '.new-rawview',
590
- data: '{"_id": "d3185f78-7221-103a-8002-0272452c0706","_type": "aws","test1": 1234,"test2": 1231.23,"nodes" : {"obj1":"value","obj2":123},"datas": [{"field1":"test1","field2":123,"datas":["data1","data2"]},{"field1":"test2","field2":321,"datas":["data3","data4"]}]}'
591
- });
592
- Gn.create('jsonview', {
593
- target: '.add-jsonview',
594
- schema: {
595
- Type: "array",
596
- Items: {
597
- Type: 'object',
598
- Properties: {
599
- bignum: {
600
- Type: "bignumber"
601
- }
602
- }
603
- }
604
- },
605
- data: [{
606
- bignum: {
607
- CPU: 23.34,
608
- RAM: {
609
- value: 26,
610
- data: [0, 23, 33, 0]
611
- }
612
- }
613
- }]
614
- });
615
- Gn.create('jsonview', {
616
- target: '.type-string',
617
- schema: {
618
- Type: 'string',
619
- RefURL: 'http://www.genians.com',
620
- Target: '_blank'
621
- },
622
- data: '다람쥐 헌 쳇바퀴'
623
- });
624
- Gn.create('jsonview', {
625
- target: '.type-number',
626
- schema: {
627
- Type: 'number'
628
- },
629
- data: 10001
630
- });
631
- Gn.create('jsonview', {
632
- target: '.type-byte',
633
- schema: {
634
- Type: 'byte'
635
- },
636
- data: 100000000
637
- });
638
- Gn.create('jsonview', {
639
- target: '.type-datetime',
640
- schema: {
641
- Type: 'datetime'
642
- },
643
- data: 1603427314109
644
- });
645
- Gn.create('jsonview', {
646
- target: '.type-html',
647
- schema: {
648
- Type: 'html'
649
- },
650
- data: '<img src="/styleguide/assets/image.png" alt="asset">'
651
- });
652
- Gn.create('jsonview', {
653
- target: '.type-array1',
654
- schema: {
655
- Type: 'array',
656
- Items: {
657
- Type: ['string','number'],
658
- RefURL: 'https://search.naver.com/search.naver?query={{data}}'
659
- }
660
- },
661
- data: ['빨강','주황','노랑','초록','파랑']
662
- });
663
- Gn.create('jsonview', {
664
- target: '.type-percent',
665
- schema: {
666
- Type: 'percent'
667
- },
668
- data: 52
669
- });
670
- Gn.create('jsonview', {
671
- target: '.type-bignumber',
672
- schema: {
673
- Type: 'bignumber'
674
- },
675
- data: {
676
- 온도: 24,
677
- 습도: {
678
- value: 60,
679
- data: [0,10,21,5,18]
680
- }
681
- }
682
- });
683
- Gn.create('jsonview', {
684
- target: '.type-chart',
685
- schema: {
686
- Type: 'chart'
687
- },
688
- data: {
689
- type: 'donut',
690
- series: [30, 200, 100],
691
- labels: ['data1','data2','data3']
692
- }
693
- });
694
- Gn.create('jsonview', {
695
- target: '.type-object',
696
- schema: {
697
- Type: 'object',
698
- Disp: '',
699
- Description: '',
700
- Properties: {
701
- 'data-string': {
702
- Type: 'string',
703
- Disp: '물품명',
704
- Description: 'product name'
705
- },
706
- 'data-number': {
707
- Type: 'number',
708
- Disp: '재고'
709
- },
710
- 'data-reorder': {
711
- Type: 'string',
712
- Disp: '재주문가능'
713
- }
714
- },
715
- Hidden: ['data-reorder']
716
- },
717
- data: {
718
- 'data-string': '부뚜막',
719
- 'data-number': 1489,
720
- 'data-reorder': 'false'
721
- }
722
- });
723
- Gn.create('jsonview', {
724
- target: '.type-array2',
725
- schema: {
726
- Type: 'array',
727
- Items: {
728
- Type: 'object',
729
- Properties: {
730
- '$["data-string"]': {
731
- Type: 'string',
732
- Disp: '물품명',
733
- Description: 'product name'
734
- },
735
- '$["data-number"]': {
736
- Type: 'number',
737
- Disp: '재고'
738
- }
739
- }
740
- }
741
- },
742
- data: [{
743
- 'data-string': '부뚜막',
744
- 'data-number': 1489
745
- },{
746
- 'data-string': '솥뚜껑',
747
- 'data-number': 34
748
- }]
749
- });
750
- Gn.create('jsonview', {
751
- target: '.path-key',
752
- schema: {
753
- Type: "array",
754
- Items: {
755
- Type: "object",
756
- Properties: {
757
- '$.COLLECTOR._id': {
758
- Type: "string",
759
- Disp: "인스턴스ID"
760
- },
761
- '$.COLLECTOR._type': {
762
- Type: "string",
763
- Disp: "타입"
764
- },
765
- '$.COLLECTOR.nodes.obj2': {
766
- Type: "number",
767
- Disp: "No"
768
- },
769
- '$.COLLECTOR.datas.datas': {
770
- $ref: '#/$defs/Datas'
771
- }
772
- }
773
- },
774
- $defs: {
775
- Datas: {
776
- Type: "array",
777
- Disp: "Datas",
778
- Items: {
779
- Type: "object",
780
- Properties: {
781
- field1: {
782
- Type: "string",
783
- Disp: '필드1'
784
- },
785
- field2: {
786
- Type: "number",
787
- Disp: '필드2'
788
- },
789
- field3: {
790
- Type: "string",
791
- Disp: '필드3'
792
- }
793
- }
794
- }
795
- }
796
- }
797
- },
798
- data: [{
799
- COLLECTOR: {
800
- _id: 'data-1-id',
801
- _type: 'collector',
802
- test1: 0,
803
- test2: 0,
804
- nodes: {
805
- obj1: '',
806
- obj2: 0
807
- },
808
- datas: {
809
- field1: 'data-1',
810
- field2: 0,
811
- datas: [{
812
- field1: 'data-1',
813
- field2: 0,
814
- field3: 'data-1'
815
- }, {
816
- field1: 'data-1',
817
- field2: 0,
818
- field3: 'data-1'
819
- }]
820
- }
821
- }
822
- }, {
823
- COLLECTOR: {
824
- _id: 'data-2-id',
825
- _type: 'collector',
826
- test1: 1,
827
- test2: 1,
828
- nodes: {
829
- obj1: '',
830
- obj2: 1
831
- },
832
- datas: {
833
- field1: 'data-2',
834
- field2: 1,
835
- datas: [{
836
- field1: 'data-2',
837
- field2: 1,
838
- field3: 'data-2'
839
- },{
840
- field1: 'data-2',
841
- field2: 1,
842
- field3: 'data-2'
843
- }]
844
- }
845
- }
846
- }]
847
- });
848
- },
849
- Message: function(){
850
- Gn.create('button', {
851
- target: '.new-message',
852
- onClick: function(){
853
- Gn.create('message', {
854
- target: '.page-message',
855
- textSets : {message: '메세지가 생성됩니다!'}
856
- });
857
- }
858
- });
859
- },
860
- MenuButton: function(){
861
- Gn.create('menubutton', {
862
- target: 'button[name=new-button]',
863
- size: 'normal',
864
- textSets:{
865
- buttonText: '메뉴버튼'
866
- },
867
- onSelect: function(menu){
868
- console.log('선택된 메뉴는 ' + menu );
869
- },
870
- data: [[{
871
- text: 'menu1',
872
- value: 'menu1'
873
- },{
874
- text: 'menu2',
875
- value: 'menu2'
876
- }],[{
877
- text: '환경설정',
878
- html: '<span class="gn-icon is-small"><i class="fas fa-cogs"></i>설정</span>',
879
- value: 'menu1'
880
- },{
881
- text: 'Exit',
882
- value: 'exit'
883
- }]]
884
- });
885
- Gn.create('menubutton', {
886
- target: 'button[name=new-button2]',
887
- style: 'simple',
888
- icon: 'list',
889
- data: [{
890
- text: 'menu1',
891
- value: 'menu1'
892
- },{
893
- text: 'menu2',
894
- value: 'menu2'
895
- }]
896
- });
897
- },
898
- Modal: function(){
899
- Gn.create('button', {
900
- target: '.new-modal',
901
- onClick: function(){
902
- Gn.create('modal', {
903
- textSets : { title: '새로운 모달' },
904
- hasConfirm: true,
905
- hasCancel: true,
906
- height: 600,
907
- onConfirm: function(){
908
- console.log('확인하였습니다.')
909
- },
910
- contents: '<ul class="gn-list is-medium"><li>Ad nisi excepteur nostrud in.</li><li>Commodo duis anim excepteur qui.</li><li>Centered Text</li></ul>'
911
- });
912
- }
913
- });
914
- Gn.create('button', {
915
- target: '.new-popup',
916
- onClick: function(){
917
- Gn.create('modal', {
918
- textSets : { title: '새로운 팝업' },
919
- contents: '<table class="gn-table is-full"><tr><td>1</td><td>2</td><td>3</td><td>4</td></tr><tr class="is-primary-light"><td>5</td><td>6</td><td class="is-primary">7</td><td>8</td></tr><tr><td>9</td><td>10</td><td>11</td><td>12</td></tr><tr><td>13</td><td>14</td><td>15</td><td>16</td></tr></table>',
920
- isModal: false,
921
- draggable: true,
922
- minimized: true,
923
- resizable: true
924
- });
925
- }
926
- });
927
- },
928
- MultiText: function(){
929
- Gn.create('multitext', {
930
- target: '.default-multitext'
931
- })
932
- Gn.create('multitext', {
933
- target: '.new-multitext',
934
- lang: ['en','ko','cn'],
935
- value: {
936
- en: 'hello',
937
- ko: '안녕하세요',
938
- cn: 'HELLO'
939
- },
940
- rows: 1,
941
- maxlength: 300
942
- })
943
- },
944
- Picklist: function(){
945
- Gn.create('picklist', {
946
- target: '.new-picklist',
947
- data : {
948
- source: [
949
- { value: 'item1', text: '항목1' },
950
- { value: 'item2', text: '항목2' },
951
- { value: 'item5', text: '항목3' },
952
- { value: 'item4', text: '항목4' },
953
- { value: 'item5', text: '항목5' },
954
- { value: 'item6', text: '항목6' },
955
- { value: 'item7', text: '항목7' },
956
- { value: 'item8', text: '항목8' }
957
- ],
958
- target: [],
959
- },
960
- width: '80%',
961
- height: 180,
962
- onChange: function(s,t){
963
- console.log(s, t)
964
- },
965
- orderable: 'target'
966
- });
967
- Gn.create('picklist', {
968
- target: '.new-picklist-v',
969
- data : {
970
- source: [
971
- { value: '항목1', text: 'item1' },
972
- { value: '항목2', text: 'item2' },
973
- { value: '항목3', text: 'item3' },
974
- { value: '항목4', text: 'item4' },
975
- { value: '항목5', text: 'item5' }
976
- ],
977
- target: []
978
- },
979
- direction: 'vertical',
980
- width: '500px',
981
- height: 150
982
- });
983
- },
984
- Progressbar: function(){
985
- Gn.create('progressbar', {
986
- target: '.new-progress-indeterminate',
987
- color: 'info',
988
- size: 'medium',
989
- indeterminate: true
990
- });
991
- var progress = Gn.create('progressbar', {
992
- target: '.new-progress',
993
- color: 'primary',
994
- size: 'medium',
995
- value: 30,
996
- hasFigure: true
997
- });
998
- Gn.create('button', { target: '.btn0', size: 'small', onClick: function(){ progress.setValue(0); }});
999
- Gn.create('button', { target: '.btn20', size: 'small', onClick: function(){ progress.setValue(20); }});
1000
- Gn.create('button', { target: '.btn50', size: 'small', onClick: function(){ progress.setValue(50); }});
1001
- Gn.create('button', { target: '.btn70', size: 'small', onClick: function(){ progress.setValue(70); }});
1002
- Gn.create('button', { target: '.btn100', size: 'small', onClick: function(){ progress.setValue(100); }});
1003
- },
1004
- SelectButton: function(){
1005
- Gn.create('selectbutton', {
1006
- target: '.new-selectButtons',
1007
- size: 'normal',
1008
- value: 'menu2',
1009
- onChange: function(option){
1010
- console.log('선택된 옵션은 ' + option );
1011
- },
1012
- data: [{
1013
- text: 'menu1',
1014
- value: 'menu1'
1015
- },{
1016
- text: 'menu2',
1017
- value: 'menu2'
1018
- },{
1019
- text: 'menu3',
1020
- value: 'menu3'
1021
- },{
1022
- text: 'menu4',
1023
- value: 'menu4'
1024
- }]
1025
- });
1026
- },
1027
- Splitter: function(){
1028
- Gn.create('splitter', {
1029
- target: '#horizontal-splitter',
1030
- panel: ['#frame1','#frame2'],
1031
- position: '30%',
1032
- onDrag: function(e) {
1033
- console.log('dragging');
1034
- },
1035
- onDragStart: function(e) {
1036
- console.log('drag start');
1037
- },
1038
- onDragEnd: function(e) {
1039
- console.log(e, 'drag End');
1040
- },
1041
- orientation: 'horizontal'
1042
- });
1043
- Gn.create('splitter', {
1044
- target: '#vertical-splitter',
1045
- panel: ['#frame3','#frame4'],
1046
- space: 20,
1047
- minPosition: 40,
1048
- position: '30%',
1049
- orientation: 'vertical'
1050
- });
1051
- },
1052
- Switch: function(){
1053
- Gn.create('switch', {
1054
- target: '.new-switch',
1055
- size: 'large',
1056
- color: 'info',
1057
- checked: true,
1058
- onToggle: function(e){ console.log('toggle 이벤트'); }
1059
- })
1060
- },
1061
- SyntaxInput: function(){
1062
- Gn.create('syntaxinput', {
1063
- target: '.syntaxInput'
1064
- });
1065
- Gn.create('syntaxinput', {
1066
- target: '.syntaxInput2',
1067
- multiple: true,
1068
- usetab: true
1069
- });
1070
- Gn.create('syntaxinput', {
1071
- target: '.syntaxInput3',
1072
- type: 'custom',
1073
- patterns: {
1074
- constant: {
1075
- pattern: /\w+:?(?=\/)/gm
1076
- },
1077
- keyword: {
1078
- pattern: /[^/]*$/gm
1079
- }
1080
- }
1081
- });
1082
- },
1083
- Tab: function(){
1084
- Gn.create('tab', {
1085
- target: '#newTab',
1086
- align: 'center',
1087
- contents: '#newContents',
1088
- onChange: function(idx, tab){
1089
- console.log(idx + '번 탭이 활성화 되었습니다.')
1090
- }
1091
- });
1092
- },
1093
- Tagcloud: function(){
1094
- Gn.create('tagcloud', {
1095
- target: '.new-tagcloud',
1096
- width: '250px',
1097
- data: [{
1098
- text: 'Genians',
1099
- value: 50
1100
- },{
1101
- text: 'NAC',
1102
- value: 33
1103
- },{
1104
- text: 'Typescript',
1105
- value: 12
1106
- },{
1107
- text: 'Insights',
1108
- value: 26
1109
- },{
1110
- text: 'Network',
1111
- value: 3
1112
- },{
1113
- text: 'sass',
1114
- value: 1,
1115
- },{
1116
- text: 'EDR',
1117
- value: 19
1118
- },{
1119
- text: 'Front-end',
1120
- value: 6
1121
- },{
1122
- text: 'GNUI',
1123
- value: 42
1124
- },{
1125
- text: 'Framework',
1126
- value: 1
1127
- }]
1128
- })
1129
- },
1130
- Tooltip: function(){
1131
- Gn.create('tooltip', {
1132
- target: '.has-tooltip1',
1133
- contents: '.new-contents',
1134
- direction: 'left',
1135
- type: 'click'
1136
- });
1137
- Gn.create('tooltip', {
1138
- target: '.has-tooltip2',
1139
- contents: '기본값 bottom 툴팁'
1140
- });
1141
- Gn.create('tooltip', {
1142
- target: '.has-tooltip3',
1143
- contents: 'top 툴팁',
1144
- direction: 'top'
1145
- });
1146
- Gn.create('tooltip', {
1147
- target: '.has-tooltip4',
1148
- contents: 'right 툴팁',
1149
- direction: 'right'
1150
- });
1151
- Gn.create('tooltip', {
1152
- target: '.has-tooltip5',
1153
- contents: 'left top 툴팁',
1154
- direction: 'left-top',
1155
- width: '200px'
1156
- });
1157
- Gn.create('tooltip', {
1158
- target: '.has-tooltip6',
1159
- contents: 'left bottom 툴팁',
1160
- direction: 'left-bottom'
1161
- });
1162
- Gn.create('tooltip', {
1163
- target: '.has-tooltip7',
1164
- contents: 'right top 툴팁',
1165
- direction: 'right-top'
1166
- });
1167
- Gn.create('tooltip', {
1168
- target: '.has-tooltip8',
1169
- contents: 'right bottom 툴팁',
1170
- direction: 'right-bottom'
1171
- });
1172
- },
1173
- Time: function(){
1174
- Gn.create('time', {
1175
- target: '.new-time',
1176
- onChange: function(time){
1177
- console.log(time)
1178
- },
1179
- value: '22:33:44'
1180
- });
1181
- Gn.create('time', {
1182
- target: '.new-time2',
1183
- timeFormat: 'hh:mm',
1184
- onChange: function(time){
1185
- console.log(time)
1186
- },
1187
- value: '6:2',
1188
- hasControls: false
1189
- });
1190
- },
1191
- Tree: function(){
1192
- Gn.create('tree', {
1193
- target: '.new-tree1',
1194
- data: [{
1195
- text: 'Genians',
1196
- child: [{
1197
- text: 'GNUI'
1198
- },{
1199
- text: 'GNUI core'
1200
- },{
1201
- text: 'GNConfEngine'
1202
- }]
1203
- },{
1204
- text: 'R&D Center',
1205
- child: [{
1206
- text: 'GNUI'
1207
- },{
1208
- text: 'GNUI core'
1209
- },{
1210
- text: 'GNConfEngine'
1211
- }]
1212
- },{
1213
- text: 'Front-end'
1214
- }],
1215
- type: 'borderless'
1216
- });
1217
- Gn.create('tree', {
1218
- target: '.new-tree2',
1219
- data: [{
1220
- text: 'Genians',
1221
- child: [{
1222
- text: 'GNUI'
1223
- },{
1224
- text: 'GNUI core'
1225
- },{
1226
- text: 'GNConfEngine'
1227
- }]
1228
- },{
1229
- text: 'R&D Center',
1230
- child: [{
1231
- text: 'GNUI'
1232
- },{
1233
- text: 'GNUI core'
1234
- },{
1235
- text: 'GNConfEngine'
1236
- }]
1237
- },{
1238
- text: 'Front-end'
1239
- }],
1240
- color: 'success',
1241
- multiple: true
1242
- })
1243
- Gn.create('tree', {
1244
- target: '.new-tree3',
1245
- data: [{
1246
- text: 'Genians',
1247
- actived: true,
1248
- opened: true,
1249
- child: [{
1250
- text: 'GNUI'
1251
- },{
1252
- text: 'GNUI core',
1253
- opened: true,
1254
- child: [{
1255
- text: 'GNUI'
1256
- },{
1257
- text: 'GNUI core'
1258
- },{
1259
- text: 'GNConfEngine',
1260
- selected: true
1261
- }]
1262
- },{
1263
- text: 'GNConfEngine'
1264
- }]
1265
- },{
1266
- text: 'R&D Center',
1267
- child: [{
1268
- text: 'GNUI'
1269
- },{
1270
- text: 'GNUI core'
1271
- },{
1272
- text: 'GNConfEngine'
1273
- }]
1274
- },{
1275
- text: 'Front-end'
1276
- }],
1277
- hasCheck: true
1278
- })
1279
- }
1280
- }