bromcom-ui 2.4.33 → 2.4.36
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-20d1fe2f.js +1 -0
- package/dist/bromcom-ui/{p-e62a5e66.entry.js → p-3c80b3d1.entry.js} +1 -1
- package/dist/bromcom-ui/p-4692fcb5.entry.js +1 -0
- package/dist/bromcom-ui/p-86e8b9f9.js +1 -0
- package/dist/bromcom-ui/p-aa697b33.entry.js +1 -0
- package/dist/bromcom-ui/{p-68d9dd67.js → p-aec76b3f.js} +1 -1
- package/dist/bromcom-ui/p-bd5c8891.entry.js +1 -0
- package/dist/bromcom-ui/{p-3ed8c65b.entry.js → p-c932bf84.entry.js} +1 -1
- package/dist/bromcom-ui/p-dca52f7c.entry.js +1 -0
- package/dist/bromcom-ui/p-e1aca7d8.js +1 -0
- package/dist/bromcom-ui/p-f3f44735.entry.js +1 -0
- package/dist/cjs/{bcm-button_12.cjs.entry.js → bcm-button_16.cjs.entry.js} +359 -23
- package/dist/cjs/bcm-icon-2_2.cjs.entry.js +5 -6
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +10 -2
- package/dist/cjs/bcm-select-box.cjs.entry.js +38 -0
- package/dist/cjs/bcm-select.cjs.entry.js +6 -1
- package/dist/cjs/bcm-stepper.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tag-2.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{generate-84dce6ea.js → generate-fd0d9bf7.js} +1 -1
- package/dist/cjs/{json-parse-decarator-89653e78.js → json-parse-decarator-c4de75ac.js} +15 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{color-helper-04636625.js → property-decorators-c405d518.js} +35 -0
- package/dist/cjs/{stepper-states-c11f78f7.js → stepper-states-f72dd3a0.js} +1 -1
- package/dist/collection/components/atoms/text/text.js +21 -1
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +1 -1
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +28 -0
- package/dist/collection/components/molecules/popover/popover-box.css +1 -1
- package/dist/collection/components/molecules/select/select.js +6 -1
- package/dist/collection/components/molecules/tooltip/tooltip-box.css +1 -1
- package/dist/collection/components/organism/list/list.js +13 -13
- package/dist/collection/decorators/json-parse-decarator.js +15 -2
- package/dist/esm/{bcm-button_12.entry.js → bcm-button_16.entry.js} +353 -21
- package/dist/esm/bcm-icon-2_2.entry.js +3 -4
- package/dist/esm/bcm-popconfirm-box.entry.js +10 -2
- package/dist/esm/bcm-select-box.entry.js +34 -0
- package/dist/esm/bcm-select.entry.js +6 -1
- package/dist/esm/bcm-stepper.entry.js +3 -3
- package/dist/esm/bcm-tag-2.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{generate-5aa9d89a.js → generate-ab40fc9f.js} +1 -1
- package/dist/esm/json-parse-decarator-c6372800.js +34 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{color-helper-ff728802.js → property-decorators-d09918fe.js} +35 -1
- package/dist/esm/{stepper-states-525936b7.js → stepper-states-6e6fed70.js} +1 -1
- package/dist/types/components/atoms/text/text.d.ts +3 -1
- package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +2 -0
- package/dist/types/components/organism/list/list.d.ts +0 -2
- package/dist/types/components.d.ts +3 -0
- package/dist/types/decorators/json-parse-decarator.d.ts +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-052ac20b.entry.js +0 -1
- package/dist/bromcom-ui/p-072c24b5.js +0 -1
- package/dist/bromcom-ui/p-40b3e4b9.js +0 -1
- package/dist/bromcom-ui/p-43a2dc90.js +0 -1
- package/dist/bromcom-ui/p-61385f1e.entry.js +0 -1
- package/dist/bromcom-ui/p-9330c810.entry.js +0 -1
- package/dist/bromcom-ui/p-a6b11a46.entry.js +0 -1
- package/dist/bromcom-ui/p-a8800df8.entry.js +0 -1
- package/dist/bromcom-ui/p-c7a6f7d8.js +0 -1
- package/dist/bromcom-ui/p-d1dc11c5.entry.js +0 -1
- package/dist/bromcom-ui/p-d3c5255a.entry.js +0 -1
- package/dist/bromcom-ui/p-d665b89d.entry.js +0 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +0 -98
- package/dist/cjs/bcm-popover-box.cjs.entry.js +0 -78
- package/dist/cjs/bcm-popover.cjs.entry.js +0 -95
- package/dist/cjs/bcm-select-box_2.cjs.entry.js +0 -138
- package/dist/cjs/property-decorators-476df1c5.js +0 -38
- package/dist/esm/bcm-popconfirm.entry.js +0 -94
- package/dist/esm/bcm-popover-box.entry.js +0 -74
- package/dist/esm/bcm-popover.entry.js +0 -91
- package/dist/esm/bcm-select-box_2.entry.js +0 -133
- package/dist/esm/json-parse-decarator-8563927a.js +0 -21
- package/dist/esm/property-decorators-681ae42e.js +0 -36
|
@@ -2,6 +2,7 @@ import { Component, h, Host, Prop } from '@stencil/core';
|
|
|
2
2
|
import cs from 'classnames';
|
|
3
3
|
import { ColorHelper } from '../../../helper/color-helper';
|
|
4
4
|
import Bcm from '../../../models/bcm';
|
|
5
|
+
import { SlotTemplate } from '../../../templates/slot-template';
|
|
5
6
|
export class BcmText {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.hidden = false;
|
|
@@ -16,8 +17,10 @@ export class BcmText {
|
|
|
16
17
|
});
|
|
17
18
|
const classes = cs('bcm-text__paragraph', `weight-${weight}`, scale);
|
|
18
19
|
return (h(Host, { class: hostClasses },
|
|
20
|
+
h("span", { hidden: true },
|
|
21
|
+
h("slot", null)),
|
|
19
22
|
h("p", { class: classes, style: { color: ColorHelper.convertColorToHex(color) } },
|
|
20
|
-
h(
|
|
23
|
+
h(SlotTemplate, { value: this.text }))));
|
|
21
24
|
}
|
|
22
25
|
static get is() { return "bcm-text"; }
|
|
23
26
|
static get originalStyleUrls() { return {
|
|
@@ -113,6 +116,23 @@ export class BcmText {
|
|
|
113
116
|
"attribute": "color",
|
|
114
117
|
"reflect": false,
|
|
115
118
|
"defaultValue": "Bcm.ColorPalette['grey-10']"
|
|
119
|
+
},
|
|
120
|
+
"text": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"mutable": false,
|
|
123
|
+
"complexType": {
|
|
124
|
+
"original": "string",
|
|
125
|
+
"resolved": "string",
|
|
126
|
+
"references": {}
|
|
127
|
+
},
|
|
128
|
+
"required": false,
|
|
129
|
+
"optional": false,
|
|
130
|
+
"docs": {
|
|
131
|
+
"tags": [],
|
|
132
|
+
"text": ""
|
|
133
|
+
},
|
|
134
|
+
"attribute": "text",
|
|
135
|
+
"reflect": false
|
|
116
136
|
}
|
|
117
137
|
}; }
|
|
118
138
|
}
|
|
@@ -18514,7 +18514,7 @@
|
|
|
18514
18514
|
box = box
|
|
18515
18515
|
after = arrow
|
|
18516
18516
|
*/
|
|
18517
|
-
position:
|
|
18517
|
+
position: fixed;
|
|
18518
18518
|
transition: transform 0.2s ease-in-out;
|
|
18519
18519
|
/*
|
|
18520
18520
|
PLACEMENTS
|
|
@@ -26,8 +26,15 @@ export class BcmPopconfirmBox {
|
|
|
26
26
|
this.getPopconfirm().hide();
|
|
27
27
|
this.hide();
|
|
28
28
|
}
|
|
29
|
+
showHandler(e) {
|
|
30
|
+
if (e.detail != this._target_id) {
|
|
31
|
+
this.getPopconfirm().hide();
|
|
32
|
+
this.hide();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
async show() {
|
|
30
36
|
this.open = true;
|
|
37
|
+
this.onShow.emit(this._target_id);
|
|
31
38
|
}
|
|
32
39
|
async hide() {
|
|
33
40
|
this.open = false;
|
|
@@ -300,6 +307,21 @@ export class BcmPopconfirmBox {
|
|
|
300
307
|
"resolved": "any",
|
|
301
308
|
"references": {}
|
|
302
309
|
}
|
|
310
|
+
}, {
|
|
311
|
+
"method": "onShow",
|
|
312
|
+
"name": "bcm-popconfirm-show",
|
|
313
|
+
"bubbles": true,
|
|
314
|
+
"cancelable": true,
|
|
315
|
+
"composed": true,
|
|
316
|
+
"docs": {
|
|
317
|
+
"tags": [],
|
|
318
|
+
"text": ""
|
|
319
|
+
},
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "any",
|
|
322
|
+
"resolved": "any",
|
|
323
|
+
"references": {}
|
|
324
|
+
}
|
|
303
325
|
}]; }
|
|
304
326
|
static get methods() { return {
|
|
305
327
|
"show": {
|
|
@@ -342,6 +364,12 @@ export class BcmPopconfirmBox {
|
|
|
342
364
|
"target": "window",
|
|
343
365
|
"capture": false,
|
|
344
366
|
"passive": false
|
|
367
|
+
}, {
|
|
368
|
+
"name": "bcm-popconfirm-show",
|
|
369
|
+
"method": "showHandler",
|
|
370
|
+
"target": "document",
|
|
371
|
+
"capture": false,
|
|
372
|
+
"passive": false
|
|
345
373
|
}, {
|
|
346
374
|
"name": "resize",
|
|
347
375
|
"method": "calculateLocation",
|
|
@@ -18514,7 +18514,7 @@
|
|
|
18514
18514
|
box = box
|
|
18515
18515
|
after = arrow
|
|
18516
18516
|
*/
|
|
18517
|
-
position:
|
|
18517
|
+
position: fixed;
|
|
18518
18518
|
transition: transform 0.2s ease-in-out;
|
|
18519
18519
|
/*
|
|
18520
18520
|
PLACEMENTS
|
|
@@ -447,7 +447,12 @@ export class BcmSelect {
|
|
|
447
447
|
this.change.emit(newVal);
|
|
448
448
|
}
|
|
449
449
|
else {
|
|
450
|
-
if (newVal[this.objectMapping['id']]
|
|
450
|
+
if (newVal && newVal[this.objectMapping['id']] && oldVal && oldVal[this.objectMapping['id']]) {
|
|
451
|
+
if (newVal[this.objectMapping['id']] != oldVal[this.objectMapping['id']]) {
|
|
452
|
+
this.change.emit(newVal);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
451
456
|
this.change.emit(newVal);
|
|
452
457
|
}
|
|
453
458
|
}
|
|
@@ -18516,7 +18516,7 @@
|
|
|
18516
18516
|
box = box
|
|
18517
18517
|
after = arrow
|
|
18518
18518
|
*/
|
|
18519
|
-
position:
|
|
18519
|
+
position: fixed;
|
|
18520
18520
|
transition: transform 0.2s ease-in-out;
|
|
18521
18521
|
/*
|
|
18522
18522
|
PLACEMENTS
|
|
@@ -67,8 +67,6 @@ export class BcmList {
|
|
|
67
67
|
this.searchFound = null;
|
|
68
68
|
this.returnFilterData = {};
|
|
69
69
|
this.returnOtherData = {};
|
|
70
|
-
this.isLoadingInput = true;
|
|
71
|
-
this.isLoadingList = true;
|
|
72
70
|
this.options = {
|
|
73
71
|
rootMargin: '30px'
|
|
74
72
|
};
|
|
@@ -191,7 +189,6 @@ export class BcmList {
|
|
|
191
189
|
}
|
|
192
190
|
}
|
|
193
191
|
handleResize() {
|
|
194
|
-
this.isLoadingInput = true;
|
|
195
192
|
this.calculateLocation();
|
|
196
193
|
this.debounceHandler();
|
|
197
194
|
}
|
|
@@ -396,7 +393,6 @@ export class BcmList {
|
|
|
396
393
|
return false;
|
|
397
394
|
}
|
|
398
395
|
async setClear(e) {
|
|
399
|
-
// this.isLoadingInput = true
|
|
400
396
|
listState.setClear(this._id);
|
|
401
397
|
this.value = null;
|
|
402
398
|
this.inputText = '';
|
|
@@ -434,9 +430,9 @@ export class BcmList {
|
|
|
434
430
|
this.selectAllItem = Object.assign(Object.assign({}, this.selectAllItem), { indeterminate: this.checkboxes && checkeds > 0 ? checkeds === total ? 'check' : 'indeterminate' : 'uncheck', checked: this.checkboxes && checkeds > 0 ? checkeds === total ? true : false : false });
|
|
435
431
|
}
|
|
436
432
|
listenResize() {
|
|
437
|
-
this.isLoadingInput = true;
|
|
438
433
|
this.tagControl();
|
|
439
434
|
this.calculateLocation();
|
|
435
|
+
this.markForCheck();
|
|
440
436
|
}
|
|
441
437
|
async unSelectOther() {
|
|
442
438
|
await this.onClearSearch();
|
|
@@ -478,7 +474,6 @@ export class BcmList {
|
|
|
478
474
|
}
|
|
479
475
|
async initState() {
|
|
480
476
|
var _a, _b, _c;
|
|
481
|
-
this.isLoadingInput = true;
|
|
482
477
|
await listState.setValue({
|
|
483
478
|
id: this._id,
|
|
484
479
|
dataSource: this.data && snq(() => typeof this.data == 'string' ? JSON.parse(this.data) : this.data, []),
|
|
@@ -490,12 +485,10 @@ export class BcmList {
|
|
|
490
485
|
this.value = this.checkboxes ? (await this.getCheckedList()).checkedList : listState.selectedItem(this._id) ? listState.selectedItem(this._id)[0] : null;
|
|
491
486
|
// value && value.length > 0 && (this.value = value)
|
|
492
487
|
if (this.checkboxes) {
|
|
493
|
-
await delay(100);
|
|
494
488
|
this.tagControl();
|
|
495
489
|
}
|
|
496
490
|
else {
|
|
497
491
|
this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
|
|
498
|
-
this.isLoadingInput = false;
|
|
499
492
|
}
|
|
500
493
|
const checkedIDs = [];
|
|
501
494
|
((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) > 0 && this.value.forEach(item => {
|
|
@@ -631,13 +624,19 @@ export class BcmList {
|
|
|
631
624
|
list.style.width = targetElement.offsetWidth + "px";
|
|
632
625
|
}
|
|
633
626
|
if (this.height.indexOf('%') > -1) {
|
|
634
|
-
list.style.height = NumberHelper.toNumber(this.height
|
|
627
|
+
list.style.height = NumberHelper.toNumber(this.height) * 0.01 * window.innerHeight - pos[0] - 50 + "px";
|
|
635
628
|
}
|
|
636
629
|
else {
|
|
637
630
|
list.style.height = this.height;
|
|
638
631
|
}
|
|
639
|
-
list.style.minHeight =
|
|
640
|
-
|
|
632
|
+
list.style.minHeight = this.minHeight;
|
|
633
|
+
const calculatedMaxHeight = window.innerHeight - pos[0] - 50;
|
|
634
|
+
if (this.maxHeight.indexOf('%') > -1) {
|
|
635
|
+
list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) * 0.01 * calculatedMaxHeight + "px";
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) < calculatedMaxHeight ? this.maxHeight : calculatedMaxHeight + "px";
|
|
639
|
+
}
|
|
641
640
|
}
|
|
642
641
|
}
|
|
643
642
|
}
|
|
@@ -1569,8 +1568,6 @@ export class BcmList {
|
|
|
1569
1568
|
"searchFound": {},
|
|
1570
1569
|
"returnFilterData": {},
|
|
1571
1570
|
"returnOtherData": {},
|
|
1572
|
-
"isLoadingInput": {},
|
|
1573
|
-
"isLoadingList": {},
|
|
1574
1571
|
"options": {},
|
|
1575
1572
|
"tagContainerWidth": {},
|
|
1576
1573
|
"selectAllItem": {}
|
|
@@ -1864,3 +1861,6 @@ export class BcmList {
|
|
|
1864
1861
|
__decorate([
|
|
1865
1862
|
JsonParse('data')
|
|
1866
1863
|
], BcmList.prototype, "data", void 0);
|
|
1864
|
+
__decorate([
|
|
1865
|
+
JsonParse('data', true)
|
|
1866
|
+
], BcmList.prototype, "dataChanged", null);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getElement } from "@stencil/core";
|
|
2
2
|
import snq from 'snq';
|
|
3
|
-
export function JsonParse(attribute) {
|
|
3
|
+
export function JsonParse(attribute, isMethod = false) {
|
|
4
4
|
return (proto, propName) => {
|
|
5
|
-
const { connectedCallback } = proto;
|
|
5
|
+
const { connectedCallback, componentWillRender } = proto;
|
|
6
6
|
proto.connectedCallback = function () {
|
|
7
7
|
const host = getElement(this);
|
|
8
8
|
if (host[propName]) {
|
|
@@ -14,5 +14,18 @@ export function JsonParse(attribute) {
|
|
|
14
14
|
}
|
|
15
15
|
return connectedCallback && connectedCallback.call(this);
|
|
16
16
|
};
|
|
17
|
+
proto.componentWillRender = async function () {
|
|
18
|
+
if (isMethod) {
|
|
19
|
+
const host = getElement(this);
|
|
20
|
+
if (isMethod) {
|
|
21
|
+
const value = snq(() => host.hasAttribute(attribute) ? host.getAttribute(attribute).valueOf() : host[attribute].valueOf(), null);
|
|
22
|
+
if (value && value.length > 0 && typeof value === 'string') {
|
|
23
|
+
this[attribute] = snq(() => JSON.parse(value), []);
|
|
24
|
+
}
|
|
25
|
+
host.removeAttribute(attribute);
|
|
26
|
+
}
|
|
27
|
+
return componentWillRender && componentWillRender.call(this);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
17
30
|
};
|
|
18
31
|
}
|