gnui 1.2.18 → 1.2.20

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 +347 -134
  2. package/dist/js/gnui.js +347 -134
  3. package/dist/js/gnui.min.js +6 -6
  4. package/dist/styles/default.css +10600 -20758
  5. package/dist/styles/gpi.css +10630 -20788
  6. package/dist/styles/green24.css +11263 -21435
  7. package/dist/styles/insights.css +10616 -20775
  8. package/dist/styles/nac.css +10628 -20795
  9. package/dist/styles/ztnac.css +11263 -21436
  10. package/package.json +3 -2
  11. package/styleguide/assets/components.js +58 -3
  12. package/styleguide/assets/js/gnui.js +347 -134
  13. package/styleguide/assets/js/gnui.min.js +6 -6
  14. package/styleguide/assets/styles/default.css +10600 -20758
  15. package/styleguide/assets/styles/gpi.css +10630 -20788
  16. package/styleguide/assets/styles/green24.css +11263 -21435
  17. package/styleguide/assets/styles/insights.css +10616 -20775
  18. package/styleguide/assets/styles/nac.css +10628 -20795
  19. package/styleguide/assets/styles/ztnac.css +11263 -21436
  20. package/styleguide/category/COLOR/index.html +1 -1
  21. package/styleguide/category/COMPONENT/Alert(js)/index.html +1 -1
  22. package/styleguide/category/COMPONENT/Bignumber/index.html +1 -1
  23. package/styleguide/category/COMPONENT/Breadcrumb/index.html +1 -1
  24. package/styleguide/category/COMPONENT/Calendar(js)/index.html +1 -1
  25. package/styleguide/category/COMPONENT/Card/index.html +1 -1
  26. package/styleguide/category/COMPONENT/Chart(js)/index.html +1 -1
  27. package/styleguide/category/COMPONENT/Datagrid(js)/index.html +1 -1
  28. package/styleguide/category/COMPONENT/Datalist(js)/index.html +1 -1
  29. package/styleguide/category/COMPONENT/Growl(js)/index.html +1 -1
  30. package/styleguide/category/COMPONENT/JsonView(js)/index.html +1 -1
  31. package/styleguide/category/COMPONENT/Loader(js)/index.html +1 -1
  32. package/styleguide/category/COMPONENT/MenuButton(js)/index.html +169 -21
  33. package/styleguide/category/COMPONENT/Message(js)/index.html +1 -1
  34. package/styleguide/category/COMPONENT/Modal(js)/index.html +1 -1
  35. package/styleguide/category/COMPONENT/Pagination(js)/index.html +1 -1
  36. package/styleguide/category/COMPONENT/Panel/index.html +1 -1
  37. package/styleguide/category/COMPONENT/Progressbar(js)/index.html +1 -1
  38. package/styleguide/category/COMPONENT/Tab(js)/index.html +1 -1
  39. package/styleguide/category/COMPONENT/Tagcloud(js)/index.html +1 -1
  40. package/styleguide/category/COMPONENT/Tooltip(js)/index.html +1 -1
  41. package/styleguide/category/COMPONENT/Tree(js)/index.html +16 -1
  42. package/styleguide/category/CONTROLS/Button(js)/index.html +1 -1
  43. package/styleguide/category/CONTROLS/Checkbox/index.html +1 -1
  44. package/styleguide/category/CONTROLS/Colorpicker(js)/index.html +1 -1
  45. package/styleguide/category/CONTROLS/Datepicker(js)/index.html +1 -1
  46. package/styleguide/category/CONTROLS/Dropdown(js)/index.html +67 -10
  47. package/styleguide/category/CONTROLS/File/index.html +1 -1
  48. package/styleguide/category/CONTROLS/Form/Control/index.html +1 -1
  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 +1 -1
  52. package/styleguide/category/CONTROLS/MultiText(js)/index.html +1 -1
  53. package/styleguide/category/CONTROLS/Picklist(js)/index.html +67 -13
  54. package/styleguide/category/CONTROLS/Radio/index.html +1 -1
  55. package/styleguide/category/CONTROLS/Select/index.html +1 -1
  56. package/styleguide/category/CONTROLS/SelectButton(js)/index.html +2 -2
  57. package/styleguide/category/CONTROLS/Slider/index.html +1 -1
  58. package/styleguide/category/CONTROLS/SortableList(js)/index.html +2 -2
  59. package/styleguide/category/CONTROLS/Switch(js)/index.html +1 -1
  60. package/styleguide/category/CONTROLS/SyntaxInput(js)/index.html +1 -1
  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 +1 -1
  64. package/styleguide/category/ELEMENTS/Icon/index.html +1 -1
  65. package/styleguide/category/ELEMENTS/Image/index.html +1 -1
  66. package/styleguide/category/ELEMENTS/List/index.html +1 -1
  67. package/styleguide/category/ELEMENTS/Table/index.html +1 -1
  68. package/styleguide/category/ELEMENTS/Tag/index.html +1 -1
  69. package/styleguide/category/ELEMENTS/Title/index.html +1 -1
  70. package/styleguide/category/LAYOUT/Container/index.html +1 -1
  71. package/styleguide/category/LAYOUT/Grid/index.html +1 -1
  72. package/styleguide/category/LAYOUT/Splitter(js)/index.html +1 -1
  73. package/styleguide/category/UTILITY/index.html +1 -1
  74. package/styleguide/category/Utils/index.html +1 -1
  75. package/styleguide/color.html +1 -1
  76. package/styleguide/index.html +1 -1
  77. package/styleguide/tag/javascript/index.html +4446 -4172
  78. package/styleguide/tag/v.0.1.0/index.html +5259 -4985
@@ -16870,65 +16870,65 @@ class GNCoreEventManager {
16870
16870
  return GNCoreEventManager.instance;
16871
16871
  }
16872
16872
  // life cycle event add
16873
- stateAdd(uid, name, handler) {
16874
- return this.add(undefined, uid, name, handler);
16873
+ stateAdd(cid, name, handler) {
16874
+ return this.add(undefined, cid, name, handler);
16875
16875
  }
16876
- add(target, uid, name, handler) {
16877
- if (!this._eventMap[uid]) {
16878
- this._eventMap[uid] = []; // 해당 uid에 대한 이벤트가 없는 경우 초기화
16876
+ add(target, cid, name, handler) {
16877
+ if (!this._eventMap[cid]) {
16878
+ this._eventMap[cid] = []; // 해당 cid에 대한 이벤트가 없는 경우 초기화
16879
16879
  }
16880
- const eid = this._getEventId(uid); // eventID 생성
16881
- this._eventMap[uid].push(target
16880
+ const eid = this._getEventId(cid); // eventID 생성
16881
+ this._eventMap[cid].push(target
16882
16882
  ? {
16883
16883
  target,
16884
16884
  eid,
16885
- uid,
16885
+ cid,
16886
16886
  name,
16887
16887
  handler
16888
16888
  }
16889
16889
  : {
16890
16890
  eid,
16891
- uid,
16891
+ cid,
16892
16892
  name,
16893
16893
  handler
16894
16894
  });
16895
16895
  target && on(target, name, handler); // 이벤트 바인딩
16896
16896
  return eid;
16897
16897
  }
16898
- remove(uid, name) {
16899
- const _events = this._getEvent(uid, name);
16898
+ remove(cid, name) {
16899
+ const _events = this._getEvent(cid, name);
16900
16900
  // 이벤트 해제
16901
16901
  if (_events.length) {
16902
16902
  _events.forEach((_event) => {
16903
16903
  off(_event.target, _event.name, _event.handler);
16904
16904
  // eventMap에서 해당 이벤트 삭제
16905
- this._eventMap[uid].some(event => event.eid === _event.eid) &&
16906
- this._eventMap[uid].splice(this._eventMap[uid].findIndex(event => event.eid === _event.eid), 1);
16905
+ this._eventMap[cid].some(event => event.eid === _event.eid) &&
16906
+ this._eventMap[cid].splice(this._eventMap[cid].findIndex(event => event.eid === _event.eid), 1);
16907
16907
  });
16908
- // uid에 대한 이벤트가 남아있지 않은 경우 uid 키 삭제
16909
- if (!this._eventMap[uid].length) {
16910
- delete this._eventMap[uid];
16908
+ // cid에 대한 이벤트가 남아있지 않은 경우 cid 키 삭제
16909
+ if (!this._eventMap[cid].length) {
16910
+ delete this._eventMap[cid];
16911
16911
  }
16912
16912
  }
16913
16913
  }
16914
- removeAll(uid) {
16915
- if (!this._eventMap[uid]) {
16914
+ removeAll(cid) {
16915
+ if (!this._eventMap[cid]) {
16916
16916
  return;
16917
16917
  }
16918
16918
  // 이벤트 해제
16919
- this._eventMap[uid].forEach(event => {
16919
+ this._eventMap[cid].forEach(event => {
16920
16920
  if (event.target) {
16921
16921
  off(event.target, event.name, event.handler);
16922
16922
  }
16923
16923
  });
16924
16924
  // 이벤트 삭제
16925
- delete this._eventMap[uid];
16925
+ delete this._eventMap[cid];
16926
16926
  }
16927
16927
  /**
16928
16928
  * lifeCycle 핸들러 실행
16929
16929
  */
16930
- cyclepatch(uid, name, params) {
16931
- const _events = this._getEvent(uid, name);
16930
+ cyclepatch(cid, name, params) {
16931
+ const _events = this._getEvent(cid, name);
16932
16932
  if (_events.length) {
16933
16933
  _events.forEach((_event) => {
16934
16934
  const _tagret = _event.target || this;
@@ -16943,8 +16943,8 @@ class GNCoreEventManager {
16943
16943
  * - 모든 핸들러를 순차 실행한 뒤, 하나라도 `false` 를 반환한 경우 `true`(cancelled)를 반환한다.
16944
16944
  * (첫 false 에서 중단하지 않고, 나머지 핸들러도 계속 실행한다)
16945
16945
  */
16946
- async dispatch(uid, name, params) {
16947
- const _events = this._getEvent(uid, name);
16946
+ async dispatch(cid, name, params) {
16947
+ const _events = this._getEvent(cid, name);
16948
16948
  let cancelled = false;
16949
16949
  if (_events.length) {
16950
16950
  for (const _event of _events) {
@@ -16958,17 +16958,17 @@ class GNCoreEventManager {
16958
16958
  }
16959
16959
  return cancelled;
16960
16960
  }
16961
- _getEvent(uid, name) {
16961
+ _getEvent(cid, name) {
16962
16962
  // parameters에 해당하는 이벤트 반환
16963
- return this._eventMap[uid]
16964
- ? this._eventMap[uid].filter(event => {
16963
+ return this._eventMap[cid]
16964
+ ? this._eventMap[cid].filter(event => {
16965
16965
  return event.name === name;
16966
16966
  }) || []
16967
16967
  : [];
16968
16968
  }
16969
- _getEventId(uid) {
16969
+ _getEventId(cid) {
16970
16970
  // event ID 생성
16971
- return `ev_${uid}${this._eventMap[uid].length}`;
16971
+ return `ev_${cid}${this._eventMap[cid].length}`;
16972
16972
  }
16973
16973
  }
16974
16974
 
@@ -17012,12 +17012,12 @@ class GNUIState {
17012
17012
  }
17013
17013
  // 최초 생성 후 state에 등록 - created
17014
17014
  _addComponent(component) {
17015
- const uid = component._uid;
17016
- if (uid) {
17017
- this._componentMap[uid] = {
17015
+ const cid = component._cid;
17016
+ if (cid) {
17017
+ this._componentMap[cid] = {
17018
17018
  component: component,
17019
17019
  selector: component.$selector,
17020
- uid: uid,
17020
+ cid: cid,
17021
17021
  status: 'created'
17022
17022
  };
17023
17023
  }
@@ -17032,13 +17032,28 @@ class GNUIState {
17032
17032
  if (!_selector) {
17033
17033
  return undefined;
17034
17034
  }
17035
- Object.values(this._componentMap).forEach(n => {
17036
- // 동일한 selector 인지 비교
17037
- if (isEquals(n.uid, _selector) || isEquals(_selector.id, n.uid)) {
17035
+ // 1) cid 직접 조회 (string selector 인 경우)
17036
+ if (typeof selector === 'string' && this._componentMap[selector]) {
17037
+ _findComponent = this._componentMap[selector].component;
17038
+ _findComponent._status = this._componentMap[selector].status;
17039
+ return _findComponent;
17040
+ }
17041
+ // 2) data-component-id 기반 조회
17042
+ const dataCid = (_selector === null || _selector === void 0 ? void 0 : _selector.getAttribute) && _selector.getAttribute('data-component-id');
17043
+ if (dataCid && this._componentMap[dataCid]) {
17044
+ _findComponent = this._componentMap[dataCid].component;
17045
+ _findComponent._status = this._componentMap[dataCid].status;
17046
+ return _findComponent;
17047
+ }
17048
+ // 3) selector/element 비교 fallback
17049
+ Object.values(this._componentMap).some(n => {
17050
+ var _a;
17051
+ if (isEquals(n.selector, _selector) || isEquals((_a = n.component) === null || _a === void 0 ? void 0 : _a.$el, _selector)) {
17038
17052
  _findComponent = n.component;
17039
17053
  _findComponent._status = n.status;
17040
- return false;
17054
+ return true;
17041
17055
  }
17056
+ return false;
17042
17057
  });
17043
17058
  return _findComponent;
17044
17059
  }
@@ -17052,7 +17067,7 @@ class GNUIState {
17052
17067
  // 동일한 selector 인지 비교해서 동일한 component의 selector이면 제거 처리
17053
17068
  if (isEquals(n.selector, _selector)) {
17054
17069
  // componentMap에서 완전히 제거
17055
- delete this._componentMap[n.uid];
17070
+ delete this._componentMap[n.cid];
17056
17071
  // 컴포넌트 내부 참조도 제거 (메모리 누수 방지)
17057
17072
  if (n.component) {
17058
17073
  n.component = null;
@@ -17061,32 +17076,32 @@ class GNUIState {
17061
17076
  }
17062
17077
  });
17063
17078
  }
17064
- // 등록된 컴포넌트 제거 (uid 기반 - 더 효율적)
17065
- _removeComponentByUid(uid) {
17066
- if (!uid || !this._componentMap[uid]) {
17079
+ // 등록된 컴포넌트 제거 (cid 기반)
17080
+ _removeComponentByCid(cid) {
17081
+ if (!cid || !this._componentMap[cid]) {
17067
17082
  return;
17068
17083
  }
17069
17084
  // 컴포넌트 내부 참조 제거 (메모리 누수 방지)
17070
- const componentInfo = this._componentMap[uid];
17085
+ const componentInfo = this._componentMap[cid];
17071
17086
  if (componentInfo.component) {
17072
17087
  componentInfo.component = null;
17073
17088
  }
17074
17089
  componentInfo.selector = null;
17075
17090
  // componentMap에서 완전히 제거
17076
- delete this._componentMap[uid];
17091
+ delete this._componentMap[cid];
17077
17092
  }
17078
17093
  // 컴포넌트 life cycle에 따른 eventManager dispatch
17079
- _detectedCycle(uid, name) {
17094
+ _detectedCycle(cid, name) {
17080
17095
  // component 마지막 status 업데이트
17081
- if (this._componentMap[uid]) {
17082
- this._componentMap[uid].status = name;
17096
+ if (this._componentMap[cid]) {
17097
+ this._componentMap[cid].status = name;
17083
17098
  }
17084
- // event manager를 이용해 해당 uid 이벤트 dispatch
17099
+ // event manager를 이용해 해당 cid 이벤트 dispatch
17085
17100
  const eventManager = GNCoreEventManager.getInstance();
17086
17101
  // 호출 후
17087
- eventManager.cyclepatch(uid, name, '');
17102
+ eventManager.cyclepatch(cid, name, '');
17088
17103
  // 이벤트 해제 - life cycle 은 컴포넌트 별로 한번씩만 존재하므로..
17089
- eventManager.remove(uid, name);
17104
+ eventManager.remove(cid, name);
17090
17105
  }
17091
17106
  // document DOM observer 실행
17092
17107
  // - DOM 변환 이벤트 감지해서 removedNodes 가 생기면 해당 node와 일치하는 component를 찾아 제거한다.
@@ -17111,12 +17126,19 @@ class GNUIState {
17111
17126
  if (isElement$2(rm) && attr(rm, 'data-gnui')) {
17112
17127
  remove($('#' + attr(rm, 'data-gnui')));
17113
17128
  }
17129
+ const childComponents = $$('[data-component-id]', rm);
17130
+ each(childComponents, (childComponent) => {
17131
+ if (isElement$2(childComponent)) {
17132
+ const findComponent = closerThis._getComponent($(childComponent));
17133
+ if (findComponent && findComponent._cid && findComponent.$el && findComponent.$name !== 'modal') {
17134
+ // $destroy 내부에서 removeAll과 _removeComponentByCid를 처리하므로 직접 호출만
17135
+ findComponent.$destroy(findComponent, false);
17136
+ }
17137
+ }
17138
+ });
17114
17139
  const findComponent = closerThis._getComponent($(rm));
17115
- if (findComponent && findComponent._uid && !((_a = findComponent.$el) === null || _a === void 0 ? void 0 : _a.parentNode) && findComponent.$name !== 'modal') {
17116
- // state manager 에서 component 삭제
17117
- closerThis._removeComponent(rm);
17118
- // event manager 에서 unbind
17119
- GNCoreEventManager.getInstance().removeAll(findComponent._uid);
17140
+ if (findComponent && findComponent._cid && !((_a = findComponent.$el) === null || _a === void 0 ? void 0 : _a.parentNode) && findComponent.$name !== 'modal') {
17141
+ findComponent.$destroy(findComponent, false);
17120
17142
  }
17121
17143
  });
17122
17144
  }
@@ -17148,6 +17170,7 @@ class GNCoreInstance {
17148
17170
  return generateUUID();
17149
17171
  };
17150
17172
  this._uid = ((_a = this.$options) === null || _a === void 0 ? void 0 : _a.id) || ((_b = this.$selector) === null || _b === void 0 ? void 0 : _b.id) || `${GN_CONSTANT.PREFIX}${uuid()}`;
17173
+ this._cid = `${GN_CONSTANT.PREFIX}${uuid()}`;
17151
17174
  }
17152
17175
  $reset() { }
17153
17176
  $init(component, options) {
@@ -17158,14 +17181,14 @@ class GNCoreInstance {
17158
17181
  // component.$options.states => 사용자가 정의한 lifecycle callback handler
17159
17182
  this.$stateBind(component);
17160
17183
  // stateManager를 통해 beforeMount 상태 dispatch
17161
- stateManager._detectedCycle(component._uid, 'beforeMount');
17184
+ stateManager._detectedCycle(component._cid, 'beforeMount');
17162
17185
  this.$mount(component, this.$selector);
17163
17186
  this.$render(component.$options);
17164
17187
  // stateManager를 통해 beforeBind 상태 dispatch
17165
- stateManager._detectedCycle(component._uid, 'beforeBind');
17188
+ stateManager._detectedCycle(component._cid, 'beforeBind');
17166
17189
  this.$bind(component);
17167
17190
  // stateManager를 통해 completed 상태 dispatch
17168
- stateManager._detectedCycle(component._uid, 'completed');
17191
+ stateManager._detectedCycle(component._cid, 'completed');
17169
17192
  }
17170
17193
  $create(component, options) {
17171
17194
  // extend options
@@ -17227,7 +17250,7 @@ class GNCoreInstance {
17227
17250
  const eventManager = GNCoreEventManager.getInstance();
17228
17251
  // lifecycle 관련 이벤트 add to eventManager
17229
17252
  GN_CONSTANT.LIFE_CYCLE.forEach((ev) => {
17230
- eventManager.stateAdd(component._uid, ev, (...args) => {
17253
+ eventManager.stateAdd(component._cid, ev, (...args) => {
17231
17254
  // 해당 life cycle 상태에 해당하는 함수가 각 컴포넌트 내부에 정의되어 있으면 호출한다.
17232
17255
  if (isFunction(component[ev])) {
17233
17256
  component[ev](args);
@@ -17272,12 +17295,17 @@ class GNCoreInstance {
17272
17295
  if (tmpRole) {
17273
17296
  attr(this.$el, 'role', tmpRole);
17274
17297
  }
17298
+ attr(this.$el, 'data-component-id', this._cid);
17275
17299
  // inherit selector class
17276
17300
  selector.className && addClass(this.$el, selector.className);
17277
17301
  }
17278
17302
  else {
17279
17303
  this.$el = $(this.$selector);
17280
17304
  }
17305
+ // 항상 컴포넌트 cid를 DOM에 표시 (기존 DOM 사용 시에도)
17306
+ if (this.$el) {
17307
+ attr(this.$el, 'data-component-id', this._cid);
17308
+ }
17281
17309
  // delegates 바인딩
17282
17310
  each(this.$options.delegates, (val, key) => {
17283
17311
  if (isString(val)) {
@@ -17297,11 +17325,11 @@ class GNCoreInstance {
17297
17325
  const eventManager = GNCoreEventManager.getInstance();
17298
17326
  each(events, (event, name) => {
17299
17327
  if (isFunction(event)) {
17300
- eventManager.add(this.$el, this._uid, event.name || name, event);
17328
+ eventManager.add(this.$el, this._cid, event.name || name, event);
17301
17329
  }
17302
17330
  else if (isPlainObject$1(event)) {
17303
17331
  const delegate = isFunction(event.delegate) ? event.delegate() : event.delegate;
17304
- eventManager.add(delegate, this._uid, event.name, event.handler);
17332
+ eventManager.add(delegate, this._cid, event.name, event.handler);
17305
17333
  }
17306
17334
  });
17307
17335
  }
@@ -17320,13 +17348,13 @@ class GNCoreInstance {
17320
17348
  */
17321
17349
  async $event(component, name, ...params) {
17322
17350
  const eventManager = GNCoreEventManager.getInstance();
17323
- return eventManager.dispatch(component._uid, name, params);
17351
+ return eventManager.dispatch(component._cid, name, params);
17324
17352
  }
17325
17353
  $destroy(component = this, removeEl = true) {
17326
17354
  var _a;
17327
17355
  const stateManager = GNUIState.getInstance();
17328
17356
  // state manager 를 통해 destroy 상태 dispatch
17329
- stateManager._detectedCycle(component._uid, 'destroy');
17357
+ stateManager._detectedCycle(component._cid, 'destroy');
17330
17358
  // remove DOM (by removeEl)
17331
17359
  if (removeEl) {
17332
17360
  style(component.$el, 'display', 'none');
@@ -17336,11 +17364,11 @@ class GNCoreInstance {
17336
17364
  component.$options._destroy();
17337
17365
  }
17338
17366
  // state manager 를 통해 destroy 상태 dispatch
17339
- stateManager._detectedCycle(component._uid, 'destroyed');
17367
+ stateManager._detectedCycle(component._cid, 'destroyed');
17340
17368
  // event manager 에서 등록 해제
17341
- GNCoreEventManager.getInstance().removeAll(component._uid);
17342
- // state manager에서 component 제거 (uid 기반으로 효율적 제거)
17343
- stateManager._removeComponentByUid(component._uid);
17369
+ GNCoreEventManager.getInstance().removeAll(component._cid);
17370
+ // state manager에서 component 제거 (cid 기반)
17371
+ stateManager._removeComponentByCid(component._cid);
17344
17372
  // 메모리 누수 방지: component의 모든 hasOwnProperty 제거
17345
17373
  // config, events, methods, _hidden 등 동적으로 추가된 속성 포함
17346
17374
  Object.keys(component).forEach((key) => {
@@ -33297,7 +33325,10 @@ class Dropdown extends GNCoreInstance {
33297
33325
  text: ''
33298
33326
  };
33299
33327
  }
33300
- this.$event(this, 'onChange', option.value, option.text, this.$options.value);
33328
+ // 기존 의미 유지: 클릭된 옵션 기준으로 value/text 전달
33329
+ const value = !isArray$1(option.value) ? String(option.value) : '';
33330
+ const text = option.text || (isArray$1(option === null || option === void 0 ? void 0 : option.cols) ? option.cols : value);
33331
+ this.$event(this, 'onChange', value, text, this.$options.value);
33301
33332
  },
33302
33333
  toggle: () => {
33303
33334
  if (this.$options.disabled) {
@@ -33393,18 +33424,33 @@ class Dropdown extends GNCoreInstance {
33393
33424
  const target = e instanceof Event ? $(e.currentTarget) : find(`[data-value=${option.value}]`, this.$el);
33394
33425
  e instanceof Event && e.stopPropagation();
33395
33426
  // toggle 처리
33427
+ const checkbox = find('input[type=checkbox]', target);
33396
33428
  if (hasClass(target, 'is-active')) {
33397
33429
  removeClass(target, 'is-active');
33398
- find('input[type=checkbox]', target).checked = false;
33430
+ if (checkbox) {
33431
+ checkbox.checked = false;
33432
+ }
33399
33433
  }
33400
33434
  else {
33401
33435
  addClass(target, 'is-active');
33402
- find('input[type=checkbox]', target).checked = true;
33436
+ if (checkbox) {
33437
+ checkbox.checked = true;
33438
+ }
33403
33439
  }
33404
33440
  const selected = findAll('.dropdown-item.is-active', this.$el).map((item) => data(item, 'data-value'));
33405
- this.$options.value = this.$options.data.filter((opt) => selected.includes(opt.value));
33441
+ this.$options.value = this.$options.data.filter((opt) => {
33442
+ // value가 배열이 아닌 경우에만 비교
33443
+ return !isArray$1(opt.value) && selected.includes(opt.value);
33444
+ });
33406
33445
  // text 표시
33407
- const selectText = this.$options.value.map((v) => v.text).join(',');
33446
+ // Implements [US-Rev-014] cols가 있는 경우 첫 번째 컬럼 값을 표시
33447
+ const selectText = this.$options.value.map((v) => {
33448
+ if (isArray$1(v === null || v === void 0 ? void 0 : v.cols)) {
33449
+ return v.cols[0];
33450
+ }
33451
+ // value가 배열이 아닌 경우에만 사용
33452
+ return v.text || (!isArray$1(v.value) ? String(v.value) : '');
33453
+ }).join(',');
33408
33454
  text$1(find('.dropdown-text', this.$el), selectText.length ? escapeEntity(selectText) : this.$options.textSets && this.$options.textSets.selectText ? this.$options.textSets.selectText : '');
33409
33455
  this._hidden.change(option);
33410
33456
  }
@@ -33426,9 +33472,21 @@ class Dropdown extends GNCoreInstance {
33426
33472
  }
33427
33473
  // text 표시
33428
33474
  const selectText = find('.dropdown-text', this.$el);
33429
- text$1(selectText, escapeEntity(option.text));
33475
+ // Implements [US-Rev-014] cols가 있는 경우 첫 번째 컬럼 값을 표시
33476
+ let displayText;
33477
+ if (isArray$1(option === null || option === void 0 ? void 0 : option.cols)) {
33478
+ displayText = option.cols[0];
33479
+ }
33480
+ else {
33481
+ // value가 배열이 아닌 경우에만 사용
33482
+ displayText = option.text || (!isArray$1(option.value) ? String(option.value) : '');
33483
+ }
33484
+ text$1(selectText, escapeEntity(displayText));
33430
33485
  // select 선택값 변경
33431
- targetSelect.value = option.value;
33486
+ // value 배열이 아닌 경우에만 설정
33487
+ if (!isArray$1(option.value)) {
33488
+ targetSelect.value = option.value;
33489
+ }
33432
33490
  trigger(targetSelect, 'change');
33433
33491
  this.$options.value = option;
33434
33492
  this._hidden.change(option);
@@ -33485,21 +33543,76 @@ class Dropdown extends GNCoreInstance {
33485
33543
  return;
33486
33544
  }
33487
33545
  findAll('.dropdown-item', this.$el).forEach((option) => {
33488
- if (!includes(data(option, 'value').toUpperCase(), q.toUpperCase()) && !includes(text$1(find('.dropdown-text', option)).toUpperCase(), q.toUpperCase())) {
33546
+ const itemValue = data(option, 'value');
33547
+ // value가 배열이 아닌 항목만 검색 대상으로 처리
33548
+ const rowData = this.$options.flatData.find((item) => {
33549
+ // value가 배열이 아닌 경우에만 비교
33550
+ return !isArray$1(item.value) && String(item.value) === itemValue;
33551
+ });
33552
+ let match = false;
33553
+ // Implements [US-Rev-014] 다중 컬럼 모드: cols 배열의 값들을 검색
33554
+ if (isArray$1(rowData === null || rowData === void 0 ? void 0 : rowData.cols)) {
33555
+ match = rowData.cols.some((colValue) => {
33556
+ return includes(String(colValue).toUpperCase(), q.toUpperCase());
33557
+ });
33558
+ // value 필드도 검색 대상에 포함 (배열이 아닌 경우에만)
33559
+ if (!match && rowData.value && !isArray$1(rowData.value)) {
33560
+ match = includes(String(rowData.value).toUpperCase(), q.toUpperCase());
33561
+ }
33562
+ }
33563
+ else if (rowData) {
33564
+ // 단일 컬럼 모드: text 또는 value 필드 검색
33565
+ const textValue = rowData.text || (!isArray$1(rowData.value) ? String(rowData.value) : '');
33566
+ const valueStr = !isArray$1(rowData.value) ? String(rowData.value) : '';
33567
+ match = includes(valueStr.toUpperCase(), q.toUpperCase()) || includes(textValue.toUpperCase(), q.toUpperCase());
33568
+ }
33569
+ else {
33570
+ // rowData를 찾지 못한 경우 (그룹화된 항목 등), DOM에서 직접 검색
33571
+ const textValue = text$1(find('.dropdown-text', option));
33572
+ match = includes(itemValue.toUpperCase(), q.toUpperCase()) || includes(textValue.toUpperCase(), q.toUpperCase());
33573
+ }
33574
+ if (!match) {
33489
33575
  css$1(option, 'display', 'none');
33490
33576
  }
33491
33577
  });
33492
33578
  },
33493
33579
  renderLabel: () => {
33494
- const _labelText = this.$options.value
33495
- ? isArray$1(this.$options.value)
33496
- ? this.$options.value.map((v) => v.text).join(',')
33497
- : this.$options.value.text
33498
- : this.$options.textSets && this.$options.textSets.selectText
33499
- ? this.$options.textSets.selectText
33500
- : this.$options.flatData.length
33501
- ? this.$options.flatData[0].text
33502
- : '';
33580
+ // Implements [US-Rev-014] cols가 있는 경우 첫 번째 컬럼 값을 표시
33581
+ let _labelText = '';
33582
+ if (this.$options.value) {
33583
+ if (isArray$1(this.$options.value)) {
33584
+ _labelText = this.$options.value.map((v) => {
33585
+ if (isArray$1(v === null || v === void 0 ? void 0 : v.cols)) {
33586
+ return v.cols[0];
33587
+ }
33588
+ // value가 배열이 아닌 경우에만 사용
33589
+ return v.text || (!isArray$1(v.value) ? String(v.value) : '');
33590
+ }).join(',');
33591
+ }
33592
+ else {
33593
+ const value = this.$options.value;
33594
+ if (isArray$1(value === null || value === void 0 ? void 0 : value.cols)) {
33595
+ _labelText = value.cols[0];
33596
+ }
33597
+ else {
33598
+ // value가 배열이 아닌 경우에만 사용
33599
+ _labelText = value.text || (!isArray$1(value.value) ? String(value.value) : '');
33600
+ }
33601
+ }
33602
+ }
33603
+ else if (this.$options.textSets && this.$options.textSets.selectText) {
33604
+ _labelText = this.$options.textSets.selectText;
33605
+ }
33606
+ else if (this.$options.flatData.length) {
33607
+ const firstItem = this.$options.flatData[0];
33608
+ if (isArray$1(firstItem === null || firstItem === void 0 ? void 0 : firstItem.cols)) {
33609
+ _labelText = firstItem.cols[0];
33610
+ }
33611
+ else {
33612
+ // value가 배열이 아닌 경우에만 사용
33613
+ _labelText = firstItem.text || (!isArray$1(firstItem.value) ? String(firstItem.value) : '');
33614
+ }
33615
+ }
33503
33616
  return createElement$1("span", { className: "dropdown-text" }, escapeEntity(_labelText));
33504
33617
  },
33505
33618
  renderSub: (data) => {
@@ -33509,24 +33622,43 @@ class Dropdown extends GNCoreInstance {
33509
33622
  if (this.$options.type === 'opened' && !items.length) {
33510
33623
  return createElement$1("div", { className: 'dropdown-nodata' }, this.$options.textSets.noData);
33511
33624
  }
33512
- return (createElement$1("ul", null, items.map((option, index) => (createElement$1("li", { id: this._uid + '_opt_' + index, className: 'dropdown-item' +
33513
- (option.text ? '' : ' is-unselectable') +
33514
- (this.$options.value &&
33515
- (isArray$1(this.$options.value) ? this.$options.value.find((v) => v.value === option.value) : option.value === this.$options.value.value)
33516
- ? ' is-active'
33517
- : '') +
33518
- (this.$options.multiple ? ' has-checkbox' : ''), "on-click": isArray$1(option.value) || !option.text ? null : this._hidden.select.bind(this, option), "data-value": isArray$1(option.value) ? '' : option.value, title: option.text ? escapeEntity(option.text) : '' },
33519
- createElement$1("span", { className: "dropdown-text", innerHTML: option.html ? option.html : '' },
33520
- option.html ? ('') : this.$options.multiple ? (createElement$1("div", { className: "gn-checks is-small is-no-padding" },
33521
- createElement$1("input", { type: "checkbox", id: this._uid + '_chk_' + index, defaultChecked: this.$options.value &&
33522
- (isArray$1(this.$options.value) ? this.$options.value.find((v) => v.value === option.value) : option.value === this.$options.value.value), disabled: this.$options.disabled }),
33523
- createElement$1("label", { for: this._uid + '_chk_' + index }, escapeEntity(option.text)))) : option.icon ? (createElement$1("span", null,
33524
- createElement$1("span", { className: 'gn-icon' + (this.$options.size ? ' is-' + this.$options.size : '') },
33525
- createElement$1("i", { className: (this.isBrandIcon(option.icon) ? 'fab' : 'fa') + ` fa-${option.icon}` })),
33526
- escapeEntity(option.text))) : (escapeEntity(option.text)),
33527
- isArray$1(option.value) && (createElement$1("span", { className: "gn-icon is-small submenu-icon" },
33528
- createElement$1("i", { className: "fas fa-angle-right" })))),
33529
- isArray$1(option.value) && this._hidden.renderSub(option.value))))));
33625
+ const hasCols = items.some((item) => !(item === null || item === void 0 ? void 0 : item.html) && isArray$1(item === null || item === void 0 ? void 0 : item.cols));
33626
+ return (createElement$1("ul", { className: hasCols ? 'is-cols' : '' }, items.map((option, index) => {
33627
+ const hasHtml = !!option.html;
33628
+ const hasColsData = isArray$1(option === null || option === void 0 ? void 0 : option.cols);
33629
+ const renderAsCols = !hasHtml && hasColsData;
33630
+ // html이 있으면 text가 있는 항목만 선택 가능
33631
+ // cols가 있으면 번째 컬럼을 displayText로 사용 (value 비어도 선택 가능)
33632
+ const displayText = hasHtml
33633
+ ? (option.text || '')
33634
+ : renderAsCols
33635
+ ? (option.cols && option.cols.length ? String(option.cols[0]) : '')
33636
+ : (option.text || (!isArray$1(option.value) ? String(option.value) : ''));
33637
+ return (createElement$1("li", { key: index, id: this._uid + '_opt_' + index, className: 'dropdown-item' +
33638
+ (renderAsCols ? ' dropdown-row' : '') +
33639
+ (displayText ? '' : ' is-unselectable') +
33640
+ (this.$options.value &&
33641
+ (isArray$1(this.$options.value) ? this.$options.value.find((v) => v.value === option.value) : option.value === this.$options.value.value)
33642
+ ? ' is-active'
33643
+ : '') +
33644
+ (this.$options.multiple ? ' has-checkbox' : ''), "on-click": isArray$1(option.value) || !displayText ? null : this._hidden.select.bind(this, option), "data-value": isArray$1(option.value) ? '' : option.value, title: displayText ? escapeEntity(String(displayText)) : '' },
33645
+ createElement$1("span", { className: "dropdown-text", innerHTML: option.html ? option.html : '' },
33646
+ option.html ? ('') : renderAsCols ? (createElement$1("div", { className: "gn-checks dropdown-cols" },
33647
+ this.$options.multiple && (createElement$1("div", { className: "is-small is-no-padding" },
33648
+ createElement$1("input", { type: "checkbox", id: this._uid + '_chk_' + index, defaultChecked: this.$options.value &&
33649
+ (isArray$1(this.$options.value) ? this.$options.value.find((v) => v.value === option.value) : option.value === this.$options.value.value), disabled: this.$options.disabled }),
33650
+ createElement$1("label", { for: this._uid + '_chk_' + index }))),
33651
+ option.cols.map((col, colIndex) => (createElement$1("span", { key: colIndex, className: "dropdown-col" }, escapeEntity(col)))))) : this.$options.multiple ? (createElement$1("div", { className: "gn-checks is-small is-no-padding" },
33652
+ createElement$1("input", { type: "checkbox", id: this._uid + '_chk_' + index, defaultChecked: this.$options.value &&
33653
+ (isArray$1(this.$options.value) ? this.$options.value.find((v) => v.value === option.value) : option.value === this.$options.value.value), disabled: this.$options.disabled }),
33654
+ createElement$1("label", { for: this._uid + '_chk_' + index }, escapeEntity(option.text || (!isArray$1(option.value) ? String(option.value) : ''))))) : option.icon ? (createElement$1("span", null,
33655
+ createElement$1("span", { className: 'gn-icon' + (this.$options.size ? ' is-' + this.$options.size : '') },
33656
+ createElement$1("i", { className: (this.isBrandIcon(option.icon) ? 'fab' : 'fa') + ` fa-${option.icon}` })),
33657
+ escapeEntity(option.text || (!isArray$1(option.value) ? String(option.value) : '')))) : (escapeEntity(option.text || (!isArray$1(option.value) ? String(option.value) : ''))),
33658
+ isArray$1(option.value) && (createElement$1("span", { className: "gn-icon is-small submenu-icon" },
33659
+ createElement$1("i", { className: "fas fa-angle-right" })))),
33660
+ isArray$1(option.value) && this._hidden.renderSub(option.value)));
33661
+ })));
33530
33662
  },
33531
33663
  flatData: () => {
33532
33664
  // data 검색 편의성을 위해 depth를 없앤 flatdata 생성
@@ -33564,11 +33696,17 @@ class Dropdown extends GNCoreInstance {
33564
33696
  : [String(this.$options.value)]; // 기타: 숫자 등
33565
33697
  this.$options.value = this.$options.flatData.filter((opt) => {
33566
33698
  const optValue = typeof opt.value === 'string' ? opt.value : String(opt.value);
33567
- return values.includes(optValue) && opt.text;
33699
+ // Implements [US-Rev-014] cols가 있으면 text 없어도 선택 가능
33700
+ return values.includes(optValue) && (opt.text || isArray$1(opt === null || opt === void 0 ? void 0 : opt.cols) || (!isArray$1(opt.value)));
33568
33701
  });
33569
33702
  }
33570
33703
  else {
33571
- this.$options.value = this.$options.flatData.find((opt) => opt.value + '' === this.$options.value + '' && opt.text);
33704
+ // Implements [US-Rev-014] cols가 있으면 text 없어도 선택 가능
33705
+ this.$options.value = this.$options.flatData.find((opt) => {
33706
+ const optValue = !isArray$1(opt.value) ? String(opt.value) : '';
33707
+ const compareValue = String(this.$options.value);
33708
+ return optValue === compareValue && (opt.text || isArray$1(opt === null || opt === void 0 ? void 0 : opt.cols) || optValue);
33709
+ });
33572
33710
  }
33573
33711
  }
33574
33712
  },
@@ -37142,9 +37280,11 @@ class DataGrid extends GNCoreInstance {
37142
37280
  isCheck = true;
37143
37281
  }
37144
37282
  return (createElement$1("div", { "on-click": (e) => {
37145
- !this.$options.disabled && this._hidden.selectRow.call(this, row, _index, e);
37283
+ var _a;
37284
+ ((_a = this === null || this === void 0 ? void 0 : this.$options) === null || _a === void 0 ? void 0 : _a.onSelect) && !this.$options.disabled && this._hidden.selectRow.call(this, row, _index, e);
37146
37285
  }, "on-dblclick": (e) => {
37147
- !this.$options.disabled && this._hidden.doubleSelect.call(this, row, _index, e);
37286
+ var _a;
37287
+ ((_a = this === null || this === void 0 ? void 0 : this.$options) === null || _a === void 0 ? void 0 : _a.onDoubleClick) && !this.$options.disabled && this._hidden.doubleSelect.call(this, row, _index, e);
37148
37288
  }, className: 'gn-datagrid-body-row' + (hasChild ? ' has-child' : '') + (row.isOpened ? '' : ' is-collapsed') + (depth > 0 && !isOpened ? ' is-hidden' : '') + (row.color ? ` ${row.color}` : ''), style: {
37149
37289
  'grid-template-columns': this._columnsTemplate.join(' ')
37150
37290
  }, id: this._uid + '-row-' + _index, "data-depth": depth }, columns.map((col, idx) => {
@@ -37195,11 +37335,11 @@ class DataGrid extends GNCoreInstance {
37195
37335
  (col.bodyClass ? col.bodyClass : col.className ? col.className : '') +
37196
37336
  (isFunction(col.onSelect) ? ' is-selectable' : '') +
37197
37337
  (col.isHidden ? ' is-unvisible' : ''), "data-key": col.key, style: cellStyle, "on-click": (e) => {
37198
- !this.$options.disabled && this._hidden.selectCell.call(this, col, row, _index, e);
37338
+ col.onSelect && !this.$options.disabled && this._hidden.selectCell.call(this, col, row, _index, e);
37199
37339
  }, "on-mouseenter": (e) => {
37200
- !this.$options.disabled && this._hidden.hoverCell.call(this, col, row, _index, e);
37340
+ col.onHover && !this.$options.disabled && this._hidden.hoverCell.call(this, col, row, _index, e);
37201
37341
  }, "on-mouseleave": (e) => {
37202
- this._hidden.blurCell.call(this, col, row, _index, e);
37342
+ col.offHover && this._hidden.blurCell.call(this, col, row, _index, e);
37203
37343
  }, title: col.tipField && row[col.tipField] ? row[col.tipField] : !col.template && row[col.key] ? row[col.key] : '' }, this._hidden.renderCell(row, col, idx, hasChild, isCheck, _index)));
37204
37344
  })));
37205
37345
  },
@@ -37885,7 +38025,7 @@ class DataList extends GNCoreInstance {
37885
38025
  color: (this.$options.readonly ? 'info' : 'cancel')
37886
38026
  };
37887
38027
  return (createElement$1("div", { "on-dblclick": (e) => {
37888
- this._hidden.doubleSelect.call(this, row, _index, e);
38028
+ this.$options.onDoubleClick && this._hidden.doubleSelect.call(this, row, _index, e);
37889
38029
  }, id: this._uid + '-row-' + _index, className: 'gn-datalist-body-row' + (hasChild ? ' has-child' : '') + (row.isOpened ? '' : ' is-collapsed') + (row.isSelectedRow ? ' is-active' : '') + (depth > 0 && !isOpened ? ' is-hidden' : ''), "data-depth": depth, style: { cursor: this.$options.onSelect ? 'pointer' : 'default' } },
37890
38030
  createElement$1("ol", { className: 'gn-datalist-ol-container' }, columns.map((col, idx) => {
37891
38031
  const cellStyle = {};
@@ -37914,9 +38054,9 @@ class DataList extends GNCoreInstance {
37914
38054
  (col.bodyClass ? col.bodyClass : col.className ? col.className : '') +
37915
38055
  (isFunction(col.onSelect) ? ' is-selectable' : '') +
37916
38056
  (col.isHidden ? ' is-unvisible' : ''), style: cellStyle, "on-mouseenter": (e) => {
37917
- this._hidden.hoverCell.call(this, col, row, _index, e);
38057
+ col.onHover && this._hidden.hoverCell.call(this, col, row, _index, e);
37918
38058
  }, "on-mouseleave": (e) => {
37919
- this._hidden.blurCell.call(this, col, row, _index, e);
38059
+ col.offHover && this._hidden.blurCell.call(this, col, row, _index, e);
37920
38060
  }, title: !col.template && row[col.key] ? row[col.key] : '' }, this._hidden.renderCell(row, col, idx, hasChild)))));
37921
38061
  })),
37922
38062
  createElement$1("div", { id: this._uid + '-btn-' + index, className: "gn-datalist-btn-container" },
@@ -39191,6 +39331,7 @@ class Message extends GNCoreInstance {
39191
39331
 
39192
39332
  class MenuButton extends GNCoreInstance {
39193
39333
  constructor(name, selector, options = {}) {
39334
+ var _a, _b, _c, _d;
39194
39335
  super(name, selector, options);
39195
39336
  this._hidden = {
39196
39337
  open: () => {
@@ -39202,7 +39343,9 @@ class MenuButton extends GNCoreInstance {
39202
39343
  removeClass(this.$el, 'is-open');
39203
39344
  },
39204
39345
  select: (menu, e) => {
39205
- this.$event(this, 'onSelect', menu.value, menu.text, menu, e);
39346
+ // cols만 있고 text 없는 경우 cols[0]을 text로 사용 (호환성 유지)
39347
+ const menuText = menu.text || (isArray$1(menu === null || menu === void 0 ? void 0 : menu.cols) ? menu.cols[0] : menu.value || '');
39348
+ this.$event(this, 'onSelect', menu.value, menuText, menu, e);
39206
39349
  this._hidden.close();
39207
39350
  },
39208
39351
  changeText: (buttonText) => {
@@ -39237,12 +39380,16 @@ class MenuButton extends GNCoreInstance {
39237
39380
  // 부모 경로를 포함한 고유한 ID 생성
39238
39381
  const currentPath = parentPath ? `${parentPath}-${index}` : `${index}`;
39239
39382
  const uniqueId = `${this._uid}-${currentPath}`;
39383
+ const hasColsData = isArray$1(menu === null || menu === void 0 ? void 0 : menu.cols);
39384
+ const renderAsCols = !hasHtml && hasColsData;
39385
+ const canSelect = !hasHtml || !!menu.text;
39240
39386
  return (createElement$1("li", { id: uniqueId, className: 'menuButton-menu' +
39241
39387
  (this.$options.align ? ' has-text-' + this.$options.align : '') +
39242
39388
  (canRenderChild ? ' has-submenu' : '') +
39243
39389
  (depth > 0 ? ' is-submenu-item' : '') +
39244
39390
  (isDisabled ? ' is-disabled' : '') +
39245
- (isActived ? ' is-actived' : ''), "on-click": (e) => {
39391
+ (isActived ? ' is-actived' : '') +
39392
+ (renderAsCols ? ' has-cols' : ''), "on-click": (e) => {
39246
39393
  // disabled 상태이거나 자식 메뉴가 있는 경우 클릭 이벤트 처리하지 않음
39247
39394
  if (isDisabled) {
39248
39395
  e.stopPropagation();
@@ -39251,12 +39398,16 @@ class MenuButton extends GNCoreInstance {
39251
39398
  }
39252
39399
  // 자식 메뉴가 없는 경우에만 select 이벤트 발생
39253
39400
  if (!canRenderChild) {
39401
+ if (!canSelect) {
39402
+ e.stopPropagation();
39403
+ return;
39404
+ }
39254
39405
  e.stopPropagation();
39255
39406
  this._hidden.select.call(this, menu, e);
39256
39407
  }
39257
39408
  }, innerHTML: hasHtml ? menu.html : '' },
39258
- hasHtml ? ('') : (createElement$1("span", { className: "menuButton-menu-content" },
39259
- createElement$1("span", { className: "menuButton-menu-text" }, menu.text),
39409
+ hasHtml ? ('') : renderAsCols ? (createElement$1("div", { className: "menubutton-cols" }, menu.cols.map((col, colIndex) => (createElement$1("span", { key: colIndex, className: "menubutton-col" }, escapeEntity(col)))))) : (createElement$1("span", { className: "menuButton-menu-content" },
39410
+ createElement$1("span", { className: "menuButton-menu-text" }, menu.text || menu.value || ''),
39260
39411
  canRenderChild && (createElement$1("span", { className: "menuButton-menu-arrow" },
39261
39412
  createElement$1("i", { className: "fas fa-caret-right" }))))),
39262
39413
  canRenderChild && this._hidden.renderMenus.call(this, menu.child, depth + 1, currentPath)));
@@ -39268,9 +39419,11 @@ class MenuButton extends GNCoreInstance {
39268
39419
  };
39269
39420
  this.config = {
39270
39421
  textSets: {
39271
- buttonText: this.$selector.textContent
39422
+ buttonText: ((_a = this.$selector) === null || _a === void 0 ? void 0 : _a.cols)
39423
+ ? (isArray$1(this.$selector.cols) ? this.$selector.cols.join(', ') : String(this.$selector.cols))
39424
+ : (((_b = this.$selector) === null || _b === void 0 ? void 0 : _b.textContent) || ((_c = this.$selector) === null || _c === void 0 ? void 0 : _c.text) || '')
39272
39425
  },
39273
- name: this.$selector.name,
39426
+ name: (_d = this.$selector) === null || _d === void 0 ? void 0 : _d.name,
39274
39427
  data: [],
39275
39428
  align: 'left'
39276
39429
  };
@@ -39548,9 +39701,27 @@ class Picklist extends GNCoreInstance {
39548
39701
  return;
39549
39702
  }
39550
39703
  findAll(`.picklist-${obj} .dropdown-item`, this.$el).forEach((option) => {
39551
- if (!includes(data(option, 'value').toUpperCase(), q.toUpperCase()) && !includes(text$1(find('.dropdown-text', option)).toUpperCase(), q.toUpperCase())) {
39704
+ const itemValue = data(option, 'value');
39705
+ const rowData = this.$options.data[obj].find((item) => item.value === itemValue);
39706
+ let match = false;
39707
+ // Implements [US-Rev-023] 다중 컬럼 모드: cols 배열의 값들을 검색
39708
+ if (isArray$1(rowData === null || rowData === void 0 ? void 0 : rowData.cols)) {
39709
+ match = rowData.cols.some((colValue) => {
39710
+ return includes(String(colValue).toUpperCase(), q.toUpperCase());
39711
+ });
39712
+ // value 필드도 검색 대상에 포함
39713
+ if (!match && rowData.value) {
39714
+ match = includes(String(rowData.value).toUpperCase(), q.toUpperCase());
39715
+ }
39716
+ }
39717
+ else {
39718
+ // 단일 컬럼 모드: text 또는 value 필드 검색
39719
+ const textValue = text$1(find('.dropdown-text', option));
39720
+ match = includes(data(option, 'value').toUpperCase(), q.toUpperCase()) || includes(textValue.toUpperCase(), q.toUpperCase());
39721
+ }
39722
+ if (!match) {
39552
39723
  css$1(option, 'display', 'none');
39553
- this.$options.data[`filtered-${obj}`] = this.$options.data[`filtered-${obj}`].filter((e) => e.value !== option.dataset.value);
39724
+ this.$options.data[`filtered-${obj}`] = this.$options.data[`filtered-${obj}`].filter((e) => e.value !== itemValue);
39554
39725
  }
39555
39726
  });
39556
39727
  },
@@ -39659,9 +39830,20 @@ class Picklist extends GNCoreInstance {
39659
39830
  isArray$1(addArr) &&
39660
39831
  addArr.forEach((option) => {
39661
39832
  const _index = source.findIndex((select) => {
39662
- return option.value === select.value && option.text === select.text;
39833
+ const valueMatch = option.value === select.value;
39834
+ if (isArray$1(option === null || option === void 0 ? void 0 : option.cols)) {
39835
+ if (!isArray$1(select === null || select === void 0 ? void 0 : select.cols) || select.cols.length !== option.cols.length) {
39836
+ return false;
39837
+ }
39838
+ const colsMatch = option.cols.every((col, idx) => col === select.cols[idx]);
39839
+ return valueMatch && colsMatch;
39840
+ }
39841
+ return valueMatch && option.text === select.text;
39663
39842
  });
39664
- target.push(source.splice(_index, 1).pop());
39843
+ // 매칭 실패 시 (_index === -1) 마지막 항목이 제거되는 것을 방지
39844
+ if (_index >= 0) {
39845
+ target.push(source.splice(_index, 1).pop());
39846
+ }
39665
39847
  });
39666
39848
  },
39667
39849
  reRender: (obj) => {
@@ -39671,21 +39853,32 @@ class Picklist extends GNCoreInstance {
39671
39853
  },
39672
39854
  renderSub: (item) => {
39673
39855
  const items = this.$options.data[item] || [];
39674
- return (createElement$1("ul", null, items.map((option, index) => {
39856
+ const hasColsForList = items.some((item) => !(item === null || item === void 0 ? void 0 : item.html) && isArray$1(item === null || item === void 0 ? void 0 : item.cols));
39857
+ return (createElement$1("ul", { className: hasColsForList ? 'is-cols' : '' }, items.map((option, index) => {
39675
39858
  var _a;
39676
- return (createElement$1("li", { id: this._uid + '_opt_' + index, className: 'dropdown-item' + (option.selected ? ' is-active' : ''), "data-value": option.value, "on-click": !option.text ? null : this._hidden.toggle.bind(this), "on-dblclick": !option.text
39859
+ const hasHtml = !!option.html;
39860
+ const hasColsData = isArray$1(option === null || option === void 0 ? void 0 : option.cols);
39861
+ const renderAsCols = !hasHtml && hasColsData;
39862
+ // html이 있으면 text가 있는 항목만 선택 가능
39863
+ // cols가 있으면 첫 번째 컬럼을 displayText로 사용 (value가 비어도 선택 가능)
39864
+ const displayText = hasHtml
39865
+ ? (option.text || '')
39866
+ : renderAsCols
39867
+ ? (option.cols && option.cols.length ? String(option.cols[0]) : '')
39868
+ : (option.text || option.value);
39869
+ return (createElement$1("li", { key: index, id: this._uid + '_opt_' + index, className: 'dropdown-item' + (renderAsCols ? ' picklist-row' : '') + (option.selected ? ' is-active' : ''), "data-value": option.value, "on-click": !displayText ? null : this._hidden.toggle.bind(this), "on-dblclick": !displayText
39677
39870
  ? null
39678
39871
  : this._hidden.move.bind(this, item === 'source' ? 'add' : 'remove', [
39679
39872
  {
39680
39873
  value: option.value,
39681
- text: option.text,
39874
+ text: renderAsCols ? undefined : option.text,
39875
+ cols: hasColsData ? option.cols : undefined,
39682
39876
  html: (_a = option.html) !== null && _a !== void 0 ? _a : null
39683
39877
  }
39684
- ]) },
39685
- createElement$1("span", { className: "dropdown-text", innerHTML: option.html ? option.html : '' }, option.html ? ('') : option.icon ? (createElement$1("span", null,
39686
- createElement$1("span", { className: 'gn-icon' + (this.$options.size ? ' is-' + this.$options.size : '') },
39687
- createElement$1("i", { className: (this.isBrandIcon(option.icon) ? 'fab' : 'fa') + ` fa-${option.icon}` })),
39688
- escapeEntity(option.text))) : (escapeEntity(option.text)))));
39878
+ ]) }, hasHtml ? (createElement$1("span", { className: "dropdown-text", innerHTML: option.html })) : renderAsCols ? (createElement$1("div", { className: "picklist-cols" }, option.cols.map((col, colIndex) => (createElement$1("span", { key: colIndex, className: "picklist-col" }, escapeEntity(col)))))) : (createElement$1("span", { className: "dropdown-text" }, option.icon ? (createElement$1("span", null,
39879
+ createElement$1("span", { className: 'gn-icon' + (this.$options.size ? ' is-' + this.$options.size : '') },
39880
+ createElement$1("i", { className: (this.isBrandIcon(option.icon) ? 'fab' : 'fa') + ` fa-${option.icon}` })),
39881
+ escapeEntity(option.text || option.value))) : (escapeEntity(option.text || option.value))))));
39689
39882
  })));
39690
39883
  },
39691
39884
  getSelection: (target) => {
@@ -40822,19 +41015,32 @@ class Tree extends GNCoreInstance {
40822
41015
  findAll('.is-checker', parents(target, 'li')[0]).forEach((c) => {
40823
41016
  c.checked = target.checked;
40824
41017
  });
40825
- if (this.$options.checkPath && target.checked) {
41018
+ if (this.$options.checkPath) {
40826
41019
  parents(target, 'ul')
40827
41020
  .map((list) => siblings(list, '.tree-item').pop())
40828
41021
  .filter((item) => item)
40829
41022
  .forEach((item) => {
40830
- find('.is-checker', item).checked = true;
41023
+ const parentChecker = find('.is-checker', item);
41024
+ if (!parentChecker) {
41025
+ return;
41026
+ }
41027
+ const parentLi = parents(item, 'li')[0];
41028
+ if (!parentLi) {
41029
+ return;
41030
+ }
41031
+ // 자식 중 하나라도 체크면 부모 체크, 전부 해제되면 부모도 해제
41032
+ const descendantCheckers = findAll('.is-checker', parentLi).filter((checker) => checker !== parentChecker);
41033
+ if (!descendantCheckers.length) {
41034
+ return;
41035
+ }
41036
+ parentChecker.checked = descendantCheckers.some((checker) => checker.checked);
40831
41037
  });
40832
41038
  }
40833
41039
  this.$event(this, 'onCheck', item, target.checked, this._hidden.getItemIndex(target), e);
40834
41040
  },
40835
- checkAll: () => {
41041
+ checkAll: (isChecked) => {
40836
41042
  findAll('.is-checker', this.$el).forEach((c) => {
40837
- c.checked = true;
41043
+ c.checked = isChecked;
40838
41044
  });
40839
41045
  },
40840
41046
  getChecked: (withStatus = false) => {
@@ -41012,7 +41218,14 @@ class Tree extends GNCoreInstance {
41012
41218
  this._hidden.collapseAll();
41013
41219
  },
41014
41220
  checkAll() {
41015
- this._hidden.checkAll();
41221
+ if (!this.$options.hasCheck)
41222
+ return;
41223
+ this._hidden.checkAll(true);
41224
+ },
41225
+ uncheckAll() {
41226
+ if (!this.$options.hasCheck)
41227
+ return;
41228
+ this._hidden.checkAll(false);
41016
41229
  },
41017
41230
  getChecked(withStatus = false) {
41018
41231
  return this._hidden.getChecked(withStatus);