bromcom-ui 2.8.1-rc.1 → 2.8.1-rc.10-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-5b2b1352.entry.js → p-02c42184.entry.js} +1 -1
- package/dist/bromcom-ui/p-037a40a6.entry.js +5 -0
- package/dist/bromcom-ui/{p-0ae7d5fb.entry.js → p-06a45faf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-748cefe3.entry.js → p-089069a9.entry.js} +1 -1
- package/dist/bromcom-ui/p-09c105f8.js +5 -0
- package/dist/bromcom-ui/{p-70909443.entry.js → p-09e8d92e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e0991d3a.entry.js → p-09fbb3b8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c2210caa.entry.js → p-0d1e483d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cab8c1e0.entry.js → p-0dfca6d7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5098fca3.entry.js → p-0fa13944.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6755089b.js → p-11d582b5.js} +1 -1
- package/dist/bromcom-ui/p-148f83a6.entry.js +5 -0
- package/dist/bromcom-ui/p-19476cc8.entry.js +5 -0
- package/dist/bromcom-ui/{p-6de2deb5.entry.js → p-1a4ec3c9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bf523f14.entry.js → p-1a918f69.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6fc52a85.entry.js → p-1e9d406f.entry.js} +1 -1
- package/dist/bromcom-ui/p-1eabd5dc.js +10 -0
- package/dist/bromcom-ui/{p-bda1709b.entry.js → p-23bda383.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a8c8c9cf.entry.js → p-243b178e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-67ff8aa3.entry.js → p-295d7119.entry.js} +1 -1
- package/dist/bromcom-ui/p-2a123374.entry.js +5 -0
- package/dist/bromcom-ui/{p-02116d36.entry.js → p-2b00934e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-940cbe01.js → p-34b8ec60.js} +1 -1
- package/dist/bromcom-ui/{p-c3da137b.entry.js → p-3661e4d1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ffdc6086.entry.js → p-4886e703.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e6afe8b6.entry.js → p-53712b34.entry.js} +1 -1
- package/dist/bromcom-ui/p-65d74e36.entry.js +5 -0
- package/dist/bromcom-ui/{p-a58c6ceb.entry.js → p-6ade0512.entry.js} +1 -1
- package/dist/bromcom-ui/{p-216c6fd5.entry.js → p-6e9c67c4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-95351a23.entry.js → p-721c9f7d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a3109200.entry.js → p-7259beea.entry.js} +1 -1
- package/dist/bromcom-ui/p-759ed536.entry.js +5 -0
- package/dist/bromcom-ui/{p-6d8f018f.entry.js → p-818d7779.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ffec0a2b.js → p-86221bd5.js} +1 -1
- package/dist/bromcom-ui/{p-481f4962.entry.js → p-885f5588.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b40bb51f.entry.js → p-90426981.entry.js} +1 -1
- package/dist/bromcom-ui/p-91d43275.entry.js +13 -0
- package/dist/bromcom-ui/{p-677153b5.entry.js → p-95b7a1ae.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3f9d992a.entry.js → p-99a858ed.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b9ba70c3.entry.js → p-9a067c18.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7ad7c6d7.entry.js → p-9d0a5fa5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-406785b9.entry.js → p-9d60c905.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a6b9ac13.entry.js → p-a1aa14b8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-18a5c6ab.entry.js → p-a23fbb1b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-426b7889.entry.js → p-ac73dc85.entry.js} +1 -1
- package/dist/bromcom-ui/p-ad5d5452.entry.js +5 -0
- package/dist/bromcom-ui/{p-44b18c6d.entry.js → p-b45f1818.entry.js} +1 -1
- package/dist/bromcom-ui/p-babbf589.js +5 -0
- package/dist/bromcom-ui/{p-68868af9.entry.js → p-bd50f5c7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7af21a10.entry.js → p-be88442c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-495b54be.entry.js → p-c9d15e14.entry.js} +1 -1
- package/dist/bromcom-ui/{p-773d6818.js → p-d002a5ca.js} +1 -1
- package/dist/bromcom-ui/{p-1f0ce7fa.entry.js → p-d10b2420.entry.js} +1 -1
- package/dist/bromcom-ui/p-d52bdae8.entry.js +5 -0
- package/dist/bromcom-ui/p-e291a70c.entry.js +5 -0
- package/dist/bromcom-ui/{p-63bff12e.entry.js → p-e63cd734.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e0855669.entry.js → p-ea808b98.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4b1cba4c.entry.js → p-f9ef85d4.entry.js} +1 -1
- package/dist/bromcom-ui/p-fa958e3a.entry.js +5 -0
- package/dist/bromcom-ui/{p-81f1dd1f.js → p-ff2f2303.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button_7.cjs.entry.js +4 -4
- package/dist/cjs/bcm-card.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +3 -3
- package/dist/cjs/bcm-colorful_2.cjs.entry.js +17 -546
- package/dist/cjs/bcm-content.cjs.entry.js +22 -0
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +4 -7
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
- package/dist/cjs/bcm-dropdown.cjs.entry.js +4 -10
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +5 -5
- package/dist/cjs/bcm-item.cjs.entry.js +1 -1
- package/dist/cjs/bcm-items.cjs.entry.js +1 -1
- package/dist/cjs/bcm-list.cjs.entry.js +143 -331
- package/dist/cjs/bcm-menu.cjs.entry.js +10 -7
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal-2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal.cjs.entry.js +34 -10
- 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.cjs.entry.js +3 -3
- package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-radio.cjs.entry.js +3 -3
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- package/dist/cjs/bcm-rc-overflow_2.cjs.entry.js +2443 -0
- package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bcm-step.cjs.entry.js +2 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +23 -7
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tab-item.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
- package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
- package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{generate-493daefd.js → generate-a326693e.js} +10 -1
- package/dist/cjs/index-906fb4e5.js +540 -0
- package/dist/cjs/{input-template-96af0058.js → input-template-f4d1834d.js} +1 -1
- package/dist/cjs/{json-parse-decarator-b5b0b23d.js → json-parse-decarator-a72e223c.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-051fe1ec.js → number-helper-ca12966b.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/{stepper-states-efee4ad7.js → stepper-states-2e52f5b2.js} +1 -1
- package/dist/cjs/{tooltip-helper-a8734616.js → tooltip-helper-a11a36cc.js} +3 -3
- package/dist/cjs/{validators-50fd1ad1.js → validators-3697c8dc.js} +1 -1
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/molecules/dropdown/dropdown.js +20 -8
- package/dist/collection/components/molecules/input/input.css +0 -4
- package/dist/collection/components/molecules/linked/linked.js +2 -2
- package/dist/collection/components/molecules/menu/menu.css +23 -1
- package/dist/collection/components/molecules/menu/menu.js +41 -2
- package/dist/collection/components/molecules/modal/modal.js +59 -17
- package/dist/collection/components/molecules/search/search.css +0 -4
- package/dist/collection/components/molecules/stepper/stepper.css +75 -43
- package/dist/collection/components/molecules/stepper/stepper.js +38 -2
- package/dist/collection/components/molecules/textarea/textarea.css +0 -4
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +3 -6
- package/dist/collection/components/organism/list/list.css +4 -3
- package/dist/collection/components/organism/list/list.js +172 -177
- package/dist/collection/components/organism/states/bcm-list2.states.js +1 -1
- package/dist/collection/components/other/content/content.js +15 -0
- package/dist/collection/components/{molecules → third-parts}/colorful/colorful.css +1 -5
- package/dist/collection/components/third-parts/rc-overflow/rc-overflow.css +138 -0
- package/dist/collection/components/third-parts/rc-overflow/rc-overflow.js +194 -0
- package/dist/collection/helper/generate.js +9 -0
- package/dist/collection/templates/list-template.js +2 -2
- package/dist/components/bcm-alert.js +1 -1
- package/dist/components/bcm-checkbox-group.js +1 -1
- package/dist/components/bcm-content.d.ts +11 -0
- package/dist/components/bcm-content.js +35 -0
- package/dist/components/bcm-dropdown.js +3 -8
- package/dist/components/bcm-list.js +157 -332
- package/dist/components/bcm-modal.js +34 -10
- package/dist/components/bcm-rc-overflow.d.ts +11 -0
- package/dist/components/bcm-rc-overflow.js +10 -0
- package/dist/components/bcm-stepper.js +20 -4
- package/dist/components/bcm-textarea.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/colorful.js +2 -531
- package/dist/components/datetime-picker.js +3 -6
- package/dist/components/generate.js +10 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index3.js +523 -177
- package/dist/components/index4.js +191 -0
- package/dist/components/input.js +1 -1
- package/dist/components/linked.js +2 -2
- package/dist/components/menu.js +8 -3
- package/dist/components/rc-overflow.js +2238 -0
- package/dist/components/search.js +2 -2
- package/dist/components/step.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +1 -1
- package/dist/esm/bcm-avatar_2.entry.js +3 -3
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-button_7.entry.js +4 -4
- package/dist/esm/bcm-card.entry.js +1 -1
- package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
- package/dist/esm/bcm-chip.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-color-input.entry.js +3 -3
- package/dist/esm/bcm-colorful_2.entry.js +7 -536
- package/dist/esm/bcm-content.entry.js +18 -0
- package/dist/esm/bcm-date-picker.entry.js +1 -1
- package/dist/esm/bcm-datetime-picker.entry.js +4 -7
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +3 -3
- package/dist/esm/bcm-dropdown.entry.js +4 -10
- package/dist/esm/bcm-expansion-panel.entry.js +1 -1
- package/dist/esm/bcm-form-2.entry.js +1 -1
- package/dist/esm/bcm-input-custom.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +5 -5
- package/dist/esm/bcm-item.entry.js +1 -1
- package/dist/esm/bcm-items.entry.js +1 -1
- package/dist/esm/bcm-list.entry.js +143 -331
- package/dist/esm/bcm-menu.entry.js +10 -7
- package/dist/esm/bcm-modal-2-footer.entry.js +3 -3
- package/dist/esm/bcm-modal-2-header.entry.js +3 -3
- package/dist/esm/bcm-modal-2.entry.js +3 -3
- package/dist/esm/bcm-modal.entry.js +34 -10
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +3 -3
- package/dist/esm/bcm-progress.entry.js +1 -1
- package/dist/esm/bcm-radio-group.entry.js +3 -3
- package/dist/esm/bcm-radio.entry.js +3 -3
- package/dist/esm/bcm-range.entry.js +1 -1
- package/dist/esm/bcm-rc-overflow_2.entry.js +2438 -0
- package/dist/esm/bcm-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +23 -7
- package/dist/esm/bcm-switch.entry.js +1 -1
- package/dist/esm/bcm-tab-group.entry.js +3 -3
- package/dist/esm/bcm-tab-item-header.entry.js +3 -3
- package/dist/esm/bcm-tab-item.entry.js +3 -3
- package/dist/esm/bcm-tag.entry.js +2 -2
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +1 -1
- package/dist/esm/bcm-toast.entry.js +1 -1
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{generate-de5e04cf.js → generate-21bf7157.js} +10 -1
- package/dist/esm/index-6310a048.js +537 -0
- package/dist/esm/{input-template-c5338e25.js → input-template-1c1d8658.js} +1 -1
- package/dist/esm/{json-parse-decarator-a417723b.js → json-parse-decarator-8bbed2b0.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-8de373ee.js → number-helper-53aabc3d.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +2 -2
- package/dist/esm/old-bcm-popover.entry.js +1 -1
- package/dist/esm/{stepper-states-64ffef36.js → stepper-states-aba688ef.js} +1 -1
- package/dist/esm/{tooltip-helper-096296d0.js → tooltip-helper-2b15bcb1.js} +3 -3
- package/dist/esm/{validators-c8be2c83.js → validators-db449fed.js} +1 -1
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +1 -1
- package/dist/types/components/molecules/menu/menu.d.ts +2 -0
- package/dist/types/components/molecules/modal/modal.d.ts +10 -4
- package/dist/types/components/molecules/stepper/stepper.d.ts +3 -0
- package/dist/types/components/organism/list/list.d.ts +9 -5
- package/dist/types/components/other/content/content.d.ts +6 -0
- package/dist/types/components/third-parts/rc-overflow/rc-overflow.d.ts +17 -0
- package/dist/types/components.d.ts +50 -4
- package/package.json +2 -1
- package/dist/bromcom-ui/p-2677dc60.entry.js +0 -10
- package/dist/bromcom-ui/p-3ee818a8.entry.js +0 -5
- package/dist/bromcom-ui/p-48e2d5e5.js +0 -5
- package/dist/bromcom-ui/p-4bbdd324.entry.js +0 -5
- package/dist/bromcom-ui/p-57c71c1f.entry.js +0 -5
- package/dist/bromcom-ui/p-6a842eb1.js +0 -5
- package/dist/bromcom-ui/p-7a89e7ae.entry.js +0 -5
- package/dist/bromcom-ui/p-a8b7d3cf.entry.js +0 -5
- package/dist/bromcom-ui/p-b2d87a12.entry.js +0 -5
- package/dist/bromcom-ui/p-c0e58db2.entry.js +0 -5
- package/dist/bromcom-ui/p-ea763cf4.entry.js +0 -5
- package/dist/bromcom-ui/p-efee3d33.entry.js +0 -5
- package/dist/cjs/bcm-search.cjs.entry.js +0 -245
- package/dist/collection/components/organism/list/list-tag-control.js +0 -173
- package/dist/esm/bcm-search.entry.js +0 -241
- package/dist/types/components/organism/list/list-tag-control.d.ts +0 -18
- /package/dist/collection/components/{molecules → third-parts}/colorful/colorful.js +0 -0
- /package/dist/types/components/{molecules → third-parts}/colorful/colorful.d.ts +0 -0
|
@@ -12,17 +12,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
|
-
import { IsLoad, JsonParse } from
|
|
16
|
-
import { Generate, NumberHelper, Validators } from
|
|
17
|
-
import { Bcm } from
|
|
18
|
-
import { CaptionTemplate, LabelTemplate, ListTemplate } from
|
|
19
|
-
import { delay, getPlacement, setPosition } from
|
|
20
|
-
import {
|
|
21
|
-
import cs from
|
|
22
|
-
import snq from
|
|
23
|
-
import listState from
|
|
24
|
-
import { ListKeyControl } from
|
|
25
|
-
import { ListTagControl } from './list-tag-control';
|
|
15
|
+
import { IsLoad, JsonParse } from "@bcm/decorator";
|
|
16
|
+
import { Generate, NumberHelper, StringHelper, Validators } from "@bcm/helpers";
|
|
17
|
+
import { Bcm } from "@bcm/model";
|
|
18
|
+
import { CaptionTemplate, LabelTemplate, ListTemplate } from "@bcm/template";
|
|
19
|
+
import { delay, getPlacement, setPosition } from "@bcm/utils";
|
|
20
|
+
import { Host, h } from "@stencil/core";
|
|
21
|
+
import cs from "classnames";
|
|
22
|
+
import snq from "snq";
|
|
23
|
+
import listState from "../states/bcm-list2.states";
|
|
24
|
+
import { ListKeyControl } from "./list-key-control";
|
|
26
25
|
export class BcmList {
|
|
27
26
|
constructor() {
|
|
28
27
|
this.debounce = null;
|
|
@@ -44,12 +43,12 @@ export class BcmList {
|
|
|
44
43
|
this.required = false;
|
|
45
44
|
this.hidden = false;
|
|
46
45
|
this.fullWidth = false;
|
|
47
|
-
this.height =
|
|
48
|
-
this.maxHeight =
|
|
49
|
-
this.minHeight =
|
|
50
|
-
this.width =
|
|
46
|
+
this.height = "256px";
|
|
47
|
+
this.maxHeight = "500px";
|
|
48
|
+
this.minHeight = "150px";
|
|
49
|
+
this.width = "256px";
|
|
51
50
|
this.infoFooter = false;
|
|
52
|
-
this.variableText =
|
|
51
|
+
this.variableText = "item";
|
|
53
52
|
this.template = undefined;
|
|
54
53
|
this.allOpen = false;
|
|
55
54
|
this.keyControl = false;
|
|
@@ -60,8 +59,8 @@ export class BcmList {
|
|
|
60
59
|
this.calculatedViewport = false;
|
|
61
60
|
this.isSelectedOther = false;
|
|
62
61
|
this.isHaveOtherTag = false;
|
|
63
|
-
this.placeholder =
|
|
64
|
-
this.searchPlaceholder =
|
|
62
|
+
this.placeholder = "Choose an option";
|
|
63
|
+
this.searchPlaceholder = "Search";
|
|
65
64
|
this.searchIsOnlyChilds = false;
|
|
66
65
|
this.minSearchLength = 2;
|
|
67
66
|
this.clearable = false;
|
|
@@ -70,7 +69,7 @@ export class BcmList {
|
|
|
70
69
|
this.captionType = Bcm.Status.default;
|
|
71
70
|
this.captionError = undefined;
|
|
72
71
|
this.emptyText = undefined;
|
|
73
|
-
this.emptyIcon =
|
|
72
|
+
this.emptyIcon = "fad fa-folder-open";
|
|
74
73
|
this.captionCache = undefined;
|
|
75
74
|
this.captionTypeCache = undefined;
|
|
76
75
|
this.tick = {};
|
|
@@ -83,26 +82,26 @@ export class BcmList {
|
|
|
83
82
|
this.returnFilterData = {};
|
|
84
83
|
this.returnOtherData = {};
|
|
85
84
|
this.options = {
|
|
86
|
-
rootMargin:
|
|
85
|
+
rootMargin: "30px",
|
|
87
86
|
};
|
|
88
87
|
this.tagContainerWidth = 0;
|
|
89
88
|
this.selectAllItem = {
|
|
90
|
-
id:
|
|
91
|
-
text:
|
|
92
|
-
value:
|
|
89
|
+
id: "select-all",
|
|
90
|
+
text: "Select All",
|
|
91
|
+
value: "select-all",
|
|
93
92
|
checked: false,
|
|
94
93
|
disabled: false,
|
|
95
|
-
icon:
|
|
94
|
+
icon: "",
|
|
96
95
|
status: Bcm.Status.default,
|
|
97
|
-
indeterminate:
|
|
96
|
+
indeterminate: "uncheck",
|
|
98
97
|
};
|
|
99
|
-
this.placement = Bcm.Placement[
|
|
98
|
+
this.placement = Bcm.Placement["bottom-start"];
|
|
100
99
|
this.data = [];
|
|
101
100
|
}
|
|
102
101
|
connectedCallback() {
|
|
103
|
-
if (this.height !=
|
|
104
|
-
if (this.height.indexOf(
|
|
105
|
-
this.limit = Math.floor(+this.height.replace(
|
|
102
|
+
if (this.height != "256px") {
|
|
103
|
+
if (this.height.indexOf("px") > -1) {
|
|
104
|
+
this.limit = Math.floor(+this.height.replace("px", "") / 10);
|
|
106
105
|
}
|
|
107
106
|
else {
|
|
108
107
|
this.limit = Math.floor(+(window.innerHeight / 10));
|
|
@@ -121,69 +120,39 @@ export class BcmList {
|
|
|
121
120
|
this.updateOptions();
|
|
122
121
|
}
|
|
123
122
|
}
|
|
123
|
+
get containerWidth() {
|
|
124
|
+
var _a, _b;
|
|
125
|
+
return (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width;
|
|
126
|
+
}
|
|
127
|
+
get tagCount() {
|
|
128
|
+
return this.containerWidth > 0 ? Math.floor(+(this.containerWidth - 100) / 85) : 0;
|
|
129
|
+
}
|
|
130
|
+
get tagData() {
|
|
131
|
+
return snq(() => {
|
|
132
|
+
var _a;
|
|
133
|
+
return (_a = this.value) === null || _a === void 0 ? void 0 : _a.map(item => ({
|
|
134
|
+
value: item.id,
|
|
135
|
+
label: StringHelper.textLimitter(item.text, 7),
|
|
136
|
+
text: item.tooltipMessage || item.tagTitle || item.text,
|
|
137
|
+
}));
|
|
138
|
+
}, []);
|
|
139
|
+
}
|
|
124
140
|
async componentDidLoad() {
|
|
125
141
|
await this.initState();
|
|
126
|
-
if (this.type ==
|
|
142
|
+
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
127
143
|
const list = this.el.querySelector(`#bcm-list-${this._id}`);
|
|
128
144
|
if (list) {
|
|
129
145
|
document.body.appendChild(list);
|
|
130
146
|
}
|
|
131
147
|
}
|
|
132
148
|
}
|
|
133
|
-
tagCalculator() {
|
|
134
|
-
if (this.checkboxes && (this.type == 'select' || this.type == 'autocomplete')) {
|
|
135
|
-
const tagCalculator = new ListTagControl(`bcm-list-input-tag-container-${this._id}`, this.value, this._id, this.isSelectedOther, this.clearable);
|
|
136
|
-
tagCalculator.calculateTags();
|
|
137
|
-
const arrayIds = id => (typeof id == 'string' ? id.split(',') : [id]);
|
|
138
|
-
const clearAutocomplete = () => {
|
|
139
|
-
if (this.type == 'autocomplete') {
|
|
140
|
-
const autocompleteInput = this.getAutoCompleteInput();
|
|
141
|
-
if (autocompleteInput) {
|
|
142
|
-
autocompleteInput.handleClear(false);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
tagCalculator.onClickOtherTag = async (id) => {
|
|
147
|
-
if (!this.disabled) {
|
|
148
|
-
clearAutocomplete();
|
|
149
|
-
if (this.isSelectedOther) {
|
|
150
|
-
await this.unSelectOther();
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
await this.onClearSearch();
|
|
154
|
-
this.isSelectedOther = true;
|
|
155
|
-
this.filterOtherList(arrayIds(id));
|
|
156
|
-
this.isOpen = true;
|
|
157
|
-
}
|
|
158
|
-
this.onSelectSearch();
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
tagCalculator.onClickTag = _ => {
|
|
162
|
-
// console.log(id);
|
|
163
|
-
clearAutocomplete();
|
|
164
|
-
this.onSelectSearch();
|
|
165
|
-
this.unSelectOther();
|
|
166
|
-
};
|
|
167
|
-
tagCalculator.onClickDismiss = async (id) => {
|
|
168
|
-
var _a;
|
|
169
|
-
if (!this.disabled) {
|
|
170
|
-
if (this.isSelectedOther) {
|
|
171
|
-
await this.unSelectOther();
|
|
172
|
-
}
|
|
173
|
-
arrayIds(id).length > 1 ? listState.removeOtherTags(this._id, arrayIds(id)) : listState.checkedItem(this._id, arrayIds(id)[0]);
|
|
174
|
-
this.value = (await this.getCheckedList()).checkedList;
|
|
175
|
-
this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
149
|
disconnectedCallback() {
|
|
181
150
|
this.isOpen = false;
|
|
182
151
|
if (this.stopDeepClean)
|
|
183
152
|
return;
|
|
184
153
|
listState.removeState(this._id);
|
|
185
|
-
this.el.innerHTML =
|
|
186
|
-
if (this.type ==
|
|
154
|
+
this.el.innerHTML = "";
|
|
155
|
+
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
187
156
|
const list = document.querySelectorAll(`#bcm-list-${this._id}`);
|
|
188
157
|
if (list === null || list === void 0 ? void 0 : list.length) {
|
|
189
158
|
list.forEach(item => item.remove());
|
|
@@ -208,11 +177,10 @@ export class BcmList {
|
|
|
208
177
|
}
|
|
209
178
|
}
|
|
210
179
|
else {
|
|
211
|
-
if ((newVal === null || newVal === void 0 ? void 0 : newVal.
|
|
180
|
+
if ((newVal === null || newVal === void 0 ? void 0 : newVal.id) != (oldVal === null || oldVal === void 0 ? void 0 : oldVal.id)) {
|
|
212
181
|
this.change.emit(this.value);
|
|
213
182
|
}
|
|
214
183
|
}
|
|
215
|
-
this.tagCalculator();
|
|
216
184
|
}
|
|
217
185
|
watchReturnFilterData(newVal) {
|
|
218
186
|
var _a;
|
|
@@ -224,18 +192,6 @@ export class BcmList {
|
|
|
224
192
|
this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
|
|
225
193
|
}
|
|
226
194
|
}
|
|
227
|
-
handleOtherSelected(newValue) {
|
|
228
|
-
var _a;
|
|
229
|
-
const tagContent = (_a = document.getElementById(`bcm-list-input-tag-${this._id}-other-tag`)) === null || _a === void 0 ? void 0 : _a.querySelector('.bcm-tag__content');
|
|
230
|
-
if (tagContent) {
|
|
231
|
-
if (newValue === true) {
|
|
232
|
-
tagContent.classList.add('checkable', 'checked');
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
tagContent.classList.remove('checkable', 'checked');
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
195
|
async handleOpen() {
|
|
240
196
|
if (this.isOpen) {
|
|
241
197
|
this.open.emit();
|
|
@@ -252,7 +208,7 @@ export class BcmList {
|
|
|
252
208
|
listScrollToTop() {
|
|
253
209
|
const list = document.querySelector(`#bcm-list-${this._id}`);
|
|
254
210
|
if (list) {
|
|
255
|
-
list.querySelector(
|
|
211
|
+
list.querySelector(".scrolling").scrollTop = 0;
|
|
256
212
|
}
|
|
257
213
|
}
|
|
258
214
|
async dataChanged(newValue, oldValue) {
|
|
@@ -286,7 +242,7 @@ export class BcmList {
|
|
|
286
242
|
const list = document.querySelector(`#bcm-list-${this._id}`);
|
|
287
243
|
const isClickInside = list && Generate.findEventPath(event, list);
|
|
288
244
|
if (isClickInside) {
|
|
289
|
-
if (this.type ==
|
|
245
|
+
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
290
246
|
this.calculateLocation();
|
|
291
247
|
}
|
|
292
248
|
}
|
|
@@ -295,6 +251,41 @@ export class BcmList {
|
|
|
295
251
|
}
|
|
296
252
|
}
|
|
297
253
|
}
|
|
254
|
+
clearAutocomplete() {
|
|
255
|
+
if (this.type == "autocomplete") {
|
|
256
|
+
const autocompleteInput = this.getAutoCompleteInput();
|
|
257
|
+
if (autocompleteInput) {
|
|
258
|
+
autocompleteInput.handleClear(false);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
async handleSelectOtherTag(e) {
|
|
263
|
+
if (this.disabled)
|
|
264
|
+
return;
|
|
265
|
+
const { id, checked } = e.detail;
|
|
266
|
+
this.isSelectedOther = checked;
|
|
267
|
+
if (id) {
|
|
268
|
+
checked ? this.filterOtherList(id) : this.unSelectOther();
|
|
269
|
+
this.isOpen = true;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
async handleDeleteTag(e) {
|
|
273
|
+
var _a;
|
|
274
|
+
if (this.disabled)
|
|
275
|
+
return;
|
|
276
|
+
const { id } = e.detail;
|
|
277
|
+
this.isSelectedOther && this.unSelectOther();
|
|
278
|
+
Array.isArray(id) ? listState.removeOtherTags(this._id, id) : listState.checkedItem(this._id, id);
|
|
279
|
+
this.value = (await this.getCheckedList()).checkedList;
|
|
280
|
+
this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
|
|
281
|
+
}
|
|
282
|
+
async handleSelectTag(_) {
|
|
283
|
+
if (this.disabled)
|
|
284
|
+
return;
|
|
285
|
+
this.clearAutocomplete();
|
|
286
|
+
this.onSelectSearch();
|
|
287
|
+
this.unSelectOther();
|
|
288
|
+
}
|
|
298
289
|
handleClick(event) {
|
|
299
290
|
var _a;
|
|
300
291
|
if (this.disabled)
|
|
@@ -313,23 +304,23 @@ export class BcmList {
|
|
|
313
304
|
}, 300);
|
|
314
305
|
}
|
|
315
306
|
if (!isClickInside) {
|
|
316
|
-
if (this.type ==
|
|
307
|
+
if (this.type == "autocomplete") {
|
|
317
308
|
const autocompleteInput = this.getAutoCompleteInput();
|
|
318
309
|
if (autocompleteInput) {
|
|
319
310
|
if (this.checkboxes) {
|
|
320
|
-
autocompleteInput.setValue(
|
|
311
|
+
autocompleteInput.setValue("");
|
|
321
312
|
}
|
|
322
313
|
else {
|
|
323
|
-
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) ||
|
|
314
|
+
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || "");
|
|
324
315
|
}
|
|
325
316
|
}
|
|
326
317
|
}
|
|
327
318
|
}
|
|
328
|
-
const clickToTag = Generate.findEventPathWithKey(event,
|
|
329
|
-
const clickToOtherTag = Generate.findEventPathWithKey(event,
|
|
330
|
-
const clickToSelect = Generate.findEventPathWithKey(event,
|
|
331
|
-
const clickToTagDismiss = Generate.findEventPathWithKey(event,
|
|
332
|
-
if (clickToSelect && !clickToTagDismiss && this.type !=
|
|
319
|
+
const clickToTag = Generate.findEventPathWithKey(event, "className", ["bcm-tag"]);
|
|
320
|
+
const clickToOtherTag = Generate.findEventPathWithKey(event, "className", ["bcm-tag bcm-tag--other"]);
|
|
321
|
+
const clickToSelect = Generate.findEventPathWithKey(event, "id", [`bcm-list-input-${this._id}`, `bcm-list-label-${this._id}`]);
|
|
322
|
+
const clickToTagDismiss = Generate.findEventPathWithKey(event, "className", ["right close-button"]);
|
|
323
|
+
if (clickToSelect && !clickToTagDismiss && this.type != "autocomplete") {
|
|
333
324
|
this.isOpen = clickToTag || clickToOtherTag ? true : !this.isOpen;
|
|
334
325
|
}
|
|
335
326
|
if (list) {
|
|
@@ -343,7 +334,7 @@ export class BcmList {
|
|
|
343
334
|
}
|
|
344
335
|
bcmOnSearchClear(event) {
|
|
345
336
|
var _a, _b;
|
|
346
|
-
if (this.type ==
|
|
337
|
+
if (this.type == "autocomplete") {
|
|
347
338
|
if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.id) === `bcm-list-${this._id}-search` || ((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.id) === `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
|
|
348
339
|
if (event.detail) {
|
|
349
340
|
this.setClear();
|
|
@@ -361,16 +352,13 @@ export class BcmList {
|
|
|
361
352
|
if (this.searchFound > 0 && this.highlight) {
|
|
362
353
|
this.highlightText = (_f = event.detail) === null || _f === void 0 ? void 0 : _f.value;
|
|
363
354
|
}
|
|
364
|
-
if (this.type ==
|
|
355
|
+
if (this.type == "autocomplete") {
|
|
365
356
|
this.isOpen = true;
|
|
366
357
|
}
|
|
367
358
|
if (!event.detail.result) {
|
|
368
|
-
if (this.type ==
|
|
359
|
+
if (this.type == "autocomplete") {
|
|
369
360
|
this.isOpen = false;
|
|
370
361
|
}
|
|
371
|
-
if (this.isSelectedOther) {
|
|
372
|
-
this.filterOtherList(this.otherTagIds());
|
|
373
|
-
}
|
|
374
362
|
else {
|
|
375
363
|
this.returnFilterData = {};
|
|
376
364
|
listState.filterData(this._id, null);
|
|
@@ -410,9 +398,9 @@ export class BcmList {
|
|
|
410
398
|
if (focusedList) {
|
|
411
399
|
const list = document.getElementById(`bcm-list-${this._id}`);
|
|
412
400
|
if (list) {
|
|
413
|
-
const items = list.querySelectorAll(
|
|
401
|
+
const items = list.querySelectorAll(".bcm-list__item.focused");
|
|
414
402
|
if (items.length > 0) {
|
|
415
|
-
const main = list.querySelector(
|
|
403
|
+
const main = list.querySelector("main");
|
|
416
404
|
const itemHeight = items[0].offsetHeight;
|
|
417
405
|
const listHeight = main.offsetHeight;
|
|
418
406
|
const itemTop = items[0].offsetTop;
|
|
@@ -432,7 +420,7 @@ export class BcmList {
|
|
|
432
420
|
if (Array.isArray(data)) {
|
|
433
421
|
this.addChecked(data);
|
|
434
422
|
}
|
|
435
|
-
if (typeof data ===
|
|
423
|
+
if (typeof data === "string" || typeof data === "number") {
|
|
436
424
|
this.selectedItem(data);
|
|
437
425
|
}
|
|
438
426
|
}
|
|
@@ -475,10 +463,9 @@ export class BcmList {
|
|
|
475
463
|
async setClear(e) {
|
|
476
464
|
listState.setClear(this._id);
|
|
477
465
|
this.value = null;
|
|
478
|
-
this.inputText =
|
|
466
|
+
this.inputText = "";
|
|
479
467
|
this.isOpen = false;
|
|
480
|
-
this.selectAllItem.indeterminate =
|
|
481
|
-
this.tagCalculator();
|
|
468
|
+
this.selectAllItem.indeterminate = "uncheck";
|
|
482
469
|
this.markForCheck();
|
|
483
470
|
if (e) {
|
|
484
471
|
e.stopPropagation();
|
|
@@ -507,10 +494,9 @@ export class BcmList {
|
|
|
507
494
|
listState.updateOptions(this._id, this);
|
|
508
495
|
}
|
|
509
496
|
handleIndeterminate(checkeds, total) {
|
|
510
|
-
this.selectAllItem = Object.assign(Object.assign({}, this.selectAllItem), { indeterminate: this.checkboxes && checkeds > 0 ? (checkeds === total ?
|
|
497
|
+
this.selectAllItem = Object.assign(Object.assign({}, this.selectAllItem), { indeterminate: this.checkboxes && checkeds > 0 ? (checkeds === total ? "check" : "indeterminate") : "uncheck", checked: this.checkboxes && checkeds > 0 ? (checkeds === total ? true : false) : false });
|
|
511
498
|
}
|
|
512
499
|
listenResize() {
|
|
513
|
-
this.tagCalculator();
|
|
514
500
|
this.calculateLocation();
|
|
515
501
|
this.markForCheck();
|
|
516
502
|
}
|
|
@@ -538,12 +524,6 @@ export class BcmList {
|
|
|
538
524
|
searchInput.onBcmSelect();
|
|
539
525
|
}
|
|
540
526
|
}
|
|
541
|
-
otherTagIds() {
|
|
542
|
-
const otherTag = document.querySelector(`#bcm-list-input-tag-${this._id}-other-tag`);
|
|
543
|
-
if (otherTag) {
|
|
544
|
-
return otherTag.getAttribute('data-ids').split(',');
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
527
|
async filterOtherList(ids) {
|
|
548
528
|
const checklist = (await this.getCheckedList()).nestedResult;
|
|
549
529
|
const filter = Generate.convertIdsToNestedData(ids, checklist);
|
|
@@ -559,7 +539,7 @@ export class BcmList {
|
|
|
559
539
|
this.onClearSearch();
|
|
560
540
|
await listState.setValue({
|
|
561
541
|
id: this._id,
|
|
562
|
-
dataSource: this.data && snq(() => (typeof this.data ==
|
|
542
|
+
dataSource: this.data && snq(() => (typeof this.data == "string" ? JSON.parse(this.data) : this.data), []),
|
|
563
543
|
options: this,
|
|
564
544
|
});
|
|
565
545
|
const { totalRoots, totalItems } = listState.getValue(this._id);
|
|
@@ -591,7 +571,7 @@ export class BcmList {
|
|
|
591
571
|
}
|
|
592
572
|
getItems() {
|
|
593
573
|
if (this.isSelectedOther) {
|
|
594
|
-
return this.returnFilterData[
|
|
574
|
+
return this.returnFilterData["checkedItems"];
|
|
595
575
|
}
|
|
596
576
|
return snq(() => listState.getData(this._id), []);
|
|
597
577
|
}
|
|
@@ -603,17 +583,17 @@ export class BcmList {
|
|
|
603
583
|
this.markForCheck();
|
|
604
584
|
}
|
|
605
585
|
focusItem(e) {
|
|
606
|
-
if (e.target.classList.contains(
|
|
586
|
+
if (e.target.classList.contains("bcm-list__item")) {
|
|
607
587
|
const item = e.target;
|
|
608
588
|
const list = document.getElementById(`bcm-list-${this._id}`);
|
|
609
589
|
if (list) {
|
|
610
|
-
const items = list.querySelectorAll(
|
|
590
|
+
const items = list.querySelectorAll(".bcm-list__item");
|
|
611
591
|
if (items.length > 0) {
|
|
612
|
-
const selectedItem = list.querySelector(
|
|
592
|
+
const selectedItem = list.querySelector(".bcm-list__item.focused");
|
|
613
593
|
if (selectedItem) {
|
|
614
|
-
selectedItem.classList.remove(
|
|
594
|
+
selectedItem.classList.remove("focused");
|
|
615
595
|
}
|
|
616
|
-
item.classList.add(
|
|
596
|
+
item.classList.add("focused");
|
|
617
597
|
}
|
|
618
598
|
}
|
|
619
599
|
}
|
|
@@ -625,14 +605,14 @@ export class BcmList {
|
|
|
625
605
|
this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
|
|
626
606
|
this.isOpen = false;
|
|
627
607
|
this.markForCheck();
|
|
628
|
-
if (this.type ==
|
|
608
|
+
if (this.type == "autocomplete" && this.value) {
|
|
629
609
|
// await delay(100)
|
|
630
610
|
// this.resetCaption()
|
|
631
611
|
const autocompleteInput = this.getAutoCompleteInput();
|
|
632
612
|
if (autocompleteInput) {
|
|
633
613
|
setTimeout(() => {
|
|
634
614
|
var _a;
|
|
635
|
-
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) ||
|
|
615
|
+
autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || "");
|
|
636
616
|
this.isOpen = false;
|
|
637
617
|
}, 100);
|
|
638
618
|
}
|
|
@@ -641,7 +621,7 @@ export class BcmList {
|
|
|
641
621
|
return Promise.resolve(this.value);
|
|
642
622
|
}
|
|
643
623
|
async checkedItem(itemId) {
|
|
644
|
-
const isCheckSelectAll = itemId ===
|
|
624
|
+
const isCheckSelectAll = itemId === "select-all";
|
|
645
625
|
if (!isCheckSelectAll) {
|
|
646
626
|
listState.checkedItem(this._id, itemId);
|
|
647
627
|
}
|
|
@@ -679,7 +659,7 @@ export class BcmList {
|
|
|
679
659
|
}
|
|
680
660
|
async calculateLocation() {
|
|
681
661
|
var _a, _b;
|
|
682
|
-
if (this.type ==
|
|
662
|
+
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
683
663
|
const list = document.getElementById(`bcm-list-${this._id}`);
|
|
684
664
|
// list && (list.style.height = '256px') //sebebi neydi ki!
|
|
685
665
|
var placement = this.placement;
|
|
@@ -694,78 +674,78 @@ export class BcmList {
|
|
|
694
674
|
if (this.linkedComponent) {
|
|
695
675
|
const linked = document.getElementById(this.linkedComponent);
|
|
696
676
|
if (linked) {
|
|
697
|
-
if (!linked[
|
|
698
|
-
const captionArea = ((_a = linked.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(
|
|
677
|
+
if (!linked["noCaption"]) {
|
|
678
|
+
const captionArea = ((_a = linked.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".bcm-caption-area")) || linked.querySelector(".bcm-caption-area");
|
|
699
679
|
if (captionArea) {
|
|
700
680
|
captionAreaHeight = captionArea.offsetHeight || captionArea.clientHeight;
|
|
701
681
|
}
|
|
702
682
|
}
|
|
703
|
-
const labelArea = ((_b = linked.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(
|
|
683
|
+
const labelArea = ((_b = linked.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(".bcm-label")) || linked.querySelector(".bcm-label");
|
|
704
684
|
if (labelArea) {
|
|
705
685
|
labelAreaHeight = labelArea.offsetHeight || labelArea.clientHeight;
|
|
706
686
|
}
|
|
707
687
|
}
|
|
708
688
|
}
|
|
709
689
|
if (this.fullWidth) {
|
|
710
|
-
list.style.width = targetElement.offsetWidth +
|
|
690
|
+
list.style.width = targetElement.offsetWidth + "px";
|
|
711
691
|
}
|
|
712
692
|
else {
|
|
713
|
-
list.style.width = this.width ||
|
|
693
|
+
list.style.width = this.width || "auto";
|
|
714
694
|
}
|
|
715
|
-
if (this.height.indexOf(
|
|
716
|
-
list.style.height = NumberHelper.toNumber(this.height) * 0.01 * window.innerHeight - pos[0] - 50 +
|
|
695
|
+
if (this.height.indexOf("%") > -1) {
|
|
696
|
+
list.style.height = NumberHelper.toNumber(this.height) * 0.01 * window.innerHeight - pos[0] - 50 + "px";
|
|
717
697
|
}
|
|
718
698
|
else {
|
|
719
699
|
list.style.height = this.height;
|
|
720
700
|
}
|
|
721
701
|
list.style.minHeight = this.minHeight;
|
|
722
702
|
// const calculatedMaxHeight = window.innerHeight - pos[0] - 50;
|
|
723
|
-
const calculatedMaxHeight = placement.split(
|
|
724
|
-
if (this.maxHeight.indexOf(
|
|
725
|
-
list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) * 0.01 * calculatedMaxHeight +
|
|
703
|
+
const calculatedMaxHeight = placement.split("-")[0] == "top" ? window.innerHeight - (window.innerHeight - pos[0]) - 50 : window.innerHeight - pos[0] - 50;
|
|
704
|
+
if (this.maxHeight.indexOf("%") > -1) {
|
|
705
|
+
list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) * 0.01 * calculatedMaxHeight + "px";
|
|
726
706
|
}
|
|
727
707
|
else {
|
|
728
|
-
list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) < calculatedMaxHeight ? this.maxHeight : calculatedMaxHeight +
|
|
708
|
+
list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) < calculatedMaxHeight ? this.maxHeight : calculatedMaxHeight + "px";
|
|
729
709
|
}
|
|
730
710
|
getPlacement(list, targetElement, placement, (place) => (placement = place));
|
|
731
711
|
await delay(10);
|
|
732
712
|
pos = setPosition(placement, targetElement);
|
|
733
|
-
list.style.top = (placement.split(
|
|
713
|
+
list.style.top = (placement.split("-")[0] == "top" ? pos[0] - list.offsetHeight + labelAreaHeight : pos[0] - captionAreaHeight) + "px";
|
|
734
714
|
// list.style.left = pos[1] + 'px';
|
|
735
|
-
list.style.left = placement.split(
|
|
736
|
-
list.classList.toggle(
|
|
715
|
+
list.style.left = placement.split("-")[1] == "end" ? pos[1] - list.offsetWidth + "px" : pos[1] + "px";
|
|
716
|
+
list.classList.toggle("bcm-list--top", placement.split("-")[0] == "top");
|
|
737
717
|
this.calculatedViewport = true;
|
|
738
718
|
}
|
|
739
719
|
}
|
|
740
720
|
}
|
|
741
721
|
render() {
|
|
742
722
|
const { checkboxes, treeview, label, size, disabled, readonly, required, hidden, fullWidth, searchable } = this.getOptions();
|
|
743
|
-
const hostClasses = cs(
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
723
|
+
const hostClasses = cs("bcm-list", `bcm-list__size-${size}`, `bcm-list__${this.type}`, size === "large" ? "size-3" : "size-2", {
|
|
724
|
+
"error": this.captionType == Bcm.Status.error,
|
|
725
|
+
"full-width": fullWidth,
|
|
726
|
+
"bcm-list__linked": this.linkedComponent,
|
|
747
727
|
hidden,
|
|
748
728
|
readonly,
|
|
749
729
|
disabled,
|
|
750
730
|
});
|
|
751
|
-
const bcmListContainer = cs(
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
731
|
+
const bcmListContainer = cs("bcm-list__container", this.linkedComponent ? "bcm-list__type-linked-component" : `bcm-list__type-${this.type}`, {
|
|
732
|
+
"is-open": this.isOpen && this.calculatedViewport,
|
|
733
|
+
"error": this.captionType == Bcm.Status.error,
|
|
734
|
+
"full-width": fullWidth,
|
|
755
735
|
hidden,
|
|
756
736
|
readonly,
|
|
757
737
|
disabled,
|
|
758
738
|
});
|
|
759
|
-
const bcmListInput = cs(
|
|
760
|
-
const openedType = this.type ==
|
|
739
|
+
const bcmListInput = cs("bcm-list__input");
|
|
740
|
+
const openedType = this.type == "select" || this.type == "autocomplete" || this.linkedComponent;
|
|
761
741
|
return (h(Host, { class: hostClasses, tabindex: "0", style: {
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
} }, h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (h("div", null, h(LabelTemplate, { size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type ==
|
|
742
|
+
"--width": fullWidth ? "100%" : this.width,
|
|
743
|
+
"--height": openedType ? "100%" : this.height,
|
|
744
|
+
"--max-height": openedType ? "inherit" : this.maxHeight,
|
|
745
|
+
"--min-height": openedType ? "inherit" : this.minHeight,
|
|
746
|
+
} }, h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (h("div", null, h(LabelTemplate, { size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type == "select" && (h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput }, h("span", { class: cs("bcm-list__input-container", { "type-single": !checkboxes, "value-empty": !this.value }) }, this.checkboxes ? (this.value && this.value.length > 0 ? (h("bcm-rc-overflow", { data: this.tagData, maxCount: this.tagCount })) : (h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))) : this.value ? (this.inputText) : (h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))), h("span", { class: cs("bcm-list__input-buttons", {
|
|
767
747
|
disabled: disabled,
|
|
768
|
-
}) }, this.clearable && this.value && (h("div", { class: "bcm-list__input-buttons-button" }, h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport &&
|
|
748
|
+
}) }, this.clearable && this.value && (h("div", { class: "bcm-list__input-buttons-button" }, h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (h("div", { id: `bcm-list-input-${this._id}`, class: cs(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), h(ListTemplate, { highlight: this.highlightText, searchable: this.type == "autocomplete" ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, minSearchLength: this.minSearchLength, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon }), h(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
769
749
|
}
|
|
770
750
|
static get is() { return "bcm-list"; }
|
|
771
751
|
static get originalStyleUrls() {
|
|
@@ -1091,7 +1071,7 @@ export class BcmList {
|
|
|
1091
1071
|
},
|
|
1092
1072
|
"attribute": "height",
|
|
1093
1073
|
"reflect": false,
|
|
1094
|
-
"defaultValue": "
|
|
1074
|
+
"defaultValue": "\"256px\""
|
|
1095
1075
|
},
|
|
1096
1076
|
"maxHeight": {
|
|
1097
1077
|
"type": "string",
|
|
@@ -1109,7 +1089,7 @@ export class BcmList {
|
|
|
1109
1089
|
},
|
|
1110
1090
|
"attribute": "max-height",
|
|
1111
1091
|
"reflect": false,
|
|
1112
|
-
"defaultValue": "
|
|
1092
|
+
"defaultValue": "\"500px\""
|
|
1113
1093
|
},
|
|
1114
1094
|
"minHeight": {
|
|
1115
1095
|
"type": "string",
|
|
@@ -1127,7 +1107,7 @@ export class BcmList {
|
|
|
1127
1107
|
},
|
|
1128
1108
|
"attribute": "min-height",
|
|
1129
1109
|
"reflect": false,
|
|
1130
|
-
"defaultValue": "
|
|
1110
|
+
"defaultValue": "\"150px\""
|
|
1131
1111
|
},
|
|
1132
1112
|
"width": {
|
|
1133
1113
|
"type": "string",
|
|
@@ -1145,7 +1125,7 @@ export class BcmList {
|
|
|
1145
1125
|
},
|
|
1146
1126
|
"attribute": "width",
|
|
1147
1127
|
"reflect": false,
|
|
1148
|
-
"defaultValue": "
|
|
1128
|
+
"defaultValue": "\"256px\""
|
|
1149
1129
|
},
|
|
1150
1130
|
"infoFooter": {
|
|
1151
1131
|
"type": "boolean",
|
|
@@ -1181,7 +1161,7 @@ export class BcmList {
|
|
|
1181
1161
|
},
|
|
1182
1162
|
"attribute": "variable-text",
|
|
1183
1163
|
"reflect": false,
|
|
1184
|
-
"defaultValue": "
|
|
1164
|
+
"defaultValue": "\"item\""
|
|
1185
1165
|
},
|
|
1186
1166
|
"template": {
|
|
1187
1167
|
"type": "string",
|
|
@@ -1305,7 +1285,7 @@ export class BcmList {
|
|
|
1305
1285
|
},
|
|
1306
1286
|
"attribute": "placeholder",
|
|
1307
1287
|
"reflect": false,
|
|
1308
|
-
"defaultValue": "
|
|
1288
|
+
"defaultValue": "\"Choose an option\""
|
|
1309
1289
|
},
|
|
1310
1290
|
"searchPlaceholder": {
|
|
1311
1291
|
"type": "string",
|
|
@@ -1323,7 +1303,7 @@ export class BcmList {
|
|
|
1323
1303
|
},
|
|
1324
1304
|
"attribute": "search-placeholder",
|
|
1325
1305
|
"reflect": false,
|
|
1326
|
-
"defaultValue": "
|
|
1306
|
+
"defaultValue": "\"Search\""
|
|
1327
1307
|
},
|
|
1328
1308
|
"searchIsOnlyChilds": {
|
|
1329
1309
|
"type": "boolean",
|
|
@@ -1487,7 +1467,7 @@ export class BcmList {
|
|
|
1487
1467
|
},
|
|
1488
1468
|
"attribute": "empty-icon",
|
|
1489
1469
|
"reflect": false,
|
|
1490
|
-
"defaultValue": "
|
|
1470
|
+
"defaultValue": "\"fad fa-folder-open\""
|
|
1491
1471
|
},
|
|
1492
1472
|
"placement": {
|
|
1493
1473
|
"type": "string",
|
|
@@ -1510,7 +1490,7 @@ export class BcmList {
|
|
|
1510
1490
|
},
|
|
1511
1491
|
"attribute": "placement",
|
|
1512
1492
|
"reflect": false,
|
|
1513
|
-
"defaultValue": "Bcm.Placement[
|
|
1493
|
+
"defaultValue": "Bcm.Placement[\"bottom-start\"]"
|
|
1514
1494
|
},
|
|
1515
1495
|
"data": {
|
|
1516
1496
|
"type": "any",
|
|
@@ -1842,9 +1822,6 @@ export class BcmList {
|
|
|
1842
1822
|
}, {
|
|
1843
1823
|
"propName": "returnFilterData",
|
|
1844
1824
|
"methodName": "watchReturnFilterData"
|
|
1845
|
-
}, {
|
|
1846
|
-
"propName": "isSelectedOther",
|
|
1847
|
-
"methodName": "handleOtherSelected"
|
|
1848
1825
|
}, {
|
|
1849
1826
|
"propName": "isOpen",
|
|
1850
1827
|
"methodName": "handleOpen"
|
|
@@ -1890,6 +1867,24 @@ export class BcmList {
|
|
|
1890
1867
|
"target": "document",
|
|
1891
1868
|
"capture": false,
|
|
1892
1869
|
"passive": false
|
|
1870
|
+
}, {
|
|
1871
|
+
"name": "bcm-select-other-tag",
|
|
1872
|
+
"method": "handleSelectOtherTag",
|
|
1873
|
+
"target": undefined,
|
|
1874
|
+
"capture": false,
|
|
1875
|
+
"passive": false
|
|
1876
|
+
}, {
|
|
1877
|
+
"name": "bcm-delete-tag",
|
|
1878
|
+
"method": "handleDeleteTag",
|
|
1879
|
+
"target": undefined,
|
|
1880
|
+
"capture": false,
|
|
1881
|
+
"passive": false
|
|
1882
|
+
}, {
|
|
1883
|
+
"name": "bcm-select-tag",
|
|
1884
|
+
"method": "handleSelectTag",
|
|
1885
|
+
"target": undefined,
|
|
1886
|
+
"capture": false,
|
|
1887
|
+
"passive": false
|
|
1893
1888
|
}, {
|
|
1894
1889
|
"name": "click",
|
|
1895
1890
|
"method": "handleClick",
|
|
@@ -1927,5 +1922,5 @@ __decorate([
|
|
|
1927
1922
|
IsLoad()
|
|
1928
1923
|
], BcmList.prototype, "el", void 0);
|
|
1929
1924
|
__decorate([
|
|
1930
|
-
JsonParse(
|
|
1925
|
+
JsonParse("data", true)
|
|
1931
1926
|
], BcmList.prototype, "dataChanged", null);
|