bromcom-ui 2.3.57 → 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-7b469915.entry.js → p-13d038f5.entry.js} +1 -1
- package/dist/bromcom-ui/p-1429a2b4.js +1 -0
- package/dist/bromcom-ui/{p-e02ea2a4.entry.js → p-20d03fa1.entry.js} +1 -1
- package/dist/bromcom-ui/p-37750343.entry.js +1 -0
- package/dist/bromcom-ui/{p-9bfd984c.entry.js → p-3f797656.entry.js} +1 -1
- package/dist/bromcom-ui/p-4a41ef80.entry.js +1 -0
- package/dist/bromcom-ui/p-53e9b679.entry.js +1 -0
- package/dist/bromcom-ui/p-8851e01e.entry.js +1 -0
- package/dist/bromcom-ui/p-9ffff762.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-b52eb625.entry.js → p-e21a8f2d.entry.js} +1 -1
- package/dist/bromcom-ui/p-e450ebda.entry.js +1 -0
- package/dist/bromcom-ui/p-f067821e.entry.js +1 -0
- package/dist/cjs/bcm-alert.cjs.entry.js +7 -26
- package/dist/cjs/{bcm-button_5.cjs.entry.js → bcm-button_11.cjs.entry.js} +1206 -2
- package/dist/cjs/{bcm-checkbox-lite_3.cjs.entry.js → bcm-checkbox-lite_4.cjs.entry.js} +64 -0
- package/dist/cjs/bcm-colorpicker.cjs.entry.js +1 -1
- package/dist/cjs/{bcm-datetime-picker_2.cjs.entry.js → bcm-datetime-picker.cjs.entry.js} +1 -135
- package/dist/cjs/bcm-list-select.cjs.entry.js +21 -6
- package/dist/cjs/bcm-list.cjs.entry.js +41 -4
- package/dist/cjs/{bcm-empty_6.cjs.entry.js → bcm-listbox_5.cjs.entry.js} +8 -75
- 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-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-select.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/types-37c8ced6.js +16 -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 +19 -6
- package/dist/collection/components/molecules/list/list-select.css +3 -7
- package/dist/collection/components/molecules/list/list-select.js +41 -12
- package/dist/collection/components/molecules/list/list.css +18 -0
- package/dist/collection/components/molecules/list/list.js +63 -11
- 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/select/select.js +19 -6
- 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.js +19 -6
- 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/listbox/listbox.js +26 -16
- 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/esm/bcm-alert.entry.js +1 -20
- package/dist/esm/{bcm-button_5.entry.js → bcm-button_11.entry.js} +1202 -4
- package/dist/esm/{bcm-checkbox-lite_3.entry.js → bcm-checkbox-lite_4.entry.js} +65 -2
- package/dist/esm/bcm-colorpicker.entry.js +1 -1
- package/dist/esm/{bcm-datetime-picker_2.entry.js → bcm-datetime-picker.entry.js} +2 -135
- package/dist/esm/bcm-list-select.entry.js +21 -6
- package/dist/esm/bcm-list.entry.js +41 -4
- package/dist/esm/{bcm-empty_6.entry.js → bcm-listbox_5.entry.js} +10 -76
- 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-radio-group.entry.js +1 -1
- package/dist/esm/bcm-select.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/css-shim.js +0 -0
- package/dist/esm/types-911a8837.js +21 -0
- 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 +1 -0
- package/dist/types/components/molecules/list/list-select.d.ts +6 -1
- package/dist/types/components/molecules/list/list.d.ts +1 -0
- 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 +1 -0
- 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 +64 -3
- 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 +0 -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-3a6625d7.entry.js +0 -1
- package/dist/bromcom-ui/p-3aef4844.entry.js +0 -1
- package/dist/bromcom-ui/p-5ff33d84.entry.js +0 -1
- package/dist/bromcom-ui/p-607bc9b3.entry.js +0 -1
- package/dist/bromcom-ui/p-6bd805f1.entry.js +0 -1
- package/dist/bromcom-ui/p-6ef403b0.entry.js +0 -1
- package/dist/bromcom-ui/p-865ccb94.entry.js +0 -1
- package/dist/bromcom-ui/p-9220ba9c.entry.js +0 -1
- package/dist/bromcom-ui/p-b81236b1.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/bromcom-ui/p-fc3e131c.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-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-tooltip-box.entry.js +0 -32
|
@@ -64,6 +64,69 @@ const BcmBadge = class {
|
|
|
64
64
|
};
|
|
65
65
|
BcmBadge.style = dividerCss;
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* 'image' prop predefined values
|
|
69
|
+
*/
|
|
70
|
+
var ImageProps;
|
|
71
|
+
(function (ImageProps) {
|
|
72
|
+
ImageProps["default"] = "default.svg";
|
|
73
|
+
ImageProps["simple"] = "simple.svg";
|
|
74
|
+
})(ImageProps || (ImageProps = {}));
|
|
75
|
+
/**
|
|
76
|
+
* 'size' prop predefined values
|
|
77
|
+
*/
|
|
78
|
+
var SizeProps;
|
|
79
|
+
(function (SizeProps) {
|
|
80
|
+
SizeProps["small"] = "small";
|
|
81
|
+
SizeProps["medium"] = "medium";
|
|
82
|
+
SizeProps["big"] = "big";
|
|
83
|
+
})(SizeProps || (SizeProps = {}));
|
|
84
|
+
|
|
85
|
+
const emptyCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:block}:host(.hidden){display:none}.empty.small{max-width:100px}.empty.medium{max-width:140px}.empty.big{max-width:200px}.text{font-size:14px;color:var(--bcm-color-grey-8)}.content{text-align:center}img{max-width:100%}";
|
|
86
|
+
|
|
87
|
+
const BcmEmpty = class {
|
|
88
|
+
constructor(hostRef) {
|
|
89
|
+
index.registerInstance(this, hostRef);
|
|
90
|
+
/**
|
|
91
|
+
* Component Properties
|
|
92
|
+
*/
|
|
93
|
+
this._image = ImageProps.default;
|
|
94
|
+
this.size = SizeProps.medium;
|
|
95
|
+
this.hidden = false;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @ComponentMethod
|
|
99
|
+
*/
|
|
100
|
+
componentWillLoad() {
|
|
101
|
+
this.parseImage(this._image);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @desc
|
|
105
|
+
* @param newValue
|
|
106
|
+
* @returns {void}
|
|
107
|
+
*/
|
|
108
|
+
parseImage(newValue) {
|
|
109
|
+
if (newValue) {
|
|
110
|
+
newValue in ImageProps
|
|
111
|
+
? this.image = ImageProps[newValue]
|
|
112
|
+
: this.image = ImageProps.default;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
render() {
|
|
116
|
+
const classes = index$1.classnames('empty', {
|
|
117
|
+
[this.size]: this.size
|
|
118
|
+
});
|
|
119
|
+
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
120
|
+
return (index.h(index.Host, { class: hostClasses }, index.h("div", { class: classes }, index.h("img", { src: index.getAssetPath(`./static/${this.image}`) }), index.h("div", { class: "content" }, this.text && (index.h("span", { class: "text" }, this.text)), index.h("slot", null)))));
|
|
121
|
+
}
|
|
122
|
+
static get assetsDirs() { return ["static"]; }
|
|
123
|
+
get el() { return index.getElement(this); }
|
|
124
|
+
static get watchers() { return {
|
|
125
|
+
"_image": ["parseImage"]
|
|
126
|
+
}; }
|
|
127
|
+
};
|
|
128
|
+
BcmEmpty.style = emptyCss;
|
|
129
|
+
|
|
67
130
|
const searchCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:block}:host(.hidden){display:none}";
|
|
68
131
|
|
|
69
132
|
const lowercase = (str) => str.toLowerCase();
|
|
@@ -224,4 +287,5 @@ BcmSearch.style = searchCss;
|
|
|
224
287
|
|
|
225
288
|
exports.bcm_checkbox_lite = BcmCheckboxLite;
|
|
226
289
|
exports.bcm_divider = BcmBadge;
|
|
290
|
+
exports.bcm_empty = BcmEmpty;
|
|
227
291
|
exports.bcm_search = BcmSearch;
|
|
@@ -399,7 +399,7 @@ const BcmColorPicker = class {
|
|
|
399
399
|
open: this.open
|
|
400
400
|
});
|
|
401
401
|
const captionClasses = index$1.classnames('size-1', 'input-caption', 'caption-' + captionType);
|
|
402
|
-
return (index.h(index.Host, null, index.h("div", { class: classes, onClick: () => this.handleClick() }, label && index.h("
|
|
402
|
+
return (index.h(index.Host, null, index.h("div", { class: classes, onClick: () => this.handleClick() }, label && index.h("div", null, index.h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })), index.h("div", { class: "input" }, index.h("div", { class: "active-color" }, index.h("div", { class: "color-thumb", style: { backgroundColor: this.value } })), index.h("span", { class: "icon", slot: "suffix" }, index.h("bcm-icon", { icon: "bg-colors" }))), !noCaption && (index.h("div", { class: "caption-area" }, captionType == "error"
|
|
403
403
|
? index.h("span", { class: captionClasses }, " ", captionError, " ")
|
|
404
404
|
: caption && index.h("span", { class: captionClasses }, " ", caption, " "))), index.h("div", { class: "picker" }, index.h("div", { class: "input" }, index.h("input", { type: "text", class: "color-input", maxlength: "7", ref: el => (this.inputElement = el), onKeyUp: (e) => this.handleColorInputKeyUp(e) })), index.h("div", { class: "color", onMouseDown: () => this.mouseState = 'down', style: { backgroundColor: this.hsvtorgb({ h: this.h, s: this.s, v: this.v }).hex }, ref: el => (this.colorElement = el) }, index.h("img", { src: index.getAssetPath('./static/color.svg') }), index.h("div", { class: "color-indicator", ref: el => (this.colorIndicatorElement = el) })), index.h("div", { class: "colors-transparency" }, index.h("div", { class: "colors", onMouseDown: () => this.mouseState = 'down', ref: el => (this.colorsElement = el) }, index.h("div", { class: "colors-holder" }, index.h("img", { src: index.getAssetPath('./static/colors.svg') })), index.h("div", { class: "colors-indicator", ref: el => (this.colorsIndicatorElement = el) })))))));
|
|
405
405
|
}
|
|
@@ -4,9 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ce8878ec.js');
|
|
6
6
|
const index$1 = require('./index-2f62bdaf.js');
|
|
7
|
-
|
|
7
|
+
require('./utils-60414768.js');
|
|
8
8
|
const elementDragger = require('./element-dragger-4a91c708.js');
|
|
9
|
-
const popoverPlacement = require('./popover-placement-ac023521.js');
|
|
10
9
|
|
|
11
10
|
var Months;
|
|
12
11
|
(function (Months) {
|
|
@@ -1231,137 +1230,4 @@ const BcmDatetimePicker = class {
|
|
|
1231
1230
|
};
|
|
1232
1231
|
BcmDatetimePicker.style = datetimePickerCss;
|
|
1233
1232
|
|
|
1234
|
-
const tooltipCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:inline-flex}:host(.hidden){display:none}:host(:focus){outline:none}.tooltip{position:relative;}.tooltip .box{position:absolute;display:none;box-sizing:border-box;background-color:#262626;border:1px solid #262626;border-radius:2px;z-index:10700;width:max-content;padding:4px 8px;color:var(--bcm-color-grey-1)}.tooltip::after{content:\"\";position:absolute;display:none;border:6px solid;z-index:10700}.tooltip.open .box,.tooltip.open::after{display:block}.tooltip.top .box{bottom:100%;margin-bottom:8px}.tooltip.top::after{bottom:100%;margin-bottom:-4px;border-color:#262626 transparent transparent transparent}.tooltip.bottom .box{top:100%;margin-top:8px}.tooltip.bottom::after{top:100%;margin-top:-4px;border-color:transparent transparent #262626 transparent}.tooltip.left .box{right:100%;margin-right:8px}.tooltip.left::after{right:100%;margin-right:-4px;border-color:transparent transparent transparent #262626}.tooltip.right .box{left:100%;margin-left:8px}.tooltip.right::after{left:100%;margin-left:-4px;border-color:transparent #262626 transparent transparent}.tooltip.top.center .box,.tooltip.bottom.center .box{left:50%;transform:translateX(-50%)}.tooltip.top.center::after,.tooltip.bottom.center::after{left:50%;transform:translateX(-50%)}.tooltip.top.start .box,.tooltip.bottom.start .box{left:0}.tooltip.top.start::after,.tooltip.bottom.start::after{left:8px}.tooltip.top.end .box,.tooltip.bottom.end .box{right:0}.tooltip.top.end::after,.tooltip.bottom.end::after{right:8px}.tooltip.left.center .box,.tooltip.right.center .box{top:50%;transform:translateY(-50%)}.tooltip.left.center::after,.tooltip.right.center::after{top:50%;transform:translateY(-50%)}.tooltip.left.start .box,.tooltip.right.start .box{top:0}.tooltip.left.start::after,.tooltip.right.start::after{top:4px}.tooltip.left.end .box,.tooltip.right.end .box{bottom:0}.tooltip.left.end::after,.tooltip.right.end::after{bottom:4px}";
|
|
1235
|
-
|
|
1236
|
-
const BcmTooltip = class {
|
|
1237
|
-
constructor(hostRef) {
|
|
1238
|
-
index.registerInstance(this, hostRef);
|
|
1239
|
-
this.onShow = index.createEvent(this, "bcm-show", 7);
|
|
1240
|
-
this.onHide = index.createEvent(this, "bcm-hide", 7);
|
|
1241
|
-
this.placement = 'top';
|
|
1242
|
-
this.trigger = 'hover';
|
|
1243
|
-
this.hidden = false;
|
|
1244
|
-
this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
|
|
1245
|
-
}
|
|
1246
|
-
async show() {
|
|
1247
|
-
// Prevent subsequent calls
|
|
1248
|
-
if (this.open) {
|
|
1249
|
-
return;
|
|
1250
|
-
}
|
|
1251
|
-
this.open = true;
|
|
1252
|
-
this.onShow.emit();
|
|
1253
|
-
}
|
|
1254
|
-
async hide() {
|
|
1255
|
-
// Prevent subsequent calls
|
|
1256
|
-
if (!this.open) {
|
|
1257
|
-
return;
|
|
1258
|
-
}
|
|
1259
|
-
this.open = false;
|
|
1260
|
-
this.onHide.emit();
|
|
1261
|
-
}
|
|
1262
|
-
handleClickOutside(e) {
|
|
1263
|
-
if (!this.host.contains(e.target)) {
|
|
1264
|
-
if (this.open) {
|
|
1265
|
-
this.open = false;
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
async handleOpen() {
|
|
1270
|
-
await this.createElement();
|
|
1271
|
-
var tooltipBox = document.getElementById("box" + this._internal_id).shadowRoot.querySelector(".tooltip-box");
|
|
1272
|
-
if (tooltipBox && tooltipBox.querySelector(".box")) {
|
|
1273
|
-
var tooltipBoxIn = tooltipBox.querySelector(".box");
|
|
1274
|
-
popoverPlacement.popoverPlacement(tooltipBoxIn, this.host, this.placement, (place) => this.placement = place);
|
|
1275
|
-
tooltipBox.classList.toggle("open");
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
async createElement() {
|
|
1279
|
-
var target = this.host.getBoundingClientRect();
|
|
1280
|
-
var placementString = String([...this.getPlacement()]).replace(',', ' ');
|
|
1281
|
-
var element;
|
|
1282
|
-
if (!document.getElementById("box" + this._internal_id)) {
|
|
1283
|
-
element = document.createElement("bcm-tooltip-box");
|
|
1284
|
-
element.setAttribute("id", "box" + this._internal_id);
|
|
1285
|
-
}
|
|
1286
|
-
else {
|
|
1287
|
-
element = document.getElementById("box" + this._internal_id);
|
|
1288
|
-
}
|
|
1289
|
-
element.setAttribute("message", this.message);
|
|
1290
|
-
// element.setAttribute("placement", placementString)
|
|
1291
|
-
element.style.position = "absolute";
|
|
1292
|
-
// element.style.top = target.top + "px"
|
|
1293
|
-
// element.style.left = (target.left + (target.width / 2)) + "px"
|
|
1294
|
-
element.setAttribute("placement", placementString);
|
|
1295
|
-
// element.style.zIndex = "999999999"
|
|
1296
|
-
document.body.appendChild(element);
|
|
1297
|
-
await utils.delay(50);
|
|
1298
|
-
var tooltipBox = document.getElementById("box" + this._internal_id).shadowRoot.querySelector(".tooltip-box");
|
|
1299
|
-
if (tooltipBox && tooltipBox.querySelector(".box")) {
|
|
1300
|
-
var tooltipBoxIn = tooltipBox.querySelector(".box");
|
|
1301
|
-
popoverPlacement.popoverPlacement(tooltipBoxIn, this.host, this.placement, (place) => this.placement = place);
|
|
1302
|
-
}
|
|
1303
|
-
element.style.top = popoverPlacement.popoverBoxPlacement(this.placement, target)[0] + "px";
|
|
1304
|
-
element.style.left = popoverPlacement.popoverBoxPlacement(this.placement, target)[1] + "px";
|
|
1305
|
-
}
|
|
1306
|
-
hasTrigger(trigger) {
|
|
1307
|
-
return this.trigger === trigger;
|
|
1308
|
-
}
|
|
1309
|
-
getPlacement() {
|
|
1310
|
-
const placements = this.placement.split('-');
|
|
1311
|
-
if (placements.length === 1) {
|
|
1312
|
-
placements.push('center');
|
|
1313
|
-
}
|
|
1314
|
-
return placements;
|
|
1315
|
-
}
|
|
1316
|
-
/*
|
|
1317
|
-
Trigger Functions
|
|
1318
|
-
*/
|
|
1319
|
-
handleMouseOver() {
|
|
1320
|
-
if (this.hasTrigger('hover')) {
|
|
1321
|
-
this.show();
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
handleMouseOut() {
|
|
1325
|
-
if (this.hasTrigger('hover')) {
|
|
1326
|
-
this.hide();
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
handleClick() {
|
|
1330
|
-
if (this.hasTrigger('click')) {
|
|
1331
|
-
this.open ? this.hide() : this.show();
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
handleFocus() {
|
|
1335
|
-
if (this.hasTrigger('focus')) {
|
|
1336
|
-
this.show();
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
handleBlur() {
|
|
1340
|
-
if (this.hasTrigger('focus')) {
|
|
1341
|
-
this.hide();
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
async componentDidRender() {
|
|
1345
|
-
await this.createElement();
|
|
1346
|
-
var tooltipBox = document.getElementById("box" + this._internal_id).shadowRoot.querySelector(".tooltip-box");
|
|
1347
|
-
if (tooltipBox && tooltipBox.querySelector(".box")) {
|
|
1348
|
-
var tooltipBoxIn = tooltipBox.querySelector(".box");
|
|
1349
|
-
popoverPlacement.popoverPlacement(tooltipBoxIn, this.host, this.placement, (place) => this.placement = place);
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
render() {
|
|
1353
|
-
const classes = index$1.classnames('tooltip', ...this.getPlacement(), {
|
|
1354
|
-
// 'open': this.open
|
|
1355
|
-
});
|
|
1356
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
1357
|
-
return (index.h(index.Host, { class: hostClasses, onClick: () => this.handleClick(), onMouseOver: () => this.handleMouseOver(), onMouseOut: () => this.handleMouseOut(), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur(), tabindex: 0 }, index.h("span", { class: classes }, index.h("span", { class: "box size-2" }, this.message), index.h("slot", null))));
|
|
1358
|
-
}
|
|
1359
|
-
get host() { return index.getElement(this); }
|
|
1360
|
-
static get watchers() { return {
|
|
1361
|
-
"open": ["handleOpen"]
|
|
1362
|
-
}; }
|
|
1363
|
-
};
|
|
1364
|
-
BcmTooltip.style = tooltipCss;
|
|
1365
|
-
|
|
1366
1233
|
exports.bcm_datetime_picker = BcmDatetimePicker;
|
|
1367
|
-
exports.bcm_tooltip = BcmTooltip;
|
|
@@ -6,7 +6,7 @@ const index = require('./index-ce8878ec.js');
|
|
|
6
6
|
const index$1 = require('./index-2f62bdaf.js');
|
|
7
7
|
const utils = require('./utils-60414768.js');
|
|
8
8
|
|
|
9
|
-
const listSelectCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:inline-block;width:256px;margin:0 0 8px 0;overflow:hidden;max-width:100%}:host(.hidden){display:none}:host(.full-width){width:100%}:host(.type-autocomplete) #selected-container{border:none}:host(.type-autocomplete) #selected-container .selected-text{padding:0;border:none}:host(.type-autocomplete) #selected-container .selected-text bcm-input{display:contents}.container{display:block;max-width:256px;position:relative}.container.full-width{width:100%;max-width:100%}.selected{width:100%;box-sizing:border-box;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-grey-1);display:flex;justify-content:space-between;align-items:center;border:1px solid var(--bcm-color-grey-5);user-select:none;cursor:pointer;border-radius:2px;position:relative}.selected:hover:not(.disabled){border-color:var(--bcm-color-prime-blue-5)}.selected:hover:not(.disabled) .select-clear-button{opacity:1}.selected:focus:not(.disabled){border-color:var(--bcm-color-prime-blue-5);box-shadow:0px 0px 4px var(--bcm-color-prime-blue-6)}.selected:focus:not(.disabled) .select-clear-button{opacity:1}.selected:focus{outline:none}.selected.disabled{background-color:var(--bcm-color-grey-3);color:var(--bcm-color-grey-8);cursor:not-allowed}.selected .buttons{padding:8px;height:100%;display:flex;align-items:center;justify-content:center}.selected .selected-text{padding:0 8px;width:100%;height:100%;flex:1;display:flex;align-items:center;overflow:hidden}.selected .selected-text .text-content{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.selected .selected-text .text-content.autocomplete{position:absolute;z-index:1;padding-left:7px;background-color:#ffffff;margin-left:2px}.selected .selected-tags{padding:0 4px;height:100%}.selected .tag-container{height:100%;display:flex;align-items:center;justify-content:flex-start;grid-gap:2px}.selected .tag-container>span{height:100%;align-items:center;justify-content:flex-start;display:flex;grid-gap:2px}.selected .tag-container .tag{max-width:200px}.selected .tag-container #other-tag{cursor:pointer}.selected .open,.selected .close{display:inline-flex}.selected .close{transform:rotate(180deg)}.selected .placeholder{color:var(--bcm-color-grey-6);user-select:none;font-size:14px;display:flex;align-items:center;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.options-viewport{display:inline-block}.option-container{display:block;position:absolute;background-color:var(--bcm-color-grey-1);box-shadow:0px 2px 8px rgba(0, 0, 0, 0.15);box-sizing:border-box;width:100%;z-index:10000}.option-container.alignment-left{left:0}.option-container.alignment-right{right:0}.option-container.hidden{display:none}.option-container .search{position:sticky;padding:8px;margin-bottom:4px}.option-container .search:after{content:\"\";position:absolute;bottom:0;height:1px;width:calc(100% - 16px);background-color:var(--bcm-color-grey-5)}.items{display:flex;flex-direction:column}.buttons{display:flex}.select-clear-button{display:inline-flex;align-items:center;outline:none;border:none;background:none;padding:0;cursor:pointer;margin-right:4px;opacity:0}.label{display:block;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.selected-large{height:40px}.selected-medium{height:32px}.selected-small{height:24px}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}.error .label{color:var(--bcm-color-red-6) !important}.error .selected{border:1px solid var(--bcm-color-red-6) !important}.spinner{position:absolute;z-index:1;top:0;opacity:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#ffffff;visibility:hidden;transition:opacity 0.3s, visibility 0.5s}.spinner.show{visibility:visible;opacity:0.9}.spinner.first-run{visibility:visible;opacity:1}.tag{display:flex;align-items:center;justify-content:center;padding:0 8px;cursor:default;border-radius:48px;border:1px solid var(--bcm-color-grey-5);user-select:none;min-width:10px;min-height:20px;height:20px}.tag[hidden]{opacity:0 !important;position:absolute !important;z-index:-1}.tag .value{cursor:pointer;max-width:164px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.tag.size-large{padding:calc(40px - 8px) 40px}.tag.size-medium{padding:calc(32px - 8px) 32px}.tag.size-small{padding:calc(24px - 8px) 24px}.tag.dissmisable{background-color:var(--bcm-color-grey-3);color:var(--bcm-color-grey-8)}.tag.dissmisable:hover{opacity:0.85}.tag.dissmisable{color:var(--bcm-color-grey-10)}.tag.dissmisable .close-button{width:14px;cursor:pointer
|
|
9
|
+
const listSelectCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:inline-block;width:256px;margin:0 0 8px 0;overflow:hidden;max-width:100%}:host(.hidden){display:none}:host(.full-width){width:100%}:host(.type-autocomplete) #selected-container{border:none}:host(.type-autocomplete) #selected-container .selected-text{padding:0;border:none}:host(.type-autocomplete) #selected-container .selected-text bcm-input{display:contents}.container{display:block;max-width:256px;position:relative}.container.full-width{width:100%;max-width:100%}.selected{width:100%;box-sizing:border-box;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-grey-1);display:flex;justify-content:space-between;align-items:center;border:1px solid var(--bcm-color-grey-5);user-select:none;cursor:pointer;border-radius:2px;position:relative}.selected:hover:not(.disabled){border-color:var(--bcm-color-prime-blue-5)}.selected:hover:not(.disabled) .select-clear-button{opacity:1}.selected:focus:not(.disabled){border-color:var(--bcm-color-prime-blue-5);box-shadow:0px 0px 4px var(--bcm-color-prime-blue-6)}.selected:focus:not(.disabled) .select-clear-button{opacity:1}.selected:focus{outline:none}.selected.disabled{background-color:var(--bcm-color-grey-3);color:var(--bcm-color-grey-8);cursor:not-allowed}.selected .buttons{padding:8px;height:100%;display:flex;align-items:center;justify-content:center}.selected .selected-text{padding:0 8px;width:100%;height:100%;flex:1;display:flex;align-items:center;overflow:hidden}.selected .selected-text .text-content{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.selected .selected-text .text-content.autocomplete{position:absolute;z-index:1;padding-left:7px;background-color:#ffffff;margin-left:2px}.selected .selected-tags{padding:0 4px;height:100%}.selected .tag-container{height:100%;display:flex;align-items:center;justify-content:flex-start;grid-gap:2px}.selected .tag-container>span{height:100%;align-items:center;justify-content:flex-start;display:flex;grid-gap:2px}.selected .tag-container .tag{max-width:200px}.selected .tag-container #other-tag{cursor:pointer}.selected .open,.selected .close{display:inline-flex}.selected .close{transform:rotate(180deg)}.selected .placeholder{color:var(--bcm-color-grey-6);user-select:none;font-size:14px;display:flex;align-items:center;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.options-viewport{display:inline-block}.option-container{display:block;position:absolute;background-color:var(--bcm-color-grey-1);box-shadow:0px 2px 8px rgba(0, 0, 0, 0.15);box-sizing:border-box;width:100%;z-index:10000}.option-container.alignment-left{left:0}.option-container.alignment-right{right:0}.option-container.hidden{display:none}.option-container .search{position:sticky;padding:8px;margin-bottom:4px}.option-container .search:after{content:\"\";position:absolute;bottom:0;height:1px;width:calc(100% - 16px);background-color:var(--bcm-color-grey-5)}.items{display:flex;flex-direction:column}.buttons{display:flex}.select-clear-button{display:inline-flex;align-items:center;outline:none;border:none;background:none;padding:0;cursor:pointer;margin-right:4px;opacity:0}.label{display:block;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.selected-large{height:40px}.selected-medium{height:32px}.selected-small{height:24px}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}.error .label{color:var(--bcm-color-red-6) !important}.error .selected{border:1px solid var(--bcm-color-red-6) !important}.spinner{position:absolute;z-index:1;top:0;opacity:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#ffffff;visibility:hidden;transition:opacity 0.3s, visibility 0.5s}.spinner.show{visibility:visible;opacity:0.9}.spinner.first-run{visibility:visible;opacity:1}.tag{display:flex;align-items:center;justify-content:center;padding:0 8px;cursor:default;border-radius:48px;border:1px solid var(--bcm-color-grey-5);user-select:none;min-width:10px;min-height:20px;height:20px}.tag[hidden]{opacity:0 !important;position:absolute !important;z-index:-1}.tag .value{cursor:pointer;max-width:164px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.tag.size-large{padding:calc(40px - 8px) 40px}.tag.size-medium{padding:calc(32px - 8px) 32px}.tag.size-small{padding:calc(24px - 8px) 24px}.tag.dissmisable{background-color:var(--bcm-color-grey-3);color:var(--bcm-color-grey-8)}.tag.dissmisable:hover{opacity:0.85}.tag.dissmisable{color:var(--bcm-color-grey-10)}.tag.dissmisable .close-button{width:14px;cursor:pointer;fill:var(--bcm-color-grey-7)}.tag.dissmisable .close-button:hover{fill:var(--bcm-color-grey-10)}.tag span{display:inline-flex}.tag span.left{margin-right:4px}.tag span.right{margin-left:4px}.tag:before,.tag:after{content:\"\"}";
|
|
10
10
|
|
|
11
11
|
const BcmListSelect = class {
|
|
12
12
|
constructor(hostRef) {
|
|
@@ -222,11 +222,15 @@ const BcmListSelect = class {
|
|
|
222
222
|
/**
|
|
223
223
|
* @descc
|
|
224
224
|
*/
|
|
225
|
-
clickClear() {
|
|
225
|
+
clickClear(event = null) {
|
|
226
226
|
const element = document.querySelector("#" + this._list_id);
|
|
227
227
|
if (element) {
|
|
228
228
|
element.setClear(false);
|
|
229
229
|
}
|
|
230
|
+
if (event) {
|
|
231
|
+
event.stopPropagation();
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
}
|
|
230
234
|
}
|
|
231
235
|
/**
|
|
232
236
|
* @desc
|
|
@@ -339,10 +343,10 @@ const BcmListSelect = class {
|
|
|
339
343
|
newTag.setAttribute("_internal_id", this._internal_id);
|
|
340
344
|
newTag.innerHTML = '<span class="value"> ' + item["text"] + ' </span>'
|
|
341
345
|
+ '<span id="close-button" ' + '_internal_id="' + this._internal_id + '" class="right close-button"> '
|
|
342
|
-
+ '<svg class="icon" width="24" height="24" viewBox="0 0 24 24"
|
|
346
|
+
+ '<svg class="icon" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> '
|
|
343
347
|
+ '<g id="icon/outlined/suggested/close">'
|
|
344
|
-
+ '<path id="Vector" d="M18.9275 4.07814L19.9219 5.07251C20.0103 5.1609 20.0103 5.24928 19.9219 5.33767L5.3378 19.9218C5.24941 20.0101 5.16102 20.0101 5.07263 19.9218L4.07826 18.9274C3.98987 18.839 3.98987 18.7506 4.07826 18.6622L18.6623 4.07814C18.7507 3.98975 18.8391 3.98975 18.9275 4.07814Z"
|
|
345
|
-
+ '<path id="Vector_2" d="M5.33766 4.07814L19.9217 18.6622C20.0101 18.7506 20.0101 18.839 19.9217 18.9274L18.9274 19.9218C18.839 20.0101 18.7506 20.0101 18.6622 19.9218L4.07813 5.33767C3.98974 5.24928 3.98974 5.1609 4.07813 5.07251L5.0725 4.07814C5.16088 3.98975 5.24927 3.98975 5.33766 4.07814Z"
|
|
348
|
+
+ '<path id="Vector" d="M18.9275 4.07814L19.9219 5.07251C20.0103 5.1609 20.0103 5.24928 19.9219 5.33767L5.3378 19.9218C5.24941 20.0101 5.16102 20.0101 5.07263 19.9218L4.07826 18.9274C3.98987 18.839 3.98987 18.7506 4.07826 18.6622L18.6623 4.07814C18.7507 3.98975 18.8391 3.98975 18.9275 4.07814Z" />'
|
|
349
|
+
+ '<path id="Vector_2" d="M5.33766 4.07814L19.9217 18.6622C20.0101 18.7506 20.0101 18.839 19.9217 18.9274L18.9274 19.9218C18.839 20.0101 18.7506 20.0101 18.6622 19.9218L4.07813 5.33767C3.98974 5.24928 3.98974 5.1609 4.07813 5.07251L5.0725 4.07814C5.16088 3.98975 5.24927 3.98975 5.33766 4.07814Z" />'
|
|
346
350
|
+ '</g>'
|
|
347
351
|
+ '</svg>'
|
|
348
352
|
+ '</span>';
|
|
@@ -468,6 +472,14 @@ const BcmListSelect = class {
|
|
|
468
472
|
// await delay(100)
|
|
469
473
|
this.handleLoading(false);
|
|
470
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
* @desc
|
|
477
|
+
*/
|
|
478
|
+
valueWatch(newValue) {
|
|
479
|
+
if (Array.isArray(newValue) && newValue.length == 0) {
|
|
480
|
+
this.value = "";
|
|
481
|
+
}
|
|
482
|
+
}
|
|
471
483
|
/**
|
|
472
484
|
* @desc
|
|
473
485
|
*/
|
|
@@ -632,11 +644,14 @@ const BcmListSelect = class {
|
|
|
632
644
|
// <slot />
|
|
633
645
|
// </div>
|
|
634
646
|
// </Host>
|
|
635
|
-
index.h(index.Host, { class: hostClasses, onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }, index.h("div", { class: container }, label && index.h("
|
|
647
|
+
index.h(index.Host, { class: hostClasses, onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }, index.h("div", { class: container }, label && index.h("div", null, index.h("bcm-label", { onClick: () => this.handleOpen(), tooltip: this.tooltip, type: captionType, value: label, required: required })), index.h("div", { id: "selected-container", class: selected, onClick: () => this.handleOpen(), tabIndex: -1 }, index.h("span", { class: selectedText, title: selectText !== null && (selectText) }, index.h("div", { class: "spinner first-run" }), this.type === 'select' && (selectText !== null && (index.h("div", { class: "text-content" }, selectText))), (this.type === 'select' || this.type === 'autocomplete' && this.multiSelect === true) && (selectText === null && (index.h("span", { id: "tagcontainer", class: "tag-container" }, index.h("span", { id: "visible-tags" }), index.h("span", { id: "other-container" }, index.h("bcm-tag", { _internal_id: this._internal_id, customStyle: customStyleOtherTag, type: "dissmisable", id: "other-tag" }))))), this.type === 'select' && (selectText === null && selectData.length === 0 && placeholder !== null && (index.h("span", { class: "placeholder" }, " ", placeholder, " "))), this.type === 'autocomplete' && (index.h("bcm-input", { _internal_id: this._internal_id, onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur("input"), "on-bcm-change": e => this.inputChange(e.detail), "full-width": true, placeholder: this.searchPlaceholder, id: "autocomplete", "no-caption": true, "no-margin": true, type: "search", clearable: true }))), this.type === 'select' && (index.h("div", { class: "buttons" }, clearable && value && (index.h("button", { id: "clear-button", class: "select-clear-button", onClick: (e) => this.clickClear(e) }, index.h("bcm-icon", { icon: "close-circle", type: "fill", size: 18, color: "grey-7" }))), index.h("span", { class: isOpen ? 'open' : 'close' }, index.h("bcm-icon", { icon: "caret-up", type: "outlined", size: 18, color: "grey-6" }))))), noCaption === false && (index.h("div", { class: "caption-area" }, captionType == "error"
|
|
636
648
|
? index.h("span", { class: captionClasses }, " ", captionError, " ")
|
|
637
649
|
: caption && index.h("span", { class: captionClasses }, " ", caption, " "))))));
|
|
638
650
|
}
|
|
639
651
|
get el() { return index.getElement(this); }
|
|
652
|
+
static get watchers() { return {
|
|
653
|
+
"value": ["valueWatch"]
|
|
654
|
+
}; }
|
|
640
655
|
};
|
|
641
656
|
BcmListSelect.style = listSelectCss;
|
|
642
657
|
|
|
@@ -6,7 +6,7 @@ const index = require('./index-ce8878ec.js');
|
|
|
6
6
|
const index$1 = require('./index-2f62bdaf.js');
|
|
7
7
|
const utils = require('./utils-60414768.js');
|
|
8
8
|
|
|
9
|
-
const listCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:block;position:relative;user-select:none;width:fit-content;height:fit-content}:host main{width:256px;height:256px;background-color:#ffffff;border:1px solid #d9d9d9;box-sizing:border-box;transition:height 1s ease 1s;display:flex;flex-direction:column;position:relative;padding-top:8px}:host(.full-width){width:100%}:host(.full-width) main{width:100%}:host(.linked){z-index:-999;position:absolute;opacity:0;top:-10000;left:-10000;visibility:hidden !important;box-shadow:0px 2px 8px rgba(0, 0, 0, 0.15)}:host(.linked.show){opacity:1;visibility:visible !important;z-index:100000}:host(.flex){width:100%;height:100%}:host(.flex) main{width:100%}:host(.type-autocomplete) .search-container{height:0;margin:0;padding:0;overflow:hidden}.label{display:block;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}:host(.error) .label{color:var(--bcm-color-red-6) !important}:host(.error) main{border:1px solid var(--bcm-color-red-6) !important}.search-container{margin:0 8px;padding-top:8px;background-color:#ffffff}.search-container+.list-container{padding-top:0}.footer{text-align:right;padding:4px 8px;background-color:var(--bcm-color-grey-3)}.list-container{flex:1;overflow-y:auto;display:flex;flex-direction:column;grid-gap:4px;position:relative}.list-container .list{display:flex;flex-direction:column;grid-gap:4px}.spinner{position:absolute;z-index:1;top:0;opacity:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#ffffff;visibility:hidden;transition:opacity 0.3s, visibility 0.5s}.spinner.show{visibility:visible;opacity:0.8}.spinner.first-run{visibility:visible;opacity:0.9}.list-item{padding:8px;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-grey-1);cursor:pointer;display:flex;justify-content:flex-start;align-items:center;flex-direction:row;margin:0 8px}.list-item:hover:not(.disabled),.list-item:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.divider{margin:0 8px}";
|
|
9
|
+
const listCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:block;position:relative;user-select:none;width:fit-content;height:fit-content}:host main{width:256px;height:256px;background-color:#ffffff;border:1px solid #d9d9d9;box-sizing:border-box;transition:height 1s ease 1s;display:flex;flex-direction:column;position:relative;padding-top:8px}:host(.full-width){width:100%}:host(.full-width) main{width:100%}:host(.linked){z-index:-999;position:absolute;opacity:0;top:-10000;left:-10000;visibility:hidden !important;box-shadow:0px 2px 8px rgba(0, 0, 0, 0.15)}:host(.linked.show){opacity:1;visibility:visible !important;z-index:100000}:host(.flex){width:100%;height:100%}:host(.flex) main{width:100%}:host(.type-autocomplete) .search-container{height:0;margin:0;padding:0;overflow:hidden}.label{display:block;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}:host(.error) .label{color:var(--bcm-color-red-6) !important}:host(.error) main{border:1px solid var(--bcm-color-red-6) !important}.search-container{margin:0 8px;padding-top:8px;background-color:#ffffff}.search-container+.list-container{padding-top:0}.footer{text-align:right;padding:4px 8px;background-color:var(--bcm-color-grey-3)}.list-container{flex:1;overflow-y:auto;display:flex;flex-direction:column;grid-gap:4px;position:relative}.list-container .list{display:flex;flex-direction:column;grid-gap:4px}.check-container{display:block}.check-container.hidden{display:none}.empty{display:none;align-items:center;justify-content:center;flex:1;height:100%}.empty.show{display:flex}.spinner{position:absolute;z-index:1;top:0;opacity:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#ffffff;visibility:hidden;transition:opacity 0.3s, visibility 0.5s}.spinner.show{visibility:visible;opacity:0.8}.spinner.first-run{visibility:visible;opacity:0.9}.list-item{padding:8px;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-grey-1);cursor:pointer;display:flex;justify-content:flex-start;align-items:center;flex-direction:row;margin:0 8px}.list-item:hover:not(.disabled),.list-item:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.divider{margin:0 8px}";
|
|
10
10
|
|
|
11
11
|
const lowercase = (str) => str.toLowerCase();
|
|
12
12
|
const BcmList = class {
|
|
@@ -91,6 +91,7 @@ const BcmList = class {
|
|
|
91
91
|
if (this.type !== 'default' || this.linkedComponent !== null) {
|
|
92
92
|
this.isShow = false;
|
|
93
93
|
this.el.classList.add("linked");
|
|
94
|
+
this.el.classList.remove("show");
|
|
94
95
|
this.handleLinkedComponent();
|
|
95
96
|
}
|
|
96
97
|
const slot = this.el.shadowRoot.querySelectorAll('bcm-list-item');
|
|
@@ -142,6 +143,7 @@ const BcmList = class {
|
|
|
142
143
|
if (this.searchable == true) {
|
|
143
144
|
// var searchInput = null
|
|
144
145
|
const searchInput = this.el.shadowRoot.querySelector("bcm-search");
|
|
146
|
+
// console.log(searchInput)
|
|
145
147
|
if (searchInput) {
|
|
146
148
|
searchInput.setClear();
|
|
147
149
|
if (select == true) {
|
|
@@ -156,11 +158,14 @@ const BcmList = class {
|
|
|
156
158
|
async show() {
|
|
157
159
|
if (this.processType == 'deselect') {
|
|
158
160
|
this.firstRender = true;
|
|
159
|
-
this.
|
|
160
|
-
|
|
161
|
+
if (this.items != this.otherList) {
|
|
162
|
+
this.isRendered = false;
|
|
163
|
+
this.setData(this.otherList);
|
|
164
|
+
}
|
|
161
165
|
}
|
|
162
166
|
this.isShow = true;
|
|
163
167
|
this.renderList();
|
|
168
|
+
this.clearAndSelectSearch(true);
|
|
164
169
|
}
|
|
165
170
|
/**
|
|
166
171
|
* @desc
|
|
@@ -606,6 +611,18 @@ const BcmList = class {
|
|
|
606
611
|
*/
|
|
607
612
|
handleClick(event) {
|
|
608
613
|
var path = event.path || (event.composedPath && event.composedPath());
|
|
614
|
+
// const elementId = "bcm-list-select-" + this._id
|
|
615
|
+
// console.log (
|
|
616
|
+
// !!(
|
|
617
|
+
// path
|
|
618
|
+
// && path.filter((input: HTMLElement) => input['_internal_id'] == this._internal_id)[0]
|
|
619
|
+
// && (
|
|
620
|
+
// path.filter((input: HTMLElement) => input['id'] == "clear-button")[0] !== undefined
|
|
621
|
+
// || path.filter((input: HTMLElement) => input['id'] == "close-button")[0] !== undefined
|
|
622
|
+
// || path.filter((input: HTMLElement) => input['id'] == "close")[0] !== undefined
|
|
623
|
+
// )
|
|
624
|
+
// )
|
|
625
|
+
// )
|
|
609
626
|
if (!this.el.contains(event.target)
|
|
610
627
|
|| (path
|
|
611
628
|
&& path.filter((input) => input['_internal_id'] == this._internal_id)[0]
|
|
@@ -923,6 +940,7 @@ const BcmList = class {
|
|
|
923
940
|
* @desc
|
|
924
941
|
*/
|
|
925
942
|
calculatedTotals(calcObject) {
|
|
943
|
+
var searchResult = -1;
|
|
926
944
|
if (calcObject["selected"] != undefined) {
|
|
927
945
|
if (this.infoFooter == true && this.el.shadowRoot.querySelector("#selected-item")) {
|
|
928
946
|
if (calcObject["selected"] > 0) {
|
|
@@ -941,6 +959,7 @@ const BcmList = class {
|
|
|
941
959
|
else {
|
|
942
960
|
this.el.shadowRoot.querySelector("#search-result").innerHTML = calcObject["searchResult"] + " / ";
|
|
943
961
|
}
|
|
962
|
+
searchResult = calcObject["searchResult"];
|
|
944
963
|
}
|
|
945
964
|
}
|
|
946
965
|
if (calcObject["total"] != undefined) {
|
|
@@ -950,6 +969,24 @@ const BcmList = class {
|
|
|
950
969
|
this.el.shadowRoot.querySelector("#variable-text").innerHTML = utils.pluralize(this.variableText, calcObject["total"]);
|
|
951
970
|
}
|
|
952
971
|
}
|
|
972
|
+
const empty = this.el.shadowRoot.querySelector("#empty");
|
|
973
|
+
const selectAll = this.el.shadowRoot.querySelector("#check-container");
|
|
974
|
+
if (searchResult == 0 || this.total == 0) {
|
|
975
|
+
if (empty) {
|
|
976
|
+
empty.classList.add("show");
|
|
977
|
+
}
|
|
978
|
+
if (selectAll) {
|
|
979
|
+
selectAll.classList.add("hidden");
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
else {
|
|
983
|
+
if (empty) {
|
|
984
|
+
empty.classList.remove("show");
|
|
985
|
+
}
|
|
986
|
+
if (selectAll) {
|
|
987
|
+
selectAll.classList.remove("hidden");
|
|
988
|
+
}
|
|
989
|
+
}
|
|
953
990
|
}
|
|
954
991
|
/**
|
|
955
992
|
* @desc
|
|
@@ -1151,7 +1188,7 @@ const BcmList = class {
|
|
|
1151
1188
|
};
|
|
1152
1189
|
var mainStyle = Object.assign({ 'height': styleHeight }, customStyle);
|
|
1153
1190
|
var hostStyle = Object.assign({ 'height': styleHeight + labelAreaHeight }, customStyle);
|
|
1154
|
-
return (index.h(index.Host, { class: hostClasses, style: hostStyle }, (this.type === 'default' && this.processType === 'default' && this.label) && (index.h("label", {
|
|
1191
|
+
return (index.h(index.Host, { class: hostClasses, style: hostStyle }, (this.type === 'default' && this.processType === 'default' && this.label) && (index.h("div", null, index.h("bcm-label", { tooltip: this.tooltip, type: this.captionType, value: this.label, required: this.required }))), index.h("main", { style: mainStyle }, this.searchable === true && (index.h("div", { class: searchContainer }, index.h("bcm-search", { id: "search", _internal_id: this._internal_id, searchPlaceholder: this.searchPlaceholder, data: this.searchData, returnField: this.returnField, searchFields: this.searchFields, searchValue: this.searchText, clearable: true }), index.h("bcm-divider", null))), index.h("div", { class: classes }, this.multiSelect === true && (index.h("div", { id: "check-container", class: "check-container" }, index.h("div", { class: listItem, id: "text", onClick: (e) => this.handleIndeterminateClick(e) }, index.h("div", { class: "check-content" }, index.h("bcm-checkbox-lite", { id: 'check-lite-' + this._id, name: 'check-lite-' + this._id, checked: false, indeterminate: false, onClick: (e) => this.handleCheckboxClick(e) })), "Select All"), index.h("div", { class: "divider" }, index.h("bcm-divider", null)))), index.h("slot", null), index.h("div", { class: "list" }), index.h("div", { class: "spinner first-run" }, index.h("bcm-icon", { type: "animated", color: "prime-blue", class: "prefix", icon: "loading" })), index.h("div", { id: "empty", class: "empty" }, index.h("bcm-empty", { size: "small", text: "No Data" }))), this.infoFooter == true && (index.h("div", { class: footer }, index.h("bcm-text", { scale: "size-1", color: "grey-8" }, this.multiSelect === true && (index.h("span", { id: "selected-item" })), "Total ", index.h("span", { id: "search-result" }), " ", index.h("span", { id: "in-total" }, "0"), " ", index.h("span", { id: "variable-text" }, " ", utils.pluralize(this.variableText)), " found.")))), (this.type === 'default' && this.processType === 'default' && !this.noCaption) && (index.h("div", { class: "caption-area" }, this.captionType == "error"
|
|
1155
1192
|
? index.h("span", { class: captionClasses }, " ", this.captionError, " ")
|
|
1156
1193
|
: this.caption && index.h("span", { class: captionClasses }, " ", this.caption, " ")))));
|
|
1157
1194
|
}
|
|
@@ -6,69 +6,6 @@ const index = require('./index-ce8878ec.js');
|
|
|
6
6
|
const index$1 = require('./index-2f62bdaf.js');
|
|
7
7
|
const utils = require('./utils-60414768.js');
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* 'image' prop predefined values
|
|
11
|
-
*/
|
|
12
|
-
var ImageProps;
|
|
13
|
-
(function (ImageProps) {
|
|
14
|
-
ImageProps["default"] = "default.svg";
|
|
15
|
-
ImageProps["simple"] = "simple.svg";
|
|
16
|
-
})(ImageProps || (ImageProps = {}));
|
|
17
|
-
/**
|
|
18
|
-
* 'size' prop predefined values
|
|
19
|
-
*/
|
|
20
|
-
var SizeProps;
|
|
21
|
-
(function (SizeProps) {
|
|
22
|
-
SizeProps["small"] = "small";
|
|
23
|
-
SizeProps["medium"] = "medium";
|
|
24
|
-
SizeProps["big"] = "big";
|
|
25
|
-
})(SizeProps || (SizeProps = {}));
|
|
26
|
-
|
|
27
|
-
const emptyCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:block}:host(.hidden){display:none}.empty.small{max-width:100px}.empty.medium{max-width:140px}.empty.big{max-width:200px}.text{font-size:14px;color:var(--bcm-color-grey-8)}.content{text-align:center}img{max-width:100%}";
|
|
28
|
-
|
|
29
|
-
const BcmEmpty = class {
|
|
30
|
-
constructor(hostRef) {
|
|
31
|
-
index.registerInstance(this, hostRef);
|
|
32
|
-
/**
|
|
33
|
-
* Component Properties
|
|
34
|
-
*/
|
|
35
|
-
this._image = ImageProps.default;
|
|
36
|
-
this.size = SizeProps.medium;
|
|
37
|
-
this.hidden = false;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @ComponentMethod
|
|
41
|
-
*/
|
|
42
|
-
componentWillLoad() {
|
|
43
|
-
this.parseImage(this._image);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @desc
|
|
47
|
-
* @param newValue
|
|
48
|
-
* @returns {void}
|
|
49
|
-
*/
|
|
50
|
-
parseImage(newValue) {
|
|
51
|
-
if (newValue) {
|
|
52
|
-
newValue in ImageProps
|
|
53
|
-
? this.image = ImageProps[newValue]
|
|
54
|
-
: this.image = ImageProps.default;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
render() {
|
|
58
|
-
const classes = index$1.classnames('empty', {
|
|
59
|
-
[this.size]: this.size
|
|
60
|
-
});
|
|
61
|
-
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
62
|
-
return (index.h(index.Host, { class: hostClasses }, index.h("div", { class: classes }, index.h("img", { src: index.getAssetPath(`./static/${this.image}`) }), index.h("div", { class: "content" }, this.text && (index.h("span", { class: "text" }, this.text)), index.h("slot", null)))));
|
|
63
|
-
}
|
|
64
|
-
static get assetsDirs() { return ["static"]; }
|
|
65
|
-
get el() { return index.getElement(this); }
|
|
66
|
-
static get watchers() { return {
|
|
67
|
-
"_image": ["parseImage"]
|
|
68
|
-
}; }
|
|
69
|
-
};
|
|
70
|
-
BcmEmpty.style = emptyCss;
|
|
71
|
-
|
|
72
9
|
const listboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:block;width:fit-content;height:fit-content;background-color:#ffffff}:host(.hidden){display:none}:host(.flex){width:100%;height:100%}:host(.flex) .bcm-listbox{max-height:100%;max-width:100%;height:100%;min-width:100%}:host(.full-width){width:100%}:host(.full-width) .bcm-listbox{max-width:100%;min-width:100%}.bcm-listbox{flex:1;background-color:var(--bcm-color-grey-1);width:fit-content;display:flex;flex-direction:column;height:100%;width:100%;min-width:256px;max-width:256px;min-height:auto;max-height:300px;box-sizing:border-box;border:1px solid var(--bcm-color-grey-5)}.bcm-listbox-list{flex:1;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;border-bottom:none}.bcm-listbox-list.loading{min-height:150px;position:relative;margin:0 8px 8px 8px}.bcm-listbox-list .loading{display:none;align-items:center;justify-content:center;height:100%;width:100%;position:absolute;background-color:rgba(255, 255, 255, 0.03)}.bcm-listbox-list .loading.show{display:flex}.bcm-listbox-list .list-container.hidden{display:none}.bcm-listbox .search{padding:8px;padding-bottom:0}.bcm-listbox .search.hidden{display:none !important}.bcm-listbox .empty{display:none;align-items:center;justify-content:center;flex:1;height:100%}.bcm-listbox .empty.show{display:flex}.bcm-listbox-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-color-grey-3)}.label{display:block;color:var(--bcm-color-grey-9);margin-bottom:4px}.listbox-item{display:flex;align-items:stretch;justify-content:flex-start;flex-direction:column;color:var(--bcm-color-grey-8);user-select:none;background-color:var(--bcm-color-grey-1)}.listbox-item.hidden{display:none}.listbox-item .divider{padding:0 8px}.listbox-item-container{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;padding-left:8px;width:100%}.listbox-item-container .check-content{display:flex;align-items:center;justify-content:flex-start;width:16px;min-width:16px;margin-right:4px}.listbox-item-container .check-content .indeterminate{width:16px;height:16px;position:relative;display:block;padding-right:8px;cursor:pointer}.listbox-item-container .check-content .indeterminate:after{content:\"\";position:absolute;top:50%;left:9px;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:1;z-index:1}.listbox-item-container .check-content .indeterminate:before{content:\"\";position:absolute;top:-1px;left:0px;width:16px;height:100%;border-radius:2px;background-color:transparent;border:1px solid var(--bcm-color-grey-5);opacity:1;z-index:2}.listbox-item-container .check-content .indeterminate:hover:before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.listbox-item-container-text-content{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;cursor:pointer;width:100%;padding:4px 8px 4px 4px}.listbox-item-container.disabled{color:var(--bcm-color-grey-6)}.listbox-item-container.selected{color:var(--bcm-color-prime-blue-6)}.listbox-item-container.selected:hover:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.listbox-item-container:hover:not(.disabled),.listbox-item-container:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.caption-area{margin-bottom:8px;min-height:20px}.input-caption{display:block}.error.label{color:var(--bcm-color-red-6) !important}.error.bcm-listbox{border:1px solid var(--bcm-color-red-6) !important}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}.input-large{height:38px}.input-medium{height:30px}.input-small{height:20px}";
|
|
73
10
|
|
|
74
11
|
/**
|
|
@@ -368,6 +305,7 @@ const BcmListbox = class {
|
|
|
368
305
|
? this.size = _config['size']
|
|
369
306
|
: this.size = 'medium';
|
|
370
307
|
}
|
|
308
|
+
this.searchSub = this.objectMapping['items'];
|
|
371
309
|
if (_config['mapping']) {
|
|
372
310
|
if (_config['mapping']['id']) {
|
|
373
311
|
this.objectMapping['id'] = String(_config['mapping']['id']);
|
|
@@ -403,15 +341,14 @@ const BcmListbox = class {
|
|
|
403
341
|
if (_config['mapping']['selected']) {
|
|
404
342
|
this.objectMapping['selected'] = _config['mapping']['selected'];
|
|
405
343
|
}
|
|
406
|
-
if (
|
|
407
|
-
|
|
408
|
-
this.objectMapping['items'] = _config['mapping']['items'];
|
|
409
|
-
this.searchSub = this.objectMapping['items'];
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
344
|
+
if (_config['mapping']['items']) {
|
|
345
|
+
this.objectMapping['items'] = _config['mapping']['items'];
|
|
413
346
|
this.searchSub = this.objectMapping['items'];
|
|
414
347
|
}
|
|
348
|
+
// if ( this.treeview ) {
|
|
349
|
+
// }else{
|
|
350
|
+
// this.searchSub = this.objectMapping['items']
|
|
351
|
+
// }
|
|
415
352
|
}
|
|
416
353
|
sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
|
|
417
354
|
// forceUpdate(this.el)
|
|
@@ -953,10 +890,7 @@ const BcmListbox = class {
|
|
|
953
890
|
customStyles = Object.assign(Object.assign({}, customStyles), { 'height': this.height });
|
|
954
891
|
}
|
|
955
892
|
const captionClasses = index$1.classnames('size-1', 'input-caption', 'caption-' + captionType);
|
|
956
|
-
|
|
957
|
-
'error': captionType == 'error' ? true : false
|
|
958
|
-
});
|
|
959
|
-
return (index.h(index.Host, { class: hostClasses, style: customStyles, "bcm-internal-id": this._internal_id }, !innerComponent && label && index.h("label", { class: labelClasses }, " ", label, " ", required && ('*'), " "), treeview === true && (index.h("bcm-treeview", { _internal_id: this._internal_id })), treeview == false && (index.h("div", { class: bcmListbox, style: customStyles }, search && (index.h("div", { class: "search", id: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, index.h("bcm-search", { _internal_id: this._internal_id, searchPlaceholder: this.searchPlaceholder, searchValue: searchText, "on-bcm-focus": () => this.handleFocus(true), "on-bcm-blur": () => this.handleFocus(false), data: searchData, returnField: returnField, searchFields: searchFields, searchSub: searchSub, clearable: true }), index.h("bcm-divider", null))), index.h("div", { id: "bcm-listbox-list", class: "bcm-listbox-list loading", style: customStylesList }, checkboxes && (index.h("div", { class: classes, id: "checkall" }, index.h("div", { class: classesContainer, onClick: () => this.handleIndeterminateClick() }, index.h("div", { class: "check-content" }, indeterminateState == 'indeterminate' && (index.h("span", { class: "indeterminate" })) || (index.h("bcm-checkbox", { onClick: (e) => this.handleCheckboxClick(e), checked: checked, noCaption: true }))), index.h("div", { class: textContent }, "Select All")), index.h("div", { class: "divider" }, index.h("bcm-divider", null)))),
|
|
893
|
+
return (index.h(index.Host, { class: hostClasses, style: customStyles, "bcm-internal-id": this._internal_id }, !innerComponent && label && index.h("div", null, index.h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })), treeview === true && (index.h("bcm-treeview", { _internal_id: this._internal_id })), treeview == false && (index.h("div", { class: bcmListbox, style: customStyles }, search && (index.h("div", { class: "search", id: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, index.h("bcm-search", { _internal_id: this._internal_id, searchPlaceholder: this.searchPlaceholder, searchValue: searchText, "on-bcm-focus": () => this.handleFocus(true), "on-bcm-blur": () => this.handleFocus(false), data: searchData, returnField: returnField, searchFields: searchFields, searchSub: searchSub, clearable: true }), index.h("bcm-divider", null))), index.h("div", { id: "bcm-listbox-list", class: "bcm-listbox-list loading", style: customStylesList }, checkboxes && (index.h("div", { class: classes, id: "checkall" }, index.h("div", { class: classesContainer, onClick: () => this.handleIndeterminateClick() }, index.h("div", { class: "check-content" }, indeterminateState == 'indeterminate' && (index.h("span", { class: "indeterminate" })) || (index.h("bcm-checkbox", { onClick: (e) => this.handleCheckboxClick(e), checked: checked, noCaption: true }))), index.h("div", { class: textContent }, "Select All")), index.h("div", { class: "divider" }, index.h("bcm-divider", null)))),
|
|
960
894
|
// this.empty == false && (
|
|
961
895
|
index.h("div", { id: "list-container", class: listContainer, style: listContainerStyle }, this.items.length !== 0 && this.items.map((item) => ((item.type === 'group' ? this.recursiveGroupRenderer(item) : this.itemRenderer(item)))))
|
|
962
896
|
// )
|
|
@@ -2311,7 +2245,6 @@ const BcmtreeviewItem = class {
|
|
|
2311
2245
|
};
|
|
2312
2246
|
BcmtreeviewItem.style = treeviewItemCss;
|
|
2313
2247
|
|
|
2314
|
-
exports.bcm_empty = BcmEmpty;
|
|
2315
2248
|
exports.bcm_listbox = BcmListbox;
|
|
2316
2249
|
exports.bcm_listbox_group = BcmListboxGroup;
|
|
2317
2250
|
exports.bcm_listbox_item = BcmListboxItem;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-ce8878ec.js');
|
|
6
6
|
const index$1 = require('./index-2f62bdaf.js');
|
|
7
7
|
|
|
8
|
-
const popconfirmBoxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:inline-flex}:host(.hidden){display:none}:host(:focus){outline:none}.popconfirm-box{position:relative;}.popconfirm-box .box{position:absolute;display:none;box-sizing:border-box;background-color:#FFFFFF;border:1px solid #FFFFFF;border-radius:2px;z-index:10700;width:230px;filter:drop-shadow(0px 1px 6px rgba(0, 0, 0, 0.25));padding:8px 16px}.popconfirm-box .box .content{display:flex}.popconfirm-box .box .content .icon{margin-right:8px;margin-top:4px}.popconfirm-box .box .buttons{display:flex;justify-content:flex-end;margin-top:8px}.popconfirm-box .box .buttons bcm-button:first-child{margin-right:8px}.popconfirm-box::after{content:\"\";position:absolute;display:none;border:6px solid;z-index:10700}.popconfirm-box.open .box,.popconfirm-box.open::after{display:block}.popconfirm-box.top .box{bottom:100%;margin-bottom:16px}.popconfirm-box.top::after{bottom:100%;margin-bottom:4px;border-color:#FFFFFF transparent transparent transparent}.popconfirm-box.bottom .box{top:100%;margin-top:16px}.popconfirm-box.bottom::after{top:100%;margin-top:4px;border-color:transparent transparent #FFFFFF transparent}.popconfirm-box.left .box{right:100%;margin-right:16px}.popconfirm-box.left::after{right:100%;margin-right:4px;border-color:transparent transparent transparent #FFFFFF}.popconfirm-box.right .box{left:100%;margin-left:16px}.popconfirm-box.right::after{left:100%;margin-left:4px;border-color:transparent #FFFFFF transparent transparent}.popconfirm-box.top.center .box,.popconfirm-box.bottom.center .box{left:50%;transform:translateX(-50%)}.popconfirm-box.top.center::after,.popconfirm-box.bottom.center::after{left:50%;transform:translateX(-50%)}.popconfirm-box.top.start .box,.popconfirm-box.bottom.start .box{left:0}.popconfirm-box.top.start::after,.popconfirm-box.bottom.start::after{left:16px}.popconfirm-box.top.end .box,.popconfirm-box.bottom.end .box{right:0}.popconfirm-box.top.end::after,.popconfirm-box.bottom.end::after{right:16px}.popconfirm-box.left.center .box,.popconfirm-box.right.center .box{top:50%;transform:translateY(-50%)}.popconfirm-box.left.center::after,.popconfirm-box.right.center::after{top:50%;transform:translateY(-50%)}.popconfirm-box.left.start .box,.popconfirm-box.right.start .box{top:0}.popconfirm-box.left.start::after,.popconfirm-box.right.start::after{top:12px}.popconfirm-box.left.end .box,.popconfirm-box.right.end .box{bottom:0}.popconfirm-box.left.end::after,.popconfirm-box.right.end::after{bottom:12px}";
|
|
8
|
+
const popconfirmBoxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}:host{display:inline-flex}:host(.hidden){display:none}:host(:focus){outline:none}.popconfirm-box{position:relative;}.popconfirm-box .box{position:absolute;display:none;box-sizing:border-box;background-color:#FFFFFF;border:1px solid #FFFFFF;border-radius:2px;z-index:10700;width:230px;filter:drop-shadow(0px 1px 6px rgba(0, 0, 0, 0.25));padding:8px 16px}.popconfirm-box .box .content{display:flex}.popconfirm-box .box .content .icon{margin-right:8px;margin-top:4px}.popconfirm-box .box .buttons{display:flex;justify-content:flex-end;margin-top:8px}.popconfirm-box .box .buttons bcm-button:first-child{margin-right:8px}.popconfirm-box::after{content:\"\";position:absolute;display:none;border:6px solid;z-index:10700;pointer-events:none}.popconfirm-box.open .box,.popconfirm-box.open::after{display:block}.popconfirm-box.top .box{bottom:100%;margin-bottom:16px}.popconfirm-box.top::after{bottom:100%;margin-bottom:4px;border-color:#FFFFFF transparent transparent transparent}.popconfirm-box.bottom .box{top:100%;margin-top:16px}.popconfirm-box.bottom::after{top:100%;margin-top:4px;border-color:transparent transparent #FFFFFF transparent}.popconfirm-box.left .box{right:100%;margin-right:16px}.popconfirm-box.left::after{right:100%;margin-right:4px;border-color:transparent transparent transparent #FFFFFF}.popconfirm-box.right .box{left:100%;margin-left:16px}.popconfirm-box.right::after{left:100%;margin-left:4px;border-color:transparent #FFFFFF transparent transparent}.popconfirm-box.top.center .box,.popconfirm-box.bottom.center .box{left:50%;transform:translateX(-50%)}.popconfirm-box.top.center::after,.popconfirm-box.bottom.center::after{left:50%;transform:translateX(-50%)}.popconfirm-box.top.start .box,.popconfirm-box.bottom.start .box{left:0}.popconfirm-box.top.start::after,.popconfirm-box.bottom.start::after{left:16px}.popconfirm-box.top.end .box,.popconfirm-box.bottom.end .box{right:0}.popconfirm-box.top.end::after,.popconfirm-box.bottom.end::after{right:16px}.popconfirm-box.left.center .box,.popconfirm-box.right.center .box{top:50%;transform:translateY(-50%)}.popconfirm-box.left.center::after,.popconfirm-box.right.center::after{top:50%;transform:translateY(-50%)}.popconfirm-box.left.start .box,.popconfirm-box.right.start .box{top:0}.popconfirm-box.left.start::after,.popconfirm-box.right.start::after{top:12px}.popconfirm-box.left.end .box,.popconfirm-box.right.end .box{bottom:0}.popconfirm-box.left.end::after,.popconfirm-box.right.end::after{bottom:12px}";
|
|
9
9
|
|
|
10
10
|
const statuses = {
|
|
11
11
|
error: ['close-circle', 'red-6'],
|