gnui 1.2.13 → 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.
- package/dist/js/gnui.esm.js +40432 -0
- package/dist/js/gnui.js +40440 -0
- package/dist/js/gnui.min.js +23 -0
- package/dist/styles/default.css +1 -0
- package/dist/styles/gpi.css +1 -0
- package/dist/styles/green24.css +1 -0
- package/dist/styles/insights.css +1 -0
- package/dist/styles/nac.css +1 -0
- package/dist/styles/ztnac.css +1 -0
- package/package.json +1 -1
- package/styleguide/assets/components.js +1757 -0
- package/styleguide/assets/favicon.ico +0 -0
- package/styleguide/assets/guide.js +47 -0
- package/styleguide/assets/image.png +0 -0
- package/styleguide/assets/js/gnui.js +40440 -0
- package/styleguide/assets/js/gnui.min.js +23 -0
- package/styleguide/assets/okadia.css +121 -0
- package/styleguide/assets/styles/default.css +1 -0
- package/styleguide/assets/styles/gpi.css +1 -0
- package/styleguide/assets/styles/green24.css +1 -0
- package/styleguide/assets/styles/insights.css +1 -0
- package/styleguide/assets/styles/nac.css +1 -0
- package/styleguide/assets/styles/ztnac.css +1 -0
- package/styleguide/assets/theme.css +596 -0
- package/styleguide/category/COLOR/index.html +157 -0
- package/styleguide/category/COMPONENT/Alert(js)/index.html +419 -0
- package/styleguide/category/COMPONENT/Bignumber/index.html +270 -0
- package/styleguide/category/COMPONENT/Breadcrumb/index.html +325 -0
- package/styleguide/category/COMPONENT/Calendar(js)/index.html +243 -0
- package/styleguide/category/COMPONENT/Card/index.html +185 -0
- package/styleguide/category/COMPONENT/Chart(js)/index.html +556 -0
- package/styleguide/category/COMPONENT/Datagrid(js)/index.html +685 -0
- package/styleguide/category/COMPONENT/Datalist(js)/index.html +472 -0
- package/styleguide/category/COMPONENT/Growl(js)/index.html +352 -0
- package/styleguide/category/COMPONENT/JsonView(js)/index.html +1135 -0
- package/styleguide/category/COMPONENT/Loader(js)/index.html +296 -0
- package/styleguide/category/COMPONENT/MenuButton(js)/index.html +282 -0
- package/styleguide/category/COMPONENT/Message(js)/index.html +516 -0
- package/styleguide/category/COMPONENT/Modal(js)/index.html +445 -0
- package/styleguide/category/COMPONENT/Pagination(js)/index.html +446 -0
- package/styleguide/category/COMPONENT/Panel/index.html +327 -0
- package/styleguide/category/COMPONENT/Progressbar(js)/index.html +314 -0
- package/styleguide/category/COMPONENT/Tab(js)/index.html +474 -0
- package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +261 -0
- package/styleguide/category/COMPONENT/Tooltip(js)/index.html +413 -0
- package/styleguide/category/COMPONENT/Tree(js)/index.html +405 -0
- package/styleguide/category/CONTROLS/Button(js)/index.html +466 -0
- package/styleguide/category/CONTROLS/Checkbox/index.html +195 -0
- package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +286 -0
- package/styleguide/category/CONTROLS/Datepicker(js)/index.html +324 -0
- package/styleguide/category/CONTROLS/Dropdown(js)/index.html +1113 -0
- package/styleguide/category/CONTROLS/File/index.html +313 -0
- package/styleguide/category/CONTROLS/Form/Control/index.html +228 -0
- package/styleguide/category/CONTROLS/Form/Field/index.html +255 -0
- package/styleguide/category/CONTROLS/Form/Plain/index.html +194 -0
- package/styleguide/category/CONTROLS/Input/index.html +331 -0
- package/styleguide/category/CONTROLS/MultiText(js)/index.html +274 -0
- package/styleguide/category/CONTROLS/Picklist(js)/index.html +739 -0
- package/styleguide/category/CONTROLS/Radio/index.html +198 -0
- package/styleguide/category/CONTROLS/Select/index.html +457 -0
- package/styleguide/category/CONTROLS/SelectButton(js)/index.html +292 -0
- package/styleguide/category/CONTROLS/Slider/index.html +190 -0
- package/styleguide/category/CONTROLS/Switch(js)/index.html +346 -0
- package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +481 -0
- package/styleguide/category/CONTROLS/Textarea/index.html +186 -0
- package/styleguide/category/CONTROLS/Time(js)/index.html +264 -0
- package/styleguide/category/ELEMENTS/Box/index.html +171 -0
- package/styleguide/category/ELEMENTS/Icon/index.html +359 -0
- package/styleguide/category/ELEMENTS/Image/index.html +210 -0
- package/styleguide/category/ELEMENTS/List/index.html +393 -0
- package/styleguide/category/ELEMENTS/Table/index.html +480 -0
- package/styleguide/category/ELEMENTS/Tag/index.html +252 -0
- package/styleguide/category/ELEMENTS/Title/index.html +183 -0
- package/styleguide/category/LAYOUT/Container/index.html +232 -0
- package/styleguide/category/LAYOUT/Grid/index.html +397 -0
- package/styleguide/category/LAYOUT/Splitter(js)/index.html +276 -0
- package/styleguide/category/UTILITY/index.html +472 -0
- package/styleguide/category/Utils/index.html +338 -0
- package/styleguide/color.html +170 -0
- package/styleguide/index.html +170 -0
- package/styleguide/tag/javascript/index.html +7565 -0
- package/styleguide/tag/v.0.1.0/index.html +12646 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width" />
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico">
|
|
7
|
+
<link href="../../assets/styles/default.css" rel="stylesheet" id="ThemeFile" />
|
|
8
|
+
<link href="../../assets/okadia.css" rel="stylesheet" />
|
|
9
|
+
<link href="../../assets/theme.css" rel="stylesheet" />
|
|
10
|
+
<link
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
|
|
13
|
+
integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA=="
|
|
14
|
+
crossorigin="anonymous"
|
|
15
|
+
/>
|
|
16
|
+
<link href="https://fonts.googleapis.com/css?family=Squada+One&display=swap" rel="stylesheet" />
|
|
17
|
+
<script src="../../assets/components.js"></script>
|
|
18
|
+
<script src="../../assets/js/gnui.js"></script>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div class="aigis-container">
|
|
22
|
+
<header class="aigis-header gn-gcolor is-primary">
|
|
23
|
+
<span><a href="../../index.html" class="main-link" style="font-family: 'Squada One', cursive">GNUI</a></span>
|
|
24
|
+
<span class="has-text-invert" style="font-size: 1em; padding-left: 10px">Start your next web project with GNUI.</span>
|
|
25
|
+
<div class="gn-select is-medium">
|
|
26
|
+
<select id="ThemeSelector">
|
|
27
|
+
|
|
28
|
+
<option value="default">default</option>
|
|
29
|
+
|
|
30
|
+
<option value="nac">nac</option>
|
|
31
|
+
|
|
32
|
+
<option value="insights">insights</option>
|
|
33
|
+
|
|
34
|
+
<option value="gpi">gpi</option>
|
|
35
|
+
|
|
36
|
+
<option value="ztnac">ztnac</option>
|
|
37
|
+
|
|
38
|
+
<option value="green24">green24</option>
|
|
39
|
+
|
|
40
|
+
</select>
|
|
41
|
+
</div>
|
|
42
|
+
<div>
|
|
43
|
+
<a class="gn-button is-primary util-link" href="../../category/Utils/index.html">
|
|
44
|
+
<span class="gn-icon is-small">
|
|
45
|
+
<i class="fas fa-tools"></i>
|
|
46
|
+
</span>
|
|
47
|
+
Gn.util
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
</header>
|
|
51
|
+
<div class="aigis-sidemenu">
|
|
52
|
+
<nav class="gn-tree is-borderless is-large left-menu"></nav>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<script>
|
|
56
|
+
window.Gn = window.gnui;
|
|
57
|
+
|
|
58
|
+
Gn.ready(function () {
|
|
59
|
+
var leftMenu = setTree('COLOR,COMPONENT/Alert(js),COMPONENT/Bignumber,COMPONENT/Breadcrumb,COMPONENT/Calendar(js),COMPONENT/Card,COMPONENT/Chart(js),COMPONENT/Datagrid(js),COMPONENT/Datalist(js),COMPONENT/Growl(js),COMPONENT/JsonView(js),COMPONENT/Loader(js),COMPONENT/MenuButton(js),COMPONENT/Message(js),COMPONENT/Modal(js),COMPONENT/Pagination(js),COMPONENT/Panel,COMPONENT/Progressbar(js),COMPONENT/Tab(js),COMPONENT/Tagcloud(js),COMPONENT/Tooltip(js),COMPONENT/Tree(js),CONTROLS/Button(js),CONTROLS/Checkbox,CONTROLS/Colorpicker(js),CONTROLS/Datepicker(js),CONTROLS/Dropdown(js),CONTROLS/File,CONTROLS/Form/Control,CONTROLS/Form/Field,CONTROLS/Form/Plain,CONTROLS/Input,CONTROLS/MultiText(js),CONTROLS/Picklist(js),CONTROLS/Radio,CONTROLS/Select,CONTROLS/SelectButton(js),CONTROLS/Slider,CONTROLS/Switch(js),CONTROLS/SyntaxInput(js),CONTROLS/Textarea,CONTROLS/Time(js),ELEMENTS/Box,ELEMENTS/Icon,ELEMENTS/Image,ELEMENTS/List,ELEMENTS/Table,ELEMENTS/Tag,ELEMENTS/Title,LAYOUT/Container,LAYOUT/Grid,LAYOUT/Splitter(js),UTILITY,Utils'.split(','));
|
|
60
|
+
var jsComps = ''.split(',');
|
|
61
|
+
delete leftMenu.Utils;
|
|
62
|
+
Gn.util.append('.left-menu', renderTree(leftMenu));
|
|
63
|
+
Gn.util.scrollIntoView(Gn.util.$('.tree-item.is-active'), 300);
|
|
64
|
+
|
|
65
|
+
function renderTree(menus) {
|
|
66
|
+
var $depths = Gn.util.$('<ul></ul>');
|
|
67
|
+
Gn.util.each(menus, function (child, menu) {
|
|
68
|
+
if (Gn.util.isString(child)) {
|
|
69
|
+
Gn.util.append($depths, renderMenu(menu, '../../category/' + child + '/index.html', location.href.indexOf(child + '/') > -1));
|
|
70
|
+
} else {
|
|
71
|
+
var $_depth = renderMenu(menu, '');
|
|
72
|
+
Gn.util.append($_depth, renderTree(child));
|
|
73
|
+
Gn.util.append($depths, $_depth);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return $depths;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function renderMenu(name, link, isActive) {
|
|
80
|
+
var $_menu;
|
|
81
|
+
if (link === '') {
|
|
82
|
+
$_menu = Gn.util.$('<li>' + name + '</li>');
|
|
83
|
+
} else {
|
|
84
|
+
var menuClass = isActive ? ' is-active' : '';
|
|
85
|
+
$_menu = Gn.util.$('<li><a href="' + link + '"><div class="tree-item' + menuClass + '">' + name.split('(js)').join('') + '</a></div></li>');
|
|
86
|
+
}
|
|
87
|
+
if (name.indexOf('(js)') > 0) {
|
|
88
|
+
Gn.util.append(Gn.util.find('.tree-item', $_menu), Gn.util.$('<span class="gn-tag is-small is-info-light">JS</span>'));
|
|
89
|
+
}
|
|
90
|
+
return $_menu;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function setTree(categorys) {
|
|
94
|
+
var menus = {};
|
|
95
|
+
|
|
96
|
+
categorys.forEach(function (category) {
|
|
97
|
+
parseTree(menus, category.split('/'), category);
|
|
98
|
+
});
|
|
99
|
+
return menus;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function parseTree(parents, child, catgry) {
|
|
103
|
+
var _depth = child.shift();
|
|
104
|
+
if (parents[_depth] === undefined) {
|
|
105
|
+
parents[_depth] = {};
|
|
106
|
+
}
|
|
107
|
+
if (child.length === 1) {
|
|
108
|
+
parents[_depth][child] = catgry;
|
|
109
|
+
} else if (child.length > 1) {
|
|
110
|
+
parseTree(parents[_depth], child, catgry);
|
|
111
|
+
} else {
|
|
112
|
+
parents[_depth] = catgry;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<div class="aigis-contents">
|
|
119
|
+
<div class="aigis-contents__body">
|
|
120
|
+
|
|
121
|
+
<h2 class="gn-title is-border">Gn.util</h2>
|
|
122
|
+
<div class="aigis-module"> <h3 id="-">문자열</h3>
|
|
123
|
+
<ul>
|
|
124
|
+
<li><strong>hyphenate</strong>(str: string): string</li>
|
|
125
|
+
<li><strong>camelize</strong>(str: string): string</li>
|
|
126
|
+
<li><strong>parseBundle</strong>(text: string, locale: string): string (locale 에 맞는 표시 라벨 리턴)</li>
|
|
127
|
+
<li><strong>textToMultiLangs</strong>(text: string): { [key: string]: string } (언어와 표시 라벨을 객체화, Start Date{/default}{ko}사용시작{/ko} -> {default: 'Start Date', ko: '사용시작'})</li>
|
|
128
|
+
<li><strong>formatString</strong>(str: string, args: string[]): string ({0},{1},, 포함한 문자열 포맷팅)</li>
|
|
129
|
+
<li><strong>getByteSize</strong>(str: string): number (문자열의 바이트 사이즈 리턴)</li>
|
|
130
|
+
<li><strong>highlight</strong>(str: string, target: any = document.body): void (target 영역에 표시되는 컨텐츠 중, str에 해당하는 텍스트 강조처리)</li>
|
|
131
|
+
<li><strong>base64.base64UrlEncode</strong>(str: string): string</li>
|
|
132
|
+
<li><strong>base64.base64UrlDecode</strong>(str: string): string</li>
|
|
133
|
+
</ul>
|
|
134
|
+
<pre><code>Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >hyphenate</span><span class="token punctuation" >(</span><span class="token string" >'someString'</span><span class="token punctuation" >)</span> <span class="token operator" >/</span><span class="token operator" >/=</span><span class="token operator" >></span> some<span class="token operator" >-</span>string
|
|
135
|
+
Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >hyphenate</span><span class="token punctuation" >(</span><span class="token string" >'some-string'</span><span class="token punctuation" >)</span> <span class="token operator" >/</span><span class="token operator" >/=</span><span class="token operator" >></span> someString
|
|
136
|
+
</code></pre><h3 id="-">객체 판별</h3>
|
|
137
|
+
<h4 id="-">파라메터로 전달된 값의 속성또는 상태를 판별한다.</h4>
|
|
138
|
+
<ul>
|
|
139
|
+
<li><strong>isFunction</strong>(obj: any): boolean </li>
|
|
140
|
+
<li><strong>isObject</strong>(obj: any): boolean</li>
|
|
141
|
+
<li><strong>isArray</strong>(obj: any): boolean</li>
|
|
142
|
+
<li><strong>isPlainObject</strong>(obj: any): boolean</li>
|
|
143
|
+
<li><strong>isWindow</strong>(obj: any): boolean</li>
|
|
144
|
+
<li><strong>isDocument</strong>(obj: any): boolean</li>
|
|
145
|
+
<li><strong>isNode</strong>(obj: any): boolean</li>
|
|
146
|
+
<li><strong>isElement</strong>(obj: any): boolean</li>
|
|
147
|
+
<li><strong>isNodeCollection</strong>(obj: any): boolean</li>
|
|
148
|
+
<li><strong>isString</strong>(value: any): boolean</li>
|
|
149
|
+
<li><strong>isBoolean</strong>(value: any): boolean</li>
|
|
150
|
+
<li><strong>isNumber</strong>(value: any): boolean </li>
|
|
151
|
+
<li><strong>isNumeric</strong>(value: any): boolean</li>
|
|
152
|
+
<li><strong>isEmpty</strong>(obj: any): boolean</li>
|
|
153
|
+
<li><strong>isUndefined</strong>(value: any): boolean</li>
|
|
154
|
+
<li><strong>isDate</strong>(value: any): boolean</li>
|
|
155
|
+
<li><strong>isHtml</strong>(str: string): boolean</li>
|
|
156
|
+
<li><strong>isVoidElement</strong>(element: any): boolean (void elements: area,base,br,col,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr)</li>
|
|
157
|
+
<li><strong>isVisible</strong>(element: any): boolean</li>
|
|
158
|
+
<li><strong>isTouch</strong>(e: any): boolean (touch 속성이 있는지 판단)</li>
|
|
159
|
+
<li><strong>isInput</strong>(element: any): boolean (input elements: input,select,textarea,button)</li>
|
|
160
|
+
<li><strong>isEqual</strong>(value: any, other: any): boolean</li>
|
|
161
|
+
<li><strong>isMAC</strong>(macStr: string, sep = ':'): boolean</li>
|
|
162
|
+
<li><strong>isNetworkAndBroadcastAddr</strong>(ipStr: string): boolean (IP가 0.0.0.0 혹은 255.255.255.255인지 확인)</li>
|
|
163
|
+
<li><strong>isIP</strong>(ipStr: string, version?: string, ipPattern?: string): boolean (버전과 패턴을 받아서 IP 주소인지 검증)</li>
|
|
164
|
+
<li><strong>isIPv4Pattern</strong>(ipPattern: string, ipPattern?: string, isSubnetMask?: boolean): boolean (특정 패턴의 IP 주소인지 확인, ipPattern값이 없으면 모두 체크 (ipstr|cidr|range|longRange))</li>
|
|
165
|
+
<li><strong>isIPv6Pattern</strong>(ipPattern: string, ipPattern?: string): boolean (특정 패턴의 IP 주소인지 확인, ipPattern값이 없으면 모두 체크 (ipstr|cidr|range|longRange))</li>
|
|
166
|
+
<li><strong>isIPv4</strong>(ipStr: string): boolean (IP V4 주소인지 확인)</li>
|
|
167
|
+
<li><strong>isIPv4Exclusive</strong>(ipStr: string): boolean (IP의 마지막 자리가 0 또는 255 가 아닌 V4 주소인지 확인)</li>
|
|
168
|
+
<li><strong>isIPv6</strong>(ipStr: string): boolean </li>
|
|
169
|
+
<li><strong>isCidrIPv4</strong>(ipStr: string): boolean (cidr 표기법의 IP 주소인지 확인, 1.1.1.1/7 )</li>
|
|
170
|
+
<li><strong>isCidrIPv6</strong>(ipStr: string): boolean </li>
|
|
171
|
+
<li><strong>isRangeIPv4</strong>(ipStr: string): boolean (축약한 IP의 범위인지 확인, 1.1.1.1-2)</li>
|
|
172
|
+
<li><strong>isRangeIPv6</strong>(ipStr: string): boolean </li>
|
|
173
|
+
<li><strong>isLongRangeIPv4</strong>(ipStr: string): boolean (IP의 범위인지 확인, 1.1.1.1-1.1.1.2)</li>
|
|
174
|
+
<li><strong>isLongRangeIPv6</strong>(ipStr: string): boolean </li>
|
|
175
|
+
<li><strong>isHexPattern</strong>(color: string): boolean (헥사 코드인지 검사, #123 #27290e)</li>
|
|
176
|
+
<li><strong>startsWith</strong>(str: string, search: string): boolean</li>
|
|
177
|
+
<li><strong>endsWith</strong>(str: string, search: string): boolean</li>
|
|
178
|
+
<li><strong>includes</strong>(obj: any, search: any): boolean</li>
|
|
179
|
+
</ul>
|
|
180
|
+
<pre><code>Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >isFunction</span><span class="token punctuation" >(</span><span class="token punctuation" >(</span><span class="token punctuation" >)</span><span class="token operator" >=</span><span class="token operator" >></span>{}<span class="token punctuation" >)</span> <span class="token operator" >/</span><span class="token operator" >/=</span><span class="token operator" >></span> <span class="token boolean" >true</span>
|
|
181
|
+
Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >isArray</span><span class="token punctuation" >(</span><span class="token punctuation" >[</span><span class="token punctuation" >]</span><span class="token punctuation" >)</span> <span class="token operator" >/</span><span class="token operator" >/=</span><span class="token operator" >></span> <span class="token boolean" >true</span>
|
|
182
|
+
</code></pre><h3 id="-">객체전환</h3>
|
|
183
|
+
<h4 id="-">파라메터로 전달된 값을 특정 타입으로 변환하여 리턴한다.</h4>
|
|
184
|
+
<ul>
|
|
185
|
+
<li><strong>toBoolean</strong>(value: any): boolean|any</li>
|
|
186
|
+
<li><strong>toNumber</strong>(value: any): number</li>
|
|
187
|
+
<li><strong>getNumber</strong>(value: any): number ( 10px => 10 )</li>
|
|
188
|
+
<li><strong>toFloat</strong>(value: any): number</li>
|
|
189
|
+
<li><strong>toNode</strong>(element: any): HTMLElement</li>
|
|
190
|
+
<li><strong>toNodes</strong>(element: any): any[]</li>
|
|
191
|
+
<li><strong>toWindow</strong>(element: any): any</li>
|
|
192
|
+
<li><strong>toList</strong>(value: any): any[]</li>
|
|
193
|
+
<li><strong>toMs</strong>(time: number): number (ms 단위로 환산한다) </li>
|
|
194
|
+
<li><strong>toDate</strong>(value: any): Date</li>
|
|
195
|
+
<li><strong>toJson</strong>(str: string): any (JSON 문자열을 JavaScript 객체로 변환)</li>
|
|
196
|
+
<li><strong>toArray</strong>(str: string): string[] (문자열을 Array로 변환)</li>
|
|
197
|
+
</ul>
|
|
198
|
+
<h3 id="-">객체속성</h3>
|
|
199
|
+
<ul>
|
|
200
|
+
<li><strong>offset</strong>(element: any, coordinates?: any): any</li>
|
|
201
|
+
<li><strong>position</strong>(element: any, parent?: any): any</li>
|
|
202
|
+
<li><strong>attr</strong>(element: any, name: any): any|void (element의 속성값을 가져온다) <strong>(get)</strong></li>
|
|
203
|
+
<li><strong>attr</strong>(element: any, name: any, value: any): any|void (element의 속성값을 설정한다) <strong>(set)</strong></li>
|
|
204
|
+
<li><strong>hasAttr</strong>(element: any, name: string): boolean</li>
|
|
205
|
+
<li><strong>removeAttr</strong>(element: any, name: string): void</li>
|
|
206
|
+
<li><strong>data</strong>(element: any, dataString: string): any (data-[attribute] 속성 값을 가져온다) <strong>(get)</strong></li>
|
|
207
|
+
</ul>
|
|
208
|
+
<pre><code>Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >offset</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >)</span> <span class="token operator" >/</span><span class="token operator" >/=</span><span class="token operator" >></span> { top<span class="token punctuation" >:</span> <span class="token number" >1244</span><span class="token punctuation" >,</span> left<span class="token punctuation" >:</span> <span class="token number" >300</span><span class="token punctuation" >,</span> height<span class="token punctuation" >:</span> <span class="token number" >25</span><span class="token punctuation" >,</span> width<span class="token punctuation" >:</span> <span class="token number" >838</span><span class="token punctuation" >,</span> bottom<span class="token punctuation" >:</span> <span class="token number" >124</span><span class="token punctuation" >,</span> right<span class="token punctuation" >:</span> <span class="token number" >32</span> }
|
|
209
|
+
Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >position</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >)</span> <span class="token operator" >/</span><span class="token operator" >/=</span><span class="token operator" >></span> { top<span class="token punctuation" >:</span> <span class="token number" >1244</span><span class="token punctuation" >,</span> left<span class="token punctuation" >:</span> <span class="token number" >300</span> }
|
|
210
|
+
GN<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >attr</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >,</span> <span class="token string" >'id'</span><span class="token punctuation" >)</span>
|
|
211
|
+
GN<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >attr</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >,</span> <span class="token string" >'id'</span><span class="token punctuation" >,</span> <span class="token string" >'newID'</span><span class="token punctuation" >)</span>
|
|
212
|
+
Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >hasAttr</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >,</span> 'id<span class="token punctuation" >)</span>
|
|
213
|
+
Gn<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >removeAttr</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >,</span> <span class="token string" >'id'</span><span class="token punctuation" >)</span>
|
|
214
|
+
</code></pre><h3 id="-">객체 스타일</h3>
|
|
215
|
+
<ul>
|
|
216
|
+
<li><strong>css</strong>(element: any, property: any): any <strong>(get)</strong></li>
|
|
217
|
+
<li><strong>css</strong>(element: any, property: any, value: any): void <strong>(set)</strong></li>
|
|
218
|
+
<li><strong>css</strong>(element: any, property: {[key:string]: value} ): void <strong>(set)</strong></li>
|
|
219
|
+
</ul>
|
|
220
|
+
<pre><code>GN<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >css</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >,</span> <span class="token string" >'width'</span><span class="token punctuation" >)</span>
|
|
221
|
+
GN<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >css</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >,</span> <span class="token string" >'width'</span><span class="token punctuation" >,</span> <span class="token string" >'100px'</span><span class="token punctuation" >)</span>
|
|
222
|
+
GN<span class="token punctuation" >.</span>util<span class="token punctuation" >.</span><span class="token function" >css</span><span class="token punctuation" >(</span><span class="token variable" >$0</span><span class="token punctuation" >,</span> { width<span class="token punctuation" >:</span> <span class="token string" >'100px'</span><span class="token punctuation" >,</span> height<span class="token punctuation" >:</span> <span class="token string" >'100px'</span>}<span class="token punctuation" >)</span>
|
|
223
|
+
</code></pre><h4 id="-">클래스</h4>
|
|
224
|
+
<ul>
|
|
225
|
+
<li><strong>addClass</strong>(element: any, ...args: any[]): void</li>
|
|
226
|
+
<li><strong>removeClass</strong>(element: any, ...args: any[]): void</li>
|
|
227
|
+
<li><strong>removeClasses</strong>(element: any, cls: string): void</li>
|
|
228
|
+
<li><strong>replaceClass</strong>(element: any, ...args: any[]): void</li>
|
|
229
|
+
<li><strong>hasClass</strong>(element: any, cls: string): boolean</li>
|
|
230
|
+
<li><strong>toggleClass</strong>(element: any, ...args: any[]): void</li>
|
|
231
|
+
</ul>
|
|
232
|
+
<h3 id="dom-selector">DOM & Selector</h3>
|
|
233
|
+
<ul>
|
|
234
|
+
<li><strong>$</strong>(selector: any, context?: any): HTMLElement</li>
|
|
235
|
+
<li><strong>$$</strong>(selector: any, context?: any): Array<HTMLElement></li>
|
|
236
|
+
<li><strong>fragment</strong>(html: string): any</li>
|
|
237
|
+
<li><strong>empty</strong>(element: any): any (해당 element 내부의 html을 삭제한다)</li>
|
|
238
|
+
<li><strong>html</strong>(parent: any): string <strong>(get)</strong></li>
|
|
239
|
+
<li><strong>html</strong>(parent: any, html: string): void <strong>(set)</strong></li>
|
|
240
|
+
<li><strong>text</strong>(parent: any): string <strong>(get)</strong></li>
|
|
241
|
+
<li><strong>text</strong>(parent: any, text: string): void <strong>(set)</strong></li>
|
|
242
|
+
<li><strong>val</strong>(parent: any): string <strong>(get)</strong></li>
|
|
243
|
+
<li><strong>val</strong>(parent: any, text: string): void <strong>(set)</strong></li>
|
|
244
|
+
<li><strong>prepend</strong>(parent: any, element: any): any</li>
|
|
245
|
+
<li><strong>append</strong>(parent: any, element: any): any</li>
|
|
246
|
+
<li><strong>before</strong>(ref: any, element: any): any</li>
|
|
247
|
+
<li><strong>after</strong>(ref: any, element: any): any</li>
|
|
248
|
+
<li><strong>remove</strong>(element: any): void</li>
|
|
249
|
+
<li><strong>find</strong>(selector: any, context: any): HTMLElement</li>
|
|
250
|
+
<li><strong>findAll</strong>(selector: any, context: any = document): Array<HTMLElement></li>
|
|
251
|
+
<li><strong>matches</strong>(element: any, selector: any): Array<HTMLElement></li>
|
|
252
|
+
<li><strong>parent</strong>(element: any): HTMLElement</li>
|
|
253
|
+
<li><strong>parents</strong>(element: any, selector?: any): HTMLElement</li>
|
|
254
|
+
<li><strong>children</strong>(element: any, selector?: any): HTMLElement</li>
|
|
255
|
+
<li><strong>next</strong>(element: any): HTMLElement</li>
|
|
256
|
+
<li><strong>prev</strong>(element: any): HTMLElement</li>
|
|
257
|
+
<li><strong>nextUntil</strong>(element: any, selector?: any): any</li>
|
|
258
|
+
<li><strong>siblings</strong>(element: any, selector?: any): Array<HTMLElement></li>
|
|
259
|
+
<li><strong>escape</strong>(css: any): string (window.CSS.escape)</li>
|
|
260
|
+
<li><strong>isEquals</strong>(compareFrom: any, compareTo: any): boolean </li>
|
|
261
|
+
</ul>
|
|
262
|
+
<h3 id="-">이벤트</h3>
|
|
263
|
+
<ul>
|
|
264
|
+
<li><strong>on</strong>(targets: Array<any>|any, eventName: string, listener: Function, delegator:? string , useCapture?: boolean): off</li>
|
|
265
|
+
<li><strong>off</strong>(target: Array<any>|any, eventName: string, listener: Function): void</li>
|
|
266
|
+
<li><strong>once</strong>(element, type, selector, listener, useCapture, condition): off</li>
|
|
267
|
+
<li><strong>trigger</strong>(targets: any[]|Node, event: string|Event, detail?: any)</li>
|
|
268
|
+
<li><strong>getEventPos</strong>(e: any, prop = 'client')</li>
|
|
269
|
+
<li><strong>dragLayout</strong>(element: HTMLElement, boundary: Array<number>, events: { drag?: Function, dragStart?: Function, dragEnd?: Function} = {}): Function (드래그 영역을 가로 또는 세로로 제한할 경우 사용, 리턴객체를 통해 이벤트를 해제할 수 있다.)</li>
|
|
270
|
+
</ul>
|
|
271
|
+
<h3 id="viewport">Viewport</h3>
|
|
272
|
+
<ul>
|
|
273
|
+
<li><strong>scrollTop</strong>(element: any, top: number): void</li>
|
|
274
|
+
<li><strong>scrollIntoView</strong>(element: any, offsetBy = 0): void</li>
|
|
275
|
+
<li><strong>scrollParents</strong>(element: any, overflowRe?: RegExp = /auto|scroll/): HTMLElement[]</li>
|
|
276
|
+
<li><strong>getViewport</strong>(scrollElement: any): window|HTMLElement</li>
|
|
277
|
+
<li><strong>getCenterX</strong>(): number</li>
|
|
278
|
+
<li><strong>getCenterY</strong>(): number</li>
|
|
279
|
+
<li><strong>getPositionX</strong>(element: HTMLElement): number</li>
|
|
280
|
+
<li><strong>getPositionY</strong>(element: HTMLElement): number</li>
|
|
281
|
+
</ul>
|
|
282
|
+
<h3 id="number">Number</h3>
|
|
283
|
+
<ul>
|
|
284
|
+
<li><strong>random</strong>(min: number, max: number): number</li>
|
|
285
|
+
<li><strong>clamp</strong>(number: number, min: number, max: number): number (number의 min ~ max 값을 제한한다)</li>
|
|
286
|
+
<li><strong>byteSize</strong>(orgValue: number): string|number</li>
|
|
287
|
+
<li><strong>commaNum</strong>(num: number): string</li>
|
|
288
|
+
</ul>
|
|
289
|
+
<h3 id="array">Array</h3>
|
|
290
|
+
<ul>
|
|
291
|
+
<li><strong>last</strong>(array: Array<any>): any (배열의 마지막 항목)</li>
|
|
292
|
+
<li><strong>sortBy</strong>(array: Array<any>, prop: string): Array<any> : 오브젝트로 구성된 배열을 특정 prop값으로 정렬한다.(update)</li>
|
|
293
|
+
<li><strong>removeBy</strong>((array: Array<any>, predicate: Function): Array<any> : predicate 결과가 true인 항목을 삭제한 배열을 리턴한다.(update)</li>
|
|
294
|
+
<li><strong>uniqBy</strong>(array: Array<any>, prop: string): Array<any> : 오브젝트로 구성된 배열을 특정 prop값 기준으로 중복되지 않는 데이터를 리턴한다.(new array)</li>
|
|
295
|
+
<li><strong>sumBy</strong>(array: Array<any>, prop?: string): Number : 숫자 또는 오브젝트로 구성된 배열의 특정항목에 대한 합계를 구한다.</li>
|
|
296
|
+
<li><strong>arrClone</strong>(array: Array<any>): array: Array<any> (array 복제)</li>
|
|
297
|
+
</ul>
|
|
298
|
+
<h3 id="object">Object</h3>
|
|
299
|
+
<ul>
|
|
300
|
+
<li><strong>each</strong>(obj: any, cb: any): boolean</li>
|
|
301
|
+
<li><strong>assign</strong>(target: any, ...args: Array<any>): any (object.assign)</li>
|
|
302
|
+
<li><strong>hasOwn</strong>(obj: any, key: any): boolean (object의 own property 인지 확인한다.)</li>
|
|
303
|
+
<li><strong>extend</strong>(default: any, options: any): any ( object 얕은 병합 )</li>
|
|
304
|
+
<li><strong>objExtends</strong>(...args: any[]): any</li>
|
|
305
|
+
<li><strong>objClone</strong>(obj: any): any (object 복제)</li>
|
|
306
|
+
<li><strong>findPath</strong>(obj: any, key: string): string</li>
|
|
307
|
+
<li><strong>findValue</strong>(obj: any, pathString: string | Array<string>): any</li>
|
|
308
|
+
<li><strong>findProperty</strong>(obj: any, predicate: (value, key) => {//return true/false}): Array<any> : predicate 결과가 true인 항목 배열을 리턴한다.</li>
|
|
309
|
+
<li><strong>merge</strong>(target: any, source: any): any (deepmerge)</li>
|
|
310
|
+
</ul>
|
|
311
|
+
<h3 id="date">Date</h3>
|
|
312
|
+
<ul>
|
|
313
|
+
<li><strong>dayOfMonth</strong>(year: number, month: number) : number (해당하는 월의 일자수 확인)</li>
|
|
314
|
+
<li><strong>dateDiff</strong>(date1: string|number|Date, date2: string|number|Date): number (날짜 비교)</li>
|
|
315
|
+
<li><strong>dateTimeDiff</strong>(date1: string|number|Date, date2: string|number|Date): number (초단위 비교)</li>
|
|
316
|
+
<li><strong>tempDateByTime</strong>(timeStr: string, datestr = dateFormat(new Date(), 'yyyy-MM-dd')): Date (전달된 시간에 해당하는 임의의 Date 객체 생성)</li>
|
|
317
|
+
<li><strong>dateFormat</strong>(date: Date, format: string): string (날짜를 설정된 포멧으로 변경)</li>
|
|
318
|
+
</ul>
|
|
319
|
+
<h3 id="-">기타</h3>
|
|
320
|
+
<ul>
|
|
321
|
+
<li><strong>isIE</strong>: boolean (접속한 브라우저가 IE인지 아닌지 확인한다)</li>
|
|
322
|
+
<li><strong>getBrowser</strong>: string (접속한 브라우저를 확인한다)</li>
|
|
323
|
+
<li><strong>getOS</strong>: string (접속한 장비의 OS를 추측한다)</li>
|
|
324
|
+
<li><strong>toPlainText</strong>(content: string): string (html을 escape한 문자열을 반환한다)</li>
|
|
325
|
+
<li><strong>copyToClipboard</strong>(text: string): string (전달받은 텍스트를 클립보드에 저장한다)</li>
|
|
326
|
+
<li><strong>generateUUID</strong>(): string (uuid 를 생성한다)</li>
|
|
327
|
+
<li><strong>getQuery</strong>(key: string): string (url에 포함된 get parameter의 key에 해당하는 값을 반환한다)</li>
|
|
328
|
+
</ul>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
<footer class="aigis-footer">Last update at 2025/09/22 02:18</footer>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
<script src="../../assets/guide.js"></script>
|
|
337
|
+
</body>
|
|
338
|
+
</html>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width" />
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico">
|
|
7
|
+
<link href="./assets/styles/default.css" rel="stylesheet" id="ThemeFile" />
|
|
8
|
+
<link href="./assets/okadia.css" rel="stylesheet" />
|
|
9
|
+
<link href="./assets/theme.css" rel="stylesheet" />
|
|
10
|
+
<link
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
|
|
13
|
+
integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA=="
|
|
14
|
+
crossorigin="anonymous"
|
|
15
|
+
/>
|
|
16
|
+
<link href="https://fonts.googleapis.com/css?family=Squada+One&display=swap" rel="stylesheet" />
|
|
17
|
+
<script src="./assets/components.js"></script>
|
|
18
|
+
<script src="./assets/js/gnui.js"></script>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div class="aigis-container">
|
|
22
|
+
<header class="aigis-header gn-gcolor is-primary">
|
|
23
|
+
<span><a href="./index.html" class="main-link" style="font-family: 'Squada One', cursive">GNUI</a></span>
|
|
24
|
+
<span class="has-text-invert" style="font-size: 1em; padding-left: 10px">Start your next web project with GNUI.</span>
|
|
25
|
+
<div class="gn-select is-medium">
|
|
26
|
+
<select id="ThemeSelector">
|
|
27
|
+
|
|
28
|
+
<option value="default">default</option>
|
|
29
|
+
|
|
30
|
+
<option value="nac">nac</option>
|
|
31
|
+
|
|
32
|
+
<option value="insights">insights</option>
|
|
33
|
+
|
|
34
|
+
<option value="gpi">gpi</option>
|
|
35
|
+
|
|
36
|
+
<option value="ztnac">ztnac</option>
|
|
37
|
+
|
|
38
|
+
<option value="green24">green24</option>
|
|
39
|
+
|
|
40
|
+
</select>
|
|
41
|
+
</div>
|
|
42
|
+
<div>
|
|
43
|
+
<a class="gn-button is-primary util-link" href="./category/Utils/index.html">
|
|
44
|
+
<span class="gn-icon is-small">
|
|
45
|
+
<i class="fas fa-tools"></i>
|
|
46
|
+
</span>
|
|
47
|
+
Gn.util
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
</header>
|
|
51
|
+
<div class="aigis-sidemenu">
|
|
52
|
+
<nav class="gn-tree is-borderless is-large left-menu"></nav>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<script>
|
|
56
|
+
window.Gn = window.gnui;
|
|
57
|
+
|
|
58
|
+
Gn.ready(function () {
|
|
59
|
+
var leftMenu = setTree('COLOR,COMPONENT/Alert(js),COMPONENT/Bignumber,COMPONENT/Breadcrumb,COMPONENT/Calendar(js),COMPONENT/Card,COMPONENT/Chart(js),COMPONENT/Datagrid(js),COMPONENT/Datalist(js),COMPONENT/Growl(js),COMPONENT/JsonView(js),COMPONENT/Loader(js),COMPONENT/MenuButton(js),COMPONENT/Message(js),COMPONENT/Modal(js),COMPONENT/Pagination(js),COMPONENT/Panel,COMPONENT/Progressbar(js),COMPONENT/Tab(js),COMPONENT/Tagcloud(js),COMPONENT/Tooltip(js),COMPONENT/Tree(js),CONTROLS/Button(js),CONTROLS/Checkbox,CONTROLS/Colorpicker(js),CONTROLS/Datepicker(js),CONTROLS/Dropdown(js),CONTROLS/File,CONTROLS/Form/Control,CONTROLS/Form/Field,CONTROLS/Form/Plain,CONTROLS/Input,CONTROLS/MultiText(js),CONTROLS/Picklist(js),CONTROLS/Radio,CONTROLS/Select,CONTROLS/SelectButton(js),CONTROLS/Slider,CONTROLS/Switch(js),CONTROLS/SyntaxInput(js),CONTROLS/Textarea,CONTROLS/Time(js),ELEMENTS/Box,ELEMENTS/Icon,ELEMENTS/Image,ELEMENTS/List,ELEMENTS/Table,ELEMENTS/Tag,ELEMENTS/Title,LAYOUT/Container,LAYOUT/Grid,LAYOUT/Splitter(js),UTILITY,Utils'.split(','));
|
|
60
|
+
var jsComps = ''.split(',');
|
|
61
|
+
delete leftMenu.Utils;
|
|
62
|
+
Gn.util.append('.left-menu', renderTree(leftMenu));
|
|
63
|
+
Gn.util.scrollIntoView(Gn.util.$('.tree-item.is-active'), 300);
|
|
64
|
+
|
|
65
|
+
function renderTree(menus) {
|
|
66
|
+
var $depths = Gn.util.$('<ul></ul>');
|
|
67
|
+
Gn.util.each(menus, function (child, menu) {
|
|
68
|
+
if (Gn.util.isString(child)) {
|
|
69
|
+
Gn.util.append($depths, renderMenu(menu, './category/' + child + '/index.html', location.href.indexOf(child + '/') > -1));
|
|
70
|
+
} else {
|
|
71
|
+
var $_depth = renderMenu(menu, '');
|
|
72
|
+
Gn.util.append($_depth, renderTree(child));
|
|
73
|
+
Gn.util.append($depths, $_depth);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return $depths;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function renderMenu(name, link, isActive) {
|
|
80
|
+
var $_menu;
|
|
81
|
+
if (link === '') {
|
|
82
|
+
$_menu = Gn.util.$('<li>' + name + '</li>');
|
|
83
|
+
} else {
|
|
84
|
+
var menuClass = isActive ? ' is-active' : '';
|
|
85
|
+
$_menu = Gn.util.$('<li><a href="' + link + '"><div class="tree-item' + menuClass + '">' + name.split('(js)').join('') + '</a></div></li>');
|
|
86
|
+
}
|
|
87
|
+
if (name.indexOf('(js)') > 0) {
|
|
88
|
+
Gn.util.append(Gn.util.find('.tree-item', $_menu), Gn.util.$('<span class="gn-tag is-small is-info-light">JS</span>'));
|
|
89
|
+
}
|
|
90
|
+
return $_menu;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function setTree(categorys) {
|
|
94
|
+
var menus = {};
|
|
95
|
+
|
|
96
|
+
categorys.forEach(function (category) {
|
|
97
|
+
parseTree(menus, category.split('/'), category);
|
|
98
|
+
});
|
|
99
|
+
return menus;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function parseTree(parents, child, catgry) {
|
|
103
|
+
var _depth = child.shift();
|
|
104
|
+
if (parents[_depth] === undefined) {
|
|
105
|
+
parents[_depth] = {};
|
|
106
|
+
}
|
|
107
|
+
if (child.length === 1) {
|
|
108
|
+
parents[_depth][child] = catgry;
|
|
109
|
+
} else if (child.length > 1) {
|
|
110
|
+
parseTree(parents[_depth], child, catgry);
|
|
111
|
+
} else {
|
|
112
|
+
parents[_depth] = catgry;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<div class="aigis-contents">
|
|
119
|
+
<div class="aigis-contents__body">
|
|
120
|
+
<h1 class="gn-title is-border">GNUI</h1>
|
|
121
|
+
<p class="gn-sub-title">Genians 제품에 사용되는 UI 스타일 및 컴포넌트를 제공하는 Front-end UI Framework.</p>
|
|
122
|
+
|
|
123
|
+
<div class="gn-container">
|
|
124
|
+
<h4 class="gn-title is-size4">테마전환</h4>
|
|
125
|
+
<ul class="gn-list">
|
|
126
|
+
<li>사용할 테마에 해당하는 css 파일을 참조하여 사용한다.</li>
|
|
127
|
+
<li>가이드에서는 화면 우측 상단 콤보박스에서 사용할 테마를 선택하여 미리보기 할 수 있다.</li>
|
|
128
|
+
</ul>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="gn-container">
|
|
132
|
+
<h4 class="gn-title is-size4">컴포넌트 사용</h4>
|
|
133
|
+
<ul class="gn-list">
|
|
134
|
+
<li><span class="gn-tag is-info-light is-small">JS</span> 태그가 있는 항목은 Gn.create 스크립트를 사용하여 컴포넌트를 생성할 수 있다.</li>
|
|
135
|
+
<li>상세 옵션은 각 컴포넌트 가이드 하단에 표시되어 있다.</li>
|
|
136
|
+
</ul>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="gn-container">
|
|
140
|
+
<h4 class="gn-title is-size4">모듈 설치 및 사용</h4>
|
|
141
|
+
<h6 class="gn-title is-size6">아래 다운로드 URL로부터 모듈을 설치한다.</h6>
|
|
142
|
+
<div class="gn-box-no-line">
|
|
143
|
+
<i>npm install -S https://download.geninetworks.com/tftpboot/GNUI/CURRENT/GNOS/v1.0/GNUI-CT64-C-current/gnui.tar.gz</i>
|
|
144
|
+
</div>
|
|
145
|
+
<ul class="gn-list">
|
|
146
|
+
<li>설치된 <u>js 파일</u>과 사용하고자 하는 <u>테마 css 파일</u>을 소스에 import하여 사용한다.</li>
|
|
147
|
+
<li>* 버전별 모듈 경로는 제품 다운로드(https://download.geninetworks.com/tftpboot/GNUI/CURRENT/GNOS/v1.0/)에서 확인하여 설치</li>
|
|
148
|
+
</ul>
|
|
149
|
+
<h6 class="gn-title is-size6">Browser</h6>
|
|
150
|
+
<div class="aigis-module">
|
|
151
|
+
<pre><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>link</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>gnui/dist/styles/default.css<span class="token punctuation">"</span></span> <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>stylesheet<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
|
|
152
|
+
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>gnui/dist/js/gnui.js<span class="token punctuation">"</span></span><span class="token punctuation">></span><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
|
|
153
|
+
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span></span></span><span class="token punctuation">></span></span>
|
|
154
|
+
window<span class="token punctuation">.</span><span class="token function">Gn</span> <span class="token punctuation">=</span> <span class="token function">gnui</span>
|
|
155
|
+
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span></code></pre>
|
|
156
|
+
</div>
|
|
157
|
+
<h6 class="gn-title is-size6">ESM</h6>
|
|
158
|
+
<div class="aigis-module">
|
|
159
|
+
<pre><code><span class="token tag">import <span class="token punctuation">Gn</span> from <span class="token string">'gnui'</span></span>
|
|
160
|
+
<span class="token tag">import <span class="token string">'gnui/dist/styles/default.css'</span></span></code></pre>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<footer class="aigis-footer">Last update at 2025/09/22 02:18</footer>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
<script src="./assets/guide.js"></script>
|
|
169
|
+
</body>
|
|
170
|
+
</html>
|