bromcom-ui 2.4.18 → 2.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-f03e41b5.entry.js → p-275c06a2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1384753c.entry.js → p-56312eb4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c40d45b9.entry.js → p-87eead0c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-47be36bf.entry.js → p-893b1117.entry.js} +1 -1
- package/dist/bromcom-ui/p-8ff169fb.entry.js +1 -0
- package/dist/bromcom-ui/{p-495bf63e.js → p-945d9359.js} +1 -1
- package/dist/bromcom-ui/p-a0b12489.entry.js +1 -0
- package/dist/bromcom-ui/{p-82352b0f.entry.js → p-ac679765.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8c472703.entry.js → p-ae53d8d8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3de794f6.entry.js → p-b6c270d0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7fb112d9.js → p-bc30b511.js} +1 -1
- package/dist/bromcom-ui/p-d86c018a.entry.js +1 -0
- package/dist/bromcom-ui/{p-e4da928b.entry.js → p-ddbaa099.entry.js} +1 -1
- package/dist/bromcom-ui/p-fa0c64f5.entry.js +1 -0
- package/dist/bromcom-ui/p-fb10cbc4.entry.js +1 -0
- package/dist/cjs/{bcm-button_7.cjs.entry.js → bcm-button_3.cjs.entry.js} +5 -1801
- package/dist/cjs/{bcm-checkbox.cjs.entry.js → bcm-checkbox_2.cjs.entry.js} +64 -0
- package/dist/cjs/bcm-icon-2_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-label_3.cjs.entry.js +1 -1
- package/dist/cjs/bcm-list.cjs.entry.js +1423 -0
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/bcm-search-2.cjs.entry.js +306 -0
- package/dist/cjs/bcm-stepper.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tag-2.cjs.entry.js +2 -2
- package/dist/cjs/bcm-text.cjs.entry.js +33 -0
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{generate-debc2c44.js → generate-f1e88921.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{stepper-states-09ebf594.js → stepper-states-4b65b027.js} +1 -1
- package/dist/collection/components/organism/form/form.js +5 -5
- package/dist/collection/components/organism/list/list.js +68 -71
- package/dist/esm/{bcm-button_7.entry.js → bcm-button_3.entry.js} +8 -1800
- package/dist/esm/{bcm-checkbox.entry.js → bcm-checkbox_2.entry.js} +65 -2
- package/dist/esm/bcm-icon-2_2.entry.js +3 -3
- package/dist/esm/bcm-label_3.entry.js +1 -1
- package/dist/esm/bcm-list.entry.js +1419 -0
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-popover-box.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +1 -1
- package/dist/esm/bcm-search-2.entry.js +302 -0
- package/dist/esm/bcm-stepper.entry.js +3 -3
- package/dist/esm/bcm-tag-2.entry.js +2 -2
- package/dist/esm/bcm-text.entry.js +29 -0
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{generate-42ba55c9.js → generate-b11810eb.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{stepper-states-706439d0.js → stepper-states-7457f702.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-63675bea.entry.js +0 -1
- package/dist/bromcom-ui/p-6823d86a.entry.js +0 -1
|
@@ -122,22 +122,20 @@ export class BcmList {
|
|
|
122
122
|
watchId(newVal, oldVal) {
|
|
123
123
|
console.info('Changed component id:', oldVal + ' -> ' + newVal);
|
|
124
124
|
listState.removeState(oldVal);
|
|
125
|
-
this.initState(
|
|
125
|
+
this.initState();
|
|
126
126
|
}
|
|
127
127
|
handleValueChange(newVal, oldVal) {
|
|
128
|
-
|
|
129
|
-
if (this.isSentNotification) {
|
|
128
|
+
if (this.checkboxes) {
|
|
130
129
|
if (!Validators.compareTwoArrayIsSame(newVal, oldVal)) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
130
|
+
this.bcmChecklist.emit(this.value);
|
|
131
|
+
this.change.emit(this.value);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
if ((newVal === null || newVal === void 0 ? void 0 : newVal.text) != (oldVal === null || oldVal === void 0 ? void 0 : oldVal.text)) {
|
|
136
|
+
this.change.emit(this.value);
|
|
138
137
|
}
|
|
139
138
|
}
|
|
140
|
-
this.isSentNotification = true;
|
|
141
139
|
}
|
|
142
140
|
watchReturnFilterData(newVal) {
|
|
143
141
|
var _a;
|
|
@@ -208,7 +206,7 @@ export class BcmList {
|
|
|
208
206
|
autocompleteInput.setValue('');
|
|
209
207
|
}
|
|
210
208
|
else {
|
|
211
|
-
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.
|
|
209
|
+
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || '');
|
|
212
210
|
}
|
|
213
211
|
}
|
|
214
212
|
}
|
|
@@ -451,7 +449,7 @@ export class BcmList {
|
|
|
451
449
|
await delay(1000);
|
|
452
450
|
this.markForCheck();
|
|
453
451
|
}
|
|
454
|
-
async initState(
|
|
452
|
+
async initState() {
|
|
455
453
|
var _a;
|
|
456
454
|
await listState.setValue({
|
|
457
455
|
id: this._id,
|
|
@@ -461,16 +459,13 @@ export class BcmList {
|
|
|
461
459
|
const { totalRoots, totalItems } = listState.getValue(this._id);
|
|
462
460
|
this.totalData = totalItems;
|
|
463
461
|
this.totalRootData = totalRoots;
|
|
464
|
-
|
|
465
|
-
this.isSentNotification = false;
|
|
466
|
-
}
|
|
467
|
-
this.value = this.checkboxes ? (await this.getCheckedList()).checkedList : listState.selectedItem(this._id);
|
|
462
|
+
this.value = this.checkboxes ? (await this.getCheckedList()).checkedList : listState.selectedItem(this._id) ? listState.selectedItem(this._id)[0] : null;
|
|
468
463
|
// value && value.length > 0 && (this.value = value)
|
|
469
464
|
if (this.checkboxes) {
|
|
470
465
|
this.tagControl();
|
|
471
466
|
}
|
|
472
467
|
else {
|
|
473
|
-
this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.
|
|
468
|
+
this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
|
|
474
469
|
}
|
|
475
470
|
await this.markForCheck();
|
|
476
471
|
}
|
|
@@ -510,19 +505,19 @@ export class BcmList {
|
|
|
510
505
|
}
|
|
511
506
|
}
|
|
512
507
|
async selectedItem(itemId) {
|
|
513
|
-
var _a
|
|
508
|
+
var _a;
|
|
514
509
|
this.value = listState.selectedItem(this._id, itemId)[0];
|
|
515
|
-
this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) ||
|
|
510
|
+
this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
|
|
516
511
|
this.isOpen = false;
|
|
517
512
|
this.markForCheck();
|
|
518
|
-
if (this.type == 'autocomplete' &&
|
|
513
|
+
if (this.type == 'autocomplete' && this.value) {
|
|
519
514
|
// await delay(100)
|
|
520
515
|
// this.resetCaption()
|
|
521
516
|
const autocompleteInput = this.getAutoCompleteInput();
|
|
522
517
|
if (autocompleteInput) {
|
|
523
518
|
setTimeout(() => {
|
|
524
519
|
var _a;
|
|
525
|
-
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.
|
|
520
|
+
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || '');
|
|
526
521
|
this.isOpen = false;
|
|
527
522
|
}, 100);
|
|
528
523
|
}
|
|
@@ -611,7 +606,7 @@ export class BcmList {
|
|
|
611
606
|
var tags = [];
|
|
612
607
|
var i = 0;
|
|
613
608
|
let itemsWidth = 0;
|
|
614
|
-
if (this.value
|
|
609
|
+
if (this.value != null && ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
615
610
|
var BreakException = {};
|
|
616
611
|
try {
|
|
617
612
|
for (const item of this.value) {
|
|
@@ -647,57 +642,59 @@ export class BcmList {
|
|
|
647
642
|
tagContainerArea.appendChild(tag);
|
|
648
643
|
});
|
|
649
644
|
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
otherElement = await this.createTag({ id: 'other-tag', text: otherText });
|
|
663
|
-
if (otherElement.offsetWidth > (tagContainerWidth - itemsWidth)) {
|
|
664
|
-
itemsWidth -= item.offsetWidth + 4;
|
|
665
|
-
item.remove();
|
|
666
|
-
await removeItems();
|
|
667
|
-
}
|
|
668
|
-
else {
|
|
669
|
-
otherTag.pop();
|
|
645
|
+
if (this.value && this.value.length > 0) {
|
|
646
|
+
const otherTag = this.value.slice(i);
|
|
647
|
+
if (otherTag.length > 0) {
|
|
648
|
+
var otherText, otherElement, BreakException = {};
|
|
649
|
+
try {
|
|
650
|
+
const removeItems = async () => {
|
|
651
|
+
var visibleItems = tagContainer.querySelectorAll('bcm-tag');
|
|
652
|
+
tagContainerWidth = this.type == 'autocomplete' ? tagContainer.clientWidth > 300 ? tagContainer.clientWidth - 150 : tagContainer.clientWidth - 100 : tagContainer.clientWidth;
|
|
653
|
+
visibleItems = Generate.reverseNodeList(visibleItems);
|
|
654
|
+
if (visibleItems.length > 0) {
|
|
655
|
+
for (const item of visibleItems) {
|
|
656
|
+
otherTag.push(item.itemObject);
|
|
670
657
|
otherText = `${otherTag.length} ${pluralize('item', otherTag.length)} selected`;
|
|
671
|
-
otherElement = await this.createTag({ id: 'other-tag', text: otherText
|
|
672
|
-
|
|
658
|
+
otherElement = await this.createTag({ id: 'other-tag', text: otherText });
|
|
659
|
+
if (otherElement.offsetWidth > (tagContainerWidth - itemsWidth)) {
|
|
660
|
+
itemsWidth -= item.offsetWidth + 4;
|
|
661
|
+
item.remove();
|
|
662
|
+
await removeItems();
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
otherTag.pop();
|
|
666
|
+
otherText = `${otherTag.length} ${pluralize('item', otherTag.length)} selected`;
|
|
667
|
+
otherElement = await this.createTag({ id: 'other-tag', text: otherText, itemObject: otherTag });
|
|
668
|
+
throw BreakException;
|
|
669
|
+
}
|
|
673
670
|
}
|
|
674
671
|
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
691
|
-
if (this.isHaveOtherTag) {
|
|
692
|
-
this.unSelectOther();
|
|
693
|
-
this.isHaveOtherTag = false;
|
|
672
|
+
};
|
|
673
|
+
await removeItems();
|
|
674
|
+
}
|
|
675
|
+
catch (e) {
|
|
676
|
+
if (e !== BreakException)
|
|
677
|
+
throw e;
|
|
678
|
+
}
|
|
679
|
+
otherElement.title = otherTag.slice(0, 10).map(item => StringHelper.textLimitter(item.text, 15)).toString().split(',').join("\r\n") + '\r\n...';
|
|
680
|
+
tagContainerArea.appendChild(otherElement);
|
|
681
|
+
this.isHaveOtherTag = true;
|
|
682
|
+
if (this.isSelectedOther) { // other seçiliyken other içindeki bir checked durumu değiştiğinde seçili classlarının kalması için
|
|
683
|
+
this.handleOtherSelected(true);
|
|
684
|
+
}
|
|
694
685
|
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
686
|
+
else {
|
|
687
|
+
if (this.isHaveOtherTag) {
|
|
688
|
+
this.unSelectOther();
|
|
689
|
+
this.isHaveOtherTag = false;
|
|
690
|
+
}
|
|
691
|
+
var element = document.getElementById(`bcm-list-input-tag-${this._id}-other-tag`);
|
|
692
|
+
if (element) {
|
|
693
|
+
element.remove();
|
|
694
|
+
}
|
|
698
695
|
}
|
|
699
696
|
}
|
|
700
|
-
if (((_b = this.value) === null || _b === void 0 ? void 0 : _b.length)
|
|
697
|
+
if (!this.value || ((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) == 0) {
|
|
701
698
|
tagContainerArea.querySelectorAll('bcm-tag').forEach(element => {
|
|
702
699
|
element.remove();
|
|
703
700
|
});
|
|
@@ -706,7 +703,7 @@ export class BcmList {
|
|
|
706
703
|
}
|
|
707
704
|
}
|
|
708
705
|
render() {
|
|
709
|
-
var _a
|
|
706
|
+
var _a;
|
|
710
707
|
const { checkboxes, treeview, label, size, disabled, readonly, required, hidden, fullWidth, searchable } = this.getOptions();
|
|
711
708
|
const hostClasses = cs('bcm-list', `bcm-list__size-${size}`, size === 'large' ? 'size-3' : 'size-2', {
|
|
712
709
|
'error': this.captionType == Bcm.Status.error,
|
|
@@ -729,9 +726,9 @@ export class BcmList {
|
|
|
729
726
|
this.type == 'select' && (h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput },
|
|
730
727
|
h("span", { class: "bcm-list__input-container" },
|
|
731
728
|
this.checkboxes && (h("span", { id: `bcm-list-input-tag-container-${this._id}`, class: "bcm-list__input-tag-container" })),
|
|
732
|
-
(!this.checkboxes || ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) == 0) && (this.inputText || h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))),
|
|
729
|
+
(!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))),
|
|
733
730
|
h("span", { class: "bcm-list__input-buttons" },
|
|
734
|
-
this.clearable &&
|
|
731
|
+
this.clearable && this.value && h("i", { class: "bcm-fal bcm-fa-times", onClick: (e) => this.setClear(e) }),
|
|
735
732
|
h("i", { class: `bcm-fas bcm-fa-caret-${this.isOpen ? 'up' : 'down'}` })))),
|
|
736
733
|
this.type === 'autocomplete' && (h("div", { id: `bcm-list-input-${this._id}`, class: cs(bcmListInput, { 'bcm-list__input-autocomplete': this.type == 'autocomplete' }) },
|
|
737
734
|
h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` },
|