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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");
|
|
2
|
+
.size-1 {
|
|
3
|
+
font-size: 12px;
|
|
4
|
+
line-height: 20px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.size-2 {
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
line-height: 22px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.size-3 {
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
line-height: 24px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.size-4 {
|
|
18
|
+
font-size: 20px;
|
|
19
|
+
line-height: 28px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.size-5 {
|
|
23
|
+
font-size: 24px;
|
|
24
|
+
line-height: 32px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.size-6 {
|
|
28
|
+
font-size: 30px;
|
|
29
|
+
line-height: 38px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.size-7 {
|
|
33
|
+
font-size: 38px;
|
|
34
|
+
line-height: 46px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.size-8 {
|
|
38
|
+
font-size: 46px;
|
|
39
|
+
line-height: 54px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.size-9 {
|
|
43
|
+
font-size: 56px;
|
|
44
|
+
line-height: 64px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.weight-regular {
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.weight-semibold {
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Generator
|
|
57
|
+
*/
|
|
58
|
+
.bcm-label {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
grid-gap: 2px;
|
|
62
|
+
}
|
|
63
|
+
.bcm-label__text {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
color: var(--bcm-color-grey-9);
|
|
66
|
+
margin-bottom: 4px;
|
|
67
|
+
}
|
|
68
|
+
.bcm-label__text-error {
|
|
69
|
+
color: var(--bcm-color-red-6);
|
|
70
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { Component, h, Element, Prop, Host } from '@stencil/core';
|
|
2
|
+
import cs from 'classnames';
|
|
3
|
+
import { Generate } from '../../../helper/generate';
|
|
4
|
+
import Bcm from '../../../models/bcm';
|
|
5
|
+
import { LabelTemplate } from '../../../templates/label-template';
|
|
6
|
+
export class BcmLabel {
|
|
7
|
+
constructor() {
|
|
8
|
+
/** Props **/
|
|
9
|
+
this._id = Generate.UID();
|
|
10
|
+
this.required = false;
|
|
11
|
+
this.size = Bcm.FontSize['size-1'];
|
|
12
|
+
this.hidden = false;
|
|
13
|
+
this.type = Bcm.Status.default;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
const { required, value, size, form, htmlFor, hidden, type, tooltip } = this;
|
|
17
|
+
const hostClasses = cs('bcm-label', { hidden });
|
|
18
|
+
const Label = (h(LabelTemplate, { form: form, htmlFor: htmlFor, value: value, size: size, type: type, required: required }));
|
|
19
|
+
return (h(Host, null,
|
|
20
|
+
h("div", { class: hostClasses },
|
|
21
|
+
Label,
|
|
22
|
+
tooltip && (h("bcm-tooltip", { message: tooltip, placement: 'top', trigger: 'hover' },
|
|
23
|
+
h("bcm-icon", { color: "grey-8", icon: "question-circle", type: "fill" }))))));
|
|
24
|
+
}
|
|
25
|
+
static get is() { return "bcm-label"; }
|
|
26
|
+
static get originalStyleUrls() { return {
|
|
27
|
+
"$": ["label.scss"]
|
|
28
|
+
}; }
|
|
29
|
+
static get styleUrls() { return {
|
|
30
|
+
"$": ["label.css"]
|
|
31
|
+
}; }
|
|
32
|
+
static get properties() { return {
|
|
33
|
+
"_id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "string",
|
|
38
|
+
"resolved": "string",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": "Props *"
|
|
46
|
+
},
|
|
47
|
+
"attribute": "id",
|
|
48
|
+
"reflect": true,
|
|
49
|
+
"defaultValue": "Generate.UID()"
|
|
50
|
+
},
|
|
51
|
+
"required": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "boolean",
|
|
56
|
+
"resolved": "boolean",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": ""
|
|
64
|
+
},
|
|
65
|
+
"attribute": "required",
|
|
66
|
+
"reflect": false,
|
|
67
|
+
"defaultValue": "false"
|
|
68
|
+
},
|
|
69
|
+
"value": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"attribute": "value",
|
|
84
|
+
"reflect": false
|
|
85
|
+
},
|
|
86
|
+
"size": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "FontSizesTypes",
|
|
91
|
+
"resolved": "\"size-1\" | \"size-2\" | \"size-3\" | \"size-4\" | \"size-5\" | \"size-6\" | \"size-7\" | \"size-8\" | \"size-9\"",
|
|
92
|
+
"references": {
|
|
93
|
+
"FontSizesTypes": {
|
|
94
|
+
"location": "import",
|
|
95
|
+
"path": "../../../models/bcm-types"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": false,
|
|
100
|
+
"optional": false,
|
|
101
|
+
"docs": {
|
|
102
|
+
"tags": [],
|
|
103
|
+
"text": ""
|
|
104
|
+
},
|
|
105
|
+
"attribute": "size",
|
|
106
|
+
"reflect": false,
|
|
107
|
+
"defaultValue": "Bcm.FontSize['size-1']"
|
|
108
|
+
},
|
|
109
|
+
"form": {
|
|
110
|
+
"type": "any",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "any",
|
|
114
|
+
"resolved": "any",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": ""
|
|
122
|
+
},
|
|
123
|
+
"attribute": "form",
|
|
124
|
+
"reflect": false
|
|
125
|
+
},
|
|
126
|
+
"htmlFor": {
|
|
127
|
+
"type": "any",
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "any",
|
|
131
|
+
"resolved": "any",
|
|
132
|
+
"references": {}
|
|
133
|
+
},
|
|
134
|
+
"required": false,
|
|
135
|
+
"optional": false,
|
|
136
|
+
"docs": {
|
|
137
|
+
"tags": [],
|
|
138
|
+
"text": ""
|
|
139
|
+
},
|
|
140
|
+
"attribute": "html-for",
|
|
141
|
+
"reflect": false
|
|
142
|
+
},
|
|
143
|
+
"hidden": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "boolean",
|
|
148
|
+
"resolved": "boolean",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": ""
|
|
156
|
+
},
|
|
157
|
+
"attribute": "hidden",
|
|
158
|
+
"reflect": false,
|
|
159
|
+
"defaultValue": "false"
|
|
160
|
+
},
|
|
161
|
+
"type": {
|
|
162
|
+
"type": "any",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "StatusTypes | any",
|
|
166
|
+
"resolved": "any",
|
|
167
|
+
"references": {
|
|
168
|
+
"StatusTypes": {
|
|
169
|
+
"location": "import",
|
|
170
|
+
"path": "../../../models/bcm-types"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": false,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": ""
|
|
179
|
+
},
|
|
180
|
+
"attribute": "type",
|
|
181
|
+
"reflect": false,
|
|
182
|
+
"defaultValue": "Bcm.Status.default"
|
|
183
|
+
},
|
|
184
|
+
"tooltip": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "string",
|
|
189
|
+
"resolved": "string",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": false,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": ""
|
|
197
|
+
},
|
|
198
|
+
"attribute": "tooltip",
|
|
199
|
+
"reflect": false
|
|
200
|
+
}
|
|
201
|
+
}; }
|
|
202
|
+
static get elementRef() { return "el"; }
|
|
203
|
+
}
|
|
@@ -251,12 +251,8 @@ export class BcmCheckboxGroup {
|
|
|
251
251
|
var customStyle = {};
|
|
252
252
|
this.gap && (customStyle = { 'gap': this.gap });
|
|
253
253
|
return (h(Host, { class: hostClasses, "on-bcm-change": () => this.inputChange() },
|
|
254
|
-
label && h("
|
|
255
|
-
"
|
|
256
|
-
label,
|
|
257
|
-
" ",
|
|
258
|
-
required && ('*'),
|
|
259
|
-
" "),
|
|
254
|
+
label && h("div", null,
|
|
255
|
+
h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })),
|
|
260
256
|
indeterminate && (h("div", { class: indeterminateClasses },
|
|
261
257
|
h("input", { id: "bcm-indeterminate-element", type: "checkbox", disabled: disabled }),
|
|
262
258
|
h("label", { htmlFor: "bcm-indeterminate-element", "on-click": () => this.indeterminateClick() },
|
|
@@ -599,6 +595,23 @@ export class BcmCheckboxGroup {
|
|
|
599
595
|
"attribute": "caption-type",
|
|
600
596
|
"reflect": false,
|
|
601
597
|
"defaultValue": "'default'"
|
|
598
|
+
},
|
|
599
|
+
"tooltip": {
|
|
600
|
+
"type": "string",
|
|
601
|
+
"mutable": false,
|
|
602
|
+
"complexType": {
|
|
603
|
+
"original": "string",
|
|
604
|
+
"resolved": "string",
|
|
605
|
+
"references": {}
|
|
606
|
+
},
|
|
607
|
+
"required": false,
|
|
608
|
+
"optional": false,
|
|
609
|
+
"docs": {
|
|
610
|
+
"tags": [],
|
|
611
|
+
"text": ""
|
|
612
|
+
},
|
|
613
|
+
"attribute": "tooltip",
|
|
614
|
+
"reflect": false
|
|
602
615
|
}
|
|
603
616
|
}; }
|
|
604
617
|
static get states() { return {
|
|
@@ -355,12 +355,8 @@ export class BcmInput {
|
|
|
355
355
|
const hostClasses = cs(this.hidden ? 'hidden' : null, this.noMargin ? 'no-margin' : null);
|
|
356
356
|
return (h(Host, { class: hostClasses },
|
|
357
357
|
h("div", { class: containerClasses },
|
|
358
|
-
label && h("
|
|
359
|
-
"
|
|
360
|
-
label,
|
|
361
|
-
" ",
|
|
362
|
-
required && ('*'),
|
|
363
|
-
" "),
|
|
358
|
+
label && h("div", null,
|
|
359
|
+
h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required, htmlFor: this.inputId })),
|
|
364
360
|
h("div", { class: baseClasses },
|
|
365
361
|
h("span", { class: "input-prefix" },
|
|
366
362
|
h("slot", { name: "prefix" }),
|
|
@@ -913,6 +909,23 @@ export class BcmInput {
|
|
|
913
909
|
"attribute": "max-length",
|
|
914
910
|
"reflect": false,
|
|
915
911
|
"defaultValue": "null"
|
|
912
|
+
},
|
|
913
|
+
"tooltip": {
|
|
914
|
+
"type": "string",
|
|
915
|
+
"mutable": false,
|
|
916
|
+
"complexType": {
|
|
917
|
+
"original": "string",
|
|
918
|
+
"resolved": "string",
|
|
919
|
+
"references": {}
|
|
920
|
+
},
|
|
921
|
+
"required": false,
|
|
922
|
+
"optional": false,
|
|
923
|
+
"docs": {
|
|
924
|
+
"tags": [],
|
|
925
|
+
"text": ""
|
|
926
|
+
},
|
|
927
|
+
"attribute": "tooltip",
|
|
928
|
+
"reflect": false
|
|
916
929
|
}
|
|
917
930
|
}; }
|
|
918
931
|
static get states() { return {
|
|
@@ -434,14 +434,10 @@
|
|
|
434
434
|
.tag.dissmisable .close-button {
|
|
435
435
|
width: 14px;
|
|
436
436
|
cursor: pointer;
|
|
437
|
+
fill: var(--bcm-color-grey-7);
|
|
437
438
|
}
|
|
438
|
-
.tag.dissmisable .close-button
|
|
439
|
-
|
|
440
|
-
color: var(--bcm-color-grey-7);
|
|
441
|
-
}
|
|
442
|
-
.tag.dissmisable .close-button:hover bcm-icon,
|
|
443
|
-
.tag.dissmisable .close-button:hover .icon * {
|
|
444
|
-
color: var(--bcm-color-grey-10);
|
|
439
|
+
.tag.dissmisable .close-button:hover {
|
|
440
|
+
fill: var(--bcm-color-grey-10);
|
|
445
441
|
}
|
|
446
442
|
.tag span {
|
|
447
443
|
display: inline-flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, h, Element, Prop, Host, Event, State, Method, Listen } from '@stencil/core';
|
|
1
|
+
import { Component, h, Element, Prop, Host, Event, State, Method, Listen, Watch } from '@stencil/core';
|
|
2
2
|
import cs from 'classnames';
|
|
3
3
|
import { delay, pluralize } from '../../../utils/utils';
|
|
4
4
|
export class BcmListSelect {
|
|
@@ -213,11 +213,15 @@ export class BcmListSelect {
|
|
|
213
213
|
/**
|
|
214
214
|
* @descc
|
|
215
215
|
*/
|
|
216
|
-
clickClear() {
|
|
216
|
+
clickClear(event = null) {
|
|
217
217
|
const element = document.querySelector("#" + this._list_id);
|
|
218
218
|
if (element) {
|
|
219
219
|
element.setClear(false);
|
|
220
220
|
}
|
|
221
|
+
if (event) {
|
|
222
|
+
event.stopPropagation();
|
|
223
|
+
event.preventDefault();
|
|
224
|
+
}
|
|
221
225
|
}
|
|
222
226
|
/**
|
|
223
227
|
* @desc
|
|
@@ -330,10 +334,10 @@ export class BcmListSelect {
|
|
|
330
334
|
newTag.setAttribute("_internal_id", this._internal_id);
|
|
331
335
|
newTag.innerHTML = '<span class="value"> ' + item["text"] + ' </span>'
|
|
332
336
|
+ '<span id="close-button" ' + '_internal_id="' + this._internal_id + '" class="right close-button"> '
|
|
333
|
-
+ '<svg class="icon" width="24" height="24" viewBox="0 0 24 24"
|
|
337
|
+
+ '<svg class="icon" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> '
|
|
334
338
|
+ '<g id="icon/outlined/suggested/close">'
|
|
335
|
-
+ '<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"
|
|
336
|
-
+ '<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"
|
|
339
|
+
+ '<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" />'
|
|
340
|
+
+ '<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" />'
|
|
337
341
|
+ '</g>'
|
|
338
342
|
+ '</svg>'
|
|
339
343
|
+ '</span>';
|
|
@@ -460,6 +464,14 @@ export class BcmListSelect {
|
|
|
460
464
|
// await delay(100)
|
|
461
465
|
this.handleLoading(false);
|
|
462
466
|
}
|
|
467
|
+
/**
|
|
468
|
+
* @desc
|
|
469
|
+
*/
|
|
470
|
+
valueWatch(newValue) {
|
|
471
|
+
if (Array.isArray(newValue) && newValue.length == 0) {
|
|
472
|
+
this.value = "";
|
|
473
|
+
}
|
|
474
|
+
}
|
|
463
475
|
/**
|
|
464
476
|
* @desc
|
|
465
477
|
*/
|
|
@@ -626,12 +638,8 @@ export class BcmListSelect {
|
|
|
626
638
|
// </Host>
|
|
627
639
|
h(Host, { class: hostClasses, onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() },
|
|
628
640
|
h("div", { class: container },
|
|
629
|
-
label && h("
|
|
630
|
-
"
|
|
631
|
-
label,
|
|
632
|
-
" ",
|
|
633
|
-
required === true && ('*'),
|
|
634
|
-
" "),
|
|
641
|
+
label && h("div", null,
|
|
642
|
+
h("bcm-label", { onClick: () => this.handleOpen(), tooltip: this.tooltip, type: captionType, value: label, required: required })),
|
|
635
643
|
h("div", { id: "selected-container", class: selected, onClick: () => this.handleOpen(), tabIndex: -1 },
|
|
636
644
|
h("span", { class: selectedText, title: selectText !== null && (selectText) },
|
|
637
645
|
h("div", { class: "spinner first-run" }),
|
|
@@ -645,7 +653,7 @@ export class BcmListSelect {
|
|
|
645
653
|
" "))),
|
|
646
654
|
this.type === 'autocomplete' && (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 }))),
|
|
647
655
|
this.type === 'select' && (h("div", { class: "buttons" },
|
|
648
|
-
clearable && value && (h("button", { class: "select-clear-button", onClick: () => this.clickClear() },
|
|
656
|
+
clearable && value && (h("button", { id: "clear-button", class: "select-clear-button", onClick: (e) => this.clickClear(e) },
|
|
649
657
|
h("bcm-icon", { icon: "close-circle", type: "fill", size: 18, color: "grey-7" }))),
|
|
650
658
|
h("span", { class: isOpen ? 'open' : 'close' },
|
|
651
659
|
h("bcm-icon", { icon: "caret-up", type: "outlined", size: 18, color: "grey-6" }))))),
|
|
@@ -1037,6 +1045,23 @@ export class BcmListSelect {
|
|
|
1037
1045
|
"reflect": false,
|
|
1038
1046
|
"defaultValue": "false"
|
|
1039
1047
|
},
|
|
1048
|
+
"tooltip": {
|
|
1049
|
+
"type": "string",
|
|
1050
|
+
"mutable": false,
|
|
1051
|
+
"complexType": {
|
|
1052
|
+
"original": "string",
|
|
1053
|
+
"resolved": "string",
|
|
1054
|
+
"references": {}
|
|
1055
|
+
},
|
|
1056
|
+
"required": false,
|
|
1057
|
+
"optional": false,
|
|
1058
|
+
"docs": {
|
|
1059
|
+
"tags": [],
|
|
1060
|
+
"text": ""
|
|
1061
|
+
},
|
|
1062
|
+
"attribute": "tooltip",
|
|
1063
|
+
"reflect": false
|
|
1064
|
+
},
|
|
1040
1065
|
"searchData": {
|
|
1041
1066
|
"type": "any",
|
|
1042
1067
|
"mutable": false,
|
|
@@ -1282,6 +1307,10 @@ export class BcmListSelect {
|
|
|
1282
1307
|
}
|
|
1283
1308
|
}; }
|
|
1284
1309
|
static get elementRef() { return "el"; }
|
|
1310
|
+
static get watchers() { return [{
|
|
1311
|
+
"propName": "value",
|
|
1312
|
+
"methodName": "valueWatch"
|
|
1313
|
+
}]; }
|
|
1285
1314
|
static get listeners() { return [{
|
|
1286
1315
|
"name": "bcm-change",
|
|
1287
1316
|
"method": "handleChange",
|
|
@@ -179,6 +179,24 @@
|
|
|
179
179
|
grid-gap: 4px;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
.check-container {
|
|
183
|
+
display: block;
|
|
184
|
+
}
|
|
185
|
+
.check-container.hidden {
|
|
186
|
+
display: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.empty {
|
|
190
|
+
display: none;
|
|
191
|
+
align-items: center;
|
|
192
|
+
justify-content: center;
|
|
193
|
+
flex: 1;
|
|
194
|
+
height: 100%;
|
|
195
|
+
}
|
|
196
|
+
.empty.show {
|
|
197
|
+
display: flex;
|
|
198
|
+
}
|
|
199
|
+
|
|
182
200
|
.spinner {
|
|
183
201
|
position: absolute;
|
|
184
202
|
z-index: 1;
|
|
@@ -80,6 +80,7 @@ export class BcmList {
|
|
|
80
80
|
if (this.type !== 'default' || this.linkedComponent !== null) {
|
|
81
81
|
this.isShow = false;
|
|
82
82
|
this.el.classList.add("linked");
|
|
83
|
+
this.el.classList.remove("show");
|
|
83
84
|
this.handleLinkedComponent();
|
|
84
85
|
}
|
|
85
86
|
const slot = this.el.shadowRoot.querySelectorAll('bcm-list-item');
|
|
@@ -131,6 +132,7 @@ export class BcmList {
|
|
|
131
132
|
if (this.searchable == true) {
|
|
132
133
|
// var searchInput = null
|
|
133
134
|
const searchInput = this.el.shadowRoot.querySelector("bcm-search");
|
|
135
|
+
// console.log(searchInput)
|
|
134
136
|
if (searchInput) {
|
|
135
137
|
searchInput.setClear();
|
|
136
138
|
if (select == true) {
|
|
@@ -145,11 +147,14 @@ export class BcmList {
|
|
|
145
147
|
async show() {
|
|
146
148
|
if (this.processType == 'deselect') {
|
|
147
149
|
this.firstRender = true;
|
|
148
|
-
this.
|
|
149
|
-
|
|
150
|
+
if (this.items != this.otherList) {
|
|
151
|
+
this.isRendered = false;
|
|
152
|
+
this.setData(this.otherList);
|
|
153
|
+
}
|
|
150
154
|
}
|
|
151
155
|
this.isShow = true;
|
|
152
156
|
this.renderList();
|
|
157
|
+
this.clearAndSelectSearch(true);
|
|
153
158
|
}
|
|
154
159
|
/**
|
|
155
160
|
* @desc
|
|
@@ -597,6 +602,18 @@ export class BcmList {
|
|
|
597
602
|
*/
|
|
598
603
|
handleClick(event) {
|
|
599
604
|
var path = event.path || (event.composedPath && event.composedPath());
|
|
605
|
+
// const elementId = "bcm-list-select-" + this._id
|
|
606
|
+
// console.log (
|
|
607
|
+
// !!(
|
|
608
|
+
// path
|
|
609
|
+
// && path.filter((input: HTMLElement) => input['_internal_id'] == this._internal_id)[0]
|
|
610
|
+
// && (
|
|
611
|
+
// path.filter((input: HTMLElement) => input['id'] == "clear-button")[0] !== undefined
|
|
612
|
+
// || path.filter((input: HTMLElement) => input['id'] == "close-button")[0] !== undefined
|
|
613
|
+
// || path.filter((input: HTMLElement) => input['id'] == "close")[0] !== undefined
|
|
614
|
+
// )
|
|
615
|
+
// )
|
|
616
|
+
// )
|
|
600
617
|
if (!this.el.contains(event.target)
|
|
601
618
|
|| (path
|
|
602
619
|
&& path.filter((input) => input['_internal_id'] == this._internal_id)[0]
|
|
@@ -917,6 +934,7 @@ export class BcmList {
|
|
|
917
934
|
* @desc
|
|
918
935
|
*/
|
|
919
936
|
calculatedTotals(calcObject) {
|
|
937
|
+
var searchResult = -1;
|
|
920
938
|
if (calcObject["selected"] != undefined) {
|
|
921
939
|
if (this.infoFooter == true && this.el.shadowRoot.querySelector("#selected-item")) {
|
|
922
940
|
if (calcObject["selected"] > 0) {
|
|
@@ -935,6 +953,7 @@ export class BcmList {
|
|
|
935
953
|
else {
|
|
936
954
|
this.el.shadowRoot.querySelector("#search-result").innerHTML = calcObject["searchResult"] + " / ";
|
|
937
955
|
}
|
|
956
|
+
searchResult = calcObject["searchResult"];
|
|
938
957
|
}
|
|
939
958
|
}
|
|
940
959
|
if (calcObject["total"] != undefined) {
|
|
@@ -944,6 +963,24 @@ export class BcmList {
|
|
|
944
963
|
this.el.shadowRoot.querySelector("#variable-text").innerHTML = pluralize(this.variableText, calcObject["total"]);
|
|
945
964
|
}
|
|
946
965
|
}
|
|
966
|
+
const empty = this.el.shadowRoot.querySelector("#empty");
|
|
967
|
+
const selectAll = this.el.shadowRoot.querySelector("#check-container");
|
|
968
|
+
if (searchResult == 0 || this.total == 0) {
|
|
969
|
+
if (empty) {
|
|
970
|
+
empty.classList.add("show");
|
|
971
|
+
}
|
|
972
|
+
if (selectAll) {
|
|
973
|
+
selectAll.classList.add("hidden");
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
if (empty) {
|
|
978
|
+
empty.classList.remove("show");
|
|
979
|
+
}
|
|
980
|
+
if (selectAll) {
|
|
981
|
+
selectAll.classList.remove("hidden");
|
|
982
|
+
}
|
|
983
|
+
}
|
|
947
984
|
}
|
|
948
985
|
/**
|
|
949
986
|
* @desc
|
|
@@ -1146,18 +1183,14 @@ export class BcmList {
|
|
|
1146
1183
|
var mainStyle = Object.assign({ 'height': styleHeight }, customStyle);
|
|
1147
1184
|
var hostStyle = Object.assign({ 'height': styleHeight + labelAreaHeight }, customStyle);
|
|
1148
1185
|
return (h(Host, { class: hostClasses, style: hostStyle },
|
|
1149
|
-
(this.type === 'default' && this.processType === 'default' && this.label) && (h("
|
|
1150
|
-
"
|
|
1151
|
-
this.label,
|
|
1152
|
-
" ",
|
|
1153
|
-
this.required && ('*'),
|
|
1154
|
-
" ")),
|
|
1186
|
+
(this.type === 'default' && this.processType === 'default' && this.label) && (h("div", null,
|
|
1187
|
+
h("bcm-label", { tooltip: this.tooltip, type: this.captionType, value: this.label, required: this.required }))),
|
|
1155
1188
|
h("main", { style: mainStyle },
|
|
1156
1189
|
this.searchable === true && (h("div", { class: searchContainer },
|
|
1157
1190
|
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 }),
|
|
1158
1191
|
h("bcm-divider", null))),
|
|
1159
1192
|
h("div", { class: classes },
|
|
1160
|
-
this.multiSelect === true && (h("div", { class: "check-container" },
|
|
1193
|
+
this.multiSelect === true && (h("div", { id: "check-container", class: "check-container" },
|
|
1161
1194
|
h("div", { class: listItem, id: "text", onClick: (e) => this.handleIndeterminateClick(e) },
|
|
1162
1195
|
h("div", { class: "check-content" },
|
|
1163
1196
|
h("bcm-checkbox-lite", { id: 'check-lite-' + this._id, name: 'check-lite-' + this._id, checked: false, indeterminate: false, onClick: (e) => this.handleCheckboxClick(e) })),
|
|
@@ -1167,7 +1200,9 @@ export class BcmList {
|
|
|
1167
1200
|
h("slot", null),
|
|
1168
1201
|
h("div", { class: "list" }),
|
|
1169
1202
|
h("div", { class: "spinner first-run" },
|
|
1170
|
-
h("bcm-icon", { type: "animated", color: "prime-blue", class: "prefix", icon: "loading" }))
|
|
1203
|
+
h("bcm-icon", { type: "animated", color: "prime-blue", class: "prefix", icon: "loading" })),
|
|
1204
|
+
h("div", { id: "empty", class: "empty" },
|
|
1205
|
+
h("bcm-empty", { size: "small", text: "No Data" }))),
|
|
1171
1206
|
this.infoFooter == true && (h("div", { class: footer },
|
|
1172
1207
|
h("bcm-text", { scale: "size-1", color: "grey-8" },
|
|
1173
1208
|
this.multiSelect === true && (h("span", { id: "selected-item" })),
|
|
@@ -1926,6 +1961,23 @@ export class BcmList {
|
|
|
1926
1961
|
"attribute": "required",
|
|
1927
1962
|
"reflect": false,
|
|
1928
1963
|
"defaultValue": "false"
|
|
1964
|
+
},
|
|
1965
|
+
"tooltip": {
|
|
1966
|
+
"type": "string",
|
|
1967
|
+
"mutable": false,
|
|
1968
|
+
"complexType": {
|
|
1969
|
+
"original": "string",
|
|
1970
|
+
"resolved": "string",
|
|
1971
|
+
"references": {}
|
|
1972
|
+
},
|
|
1973
|
+
"required": false,
|
|
1974
|
+
"optional": false,
|
|
1975
|
+
"docs": {
|
|
1976
|
+
"tags": [],
|
|
1977
|
+
"text": "***"
|
|
1978
|
+
},
|
|
1979
|
+
"attribute": "tooltip",
|
|
1980
|
+
"reflect": false
|
|
1929
1981
|
}
|
|
1930
1982
|
}; }
|
|
1931
1983
|
static get states() { return {
|
|
@@ -1941,7 +1993,7 @@ export class BcmList {
|
|
|
1941
1993
|
"composed": true,
|
|
1942
1994
|
"docs": {
|
|
1943
1995
|
"tags": [],
|
|
1944
|
-
"text": "
|
|
1996
|
+
"text": ""
|
|
1945
1997
|
},
|
|
1946
1998
|
"complexType": {
|
|
1947
1999
|
"original": "any",
|