bromcom-ui 2.3.46 → 2.3.50

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 (66) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-21acf1de.js → p-09753e05.js} +1 -1
  3. package/dist/bromcom-ui/{p-b6c0d182.entry.js → p-1a2724a0.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-09b8803d.entry.js → p-26b3d5d0.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-61cde6d6.entry.js → p-2c1ee381.entry.js} +1 -1
  6. package/dist/bromcom-ui/p-31e2a0d5.entry.js +1 -0
  7. package/dist/bromcom-ui/{p-192301be.entry.js → p-3704fffd.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-180a8dbf.entry.js → p-4396ee3b.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-c16d4f4f.entry.js → p-4a296c0a.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-47c82122.entry.js → p-4b7f14ed.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-16735e3f.entry.js → p-774ff4d9.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-a51fa846.entry.js → p-a18a0cc4.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-ce19d569.js → p-b92324e7.js} +1 -1
  14. package/dist/bromcom-ui/p-dafc1ec6.entry.js +1 -0
  15. package/dist/bromcom-ui/p-f27776a4.entry.js +1 -0
  16. package/dist/cjs/{bcm-badge_18.cjs.entry.js → bcm-badge_20.cjs.entry.js} +875 -199
  17. package/dist/cjs/bcm-empty_6.cjs.entry.js +3 -2
  18. package/dist/cjs/bcm-select.cjs.entry.js +11 -8
  19. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/bromcom.js +8 -1
  22. package/dist/collection/components/atoms/button/buttons.css +1 -0
  23. package/dist/collection/components/molecules/list/list-item.css +188 -0
  24. package/dist/collection/components/molecules/list/list-item.js +12 -1
  25. package/dist/collection/components/molecules/list/list-select.css +82 -0
  26. package/dist/collection/components/molecules/list/list-select.js +399 -79
  27. package/dist/collection/components/molecules/list/list.css +57 -4
  28. package/dist/collection/components/molecules/list/list.js +700 -247
  29. package/dist/collection/components/molecules/modal/modal.css +7 -3
  30. package/dist/collection/components/molecules/radio/radio.css +2 -0
  31. package/dist/collection/components/molecules/select/select.js +17 -8
  32. package/dist/collection/components/organism/form/form.js +1 -0
  33. package/dist/collection/components/organism/listbox/listbox.js +2 -1
  34. package/dist/collection/components/organism/treeview/treeview-item.js +1 -1
  35. package/dist/esm/{bcm-badge_18.entry.js → bcm-badge_20.entry.js} +875 -201
  36. package/dist/esm/bcm-checkbox.entry.js +1 -1
  37. package/dist/esm/bcm-colorpicker.entry.js +2 -2
  38. package/dist/esm/bcm-datetime-picker_2.entry.js +2 -2
  39. package/dist/esm/bcm-dropdown.entry.js +1 -1
  40. package/dist/esm/bcm-empty_6.entry.js +4 -3
  41. package/dist/esm/bcm-popconfirm.entry.js +1 -1
  42. package/dist/esm/bcm-popover.entry.js +1 -1
  43. package/dist/esm/bcm-pulldown-group_2.entry.js +1 -1
  44. package/dist/esm/bcm-pulldown.entry.js +1 -1
  45. package/dist/esm/bcm-select.entry.js +12 -9
  46. package/dist/esm/bcm-upload.entry.js +1 -1
  47. package/dist/esm/bromcom-ui.js +1 -1
  48. package/dist/esm/{element-dragger-838e9223.js → element-dragger-03ac2a5e.js} +1 -1
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/{utils-3040bca4.js → utils-b7fba7c4.js} +1 -1
  51. package/dist/types/components/molecules/list/list-select.d.ts +35 -4
  52. package/dist/types/components/molecules/list/list.d.ts +53 -11
  53. package/dist/types/components/molecules/list/types.d.ts +8 -0
  54. package/dist/types/components/molecules/select/select.d.ts +1 -0
  55. package/dist/types/components.d.ts +59 -19
  56. package/dist/types/types/index.d.ts +4 -0
  57. package/package.json +1 -1
  58. package/dist/bromcom-ui/p-6103be4a.entry.js +0 -1
  59. package/dist/bromcom-ui/p-865ccb94.entry.js +0 -1
  60. package/dist/bromcom-ui/p-d71b1744.entry.js +0 -1
  61. package/dist/bromcom-ui/p-ec3b5c87.entry.js +0 -1
  62. package/dist/bromcom-ui/p-fe565105.entry.js +0 -1
  63. package/dist/cjs/bcm-radio-group.cjs.entry.js +0 -124
  64. package/dist/cjs/bcm-radio.cjs.entry.js +0 -104
  65. package/dist/esm/bcm-radio-group.entry.js +0 -120
  66. package/dist/esm/bcm-radio.entry.js +0 -100
@@ -1,17 +1,17 @@
1
- import { Component, h, Element, Prop, Host, Method, Listen, Event } from '@stencil/core';
1
+ import { Component, h, Element, Prop, Host, Method, Listen, Event, Watch, State } from '@stencil/core';
2
2
  import cs from 'classnames';
3
- import { dropInComponent, getChilds } from '../../../utils/utils';
3
+ import { delay, dropInComponent, getChilds } from '../../../utils/utils';
4
4
  const lowercase = (str) => str.toLowerCase();
5
5
  export class BcmList {
6
6
  constructor() {
7
7
  this.configObject = [];
8
- this.searchData = null;
9
8
  this.isRendered = false;
10
9
  this.firstRender = true;
11
10
  this.linkedElementWidth = "100%";
12
11
  this.bodyStyleOverflow = '';
13
12
  this.dataLength = 0;
14
13
  this.checklist = [];
14
+ this.otherList = [];
15
15
  this.configured = false;
16
16
  this.checkStatus = false;
17
17
  this.resetSelected = false;
@@ -28,6 +28,7 @@ export class BcmList {
28
28
  this._list_select_id = null;
29
29
  this._list_id = null;
30
30
  this.type = 'default';
31
+ this.processType = 'default';
31
32
  this.hidden = false;
32
33
  this.items = [];
33
34
  this.isShow = true;
@@ -40,16 +41,19 @@ export class BcmList {
40
41
  this.width = "100%";
41
42
  this.minWidth = null;
42
43
  this.maxWidth = null;
44
+ this.fullWidth = false;
45
+ this.size = 'medium';
43
46
  this.infoFooter = false;
44
- this.highlight = false;
45
47
  this.searchable = false;
48
+ this.highlight = false;
46
49
  this.searchPlaceholder = "Search";
47
50
  this.searchFields = ['text'];
48
51
  this.returnField = "id";
52
+ this.searchData = null;
53
+ this.searchSub = "items";
54
+ this.searchText = "";
49
55
  this.value = null;
50
56
  this.multiSelect = false;
51
- this.fullWidth = false;
52
- this.size = 'medium';
53
57
  /******/
54
58
  this.clearable = false;
55
59
  this.label = null;
@@ -63,9 +67,11 @@ export class BcmList {
63
67
  this.required = false;
64
68
  }
65
69
  connectedCallback() {
70
+ this.captionCache = this.caption;
71
+ this.captionTypeCache = this.captionType;
66
72
  this.bodyStyleOverflow = document.querySelector("body").style.overflow;
67
- const elementId = "bcm-list-select-" + this._internal_id;
68
- if (this.type === 'select') {
73
+ const elementId = "bcm-list-select-" + this._id;
74
+ if (this.type === 'select' || this.type === 'autocomplete') {
69
75
  this.selectIsInitialize();
70
76
  this.linkedComponent = elementId;
71
77
  }
@@ -85,17 +91,23 @@ export class BcmList {
85
91
  }
86
92
  disconnectedCallback() { }
87
93
  componentWillLoad() { }
88
- componentDidLoad() {
89
- setTimeout(() => {
90
- const spinner = this.el.shadowRoot.querySelector('.spinner');
91
- spinner.classList.remove("first-run");
92
- }, 500);
93
- }
94
+ componentDidLoad() { }
94
95
  componentWillRender() { }
95
96
  componentDidRender() {
97
+ const elementId = "bcm-list-select-" + this._id;
98
+ if (this.type === 'select' || this.type === 'autocomplete') {
99
+ this.selectIsInitialize();
100
+ this.linkedComponent = elementId;
101
+ }
96
102
  if (sessionStorage.getItem(this._internal_id + "-config")) {
97
103
  this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
98
104
  }
105
+ setTimeout(() => {
106
+ const spinner = this.el.shadowRoot.querySelector('.spinner');
107
+ if (spinner) {
108
+ spinner.classList.remove("first-run");
109
+ }
110
+ }, 500);
99
111
  }
100
112
  componentWillUpdate() { }
101
113
  componentDidUpdate() { }
@@ -106,10 +118,34 @@ export class BcmList {
106
118
  this.isShow = false;
107
119
  document.querySelector("body").style.overflow = this.bodyStyleOverflow;
108
120
  }
121
+ async setSearch(text) {
122
+ const searchInput = this.el.shadowRoot.querySelector("bcm-search");
123
+ if (searchInput) {
124
+ searchInput.setValue(text);
125
+ // searchInput.select()
126
+ }
127
+ }
128
+ async clearAndSelectSearch(select = true) {
129
+ if (this.searchable == true) {
130
+ // var searchInput = null
131
+ const searchInput = this.el.shadowRoot.querySelector("bcm-search");
132
+ if (searchInput) {
133
+ searchInput.setClear();
134
+ if (select == true) {
135
+ searchInput.select();
136
+ }
137
+ }
138
+ }
139
+ }
109
140
  /**
110
141
  * @desc
111
142
  */
112
143
  async show() {
144
+ if (this.processType == 'deselect') {
145
+ this.firstRender = true;
146
+ this.isRendered = false;
147
+ this.setData(this.otherList);
148
+ }
113
149
  this.isShow = true;
114
150
  if (this.items && this.isRendered === false) {
115
151
  this.isRendered = true;
@@ -125,10 +161,56 @@ export class BcmList {
125
161
  async toggle() {
126
162
  this.isShow = !this.isShow;
127
163
  }
164
+ /**
165
+ * @desc
166
+ */
167
+ async openStatus() {
168
+ return this.isShow;
169
+ }
170
+ /**
171
+ * @desc
172
+ */
173
+ handleOpen(value) {
174
+ if (this.processType === "deselect") {
175
+ const listSelect = document.getElementById(this._list_select_id);
176
+ if (listSelect) {
177
+ const otherTag = listSelect.shadowRoot.querySelector("#other-tag");
178
+ if (otherTag) {
179
+ if (value === true) {
180
+ otherTag.setAttribute("color", "prime-blue");
181
+ }
182
+ else {
183
+ otherTag.removeAttribute("color");
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ /**
190
+ * @desc
191
+ */
192
+ handleChange(newValue) {
193
+ this.change.emit(newValue);
194
+ }
128
195
  /**
129
196
  * @desc
130
197
  */
131
198
  async config(_config) {
199
+ if (_config['type']) {
200
+ this.type = _config['type'];
201
+ }
202
+ if (_config['searchPlaceholder']) {
203
+ this.searchPlaceholder = _config['searchPlaceholder'];
204
+ }
205
+ if (_config['searchFields']) {
206
+ this.searchFields = _config['searchFields'];
207
+ }
208
+ if (_config['returnField']) {
209
+ this.returnField = _config['returnField'];
210
+ }
211
+ if (_config['highlight']) {
212
+ this.highlight = _config['highlight'];
213
+ }
132
214
  if (_config['linkedComponent'] && typeof _config['linkedComponent'] == 'string') {
133
215
  this.linkedComponent = _config['linkedComponent'];
134
216
  }
@@ -154,6 +236,12 @@ export class BcmList {
154
236
  this.configObject = _config;
155
237
  return _config;
156
238
  }
239
+ /**
240
+ * @desc
241
+ */
242
+ async setDataOther(_data = []) {
243
+ this.otherList = _data;
244
+ }
157
245
  /**
158
246
  * @desc
159
247
  */
@@ -162,12 +250,28 @@ export class BcmList {
162
250
  typeof _data == 'string'
163
251
  ? this.items = JSON.parse(_data)
164
252
  : this.items = _data;
165
- if (this.items && this.items.find(e => e[this.objectMapping['selected']])) {
166
- var selectedIDs = [];
167
- this.items.filter(e => String(e[this.objectMapping['selected']]) === "true").forEach(element => {
168
- selectedIDs.push(element[this.objectMapping['id']]);
169
- });
170
- this.checked(selectedIDs);
253
+ if (this.items) {
254
+ switch (this.processType) {
255
+ case 'default':
256
+ if (this.items.find(e => e[this.objectMapping['selected']])) {
257
+ var selectedIDs = [];
258
+ this.items.filter(e => String(e[this.objectMapping['selected']]) === "true").forEach(element => {
259
+ selectedIDs.push(element[this.objectMapping['id']]);
260
+ });
261
+ this.checked(selectedIDs);
262
+ }
263
+ break;
264
+ case 'deselect':
265
+ var selectedIDs = [];
266
+ this.items.forEach(element => {
267
+ // element[ this.objectMapping['selected'] ] = true;
268
+ selectedIDs.push(element[this.objectMapping['id']]);
269
+ });
270
+ this.checked(selectedIDs);
271
+ break;
272
+ default:
273
+ break;
274
+ }
171
275
  }
172
276
  this.calculatedTotals({ "total": this.items.length });
173
277
  if (this.multiSelect === true) {
@@ -195,48 +299,159 @@ export class BcmList {
195
299
  /**
196
300
  * @desc
197
301
  */
198
- async checked(checkedItems) {
199
- if (this.items && this.items.find(e => e[this.objectMapping['selected']])) {
200
- this.items.filter(e => String(e[this.objectMapping['selected']]) === "true").forEach(element => {
201
- element[this.objectMapping['selected']] = false;
202
- });
302
+ async resetCaption() {
303
+ this.caption = this.captionCache;
304
+ this.captionType = this.captionTypeCache;
305
+ this.captionError = null;
306
+ }
307
+ /**
308
+ * @desc
309
+ */
310
+ async toggleChecked(checkedItems = null) {
311
+ if (checkedItems !== null) {
312
+ var checkStatus = false;
313
+ if (typeof checkedItems == 'string') {
314
+ checkStatus = this.items.find(e => e[this.objectMapping['id']] == checkedItems)[this.objectMapping['selected']];
315
+ }
316
+ else {
317
+ let state = 'uncheck';
318
+ let allChecked = true;
319
+ let allUnchecked = true;
320
+ checkedItems.forEach((item) => {
321
+ if (String(this.items.find(e => e[this.objectMapping['id']] == item)[this.objectMapping['selected']]) === 'true') {
322
+ allUnchecked = false;
323
+ }
324
+ else {
325
+ allChecked = false;
326
+ }
327
+ });
328
+ !allChecked && !allUnchecked
329
+ ? state = 'determinate'
330
+ : allChecked
331
+ ? state = 'determinate'
332
+ : state = 'uncheck';
333
+ checkStatus = state == 'determinate' ? false : true;
334
+ }
335
+ // let state: string = 'uncheck'
336
+ // let allChecked: boolean = true
337
+ // let allUnchecked: boolean = true
338
+ // checkedItems.map((item) => {
339
+ // item[ this.objectMapping['selected'] ] === true && (allUnchecked = false)
340
+ // !item[ this.objectMapping['selected'] ] === true && (allChecked = false)
341
+ // });
342
+ // !allChecked && !allUnchecked
343
+ // ? state = 'determinate'
344
+ // : allChecked
345
+ // ? state = 'determinate'
346
+ // : state = 'uncheck'
347
+ // const checkStatus = state == 'determinate' ? true : false
348
+ // const checkStatus = this.items.find( e => e[ this.objectMapping['id'] ] == checkedItems )[ this.objectMapping['selected'] ]
349
+ if (checkStatus === true) {
350
+ this.unChecked(checkedItems);
351
+ }
352
+ else {
353
+ // this.checked(checkedItems, false)
354
+ var selectedIDs = [];
355
+ // var checkItem = null
356
+ if (typeof checkedItems == 'string') {
357
+ // checkItem = this.sendSelectId( String(checkedItems), true)
358
+ selectedIDs.push(checkedItems);
359
+ }
360
+ else {
361
+ checkedItems.forEach((item) => {
362
+ selectedIDs.push(item);
363
+ // String(item[ this.objectMapping['selected'] ]) === 'true' && (allUnchecked = false),
364
+ // String(item[ this.objectMapping['selected'] ]) !== 'true' && (allChecked = false)
365
+ });
366
+ // this.sendSelectId( String(checkedItems), true)
367
+ // var selectedIDs = []
368
+ // if( this.items && this.items.find( e => e[ this.objectMapping['selected'] ] ) ){
369
+ // this.items.filter( e => String( e[ this.objectMapping['selected'] ] ) === "true" ).forEach(element => {
370
+ // selectedIDs.push( element )
371
+ // });
372
+ // }
373
+ // this.value = selectedIDs
374
+ // this.listChecked.emit( this.value )
375
+ // this.handleIndeterminateStatus()
376
+ // this.sendSelectValue()
377
+ }
378
+ this.checked(selectedIDs, false);
379
+ }
203
380
  }
204
- var selectedIDs = [];
205
- this.setClear(false);
206
- var checkItem = null;
207
- if (typeof checkedItems == 'string') {
208
- if (this.sendSelectId(String(checkedItems)) !== false) {
209
- checkItem = this.sendSelectId(String(checkedItems));
210
- selectedIDs.push(checkItem);
381
+ }
382
+ /**
383
+ * @desc
384
+ */
385
+ async unChecked(checkedItems = null) {
386
+ if (checkedItems !== null) {
387
+ var selectedIDs = [];
388
+ this.selectedId = null;
389
+ if (typeof checkedItems == 'string') {
390
+ this.sendSelectId(String(checkedItems), false);
391
+ }
392
+ else {
393
+ checkedItems.forEach(item => {
394
+ this.sendSelectId(String(item), false);
395
+ });
396
+ }
397
+ if (this.items && this.items.find(e => e[this.objectMapping['selected']])) {
398
+ this.items.filter(e => String(e[this.objectMapping['selected']]) === "true").forEach(element => {
399
+ selectedIDs.push(element);
400
+ });
211
401
  }
402
+ this.value = selectedIDs;
403
+ this.listChecked.emit(this.value);
404
+ this.handleIndeterminateStatus();
405
+ this.sendSelectValue();
212
406
  }
213
- else {
214
- checkedItems.forEach(item => {
215
- if (this.sendSelectId(String(item)) !== false) {
216
- checkItem = this.sendSelectId(String(item));
217
- selectedIDs.push(checkItem);
407
+ }
408
+ /**
409
+ * @desc
410
+ */
411
+ async checked(checkedItems = null, reset = true) {
412
+ if (checkedItems !== null) {
413
+ var selectedIDs = [];
414
+ if (reset === true) {
415
+ if (this.items && this.items.find(e => e[this.objectMapping['selected']])) {
416
+ this.items.filter(e => String(e[this.objectMapping['selected']]) === "true").forEach(element => {
417
+ element[this.objectMapping['selected']] = false;
418
+ });
218
419
  }
219
- });
220
- }
221
- if (this.multiSelect === false) {
222
- this.selectedId = this.items.find(e => String(e[this.objectMapping['id']]) === String(checkedItems));
420
+ this.setClear(false);
421
+ }
422
+ if (typeof checkedItems == 'string') {
423
+ this.sendSelectId(String(checkedItems));
424
+ if (this.multiSelect === false) {
425
+ this.selectedId = this.items.find(e => String(e[this.objectMapping['id']]) === String(checkedItems));
426
+ }
427
+ }
428
+ else {
429
+ if (this.multiSelect === true) {
430
+ checkedItems.forEach(item => {
431
+ this.sendSelectId(String(item));
432
+ });
433
+ }
434
+ }
435
+ // if ( this.multiSelect === false ){
436
+ // this.selectedId = this.items.find( e => String(e[ this.objectMapping['id'] ]) === String(checkedItems) )
437
+ // }
438
+ if (this.items && this.items.find(e => e[this.objectMapping['selected']])) {
439
+ this.items.filter(e => String(e[this.objectMapping['selected']]) === "true").forEach(element => {
440
+ selectedIDs.push(element);
441
+ });
442
+ }
443
+ this.value = selectedIDs;
444
+ this.listChecked.emit(this.value);
445
+ this.handleIndeterminateStatus();
446
+ this.sendSelectValue();
223
447
  }
224
- this.value = selectedIDs;
225
- this.listChecked.emit(this.value);
226
- this.handleIndeterminateStatus();
227
- this.sendSelectValue();
228
448
  }
229
449
  /**
230
450
  * @desc
231
451
  */
232
452
  async setClear(eventEmit = true) {
233
453
  if (this.items != undefined && this.items.length > 0) {
234
- this.el.shadowRoot.querySelectorAll("bcm-list-item").forEach(item => {
235
- if (item.shadowRoot.querySelector("bcm-checkbox-lite")) {
236
- item.shadowRoot.querySelector("bcm-checkbox-lite")["checked"] = false;
237
- }
238
- item.classList.remove("selected");
239
- });
454
+ this.unChecked(this.items.map(item => { return item[this.objectMapping["id"]]; }));
240
455
  }
241
456
  this.selectedId = null;
242
457
  this.checklist = [];
@@ -252,21 +467,25 @@ export class BcmList {
252
467
  */
253
468
  async processData(_data) {
254
469
  this.handleLoading(true);
470
+ await delay(100);
255
471
  const list = this.el.shadowRoot.querySelector('.list');
256
472
  list.innerHTML = "";
257
473
  this.selectedId = null;
258
474
  this.value = null;
259
475
  const elementStatuses = [];
476
+ var checkedItems = [];
260
477
  if (_data.length > 0) {
261
478
  this.dataLength = _data.length;
262
479
  this.searchData = _data;
480
+ await delay(100);
263
481
  _data.map(item => {
264
482
  const element = document.createElement("bcm-list-item");
265
483
  element.setAttribute("_internal_id", this._internal_id);
266
484
  element.setAttribute("text", item[this.objectMapping['text']]);
267
485
  element.setAttribute("id", String(item[this.objectMapping['id']]));
268
486
  if (item[this.objectMapping['selected']]) {
269
- element.select();
487
+ // element.select()
488
+ checkedItems.push(String(item[this.objectMapping['id']]));
270
489
  }
271
490
  // element.setAttribute("item-object", JSON.stringify(item))
272
491
  var object = item;
@@ -277,6 +496,13 @@ export class BcmList {
277
496
  });
278
497
  const allStatuses = await Promise.all(elementStatuses);
279
498
  if (allStatuses) {
499
+ if (checkedItems != []) {
500
+ checkedItems.forEach(item => {
501
+ // if ( this.sendSelectId( String(item) ) !== false ){
502
+ this.sendSelectId(String(item));
503
+ // }
504
+ });
505
+ }
280
506
  this.handleLoading(false);
281
507
  this.firstRender = false;
282
508
  }
@@ -308,22 +534,33 @@ export class BcmList {
308
534
  * @desc
309
535
  */
310
536
  handleClick(event) {
537
+ var path = event.path || (event.composedPath && event.composedPath());
311
538
  if (!this.el.contains(event.target)
312
- || (event["path"]
313
- && event["path"].filter((input) => input['_internal_id'] == this._internal_id)[0]
314
- && event["path"].filter((input) => input['nodeName'] == "BCM-LIST-ITEM")[0]
539
+ || (path
540
+ && path.filter((input) => input['_internal_id'] == this._internal_id)[0]
541
+ && path.filter((input) => input['nodeName'] == "BCM-LIST-ITEM")[0]
315
542
  && this.multiSelect === false)) {
316
543
  if (this.isShow === true) {
317
544
  this.hide();
318
545
  }
319
546
  }
320
547
  }
548
+ /**
549
+ * @desc
550
+ */
551
+ wheelEvent(event) {
552
+ if (!this.el.contains(event.target)) {
553
+ if (this.isShow === true) {
554
+ this.hide();
555
+ }
556
+ }
557
+ }
321
558
  /**
322
559
  * @desc
323
560
  */
324
561
  scrollEvent(event) {
325
562
  if (!this.el.contains(event.target)) {
326
- if (this.isShow) {
563
+ if (this.isShow === true) {
327
564
  this.hide();
328
565
  }
329
566
  }
@@ -353,27 +590,28 @@ export class BcmList {
353
590
  * @descc
354
591
 
355
592
  */
356
- listenSearchResult(e) {
357
- if (e.isEvent == undefined) {
358
- if (e["path"] && e["path"].filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
593
+ listenSearchResult(event) {
594
+ var path = event.path || (event.composedPath && event.composedPath());
595
+ if (event.isEvent == undefined) {
596
+ if (path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
359
597
  // var childs: any[] = getChilds(this.el, 'bcm-list-item')
360
598
  var childs = this.el.shadowRoot.querySelectorAll("bcm-list-item");
361
599
  childs.forEach(element => {
362
600
  element.classList.add("hidden");
363
601
  });
364
- if (e.detail.length > 0) {
365
- if (e.detail[0] == -1) {
602
+ if (event.detail.length > 0) {
603
+ if (event.detail[0] == -1) {
366
604
  this.totalSearch = 0;
367
605
  this.empty = true;
368
606
  }
369
607
  else {
370
- this.totalSearch = e.detail.length;
608
+ this.totalSearch = event.detail.length;
371
609
  this.empty = false;
372
610
  if (this.dataLength > 0) {
373
611
  childs.forEach(element => {
374
612
  if (this.highlight) {
375
- e.target.addEventListener('bcm-on-search-value', async (e) => {
376
- var searchValue = await e.detail;
613
+ event.target.addEventListener('bcm-on-search-value', async (event) => {
614
+ var searchValue = await event.detail;
377
615
  var inputText = element.shadowRoot.getElementById("text");
378
616
  inputText = inputText.textContent || inputText.innerText || "";
379
617
  if (searchValue) {
@@ -387,14 +625,14 @@ export class BcmList {
387
625
  element.shadowRoot.getElementById("text").innerHTML = inputText;
388
626
  });
389
627
  }
390
- if (e.detail.indexOf(element.id) >= 0) {
628
+ if (event.detail.indexOf(element._id) >= 0) {
391
629
  element.classList.remove("hidden");
392
630
  }
393
631
  });
394
632
  }
395
633
  }
396
634
  }
397
- else if (e.detail === true) {
635
+ else if (event.detail === true) {
398
636
  this.totalSearch = this.dataLength;
399
637
  this.empty = false;
400
638
  childs.forEach(element => {
@@ -409,25 +647,30 @@ export class BcmList {
409
647
  * @descc
410
648
 
411
649
  */
412
- sendSelectId(id) {
413
- // console.log(this.items.find( e => e[ this.objectMapping['id'] ] == id ))
650
+ sendSelectId(id, status = true) {
414
651
  if (this.items && this.items.find(e => e[this.objectMapping['id']] == id)) {
415
652
  if (this.isRendered === false) {
416
- this.items.find(e => e[this.objectMapping['id']] == id)[this.objectMapping['selected']] = true;
653
+ this.items.find(e => e[this.objectMapping['id']] == id)[this.objectMapping['selected']] = status;
654
+ this.handleChecklist(this.items.find(e => e[this.objectMapping['id']] == id), status);
417
655
  return this.items.find(e => e[this.objectMapping['id']] == id);
418
656
  }
419
657
  else {
420
658
  var selectedItem = null;
421
659
  if (selectedItem = this.el.shadowRoot.getElementById(id)) {
422
- selectedItem.classList.add("selected");
660
+ if (status === true) {
661
+ selectedItem.classList.add("selected");
662
+ }
663
+ else {
664
+ selectedItem.classList.remove("selected");
665
+ }
423
666
  if (this.multiSelect === true) {
424
- this.handleChecklist(selectedItem["itemObject"], true);
667
+ this.handleChecklist(selectedItem["itemObject"], status);
425
668
  // selectedItem.classList.toggle("selected")
426
- if (selectedItem.shadowRoot.querySelector("bcm-checkbox-lite")) {
427
- selectedItem.shadowRoot.querySelector("bcm-checkbox-lite")["checked"] = true;
669
+ if (selectedItem.shadowRoot.querySelector(".checkbox")) {
670
+ selectedItem.shadowRoot.querySelector(".checkbox").querySelector("input").checked = status;
428
671
  }
429
672
  }
430
- this.items.find(e => e[this.objectMapping['id']] == id)[this.objectMapping['selected']] = true;
673
+ this.items.find(e => e[this.objectMapping['id']] == id)[this.objectMapping['selected']] = status;
431
674
  return this.items.find(e => e[this.objectMapping['id']] == id);
432
675
  }
433
676
  }
@@ -438,44 +681,50 @@ export class BcmList {
438
681
  * @descc
439
682
  */
440
683
  jsonDataProcess(id, status) {
441
- this.items.find(e => String(e[this.objectMapping['id']]) == String(id))[this.objectMapping['selected']] = status;
684
+ // console.log(id)
685
+ var item = this.items.find(e => String(e[this.objectMapping['id']]) == String(id));
686
+ if (item) {
687
+ item[this.objectMapping['selected']] = status;
688
+ }
442
689
  }
443
690
  /**
444
691
  * @descc
445
692
  */
446
693
  handleListSelected(event) {
447
- // console.log(event)
694
+ var path = event.path || (event.composedPath && event.composedPath());
695
+ // console.log(path);
448
696
  if (this.isInternal(event) || (!this.isInternal(event) && this.isInternalSlot(event))) {
697
+ var status = false;
449
698
  var selectedItem = null;
450
699
  const itemId = this.getItemId(event);
451
700
  if (this.multiSelect === false) {
452
- if (selectedItem = getChilds(this.el, "bcm-list-item").find(x => x.id === this.selectedId)) {
701
+ if (selectedItem = getChilds(this.el, "bcm-list-item").find(x => x._id === this.selectedId)) {
453
702
  selectedItem.classList.remove("selected");
454
- this.jsonDataProcess(this.selectedId, false);
703
+ status = false;
455
704
  // selectedItem.selected = false
456
705
  }
457
706
  }
458
707
  selectedItem = this.el.shadowRoot.getElementById(itemId);
459
708
  if (selectedItem) {
460
- this.selectedId = this.getItemId(event);
709
+ this.selectedId = selectedItem["id"];
461
710
  // selectedItem.selected = true
462
711
  if (this.multiSelect === true) {
463
712
  selectedItem.classList.toggle("selected");
464
713
  if (selectedItem.classList.contains("selected") === true) {
465
- this.jsonDataProcess(this.selectedId, false);
714
+ status = false;
466
715
  }
467
716
  else {
468
- this.jsonDataProcess(this.selectedId, true);
717
+ status = true;
469
718
  }
470
719
  }
471
720
  else {
472
721
  selectedItem.classList.add("selected");
473
- this.jsonDataProcess(this.selectedId, true);
722
+ status = true;
474
723
  }
475
724
  }
476
725
  if (this.isInternalSlot(event)) {
477
- if (selectedItem = event.path[0]) {
478
- this.selectedId = event.path[0].id;
726
+ if (selectedItem = path[0]) {
727
+ this.selectedId = path[0].id;
479
728
  this.value = event.detail;
480
729
  return true;
481
730
  }
@@ -483,16 +732,28 @@ export class BcmList {
483
732
  if (this.multiSelect === true) {
484
733
  this.handleChecklist(selectedItem["itemObject"], selectedItem.classList.contains("selected"));
485
734
  this.listChecked.emit(this.checklist);
486
- if (selectedItem.shadowRoot.querySelector("bcm-checkbox-lite")) {
487
- selectedItem.shadowRoot.querySelector("bcm-checkbox-lite")["checked"] = selectedItem.classList.contains("selected");
735
+ if (selectedItem.shadowRoot.querySelector(".checkbox")) {
736
+ selectedItem.shadowRoot.querySelector(".checkbox").querySelector("input").checked = selectedItem.classList.contains("selected");
488
737
  }
489
738
  this.value = this.checklist;
490
739
  }
491
740
  else {
492
741
  this.value = event.detail;
493
742
  }
743
+ if (this.processType === 'default') {
744
+ this.jsonDataProcess(this.selectedId, status);
745
+ }
494
746
  this.handleIndeterminateStatus();
495
747
  this.sendSelectValue();
748
+ if (this.processType === 'deselect') {
749
+ var element = document.querySelector("#" + this._list_id);
750
+ if (element) {
751
+ if (this.firstRender === false) {
752
+ element.toggleChecked(this.selectedId);
753
+ }
754
+ // element.unChecked(this.selectedId)
755
+ }
756
+ }
496
757
  }
497
758
  }
498
759
  /**
@@ -519,9 +780,9 @@ export class BcmList {
519
780
  }
520
781
  let sorted = this.checklist.sort(function (a, b) { return a - b; });
521
782
  this.checklist = sorted;
522
- if (this.firstRender === false) {
523
- this.calculatedTotals({ "selected": this.checklist.length });
524
- }
783
+ // if ( this.firstRender === false ){
784
+ this.calculatedTotals({ "selected": this.checklist.length });
785
+ // }
525
786
  }
526
787
  }
527
788
  /**
@@ -582,32 +843,35 @@ export class BcmList {
582
843
  * @desc
583
844
  */
584
845
  getItemId(event) {
585
- const detect = event.path
586
- && event.path[0]
587
- && event.path[0].attributes
588
- && event.path[0].attributes['id']
589
- && event.path[0].attributes['id'].value;
846
+ var path = event.path || (event.composedPath && event.composedPath());
847
+ const detect = path
848
+ && path[0]
849
+ && path[0].attributes
850
+ && path[0].attributes['id']
851
+ && path[0].attributes['id'].value;
590
852
  return detect;
591
853
  }
592
854
  /**
593
855
  * @desc
594
856
  */
595
857
  isInternalSlot(event) {
596
- const detect = event.path
597
- && event.path[0]
598
- && lowercase(event.path[0].tagName) === 'bcm-list-item'
599
- && this.el.contains(event.path[0]);
858
+ var path = event.path || (event.composedPath && event.composedPath());
859
+ const detect = path
860
+ && path[0]
861
+ && lowercase(path[0].tagName) === 'bcm-list-item'
862
+ && this.el.contains(path[0]);
600
863
  return detect;
601
864
  }
602
865
  /**
603
866
  * @desc
604
867
  */
605
868
  isInternal(event) {
606
- const detect = event.path
607
- && event.path[0]
608
- && event.path[0].attributes
609
- && event.path[0].attributes['_internal_id']
610
- && event.path[0].attributes['_internal_id'].value;
869
+ var path = event.path || (event.composedPath && event.composedPath());
870
+ const detect = path
871
+ && path[0]
872
+ && path[0].attributes
873
+ && path[0].attributes['_internal_id']
874
+ && path[0].attributes['_internal_id'].value;
611
875
  return detect == this._internal_id;
612
876
  }
613
877
  /**
@@ -624,7 +888,7 @@ export class BcmList {
624
888
  * @desc
625
889
  */
626
890
  async selectIsInitialize() {
627
- const elementId = "bcm-list-select-" + this._internal_id;
891
+ const elementId = "bcm-list-select-" + this._id;
628
892
  var element;
629
893
  if (!document.getElementById(elementId)) {
630
894
  element = document.createElement("bcm-list-select");
@@ -635,6 +899,9 @@ export class BcmList {
635
899
  element.setAttribute("id", elementId);
636
900
  element.setAttribute("_list_id", this._id);
637
901
  element.setAttribute("_internal_id", this._internal_id);
902
+ if (this.type) {
903
+ element.setAttribute("type", this.type);
904
+ }
638
905
  if (this.clearable) {
639
906
  element.setAttribute("clearable", this.clearable);
640
907
  }
@@ -668,6 +935,9 @@ export class BcmList {
668
935
  if (this.fullWidth) {
669
936
  element.setAttribute("full-width", this.fullWidth);
670
937
  }
938
+ if (this.multiSelect) {
939
+ element.setAttribute("multiselect", this.multiSelect);
940
+ }
671
941
  const parentNode = this.el.parentNode;
672
942
  parentNode.insertBefore(element, this.el);
673
943
  return elementId;
@@ -691,22 +961,42 @@ export class BcmList {
691
961
  this.checkStatus = false;
692
962
  }
693
963
  if (this.items != undefined && this.items.length > 0) {
694
- const subItems = this.el.shadowRoot.querySelectorAll("bcm-list-item");
695
- subItems.forEach(item => {
696
- this.handleChecklist(item["itemObject"], this.checkStatus === true ? true : false);
697
- if (item.shadowRoot.querySelector("bcm-checkbox-lite")) {
698
- item.shadowRoot.querySelector("bcm-checkbox-lite")["checked"] = this.checkStatus;
699
- }
700
- if (this.checkStatus === true) {
701
- item.classList.add("selected");
702
- }
703
- else {
704
- item.classList.remove("selected");
705
- }
964
+ // const subItems = this.el.shadowRoot.querySelectorAll("bcm-list-item")
965
+ var selectedIDs = [];
966
+ this.items.forEach(item => {
967
+ selectedIDs.push(item[this.objectMapping['id']]);
968
+ // this.jsonDataProcess( item[ this.objectMapping['id'] ], this.checkStatus === true ? true : false)
969
+ // this.handleChecklist( item, this.checkStatus === true ? true : false)
970
+ // var element:any = this.el.shadowRoot.getElementById( item[ this.objectMapping['id'] ] )
971
+ // if ( element ) {
972
+ // if ( element.shadowRoot.querySelector(".checkbox") ){
973
+ // element.shadowRoot.querySelector(".checkbox").querySelector("input").checked = this.checkStatus
974
+ // }
975
+ // if ( this.checkStatus === true ){
976
+ // element.classList.add("selected")
977
+ // } else {
978
+ // element.classList.remove("selected")
979
+ // }
980
+ // }
706
981
  });
707
- this.listChecked.emit(this.checklist);
708
- this.value = this.checklist;
709
- this.sendSelectValue();
982
+ if (this.checkStatus === true) {
983
+ this.checked(selectedIDs, false);
984
+ }
985
+ else {
986
+ this.unChecked(selectedIDs);
987
+ }
988
+ if (this.processType === 'deselect') {
989
+ var element = document.querySelector("#" + this._list_id);
990
+ if (element) {
991
+ // if ( this.firstRender === false ){
992
+ element.toggleChecked(selectedIDs);
993
+ // }
994
+ // element.unChecked(this.selectedId)
995
+ }
996
+ }
997
+ // this.listChecked.emit( this.checklist )
998
+ // this.value = this.checklist
999
+ // this.sendSelectValue()
710
1000
  }
711
1001
  this.handleIndeterminateStatus();
712
1002
  }
@@ -714,15 +1004,14 @@ export class BcmList {
714
1004
  * @desc
715
1005
  */
716
1006
  sendSelectValue() {
717
- if (this.type === 'select') {
718
- const select = document.getElementById("bcm-list-select-" + this._internal_id);
1007
+ if (this.type === 'select' || this.type === 'autocomplete') {
1008
+ const select = document.getElementById("bcm-list-select-" + this._id);
719
1009
  if (select) {
720
- // console.log("sendSelectValue")
721
1010
  if (this.multiSelect === true) {
722
1011
  select.setValue(this.value, this.objectMapping["id"], this.objectMapping["text"]);
723
1012
  }
724
1013
  else {
725
- select.setValue(this.value[this.value.length - 1][this.objectMapping["text"]]);
1014
+ select.setValue(this.value[this.objectMapping["text"]]);
726
1015
  }
727
1016
  }
728
1017
  }
@@ -733,7 +1022,8 @@ export class BcmList {
733
1022
  'size-2': this.size === 'small' || this.size === 'medium',
734
1023
  'size-3': this.size === 'large',
735
1024
  });
736
- const hostClasses = cs(this.hidden ? 'hidden' : null, {
1025
+ const hostClasses = cs(this.hidden ? 'hidden' : null, 'type-' + this.type, {
1026
+ 'error': this.captionType == 'error' ? true : false,
737
1027
  'show': this.isShow,
738
1028
  'flex': this.minHeight != null || this.maxHeight != null,
739
1029
  'full-width': this.fullWidth
@@ -742,6 +1032,7 @@ export class BcmList {
742
1032
  'show': this.searchable,
743
1033
  });
744
1034
  const footer = cs('footer');
1035
+ const captionClasses = cs('size-1', 'input-caption', 'caption-' + this.captionType);
745
1036
  var customStyle = {
746
1037
  'height': this.minHeight != null || this.maxHeight != null ? 'auto' : this.height,
747
1038
  'min-height': this.minHeight != null ? this.minHeight : null,
@@ -752,27 +1043,43 @@ export class BcmList {
752
1043
  'max-width': this.maxWidth != null ? this.maxWidth == "100%" || this.maxWidth == "auto" ? this.linkedElementWidth : this.maxWidth : null,
753
1044
  };
754
1045
  return (h(Host, { class: hostClasses, style: customStyle },
755
- this.searchable === true && (h("div", { class: searchContainer },
756
- h("bcm-search", { id: "search", _internal_id: this._internal_id, searchPlaceholder: this.searchPlaceholder, data: this.searchData, returnField: this.returnField, searchFields: this.searchFields, clearable: true }),
757
- h("bcm-divider", null))),
758
- this.multiSelect === true && (h("div", { class: "check-container" },
759
- h("div", { class: listItem, id: "text", onClick: (e) => this.handleIndeterminateClick(e) },
760
- h("div", { class: "check-content" },
761
- h("bcm-checkbox-lite", { id: 'check-lite-' + this._id, name: 'check-lite-' + this._id, checked: false, indeterminate: false, onClick: (e) => this.handleCheckboxClick(e) })),
762
- "Select All"),
763
- h("div", { class: "divider" },
764
- h("bcm-divider", null)))),
765
- h("div", { class: classes },
766
- h("slot", null),
767
- h("div", { class: "list" }),
768
- h("div", { class: "spinner first-run" },
769
- h("bcm-icon", { type: "animated", color: "prime-blue", class: "prefix", icon: "loading" }))),
770
- this.infoFooter == true && (h("div", { class: footer },
771
- h("bcm-text", { scale: "size-1", color: "grey-8" },
772
- h("span", { id: "selected-item" }),
773
- " Total ",
774
- h("span", { id: "in-total" }, "0"),
775
- " items found.")))));
1046
+ (this.type === 'default' && this.processType === 'default' && this.label) && (h("label", { class: "label size-1" },
1047
+ " ",
1048
+ this.label,
1049
+ " ",
1050
+ this.required && ('*'),
1051
+ " ")),
1052
+ h("main", { style: customStyle },
1053
+ this.searchable === true && (h("div", { class: searchContainer },
1054
+ h("bcm-search", { id: "search", _internal_id: this._internal_id, searchPlaceholder: this.searchPlaceholder, data: this.searchData, returnField: this.returnField, searchFields: this.searchFields, searchValue: this.searchText, clearable: true }),
1055
+ h("bcm-divider", null))),
1056
+ h("div", { class: classes },
1057
+ this.multiSelect === true && (h("div", { class: "check-container" },
1058
+ h("div", { class: listItem, id: "text", onClick: (e) => this.handleIndeterminateClick(e) },
1059
+ h("div", { class: "check-content" },
1060
+ h("bcm-checkbox-lite", { id: 'check-lite-' + this._id, name: 'check-lite-' + this._id, checked: false, indeterminate: false, onClick: (e) => this.handleCheckboxClick(e) })),
1061
+ "Select All"),
1062
+ h("div", { class: "divider" },
1063
+ h("bcm-divider", null)))),
1064
+ h("slot", null),
1065
+ h("div", { class: "list" }),
1066
+ h("div", { class: "spinner first-run" },
1067
+ h("bcm-icon", { type: "animated", color: "prime-blue", class: "prefix", icon: "loading" }))),
1068
+ this.infoFooter == true && (h("div", { class: footer },
1069
+ h("bcm-text", { scale: "size-1", color: "grey-8" },
1070
+ h("span", { id: "selected-item" }),
1071
+ " Total ",
1072
+ h("span", { id: "in-total" }, "0"),
1073
+ " items found.")))),
1074
+ (this.type === 'default' && this.processType === 'default' && !this.noCaption) && (h("div", { class: "caption-area" }, this.captionType == "error"
1075
+ ? h("span", { class: captionClasses },
1076
+ " ",
1077
+ this.captionError,
1078
+ " ")
1079
+ : this.caption && h("span", { class: captionClasses },
1080
+ " ",
1081
+ this.caption,
1082
+ " ")))));
776
1083
  }
777
1084
  static get is() { return "bcm-list"; }
778
1085
  static get encapsulation() { return "shadow"; }
@@ -859,9 +1166,14 @@ export class BcmList {
859
1166
  "type": "string",
860
1167
  "mutable": false,
861
1168
  "complexType": {
862
- "original": "'default' | 'select'",
863
- "resolved": "\"default\" | \"select\"",
864
- "references": {}
1169
+ "original": "TypeProp",
1170
+ "resolved": "\"autocomplete\" | \"default\" | \"multiselect\" | \"select\"",
1171
+ "references": {
1172
+ "TypeProp": {
1173
+ "location": "import",
1174
+ "path": "./types"
1175
+ }
1176
+ }
865
1177
  },
866
1178
  "required": false,
867
1179
  "optional": false,
@@ -873,6 +1185,29 @@ export class BcmList {
873
1185
  "reflect": false,
874
1186
  "defaultValue": "'default'"
875
1187
  },
1188
+ "processType": {
1189
+ "type": "string",
1190
+ "mutable": false,
1191
+ "complexType": {
1192
+ "original": "ProcessTypeProp",
1193
+ "resolved": "\"default\" | \"deselect\"",
1194
+ "references": {
1195
+ "ProcessTypeProp": {
1196
+ "location": "import",
1197
+ "path": "./types"
1198
+ }
1199
+ }
1200
+ },
1201
+ "required": false,
1202
+ "optional": false,
1203
+ "docs": {
1204
+ "tags": [],
1205
+ "text": ""
1206
+ },
1207
+ "attribute": "process-type",
1208
+ "reflect": false,
1209
+ "defaultValue": "'default'"
1210
+ },
876
1211
  "hidden": {
877
1212
  "type": "boolean",
878
1213
  "mutable": false,
@@ -1093,7 +1428,7 @@ export class BcmList {
1093
1428
  "reflect": true,
1094
1429
  "defaultValue": "null"
1095
1430
  },
1096
- "infoFooter": {
1431
+ "fullWidth": {
1097
1432
  "type": "boolean",
1098
1433
  "mutable": false,
1099
1434
  "complexType": {
@@ -1107,17 +1442,22 @@ export class BcmList {
1107
1442
  "tags": [],
1108
1443
  "text": ""
1109
1444
  },
1110
- "attribute": "infofooter",
1445
+ "attribute": "full-width",
1111
1446
  "reflect": true,
1112
1447
  "defaultValue": "false"
1113
1448
  },
1114
- "highlight": {
1115
- "type": "boolean",
1449
+ "size": {
1450
+ "type": "string",
1116
1451
  "mutable": false,
1117
1452
  "complexType": {
1118
- "original": "boolean",
1119
- "resolved": "boolean",
1120
- "references": {}
1453
+ "original": "SizeProp",
1454
+ "resolved": "\"large\" | \"medium\" | \"small\"",
1455
+ "references": {
1456
+ "SizeProp": {
1457
+ "location": "import",
1458
+ "path": "./types"
1459
+ }
1460
+ }
1121
1461
  },
1122
1462
  "required": false,
1123
1463
  "optional": false,
@@ -1125,11 +1465,11 @@ export class BcmList {
1125
1465
  "tags": [],
1126
1466
  "text": ""
1127
1467
  },
1128
- "attribute": "highlight",
1468
+ "attribute": "size",
1129
1469
  "reflect": true,
1130
- "defaultValue": "false"
1470
+ "defaultValue": "'medium'"
1131
1471
  },
1132
- "searchable": {
1472
+ "infoFooter": {
1133
1473
  "type": "boolean",
1134
1474
  "mutable": false,
1135
1475
  "complexType": {
@@ -1143,54 +1483,16 @@ export class BcmList {
1143
1483
  "tags": [],
1144
1484
  "text": ""
1145
1485
  },
1146
- "attribute": "searchable",
1486
+ "attribute": "infofooter",
1147
1487
  "reflect": true,
1148
1488
  "defaultValue": "false"
1149
1489
  },
1150
- "searchPlaceholder": {
1151
- "type": "string",
1152
- "mutable": false,
1153
- "complexType": {
1154
- "original": "string",
1155
- "resolved": "string",
1156
- "references": {}
1157
- },
1158
- "required": false,
1159
- "optional": false,
1160
- "docs": {
1161
- "tags": [],
1162
- "text": ""
1163
- },
1164
- "attribute": "searchplaceholder",
1165
- "reflect": true,
1166
- "defaultValue": "\"Search\""
1167
- },
1168
- "searchFields": {
1169
- "type": "unknown",
1170
- "mutable": false,
1171
- "complexType": {
1172
- "original": "Array<string>",
1173
- "resolved": "string[]",
1174
- "references": {
1175
- "Array": {
1176
- "location": "global"
1177
- }
1178
- }
1179
- },
1180
- "required": false,
1181
- "optional": false,
1182
- "docs": {
1183
- "tags": [],
1184
- "text": ""
1185
- },
1186
- "defaultValue": "['text']"
1187
- },
1188
- "returnField": {
1189
- "type": "string",
1490
+ "searchable": {
1491
+ "type": "boolean",
1190
1492
  "mutable": false,
1191
1493
  "complexType": {
1192
- "original": "string",
1193
- "resolved": "string",
1494
+ "original": "boolean",
1495
+ "resolved": "boolean",
1194
1496
  "references": {}
1195
1497
  },
1196
1498
  "required": false,
@@ -1199,9 +1501,9 @@ export class BcmList {
1199
1501
  "tags": [],
1200
1502
  "text": ""
1201
1503
  },
1202
- "attribute": "return-field",
1504
+ "attribute": "searchable",
1203
1505
  "reflect": true,
1204
- "defaultValue": "\"id\""
1506
+ "defaultValue": "false"
1205
1507
  },
1206
1508
  "value": {
1207
1509
  "type": "any",
@@ -1239,47 +1541,6 @@ export class BcmList {
1239
1541
  "reflect": true,
1240
1542
  "defaultValue": "false"
1241
1543
  },
1242
- "fullWidth": {
1243
- "type": "boolean",
1244
- "mutable": false,
1245
- "complexType": {
1246
- "original": "boolean",
1247
- "resolved": "boolean",
1248
- "references": {}
1249
- },
1250
- "required": false,
1251
- "optional": false,
1252
- "docs": {
1253
- "tags": [],
1254
- "text": ""
1255
- },
1256
- "attribute": "full-width",
1257
- "reflect": true,
1258
- "defaultValue": "false"
1259
- },
1260
- "size": {
1261
- "type": "string",
1262
- "mutable": false,
1263
- "complexType": {
1264
- "original": "SizeProp",
1265
- "resolved": "\"large\" | \"medium\" | \"small\"",
1266
- "references": {
1267
- "SizeProp": {
1268
- "location": "import",
1269
- "path": "./types"
1270
- }
1271
- }
1272
- },
1273
- "required": false,
1274
- "optional": false,
1275
- "docs": {
1276
- "tags": [],
1277
- "text": ""
1278
- },
1279
- "attribute": "size",
1280
- "reflect": true,
1281
- "defaultValue": "'medium'"
1282
- },
1283
1544
  "clearable": {
1284
1545
  "type": "boolean",
1285
1546
  "mutable": false,
@@ -1392,9 +1653,14 @@ export class BcmList {
1392
1653
  "type": "string",
1393
1654
  "mutable": false,
1394
1655
  "complexType": {
1395
- "original": "'primary' | 'success' | 'warning' | 'error' | 'default'",
1656
+ "original": "captionTypeProp",
1396
1657
  "resolved": "\"default\" | \"error\" | \"primary\" | \"success\" | \"warning\"",
1397
- "references": {}
1658
+ "references": {
1659
+ "captionTypeProp": {
1660
+ "location": "import",
1661
+ "path": "../../../types"
1662
+ }
1663
+ }
1398
1664
  },
1399
1665
  "required": false,
1400
1666
  "optional": false,
@@ -1461,6 +1727,11 @@ export class BcmList {
1461
1727
  "defaultValue": "false"
1462
1728
  }
1463
1729
  }; }
1730
+ static get states() { return {
1731
+ "searchText": {},
1732
+ "captionCache": {},
1733
+ "captionTypeCache": {}
1734
+ }; }
1464
1735
  static get events() { return [{
1465
1736
  "method": "listSelected",
1466
1737
  "name": "bcm-list-selected",
@@ -1491,6 +1762,21 @@ export class BcmList {
1491
1762
  "resolved": "any",
1492
1763
  "references": {}
1493
1764
  }
1765
+ }, {
1766
+ "method": "change",
1767
+ "name": "bcm-change",
1768
+ "bubbles": true,
1769
+ "cancelable": true,
1770
+ "composed": true,
1771
+ "docs": {
1772
+ "tags": [],
1773
+ "text": ""
1774
+ },
1775
+ "complexType": {
1776
+ "original": "any",
1777
+ "resolved": "any",
1778
+ "references": {}
1779
+ }
1494
1780
  }]; }
1495
1781
  static get methods() { return {
1496
1782
  "hide": {
@@ -1512,6 +1798,44 @@ export class BcmList {
1512
1798
  }]
1513
1799
  }
1514
1800
  },
1801
+ "setSearch": {
1802
+ "complexType": {
1803
+ "signature": "(text: string) => Promise<void>",
1804
+ "parameters": [{
1805
+ "tags": [],
1806
+ "text": ""
1807
+ }],
1808
+ "references": {
1809
+ "Promise": {
1810
+ "location": "global"
1811
+ }
1812
+ },
1813
+ "return": "Promise<void>"
1814
+ },
1815
+ "docs": {
1816
+ "text": "",
1817
+ "tags": []
1818
+ }
1819
+ },
1820
+ "clearAndSelectSearch": {
1821
+ "complexType": {
1822
+ "signature": "(select?: boolean) => Promise<void>",
1823
+ "parameters": [{
1824
+ "tags": [],
1825
+ "text": ""
1826
+ }],
1827
+ "references": {
1828
+ "Promise": {
1829
+ "location": "global"
1830
+ }
1831
+ },
1832
+ "return": "Promise<void>"
1833
+ },
1834
+ "docs": {
1835
+ "text": "",
1836
+ "tags": []
1837
+ }
1838
+ },
1515
1839
  "show": {
1516
1840
  "complexType": {
1517
1841
  "signature": "() => Promise<void>",
@@ -1550,6 +1874,25 @@ export class BcmList {
1550
1874
  }]
1551
1875
  }
1552
1876
  },
1877
+ "openStatus": {
1878
+ "complexType": {
1879
+ "signature": "() => Promise<boolean>",
1880
+ "parameters": [],
1881
+ "references": {
1882
+ "Promise": {
1883
+ "location": "global"
1884
+ }
1885
+ },
1886
+ "return": "Promise<boolean>"
1887
+ },
1888
+ "docs": {
1889
+ "text": "",
1890
+ "tags": [{
1891
+ "name": "desc",
1892
+ "text": undefined
1893
+ }]
1894
+ }
1895
+ },
1553
1896
  "config": {
1554
1897
  "complexType": {
1555
1898
  "signature": "(_config: Array<object>) => Promise<object[]>",
@@ -1575,6 +1918,31 @@ export class BcmList {
1575
1918
  }]
1576
1919
  }
1577
1920
  },
1921
+ "setDataOther": {
1922
+ "complexType": {
1923
+ "signature": "(_data?: Array<object> | string) => Promise<void>",
1924
+ "parameters": [{
1925
+ "tags": [],
1926
+ "text": ""
1927
+ }],
1928
+ "references": {
1929
+ "Promise": {
1930
+ "location": "global"
1931
+ },
1932
+ "Array": {
1933
+ "location": "global"
1934
+ }
1935
+ },
1936
+ "return": "Promise<void>"
1937
+ },
1938
+ "docs": {
1939
+ "text": "",
1940
+ "tags": [{
1941
+ "name": "desc",
1942
+ "text": undefined
1943
+ }]
1944
+ }
1945
+ },
1578
1946
  "setData": {
1579
1947
  "complexType": {
1580
1948
  "signature": "(_data?: Array<object> | string) => Promise<string | object[]>",
@@ -1638,12 +2006,84 @@ export class BcmList {
1638
2006
  }]
1639
2007
  }
1640
2008
  },
2009
+ "resetCaption": {
2010
+ "complexType": {
2011
+ "signature": "() => Promise<void>",
2012
+ "parameters": [],
2013
+ "references": {
2014
+ "Promise": {
2015
+ "location": "global"
2016
+ }
2017
+ },
2018
+ "return": "Promise<void>"
2019
+ },
2020
+ "docs": {
2021
+ "text": "",
2022
+ "tags": [{
2023
+ "name": "desc",
2024
+ "text": undefined
2025
+ }]
2026
+ }
2027
+ },
2028
+ "toggleChecked": {
2029
+ "complexType": {
2030
+ "signature": "(checkedItems?: Array<string> | string) => Promise<void>",
2031
+ "parameters": [{
2032
+ "tags": [],
2033
+ "text": ""
2034
+ }],
2035
+ "references": {
2036
+ "Promise": {
2037
+ "location": "global"
2038
+ },
2039
+ "Array": {
2040
+ "location": "global"
2041
+ }
2042
+ },
2043
+ "return": "Promise<void>"
2044
+ },
2045
+ "docs": {
2046
+ "text": "",
2047
+ "tags": [{
2048
+ "name": "desc",
2049
+ "text": undefined
2050
+ }]
2051
+ }
2052
+ },
2053
+ "unChecked": {
2054
+ "complexType": {
2055
+ "signature": "(checkedItems?: Array<string> | string) => Promise<void>",
2056
+ "parameters": [{
2057
+ "tags": [],
2058
+ "text": ""
2059
+ }],
2060
+ "references": {
2061
+ "Promise": {
2062
+ "location": "global"
2063
+ },
2064
+ "Array": {
2065
+ "location": "global"
2066
+ }
2067
+ },
2068
+ "return": "Promise<void>"
2069
+ },
2070
+ "docs": {
2071
+ "text": "",
2072
+ "tags": [{
2073
+ "name": "desc",
2074
+ "text": undefined
2075
+ }]
2076
+ }
2077
+ },
1641
2078
  "checked": {
1642
2079
  "complexType": {
1643
- "signature": "(checkedItems: Array<string> | string) => Promise<void>",
2080
+ "signature": "(checkedItems?: Array<string> | string, reset?: boolean) => Promise<void>",
1644
2081
  "parameters": [{
1645
2082
  "tags": [],
1646
2083
  "text": ""
2084
+ }, {
2085
+ "tags": [],
2086
+ "text": ""
1647
2087
  }],
1648
2088
  "references": {
1649
2089
  "Promise": {
@@ -1687,12 +2127,25 @@ export class BcmList {
1687
2127
  }
1688
2128
  }; }
1689
2129
  static get elementRef() { return "el"; }
2130
+ static get watchers() { return [{
2131
+ "propName": "isShow",
2132
+ "methodName": "handleOpen"
2133
+ }, {
2134
+ "propName": "value",
2135
+ "methodName": "handleChange"
2136
+ }]; }
1690
2137
  static get listeners() { return [{
1691
2138
  "name": "click",
1692
2139
  "method": "handleClick",
1693
2140
  "target": "window",
1694
2141
  "capture": true,
1695
2142
  "passive": false
2143
+ }, {
2144
+ "name": "wheel",
2145
+ "method": "wheelEvent",
2146
+ "target": "window",
2147
+ "capture": true,
2148
+ "passive": true
1696
2149
  }, {
1697
2150
  "name": "scroll",
1698
2151
  "method": "scrollEvent",