bromcom-ui 2.4.29 → 2.4.32

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/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/{p-f5509c20.entry.js → p-073fe976.entry.js} +1 -1
  4. package/dist/bromcom-ui/p-13e143a5.entry.js +1 -0
  5. package/dist/bromcom-ui/p-3bca790c.entry.js +1 -0
  6. package/dist/bromcom-ui/p-4054d5e3.js +1 -0
  7. package/dist/bromcom-ui/p-44d6172f.js +1 -0
  8. package/dist/bromcom-ui/p-573ec2ec.js +1 -0
  9. package/dist/bromcom-ui/p-575dc1e5.entry.js +1 -0
  10. package/dist/bromcom-ui/p-6d018a8f.js +1 -0
  11. package/dist/bromcom-ui/p-73720a30.entry.js +1 -0
  12. package/dist/bromcom-ui/p-7b9c963c.js +1 -0
  13. package/dist/bromcom-ui/p-7f6b81ef.entry.js +1 -0
  14. package/dist/bromcom-ui/p-8ad580f2.entry.js +1 -0
  15. package/dist/bromcom-ui/p-920b5044.entry.js +1 -0
  16. package/dist/bromcom-ui/p-9f47196d.js +1 -0
  17. package/dist/bromcom-ui/p-c7a6f7d8.js +1 -0
  18. package/dist/cjs/{bcm-button_17.cjs.entry.js → bcm-button_14.cjs.entry.js} +132 -663
  19. package/dist/cjs/bcm-checkbox-lite_8.cjs.entry.js +11 -9
  20. package/dist/cjs/bcm-icon-2_2.cjs.entry.js +4 -3
  21. package/dist/cjs/bcm-input.cjs.entry.js +382 -0
  22. package/dist/cjs/bcm-label.cjs.entry.js +35 -0
  23. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +94 -0
  24. package/dist/cjs/bcm-stepper.cjs.entry.js +7 -6
  25. package/dist/cjs/bcm-tag-2.cjs.entry.js +6 -14
  26. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  27. package/dist/cjs/{snq.es5-50d69683.js → generate-df748d90.js} +15 -23
  28. package/dist/cjs/{json-parse-decarator-e170da59.js → json-parse-decarator-89653e78.js} +1 -1
  29. package/dist/cjs/label-template-39ce726c.js +26 -0
  30. package/dist/cjs/loader.cjs.js +1 -1
  31. package/dist/cjs/number-helper-3cb4fe28.js +16 -0
  32. package/dist/cjs/popover-placement-dacc8fc9.js +94 -0
  33. package/dist/cjs/snq.es5-1a8f9645.js +16 -0
  34. package/dist/cjs/{stepper-states-8036b03a.js → stepper-states-991b5b89.js} +5 -4
  35. package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +2 -1
  36. package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +6 -3
  37. package/dist/collection/components/molecules/popconfirm/popconfirm.js +20 -17
  38. package/dist/collection/components/molecules/search-2/search-2.js +26 -1
  39. package/dist/collection/components/molecules/states/search.states.js +5 -2
  40. package/dist/collection/components/organism/list/list.css +30 -3
  41. package/dist/collection/components/organism/list/list.js +93 -13
  42. package/dist/collection/components/organism/listbox/listbox.js +11 -9
  43. package/dist/collection/components/organism/states/bcm-list2.states.js +10 -4
  44. package/dist/collection/helper/generate.js +15 -8
  45. package/dist/collection/helper/number-helper.js +1 -0
  46. package/dist/collection/templates/list-item-template.js +2 -2
  47. package/dist/collection/templates/list-template.js +2 -2
  48. package/dist/esm/{bcm-button_17.entry.js → bcm-button_14.entry.js} +104 -632
  49. package/dist/esm/bcm-checkbox-lite_8.entry.js +11 -9
  50. package/dist/esm/bcm-icon-2_2.entry.js +3 -2
  51. package/dist/esm/bcm-input.entry.js +378 -0
  52. package/dist/esm/bcm-label.entry.js +31 -0
  53. package/dist/esm/bcm-popconfirm-box.entry.js +90 -0
  54. package/dist/esm/bcm-stepper.entry.js +4 -3
  55. package/dist/esm/bcm-tag-2.entry.js +3 -11
  56. package/dist/esm/bromcom-ui.js +1 -1
  57. package/dist/esm/{snq.es5-af9d3468.js → generate-a97a04fc.js} +16 -23
  58. package/dist/esm/{json-parse-decarator-218216a2.js → json-parse-decarator-8563927a.js} +1 -1
  59. package/dist/esm/label-template-6989c6ba.js +24 -0
  60. package/dist/esm/loader.js +1 -1
  61. package/dist/esm/number-helper-8115f1ec.js +14 -0
  62. package/dist/esm/popover-placement-38aa9b63.js +91 -0
  63. package/dist/esm/snq.es5-946822b8.js +14 -0
  64. package/dist/esm/{stepper-states-e1a5694d.js → stepper-states-638eb20f.js} +2 -1
  65. package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +1 -1
  66. package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +1 -1
  67. package/dist/types/components/molecules/search-2/search-2.d.ts +2 -0
  68. package/dist/types/components/organism/list/list.d.ts +3 -0
  69. package/dist/types/components.d.ts +6 -0
  70. package/dist/types/helper/number-helper.d.ts +1 -0
  71. package/package.json +2 -2
  72. package/dist/bromcom-ui/p-10f5108c.js +0 -1
  73. package/dist/bromcom-ui/p-1e6b17cb.entry.js +0 -1
  74. package/dist/bromcom-ui/p-54f40711.entry.js +0 -1
  75. package/dist/bromcom-ui/p-742620f7.js +0 -1
  76. package/dist/bromcom-ui/p-8d7542fa.js +0 -1
  77. package/dist/bromcom-ui/p-bdeb22f2.entry.js +0 -1
  78. package/dist/bromcom-ui/p-d0351a8a.entry.js +0 -1
@@ -9,10 +9,12 @@ import cs from 'classnames';
9
9
  import snq from 'snq';
10
10
  import { JsonParse } from '../../../decorators/json-parse-decarator';
11
11
  import { Generate } from '../../../helper/generate';
12
+ import { NumberHelper } from '../../../helper/number-helper';
12
13
  import { StringHelper } from '../../../helper/string-helper';
13
14
  import { Validators } from '../../../helper/validators';
14
15
  import Bcm from '../../../models/bcm';
15
16
  import { CaptionTemplate } from '../../../templates/caption-template';
17
+ import { LabelTemplate } from '../../../templates/label-template';
16
18
  import { ListTemplate } from '../../../templates/list-template';
17
19
  import { getPlacement, setPosition } from '../../../utils/popover-placement';
18
20
  import { delay, pluralize } from '../../../utils/utils';
@@ -37,6 +39,8 @@ export class BcmList {
37
39
  this.hidden = false;
38
40
  this.fullWidth = false;
39
41
  this.height = "256px";
42
+ this.maxHeight = "500px";
43
+ this.minHeight = "100px";
40
44
  this.width = "256px";
41
45
  this.infoFooter = false;
42
46
  this.variableText = 'item';
@@ -187,6 +191,15 @@ export class BcmList {
187
191
  this.calculateLocation();
188
192
  this.debounceHandler();
189
193
  }
194
+ //mouse wheel event
195
+ handleWheel() {
196
+ if (this.isOpen) {
197
+ if (this.type == 'select' || this.type == 'autocomplete' || this.linkedComponent) {
198
+ this.calculateLocation();
199
+ this.debounceHandler();
200
+ }
201
+ }
202
+ }
190
203
  handleClick(event) {
191
204
  var _a;
192
205
  if (this.disabled)
@@ -304,6 +317,7 @@ export class BcmList {
304
317
  }
305
318
  else {
306
319
  this.returnFilterData = {};
320
+ listState.filterData(this._id, null);
307
321
  }
308
322
  // this.isSelectedOther = false
309
323
  this.searchResultLimit = null;
@@ -433,7 +447,7 @@ export class BcmList {
433
447
  async onSelectSearch() {
434
448
  const searchInput = document.getElementById(`bcm-list-${this._id}-search`);
435
449
  if (searchInput) {
436
- await delay(10);
450
+ await delay(100);
437
451
  searchInput.onBcmFocus();
438
452
  searchInput.onBcmSelect();
439
453
  }
@@ -456,10 +470,10 @@ export class BcmList {
456
470
  this.markForCheck();
457
471
  }
458
472
  async initState() {
459
- var _a;
473
+ var _a, _b, _c;
460
474
  await listState.setValue({
461
475
  id: this._id,
462
- dataSource: this.data,
476
+ dataSource: this.data && snq(() => typeof this.data == 'string' ? JSON.parse(this.data) : this.data, []),
463
477
  options: this
464
478
  });
465
479
  const { totalRoots, totalItems } = listState.getValue(this._id);
@@ -468,11 +482,20 @@ export class BcmList {
468
482
  this.value = this.checkboxes ? (await this.getCheckedList()).checkedList : listState.selectedItem(this._id) ? listState.selectedItem(this._id)[0] : null;
469
483
  // value && value.length > 0 && (this.value = value)
470
484
  if (this.checkboxes) {
485
+ await delay(100);
471
486
  this.tagControl();
472
487
  }
473
488
  else {
474
489
  this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
475
490
  }
491
+ const checkedIDs = [];
492
+ ((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) > 0 && this.value.forEach(item => {
493
+ if (!item.items || item.items.length === 0) {
494
+ checkedIDs.push(item.id);
495
+ }
496
+ });
497
+ await this.addChecked(checkedIDs);
498
+ await this.handleIndeterminate((_c = this.value) === null || _c === void 0 ? void 0 : _c.length, this.totalData);
476
499
  await this.markForCheck();
477
500
  }
478
501
  markForCheck() {
@@ -570,6 +593,8 @@ export class BcmList {
570
593
  io.observe(event.target.lastElementChild);
571
594
  }
572
595
  calculateLocation() {
596
+ const list = document.getElementById(`bcm-list-${this._id}`);
597
+ list && (list.style.height = '256px');
573
598
  if (this.isOpen) {
574
599
  var placement = this.placement;
575
600
  const list = document.getElementById(`bcm-list-${this._id}`);
@@ -589,6 +614,14 @@ export class BcmList {
589
614
  if (this.fullWidth) {
590
615
  list.style.width = targetElement.offsetWidth + "px";
591
616
  }
617
+ if (this.height.indexOf('%') > -1) {
618
+ list.style.height = NumberHelper.toNumber(this.height.replace('%', '')) * 0.01 * window.innerHeight - pos[0] - 50 + "px";
619
+ }
620
+ else {
621
+ list.style.height = this.height;
622
+ }
623
+ list.style.minHeight = "156px";
624
+ list.style.maxHeight = window.innerHeight - pos[0] - 50 + 'px';
592
625
  }
593
626
  }
594
627
  }
@@ -614,7 +647,7 @@ export class BcmList {
614
647
  var tags = [];
615
648
  var i = 0;
616
649
  let itemsWidth = 0;
617
- if (this.value != null && ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) > 0) {
650
+ if (this.value && this.value.length > 0) {
618
651
  var BreakException = {};
619
652
  try {
620
653
  for (const item of this.value) {
@@ -649,10 +682,8 @@ export class BcmList {
649
682
  tags.forEach(tag => {
650
683
  tagContainerArea.appendChild(tag);
651
684
  });
652
- }
653
- if (this.value && this.value.length > 0) {
654
- const otherTag = this.value.slice(i);
655
- if (otherTag.length > 0) {
685
+ const otherTag = (_a = this.value) === null || _a === void 0 ? void 0 : _a.slice(i);
686
+ if ((otherTag === null || otherTag === void 0 ? void 0 : otherTag.length) > 0) {
656
687
  var otherText, otherElement, BreakException = {};
657
688
  try {
658
689
  const removeItems = async () => {
@@ -664,7 +695,8 @@ export class BcmList {
664
695
  otherTag.push(item.itemObject);
665
696
  otherText = `${otherTag.length} ${pluralize('item', otherTag.length)} selected`;
666
697
  otherElement = await this.createTag({ id: 'other-tag', text: otherText });
667
- if (otherElement.offsetWidth > (tagContainerWidth - itemsWidth)) {
698
+ await delay(10);
699
+ if (otherElement.offsetWidth + 20 > (tagContainerWidth - itemsWidth)) {
668
700
  itemsWidth -= item.offsetWidth + 4;
669
701
  item.remove();
670
702
  await removeItems();
@@ -711,7 +743,6 @@ export class BcmList {
711
743
  }
712
744
  }
713
745
  render() {
714
- var _a;
715
746
  const { checkboxes, treeview, label, size, disabled, readonly, required, hidden, fullWidth, searchable } = this.getOptions();
716
747
  const hostClasses = cs('bcm-list', `bcm-list__size-${size}`, size === 'large' ? 'size-3' : 'size-2', {
717
748
  'error': this.captionType == Bcm.Status.error,
@@ -729,14 +760,21 @@ export class BcmList {
729
760
  disabled
730
761
  });
731
762
  const bcmListInput = cs('bcm-list__input');
732
- return (h(Host, { class: hostClasses, tabindex: "0" },
763
+ const openedType = (this.type == 'select' || this.type == 'autocomplete' || this.linkedComponent);
764
+ return (h(Host, { class: hostClasses, tabindex: "0", style: {
765
+ '--width': fullWidth ? '100%' : this.width,
766
+ '--height': openedType ? '100%' : this.height,
767
+ '--max-height': openedType ? 'inherit' : this.maxHeight,
768
+ '--min-height': openedType ? 'inherit' : this.minHeight,
769
+ } },
733
770
  h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label &&
734
771
  h("div", null,
735
- h("bcm-label", { type: this.captionType, value: label, required: required, htmlFor: this._id }))),
772
+ h(LabelTemplate, { type: this.captionType, value: label, required: required, htmlFor: this._id }))),
736
773
  this.type == 'select' && (h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput },
737
774
  h("span", { class: "bcm-list__input-container" },
738
775
  this.checkboxes && (h("span", { id: `bcm-list-input-tag-container-${this._id}`, class: "bcm-list__input-tag-container" })),
739
- (!this.checkboxes || ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) == 0 || !this.value) && (this.inputText || h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))),
776
+ this.checkboxes && !this.value && (h("span", { class: "bcm-list__input-placeholder" }, this.placeholder)),
777
+ !this.checkboxes && (this.value ? this.inputText : h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))),
740
778
  h("span", { class: "bcm-list__input-buttons" },
741
779
  this.clearable && this.value && h("i", { class: "bcm-fal bcm-fa-times", onClick: (e) => this.setClear(e) }),
742
780
  h("i", { class: `bcm-fas bcm-fa-caret-${this.isOpen ? 'up' : 'down'}` })))),
@@ -1084,6 +1122,42 @@ export class BcmList {
1084
1122
  "reflect": false,
1085
1123
  "defaultValue": "\"256px\""
1086
1124
  },
1125
+ "maxHeight": {
1126
+ "type": "string",
1127
+ "mutable": false,
1128
+ "complexType": {
1129
+ "original": "string",
1130
+ "resolved": "string",
1131
+ "references": {}
1132
+ },
1133
+ "required": false,
1134
+ "optional": false,
1135
+ "docs": {
1136
+ "tags": [],
1137
+ "text": ""
1138
+ },
1139
+ "attribute": "max-height",
1140
+ "reflect": false,
1141
+ "defaultValue": "\"500px\""
1142
+ },
1143
+ "minHeight": {
1144
+ "type": "string",
1145
+ "mutable": false,
1146
+ "complexType": {
1147
+ "original": "string",
1148
+ "resolved": "string",
1149
+ "references": {}
1150
+ },
1151
+ "required": false,
1152
+ "optional": false,
1153
+ "docs": {
1154
+ "tags": [],
1155
+ "text": ""
1156
+ },
1157
+ "attribute": "min-height",
1158
+ "reflect": false,
1159
+ "defaultValue": "\"100px\""
1160
+ },
1087
1161
  "width": {
1088
1162
  "type": "string",
1089
1163
  "mutable": false,
@@ -1708,6 +1782,12 @@ export class BcmList {
1708
1782
  "target": "window",
1709
1783
  "capture": false,
1710
1784
  "passive": true
1785
+ }, {
1786
+ "name": "wheel",
1787
+ "method": "handleWheel",
1788
+ "target": "window",
1789
+ "capture": false,
1790
+ "passive": true
1711
1791
  }, {
1712
1792
  "name": "click",
1713
1793
  "method": "handleClick",
@@ -692,18 +692,20 @@ export class BcmListbox {
692
692
  this.allChilds.map((item) => {
693
693
  if (this.highlight) {
694
694
  event.target.addEventListener('bcm-on-search-value', async (e) => {
695
- searchValue = await e.detail;
696
695
  var inputText = item.shadowRoot.getElementById("text");
697
- inputText = (inputText === null || inputText === void 0 ? void 0 : inputText.textContent) || (inputText === null || inputText === void 0 ? void 0 : inputText.innerText) || "";
698
- if (searchValue) {
699
- var cacheInputText = lowercase(inputText);
700
- var cacheSearchValue = lowercase(searchValue);
701
- var index = cacheInputText.indexOf(cacheSearchValue);
702
- if (index >= 0) {
703
- inputText = inputText.substring(0, index) + "<span class='highlight'>" + inputText.substring(index, index + searchValue.length) + "</span>" + inputText.substring(index + searchValue.length);
696
+ if (inputText) {
697
+ searchValue = await e.detail;
698
+ inputText = (inputText === null || inputText === void 0 ? void 0 : inputText.textContent) || (inputText === null || inputText === void 0 ? void 0 : inputText.innerText) || "";
699
+ if (searchValue) {
700
+ var cacheInputText = lowercase(inputText);
701
+ var cacheSearchValue = lowercase(searchValue);
702
+ var index = cacheInputText.indexOf(cacheSearchValue);
703
+ if (index >= 0) {
704
+ inputText = inputText.substring(0, index) + "<span class='highlight'>" + inputText.substring(index, index + searchValue.length) + "</span>" + inputText.substring(index + searchValue.length);
705
+ }
704
706
  }
707
+ item.shadowRoot.getElementById("text").innerHTML = inputText;
705
708
  }
706
- item.shadowRoot.getElementById("text").innerHTML = inputText;
707
709
  });
708
710
  }
709
711
  item.hidden = true;
@@ -10,7 +10,7 @@ const setValue = (val) => {
10
10
  const itemOptions = { size, checkboxes, template, favIcon, showIcon, allOpen, highlight, treeview };
11
11
  const data = {
12
12
  id: snq(() => id, Generate.UID),
13
- dataSource: recursive(dataSource, itemOptions),
13
+ dataSource: dataSource && dataSource.length > 0 && (recursive(dataSource, itemOptions)),
14
14
  options: {
15
15
  value,
16
16
  size,
@@ -46,7 +46,10 @@ const setValue = (val) => {
46
46
  state.value.set(data.id, data);
47
47
  };
48
48
  const recursive = (data, options, parentId) => {
49
- const recData = data.map((item) => (Object.assign(Object.assign(Object.assign(Object.assign({ itemObject: item }, item), options), { parentId: parentId || null, open: options.allOpen || item.open || false }), ((options.treeview && item.items) ? { items: snq(() => recursive(item.items, options, item.id), []) } : { items: [] }))));
49
+ let recData = [];
50
+ if (data && data.length > 0) {
51
+ recData = data.map((item) => (Object.assign(Object.assign(Object.assign(Object.assign({ itemObject: item }, item), options), { parentId: parentId || null, open: options.allOpen || item.open || false }), ((options.treeview && item.items && item.items.length > 0) ? { items: snq(() => recursive(item.items, options, item.id), []) } : { items: [] }))));
52
+ }
50
53
  return recData;
51
54
  };
52
55
  const removeValue = (_id) => {
@@ -151,7 +154,7 @@ const addChecked = (id, ids) => {
151
154
  const value = getValue(id);
152
155
  if (value) {
153
156
  ids.forEach((item) => {
154
- checkedItem(id, item);
157
+ checkedItem(id, item.toString());
155
158
  });
156
159
  }
157
160
  };
@@ -170,7 +173,7 @@ const findItem = (id, itemId, items) => {
170
173
  }
171
174
  if (dataSource) {
172
175
  dataSource.forEach((item) => {
173
- if (itemId.includes(item.id)) {
176
+ if (itemId.includes(item.id.toString())) {
174
177
  checkedProcess(id, item);
175
178
  if (item.parentId) {
176
179
  indeterminateStatus(id, item.parentId);
@@ -281,6 +284,9 @@ const filterData = (id, ids, items, searchOtherTag) => {
281
284
  }
282
285
  else {
283
286
  item.hidden = false;
287
+ if (item.items) {
288
+ filterData(id, null, item.items);
289
+ }
284
290
  visibled.push(item);
285
291
  item.isSearching = false;
286
292
  }
@@ -1,14 +1,20 @@
1
1
  import { StatusProps } from "../components/molecules/alert/types";
2
2
  // @ts-ignore
3
3
  import { version } from "../../package.json";
4
- //console.log versiyon
5
- console.log(`%c Bromcom ui component library version: ${version} `, `background: #1890FF;
6
- text-shadow: 0 0 2px #000000;
7
- color: #fff;
8
- line-height: 40px;
9
- font-size: 13px;
10
- padding: 0 20px;
11
- border-radius: 6px; `);
4
+ import { Build } from '@stencil/core';
5
+ const allowedDomains = [
6
+ "localhost",
7
+ "beta-regression.bromcomcloud.com",
8
+ "beta-scrum.bromcomcloud.com",
9
+ "beta-kanban.bromcomcloud.com"
10
+ ];
11
+ const isAllowedDomain = () => {
12
+ const hostname = window.location.hostname;
13
+ return allowedDomains.includes(hostname);
14
+ };
15
+ if (isAllowedDomain()) {
16
+ console.log(`%cbromcom ui%c version: ${version}-${Build.isDev ? 'd' : 'p'} `, `color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px`, `font-size:10px;`);
17
+ }
12
18
  export class Generate {
13
19
  }
14
20
  Generate.UID = () => Math.random().toString(36).substr(2, 9);
@@ -39,6 +45,7 @@ Generate.createComponent = (el, props) => {
39
45
  if (!element) {
40
46
  element = document.createElement(el);
41
47
  }
48
+ // debugger;
42
49
  Object.keys(props).forEach(key => {
43
50
  element[key] = props[key];
44
51
  });
@@ -8,3 +8,4 @@ NumberHelper.replaceFloat = (str) => snq(() => str.replace(/[^0-9.]/g, ''));
8
8
  NumberHelper.toFixed = (num, fixed) => snq(() => num.toFixed(fixed));
9
9
  NumberHelper.parseFloatFixed = (str, fixed) => snq(() => parseFloat(NumberHelper.replaceFloat(str)).toFixed(fixed));
10
10
  NumberHelper.getDecimalLength = (str) => snq(() => str.split('.')[1] ? str.split('.')[1].length : 0);
11
+ NumberHelper.toNumber = (str) => snq(() => Number(str.replace(/[^0-9.]/g, '')));
@@ -16,12 +16,12 @@ export const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size,
16
16
  }
17
17
  text = item.template && intersection.length > 1 ? StringHelper.templateParser(item.template, Object.assign(Object.assign({}, item.itemObject), { text })) : text;
18
18
  const disabled = item.disabled;
19
- return (h("div", { id: item.id, hidden: item.hidden, tabindex: "-1", "on-focus": (e) => !disabled && (focusItem(e)), class: cs("bcm-list__item", size === 'large' ? 'size-3' : 'size-2') },
19
+ return (h("div", { id: item.id, hidden: item.hidden, tabindex: "-1", "on-focus": (e) => !disabled && (focusItem(e)), class: cs("bcm-list__item", size === 'large' ? 'size-3' : 'size-2', "bcm-list__item-" + size) },
20
20
  h("div", { class: cs('bcm-list__item-content', !checkboxes && item.selected == true && ('selected'), { 'disabled': disabled }) },
21
21
  treeview && (h("div", { class: "bcm-list__item-content-collapse-icon", onClick: () => { item.open = item.isSearching; openGroup(item.id); } }, isHaveChildren && (h("i", { class: cs('bcm-fas bcm-fa-caret-' + (item.isSearching || item.open ? 'down' : 'right')) })))),
22
22
  h("div", { class: cs('bcm-list__item-content-text', { treeview }), onClick: () => !disabled && (checkboxes ? checkedItem(item.id) : selectedItem(item.id)) },
23
23
  checkboxes && (h("div", { class: "bcm-list__item-content-text-checkbox" },
24
24
  h(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked }))),
25
25
  h("span", { class: "bcm-list__item-content-text-inner", innerHTML: text }))),
26
- treeview && isHaveChildren && (h("div", { class: "bcm-list__item-childs" }, (item.isSearching || item.open) && item.items.map((item) => (h(ListItemTemplate, { highlight: highlight, item: item, treeview: treeview, checkboxes: checkboxes, selectedItem: selectedItem, checkedItem: checkedItem, openGroup: (parentId) => openGroup(parentId), focusItem: (itemId) => focusItem(itemId) })))))));
26
+ treeview && isHaveChildren && (h("div", { class: "bcm-list__item-childs" }, (item.isSearching || item.open) && item.items.map((item) => (h(ListItemTemplate, { highlight: highlight, item: item, treeview: treeview, checkboxes: checkboxes, size: size, selectedItem: selectedItem, checkedItem: checkedItem, openGroup: (parentId) => openGroup(parentId), focusItem: (itemId) => focusItem(itemId) })))))));
27
27
  };
@@ -3,9 +3,9 @@ import { InfoFooterTemplate } from './info-footer-template';
3
3
  import { ListItemTemplate } from './list-item-template';
4
4
  export const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, data, width, height, size, searchPlaceholder, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable }) => {
5
5
  const showSelectAll = !(treeview && searchFound > 0) && !(searchFound > 0);
6
- return (h("div", { id: `bcm-list-${_id}`, class: bcmListContainer, style: { '--width': width, '--height': height } },
6
+ return (h("div", { id: `bcm-list-${_id}`, class: bcmListContainer, style: { '--height': height, '--width': width } },
7
7
  searchable && (h("section", { class: "bcm-list__container-search" },
8
- h("bcm-search-2", { id: `bcm-list-${_id}-search`, data: data, clearable: true, placeholder: searchPlaceholder }))),
8
+ h("bcm-search-2", { size: size, id: `bcm-list-${_id}-search`, data: data, clearable: true, placeholder: searchPlaceholder }))),
9
9
  h("main", { onScroll: (e) => onScrollEvent(e), class: "scrolling" },
10
10
  checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (h("section", { class: "bcm-list__container-select-all" },
11
11
  h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: (itemId) => selectedItem(itemId), checkedItem: (itemId) => checkedItem(itemId), openGroup: (parentId) => openGroup(parentId), focusItem: (itemId) => focusItem(itemId) }))),