gnui 1.2.17 → 1.2.18

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 (78) hide show
  1. package/dist/js/gnui.esm.js +724 -92
  2. package/dist/js/gnui.js +724 -92
  3. package/dist/js/gnui.min.js +6 -6
  4. package/dist/styles/default.css +1019 -108
  5. package/dist/styles/gpi.css +1019 -108
  6. package/dist/styles/green24.css +1230 -289
  7. package/dist/styles/insights.css +1019 -108
  8. package/dist/styles/nac.css +969 -58
  9. package/dist/styles/ztnac.css +1206 -265
  10. package/package.json +1 -1
  11. package/styleguide/assets/components.js +216 -9
  12. package/styleguide/assets/js/gnui.js +724 -92
  13. package/styleguide/assets/js/gnui.min.js +6 -6
  14. package/styleguide/assets/styles/default.css +1019 -108
  15. package/styleguide/assets/styles/gpi.css +1019 -108
  16. package/styleguide/assets/styles/green24.css +1230 -289
  17. package/styleguide/assets/styles/insights.css +1019 -108
  18. package/styleguide/assets/styles/nac.css +969 -58
  19. package/styleguide/assets/styles/ztnac.css +1206 -265
  20. package/styleguide/category/COLOR/index.html +2 -2
  21. package/styleguide/category/COMPONENT/Alert(js)/index.html +2 -2
  22. package/styleguide/category/COMPONENT/Bignumber/index.html +2 -2
  23. package/styleguide/category/COMPONENT/Breadcrumb/index.html +2 -2
  24. package/styleguide/category/COMPONENT/Calendar(js)/index.html +2 -2
  25. package/styleguide/category/COMPONENT/Card/index.html +2 -2
  26. package/styleguide/category/COMPONENT/Chart(js)/index.html +2 -2
  27. package/styleguide/category/COMPONENT/Datagrid(js)/index.html +136 -9
  28. package/styleguide/category/COMPONENT/Datalist(js)/index.html +2 -2
  29. package/styleguide/category/COMPONENT/Growl(js)/index.html +2 -2
  30. package/styleguide/category/COMPONENT/JsonView(js)/index.html +2 -2
  31. package/styleguide/category/COMPONENT/Loader(js)/index.html +21 -4
  32. package/styleguide/category/COMPONENT/MenuButton(js)/index.html +74 -6
  33. package/styleguide/category/COMPONENT/Message(js)/index.html +2 -2
  34. package/styleguide/category/COMPONENT/Modal(js)/index.html +2 -2
  35. package/styleguide/category/COMPONENT/Pagination(js)/index.html +2 -2
  36. package/styleguide/category/COMPONENT/Panel/index.html +2 -2
  37. package/styleguide/category/COMPONENT/Progressbar(js)/index.html +2 -2
  38. package/styleguide/category/COMPONENT/Tab(js)/index.html +2 -2
  39. package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +2 -2
  40. package/styleguide/category/COMPONENT/Tooltip(js)/index.html +2 -2
  41. package/styleguide/category/COMPONENT/Tree(js)/index.html +2 -2
  42. package/styleguide/category/CONTROLS/Button(js)/index.html +2 -2
  43. package/styleguide/category/CONTROLS/Checkbox/index.html +2 -2
  44. package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +2 -2
  45. package/styleguide/category/CONTROLS/Datepicker(js)/index.html +2 -2
  46. package/styleguide/category/CONTROLS/Dropdown(js)/index.html +2 -2
  47. package/styleguide/category/CONTROLS/File/index.html +2 -2
  48. package/styleguide/category/CONTROLS/Form/Control/index.html +2 -2
  49. package/styleguide/category/CONTROLS/Form/Field/index.html +2 -2
  50. package/styleguide/category/CONTROLS/Form/Plain/index.html +2 -2
  51. package/styleguide/category/CONTROLS/Input/index.html +2 -2
  52. package/styleguide/category/CONTROLS/MultiText(js)/index.html +2 -2
  53. package/styleguide/category/CONTROLS/Picklist(js)/index.html +28 -18
  54. package/styleguide/category/CONTROLS/Radio/index.html +2 -2
  55. package/styleguide/category/CONTROLS/Select/index.html +2 -2
  56. package/styleguide/category/CONTROLS/SelectButton(js)/index.html +2 -2
  57. package/styleguide/category/CONTROLS/Slider/index.html +2 -2
  58. package/styleguide/category/CONTROLS/SortableList(js)/index.html +487 -0
  59. package/styleguide/category/CONTROLS/Switch(js)/index.html +2 -2
  60. package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +2 -2
  61. package/styleguide/category/CONTROLS/Textarea/index.html +2 -2
  62. package/styleguide/category/CONTROLS/Time(js)/index.html +2 -2
  63. package/styleguide/category/ELEMENTS/Box/index.html +2 -2
  64. package/styleguide/category/ELEMENTS/Icon/index.html +2 -2
  65. package/styleguide/category/ELEMENTS/Image/index.html +2 -2
  66. package/styleguide/category/ELEMENTS/List/index.html +2 -2
  67. package/styleguide/category/ELEMENTS/Table/index.html +2 -2
  68. package/styleguide/category/ELEMENTS/Tag/index.html +2 -2
  69. package/styleguide/category/ELEMENTS/Title/index.html +2 -2
  70. package/styleguide/category/LAYOUT/Container/index.html +2 -2
  71. package/styleguide/category/LAYOUT/Grid/index.html +2 -2
  72. package/styleguide/category/LAYOUT/Splitter(js)/index.html +2 -2
  73. package/styleguide/category/UTILITY/index.html +2 -2
  74. package/styleguide/category/Utils/index.html +2 -2
  75. package/styleguide/color.html +2 -2
  76. package/styleguide/index.html +2 -2
  77. package/styleguide/tag/javascript/index.html +608 -31
  78. package/styleguide/tag/v.0.1.0/index.html +608 -31
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.2.17",
7
+ "version": "1.2.18",
8
8
  "type": "module",
9
9
  "main": "dist/js/gnui.js",
10
10
  "types": "@types/gnui.d.ts",
@@ -425,6 +425,103 @@ const components = {
425
425
  });
426
426
  Gn.create('datagrid', {
427
427
  target: '.new-grid2',
428
+ headers: [
429
+ {
430
+ label: 'no',
431
+ key: 'number',
432
+ onSelect: function () {
433
+ // eslint-disable-next-line prefer-rest-params
434
+ console.log(arguments);
435
+ },
436
+ template: function (k, d) {
437
+ return '<span>' + d[k] + '</span>';
438
+ },
439
+ draggable: true,
440
+ sortable: true,
441
+ sort: 'asc'
442
+ },
443
+ {
444
+ label: '제목',
445
+ key: 'title',
446
+ style: {
447
+ width: '250px'
448
+ },
449
+ className: 'has-text-right',
450
+ draggable: true,
451
+ bodyClass: 'has-text-left',
452
+ sortable: true
453
+ },
454
+ {
455
+ label: '날짜',
456
+ key: 'date',
457
+ style: {
458
+ width: '150px'
459
+ },
460
+ className: 'has-text-center',
461
+ bodyClass: 'has-text-left'
462
+ }
463
+ ],
464
+ data: [
465
+ {
466
+ number: '1',
467
+ title: '하나',
468
+ date: '2020-09-19',
469
+ desc: 'hello, world',
470
+ child: [
471
+ {
472
+ number: '1-1',
473
+ title: '1-하나',
474
+ date: '2020-09-19'
475
+ },
476
+ {
477
+ number: '1-2',
478
+ title: '1-둘',
479
+ date: '2020-09-19',
480
+ desc: 'hello, world',
481
+ child: [
482
+ {
483
+ number: '1-2-1',
484
+ title: '1-둘-1',
485
+ date: '2020-09-19',
486
+ desc: 'hello, world',
487
+ child: [
488
+ {
489
+ number: '1-2-1-1',
490
+ title: '1-둘-1-1',
491
+ desc: 'hello, world',
492
+ date: '2020-09-19'
493
+ }
494
+ ]
495
+ }
496
+ ]
497
+ }
498
+ ],
499
+ color: 'is-danger-light'
500
+ },
501
+ {
502
+ number: '2',
503
+ title: '둘',
504
+ date: '2020-09-19',
505
+ desc: 'hello, world'
506
+ }
507
+ ],
508
+ hasHeader: false,
509
+ hasCheck: true,
510
+ hasDelete: true,
511
+ textSets: {
512
+ deleteConfirmMessage: '파일을 삭제하시겠습니까?'
513
+ },
514
+ // onDelete 핸들러에서 false 를 반환하면 해당 행 삭제를 취소할 수 있다.
515
+ onDelete: (data, index) => {
516
+ console.log(data, index);
517
+ // 예: 첫 번째 행 삭제는 막고 싶은 경우
518
+ // if (index === 0) {
519
+ // return false;
520
+ // }
521
+ }
522
+ });
523
+ Gn.create('datagrid', {
524
+ target: '.new-grid3',
428
525
  headers: [
429
526
  {
430
527
  label: 'row data numbers',
@@ -1237,6 +1334,69 @@ const components = {
1237
1334
  }
1238
1335
  ]
1239
1336
  });
1337
+ // 서브메뉴 테스트
1338
+ Gn.create('menubutton', {
1339
+ target: 'button[name=new-button-submenu]',
1340
+ size: 'normal',
1341
+ textSets: {
1342
+ buttonText: '편집 메뉴'
1343
+ },
1344
+ onSelect: function (value, text, menu, e) {
1345
+ console.log('선택된 메뉴:', { value: value, text: text, menu: menu });
1346
+ },
1347
+ data: [
1348
+ {
1349
+ text: '파일',
1350
+ value: 'file',
1351
+ child: [
1352
+ { text: '새 파일', value: 'file-new' },
1353
+ { text: '열기', value: 'file-open' },
1354
+ {
1355
+ text: '최근 파일',
1356
+ value: 'file-recent',
1357
+ child: [
1358
+ { text: 'document.txt', value: 'file-recent-1' },
1359
+ { text: 'image.png', value: 'file-recent-2' },
1360
+ { text: 'project.json', value: 'file-recent-3' }
1361
+ ]
1362
+ },
1363
+ { text: '저장', value: 'file-save' },
1364
+ { text: '다른 이름으로 저장', value: 'file-saveas' }
1365
+ ]
1366
+ },
1367
+ {
1368
+ text: '편집',
1369
+ value: 'edit',
1370
+ child: [
1371
+ { text: '실행 취소', value: 'edit-undo' },
1372
+ { text: '다시 실행', value: 'edit-redo', actived: true },
1373
+ { text: '복사', value: 'edit-copy' },
1374
+ { text: '붙여넣기', value: 'edit-paste' }
1375
+ ]
1376
+ },
1377
+ {
1378
+ text: '보기',
1379
+ value: 'view',
1380
+ child: [
1381
+ {
1382
+ text: '확대/축소',
1383
+ value: 'view-zoom',
1384
+ disabled: true,
1385
+ child: [
1386
+ { text: '확대', value: 'view-zoom-in' },
1387
+ { text: '축소', value: 'view-zoom-out' },
1388
+ { text: '원본 크기', value: 'view-zoom-reset' }
1389
+ ]
1390
+ },
1391
+ { text: '전체 화면', value: 'view-fullscreen' }
1392
+ ]
1393
+ },
1394
+ {
1395
+ text: '도움말',
1396
+ value: 'help'
1397
+ }
1398
+ ]
1399
+ });
1240
1400
  },
1241
1401
  Modal: function () {
1242
1402
  Gn.create('button', {
@@ -1299,16 +1459,14 @@ const components = {
1299
1459
  target: '.new-picklist',
1300
1460
  data: {
1301
1461
  source: [
1302
- { value: 'item1', text: '항목1' },
1303
- { value: 'item2', text: '항목2' },
1304
- { value: 'item5', text: '항목3' },
1305
- { value: 'item4', text: '항목4' },
1306
- { value: 'item5', text: '항목5' },
1307
- { value: 'item6', text: '항목6' },
1308
- { value: 'item7', text: '항목7' },
1309
- { value: 'item8', text: '항목8' }
1462
+ { value: '항목1', text: 'item1', html: '<span class="gn-tag is-primary">항목1</span> item1' },
1463
+ { value: '항목2', text: 'item2', html: '<span class="gn-tag is-danger">항목2</span> item2' },
1464
+ { value: '항목3', text: 'item3', html: '<span class="gn-tag is-warning">항목3</span> item3' }
1310
1465
  ],
1311
- target: []
1466
+ target: [
1467
+ { value: '항목4', text: 'item4', html: '<span class="gn-tag is-help">항목4</span> item4' },
1468
+ { value: '항목5', text: 'item5', html: '<span class="gn-tag is-success">항목5</span> item5' }
1469
+ ]
1312
1470
  },
1313
1471
  hasSourceSearch: true,
1314
1472
  hasTargetSearch: true,
@@ -1340,6 +1498,55 @@ const components = {
1340
1498
  }
1341
1499
  });
1342
1500
  },
1501
+ SortableList: function () {
1502
+ Gn.create('sortablelist', {
1503
+ target: '.new-sortablelist',
1504
+ data: [
1505
+ { value: '1', text: '항목 1' },
1506
+ { value: '2', text: '항목 2' },
1507
+ { value: '3', text: '항목 3' },
1508
+ { value: '4', text: '항목 4' },
1509
+ { value: '5', text: '항목 5' },
1510
+ { value: '6', text: '항목 6' },
1511
+ { value: '7', text: '항목 7' },
1512
+ { value: '8', text: '항목 8' },
1513
+ { value: '9', text: '항목 9' },
1514
+ { value: '10', text: '항목 10' }
1515
+ ]
1516
+ });
1517
+ Gn.create('sortablelist', {
1518
+ target: '.new-sortablelist-drag',
1519
+ data: [
1520
+ { value: 'a', text: '항목 A' },
1521
+ { value: 'b', text: '항목 B' },
1522
+ { value: 'c', text: '항목 C' },
1523
+ { value: 'd', text: '항목 D' },
1524
+ { value: 'e', text: '항목 E' },
1525
+ { value: 'f', text: '항목 F' },
1526
+ { value: 'g', text: '항목 G' },
1527
+ { value: 'h', text: '항목 H' },
1528
+ { value: 'i', text: '항목 I' },
1529
+ { value: 'j', text: '항목 J' }
1530
+ ],
1531
+ draggable: true
1532
+ });
1533
+ Gn.create('sortablelist', {
1534
+ target: '.new-sortablelist-cols',
1535
+ buttonPosition: 'right',
1536
+ data: [
1537
+ { value: 'x1', cols: ['항목1', '카테고리A', '1000'] },
1538
+ { value: 'x2', cols: ['항목2', '카테고리B', '2000'] },
1539
+ { value: 'x3', cols: ['항목3', '카테고리C', '3000'] },
1540
+ { value: 'x4', cols: ['항목4', '카테고리D', '4000'] },
1541
+ { value: 'x5', cols: ['항목5', '카테고리E', '5000'] },
1542
+ { value: 'x6', cols: ['항목6', '카테고리F', '6000'] },
1543
+ { value: 'x7', cols: ['항목7', '카테고리G', '7000'] },
1544
+ { value: 'x8', cols: ['항목8', '카테고리H', '8000'] },
1545
+ { value: 'x9', cols: ['항목9', '카테고리I', '9000'] },
1546
+ { value: 'x10', cols: ['항목10', '카테고리J', '10000'] }
1547
+ ]
1548
+ });
1549
+ },
1343
1550
  Progressbar: function () {
1344
1551
  Gn.create('progressbar', {
1345
1552
  target: '.new-progress-indeterminate',