bromcom-ui 2.7.37 → 2.7.38-rc.0
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.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-04c8b756.js +1 -1
- package/dist/bromcom-ui/{p-b924d9b8.entry.js → p-0a29a882.entry.js} +1 -1
- package/dist/bromcom-ui/{p-53a00d98.js → p-0e8b8316.js} +1 -1
- package/dist/bromcom-ui/p-1192f094.js +5 -0
- package/dist/bromcom-ui/{p-93e7539f.entry.js → p-1af75960.entry.js} +1 -1
- package/dist/bromcom-ui/{p-168b8ca7.entry.js → p-1c207a2d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1e2d1714.entry.js → p-24bfaf3c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0f69842c.entry.js → p-2f4d6b32.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5926788b.entry.js → p-38e67de7.entry.js} +1 -1
- package/dist/bromcom-ui/p-3b07a0b1.entry.js +5 -0
- package/dist/bromcom-ui/{p-d6a11d39.entry.js → p-3b43ad99.entry.js} +1 -1
- package/dist/bromcom-ui/{p-894b0a04.entry.js → p-3e6e1e62.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a2b5a278.entry.js → p-41df4c5d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c573addc.entry.js → p-42d537ac.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2c31ab48.entry.js → p-44dd9f7a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-02f2445a.entry.js → p-455f416f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fe3e3210.js → p-45704915.js} +1 -1
- package/dist/bromcom-ui/{p-58761f87.js → p-4db160cc.js} +1 -1
- package/dist/bromcom-ui/{p-9d2fe304.entry.js → p-516b3b59.entry.js} +1 -1
- package/dist/bromcom-ui/{p-edec76e6.entry.js → p-52e9eb72.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ad4cf3f3.entry.js → p-59b121e1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ac9f1774.entry.js → p-5f002c1c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c1c18de5.entry.js → p-62bb8bf1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4220635e.entry.js → p-68ab7a63.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8430b547.entry.js → p-68f57e0b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9729086c.entry.js → p-6c92a756.entry.js} +1 -1
- package/dist/bromcom-ui/p-6f1b3d34.entry.js +5 -0
- package/dist/bromcom-ui/p-758a20ad.entry.js +5 -0
- package/dist/bromcom-ui/{p-e7b229fb.js → p-765ee6c1.js} +1 -1
- package/dist/bromcom-ui/{p-95c5d04b.entry.js → p-77e0d2b5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-15e43f94.entry.js → p-7b7f4c29.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ff742ab4.entry.js → p-906848af.entry.js} +1 -1
- package/dist/bromcom-ui/p-937e2bed.js +5 -0
- package/dist/bromcom-ui/{p-425e15b7.entry.js → p-96525d60.entry.js} +1 -1
- package/dist/bromcom-ui/{p-da458f63.entry.js → p-980e5824.entry.js} +1 -1
- package/dist/bromcom-ui/p-9c6de630.js +1 -1
- package/dist/bromcom-ui/{p-33e2496d.entry.js → p-a2710121.entry.js} +1 -1
- package/dist/bromcom-ui/{p-52b34297.entry.js → p-c3fc854c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3cebdafb.js → p-c78bc99b.js} +1 -1
- package/dist/bromcom-ui/p-c9bd85e9.js +1 -1
- package/dist/bromcom-ui/{p-08d242bf.entry.js → p-cf337431.entry.js} +1 -1
- package/dist/bromcom-ui/p-dcf02363.entry.js +5 -0
- package/dist/bromcom-ui/{p-78963452.entry.js → p-e14fb705.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a29b08eb.entry.js → p-e2fe4755.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5b114d5a.entry.js → p-e6d92da4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a185570c.entry.js → p-eb639e76.entry.js} +1 -1
- package/dist/bromcom-ui/{p-38b69e07.entry.js → p-f0b62f8e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3e557630.entry.js → p-f495426e.entry.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
- package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
- package/dist/cjs/bcm-avatar_15.cjs.entry.js +1954 -0
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +6 -6
- package/dist/cjs/bcm-card.cjs.entry.js +4 -4
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +8 -8
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +5 -5
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +9 -9
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +8 -8
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +7 -7
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -3
- package/dist/cjs/{bcm-2c51bf0c.js → bcm-f00ec62c.js} +4 -4
- package/dist/cjs/bcm-form-2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-input.cjs.entry.js +10 -10
- package/dist/cjs/bcm-link.cjs.entry.js +3 -3
- package/dist/cjs/bcm-list.cjs.entry.js +26 -27
- package/dist/cjs/{bcm-label_2.cjs.entry.js → bcm-modal.cjs.entry.js} +99 -79
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -4
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +4 -4
- package/dist/cjs/bcm-progress.cjs.entry.js +3 -3
- package/dist/cjs/bcm-radio-group.cjs.entry.js +6 -6
- package/dist/cjs/bcm-radio.cjs.entry.js +5 -5
- package/dist/cjs/bcm-range.cjs.entry.js +5 -5
- package/dist/cjs/bcm-search.cjs.entry.js +5 -5
- package/dist/cjs/bcm-select.cjs.entry.js +2 -2
- package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bcm-step.cjs.entry.js +2 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
- package/dist/cjs/bcm-tab-group.cjs.entry.js +6 -6
- package/dist/cjs/bcm-tag.cjs.entry.js +14 -14
- package/dist/cjs/bcm-textarea.cjs.entry.js +6 -6
- package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{floating-ui-dae608ba.js → floating-ui-2a4a79ff.js} +4 -3
- package/dist/cjs/{generate-e91273b0.js → generate-0d51cba6.js} +14 -14
- package/dist/cjs/{input-template-8d591f62.js → input-template-d7f600a5.js} +6 -6
- package/dist/cjs/{label-template-38d5c382.js → label-template-e56264b3.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-54c0c852.js → number-helper-1d113d3e.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +6 -6
- package/dist/cjs/old-bcm-popover.cjs.entry.js +4 -4
- package/dist/cjs/{popover-placement-87901bb3.js → popover-placement-ac98d407.js} +1 -1
- package/dist/cjs/{slot-template-84d37599.js → slot-template-a4505c70.js} +1 -1
- package/dist/cjs/{stepper-states-b5763eec.js → stepper-states-f66c2ae8.js} +1 -1
- package/dist/cjs/{string-helper-df40a475.js → string-helper-145cd64f.js} +2 -2
- package/dist/cjs/{tooltip-helper-932f081b.js → tooltip-helper-eff66c97.js} +37 -5
- package/dist/cjs/{validators-40884433.js → validators-424a487a.js} +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.js +27 -214
- package/dist/collection/components/molecules/linked/linked.js +39 -6
- package/dist/collection/components/molecules/menu/menu.js +7 -183
- package/dist/collection/utils/floating-ui.js +2 -1
- package/dist/components/bcm-dropdown.js +29 -164
- package/dist/components/bcm-linked.js +1 -194
- package/dist/components/floating-ui.js +2 -1
- package/dist/components/generate.js +1 -1
- package/dist/{esm/bcm-linked.entry.js → components/linked.js} +58 -22
- package/dist/components/menu.js +9 -122
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +1 -1
- package/dist/esm/bcm-avatar_15.entry.js +1936 -0
- package/dist/esm/bcm-b8d8a236.js +1 -1
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +2 -2
- package/dist/esm/bcm-card.entry.js +1 -1
- package/dist/esm/bcm-checkbox-group.entry.js +2 -2
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/bcm-checkbox_2.entry.js +2 -2
- package/dist/esm/bcm-chip.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-datetime-picker.entry.js +2 -2
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +4 -4
- package/dist/esm/bcm-expansion-panel.entry.js +1 -1
- package/dist/esm/bcm-form-2.entry.js +2 -2
- package/dist/esm/bcm-input.entry.js +5 -5
- package/dist/esm/bcm-link.entry.js +1 -1
- package/dist/esm/bcm-list.entry.js +6 -7
- package/dist/esm/{bcm-label_2.entry.js → bcm-modal.entry.js} +100 -79
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +2 -2
- package/dist/esm/bcm-progress.entry.js +2 -2
- package/dist/esm/bcm-radio-group.entry.js +2 -2
- package/dist/esm/bcm-radio.entry.js +2 -2
- package/dist/esm/bcm-range.entry.js +2 -2
- package/dist/esm/bcm-search.entry.js +3 -3
- package/dist/esm/bcm-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +3 -3
- package/dist/esm/bcm-tab-group.entry.js +2 -2
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{floating-ui-f03a96ce.js → floating-ui-700d0b98.js} +3 -2
- package/dist/esm/{generate-ba9e1f0b.js → generate-30f32431.js} +14 -14
- package/dist/esm/{input-template-569671e3.js → input-template-0131cb6b.js} +2 -2
- package/dist/esm/label-template-f352ef5b.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-4313dc1c.js → number-helper-49efb3a0.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +3 -3
- package/dist/esm/old-bcm-popover.entry.js +2 -2
- package/dist/esm/{stepper-states-13781383.js → stepper-states-204a065e.js} +1 -1
- package/dist/esm/string-helper-74a1648f.js +1 -1
- package/dist/esm/{tooltip-helper-8c88ed15.js → tooltip-helper-968148fa.js} +36 -5
- package/dist/esm/{validators-66dd02d3.js → validators-e1c02a1a.js} +1 -1
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +2 -15
- package/dist/types/components/molecules/linked/linked.d.ts +3 -1
- package/dist/types/components/molecules/menu/menu.d.ts +1 -13
- package/dist/types/components.d.ts +12 -13
- package/package.json +1 -1
- package/dist/bromcom-ui/assets +0 -0
- package/dist/bromcom-ui/p-037531dd.entry.js +0 -5
- package/dist/bromcom-ui/p-095d05df.entry.js +0 -5
- package/dist/bromcom-ui/p-1ae166db.entry.js +0 -5
- package/dist/bromcom-ui/p-331ee3a4.js +0 -5
- package/dist/bromcom-ui/p-44991f28.js +0 -5
- package/dist/bromcom-ui/p-55b88051.entry.js +0 -5
- package/dist/bromcom-ui/p-5d8eb303.entry.js +0 -5
- package/dist/bromcom-ui/p-62ba8263.entry.js +0 -5
- package/dist/bromcom-ui/p-8fa9378f.entry.js +0 -5
- package/dist/bromcom-ui/p-9512271e.entry.js +0 -5
- package/dist/bromcom-ui/p-9c2800b0.entry.js +0 -5
- package/dist/bromcom-ui/p-b4c617f6.entry.js +0 -5
- package/dist/bromcom-ui/p-b639def6.js +0 -5
- package/dist/bromcom-ui/p-ba65d1dc.entry.js +0 -5
- package/dist/bromcom-ui/p-c5c9e76f.entry.js +0 -5
- package/dist/bromcom-ui/p-e83e3eae.entry.js +0 -5
- package/dist/bromcom-ui/p-fc1ef08f.entry.js +0 -5
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -165
- package/dist/cjs/bcm-button_3.cjs.entry.js +0 -539
- package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -245
- package/dist/cjs/bcm-form.cjs.entry.js +0 -487
- package/dist/cjs/bcm-item.cjs.entry.js +0 -84
- package/dist/cjs/bcm-items.cjs.entry.js +0 -61
- package/dist/cjs/bcm-linked.cjs.entry.js +0 -181
- package/dist/cjs/bcm-menu.cjs.entry.js +0 -246
- package/dist/cjs/bcm-popover.cjs.entry.js +0 -183
- package/dist/cjs/bcm-switch.cjs.entry.js +0 -149
- package/dist/cjs/bcm-text.cjs.entry.js +0 -62
- package/dist/cjs/json-parse-decarator-f014cca6.js +0 -40
- package/dist/collection/assets +0 -0
- package/dist/esm/bcm-avatar_2.entry.js +0 -160
- package/dist/esm/bcm-button_3.entry.js +0 -533
- package/dist/esm/bcm-dropdown.entry.js +0 -241
- package/dist/esm/bcm-form.entry.js +0 -483
- package/dist/esm/bcm-item.entry.js +0 -80
- package/dist/esm/bcm-items.entry.js +0 -57
- package/dist/esm/bcm-menu.entry.js +0 -242
- package/dist/esm/bcm-popover.entry.js +0 -179
- package/dist/esm/bcm-switch.entry.js +0 -145
- package/dist/esm/bcm-text.entry.js +0 -58
- package/dist/esm/json-parse-decarator-ae9a53d6.js +0 -38
|
@@ -35,14 +35,13 @@ export class BcmDropdown {
|
|
|
35
35
|
this.noStyle = false;
|
|
36
36
|
this.dropdownIcon = 'fas fa-angle-down';
|
|
37
37
|
this.linkedComponent = undefined;
|
|
38
|
-
this.multiLevel = false;
|
|
39
38
|
this.loading = false;
|
|
40
39
|
this.variant = undefined;
|
|
41
40
|
this.dataDismiss = false;
|
|
42
41
|
this.fullWidth = false;
|
|
43
42
|
this.iconPosition = Bcm.IconPosition.prefix;
|
|
44
43
|
this.placement = undefined;
|
|
45
|
-
this.height =
|
|
44
|
+
this.height = undefined;
|
|
46
45
|
this.maxHeight = '500px';
|
|
47
46
|
this.minHeight = '50px';
|
|
48
47
|
this.stopDeepClean = false;
|
|
@@ -55,156 +54,25 @@ export class BcmDropdown {
|
|
|
55
54
|
this.data = newValue;
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
|
-
async
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// if (this.isOpen) {
|
|
65
|
-
// document.body.classList.add(disableScrollClass);
|
|
66
|
-
// } else {
|
|
67
|
-
// document.body.classList.remove(disableScrollClass);
|
|
68
|
-
// }
|
|
69
|
-
}
|
|
70
|
-
handleIsClickDismiss({ detail }) {
|
|
71
|
-
if (this.multiLevel) {
|
|
72
|
-
this.isOpen = detail;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
handleOnClick(event) {
|
|
76
|
-
if (this.linkedComponent)
|
|
77
|
-
return this.linkedComponentClick(event);
|
|
78
|
-
if (this.isOpen) {
|
|
79
|
-
const targetElement = this.linkedComponent ? document.getElementById(this.linkedComponent) : this.el;
|
|
80
|
-
const box = this.getPopoverBox();
|
|
81
|
-
if (box) {
|
|
82
|
-
const isClickBox = Generate.findEventPath(event, box);
|
|
83
|
-
const isClickThis = Generate.findEventPath(event, targetElement);
|
|
84
|
-
if (!isClickBox && !isClickThis) {
|
|
85
|
-
this.isOpen = false;
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
const isClickDismiss = Generate.findEventPathHasAttribute(event, 'data-dismiss');
|
|
89
|
-
if (isClickDismiss) {
|
|
90
|
-
this.isOpen = false;
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
handleWheel(event) {
|
|
97
|
-
if (this.isOpen) {
|
|
98
|
-
const box = this.getPopoverBox();
|
|
99
|
-
if (box) {
|
|
100
|
-
const isClickBox = Generate.findEventPath(event, box);
|
|
101
|
-
const isClickThis = Generate.findEventPath(event, this.el);
|
|
102
|
-
if (!isClickBox && !isClickThis) {
|
|
103
|
-
this.isOpen = false;
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
async setActive(id) {
|
|
110
|
-
if (id) {
|
|
111
|
-
const menu = document.getElementById(`${this.menuId}`);
|
|
112
|
-
if (menu) {
|
|
113
|
-
menu.setActive(id);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
57
|
+
async setActive(id = null) {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
(_b = (_a = document
|
|
60
|
+
.getElementById(`${this.menuId}`)) === null || _a === void 0 ? void 0 : _a.querySelectorAll('bcm-menu')) === null || _b === void 0 ? void 0 : _b.forEach(item => {
|
|
61
|
+
item.setActive(id);
|
|
62
|
+
});
|
|
116
63
|
}
|
|
117
64
|
handleSlotItems({ detail }) {
|
|
118
65
|
this.data = detail;
|
|
119
66
|
}
|
|
120
|
-
// connectedCallback() {
|
|
121
|
-
// const disableScrollClass = `bcm-dropdown--disable-scroll-${this._id}`;
|
|
122
|
-
// const styleId = `bcm-dropdown-style-${this._id}`;
|
|
123
|
-
// let style = document.getElementById(styleId);
|
|
124
|
-
// if (!style) {
|
|
125
|
-
// style = document.createElement('style');
|
|
126
|
-
// style.id = styleId;
|
|
127
|
-
// style.innerHTML = `.${disableScrollClass} { overflow: hidden; }`;
|
|
128
|
-
// document.head.appendChild(style);
|
|
129
|
-
// }
|
|
130
|
-
// }
|
|
131
67
|
componentDidLoad() {
|
|
132
|
-
|
|
133
|
-
if (box) {
|
|
134
|
-
box.remove();
|
|
135
|
-
}
|
|
68
|
+
var _a;
|
|
136
69
|
const bcmContent = this.el.querySelector('bcm-content');
|
|
137
70
|
if (bcmContent) {
|
|
138
|
-
|
|
139
|
-
this.createBox();
|
|
140
|
-
this.isOpen = this.isOpen;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
disconnectedCallback() {
|
|
144
|
-
this.isOpen = false;
|
|
145
|
-
if (this.stopDeepClean)
|
|
146
|
-
return;
|
|
147
|
-
const box = this.getPopoverBox();
|
|
148
|
-
if (box) {
|
|
149
|
-
box.remove();
|
|
150
|
-
}
|
|
151
|
-
// const disableScrollClass = `bcm-dropdown--disable-scroll-${this._id}`;
|
|
152
|
-
// document.body.classList.remove(disableScrollClass);
|
|
153
|
-
}
|
|
154
|
-
createBox() {
|
|
155
|
-
const content = this.el.querySelector('bcm-content');
|
|
156
|
-
if (content) {
|
|
157
|
-
const targetElementId = this.linkedComponent ? this.linkedComponent : this._id;
|
|
158
|
-
let box = document.getElementById(`dropdown-box-${this._id}`);
|
|
159
|
-
if (!box) {
|
|
160
|
-
box = document.createElement('old-bcm-popover-box');
|
|
161
|
-
box.setAttribute('id', 'dropdown-box-' + this._id);
|
|
162
|
-
box.setAttribute('target-id', targetElementId);
|
|
163
|
-
box.setAttribute('placement', this.placement || 'bottom-start');
|
|
164
|
-
box.setAttribute('linked-component', targetElementId);
|
|
165
|
-
box.setAttribute('min-height', this.minHeight);
|
|
166
|
-
box.setAttribute('max-height', this.maxHeight);
|
|
167
|
-
box.setAttribute('height', this.height);
|
|
168
|
-
content.style.display = 'block';
|
|
169
|
-
content.removeAttribute('hidden');
|
|
170
|
-
box.appendChild(content);
|
|
171
|
-
document.body.appendChild(box);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
linkedComponentClick(event) {
|
|
176
|
-
const targetElement = document.getElementById(this.linkedComponent);
|
|
177
|
-
const box = document.querySelector(`bcm-popover-box[id="dropdown-box-${this._id}"]`);
|
|
178
|
-
const isClickBox = Generate.findEventPath(event, box);
|
|
179
|
-
const isClickThis = Generate.findEventPath(event, targetElement);
|
|
180
|
-
if (!isClickBox && !isClickThis) {
|
|
181
|
-
this.isOpen = false;
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
if (isClickBox || isClickThis) {
|
|
185
|
-
this.createBox();
|
|
186
|
-
this.isOpen = true;
|
|
187
|
-
this.dropdownLinkedComponent.emit(true);
|
|
188
|
-
}
|
|
189
|
-
const isClickDismiss = Generate.findEventPathHasAttribute(event, 'data-dismiss');
|
|
190
|
-
if (isClickDismiss) {
|
|
191
|
-
this.isOpen = false;
|
|
192
|
-
this.dropdownLinkedComponent.emit(false);
|
|
193
|
-
return;
|
|
71
|
+
(_a = document.getElementById(this.menuId)) === null || _a === void 0 ? void 0 : _a.appendChild(bcmContent);
|
|
194
72
|
}
|
|
195
73
|
}
|
|
196
|
-
checkClick() {
|
|
197
|
-
if (this.getPopoverBox()) {
|
|
198
|
-
this.isOpen = !this.isOpen;
|
|
199
|
-
this.isOpen ? this.getPopoverBox().show() : this.getPopoverBox().hide();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
getPopoverBox() {
|
|
203
|
-
this.createBox();
|
|
204
|
-
return document.querySelector(`old-bcm-popover-box[id="dropdown-box-${this._id}"]`);
|
|
205
|
-
}
|
|
206
74
|
render() {
|
|
207
|
-
const { size, kind, disabled, icon, color, href, target, loading, type, variant, fullWidth } = this;
|
|
75
|
+
const { size, kind, disabled, icon, color, href, target, loading, type, variant, fullWidth, isOpen } = this;
|
|
208
76
|
const hostClasses = cs('bcm-dropdown', 'bcm-dropdown__type-' + type, {
|
|
209
77
|
'full-width': fullWidth,
|
|
210
78
|
'no-style': this.noStyle,
|
|
@@ -212,10 +80,10 @@ export class BcmDropdown {
|
|
|
212
80
|
});
|
|
213
81
|
const attributes = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (disabled && { disabled })), (loading && { loading })), (kind && { kind })), (size && { size })), (variant && { variant })), (color && { color })), (this.menuId && { 'menu-id': this.menuId }));
|
|
214
82
|
const iconClasses = cs('bcm-dropdown__icon', {
|
|
215
|
-
'bcm-dropdown__icon--open':
|
|
83
|
+
'bcm-dropdown__icon--open': isOpen,
|
|
216
84
|
});
|
|
217
85
|
const dropdownIcon = (h("span", { class: iconClasses }, h("bcm-icon", { icon: this.dropdownIcon })));
|
|
218
|
-
return (h(Host, { class: hostClasses
|
|
86
|
+
return (h(Host, { class: hostClasses }, h("span", { hidden: true }, h("slot", null)), this.noStyle && h("slot", null), !this.noStyle && (h("bcm-button", Object.assign({ class: "main-button", id: `${this._id}-button` }, attributes, (icon && { icon }), (href && type === 'split' && { href }), (target && type === 'split' && { target }), (fullWidth && { fullWidth })), h("slot", null), type === 'dropdown' && dropdownIcon)), !this.noStyle && type === 'split' && (h("bcm-button", Object.assign({ id: `${this._id}-button-split`, class: "split-button" }, attributes), dropdownIcon)), h("bcm-linked", { id: `${this.menuId}`, "target-id": `${this._id}-button${type === 'split' ? '-split' : ''}`, placement: this.placement || (type === 'dropdown' ? 'bottom-start' : 'bottom-end'), "max-height": this.maxHeight, "min-height": this.minHeight, height: this.height, "on-bcm-open": e => { var _a; return ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.id) == this.menuId && (this.isOpen = e.detail); } }, this.data && this.data.length > 0 && h("bcm-menu", { data: this.data, selectable: this.selectable, "on-bcm-click": e => this.bcmClick.emit(e.detail) }))));
|
|
219
87
|
}
|
|
220
88
|
static get is() { return "bcm-dropdown"; }
|
|
221
89
|
static get originalStyleUrls() {
|
|
@@ -504,27 +372,9 @@ export class BcmDropdown {
|
|
|
504
372
|
"attribute": "linked-component",
|
|
505
373
|
"reflect": false
|
|
506
374
|
},
|
|
507
|
-
"multiLevel": {
|
|
508
|
-
"type": "boolean",
|
|
509
|
-
"mutable": true,
|
|
510
|
-
"complexType": {
|
|
511
|
-
"original": "boolean",
|
|
512
|
-
"resolved": "boolean",
|
|
513
|
-
"references": {}
|
|
514
|
-
},
|
|
515
|
-
"required": false,
|
|
516
|
-
"optional": false,
|
|
517
|
-
"docs": {
|
|
518
|
-
"tags": [],
|
|
519
|
-
"text": ""
|
|
520
|
-
},
|
|
521
|
-
"attribute": "multi-level",
|
|
522
|
-
"reflect": false,
|
|
523
|
-
"defaultValue": "false"
|
|
524
|
-
},
|
|
525
375
|
"loading": {
|
|
526
376
|
"type": "boolean",
|
|
527
|
-
"mutable":
|
|
377
|
+
"mutable": false,
|
|
528
378
|
"complexType": {
|
|
529
379
|
"original": "boolean",
|
|
530
380
|
"resolved": "boolean",
|
|
@@ -542,7 +392,7 @@ export class BcmDropdown {
|
|
|
542
392
|
},
|
|
543
393
|
"variant": {
|
|
544
394
|
"type": "string",
|
|
545
|
-
"mutable":
|
|
395
|
+
"mutable": false,
|
|
546
396
|
"complexType": {
|
|
547
397
|
"original": "VariantProp",
|
|
548
398
|
"resolved": "\"filter\" | \"remove\" | \"close\" | \"reset\" | \"submit\" | \"apply\" | \"download\" | \"save\" | \"ok\" | \"new\" | \"add\" | \"create\" | \"prev\" | \"next\" | \"send\" | \"delete\" | \"cancel\" | \"decline\" | \"archive\" | \"edit\" | \"export\" | \"import\" | \"update\"",
|
|
@@ -564,7 +414,7 @@ export class BcmDropdown {
|
|
|
564
414
|
},
|
|
565
415
|
"dataDismiss": {
|
|
566
416
|
"type": "boolean",
|
|
567
|
-
"mutable":
|
|
417
|
+
"mutable": false,
|
|
568
418
|
"complexType": {
|
|
569
419
|
"original": "boolean",
|
|
570
420
|
"resolved": "boolean",
|
|
@@ -582,7 +432,7 @@ export class BcmDropdown {
|
|
|
582
432
|
},
|
|
583
433
|
"fullWidth": {
|
|
584
434
|
"type": "boolean",
|
|
585
|
-
"mutable":
|
|
435
|
+
"mutable": false,
|
|
586
436
|
"complexType": {
|
|
587
437
|
"original": "boolean",
|
|
588
438
|
"resolved": "boolean",
|
|
@@ -600,7 +450,7 @@ export class BcmDropdown {
|
|
|
600
450
|
},
|
|
601
451
|
"iconPosition": {
|
|
602
452
|
"type": "string",
|
|
603
|
-
"mutable":
|
|
453
|
+
"mutable": false,
|
|
604
454
|
"complexType": {
|
|
605
455
|
"original": "IconPositionTypes",
|
|
606
456
|
"resolved": "\"prefix\" | \"suffix\"",
|
|
@@ -623,7 +473,7 @@ export class BcmDropdown {
|
|
|
623
473
|
},
|
|
624
474
|
"placement": {
|
|
625
475
|
"type": "string",
|
|
626
|
-
"mutable":
|
|
476
|
+
"mutable": false,
|
|
627
477
|
"complexType": {
|
|
628
478
|
"original": "PlacementTypes",
|
|
629
479
|
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
@@ -644,11 +494,11 @@ export class BcmDropdown {
|
|
|
644
494
|
"reflect": false
|
|
645
495
|
},
|
|
646
496
|
"height": {
|
|
647
|
-
"type": "
|
|
648
|
-
"mutable":
|
|
497
|
+
"type": "any",
|
|
498
|
+
"mutable": false,
|
|
649
499
|
"complexType": {
|
|
650
|
-
"original": "
|
|
651
|
-
"resolved": "
|
|
500
|
+
"original": "any",
|
|
501
|
+
"resolved": "any",
|
|
652
502
|
"references": {}
|
|
653
503
|
},
|
|
654
504
|
"required": false,
|
|
@@ -658,12 +508,11 @@ export class BcmDropdown {
|
|
|
658
508
|
"text": ""
|
|
659
509
|
},
|
|
660
510
|
"attribute": "height",
|
|
661
|
-
"reflect": false
|
|
662
|
-
"defaultValue": "'auto'"
|
|
511
|
+
"reflect": false
|
|
663
512
|
},
|
|
664
513
|
"maxHeight": {
|
|
665
514
|
"type": "string",
|
|
666
|
-
"mutable":
|
|
515
|
+
"mutable": false,
|
|
667
516
|
"complexType": {
|
|
668
517
|
"original": "string",
|
|
669
518
|
"resolved": "string",
|
|
@@ -681,7 +530,7 @@ export class BcmDropdown {
|
|
|
681
530
|
},
|
|
682
531
|
"minHeight": {
|
|
683
532
|
"type": "string",
|
|
684
|
-
"mutable":
|
|
533
|
+
"mutable": false,
|
|
685
534
|
"complexType": {
|
|
686
535
|
"original": "string",
|
|
687
536
|
"resolved": "string",
|
|
@@ -735,7 +584,7 @@ export class BcmDropdown {
|
|
|
735
584
|
},
|
|
736
585
|
"color": {
|
|
737
586
|
"type": "any",
|
|
738
|
-
"mutable":
|
|
587
|
+
"mutable": false,
|
|
739
588
|
"complexType": {
|
|
740
589
|
"original": "any",
|
|
741
590
|
"resolved": "any",
|
|
@@ -786,28 +635,13 @@ export class BcmDropdown {
|
|
|
786
635
|
"resolved": "any",
|
|
787
636
|
"references": {}
|
|
788
637
|
}
|
|
789
|
-
}, {
|
|
790
|
-
"method": "dropdownLinkedComponent",
|
|
791
|
-
"name": "dropdown-linked-component",
|
|
792
|
-
"bubbles": true,
|
|
793
|
-
"cancelable": true,
|
|
794
|
-
"composed": true,
|
|
795
|
-
"docs": {
|
|
796
|
-
"tags": [],
|
|
797
|
-
"text": ""
|
|
798
|
-
},
|
|
799
|
-
"complexType": {
|
|
800
|
-
"original": "any",
|
|
801
|
-
"resolved": "any",
|
|
802
|
-
"references": {}
|
|
803
|
-
}
|
|
804
638
|
}];
|
|
805
639
|
}
|
|
806
640
|
static get methods() {
|
|
807
641
|
return {
|
|
808
642
|
"setActive": {
|
|
809
643
|
"complexType": {
|
|
810
|
-
"signature": "(id
|
|
644
|
+
"signature": "(id?: any) => Promise<void>",
|
|
811
645
|
"parameters": [{
|
|
812
646
|
"tags": [],
|
|
813
647
|
"text": ""
|
|
@@ -831,31 +665,10 @@ export class BcmDropdown {
|
|
|
831
665
|
return [{
|
|
832
666
|
"propName": "data",
|
|
833
667
|
"methodName": "dataChanged"
|
|
834
|
-
}, {
|
|
835
|
-
"propName": "isOpen",
|
|
836
|
-
"methodName": "isOpenChanged"
|
|
837
668
|
}];
|
|
838
669
|
}
|
|
839
670
|
static get listeners() {
|
|
840
671
|
return [{
|
|
841
|
-
"name": "dropdown-linked-component",
|
|
842
|
-
"method": "handleIsClickDismiss",
|
|
843
|
-
"target": "window",
|
|
844
|
-
"capture": false,
|
|
845
|
-
"passive": false
|
|
846
|
-
}, {
|
|
847
|
-
"name": "click",
|
|
848
|
-
"method": "handleOnClick",
|
|
849
|
-
"target": "window",
|
|
850
|
-
"capture": false,
|
|
851
|
-
"passive": false
|
|
852
|
-
}, {
|
|
853
|
-
"name": "wheel",
|
|
854
|
-
"method": "handleWheel",
|
|
855
|
-
"target": "document",
|
|
856
|
-
"capture": false,
|
|
857
|
-
"passive": false
|
|
858
|
-
}, {
|
|
859
672
|
"name": "bcm-items",
|
|
860
673
|
"method": "handleSlotItems",
|
|
861
674
|
"target": undefined,
|
|
@@ -93,6 +93,7 @@ export class BcmLinked {
|
|
|
93
93
|
document.body.appendChild(this.el);
|
|
94
94
|
}
|
|
95
95
|
onLinkedDataDismis() {
|
|
96
|
+
// console.log('onLinkedDataDismis');
|
|
96
97
|
this.hide(false);
|
|
97
98
|
}
|
|
98
99
|
onBcmFloatingIsHide(e) {
|
|
@@ -131,10 +132,15 @@ export class BcmLinked {
|
|
|
131
132
|
if (!this.target())
|
|
132
133
|
return;
|
|
133
134
|
const isTarget = Generate.findEventPath(e, this.target());
|
|
135
|
+
const isSelf = Generate.findEventPath(e, this.el);
|
|
136
|
+
const isLinked = Generate.findEventPathWithNodeName(e, 'BCM-LINKED');
|
|
137
|
+
if (!isTarget && !isSelf && !isLinked) {
|
|
138
|
+
this.isOpen = false;
|
|
139
|
+
this.bcmOpen.emit(this.isOpen);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
134
142
|
if (this.isOpen) {
|
|
135
143
|
isTarget && this.hide(false);
|
|
136
|
-
const isSelf = Generate.findEventPath(e, this.el);
|
|
137
|
-
const isLinked = Generate.findEventPathWithNodeName(e, 'BCM-LINKED');
|
|
138
144
|
isSelf && this.checkDataDismiss(e);
|
|
139
145
|
if (this.el.getAttribute('main-linked') === 'true' && !isTarget && !isSelf && !isLinked) {
|
|
140
146
|
this.dismissEvent();
|
|
@@ -153,6 +159,9 @@ export class BcmLinked {
|
|
|
153
159
|
wheelListener() {
|
|
154
160
|
this.calculatePosition();
|
|
155
161
|
}
|
|
162
|
+
watchIsOpen() {
|
|
163
|
+
this.bcmOpen.emit(this.isOpen);
|
|
164
|
+
}
|
|
156
165
|
render() {
|
|
157
166
|
const openStyle = this.isOpen ? { visibility: 'visible', opacity: '1' } : { visibility: 'hidden', opacity: '0' };
|
|
158
167
|
return (h(Host, { class: "tw-block tw-opacity-0 tw-invisible tw-top-0 tw-left-0 tw-rounded tw-bg-white tw-z-tooltip tw-transition-opacity tw-duration-100 tw-shadow tw-overscroll-contain tw-scroll-smooth tw-absolute", style: Object.assign(Object.assign({}, openStyle), { overflow: 'auto' }) }, h("slot", null)));
|
|
@@ -250,7 +259,7 @@ export class BcmLinked {
|
|
|
250
259
|
"resolved": "string",
|
|
251
260
|
"references": {}
|
|
252
261
|
},
|
|
253
|
-
"required":
|
|
262
|
+
"required": false,
|
|
254
263
|
"optional": false,
|
|
255
264
|
"docs": {
|
|
256
265
|
"tags": [],
|
|
@@ -267,7 +276,7 @@ export class BcmLinked {
|
|
|
267
276
|
"resolved": "string",
|
|
268
277
|
"references": {}
|
|
269
278
|
},
|
|
270
|
-
"required":
|
|
279
|
+
"required": false,
|
|
271
280
|
"optional": false,
|
|
272
281
|
"docs": {
|
|
273
282
|
"tags": [],
|
|
@@ -314,6 +323,24 @@ export class BcmLinked {
|
|
|
314
323
|
}
|
|
315
324
|
};
|
|
316
325
|
}
|
|
326
|
+
static get events() {
|
|
327
|
+
return [{
|
|
328
|
+
"method": "bcmOpen",
|
|
329
|
+
"name": "bcm-open",
|
|
330
|
+
"bubbles": true,
|
|
331
|
+
"cancelable": true,
|
|
332
|
+
"composed": true,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": ""
|
|
336
|
+
},
|
|
337
|
+
"complexType": {
|
|
338
|
+
"original": "any",
|
|
339
|
+
"resolved": "any",
|
|
340
|
+
"references": {}
|
|
341
|
+
}
|
|
342
|
+
}];
|
|
343
|
+
}
|
|
317
344
|
static get methods() {
|
|
318
345
|
return {
|
|
319
346
|
"show": {
|
|
@@ -376,6 +403,12 @@ export class BcmLinked {
|
|
|
376
403
|
};
|
|
377
404
|
}
|
|
378
405
|
static get elementRef() { return "el"; }
|
|
406
|
+
static get watchers() {
|
|
407
|
+
return [{
|
|
408
|
+
"propName": "isOpen",
|
|
409
|
+
"methodName": "watchIsOpen"
|
|
410
|
+
}];
|
|
411
|
+
}
|
|
379
412
|
static get listeners() {
|
|
380
413
|
return [{
|
|
381
414
|
"name": "linked-data-dismiss",
|
|
@@ -392,8 +425,8 @@ export class BcmLinked {
|
|
|
392
425
|
}, {
|
|
393
426
|
"name": "click",
|
|
394
427
|
"method": "clickListener",
|
|
395
|
-
"target": "
|
|
396
|
-
"capture":
|
|
428
|
+
"target": "document",
|
|
429
|
+
"capture": true,
|
|
397
430
|
"passive": false
|
|
398
431
|
}, {
|
|
399
432
|
"name": "resize",
|