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