bromcom-ui 2.3.54 → 2.3.58
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 +0 -0
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/index.esm.js +0 -0
- package/dist/bromcom-ui/p-12493dbc.entry.js +1 -0
- package/dist/bromcom-ui/{p-a18a0cc4.entry.js → p-13d038f5.entry.js} +1 -1
- package/dist/bromcom-ui/p-1429a2b4.js +1 -0
- package/dist/bromcom-ui/{p-4b7f14ed.entry.js → p-20d03fa1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-774ff4d9.entry.js → p-30c1cd7f.entry.js} +1 -1
- package/dist/bromcom-ui/p-37750343.entry.js +1 -0
- package/dist/bromcom-ui/p-3f797656.entry.js +1 -0
- package/dist/bromcom-ui/{p-4396ee3b.entry.js → p-4092f5f1.entry.js} +1 -1
- package/dist/bromcom-ui/p-4a41ef80.entry.js +1 -0
- package/dist/bromcom-ui/p-4cb268d2.js +1 -0
- package/dist/bromcom-ui/p-53e9b679.entry.js +1 -0
- package/dist/bromcom-ui/{p-09753e05.js → p-554d326a.js} +1 -1
- package/dist/bromcom-ui/p-68ff64de.js +1 -0
- package/dist/bromcom-ui/p-7238d22f.entry.js +1 -0
- package/dist/bromcom-ui/p-7f1cd976.entry.js +1 -0
- package/dist/bromcom-ui/p-811c24d7.entry.js +1 -0
- package/dist/bromcom-ui/p-8851e01e.entry.js +1 -0
- package/dist/bromcom-ui/{p-1a2724a0.entry.js → p-92e3e240.entry.js} +1 -1
- package/dist/bromcom-ui/p-9ffff762.entry.js +1 -0
- package/dist/bromcom-ui/p-a6ef098a.entry.js +1 -0
- package/dist/bromcom-ui/p-af7e4741.entry.js +1 -0
- package/dist/bromcom-ui/{p-0d336381.entry.js → p-afb68492.entry.js} +1 -1
- package/dist/bromcom-ui/p-bbf99620.entry.js +1 -0
- package/dist/bromcom-ui/p-bc50aa86.entry.js +1 -0
- package/dist/bromcom-ui/p-e21a8f2d.entry.js +1 -0
- package/dist/bromcom-ui/p-e450ebda.entry.js +1 -0
- package/dist/bromcom-ui/p-e8307da9.entry.js +1 -0
- package/dist/bromcom-ui/{p-26b3d5d0.entry.js → p-e8771d32.entry.js} +1 -1
- package/dist/bromcom-ui/p-f067821e.entry.js +1 -0
- package/dist/bromcom-ui/p-f12743d8.entry.js +1 -0
- package/dist/bromcom-ui/p-ff5e57d3.entry.js +1 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +7 -26
- package/dist/cjs/bcm-badge.cjs.entry.js +50 -0
- package/dist/cjs/{bcm-badge_20.cjs.entry.js → bcm-button_11.cjs.entry.js} +1209 -2835
- package/dist/cjs/bcm-checkbox-lite_4.cjs.entry.js +291 -0
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +3 -3
- package/dist/cjs/{bcm-datetime-picker_2.cjs.entry.js → bcm-datetime-picker.cjs.entry.js} +3 -137
- package/dist/cjs/bcm-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/bcm-list-item_2.cjs.entry.js +197 -0
- package/dist/cjs/bcm-list-select.cjs.entry.js +658 -0
- package/dist/cjs/bcm-list.cjs.entry.js +1204 -0
- package/dist/cjs/{bcm-empty_6.cjs.entry.js → bcm-listbox_5.cjs.entry.js} +10 -77
- package/dist/cjs/bcm-modal.cjs.entry.js +197 -0
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popover-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +2 -2
- package/dist/cjs/bcm-pulldown-group_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-pulldown.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +124 -0
- package/dist/cjs/bcm-radio.cjs.entry.js +104 -0
- package/dist/cjs/bcm-select.cjs.entry.js +68 -8
- package/dist/cjs/bcm-tab-pane.cjs.entry.js +51 -0
- package/dist/cjs/bcm-tab.cjs.entry.js +72 -0
- package/dist/cjs/bcm-tabs-content.cjs.entry.js +43 -0
- package/dist/cjs/bcm-tabs.cjs.entry.js +361 -0
- package/dist/cjs/bcm-text.cjs.entry.js +28 -0
- package/dist/cjs/bcm-upload.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{element-dragger-36fcb296.js → element-dragger-4a91c708.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/types-37c8ced6.js +16 -0
- package/dist/cjs/types-f53bc841.js +19 -0
- package/dist/cjs/{utils-43fda566.js → utils-60414768.js} +25 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/label/label.css +70 -0
- package/dist/collection/components/atoms/label/label.js +203 -0
- package/dist/collection/components/molecules/checkbox/group.js +19 -6
- package/dist/collection/components/molecules/input/input.js +39 -7
- package/dist/collection/components/molecules/list/list-item.css +1 -0
- package/dist/collection/components/molecules/list/list-select.css +10 -5
- package/dist/collection/components/molecules/list/list-select.js +232 -34
- package/dist/collection/components/molecules/list/list.css +24 -2
- package/dist/collection/components/molecules/list/list.js +391 -119
- package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +1 -0
- package/dist/collection/components/molecules/popconfirm/popconfirm.css +1 -0
- package/dist/collection/components/molecules/popover/popover-box.css +1 -0
- package/dist/collection/components/molecules/popover/popover.css +1 -0
- package/dist/collection/components/molecules/radio/group.js +19 -6
- package/dist/collection/components/molecules/search/search.js +2 -2
- package/dist/collection/components/molecules/select/select.js +85 -12
- package/dist/collection/components/molecules/switch/switch.css +0 -1
- package/dist/collection/components/molecules/switch/switch.js +20 -7
- package/dist/collection/components/molecules/textarea/textarea.css +4 -1
- package/dist/collection/components/molecules/textarea/textarea.js +33 -17
- package/dist/collection/components/molecules/tooltip/tooltip-box.css +1 -0
- package/dist/collection/components/molecules/tooltip/tooltip.css +1 -0
- package/dist/collection/components/organism/colorpicker/colorpicker.js +19 -6
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +1 -1
- package/dist/collection/components/organism/form/form.js +5 -4
- package/dist/collection/components/organism/listbox/listbox.js +27 -17
- package/dist/collection/helper/color-helper.js +33 -0
- package/dist/collection/helper/generate.js +47 -0
- package/dist/collection/helper/number-helper.js +10 -0
- package/dist/collection/helper/string-helper.js +21 -0
- package/dist/collection/helper/validators.js +21 -0
- package/dist/collection/models/bcm-types.js +1 -0
- package/dist/collection/models/bcm.js +451 -0
- package/dist/collection/templates/caption-template.js +22 -0
- package/dist/collection/templates/label-template.js +16 -0
- package/dist/collection/templates/slot-template.js +6 -0
- package/dist/collection/utils/utils.js +24 -0
- package/dist/esm/bcm-alert.entry.js +1 -20
- package/dist/esm/bcm-badge.entry.js +46 -0
- package/dist/esm/{bcm-badge_20.entry.js → bcm-button_11.entry.js} +1204 -2821
- package/dist/esm/bcm-checkbox-lite_4.entry.js +284 -0
- package/dist/esm/bcm-colorpicker.entry.js +3 -3
- package/dist/esm/{bcm-datetime-picker_2.entry.js → bcm-datetime-picker.entry.js} +4 -137
- package/dist/esm/bcm-dropdown.entry.js +1 -1
- package/dist/esm/bcm-list-item_2.entry.js +192 -0
- package/dist/esm/bcm-list-select.entry.js +654 -0
- package/dist/esm/bcm-list.entry.js +1200 -0
- package/dist/esm/{bcm-empty_6.entry.js → bcm-listbox_5.entry.js} +12 -78
- package/dist/esm/bcm-modal.entry.js +193 -0
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +2 -2
- package/dist/esm/bcm-popover-box.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +2 -2
- package/dist/esm/bcm-pulldown-group_2.entry.js +1 -1
- package/dist/esm/bcm-pulldown.entry.js +1 -1
- package/dist/esm/bcm-radio-group.entry.js +120 -0
- package/dist/esm/bcm-radio.entry.js +100 -0
- package/dist/esm/bcm-select.entry.js +68 -8
- package/dist/esm/bcm-tab-pane.entry.js +47 -0
- package/dist/esm/bcm-tab.entry.js +68 -0
- package/dist/esm/bcm-tabs-content.entry.js +39 -0
- package/dist/esm/bcm-tabs.entry.js +357 -0
- package/dist/esm/bcm-text.entry.js +24 -0
- package/dist/esm/bcm-upload.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{element-dragger-03ac2a5e.js → element-dragger-97a8f373.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/css-shim.js +0 -0
- package/dist/esm/types-4b11eac9.js +28 -0
- package/dist/esm/types-911a8837.js +21 -0
- package/dist/esm/{utils-b7fba7c4.js → utils-de9aee67.js} +25 -1
- package/dist/types/assets/icons/index.d.ts +0 -0
- package/dist/types/assets/icons/index.example.d.ts +0 -0
- package/dist/types/components/atoms/avatar/avatar.d.ts +0 -0
- package/dist/types/components/atoms/badge/badge.d.ts +0 -0
- package/dist/types/components/atoms/button/button.d.ts +0 -0
- package/dist/types/components/atoms/divider/divider.d.ts +0 -0
- package/dist/types/components/atoms/icon/icon.d.ts +0 -0
- package/dist/types/components/atoms/icon/types.d.ts +0 -0
- package/dist/types/components/atoms/label/label.d.ts +16 -0
- package/dist/types/components/atoms/tag/tag.d.ts +0 -0
- package/dist/types/components/atoms/text/text.d.ts +0 -0
- package/dist/types/components/molecules/card/card-footer.d.ts +0 -0
- package/dist/types/components/molecules/card/card-header.d.ts +0 -0
- package/dist/types/components/molecules/card/card.d.ts +0 -0
- package/dist/types/components/molecules/checkbox/checkbox.d.ts +0 -0
- package/dist/types/components/molecules/checkbox/group.d.ts +1 -0
- package/dist/types/components/molecules/input/input.d.ts +2 -0
- package/dist/types/components/molecules/list/list-select.d.ts +24 -4
- package/dist/types/components/molecules/list/list.d.ts +13 -3
- package/dist/types/components/molecules/radio/group.d.ts +1 -0
- package/dist/types/components/molecules/radio/radio.d.ts +0 -0
- package/dist/types/components/molecules/select/group.d.ts +0 -0
- package/dist/types/components/molecules/select/option.d.ts +0 -0
- package/dist/types/components/molecules/select/select.d.ts +1 -0
- package/dist/types/components/molecules/switch/switch.d.ts +1 -0
- package/dist/types/components/molecules/textarea/textarea.d.ts +3 -2
- package/dist/types/components/organism/colorpicker/colorpicker.d.ts +1 -0
- package/dist/types/components/organism/listbox/listbox.d.ts +1 -0
- package/dist/types/components.d.ts +95 -12
- package/dist/types/global/variables/colors.d.ts +0 -0
- package/dist/types/helper/color-helper.d.ts +9 -0
- package/dist/types/helper/generate.d.ts +10 -0
- package/dist/types/helper/number-helper.d.ts +9 -0
- package/dist/types/helper/string-helper.d.ts +20 -0
- package/dist/types/helper/validators.d.ts +8 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/models/bcm-types.d.ts +19 -0
- package/dist/types/models/bcm.d.ts +447 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -0
- package/dist/types/templates/caption-template.d.ts +12 -0
- package/dist/types/templates/label-template.d.ts +12 -0
- package/dist/types/templates/slot-template.d.ts +8 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +0 -0
- package/loader/index.cjs.js +0 -0
- package/loader/index.d.ts +0 -0
- package/loader/index.es2017.js +0 -0
- package/loader/index.js +0 -0
- package/loader/package.json +0 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-013b6f5d.entry.js +0 -1
- package/dist/bromcom-ui/p-0532e299.entry.js +0 -1
- package/dist/bromcom-ui/p-0aa53bdb.entry.js +0 -1
- package/dist/bromcom-ui/p-2c1ee381.entry.js +0 -1
- package/dist/bromcom-ui/p-607bc9b3.entry.js +0 -1
- package/dist/bromcom-ui/p-6355c903.entry.js +0 -1
- package/dist/bromcom-ui/p-6bd805f1.entry.js +0 -1
- package/dist/bromcom-ui/p-77a480ff.entry.js +0 -1
- package/dist/bromcom-ui/p-a88256f2.entry.js +0 -1
- package/dist/bromcom-ui/p-b92324e7.js +0 -1
- package/dist/bromcom-ui/p-ba219861.entry.js +0 -1
- package/dist/bromcom-ui/p-cdfd9ba0.entry.js +0 -1
- package/dist/bromcom-ui/p-cf6b0656.entry.js +0 -1
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -273
- package/dist/cjs/bcm-checkbox.cjs.entry.js +0 -143
- package/dist/cjs/bcm-switch.cjs.entry.js +0 -86
- package/dist/cjs/bcm-textarea.cjs.entry.js +0 -136
- package/dist/cjs/bcm-tooltip-box.cjs.entry.js +0 -36
- package/dist/esm/bcm-checkbox-group.entry.js +0 -269
- package/dist/esm/bcm-checkbox.entry.js +0 -139
- package/dist/esm/bcm-switch.entry.js +0 -82
- package/dist/esm/bcm-textarea.entry.js +0 -132
- package/dist/esm/bcm-tooltip-box.entry.js +0 -32
|
@@ -99,12 +99,8 @@ export class BcmRadioGroup {
|
|
|
99
99
|
const captionClasses = cs('size-1', 'input-caption', 'caption-' + captionType);
|
|
100
100
|
if (this.radioOptions) {
|
|
101
101
|
return (h(Host, { class: hostClasses },
|
|
102
|
-
label && h("
|
|
103
|
-
"
|
|
104
|
-
label,
|
|
105
|
-
" ",
|
|
106
|
-
required && ('*'),
|
|
107
|
-
" "),
|
|
102
|
+
label && h("div", null,
|
|
103
|
+
h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })),
|
|
108
104
|
h("div", { class: classes },
|
|
109
105
|
this.radioOptions && this.radioOptions.map(radio => (h("bcm-radio", { value: radio.value, disabled: radio.disabled, checked: radio.checked },
|
|
110
106
|
" ",
|
|
@@ -419,6 +415,23 @@ export class BcmRadioGroup {
|
|
|
419
415
|
"attribute": "caption-type",
|
|
420
416
|
"reflect": false,
|
|
421
417
|
"defaultValue": "'default'"
|
|
418
|
+
},
|
|
419
|
+
"tooltip": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"mutable": false,
|
|
422
|
+
"complexType": {
|
|
423
|
+
"original": "string",
|
|
424
|
+
"resolved": "string",
|
|
425
|
+
"references": {}
|
|
426
|
+
},
|
|
427
|
+
"required": false,
|
|
428
|
+
"optional": false,
|
|
429
|
+
"docs": {
|
|
430
|
+
"tags": [],
|
|
431
|
+
"text": ""
|
|
432
|
+
},
|
|
433
|
+
"attribute": "tooltip",
|
|
434
|
+
"reflect": false
|
|
422
435
|
}
|
|
423
436
|
}; }
|
|
424
437
|
static get states() { return {
|
|
@@ -61,7 +61,7 @@ export class BcmSearch {
|
|
|
61
61
|
}
|
|
62
62
|
nestedSearch(items, value, equal = false) {
|
|
63
63
|
var result;
|
|
64
|
-
items.map((item) => {
|
|
64
|
+
items && (items.map((item) => {
|
|
65
65
|
this.searchFields.map(searchField => {
|
|
66
66
|
if (searchField in item) {
|
|
67
67
|
// debugger;
|
|
@@ -114,7 +114,7 @@ export class BcmSearch {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
|
-
});
|
|
117
|
+
}));
|
|
118
118
|
return result;
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
@@ -325,12 +325,72 @@ export class BcmSelect {
|
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
async addChecked(id = []) {
|
|
328
|
-
this.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
this.
|
|
333
|
-
|
|
328
|
+
if (this.isRendered == true) {
|
|
329
|
+
this.renderListbox();
|
|
330
|
+
await this.createElement();
|
|
331
|
+
await delay(100);
|
|
332
|
+
if (document.getElementById("select-box" + this._internal_id) && document.getElementById("select-box" + this._internal_id).shadowRoot.querySelector("bcm-listbox")) {
|
|
333
|
+
this.bcmListbox = document.getElementById("select-box" + this._internal_id).shadowRoot.querySelector("bcm-listbox");
|
|
334
|
+
await this.bcmListbox.addChecked(id);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
var checkedItems = id;
|
|
339
|
+
var _checkedItems = [];
|
|
340
|
+
if (this._items && this._items.length > 0) {
|
|
341
|
+
if (this.checkboxes === true) {
|
|
342
|
+
if (this._items.find(e => String(e[this.objectMapping['checked']]) === "true")) {
|
|
343
|
+
this._items.filter(e => String(e[this.objectMapping['checked']]) === "true").forEach(element => {
|
|
344
|
+
element[this.objectMapping['checked']] = false;
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
if (this._items.find(e => String(e[this.objectMapping['selected']]) === "true")) {
|
|
350
|
+
this._items.filter(e => String(e[this.objectMapping['selected']]) === "true").forEach(element => {
|
|
351
|
+
element[this.objectMapping['selected']] = false;
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
if (typeof checkedItems == 'string') {
|
|
356
|
+
if (this.checkboxes === false) {
|
|
357
|
+
const item = this._items.find(e => String(e[this.objectMapping['id']]) === String(checkedItems))[this.objectMapping['id']];
|
|
358
|
+
this.value = item;
|
|
359
|
+
this.selectText = item[this.objectMapping['text']];
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
if (this.checkboxes === true) {
|
|
364
|
+
checkedItems.forEach(id => {
|
|
365
|
+
var findItem = this._items.find(e => String(e[this.objectMapping['id']]) == String(id));
|
|
366
|
+
if (findItem) {
|
|
367
|
+
findItem[this.objectMapping['checked']] = "true";
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
if (this._items && this._items.find(e => String(e[this.objectMapping['checked']]) === "true")) {
|
|
372
|
+
this._items.filter(e => String(e[this.objectMapping['checked']]) === "true").forEach(item => {
|
|
373
|
+
_checkedItems.push(item);
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
this.handleClear();
|
|
380
|
+
}
|
|
381
|
+
this._data = JSON.stringify(this._items);
|
|
382
|
+
this.itemsWidth = [];
|
|
383
|
+
if (this.checkboxes == true) {
|
|
384
|
+
this.value = String(_checkedItems);
|
|
385
|
+
this.handleTagControl2(_checkedItems);
|
|
386
|
+
this.checklist = _checkedItems;
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
if (this.value != null) {
|
|
390
|
+
this.value = null;
|
|
391
|
+
}
|
|
392
|
+
this.checklist = [];
|
|
393
|
+
}
|
|
334
394
|
}
|
|
335
395
|
}
|
|
336
396
|
async updateChecked(id = []) {
|
|
@@ -1024,12 +1084,8 @@ export class BcmSelect {
|
|
|
1024
1084
|
};
|
|
1025
1085
|
return (h(Host, { class: hostClasses, onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() },
|
|
1026
1086
|
h("div", { class: container },
|
|
1027
|
-
label && h("
|
|
1028
|
-
"
|
|
1029
|
-
label,
|
|
1030
|
-
" ",
|
|
1031
|
-
required && ('*'),
|
|
1032
|
-
" "),
|
|
1087
|
+
label && h("div", null,
|
|
1088
|
+
h("bcm-label", { onClick: () => this.handleOpen(false), tooltip: this.tooltip, type: captionType, value: label, required: required })),
|
|
1033
1089
|
h("div", { id: "selected-container", class: selected, onClick: (e) => this.handleOpen(e), tabIndex: -1 },
|
|
1034
1090
|
h("span", { class: selectedText, title: this.selectText && (this.selectText) },
|
|
1035
1091
|
(this.selectText && (this.selectText)),
|
|
@@ -1712,6 +1768,23 @@ export class BcmSelect {
|
|
|
1712
1768
|
"attribute": "placement",
|
|
1713
1769
|
"reflect": true,
|
|
1714
1770
|
"defaultValue": "'bottom-start'"
|
|
1771
|
+
},
|
|
1772
|
+
"tooltip": {
|
|
1773
|
+
"type": "string",
|
|
1774
|
+
"mutable": false,
|
|
1775
|
+
"complexType": {
|
|
1776
|
+
"original": "string",
|
|
1777
|
+
"resolved": "string",
|
|
1778
|
+
"references": {}
|
|
1779
|
+
},
|
|
1780
|
+
"required": false,
|
|
1781
|
+
"optional": false,
|
|
1782
|
+
"docs": {
|
|
1783
|
+
"tags": [],
|
|
1784
|
+
"text": ""
|
|
1785
|
+
},
|
|
1786
|
+
"attribute": "tooltip",
|
|
1787
|
+
"reflect": false
|
|
1715
1788
|
}
|
|
1716
1789
|
}; }
|
|
1717
1790
|
static get states() { return {
|
|
@@ -64,14 +64,10 @@ export class BcmSwitch {
|
|
|
64
64
|
return (condition && size === 'medium');
|
|
65
65
|
};
|
|
66
66
|
const isMedium = size === 'medium';
|
|
67
|
-
const hostClasses = cs('switch', this.hidden ? 'hidden' : null);
|
|
67
|
+
const hostClasses = cs('bcm-switch', this.hidden ? 'hidden' : null);
|
|
68
68
|
return (h(Host, { class: hostClasses },
|
|
69
|
-
label && h("
|
|
70
|
-
"
|
|
71
|
-
label,
|
|
72
|
-
" ",
|
|
73
|
-
required && ('*'),
|
|
74
|
-
" "),
|
|
69
|
+
label && h("div", null,
|
|
70
|
+
h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })),
|
|
75
71
|
h("label", { class: wrapperClass },
|
|
76
72
|
isPermitted(inactiveText) && h("span", { class: "inactive-text size-1" }, inactiveText),
|
|
77
73
|
h("div", { class: classes },
|
|
@@ -397,6 +393,23 @@ export class BcmSwitch {
|
|
|
397
393
|
"attribute": "caption-type",
|
|
398
394
|
"reflect": false,
|
|
399
395
|
"defaultValue": "'default'"
|
|
396
|
+
},
|
|
397
|
+
"tooltip": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"mutable": false,
|
|
400
|
+
"complexType": {
|
|
401
|
+
"original": "string",
|
|
402
|
+
"resolved": "string",
|
|
403
|
+
"references": {}
|
|
404
|
+
},
|
|
405
|
+
"required": false,
|
|
406
|
+
"optional": false,
|
|
407
|
+
"docs": {
|
|
408
|
+
"tags": [],
|
|
409
|
+
"text": ""
|
|
410
|
+
},
|
|
411
|
+
"attribute": "tooltip",
|
|
412
|
+
"reflect": false
|
|
400
413
|
}
|
|
401
414
|
}; }
|
|
402
415
|
static get states() { return {
|
|
@@ -206,6 +206,9 @@
|
|
|
206
206
|
|
|
207
207
|
.caption-area {
|
|
208
208
|
min-height: 20px;
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: row;
|
|
211
|
+
justify-content: space-between;
|
|
209
212
|
}
|
|
210
213
|
|
|
211
214
|
.input-caption {
|
|
@@ -289,6 +292,6 @@
|
|
|
289
292
|
.error .label {
|
|
290
293
|
color: var(--bcm-color-red-6) !important;
|
|
291
294
|
}
|
|
292
|
-
.error .textarea-container
|
|
295
|
+
.error .textarea-container {
|
|
293
296
|
border: 1px solid var(--bcm-color-red-6) !important;
|
|
294
297
|
}
|
|
@@ -6,6 +6,7 @@ export class BcmTextarea {
|
|
|
6
6
|
this.textareaId = `textarea-${++id}`;
|
|
7
7
|
this.valueLength = 0;
|
|
8
8
|
this.noCaption = false;
|
|
9
|
+
this.captionType = 'default';
|
|
9
10
|
this.rows = 1;
|
|
10
11
|
this.size = 'medium';
|
|
11
12
|
this.resize = 'vertical';
|
|
@@ -103,6 +104,7 @@ export class BcmTextarea {
|
|
|
103
104
|
'disabled': disabled,
|
|
104
105
|
});
|
|
105
106
|
const captionClasses = cs('size-1', 'input-caption', 'caption-' + captionType);
|
|
107
|
+
const countClasses = cs('size-1', 'input-caption', 'caption-default');
|
|
106
108
|
const textareaClasses = cs('size-' + size, {
|
|
107
109
|
'size-3': size === 'large',
|
|
108
110
|
'size-2': size === 'small' || size === 'medium',
|
|
@@ -111,18 +113,14 @@ export class BcmTextarea {
|
|
|
111
113
|
const hostClasses = cs(this.hidden ? 'hidden' : null);
|
|
112
114
|
return (h(Host, { class: hostClasses },
|
|
113
115
|
h("div", { class: wrapperClasses },
|
|
114
|
-
label && h("
|
|
115
|
-
"
|
|
116
|
-
label,
|
|
117
|
-
" ",
|
|
118
|
-
required && ('*'),
|
|
119
|
-
" "),
|
|
116
|
+
label && h("div", null,
|
|
117
|
+
h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required, htmlFor: this.textareaId })),
|
|
120
118
|
h("div", { class: contanerClasses },
|
|
121
119
|
h("textarea", { ref: el => (this.textarea = el), onInput: this.handleInput, onFocus: this.handleFocus, onChange: this.handleChange, onBlur: this.handleBlur, class: textareaClasses, id: this.textareaId, value: value, rows: rows, disabled: disabled, maxlength: maxLength, placeholder: placeholder }),
|
|
122
120
|
clearable && (h("button", { class: "clear-button", onClick: this.handleClear },
|
|
123
121
|
h("bcm-icon", { icon: "close-circle", type: "fill", size: 18, color: "grey-7" })))),
|
|
124
122
|
!noCaption || maxLength ? (h("div", { class: "caption-area" },
|
|
125
|
-
captionType == "error"
|
|
123
|
+
h("span", null, captionType == "error"
|
|
126
124
|
? h("span", { class: captionClasses },
|
|
127
125
|
" ",
|
|
128
126
|
captionError,
|
|
@@ -130,8 +128,8 @@ export class BcmTextarea {
|
|
|
130
128
|
: caption && h("span", { class: captionClasses },
|
|
131
129
|
" ",
|
|
132
130
|
caption,
|
|
133
|
-
" "),
|
|
134
|
-
maxLength && h("span", { class:
|
|
131
|
+
" ")),
|
|
132
|
+
maxLength && h("span", { class: countClasses },
|
|
135
133
|
" ",
|
|
136
134
|
`${valueLength}/${maxLength}`,
|
|
137
135
|
" "))) : null)));
|
|
@@ -197,7 +195,7 @@ export class BcmTextarea {
|
|
|
197
195
|
"reflect": false,
|
|
198
196
|
"defaultValue": "false"
|
|
199
197
|
},
|
|
200
|
-
"
|
|
198
|
+
"captionError": {
|
|
201
199
|
"type": "string",
|
|
202
200
|
"mutable": false,
|
|
203
201
|
"complexType": {
|
|
@@ -211,10 +209,10 @@ export class BcmTextarea {
|
|
|
211
209
|
"tags": [],
|
|
212
210
|
"text": ""
|
|
213
211
|
},
|
|
214
|
-
"attribute": "caption",
|
|
212
|
+
"attribute": "caption-error",
|
|
215
213
|
"reflect": false
|
|
216
214
|
},
|
|
217
|
-
"
|
|
215
|
+
"placeholder": {
|
|
218
216
|
"type": "string",
|
|
219
217
|
"mutable": false,
|
|
220
218
|
"complexType": {
|
|
@@ -228,10 +226,10 @@ export class BcmTextarea {
|
|
|
228
226
|
"tags": [],
|
|
229
227
|
"text": ""
|
|
230
228
|
},
|
|
231
|
-
"attribute": "
|
|
229
|
+
"attribute": "placeholder",
|
|
232
230
|
"reflect": false
|
|
233
231
|
},
|
|
234
|
-
"
|
|
232
|
+
"caption": {
|
|
235
233
|
"type": "string",
|
|
236
234
|
"mutable": false,
|
|
237
235
|
"complexType": {
|
|
@@ -245,14 +243,14 @@ export class BcmTextarea {
|
|
|
245
243
|
"tags": [],
|
|
246
244
|
"text": ""
|
|
247
245
|
},
|
|
248
|
-
"attribute": "
|
|
246
|
+
"attribute": "caption",
|
|
249
247
|
"reflect": false
|
|
250
248
|
},
|
|
251
249
|
"captionType": {
|
|
252
250
|
"type": "string",
|
|
253
251
|
"mutable": false,
|
|
254
252
|
"complexType": {
|
|
255
|
-
"original": "'
|
|
253
|
+
"original": "'primary' | 'success' | 'warning' | 'error' | 'default'",
|
|
256
254
|
"resolved": "\"default\" | \"error\" | \"primary\" | \"success\" | \"warning\"",
|
|
257
255
|
"references": {}
|
|
258
256
|
},
|
|
@@ -263,7 +261,8 @@ export class BcmTextarea {
|
|
|
263
261
|
"text": ""
|
|
264
262
|
},
|
|
265
263
|
"attribute": "caption-type",
|
|
266
|
-
"reflect": false
|
|
264
|
+
"reflect": false,
|
|
265
|
+
"defaultValue": "'default'"
|
|
267
266
|
},
|
|
268
267
|
"rows": {
|
|
269
268
|
"type": "number",
|
|
@@ -439,6 +438,23 @@ export class BcmTextarea {
|
|
|
439
438
|
"attribute": "required",
|
|
440
439
|
"reflect": false,
|
|
441
440
|
"defaultValue": "false"
|
|
441
|
+
},
|
|
442
|
+
"tooltip": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"mutable": false,
|
|
445
|
+
"complexType": {
|
|
446
|
+
"original": "string",
|
|
447
|
+
"resolved": "string",
|
|
448
|
+
"references": {}
|
|
449
|
+
},
|
|
450
|
+
"required": false,
|
|
451
|
+
"optional": false,
|
|
452
|
+
"docs": {
|
|
453
|
+
"tags": [],
|
|
454
|
+
"text": ""
|
|
455
|
+
},
|
|
456
|
+
"attribute": "tooltip",
|
|
457
|
+
"reflect": false
|
|
442
458
|
}
|
|
443
459
|
}; }
|
|
444
460
|
static get states() { return {
|
|
@@ -391,12 +391,8 @@ export class BcmColorPicker {
|
|
|
391
391
|
const captionClasses = cs('size-1', 'input-caption', 'caption-' + captionType);
|
|
392
392
|
return (h(Host, null,
|
|
393
393
|
h("div", { class: classes, onClick: () => this.handleClick() },
|
|
394
|
-
label && h("
|
|
395
|
-
"
|
|
396
|
-
label,
|
|
397
|
-
" ",
|
|
398
|
-
required && ('*'),
|
|
399
|
-
" "),
|
|
394
|
+
label && h("div", null,
|
|
395
|
+
h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })),
|
|
400
396
|
h("div", { class: "input" },
|
|
401
397
|
h("div", { class: "active-color" },
|
|
402
398
|
h("div", { class: "color-thumb", style: { backgroundColor: this.value } })),
|
|
@@ -663,6 +659,23 @@ export class BcmColorPicker {
|
|
|
663
659
|
"attribute": "required",
|
|
664
660
|
"reflect": false,
|
|
665
661
|
"defaultValue": "false"
|
|
662
|
+
},
|
|
663
|
+
"tooltip": {
|
|
664
|
+
"type": "string",
|
|
665
|
+
"mutable": false,
|
|
666
|
+
"complexType": {
|
|
667
|
+
"original": "string",
|
|
668
|
+
"resolved": "string",
|
|
669
|
+
"references": {}
|
|
670
|
+
},
|
|
671
|
+
"required": false,
|
|
672
|
+
"optional": false,
|
|
673
|
+
"docs": {
|
|
674
|
+
"tags": [],
|
|
675
|
+
"text": ""
|
|
676
|
+
},
|
|
677
|
+
"attribute": "tooltip",
|
|
678
|
+
"reflect": false
|
|
666
679
|
}
|
|
667
680
|
}; }
|
|
668
681
|
static get states() { return {
|
|
@@ -124,7 +124,7 @@ export class BcmDatetimePicker {
|
|
|
124
124
|
const errorObject1 = { isValid: false, value: this.valueText };
|
|
125
125
|
const errorObject2 = { isValid: false, value: this.inputElement.value };
|
|
126
126
|
if (!newValue) {
|
|
127
|
-
this.change.emit(
|
|
127
|
+
this.change.emit();
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
if (this.type !== Types.range && this.error) {
|
|
@@ -167,7 +167,7 @@ export class BcmForm {
|
|
|
167
167
|
return ['bcm-datetime-picker', 'bcm-date-picker', 'bcm-time-picker'].includes(item.toLowerCase());
|
|
168
168
|
}
|
|
169
169
|
isGroupComponent(item) {
|
|
170
|
-
return ['bcm-checkbox-group'
|
|
170
|
+
return ['bcm-checkbox-group'].includes(item.toLowerCase());
|
|
171
171
|
}
|
|
172
172
|
async userFormData() {
|
|
173
173
|
this.formData = {};
|
|
@@ -199,8 +199,9 @@ export class BcmForm {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
else if (isGroupComponent) {
|
|
202
|
-
getChilds(input, "bcm-checkbox")
|
|
203
|
-
|
|
202
|
+
const childsCheckbox = getChilds(input, "bcm-checkbox");
|
|
203
|
+
childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
|
|
204
|
+
if (element && element.required === true) {
|
|
204
205
|
valid = validate.required(element.value);
|
|
205
206
|
if (!valid['valid']) {
|
|
206
207
|
element.noCaption = false;
|
|
@@ -213,7 +214,7 @@ export class BcmForm {
|
|
|
213
214
|
element.captionType = "default";
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
|
-
});
|
|
217
|
+
}));
|
|
217
218
|
}
|
|
218
219
|
else {
|
|
219
220
|
valid = validate.required(input.value);
|
|
@@ -289,6 +289,7 @@ export class BcmListbox {
|
|
|
289
289
|
? this.size = _config['size']
|
|
290
290
|
: this.size = 'medium';
|
|
291
291
|
}
|
|
292
|
+
this.searchSub = this.objectMapping['items'];
|
|
292
293
|
if (_config['mapping']) {
|
|
293
294
|
if (_config['mapping']['id']) {
|
|
294
295
|
this.objectMapping['id'] = String(_config['mapping']['id']);
|
|
@@ -324,15 +325,14 @@ export class BcmListbox {
|
|
|
324
325
|
if (_config['mapping']['selected']) {
|
|
325
326
|
this.objectMapping['selected'] = _config['mapping']['selected'];
|
|
326
327
|
}
|
|
327
|
-
if (
|
|
328
|
-
|
|
329
|
-
this.objectMapping['items'] = _config['mapping']['items'];
|
|
330
|
-
this.searchSub = this.objectMapping['items'];
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
else {
|
|
328
|
+
if (_config['mapping']['items']) {
|
|
329
|
+
this.objectMapping['items'] = _config['mapping']['items'];
|
|
334
330
|
this.searchSub = this.objectMapping['items'];
|
|
335
331
|
}
|
|
332
|
+
// if ( this.treeview ) {
|
|
333
|
+
// }else{
|
|
334
|
+
// this.searchSub = this.objectMapping['items']
|
|
335
|
+
// }
|
|
336
336
|
}
|
|
337
337
|
sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
|
|
338
338
|
// forceUpdate(this.el)
|
|
@@ -581,7 +581,7 @@ export class BcmListbox {
|
|
|
581
581
|
// this.listboxChecked.emit(item[this.objectMapping['id']])
|
|
582
582
|
// }
|
|
583
583
|
// }
|
|
584
|
-
return (h("bcm-listbox-item", Object.assign({ _internal_id: this._internal_id, id: String(item[this.objectMapping['id']]), text: item[this.objectMapping['text']] }, (item[this.objectMapping['icon']] && { icon: item[this.objectMapping['icon']] }), (item[this.objectMapping['avatar']] && { avatar: item[this.objectMapping['avatar']] }), (item[this.objectMapping['avatarName']] && { avatarName: item[this.objectMapping['avatarName']] }), (item[this.objectMapping['avatarImage']] && { avatarImage: item[this.objectMapping['avatarImage']] }), (item[this.objectMapping['secondaryText']] && { secondaryText: item[this.objectMapping['secondaryText']] }), (item[this.objectMapping['tooltipText']] && { tooltipText: item[this.objectMapping['tooltipText']] }), (item[this.objectMapping['checked']] === true && { checked: item[this.objectMapping['checked']] }), (item[this.objectMapping['disabled']] === true && { disabled: true }), (item[this.objectMapping['selected']] === true && this.checkboxes == false && { selected: item[this.objectMapping['selected']] }), (this.template && { template: this.template }), (this.checkboxes && { checkboxes: true }), (this.size && { size: this.size }), { itemObject: item, objectMapping: this.objectMapping })));
|
|
584
|
+
return (h("bcm-listbox-item", Object.assign({ _internal_id: this._internal_id, id: String(item[this.objectMapping['id']]), text: item[this.objectMapping['text']] }, (item[this.objectMapping['icon']] && { icon: item[this.objectMapping['icon']] }), (item[this.objectMapping['avatar']] && { avatar: item[this.objectMapping['avatar']] }), (item[this.objectMapping['avatarName']] && { avatarName: item[this.objectMapping['avatarName']] }), (item[this.objectMapping['avatarImage']] && { avatarImage: item[this.objectMapping['avatarImage']] }), (item[this.objectMapping['secondaryText']] && { secondaryText: item[this.objectMapping['secondaryText']] }), (item[this.objectMapping['tooltipText']] && { tooltipText: item[this.objectMapping['tooltipText']] }), (Boolean(item[this.objectMapping['checked']]) === Boolean(true) && { checked: Boolean(item[this.objectMapping['checked']]) }), (item[this.objectMapping['disabled']] === true && { disabled: true }), (Boolean(item[this.objectMapping['selected']]) === Boolean(true) && this.checkboxes == false && { selected: Boolean(item[this.objectMapping['selected']]) }), (this.template && { template: this.template }), (this.checkboxes && { checkboxes: true }), (this.size && { size: this.size }), { itemObject: item, objectMapping: this.objectMapping })));
|
|
585
585
|
}
|
|
586
586
|
/**
|
|
587
587
|
* @desc
|
|
@@ -876,16 +876,9 @@ export class BcmListbox {
|
|
|
876
876
|
customStyles = Object.assign(Object.assign({}, customStyles), { 'height': this.height });
|
|
877
877
|
}
|
|
878
878
|
const captionClasses = cs('size-1', 'input-caption', 'caption-' + captionType);
|
|
879
|
-
const labelClasses = cs('size-1', 'label', {
|
|
880
|
-
'error': captionType == 'error' ? true : false
|
|
881
|
-
});
|
|
882
879
|
return (h(Host, { class: hostClasses, style: customStyles, "bcm-internal-id": this._internal_id },
|
|
883
|
-
!innerComponent && label && h("
|
|
884
|
-
"
|
|
885
|
-
label,
|
|
886
|
-
" ",
|
|
887
|
-
required && ('*'),
|
|
888
|
-
" "),
|
|
880
|
+
!innerComponent && label && h("div", null,
|
|
881
|
+
h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })),
|
|
889
882
|
treeview === true && (h("bcm-treeview", { _internal_id: this._internal_id })),
|
|
890
883
|
treeview == false && (h("div", { class: bcmListbox, style: customStyles },
|
|
891
884
|
search && (h("div", { class: "search", id: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } },
|
|
@@ -1542,6 +1535,23 @@ export class BcmListbox {
|
|
|
1542
1535
|
"attribute": "_internal_id",
|
|
1543
1536
|
"reflect": true,
|
|
1544
1537
|
"defaultValue": "(Math.random() * 4).toString(16).replace('.', '')"
|
|
1538
|
+
},
|
|
1539
|
+
"tooltip": {
|
|
1540
|
+
"type": "string",
|
|
1541
|
+
"mutable": false,
|
|
1542
|
+
"complexType": {
|
|
1543
|
+
"original": "string",
|
|
1544
|
+
"resolved": "string",
|
|
1545
|
+
"references": {}
|
|
1546
|
+
},
|
|
1547
|
+
"required": false,
|
|
1548
|
+
"optional": false,
|
|
1549
|
+
"docs": {
|
|
1550
|
+
"tags": [],
|
|
1551
|
+
"text": ""
|
|
1552
|
+
},
|
|
1553
|
+
"attribute": "tooltip",
|
|
1554
|
+
"reflect": false
|
|
1545
1555
|
}
|
|
1546
1556
|
}; }
|
|
1547
1557
|
static get states() { return {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ColorPalette } from "../global/variables/colors";
|
|
2
|
+
import { extractColor } from "../utils/utils";
|
|
3
|
+
export class ColorHelper {
|
|
4
|
+
}
|
|
5
|
+
ColorHelper.isHex = (str) => /^[A-F0-9]+$/i.test(str);
|
|
6
|
+
ColorHelper.isRgb = (str) => /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(str);
|
|
7
|
+
ColorHelper.isRgba = (str) => /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(str);
|
|
8
|
+
ColorHelper.isHsl = (str) => /^hsl\((\d{1,3}),\s*(\d{1,3}%),\s*(\d{1,3}%)\)$/.test(str);
|
|
9
|
+
ColorHelper.isHsla = (str) => /^hsla\((\d{1,3}),\s*(\d{1,3}%),\s*(\d{1,3}%),\s*(\d{1,3})\)$/.test(str);
|
|
10
|
+
ColorHelper.convertColorToHex = (color) => {
|
|
11
|
+
if (color) {
|
|
12
|
+
if (ColorHelper.isHex(color)) {
|
|
13
|
+
return color;
|
|
14
|
+
}
|
|
15
|
+
if (ColorHelper.isRgb(color)) {
|
|
16
|
+
const rgb = color.match(/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/);
|
|
17
|
+
return `#${(0x1000000 + (parseInt(rgb[1]) * 0x10000) + (parseInt(rgb[2]) * 0x100) + parseInt(rgb[3])).toString(16).substring(1)}`;
|
|
18
|
+
}
|
|
19
|
+
if (extractColor(ColorPalette, color)) {
|
|
20
|
+
return extractColor(ColorPalette, color);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
ColorHelper.reverseColor = (color) => {
|
|
25
|
+
const hexColor = ColorHelper.convertColorToHex(color);
|
|
26
|
+
if (hexColor) {
|
|
27
|
+
const r = parseInt(hexColor.substring(1, 3), 16);
|
|
28
|
+
const g = parseInt(hexColor.substring(3, 5), 16);
|
|
29
|
+
const b = parseInt(hexColor.substring(5, 7), 16);
|
|
30
|
+
const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
|
|
31
|
+
return (yiq >= 200) ? '#000000' : '#FFFFFF';
|
|
32
|
+
}
|
|
33
|
+
};
|