gnui 1.2.14 → 1.2.16
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 +43 -7
- package/dist/js/gnui.js +43 -7
- package/dist/js/gnui.min.js +2 -2
- package/dist/styles/default.css +21694 -1
- package/dist/styles/gpi.css +21725 -1
- package/dist/styles/green24.css +22450 -1
- package/dist/styles/insights.css +21716 -1
- package/dist/styles/nac.css +21733 -1
- package/dist/styles/ztnac.css +22451 -1
- package/package.json +2 -2
- package/styleguide/assets/js/gnui.js +43 -7
- package/styleguide/assets/js/gnui.min.js +2 -2
- package/styleguide/assets/styles/default.css +21694 -1
- package/styleguide/assets/styles/gpi.css +21725 -1
- package/styleguide/assets/styles/green24.css +22450 -1
- package/styleguide/assets/styles/insights.css +21716 -1
- package/styleguide/assets/styles/nac.css +21733 -1
- package/styleguide/assets/styles/ztnac.css +22451 -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 +1 -1
- 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 +3 -3
- 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 +1 -1
- 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 +7 -1
- package/styleguide/category/CONTROLS/Dropdown(js)/index.html +1 -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 +1 -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 +1 -1
- package/styleguide/category/CONTROLS/Picklist(js)/index.html +1 -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/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 +1 -1
- 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 +9 -3
- package/styleguide/tag/v.0.1.0/index.html +9 -3
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.2.
|
|
7
|
+
"version": "1.2.16",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "dist/js/gnui.js",
|
|
10
10
|
"types": "@types/gnui.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "npm install && npm run build-clean && npm run build-sass && npm run build-autoprefix && npm run docs && npm run build-ts",
|
|
32
32
|
"build-autoprefix": "postcss css/ --use autoprefixer --no-map --dir dist/styles",
|
|
33
33
|
"build-clean": "rimraf css styleguide dist",
|
|
34
|
-
"build-sass": "sass --
|
|
34
|
+
"build-sass": "sass --no-source-map theme/:css/",
|
|
35
35
|
"build-ts": "rollup -c",
|
|
36
36
|
"docs": "./node_modules/.bin/aigis run -c ./aigis_config.yml",
|
|
37
37
|
"prettier": "npx prettier --write .",
|
|
@@ -16965,7 +16965,7 @@
|
|
|
16965
16965
|
// 최초 생성 후 state에 등록 - created
|
|
16966
16966
|
_addComponent(component) {
|
|
16967
16967
|
const uid = component._uid;
|
|
16968
|
-
if (uid
|
|
16968
|
+
if (uid) {
|
|
16969
16969
|
this._componentMap[uid] = {
|
|
16970
16970
|
component: component,
|
|
16971
16971
|
selector: component.$selector,
|
|
@@ -33679,7 +33679,7 @@
|
|
|
33679
33679
|
this.$init(this, options);
|
|
33680
33680
|
}
|
|
33681
33681
|
template(config) {
|
|
33682
|
-
return (createElement$1("div", { className: 'gn-time' + (config.disabled ? ' is-disabled' : '') + (config.readonly ? ' is-readonly' : ''), id: this._uid },
|
|
33682
|
+
return (createElement$1("div", { className: 'gn-time' + (config.disabled ? ' is-disabled' : '') + (config.readonly ? ' is-readonly' : '') + (config.timeFormat === 'hh:mm' ? ' is-hm' : ''), id: this._uid },
|
|
33683
33683
|
createElement$1("div", { className: "picker-controls picker-times" },
|
|
33684
33684
|
createElement$1("span", { className: "gn-icon" },
|
|
33685
33685
|
createElement$1("i", { className: "fa fa-clock" })),
|
|
@@ -33935,7 +33935,7 @@
|
|
|
33935
33935
|
this.$init(this, options);
|
|
33936
33936
|
}
|
|
33937
33937
|
template(config) {
|
|
33938
|
-
return (createElement$1("div", { className: 'gn-calendar' + (config.type === 'picker' ? ' is-picker' : ''), id: this._uid },
|
|
33938
|
+
return (createElement$1("div", { className: 'gn-calendar' + (config.type === 'picker' ? ' is-picker' : '') + (config.timeFormat === 'hh:mm' ? ' is-hm' : ''), id: this._uid },
|
|
33939
33939
|
createElement$1("div", { className: "picker-controls" },
|
|
33940
33940
|
createElement$1("div", { className: "control-set gn-control is-small has-arrange" },
|
|
33941
33941
|
createElement$1("button", { className: "btn-year-decrease" }),
|
|
@@ -34017,7 +34017,8 @@
|
|
|
34017
34017
|
}
|
|
34018
34018
|
});
|
|
34019
34019
|
this._time = new Time('time', find('.timePicker', this.$el), {
|
|
34020
|
-
value: this.$options.value ? dateFormat(this.$options.value,
|
|
34020
|
+
value: this.$options.value ? dateFormat(this.$options.value, this.$options.timeFormat) : '',
|
|
34021
|
+
timeFormat: this.$options.timeFormat,
|
|
34021
34022
|
onChange: (time) => {
|
|
34022
34023
|
this._hidden.timeChange(time);
|
|
34023
34024
|
}
|
|
@@ -34563,6 +34564,7 @@
|
|
|
34563
34564
|
}
|
|
34564
34565
|
if (!this.$options.palette) {
|
|
34565
34566
|
this.$options.palette = this.pickPanel;
|
|
34567
|
+
attr(this.$el, 'data-gnui', this.$options.palette._uid);
|
|
34566
34568
|
}
|
|
34567
34569
|
if (!isHexPattern(this.$options.value)) {
|
|
34568
34570
|
this.$options.value = DEFAULT_COLOR;
|
|
@@ -34585,6 +34587,7 @@
|
|
|
34585
34587
|
this.$options.color = '';
|
|
34586
34588
|
css$1(this.$options.delegates.preview, 'background', NONE_COLOR);
|
|
34587
34589
|
val(this.$options.delegates.value, '');
|
|
34590
|
+
trigger(this.$options.delegates.value, 'change');
|
|
34588
34591
|
this.$event(this, 'onChange', '');
|
|
34589
34592
|
},
|
|
34590
34593
|
typeColor: (e) => {
|
|
@@ -34713,6 +34716,7 @@
|
|
|
34713
34716
|
id: this._uid + '_picker',
|
|
34714
34717
|
value: defaultDataTime,
|
|
34715
34718
|
dateType: this.$options.type,
|
|
34719
|
+
timeFormat: this.$options.timeFormat,
|
|
34716
34720
|
min: this.$options.min || null,
|
|
34717
34721
|
max: this.$options.max || null,
|
|
34718
34722
|
onSelect: (date) => {
|
|
@@ -34723,6 +34727,7 @@
|
|
|
34723
34727
|
});
|
|
34724
34728
|
}
|
|
34725
34729
|
this.$options.picker = this.pickPanel;
|
|
34730
|
+
attr(this.$el, 'data-gnui', this.$options.picker._uid);
|
|
34726
34731
|
// 해당 컴포넌트 외 클릭 시 picker panel 숨김
|
|
34727
34732
|
this.$options._destroy = on(document.body, 'click', (e) => {
|
|
34728
34733
|
if (!parents(e.target, '#' + this.$options.picker._uid).length && !parents(e.target, '.gn-dateinput').length && hasClass(this.pickPanel.$el, 'is-active')) {
|
|
@@ -34770,6 +34775,7 @@
|
|
|
34770
34775
|
removeDate: () => {
|
|
34771
34776
|
this.$options.value = '';
|
|
34772
34777
|
val(this.$options.delegates.date, '');
|
|
34778
|
+
trigger(this.$options.delegates.date, 'change');
|
|
34773
34779
|
this.$event(this, 'onChange', '');
|
|
34774
34780
|
},
|
|
34775
34781
|
disable: () => {
|
|
@@ -34797,7 +34803,7 @@
|
|
|
34797
34803
|
type: 'date',
|
|
34798
34804
|
value: this.$selector ? this.$selector.value : '',
|
|
34799
34805
|
dateFormat: 'yyyy-MM-DD',
|
|
34800
|
-
timeFormat: 'hh:mm
|
|
34806
|
+
timeFormat: 'hh:mm',
|
|
34801
34807
|
width: '165px',
|
|
34802
34808
|
writable: true
|
|
34803
34809
|
};
|
|
@@ -38198,10 +38204,10 @@
|
|
|
38198
38204
|
const styles = {};
|
|
38199
38205
|
const contStyles = {};
|
|
38200
38206
|
if (config.width) {
|
|
38201
|
-
styles.width =
|
|
38207
|
+
styles.width = this.parseModalSize(config.width, window.innerWidth);
|
|
38202
38208
|
}
|
|
38203
38209
|
if (config.height) {
|
|
38204
|
-
styles.height =
|
|
38210
|
+
styles.height = this.parseModalSize(config.height, window.innerHeight);
|
|
38205
38211
|
}
|
|
38206
38212
|
if (config.padding) {
|
|
38207
38213
|
contStyles.padding = getUnit('padding', config.padding);
|
|
@@ -38225,6 +38231,36 @@
|
|
|
38225
38231
|
config.hasConfirm && (createElement$1("button", { type: "button", className: 'gn-button' + ` is-${config.sizeSets.confirm}`, id: this._uid + '_confirm', "on-click": this._hidden.confirm }, config.textSets.confirm)),
|
|
38226
38232
|
config.hasCancel && (createElement$1("button", { type: "button", className: 'gn-button btnCloseModal is-cancel' + ` is-${config.sizeSets.cancel}`, id: this._uid + '_cancel', "on-click": this._hidden.close }, config.textSets.cancel)))))));
|
|
38227
38233
|
}
|
|
38234
|
+
parseModalSize(value, windowValue) {
|
|
38235
|
+
if (value === 'auto') {
|
|
38236
|
+
return 'auto';
|
|
38237
|
+
}
|
|
38238
|
+
try {
|
|
38239
|
+
if (typeof value === 'number') {
|
|
38240
|
+
return `${value > windowValue ? windowValue - 100 : value}px`;
|
|
38241
|
+
}
|
|
38242
|
+
else {
|
|
38243
|
+
const number = parseFloat(value);
|
|
38244
|
+
const unit = value.replace(number.toString(), '');
|
|
38245
|
+
switch (unit) {
|
|
38246
|
+
case '%':
|
|
38247
|
+
return `${number}%`;
|
|
38248
|
+
case 'px':
|
|
38249
|
+
return `${number > windowValue ? windowValue - 100 : number}px`;
|
|
38250
|
+
case 'vw':
|
|
38251
|
+
return `${number > 100 ? 90 : number}vw`;
|
|
38252
|
+
case 'vh':
|
|
38253
|
+
return `${number > 100 ? 90 : number}vh`;
|
|
38254
|
+
default:
|
|
38255
|
+
return 'auto';
|
|
38256
|
+
}
|
|
38257
|
+
}
|
|
38258
|
+
}
|
|
38259
|
+
catch (e) {
|
|
38260
|
+
console.error(e.message);
|
|
38261
|
+
return 'auto';
|
|
38262
|
+
}
|
|
38263
|
+
}
|
|
38228
38264
|
$render(config) {
|
|
38229
38265
|
if (config.contents) {
|
|
38230
38266
|
if (config.contents.sel !== undefined) {
|