gnui 1.2.20 → 1.2.22
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.
- package/@types/gnui.d.ts +8 -0
- package/dist/js/gnui.esm.js +712 -153
- package/dist/js/gnui.js +712 -153
- package/dist/js/gnui.min.js +6 -6
- package/dist/styles/default.css +144 -0
- package/dist/styles/gpi.css +144 -0
- package/dist/styles/green24.css +145 -1
- package/dist/styles/insights.css +144 -0
- package/dist/styles/nac.css +144 -0
- package/dist/styles/ztnac.css +145 -1
- package/package.json +7 -2
- package/styleguide/assets/components.js +237 -9
- package/styleguide/assets/js/gnui.js +712 -153
- package/styleguide/assets/js/gnui.min.js +6 -6
- package/styleguide/assets/styles/default.css +144 -0
- package/styleguide/assets/styles/gpi.css +144 -0
- package/styleguide/assets/styles/green24.css +145 -1
- package/styleguide/assets/styles/insights.css +144 -0
- package/styleguide/assets/styles/nac.css +144 -0
- package/styleguide/assets/styles/ztnac.css +145 -1
- package/styleguide/category/COLOR/index.html +1 -1
- package/styleguide/category/COMPONENT/Alert(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Bignumber/index.html +1 -1
- package/styleguide/category/COMPONENT/Breadcrumb/index.html +1 -1
- package/styleguide/category/COMPONENT/Calendar(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Card/index.html +1 -1
- package/styleguide/category/COMPONENT/Chart(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Datagrid(js)/index.html +109 -11
- package/styleguide/category/COMPONENT/Datalist(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Growl(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/JsonView(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Loader(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/MenuButton(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Message(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Modal(js)/index.html +31 -1
- package/styleguide/category/COMPONENT/Pagination(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Panel/index.html +1 -1
- package/styleguide/category/COMPONENT/Progressbar(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tab(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tooltip(js)/index.html +1 -1
- package/styleguide/category/COMPONENT/Tree(js)/index.html +83 -19
- package/styleguide/category/CONTROLS/Button(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Checkbox/index.html +1 -1
- package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Datepicker(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Dropdown(js)/index.html +83 -1
- package/styleguide/category/CONTROLS/File/index.html +1 -1
- package/styleguide/category/CONTROLS/Form/Control/index.html +1 -1
- package/styleguide/category/CONTROLS/Form/Field/index.html +53 -1
- package/styleguide/category/CONTROLS/Form/Plain/index.html +1 -1
- package/styleguide/category/CONTROLS/Input/index.html +1 -1
- package/styleguide/category/CONTROLS/MultiText(js)/index.html +32 -1
- package/styleguide/category/CONTROLS/Picklist(js)/index.html +35 -1
- package/styleguide/category/CONTROLS/Radio/index.html +1 -1
- package/styleguide/category/CONTROLS/Select/index.html +1 -1
- package/styleguide/category/CONTROLS/SelectButton(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Slider/index.html +1 -1
- package/styleguide/category/CONTROLS/SortableList(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Switch(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +1 -1
- package/styleguide/category/CONTROLS/Textarea/index.html +1 -1
- package/styleguide/category/CONTROLS/Time(js)/index.html +1 -1
- package/styleguide/category/ELEMENTS/Box/index.html +1 -1
- package/styleguide/category/ELEMENTS/Icon/index.html +1 -1
- package/styleguide/category/ELEMENTS/Image/index.html +1 -1
- package/styleguide/category/ELEMENTS/List/index.html +1 -1
- package/styleguide/category/ELEMENTS/Table/index.html +1 -1
- package/styleguide/category/ELEMENTS/Tag/index.html +1 -1
- package/styleguide/category/ELEMENTS/Title/index.html +1 -1
- package/styleguide/category/LAYOUT/Container/index.html +1 -1
- package/styleguide/category/LAYOUT/Grid/index.html +1 -1
- package/styleguide/category/LAYOUT/Splitter(js)/index.html +1 -1
- package/styleguide/category/UTILITY/index.html +9 -2
- package/styleguide/category/Utils/index.html +1 -1
- package/styleguide/color.html +1 -1
- package/styleguide/index.html +1 -1
- package/styleguide/tag/javascript/index.html +368 -29
- package/styleguide/tag/v.0.1.0/index.html +428 -30
|
@@ -76,6 +76,10 @@ const components = {
|
|
|
76
76
|
{
|
|
77
77
|
name: 'data2',
|
|
78
78
|
data: [50, 20, 10, 40, 15, 25]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'data3',
|
|
82
|
+
data: [20, 100, 400, 150, 250, 30]
|
|
79
83
|
}
|
|
80
84
|
],
|
|
81
85
|
xaxis: {
|
|
@@ -94,7 +98,16 @@ const components = {
|
|
|
94
98
|
{
|
|
95
99
|
name: 'data1',
|
|
96
100
|
data: [30, 200, 100, 400, 150, 250]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'data2',
|
|
104
|
+
data: [50, 20, 10, 40, 15, 25]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'data3',
|
|
108
|
+
data: [20, 100, 400, 150, 250, 30]
|
|
97
109
|
}
|
|
110
|
+
|
|
98
111
|
],
|
|
99
112
|
xaxis: {
|
|
100
113
|
type: 'datetime',
|
|
@@ -117,6 +130,10 @@ const components = {
|
|
|
117
130
|
{
|
|
118
131
|
name: 'data2',
|
|
119
132
|
data: [50, 20, 10, 40, 15, 25]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'data3',
|
|
136
|
+
data: [20, 100, 400, 150, 250, 30]
|
|
120
137
|
}
|
|
121
138
|
],
|
|
122
139
|
width: '45%'
|
|
@@ -325,6 +342,68 @@ const components = {
|
|
|
325
342
|
{ value: '5', cols: ['항목5', '카테고리B', '5000'] }
|
|
326
343
|
]
|
|
327
344
|
});
|
|
345
|
+
Gn.create('dropdown', {
|
|
346
|
+
target: '.new-dropdown6',
|
|
347
|
+
width: '200px',
|
|
348
|
+
data: [
|
|
349
|
+
{ value: 'win', text: 'Windows' },
|
|
350
|
+
{ value: 'mac', text: 'macOS' },
|
|
351
|
+
{ value: 'linux', text: 'Linux' },
|
|
352
|
+
{ value: 'android', text: 'Android' },
|
|
353
|
+
{ value: 'ios', text: 'iOS' }
|
|
354
|
+
],
|
|
355
|
+
optionTooltip: {
|
|
356
|
+
direction: 'right',
|
|
357
|
+
content: function (option) {
|
|
358
|
+
var descriptions = {
|
|
359
|
+
win: '마이크로소프트의 데스크톱 운영체제',
|
|
360
|
+
mac: '애플의 데스크톱 운영체제',
|
|
361
|
+
linux: '오픈소스 기반 운영체제',
|
|
362
|
+
android: '구글의 모바일 운영체제',
|
|
363
|
+
ios: '애플의 모바일 운영체제'
|
|
364
|
+
};
|
|
365
|
+
var desc = descriptions[option.value] || '';
|
|
366
|
+
return '<div style="min-width:160px"><strong>' + option.text + '</strong><p style="margin:4px 0 0">' + desc + '</p></div>';
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
Gn.create('dropdown', {
|
|
371
|
+
target: '.new-dropdown7',
|
|
372
|
+
width: '200px',
|
|
373
|
+
data: [
|
|
374
|
+
{ value: 'host1', text: '192.168.0.1' },
|
|
375
|
+
{ value: 'host2', text: '192.168.0.2' },
|
|
376
|
+
{ value: 'host3', text: '10.0.0.1' },
|
|
377
|
+
{ value: 'host4', text: '10.0.0.2' }
|
|
378
|
+
],
|
|
379
|
+
optionTooltip: {
|
|
380
|
+
direction: 'right',
|
|
381
|
+
fetch: function (option) {
|
|
382
|
+
return new Promise(function (resolve) {
|
|
383
|
+
setTimeout(function () {
|
|
384
|
+
var mockData = {
|
|
385
|
+
host1: { name: 'Server-A', os: 'Windows Server 2022', status: 'online' },
|
|
386
|
+
host2: { name: 'Server-B', os: 'Ubuntu 22.04', status: 'online' },
|
|
387
|
+
host3: { name: 'Router-1', os: 'Cisco IOS', status: 'online' },
|
|
388
|
+
host4: { name: 'Switch-1', os: 'Cisco NX-OS', status: 'offline' }
|
|
389
|
+
};
|
|
390
|
+
var d = mockData[option.value];
|
|
391
|
+
var statusColor = d.status === 'online' ? 'success' : 'danger';
|
|
392
|
+
resolve(
|
|
393
|
+
'<div style="min-width:180px">' +
|
|
394
|
+
'<strong>' + d.name + '</strong>' +
|
|
395
|
+
'<ul style="margin:6px 0 0;padding:0;list-style:none">' +
|
|
396
|
+
'<li>IP: ' + option.text + '</li>' +
|
|
397
|
+
'<li>OS: ' + d.os + '</li>' +
|
|
398
|
+
'<li>상태: <span class="gn-tag is-' + statusColor + ' is-small">' + d.status + '</span></li>' +
|
|
399
|
+
'</ul>' +
|
|
400
|
+
'</div>'
|
|
401
|
+
);
|
|
402
|
+
}, 500);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
});
|
|
328
407
|
},
|
|
329
408
|
Datagrid: function () {
|
|
330
409
|
Gn.create('datagrid', {
|
|
@@ -626,6 +705,64 @@ const components = {
|
|
|
626
705
|
console.log(updatedData);
|
|
627
706
|
}
|
|
628
707
|
});
|
|
708
|
+
Gn.create('datagrid', {
|
|
709
|
+
target: '.new-grid4',
|
|
710
|
+
orientation: 'horizontal',
|
|
711
|
+
orientationOptions: {
|
|
712
|
+
columns: 'auto-fit',
|
|
713
|
+
minWidth: '240px'
|
|
714
|
+
},
|
|
715
|
+
hasHeader: true,
|
|
716
|
+
hasCheck: true,
|
|
717
|
+
hasDelete: true,
|
|
718
|
+
headers: [
|
|
719
|
+
{
|
|
720
|
+
label: '이름',
|
|
721
|
+
key: 'name'
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
label: '부서',
|
|
725
|
+
key: 'team'
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
label: '상태',
|
|
729
|
+
key: 'status',
|
|
730
|
+
template: function (k, d) {
|
|
731
|
+
return '<span class="tag is-info">' + d[k] + '</span>';
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
],
|
|
735
|
+
data: [
|
|
736
|
+
{
|
|
737
|
+
name: '홍길동',
|
|
738
|
+
team: '플랫폼개발',
|
|
739
|
+
status: 'ACTIVE'
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: '김철수',
|
|
743
|
+
team: '디자인시스템',
|
|
744
|
+
status: 'PENDING'
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
name: '이영희',
|
|
748
|
+
team: 'QA',
|
|
749
|
+
status: 'DONE'
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
name: '박민수',
|
|
753
|
+
team: '프론트엔드',
|
|
754
|
+
status: 'ACTIVE'
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
name: '최지우',
|
|
758
|
+
team: '서비스기획',
|
|
759
|
+
status: 'REVIEW'
|
|
760
|
+
}
|
|
761
|
+
],
|
|
762
|
+
textSets: {
|
|
763
|
+
deleteConfirmMessage: '카드를 삭제하시겠습니까?'
|
|
764
|
+
}
|
|
765
|
+
});
|
|
629
766
|
},
|
|
630
767
|
Datalist: function () {
|
|
631
768
|
Gn.create('datalist', {
|
|
@@ -1467,6 +1604,25 @@ const components = {
|
|
|
1467
1604
|
});
|
|
1468
1605
|
}
|
|
1469
1606
|
});
|
|
1607
|
+
// Modal(Extra) 예제 버튼 바인딩
|
|
1608
|
+
Gn.create('button', {
|
|
1609
|
+
target: '.new-modal-extra',
|
|
1610
|
+
onClick: function () {
|
|
1611
|
+
console.log('[Guide][Modal] .new-modal-extra clicked');
|
|
1612
|
+
Gn.create('modal', {
|
|
1613
|
+
textSets: { title: 'Extra Buttons Demo' },
|
|
1614
|
+
hasCancel: true,
|
|
1615
|
+
height: 400,
|
|
1616
|
+
extraButtons: [
|
|
1617
|
+
{ key: 'edit-template', label: '수정(템플릿만적용)', className: 'is-small is-primary' },
|
|
1618
|
+
{ key: 'edit-bulk', label: '수정(용도일괄적용)', className: 'is-small is-mono' }
|
|
1619
|
+
],
|
|
1620
|
+
onExtra: function (actionKey) {
|
|
1621
|
+
console.log('extra clicked:', actionKey);
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
});
|
|
1470
1626
|
},
|
|
1471
1627
|
Pagination: function () {
|
|
1472
1628
|
Gn.create('pagination', {
|
|
@@ -1492,6 +1648,19 @@ const components = {
|
|
|
1492
1648
|
rows: 1,
|
|
1493
1649
|
maxlength: 300
|
|
1494
1650
|
});
|
|
1651
|
+
Gn.create('multitext', {
|
|
1652
|
+
target: '.message-multitext',
|
|
1653
|
+
lang: ['ko', 'en'],
|
|
1654
|
+
value: {
|
|
1655
|
+
ko: '옵션 문구 예시',
|
|
1656
|
+
en: 'message example'
|
|
1657
|
+
},
|
|
1658
|
+
maxlength: 120,
|
|
1659
|
+
useMaxLengthMessage: true,
|
|
1660
|
+
textSets: {
|
|
1661
|
+
maxLengthMessage: '{{maxlength}}자 입력 가능합니다.'
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1495
1664
|
},
|
|
1496
1665
|
Picklist: function () {
|
|
1497
1666
|
Gn.create('picklist', {
|
|
@@ -1552,6 +1721,26 @@ const components = {
|
|
|
1552
1721
|
width: '500px',
|
|
1553
1722
|
height: 150
|
|
1554
1723
|
});
|
|
1724
|
+
Gn.create('picklist', {
|
|
1725
|
+
target: '.new-picklist-tooltip',
|
|
1726
|
+
data: {
|
|
1727
|
+
source: [
|
|
1728
|
+
{ value: '항목1', text: 'item1' },
|
|
1729
|
+
{ value: '항목2', text: 'item2' },
|
|
1730
|
+
{ value: '항목3', text: 'item3' }
|
|
1731
|
+
],
|
|
1732
|
+
target: []
|
|
1733
|
+
},
|
|
1734
|
+
optionTooltip: {
|
|
1735
|
+
direction: 'right',
|
|
1736
|
+
content: function(option) {
|
|
1737
|
+
return '<div style="padding: 10px; max-width: 200px;">' + option.text + '에 대한 추가 정보입니다.</div>';
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
direction: 'horizontal',
|
|
1741
|
+
width: '500px',
|
|
1742
|
+
height: 150
|
|
1743
|
+
});
|
|
1555
1744
|
},
|
|
1556
1745
|
SortableList: function () {
|
|
1557
1746
|
Gn.create('sortablelist', {
|
|
@@ -1961,59 +2150,98 @@ const components = {
|
|
|
1961
2150
|
}
|
|
1962
2151
|
],
|
|
1963
2152
|
color: 'success',
|
|
1964
|
-
|
|
2153
|
+
hasCheck: false
|
|
1965
2154
|
});
|
|
1966
2155
|
Gn.create('tree', {
|
|
1967
2156
|
target: '.new-tree3',
|
|
1968
2157
|
data: [
|
|
1969
2158
|
{
|
|
1970
2159
|
text: 'Genians',
|
|
2160
|
+
value: 'genians',
|
|
1971
2161
|
actived: true,
|
|
1972
2162
|
opened: true,
|
|
1973
2163
|
child: [
|
|
1974
2164
|
{
|
|
1975
|
-
text: 'GNUI'
|
|
2165
|
+
text: 'GNUI',
|
|
2166
|
+
value: 'gnui'
|
|
1976
2167
|
},
|
|
1977
2168
|
{
|
|
1978
2169
|
text: 'GNUI core',
|
|
2170
|
+
value: 'gnui-core',
|
|
1979
2171
|
opened: true,
|
|
1980
2172
|
child: [
|
|
1981
2173
|
{
|
|
1982
|
-
text: 'GNUI'
|
|
2174
|
+
text: 'GNUI',
|
|
2175
|
+
value: 'gnui-nested'
|
|
1983
2176
|
},
|
|
1984
2177
|
{
|
|
1985
|
-
text: 'GNUI core'
|
|
2178
|
+
text: 'GNUI core',
|
|
2179
|
+
value: 'gnui-core-nested'
|
|
1986
2180
|
},
|
|
1987
2181
|
{
|
|
1988
2182
|
text: 'GNConfEngine',
|
|
2183
|
+
value: 'gnconfengine-nested',
|
|
1989
2184
|
selected: true
|
|
1990
2185
|
}
|
|
1991
2186
|
]
|
|
1992
2187
|
},
|
|
1993
2188
|
{
|
|
1994
|
-
text: 'GNConfEngine'
|
|
2189
|
+
text: 'GNConfEngine',
|
|
2190
|
+
value: 'gnconfengine'
|
|
1995
2191
|
}
|
|
1996
2192
|
]
|
|
1997
2193
|
},
|
|
1998
2194
|
{
|
|
1999
2195
|
text: 'R&D Center',
|
|
2196
|
+
value: 'rnd-center',
|
|
2000
2197
|
child: [
|
|
2001
2198
|
{
|
|
2002
|
-
text: 'GNUI'
|
|
2199
|
+
text: 'GNUI',
|
|
2200
|
+
value: 'rnd-gnui'
|
|
2003
2201
|
},
|
|
2004
2202
|
{
|
|
2005
|
-
text: 'GNUI core'
|
|
2203
|
+
text: 'GNUI core',
|
|
2204
|
+
value: 'rnd-gnui-core'
|
|
2006
2205
|
},
|
|
2007
2206
|
{
|
|
2008
|
-
text: 'GNConfEngine'
|
|
2207
|
+
text: 'GNConfEngine',
|
|
2208
|
+
value: 'rnd-gnconfengine'
|
|
2009
2209
|
}
|
|
2010
2210
|
]
|
|
2011
2211
|
},
|
|
2012
2212
|
{
|
|
2013
|
-
text: 'Front-end'
|
|
2213
|
+
text: 'Front-end',
|
|
2214
|
+
value: 'frontend'
|
|
2014
2215
|
}
|
|
2015
2216
|
],
|
|
2016
2217
|
hasCheck: true
|
|
2017
2218
|
});
|
|
2219
|
+
Gn.create('tree', {
|
|
2220
|
+
target: '.new-tree4',
|
|
2221
|
+
data: [
|
|
2222
|
+
{
|
|
2223
|
+
text: 'Disabled Root',
|
|
2224
|
+
value: 'disabled-root',
|
|
2225
|
+
opened: true,
|
|
2226
|
+
child: [
|
|
2227
|
+
{
|
|
2228
|
+
text: 'Locked Node',
|
|
2229
|
+
value: 'locked-node',
|
|
2230
|
+
selected: true
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
text: 'Review Only',
|
|
2234
|
+
value: 'review-only'
|
|
2235
|
+
}
|
|
2236
|
+
]
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
text: 'Disabled Leaf',
|
|
2240
|
+
value: 'disabled-leaf'
|
|
2241
|
+
}
|
|
2242
|
+
],
|
|
2243
|
+
hasCheck: true,
|
|
2244
|
+
disabled: true
|
|
2245
|
+
});
|
|
2018
2246
|
}
|
|
2019
2247
|
};
|