gnui 1.2.12 → 1.2.14

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 (82) hide show
  1. package/dist/js/gnui.esm.js +40432 -0
  2. package/dist/js/gnui.js +40440 -0
  3. package/dist/js/gnui.min.js +23 -0
  4. package/dist/styles/default.css +1 -0
  5. package/dist/styles/gpi.css +1 -0
  6. package/dist/styles/green24.css +1 -0
  7. package/dist/styles/insights.css +1 -0
  8. package/dist/styles/nac.css +1 -0
  9. package/dist/styles/ztnac.css +1 -0
  10. package/package.json +1 -1
  11. package/styleguide/assets/components.js +1757 -0
  12. package/styleguide/assets/favicon.ico +0 -0
  13. package/styleguide/assets/guide.js +47 -0
  14. package/styleguide/assets/image.png +0 -0
  15. package/styleguide/assets/js/gnui.js +40440 -0
  16. package/styleguide/assets/js/gnui.min.js +23 -0
  17. package/styleguide/assets/okadia.css +121 -0
  18. package/styleguide/assets/styles/default.css +1 -0
  19. package/styleguide/assets/styles/gpi.css +1 -0
  20. package/styleguide/assets/styles/green24.css +1 -0
  21. package/styleguide/assets/styles/insights.css +1 -0
  22. package/styleguide/assets/styles/nac.css +1 -0
  23. package/styleguide/assets/styles/ztnac.css +1 -0
  24. package/styleguide/assets/theme.css +596 -0
  25. package/styleguide/category/COLOR/index.html +157 -0
  26. package/styleguide/category/COMPONENT/Alert(js)/index.html +419 -0
  27. package/styleguide/category/COMPONENT/Bignumber/index.html +270 -0
  28. package/styleguide/category/COMPONENT/Breadcrumb/index.html +325 -0
  29. package/styleguide/category/COMPONENT/Calendar(js)/index.html +243 -0
  30. package/styleguide/category/COMPONENT/Card/index.html +185 -0
  31. package/styleguide/category/COMPONENT/Chart(js)/index.html +556 -0
  32. package/styleguide/category/COMPONENT/Datagrid(js)/index.html +685 -0
  33. package/styleguide/category/COMPONENT/Datalist(js)/index.html +472 -0
  34. package/styleguide/category/COMPONENT/Growl(js)/index.html +352 -0
  35. package/styleguide/category/COMPONENT/JsonView(js)/index.html +1135 -0
  36. package/styleguide/category/COMPONENT/Loader(js)/index.html +296 -0
  37. package/styleguide/category/COMPONENT/MenuButton(js)/index.html +282 -0
  38. package/styleguide/category/COMPONENT/Message(js)/index.html +516 -0
  39. package/styleguide/category/COMPONENT/Modal(js)/index.html +445 -0
  40. package/styleguide/category/COMPONENT/Pagination(js)/index.html +446 -0
  41. package/styleguide/category/COMPONENT/Panel/index.html +327 -0
  42. package/styleguide/category/COMPONENT/Progressbar(js)/index.html +314 -0
  43. package/styleguide/category/COMPONENT/Tab(js)/index.html +474 -0
  44. package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +261 -0
  45. package/styleguide/category/COMPONENT/Tooltip(js)/index.html +413 -0
  46. package/styleguide/category/COMPONENT/Tree(js)/index.html +405 -0
  47. package/styleguide/category/CONTROLS/Button(js)/index.html +466 -0
  48. package/styleguide/category/CONTROLS/Checkbox/index.html +195 -0
  49. package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +286 -0
  50. package/styleguide/category/CONTROLS/Datepicker(js)/index.html +324 -0
  51. package/styleguide/category/CONTROLS/Dropdown(js)/index.html +1113 -0
  52. package/styleguide/category/CONTROLS/File/index.html +313 -0
  53. package/styleguide/category/CONTROLS/Form/Control/index.html +228 -0
  54. package/styleguide/category/CONTROLS/Form/Field/index.html +255 -0
  55. package/styleguide/category/CONTROLS/Form/Plain/index.html +194 -0
  56. package/styleguide/category/CONTROLS/Input/index.html +331 -0
  57. package/styleguide/category/CONTROLS/MultiText(js)/index.html +274 -0
  58. package/styleguide/category/CONTROLS/Picklist(js)/index.html +739 -0
  59. package/styleguide/category/CONTROLS/Radio/index.html +198 -0
  60. package/styleguide/category/CONTROLS/Select/index.html +457 -0
  61. package/styleguide/category/CONTROLS/SelectButton(js)/index.html +292 -0
  62. package/styleguide/category/CONTROLS/Slider/index.html +190 -0
  63. package/styleguide/category/CONTROLS/Switch(js)/index.html +346 -0
  64. package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +481 -0
  65. package/styleguide/category/CONTROLS/Textarea/index.html +186 -0
  66. package/styleguide/category/CONTROLS/Time(js)/index.html +264 -0
  67. package/styleguide/category/ELEMENTS/Box/index.html +171 -0
  68. package/styleguide/category/ELEMENTS/Icon/index.html +359 -0
  69. package/styleguide/category/ELEMENTS/Image/index.html +210 -0
  70. package/styleguide/category/ELEMENTS/List/index.html +393 -0
  71. package/styleguide/category/ELEMENTS/Table/index.html +480 -0
  72. package/styleguide/category/ELEMENTS/Tag/index.html +252 -0
  73. package/styleguide/category/ELEMENTS/Title/index.html +183 -0
  74. package/styleguide/category/LAYOUT/Container/index.html +232 -0
  75. package/styleguide/category/LAYOUT/Grid/index.html +397 -0
  76. package/styleguide/category/LAYOUT/Splitter(js)/index.html +276 -0
  77. package/styleguide/category/UTILITY/index.html +472 -0
  78. package/styleguide/category/Utils/index.html +338 -0
  79. package/styleguide/color.html +170 -0
  80. package/styleguide/index.html +170 -0
  81. package/styleguide/tag/javascript/index.html +7565 -0
  82. package/styleguide/tag/v.0.1.0/index.html +12646 -0
@@ -0,0 +1,1757 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ /* eslint-disable @typescript-eslint/explicit-function-return-type */
3
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4
+ const components = {
5
+ Alert: function () {
6
+ Gn.create('button', {
7
+ target: '.new-alert',
8
+ onClick: function () {
9
+ Gn.create('alert', {
10
+ textSets: { alertText: 'alert이 생성됩니다.' },
11
+ hasClose: false,
12
+ hasConfirm: true,
13
+ hasCancel: true,
14
+ onConfirm: function () {
15
+ console.log('확인 되었습니다.');
16
+ },
17
+ onClose: function () {
18
+ console.log('취소 되었습니다.');
19
+ }
20
+ });
21
+ }
22
+ });
23
+ },
24
+ Button: function () {
25
+ Gn.create('button', {
26
+ target: 'button[name=new-button]',
27
+ size: 'medium',
28
+ icon: 'home',
29
+ onClick: function () {
30
+ console.log('버튼을 클릭했습니다.');
31
+ }
32
+ });
33
+ },
34
+ Calendar: function () {
35
+ Gn.create('calendar', {
36
+ target: '.new-calendar',
37
+ value: '2021-04-01',
38
+ onSelect: function (v) {
39
+ console.log('선택한 날짜: ' + v);
40
+ },
41
+ max: '2021-04-30',
42
+ min: '2021-03-01'
43
+ });
44
+ Gn.create('calendar', {
45
+ target: '.new-calendar1',
46
+ onSelect: function (v) {
47
+ console.log('선택한 날짜: ' + v);
48
+ },
49
+ dateType: 'datetime',
50
+ max: '1M',
51
+ min: '-1M'
52
+ });
53
+ },
54
+ Chart: function () {
55
+ const clickEvt = {
56
+ dataPointSelection: function (event, chartContext, { seriesIndex, dataPointIndex, w }) {
57
+ console.log(w.config.series);
58
+ event && console.log('data', seriesIndex, dataPointIndex);
59
+ },
60
+ markerClick: function (event, chartContext, { seriesIndex, dataPointIndex, w }) {
61
+ console.log(w.config.series[seriesIndex]);
62
+ console.log('marker', seriesIndex, dataPointIndex);
63
+ }
64
+ };
65
+ Gn.create('chart', {
66
+ target: '.lineChart',
67
+ type: 'line',
68
+ chart: {
69
+ events: clickEvt
70
+ },
71
+ series: [
72
+ {
73
+ name: 'data1',
74
+ data: [30, 200, 100, 400, 150, 250]
75
+ },
76
+ {
77
+ name: 'data2',
78
+ data: [50, 20, 10, 40, 15, 25]
79
+ }
80
+ ],
81
+ xaxis: {
82
+ type: 'datetime',
83
+ 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']
84
+ },
85
+ width: '45%'
86
+ });
87
+ Gn.create('chart', {
88
+ target: '.splineChart',
89
+ type: 'spline',
90
+ chart: {
91
+ events: clickEvt
92
+ },
93
+ series: [
94
+ {
95
+ name: 'data1',
96
+ data: [30, 200, 100, 400, 150, 250]
97
+ }
98
+ ],
99
+ xaxis: {
100
+ type: 'datetime',
101
+ 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']
102
+ },
103
+ width: '45%'
104
+ });
105
+ Gn.create('chart', {
106
+ target: '.columnChart',
107
+ type: 'column',
108
+ chart: {
109
+ stacked: true,
110
+ events: clickEvt
111
+ },
112
+ series: [
113
+ {
114
+ name: 'data1',
115
+ data: [30, 200, 100, 400, 150, 250]
116
+ },
117
+ {
118
+ name: 'data2',
119
+ data: [50, 20, 10, 40, 15, 25]
120
+ }
121
+ ],
122
+ width: '45%'
123
+ });
124
+ Gn.create('chart', {
125
+ target: '.barChart',
126
+ type: 'bar',
127
+ chart: {
128
+ events: clickEvt
129
+ },
130
+ series: [
131
+ {
132
+ data: [30, 200, 100, 400, 150, 250]
133
+ }
134
+ ],
135
+ xaxis: {
136
+ categories: ['data1', 'data2', 'data3', 'data4', 'data5', 'data6']
137
+ },
138
+ width: '45%'
139
+ });
140
+ Gn.create('chart', {
141
+ target: '.pieChart',
142
+ type: 'pie',
143
+ chart: {
144
+ events: clickEvt
145
+ },
146
+ series: [30, 200, 100, 400],
147
+ labels: ['data1', 'data2', 'data3', 'data4']
148
+ });
149
+ Gn.create('chart', {
150
+ target: '.donutChart',
151
+ type: 'donut',
152
+ chart: {
153
+ events: clickEvt
154
+ },
155
+ series: [30, 200, 100, 400, 150, 250],
156
+ labels: ['data1', 'data2', 'data3', 'data4', 'data5', 'data6']
157
+ });
158
+ Gn.create('chart', {
159
+ target: '.gaugeChart',
160
+ type: 'gauge',
161
+ chart: {
162
+ events: clickEvt
163
+ },
164
+ series: [30],
165
+ labels: ['data1']
166
+ });
167
+ Gn.create('chart', {
168
+ target: '.radialChart',
169
+ type: 'radial',
170
+ chart: {
171
+ events: clickEvt
172
+ },
173
+ series: [30],
174
+ labels: ['data1']
175
+ });
176
+ Gn.util.each(Gn.util.$$('.aigis-module > p'), function (_blank) {
177
+ Gn.util.remove(_blank);
178
+ });
179
+ },
180
+ Colorpicker: function () {
181
+ Gn.create('colorpicker', {
182
+ target: '.colorPicker',
183
+ size: 'large',
184
+ editable: true,
185
+ onChange: color => {
186
+ console.log('color', color);
187
+ }
188
+ });
189
+ Gn.create('colorpicker', {
190
+ target: '.colorPicker2',
191
+ value: '#27005d',
192
+ size: 'medium'
193
+ });
194
+ Gn.create('colorpicker', {
195
+ target: '.colorPicker3',
196
+ readonly: true,
197
+ value: '#aed2ff',
198
+ onChange: color => {
199
+ console.log('color', color);
200
+ }
201
+ });
202
+ Gn.create('colorpicker', {
203
+ target: '.colorPicker4',
204
+ value: '#e4f1ff',
205
+ disabled: true,
206
+ size: 'small'
207
+ });
208
+ },
209
+ Datepicker: function () {
210
+ Gn.create('datepicker', {
211
+ target: '.new-datepicker',
212
+ value: '',
213
+ dateFormat: 'yyyy-MM-DD',
214
+ min: '-1M',
215
+ max: '1M',
216
+ type: 'date'
217
+ });
218
+ Gn.create('datepicker', {
219
+ target: '.new-datetimepicker-without-icon',
220
+ type: 'datetime',
221
+ value: '2021-10-10 10:01:11',
222
+ hasIcon: false,
223
+ onClose: function () {
224
+ console.log('창이 닫힙니다.');
225
+ }
226
+ });
227
+ Gn.create('datepicker', {
228
+ target: '.new-datetimepicker',
229
+ type: 'datetime',
230
+ writable: false,
231
+ textSets: {
232
+ placeholder: 'pick a date'
233
+ }
234
+ });
235
+ },
236
+ Dropdown: function () {
237
+ Gn.create('dropdown', {
238
+ target: '.new-dropdown0',
239
+ onChange: function (val, txt, values) {
240
+ console.log('val, txt, values', val, txt, values);
241
+ console.log('this', this);
242
+ console.log('선택된 값은 [ ' + val + ' ]입니다.');
243
+ },
244
+ width: '150px',
245
+ data: [
246
+ { value: '1', text: '옵션 1' },
247
+ { value: '2', text: '옵션 2' },
248
+ { value: '3', text: '옵션 3' },
249
+ { value: '4', text: '옵션 4' },
250
+ { value: '5', text: '옵션 5' }
251
+ ]
252
+ });
253
+ Gn.create('dropdown', {
254
+ target: '.new-dropdown1',
255
+ onChange: function (val, txt, values) {
256
+ console.log('선택된 값은 [ ' + val + ' ]입니다.');
257
+ },
258
+ width: '150px',
259
+ value: 'item2,item5',
260
+ multiple: true,
261
+ data: [
262
+ { value: 'item1', text: '항목1' },
263
+ { value: 'item2', text: '항목2' },
264
+ { value: 'item3', text: '항목3' },
265
+ { value: 'item4', text: '항목4' },
266
+ { value: 'item5', text: '항목5' },
267
+ { value: 'item6', text: '항목6' },
268
+ { value: 'item7', text: '항목7' }
269
+ ]
270
+ });
271
+ Gn.create('dropdown', {
272
+ target: '.new-dropdown2',
273
+ data: [
274
+ [
275
+ { value: 'item1', text: 'Group1-항목1' },
276
+ { value: 'item2', text: 'Group1-항목2' },
277
+ { value: 'item3', text: 'Group1-항목3' }
278
+ ],
279
+ [
280
+ { value: 'item4', text: 'Group2-항목4' },
281
+ { value: 'item5', text: 'Group2-항목5' }
282
+ ]
283
+ ]
284
+ });
285
+ Gn.create('dropdown', {
286
+ target: '.new-dropdown3',
287
+ data: [
288
+ { value: '', text: '<선택안함>' },
289
+ { value: 'item1', icon: 'home', text: '항목1' },
290
+ { value: 'item2', icon: 'star', text: '항목2' },
291
+ { value: 'item3', icon: 'heart', text: '항목3' },
292
+ { value: 'item4', icon: 'apple', text: 'apple' },
293
+ { value: 'item5', icon: 'linux', text: 'linux' },
294
+ { value: 'item6', icon: 'windows', text: 'windows' },
295
+ { value: 'item7', text: '&lt;항목5&gt;', html: '<p><strong>text</strong>가 있는 항목은 선택 시 <u>text</u>로 대체됩니다.</p>' },
296
+ { value: 'item8', html: '<p><strong>text</strong>가 없는 항목은 <u>선택</u>할 수 없습니다.</p>' }
297
+ ],
298
+ width: 150,
299
+ scrollHeight: 200
300
+ });
301
+ Gn.create('dropdown', {
302
+ target: '.new-dropdown4',
303
+ onChange: function (val, txt, values) {
304
+ console.log('선택된 항목은 [ ' + txt + ' ]입니다.');
305
+ console.log('선택된 항목의 data : ', values);
306
+ },
307
+ textSets: {
308
+ selectText: '골라라'
309
+ },
310
+ value: 'item2',
311
+ hasSearch: true,
312
+ color: 'danger'
313
+ });
314
+ },
315
+ Datagrid: function () {
316
+ Gn.create('datagrid', {
317
+ target: '.new-grid',
318
+ headers: [
319
+ {
320
+ label: 'no',
321
+ key: 'number',
322
+ onSelect: function () {
323
+ // eslint-disable-next-line prefer-rest-params
324
+ console.log(arguments);
325
+ },
326
+ template: function (k, d) {
327
+ return '<span>' + d[k] + '</span>';
328
+ },
329
+ draggable: true,
330
+ sortable: true,
331
+ sort: 'asc'
332
+ },
333
+ {
334
+ label: '제목',
335
+ key: 'title',
336
+ style: {
337
+ width: '250px'
338
+ },
339
+ className: 'has-text-right',
340
+ draggable: true,
341
+ bodyClass: 'has-text-left',
342
+ sortable: true
343
+ },
344
+ {
345
+ label: '날짜',
346
+ key: 'date',
347
+ style: {
348
+ width: '150px'
349
+ },
350
+ className: 'has-text-center',
351
+ bodyClass: 'has-text-left'
352
+ }
353
+ ],
354
+ data: [
355
+ {
356
+ number: '1',
357
+ title: '하나',
358
+ date: '2020-09-19',
359
+ desc: 'hello, world',
360
+ child: [
361
+ {
362
+ number: '1-1',
363
+ title: '1-하나',
364
+ date: '2020-09-19'
365
+ },
366
+ {
367
+ number: '1-2',
368
+ title: '1-둘',
369
+ date: '2020-09-19',
370
+ desc: 'hello, world',
371
+ child: [
372
+ {
373
+ number: '1-2-1',
374
+ title: '1-둘-1',
375
+ date: '2020-09-19',
376
+ desc: 'hello, world',
377
+ child: [
378
+ {
379
+ number: '1-2-1-1',
380
+ title: '1-둘-1-1',
381
+ desc: 'hello, world',
382
+ date: '2020-09-19'
383
+ }
384
+ ]
385
+ }
386
+ ]
387
+ }
388
+ ],
389
+ color: 'is-danger-light'
390
+ },
391
+ {
392
+ number: '2',
393
+ title: '둘',
394
+ date: '2020-09-19',
395
+ desc: 'hello, world'
396
+ }
397
+ ],
398
+ onSort: function (column) {
399
+ console.log('column', column);
400
+ },
401
+ onDragEnd: function (col, position) {
402
+ console.log(col, position);
403
+ },
404
+ onToggle: function (type, row, n) {
405
+ /* console.log(type, row, n)
406
+ // 이렇게 하면 펼쳐질때마다 해당 로우에 2개의 자식을 바인딩한다.
407
+ type === 'expanded' && this.addChild(n, [{
408
+ number: '000',
409
+ title: '추가된 자식1',
410
+ date: '2020-02-02'
411
+ },{
412
+ number: '001',
413
+ title: '추가된 자식2',
414
+ date: '2020-02-02'
415
+ }]) */
416
+ },
417
+ onCheckAll: function (ggg) {
418
+ console.log('ggg', ggg);
419
+ },
420
+ onDoubleClick: function (e) {
421
+ console.log('dbclick', e);
422
+ },
423
+ hasCheck: true,
424
+ hasDelete: true
425
+ });
426
+ Gn.create('datagrid', {
427
+ target: '.new-grid2',
428
+ headers: [
429
+ {
430
+ label: 'row data numbers',
431
+ key: 'number',
432
+ style: { width: '50px' },
433
+ sortable: true,
434
+ draggable: true,
435
+ template: function (k, d) {
436
+ return '<span>' + d[k] + '</span>';
437
+ }
438
+ },
439
+ {
440
+ label: '제목',
441
+ key: 'title',
442
+ sortable: true,
443
+ draggable: true,
444
+ template: function (k, d) {
445
+ return '<span>' + d[k] + '</span>';
446
+ }
447
+ },
448
+ {
449
+ label: '날짜를 표시하는 컬럼입니다',
450
+ key: 'date',
451
+ style: {
452
+ width: '100px'
453
+ },
454
+ tipField: 'desc'
455
+ },
456
+ {
457
+ label: '헤더명도길어집니다',
458
+ key: 'desc',
459
+ style: { width: '50px' }
460
+ }
461
+ ],
462
+ data: (callback, ui) => {
463
+ console.log('ui', ui);
464
+ ui.paginator.total = 40;
465
+
466
+ return callback([
467
+ {
468
+ number: '1',
469
+ title: '하나',
470
+ date: '2020-09-19'
471
+ },
472
+ {
473
+ number: '232342333',
474
+ title: 'Lorem labore culpa voluptate proident ad et id nostrud excepteur incididunt ut officia et ullamco.',
475
+ date: '2020-09-19',
476
+ desc: 'Voluptate enim culpa anim dolor magna excepteur ullamco id aliquip consequat ullamco voluptate consectetur.',
477
+ ordered: false,
478
+ limited: 0,
479
+ one: 'one',
480
+ two: 2,
481
+ three: {
482
+ hello: 'p',
483
+ ordered: false,
484
+ limited: 0,
485
+ one: 'one',
486
+ two: 2,
487
+ desc: 'hhhhhhh'
488
+ },
489
+ checked: true
490
+ }
491
+ ]);
492
+ },
493
+ sort: function (column) {
494
+ console.log('column', column);
495
+ },
496
+ onSelect: function (row, index) {
497
+ console.log('row', row, index);
498
+ this.showDetail(index, null, ['number', 'title', 'date', 'desc', 'ordered', 'limited', 'one', 'two', 'three', 'checked']);
499
+ },
500
+ onDoubleClick: function (e) {
501
+ console.log('dbclick', e);
502
+ },
503
+ isEllipsis: true,
504
+ hasCheck: true,
505
+ hasOrder: true,
506
+ textSets: {
507
+ orderLabel: '이동'
508
+ },
509
+ paginator: {
510
+ rows: 10
511
+ },
512
+ // hasDelete: true,
513
+ // fixHeader: true,
514
+ onChange: updatedData => {
515
+ console.log(updatedData);
516
+ }
517
+ });
518
+ },
519
+ Datalist: function () {
520
+ Gn.create('datalist', {
521
+ target: '.new-list',
522
+ headers: [
523
+ {
524
+ label: 'no',
525
+ key: 'number',
526
+ bodyClass: 'has-text-left',
527
+ style: {
528
+ width: '50px',
529
+ 'text-align': 'center'
530
+ }
531
+ },
532
+ {
533
+ label: '제목',
534
+ key: 'title',
535
+ className: 'main-title'
536
+ },
537
+ {
538
+ label: '날짜',
539
+ key: 'date'
540
+ },
541
+ {
542
+ label: '설명',
543
+ key: 'desc'
544
+ },
545
+ {
546
+ label: '기타',
547
+ key: 'etc'
548
+ }
549
+ ],
550
+ data: [
551
+ {
552
+ number: '1',
553
+ title: '오늘',
554
+ date: '2023-07-28',
555
+ desc: 'hellojj'
556
+ },
557
+ {
558
+ number: '2',
559
+ title: '내일',
560
+ date: '2023-07-29',
561
+ desc: 'chaaaaaa'
562
+ }
563
+ ],
564
+ onChange: updatedData => {
565
+ console.log('updatedData', updatedData);
566
+ }
567
+ });
568
+ Gn.create('datalist', {
569
+ target: '.new-list2',
570
+ headers: [
571
+ {
572
+ label: 'row-number',
573
+ key: 'number'
574
+ },
575
+ {
576
+ label: '제목',
577
+ key: 'title'
578
+ },
579
+ {
580
+ label: '날짜',
581
+ key: 'date'
582
+ },
583
+ {
584
+ label: '상세설명',
585
+ key: 'desc'
586
+ },
587
+ {
588
+ label: '숨김',
589
+ key: 'ishidden',
590
+ isHidden: true
591
+ }
592
+ ],
593
+ data: [
594
+ { number: 1, title: '첫 번째', date: '2023-07-28', desc: '이것은 첫 번째 요소입니다.', ishidden: 'datalist에 표시되지 않습니다.' },
595
+ { number: 2, title: '두 번째', date: '2023-07-29', desc: '이것은 두 번째 요소입니다.', ishidden: 'datalist에 표시되지 않습니다.' },
596
+ { number: 3, title: '세 번째', date: '2023-07-30', desc: '', ishidden: 'datalist에 표시되지 않습니다.' },
597
+ { number: 4, title: '', date: '2023-07-31', desc: '이것은 네 번째 요소입니다.', ishidden: 'datalist에 표시되지 않습니다.' },
598
+ { number: 5, title: '다섯 번째', date: '2023-08-01', desc: '이것은 다섯 번째 요소입니다.' },
599
+ { number: 6, title: '여섯 번째', date: '2023-08-02 ~ 2023-11-02', desc: '이것은 여섯 번째 요소입니다.' },
600
+ { number: 7, title: '일곱 번째 일곱 번째 일곱 번째', date: '2023-08-03', desc: '이것은 일곱 번째 요소입니다.' },
601
+ {
602
+ number: 8,
603
+ title: '여덟 번째',
604
+ date: '2023-08-08',
605
+ desc: '이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.이것은 여덟 번째 요소입니다.'
606
+ }
607
+ ],
608
+ hasUpdate: true,
609
+ hasDelete: true,
610
+ onUpdate: function (row, index) {
611
+ console.log('row', row);
612
+ console.log('index', index);
613
+ },
614
+ onChange: updatedData => {
615
+ console.log('updatedData', updatedData);
616
+ },
617
+ isHiddenEmpty: true
618
+ });
619
+ },
620
+ Growl: function () {
621
+ Gn.create('button', {
622
+ target: '.new-growl1',
623
+ onClick: function () {
624
+ Gn.create('growl', {
625
+ textSets: { message: '메세지가 생성됩니다!' },
626
+ duration: 3000,
627
+ positionX: 'right',
628
+ positionY: 'top',
629
+ color: 'danger'
630
+ });
631
+ }
632
+ });
633
+ Gn.create('button', {
634
+ target: '.new-growl2',
635
+ onClick: function () {
636
+ Gn.create('growl', {
637
+ textSets: { message: '메세지가 생성됩니다!' },
638
+ duration: 3000,
639
+ type: 'info'
640
+ });
641
+ }
642
+ });
643
+ },
644
+ JsonView: function () {
645
+ Gn.create('jsonview', {
646
+ target: '.new-jsonview',
647
+ schema: {
648
+ Type: 'array',
649
+ Disp: 'aws sample 정보',
650
+ Description: 'aws sample 정보 설명',
651
+ Items: {
652
+ Type: 'object',
653
+ Properties: {
654
+ index: {
655
+ Type: 'checkbox',
656
+ Disp: ''
657
+ },
658
+ _id: {
659
+ Type: 'string',
660
+ Disp: '인스턴스ID',
661
+ Description: '인스턴스ID입니다.'
662
+ },
663
+ _type: {
664
+ Type: 'string',
665
+ Disp: '수집기타입'
666
+ },
667
+ test1: {
668
+ Type: 'number',
669
+ Disp: 'Test1 Value'
670
+ },
671
+ test2: {
672
+ Type: 'number',
673
+ Disp: 'Test2 Value'
674
+ },
675
+ updated: {
676
+ Type: 'datetime',
677
+ Disp: '마지막 업데이트',
678
+ $ref: '#/$defs/Datas'
679
+ },
680
+ nodes: {
681
+ Type: 'object',
682
+ Disp: '노드정보',
683
+ Properties: {
684
+ obj1: {
685
+ Type: 'string',
686
+ Disp: 'obj1'
687
+ },
688
+ obj2: {
689
+ Type: 'integer',
690
+ Disp: 'obj2'
691
+ }
692
+ }
693
+ }
694
+ },
695
+ Required: ['_type'],
696
+ Hidden: ['test1', 'test2'],
697
+ SortItems: ['_id']
698
+ },
699
+ $defs: {
700
+ Datas: {
701
+ Type: 'array',
702
+ Disp: '추가 데이터 정보',
703
+ Items: {
704
+ Type: 'object',
705
+ Properties: {
706
+ field1: {
707
+ Type: 'string',
708
+ Disp: '필드 1'
709
+ },
710
+ field2: {
711
+ Type: 'number'
712
+ },
713
+ datas: {
714
+ Type: ['array', 'string'],
715
+ Items: {
716
+ Type: 'object',
717
+ Properties: {
718
+ id: {
719
+ Type: 'number',
720
+ Disp: null
721
+ },
722
+ text: {
723
+ Type: 'string',
724
+ Disp: null
725
+ }
726
+ }
727
+ }
728
+ }
729
+ }
730
+ }
731
+ }
732
+ }
733
+ },
734
+ data: [
735
+ {
736
+ index: 0,
737
+ _id: 'd3185f78-7221-103a-8002-0272452c0706',
738
+ _type: 'aws',
739
+ test1: 1234,
740
+ test2: 1231.23,
741
+ updated: 1603427314109,
742
+ nodes: {
743
+ obj1: 'value',
744
+ obj2: 123
745
+ },
746
+ Datas: [
747
+ {
748
+ field1: 'test1',
749
+ field2: 123,
750
+ datas: [
751
+ {
752
+ id: 1,
753
+ text: 'data1'
754
+ },
755
+ {
756
+ id: 2,
757
+ text: 'data2'
758
+ }
759
+ ]
760
+ },
761
+ {
762
+ field1: 'test2',
763
+ field2: 321,
764
+ datas: [
765
+ {
766
+ id: 1,
767
+ text: 'data3'
768
+ },
769
+ {
770
+ id: 2,
771
+ text: 'data4'
772
+ }
773
+ ]
774
+ },
775
+ {
776
+ field1: 'test2',
777
+ field2: 321,
778
+ datas: 'just text'
779
+ }
780
+ ]
781
+ },
782
+ {
783
+ index: 1,
784
+ _id: 'd3185f78-7221-103a-8002-0125213c0706',
785
+ _type: 'aws',
786
+ test1: 1234,
787
+ test2: 1231.23,
788
+ updated: 1603427314109,
789
+ nodes: {
790
+ obj1: 'value',
791
+ obj2: 123
792
+ },
793
+ Datas: [
794
+ {
795
+ field1: 'test1',
796
+ field2: 123,
797
+ datas: [
798
+ {
799
+ id: 1,
800
+ text: 'data1'
801
+ },
802
+ {
803
+ id: 2,
804
+ text: 'data2'
805
+ }
806
+ ]
807
+ },
808
+ {
809
+ field1: 'test2',
810
+ field2: 321,
811
+ datas: [
812
+ {
813
+ id: 1,
814
+ text: 'data3'
815
+ },
816
+ {
817
+ id: 2,
818
+ text: 'data4'
819
+ }
820
+ ]
821
+ },
822
+ {
823
+ field1: 'test2',
824
+ field2: 321,
825
+ datas: 'just text'
826
+ }
827
+ ]
828
+ }
829
+ ]
830
+ });
831
+ Gn.create('jsonview', {
832
+ target: '.new-rawview',
833
+ 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"]}]}'
834
+ });
835
+ Gn.create('jsonview', {
836
+ target: '.add-jsonview',
837
+ schema: {
838
+ Type: 'array',
839
+ Items: {
840
+ Type: 'object',
841
+ Properties: {
842
+ bignum: {
843
+ Type: 'bignumber'
844
+ }
845
+ }
846
+ }
847
+ },
848
+ data: [
849
+ {
850
+ bignum: {
851
+ CPU: 23.34,
852
+ RAM: {
853
+ value: 26,
854
+ data: [0, 23, 33, 0]
855
+ }
856
+ }
857
+ }
858
+ ]
859
+ });
860
+ Gn.create('jsonview', {
861
+ target: '.type-string',
862
+ schema: {
863
+ Type: 'string',
864
+ RefURL: 'http://www.genians.com',
865
+ Target: '_blank'
866
+ },
867
+ data: '다람쥐 헌 쳇바퀴'
868
+ });
869
+ Gn.create('jsonview', {
870
+ target: '.type-number',
871
+ schema: {
872
+ Type: 'number'
873
+ },
874
+ data: 10001
875
+ });
876
+ Gn.create('jsonview', {
877
+ target: '.type-byte',
878
+ schema: {
879
+ Type: 'byte'
880
+ },
881
+ data: 100000000
882
+ });
883
+ Gn.create('jsonview', {
884
+ target: '.type-datetime',
885
+ schema: {
886
+ Type: 'datetime'
887
+ },
888
+ data: 1603427314109
889
+ });
890
+ Gn.create('jsonview', {
891
+ target: '.type-checkbox',
892
+ schema: {
893
+ Type: 'checkbox'
894
+ },
895
+ data: {
896
+ value: '100',
897
+ checked: true
898
+ }
899
+ });
900
+ Gn.create('jsonview', {
901
+ target: '.type-checkbox2',
902
+ schema: {
903
+ Type: 'checkbox'
904
+ },
905
+ data: 100
906
+ });
907
+ Gn.create('jsonview', {
908
+ target: '.type-html',
909
+ schema: {
910
+ Type: 'html'
911
+ },
912
+ data: '<img src="/styleguide/assets/image.png" alt="asset">'
913
+ });
914
+ Gn.create('jsonview', {
915
+ target: '.type-array1',
916
+ schema: {
917
+ Type: 'array',
918
+ Items: {
919
+ Type: ['string', 'number'],
920
+ RefURL: 'https://search.naver.com/search.naver?query={{data}}'
921
+ }
922
+ },
923
+ data: ['빨강', '주황', '노랑', '초록', '파랑']
924
+ });
925
+ Gn.create('jsonview', {
926
+ target: '.type-percent',
927
+ schema: {
928
+ Type: 'percent'
929
+ },
930
+ data: 52
931
+ });
932
+ Gn.create('jsonview', {
933
+ target: '.type-bignumber',
934
+ schema: {
935
+ Type: 'bignumber'
936
+ },
937
+ data: {
938
+ 온도: 24,
939
+ 습도: {
940
+ value: 60,
941
+ data: [0, 10, 21, 5, 18]
942
+ }
943
+ }
944
+ });
945
+ Gn.create('jsonview', {
946
+ target: '.type-chart',
947
+ schema: {
948
+ Type: 'chart'
949
+ },
950
+ data: {
951
+ type: 'donut',
952
+ series: [30, 200, 100],
953
+ labels: ['data1', 'data2', 'data3']
954
+ }
955
+ });
956
+ Gn.create('jsonview', {
957
+ target: '.type-object',
958
+ schema: {
959
+ Type: 'object',
960
+ Disp: '',
961
+ Description: '',
962
+ Properties: {
963
+ 'data-string': {
964
+ Type: 'string',
965
+ Disp: '물품명',
966
+ Description: 'product name'
967
+ },
968
+ 'data-number': {
969
+ Type: 'number',
970
+ Disp: '재고'
971
+ },
972
+ 'data-reorder': {
973
+ Type: 'string',
974
+ Disp: '재주문가능'
975
+ }
976
+ },
977
+ Hidden: ['data-reorder']
978
+ },
979
+ data: {
980
+ 'data-string': '부뚜막',
981
+ 'data-number': 1489,
982
+ 'data-reorder': 'false'
983
+ }
984
+ });
985
+ Gn.create('jsonview', {
986
+ target: '.type-array2',
987
+ schema: {
988
+ Type: 'array',
989
+ Items: {
990
+ Type: 'object',
991
+ Properties: {
992
+ '$["data-string"]': {
993
+ Type: 'string',
994
+ Disp: '물품명',
995
+ Description: 'product name'
996
+ },
997
+ '$["data-number"]': {
998
+ Type: 'number',
999
+ Disp: '재고'
1000
+ }
1001
+ }
1002
+ }
1003
+ },
1004
+ data: [
1005
+ {
1006
+ 'data-string': '부뚜막',
1007
+ 'data-number': 1489
1008
+ },
1009
+ {
1010
+ 'data-string': '솥뚜껑',
1011
+ 'data-number': 34
1012
+ }
1013
+ ]
1014
+ });
1015
+ Gn.create('jsonview', {
1016
+ target: '.path-key',
1017
+ schema: {
1018
+ Type: 'array',
1019
+ Items: {
1020
+ Type: 'object',
1021
+ Properties: {
1022
+ '$.COLLECTOR._id': {
1023
+ Type: 'string',
1024
+ Disp: '인스턴스ID'
1025
+ },
1026
+ '$.COLLECTOR._type': {
1027
+ Type: 'string',
1028
+ Disp: '타입',
1029
+ $ref: '#/$defs/Datas'
1030
+ },
1031
+ '$.COLLECTOR.nodes.obj2': {
1032
+ Type: 'number',
1033
+ Disp: 'No'
1034
+ }
1035
+ }
1036
+ },
1037
+ $defs: {
1038
+ Datas: {
1039
+ Type: 'array',
1040
+ Disp: 'Datas',
1041
+ Items: {
1042
+ Type: 'object',
1043
+ Properties: {
1044
+ field1: {
1045
+ Type: 'string',
1046
+ Disp: '필드1'
1047
+ },
1048
+ field2: {
1049
+ Type: 'number',
1050
+ Disp: '필드2'
1051
+ },
1052
+ field3: {
1053
+ Type: 'string',
1054
+ Disp: '필드3'
1055
+ }
1056
+ }
1057
+ }
1058
+ }
1059
+ }
1060
+ },
1061
+ data: [
1062
+ {
1063
+ COLLECTOR: {
1064
+ _id: 'data-1-id',
1065
+ _type: 'collector',
1066
+ test1: 0,
1067
+ test2: 0,
1068
+ nodes: {
1069
+ obj1: '',
1070
+ obj2: 0
1071
+ },
1072
+ datas: {
1073
+ field1: 'data-1',
1074
+ field2: 0,
1075
+ datas: [
1076
+ {
1077
+ field1: 'data-1',
1078
+ field2: 0,
1079
+ field3: 'data-1'
1080
+ },
1081
+ {
1082
+ field1: 'data-1',
1083
+ field2: 0,
1084
+ field3: 'data-1'
1085
+ }
1086
+ ]
1087
+ }
1088
+ }
1089
+ },
1090
+ {
1091
+ COLLECTOR: {
1092
+ _id: 'data-2-id',
1093
+ _type: 'collector',
1094
+ test1: 1,
1095
+ test2: 1,
1096
+ nodes: {
1097
+ obj1: '',
1098
+ obj2: 1
1099
+ },
1100
+ datas: {
1101
+ field1: 'data-2',
1102
+ field2: 1,
1103
+ datas: [
1104
+ {
1105
+ field1: 'data-2',
1106
+ field2: 1,
1107
+ field3: 'data-2'
1108
+ },
1109
+ {
1110
+ field1: 'data-2',
1111
+ field2: 1,
1112
+ field3: 'data-2'
1113
+ }
1114
+ ]
1115
+ }
1116
+ }
1117
+ }
1118
+ ]
1119
+ });
1120
+ Gn.create('jsonview', {
1121
+ target: '.converter-view',
1122
+ schema: {
1123
+ Type: 'array',
1124
+ Items: {
1125
+ Type: 'object',
1126
+ Properties: {
1127
+ name: {
1128
+ Type: 'string',
1129
+ Disp: '스위치명'
1130
+ },
1131
+ status: {
1132
+ Type: 'number',
1133
+ Disp: '동작상태',
1134
+ Converter: ['CodeImageConverter', 'OperStatus']
1135
+ }
1136
+ }
1137
+ }
1138
+ },
1139
+ data: [
1140
+ {
1141
+ name: '부뚜막',
1142
+ status: 1
1143
+ },
1144
+ {
1145
+ name: '솥뚜껑',
1146
+ status: 0
1147
+ }
1148
+ ],
1149
+ convert: (name, type, value) => {
1150
+ if (value === '1') {
1151
+ return '미동작';
1152
+ } else {
1153
+ return '동작';
1154
+ }
1155
+ }
1156
+ });
1157
+ },
1158
+ Loader: function () {
1159
+ Gn.create('button', {
1160
+ target: '.new-loader1',
1161
+ onClick: function () {
1162
+ Gn.create('loader', {
1163
+ duration: 3000,
1164
+ size: 'large',
1165
+ positionX: 'right',
1166
+ positionY: 'center',
1167
+ color: 'secondary'
1168
+ });
1169
+ }
1170
+ });
1171
+ Gn.create('button', {
1172
+ target: '.new-loader2',
1173
+ onClick: function () {
1174
+ Gn.create('loader', {
1175
+ duration: 3000
1176
+ });
1177
+ }
1178
+ });
1179
+ },
1180
+ Message: function () {
1181
+ Gn.create('button', {
1182
+ target: '.new-message',
1183
+ onClick: function () {
1184
+ Gn.create('message', {
1185
+ target: '.page-message',
1186
+ textSets: { message: '메세지가 생성됩니다!<br>잠시만 기다려주세요.' }
1187
+ });
1188
+ }
1189
+ });
1190
+ },
1191
+ MenuButton: function () {
1192
+ Gn.create('menubutton', {
1193
+ target: 'button[name=new-button]',
1194
+ size: 'normal',
1195
+ textSets: {
1196
+ buttonText: '메뉴버튼'
1197
+ },
1198
+ onSelect: function (menu) {
1199
+ console.log('선택된 메뉴는 ' + menu);
1200
+ },
1201
+ data: [
1202
+ [
1203
+ {
1204
+ text: 'menu1',
1205
+ value: 'menu1'
1206
+ },
1207
+ {
1208
+ text: 'menu2',
1209
+ value: 'menu2'
1210
+ }
1211
+ ],
1212
+ [
1213
+ {
1214
+ text: '환경설정',
1215
+ html: '<span class="gn-icon is-small"><i class="fas fa-cogs"></i>설정</span>',
1216
+ value: 'menu1'
1217
+ },
1218
+ {
1219
+ text: 'Exit',
1220
+ value: 'exit'
1221
+ }
1222
+ ]
1223
+ ]
1224
+ });
1225
+ Gn.create('menubutton', {
1226
+ target: 'button[name=new-button2]',
1227
+ style: 'simple',
1228
+ icon: 'list',
1229
+ data: [
1230
+ {
1231
+ text: 'menu1',
1232
+ value: 'menu1'
1233
+ },
1234
+ {
1235
+ text: 'menu2',
1236
+ value: 'menu2'
1237
+ }
1238
+ ]
1239
+ });
1240
+ },
1241
+ Modal: function () {
1242
+ Gn.create('button', {
1243
+ target: '.new-modal',
1244
+ onClick: function () {
1245
+ Gn.create('modal', {
1246
+ textSets: { title: '새로운 모달' },
1247
+ hasConfirm: true,
1248
+ hasCancel: true,
1249
+ height: 600,
1250
+ onConfirm: function () {
1251
+ console.log('확인하였습니다.');
1252
+ },
1253
+ 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>'
1254
+ });
1255
+ }
1256
+ });
1257
+ Gn.create('button', {
1258
+ target: '.new-popup',
1259
+ onClick: function () {
1260
+ Gn.create('modal', {
1261
+ textSets: { title: '새로운 팝업' },
1262
+ contents:
1263
+ '<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>',
1264
+ isModal: false,
1265
+ draggable: true,
1266
+ minimized: true,
1267
+ resizable: true
1268
+ });
1269
+ }
1270
+ });
1271
+ },
1272
+ Pagination: function () {
1273
+ Gn.create('pagination', {
1274
+ target: '.new-pagination',
1275
+ total: 12000,
1276
+ onChange: p => {
1277
+ console.log(p);
1278
+ }
1279
+ });
1280
+ },
1281
+ MultiText: function () {
1282
+ Gn.create('multitext', {
1283
+ target: '.default-multitext'
1284
+ });
1285
+ Gn.create('multitext', {
1286
+ target: '.new-multitext',
1287
+ lang: ['en', 'ko', 'cn'],
1288
+ value: {
1289
+ en: 'hello',
1290
+ ko: '안녕하세요',
1291
+ cn: 'HELLO'
1292
+ },
1293
+ rows: 1,
1294
+ maxlength: 300
1295
+ });
1296
+ },
1297
+ Picklist: function () {
1298
+ Gn.create('picklist', {
1299
+ target: '.new-picklist',
1300
+ data: {
1301
+ source: [
1302
+ { value: 'item1', text: '항목1' },
1303
+ { value: 'item2', text: '항목2' },
1304
+ { value: 'item5', text: '항목3' },
1305
+ { value: 'item4', text: '항목4' },
1306
+ { value: 'item5', text: '항목5' },
1307
+ { value: 'item6', text: '항목6' },
1308
+ { value: 'item7', text: '항목7' },
1309
+ { value: 'item8', text: '항목8' }
1310
+ ],
1311
+ target: []
1312
+ },
1313
+ hasSourceSearch: true,
1314
+ hasTargetSearch: true,
1315
+ width: '80%',
1316
+ height: 180,
1317
+ onChange: function (s, t) {
1318
+ console.log(s, t);
1319
+ },
1320
+ orderable: 'target'
1321
+ });
1322
+ Gn.create('picklist', {
1323
+ target: '.new-picklist-v',
1324
+ data: {
1325
+ source: [
1326
+ { value: '항목1', text: 'item1' },
1327
+ { value: '항목2', text: 'item2' },
1328
+ { value: '항목3', text: 'item3' },
1329
+ { value: '항목4', text: 'item4' },
1330
+ { value: '항목5', text: 'item5' }
1331
+ ],
1332
+ target: []
1333
+ },
1334
+ direction: 'vertical',
1335
+ width: '500px',
1336
+ height: 150,
1337
+ textSets: {
1338
+ sourceCaption: '할당가능',
1339
+ targetCaption: '할당됨'
1340
+ }
1341
+ });
1342
+ },
1343
+ Progressbar: function () {
1344
+ Gn.create('progressbar', {
1345
+ target: '.new-progress-indeterminate',
1346
+ color: 'info',
1347
+ size: 'medium',
1348
+ indeterminate: true
1349
+ });
1350
+ const progress = Gn.create('progressbar', {
1351
+ target: '.new-progress',
1352
+ color: 'primary',
1353
+ size: 'medium',
1354
+ value: 30,
1355
+ hasFigure: true
1356
+ });
1357
+ Gn.create('button', {
1358
+ target: '.btn0',
1359
+ size: 'small',
1360
+ onClick: function () {
1361
+ progress.setValue(0);
1362
+ }
1363
+ });
1364
+ Gn.create('button', {
1365
+ target: '.btn20',
1366
+ size: 'small',
1367
+ onClick: function () {
1368
+ progress.setValue(20);
1369
+ }
1370
+ });
1371
+ Gn.create('button', {
1372
+ target: '.btn50',
1373
+ size: 'small',
1374
+ onClick: function () {
1375
+ progress.setValue(50);
1376
+ }
1377
+ });
1378
+ Gn.create('button', {
1379
+ target: '.btn70',
1380
+ size: 'small',
1381
+ onClick: function () {
1382
+ progress.setValue(70);
1383
+ }
1384
+ });
1385
+ Gn.create('button', {
1386
+ target: '.btn100',
1387
+ size: 'small',
1388
+ onClick: function () {
1389
+ progress.setValue(100);
1390
+ }
1391
+ });
1392
+ },
1393
+ SelectButton: function () {
1394
+ Gn.create('selectbutton', {
1395
+ target: '.new-selectButtons',
1396
+ size: 'normal',
1397
+ value: 'menu2',
1398
+ onChange: function (option) {
1399
+ console.log('선택된 옵션은 ' + option);
1400
+ },
1401
+ data: [
1402
+ {
1403
+ text: 'menu1',
1404
+ value: 'menu1'
1405
+ },
1406
+ {
1407
+ text: 'menu2',
1408
+ value: 'menu2'
1409
+ },
1410
+ {
1411
+ text: 'menu3',
1412
+ value: 'menu3'
1413
+ },
1414
+ {
1415
+ text: 'menu4',
1416
+ value: 'menu4'
1417
+ }
1418
+ ]
1419
+ });
1420
+ Gn.create('selectbutton', {
1421
+ target: '.new-selectButtons-v',
1422
+ size: 'normal',
1423
+ value: 'menu1,menu2',
1424
+ multiple: true,
1425
+ align: 'vertical',
1426
+ onChange: function (option) {
1427
+ console.log('선택된 옵션은 ' + option);
1428
+ },
1429
+ data: [
1430
+ {
1431
+ text: 'menu1',
1432
+ value: 'menu1'
1433
+ },
1434
+ {
1435
+ text: 'menu2',
1436
+ value: 'menu2'
1437
+ },
1438
+ {
1439
+ text: 'menu3',
1440
+ value: 'menu3'
1441
+ },
1442
+ {
1443
+ text: 'menu4',
1444
+ value: 'menu4'
1445
+ }
1446
+ ]
1447
+ });
1448
+ },
1449
+ Splitter: function () {
1450
+ Gn.create('splitter', {
1451
+ target: '#horizontal-splitter',
1452
+ panel: ['#frame1', '#frame2'],
1453
+ position: '30%',
1454
+ onDrag: function (e) {
1455
+ console.log('dragging');
1456
+ },
1457
+ onDragStart: function (e) {
1458
+ console.log('drag start');
1459
+ },
1460
+ onDragEnd: function (e) {
1461
+ console.log(e, 'drag End');
1462
+ },
1463
+ orientation: 'horizontal'
1464
+ });
1465
+ Gn.create('splitter', {
1466
+ target: '#vertical-splitter',
1467
+ panel: ['#frame3', '#frame4'],
1468
+ space: 20,
1469
+ minPosition: 40,
1470
+ position: '30%',
1471
+ orientation: 'vertical'
1472
+ });
1473
+ },
1474
+ Switch: function () {
1475
+ Gn.create('switch', {
1476
+ target: '.new-switch',
1477
+ size: 'large',
1478
+ color: 'info',
1479
+ checked: true,
1480
+ onToggle: function (e) {
1481
+ console.log('toggle 이벤트');
1482
+ }
1483
+ });
1484
+ },
1485
+ SyntaxInput: function () {
1486
+ Gn.create('syntaxinput', {
1487
+ target: '.syntaxInput'
1488
+ });
1489
+ Gn.create('syntaxinput', {
1490
+ target: '.syntaxInput2',
1491
+ multiple: true,
1492
+ usetab: true
1493
+ });
1494
+ Gn.create('syntaxinput', {
1495
+ target: '.syntaxInput3',
1496
+ type: 'custom',
1497
+ patterns: {
1498
+ constant: {
1499
+ pattern: /\w+:?(?=\/)/gm
1500
+ },
1501
+ keyword: {
1502
+ pattern: /[^/]*$/gm
1503
+ }
1504
+ }
1505
+ });
1506
+ },
1507
+ Tab: function () {
1508
+ Gn.create('tab', {
1509
+ target: '#newTab',
1510
+ align: 'center',
1511
+ contents: '#newContents',
1512
+ onChange: function (idx, tab) {
1513
+ console.log(idx + '번 탭이 활성화 되었습니다.');
1514
+ }
1515
+ });
1516
+ },
1517
+ Tagcloud: function () {
1518
+ Gn.create('tagcloud', {
1519
+ target: '.new-tagcloud',
1520
+ width: '250px',
1521
+ data: [
1522
+ {
1523
+ text: 'Genians',
1524
+ value: 50
1525
+ },
1526
+ {
1527
+ text: 'NAC',
1528
+ value: 33
1529
+ },
1530
+ {
1531
+ text: 'Typescript',
1532
+ value: 12
1533
+ },
1534
+ {
1535
+ text: 'Insights',
1536
+ value: 26
1537
+ },
1538
+ {
1539
+ text: 'Network',
1540
+ value: 3
1541
+ },
1542
+ {
1543
+ text: 'sass',
1544
+ value: 1
1545
+ },
1546
+ {
1547
+ text: 'EDR',
1548
+ value: 19
1549
+ },
1550
+ {
1551
+ text: 'Front-end',
1552
+ value: 6
1553
+ },
1554
+ {
1555
+ text: 'GNUI',
1556
+ value: 42
1557
+ },
1558
+ {
1559
+ text: 'Framework',
1560
+ value: 1
1561
+ }
1562
+ ]
1563
+ });
1564
+ },
1565
+ Tooltip: function () {
1566
+ Gn.create('tooltip', {
1567
+ target: '.has-tooltip1',
1568
+ contents: '.new-contents',
1569
+ direction: 'left',
1570
+ type: 'click'
1571
+ });
1572
+ Gn.create('tooltip', {
1573
+ target: '.has-tooltip2',
1574
+ contents: '기본값 bottom 툴팁'
1575
+ });
1576
+ Gn.create('tooltip', {
1577
+ target: '.has-tooltip3',
1578
+ contents: 'top 툴팁',
1579
+ direction: 'top'
1580
+ });
1581
+ Gn.create('tooltip', {
1582
+ target: '.has-tooltip4',
1583
+ contents: 'right 툴팁',
1584
+ direction: 'right'
1585
+ });
1586
+ Gn.create('tooltip', {
1587
+ target: '.has-tooltip5',
1588
+ contents: 'left top 툴팁',
1589
+ direction: 'left-top',
1590
+ width: '200px'
1591
+ });
1592
+ Gn.create('tooltip', {
1593
+ target: '.has-tooltip6',
1594
+ contents: 'left bottom 툴팁',
1595
+ direction: 'left-bottom'
1596
+ });
1597
+ Gn.create('tooltip', {
1598
+ target: '.has-tooltip7',
1599
+ contents:
1600
+ '</b>자주 사용되는 정규식 특수문자</b><br/><br/>. 임의의 한 문자 예) .* 모든문자열<br/>^ 문자열 시작 예) ^Genians Genians으로 시작하는 문자열<br/>$ 문자열 끝 예) Genians$ Genians로 끝나는 문자열<br/>[ 문자집합 시작 표시 예) [ab] a 또는 b문자가 포함되는 문자열<br/>] 문자집합 끝 표시<br/>( 문자열 집합 시작 예) a(b)|(c)d abd 또는 acd를 의미<br/> 문자열 집합 끝<br/>| 또는(OR)<br/> 특수한 기능을 하는 다음 문자표시 예) . Period 문자표시<br/>n* 0개 이상의 n문자<br/>n+ 1개 이상의 n문자<br/>&#123;n&#125; 앞문자가 n개 예) ab&#123;2&#125;c abbc를 의미<br/>&#123;n,&#125; 앞문자가 n개 이상<br/>&#123;,m&#125; 앞문자가 m개 이하<br/>&#123;n,m&#125; 앞문자가 n개 이상 m개 이하<br/>',
1601
+ direction: 'right-top'
1602
+ });
1603
+ Gn.create('tooltip', {
1604
+ target: '.has-tooltip8',
1605
+ contents: '<br/>right bottom 툴팁<br/>',
1606
+ direction: 'right-bottom',
1607
+ delay: 500
1608
+ });
1609
+ },
1610
+ Time: function () {
1611
+ Gn.create('time', {
1612
+ target: '.new-time',
1613
+ onChange: function (time) {
1614
+ console.log(time);
1615
+ },
1616
+ value: '22:33:44'
1617
+ });
1618
+ Gn.create('time', {
1619
+ target: '.new-time2',
1620
+ timeFormat: 'hh:mm',
1621
+ onChange: function (time) {
1622
+ console.log(time);
1623
+ },
1624
+ value: '6:2',
1625
+ hasControls: false
1626
+ });
1627
+ },
1628
+ Tree: function () {
1629
+ Gn.create('tree', {
1630
+ target: '.new-tree1',
1631
+ data: [
1632
+ {
1633
+ text: 'Genians',
1634
+ child: [
1635
+ {
1636
+ text: 'GNUI'
1637
+ },
1638
+ {
1639
+ text: 'GNUI core'
1640
+ },
1641
+ {
1642
+ text: 'GNConfEngine'
1643
+ }
1644
+ ]
1645
+ },
1646
+ {
1647
+ text: 'R&D Center',
1648
+ child: [
1649
+ {
1650
+ text: 'GNUI'
1651
+ },
1652
+ {
1653
+ text: 'GNUI core'
1654
+ },
1655
+ {
1656
+ text: 'GNConfEngine'
1657
+ }
1658
+ ]
1659
+ },
1660
+ {
1661
+ text: 'Front-end'
1662
+ }
1663
+ ],
1664
+ type: 'borderless'
1665
+ });
1666
+ Gn.create('tree', {
1667
+ target: '.new-tree2',
1668
+ data: [
1669
+ {
1670
+ text: 'Genians',
1671
+ child: [
1672
+ {
1673
+ text: 'GNUI'
1674
+ },
1675
+ {
1676
+ text: 'GNUI core'
1677
+ },
1678
+ {
1679
+ text: 'GNConfEngine'
1680
+ }
1681
+ ]
1682
+ },
1683
+ {
1684
+ text: 'R&D Center',
1685
+ child: [
1686
+ {
1687
+ text: 'GNUI'
1688
+ },
1689
+ {
1690
+ text: 'GNUI core'
1691
+ },
1692
+ {
1693
+ text: 'GNConfEngine'
1694
+ }
1695
+ ]
1696
+ },
1697
+ {
1698
+ text: 'Front-end'
1699
+ }
1700
+ ],
1701
+ color: 'success',
1702
+ multiple: true
1703
+ });
1704
+ Gn.create('tree', {
1705
+ target: '.new-tree3',
1706
+ data: [
1707
+ {
1708
+ text: 'Genians',
1709
+ actived: true,
1710
+ opened: true,
1711
+ child: [
1712
+ {
1713
+ text: 'GNUI'
1714
+ },
1715
+ {
1716
+ text: 'GNUI core',
1717
+ opened: true,
1718
+ child: [
1719
+ {
1720
+ text: 'GNUI'
1721
+ },
1722
+ {
1723
+ text: 'GNUI core'
1724
+ },
1725
+ {
1726
+ text: 'GNConfEngine',
1727
+ selected: true
1728
+ }
1729
+ ]
1730
+ },
1731
+ {
1732
+ text: 'GNConfEngine'
1733
+ }
1734
+ ]
1735
+ },
1736
+ {
1737
+ text: 'R&D Center',
1738
+ child: [
1739
+ {
1740
+ text: 'GNUI'
1741
+ },
1742
+ {
1743
+ text: 'GNUI core'
1744
+ },
1745
+ {
1746
+ text: 'GNConfEngine'
1747
+ }
1748
+ ]
1749
+ },
1750
+ {
1751
+ text: 'Front-end'
1752
+ }
1753
+ ],
1754
+ hasCheck: true
1755
+ });
1756
+ }
1757
+ };