bromcom-ui 2.9.0-rc.11 → 2.9.0-rc.13
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-0ce0079c.entry.js → p-055a6833.entry.js} +1 -1
- package/dist/bromcom-ui/{p-76595c93.js → p-06d549b0.js} +1 -1
- package/dist/bromcom-ui/{p-6e577849.entry.js → p-0829f2b8.entry.js} +1 -1
- package/dist/bromcom-ui/p-08c75801.js +5 -0
- package/dist/bromcom-ui/p-113960b6.entry.js +5 -0
- package/dist/bromcom-ui/{p-3bd27fdd.js → p-1456cfcb.js} +1 -1
- package/dist/bromcom-ui/{p-37084b52.entry.js → p-1f03b8aa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-eaaf03db.js → p-1f9ff376.js} +1 -1
- package/dist/bromcom-ui/{p-5fbb57f6.entry.js → p-2e1e73a2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0a7f3cd6.entry.js → p-34ee0df2.entry.js} +1 -1
- package/dist/bromcom-ui/p-3bd899cc.entry.js +5 -0
- package/dist/bromcom-ui/{p-941b7517.entry.js → p-3e7facaa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e1689f47.js → p-43a16ce4.js} +1 -1
- package/dist/bromcom-ui/{p-8eb5ed81.entry.js → p-43ef6b1c.entry.js} +1 -1
- package/dist/bromcom-ui/p-49f37d54.js +5 -0
- package/dist/bromcom-ui/{p-104a32ce.entry.js → p-4d34a30c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5dc1d0fc.entry.js → p-4d6407a3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a4e3b170.entry.js → p-578c6af9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6cff5185.entry.js → p-58012cb7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0976ff0f.entry.js → p-6430d123.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b4caa7af.entry.js → p-6802f81b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1701ff2a.entry.js → p-6937c867.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4707aa4d.entry.js → p-695a9db8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2d4a0a66.entry.js → p-6e592196.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8b6dbd63.entry.js → p-70126b4c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-63337aa3.entry.js → p-7508498f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4c21b17f.js → p-7665baa1.js} +1 -1
- package/dist/bromcom-ui/{p-0ff006e8.entry.js → p-79c91f16.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e59b1f37.entry.js → p-7a54258a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-132d4301.entry.js → p-7c511f8d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d896a91f.entry.js → p-7ee5abfd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-56317397.entry.js → p-80785946.entry.js} +1 -1
- package/dist/bromcom-ui/p-83571dfd.js +5 -0
- package/dist/bromcom-ui/{p-bdec3fa0.entry.js → p-83f55410.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c8a64f05.entry.js → p-8b8400e5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cff8ef93.js → p-91246af3.js} +1 -1
- package/dist/bromcom-ui/p-92726393.entry.js +5 -0
- package/dist/bromcom-ui/p-92fa8670.entry.js +5 -0
- package/dist/bromcom-ui/p-97d84d54.entry.js +5 -0
- package/dist/bromcom-ui/p-98ff534a.entry.js +5 -0
- package/dist/bromcom-ui/{p-cb522ae0.js → p-9bfb2dcc.js} +1 -1
- package/dist/bromcom-ui/{p-ce3b1f49.entry.js → p-a14e70a5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cea71a01.entry.js → p-a2ab6adb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-62eb13d4.entry.js → p-a9654609.entry.js} +1 -1
- package/dist/bromcom-ui/{p-19c7cea5.entry.js → p-aacfa5bb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c8d647c1.entry.js → p-ae0bd7c0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-12304c2d.entry.js → p-b0583ca8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-74798533.entry.js → p-b0fb9ee3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bdf80844.entry.js → p-b9945590.entry.js} +1 -1
- package/dist/bromcom-ui/{p-324bf5e5.entry.js → p-bb624967.entry.js} +1 -1
- package/dist/bromcom-ui/{p-82671aa3.entry.js → p-bc8e5ac3.entry.js} +1 -1
- package/dist/bromcom-ui/p-cd8880a4.entry.js +5 -0
- package/dist/bromcom-ui/{p-0b0ff7ee.entry.js → p-d06ebea4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cbb2de64.entry.js → p-d09aa96b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9519a9e4.entry.js → p-d1f32bbd.entry.js} +1 -1
- package/dist/bromcom-ui/p-d3d07c8c.js +5 -0
- package/dist/bromcom-ui/{p-d2670b77.entry.js → p-d9f92297.entry.js} +1 -1
- package/dist/bromcom-ui/{p-94f43ce3.entry.js → p-da7a34c6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-068d918e.entry.js → p-dd714afe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-49bb8e10.js → p-e2f92d0b.js} +1 -1
- package/dist/bromcom-ui/{p-5101acb3.js → p-e59b12e2.js} +1 -1
- package/dist/bromcom-ui/p-e6938871.js +5 -0
- package/dist/bromcom-ui/{p-1b96dbbf.entry.js → p-ebe49b26.entry.js} +1 -1
- package/dist/bromcom-ui/{p-78f57233.entry.js → p-ed46db87.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2c21b28a.entry.js → p-eebbf79a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f0061666.entry.js → p-eec6999c.entry.js} +1 -1
- package/dist/bromcom-ui/p-f6a4bf6e.entry.js +5 -0
- package/dist/bromcom-ui/{p-9bf657da.entry.js → p-f84247f5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3db7cc9b.entry.js → p-f93356af.entry.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
- package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
- package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +17 -2580
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/bcm-button-group.cjs.entry.js +3 -3
- package/dist/cjs/{bcm-button_8.cjs.entry.js → bcm-button_9.cjs.entry.js} +338 -137
- package/dist/cjs/bcm-card.cjs.entry.js +4 -4
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +5 -5
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-chip-group.cjs.entry.js +7 -7
- package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
- package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
- package/dist/cjs/bcm-color-input.cjs.entry.js +5 -5
- package/dist/cjs/bcm-date-picker.cjs.entry.js +5 -4
- package/dist/cjs/bcm-date.cjs.entry.js +7 -7
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +10 -8
- package/dist/cjs/bcm-default.cjs.entry.js +2 -2
- package/dist/cjs/bcm-drawer.cjs.entry.js +5 -5
- package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -3
- package/dist/cjs/bcm-form-2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-form.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
- package/dist/cjs/bcm-item.cjs.entry.js +2 -2
- package/dist/cjs/bcm-items.cjs.entry.js +3 -3
- package/dist/cjs/bcm-list_3.cjs.entry.js +11 -11
- package/dist/cjs/bcm-menu.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +5 -5
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +5 -5
- package/dist/cjs/bcm-modal-2.cjs.entry.js +5 -5
- package/dist/cjs/bcm-modal.cjs.entry.js +4 -4
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -4
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popover.cjs.entry.js +5 -5
- package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/bcm-radio.cjs.entry.js +5 -5
- package/dist/cjs/bcm-range.cjs.entry.js +2 -2
- package/dist/cjs/bcm-select.cjs.entry.js +1 -1
- package/dist/cjs/bcm-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/bcm-step.cjs.entry.js +3 -3
- package/dist/cjs/bcm-stepper.cjs.entry.js +6 -6
- package/dist/cjs/bcm-switch.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tab-group.cjs.entry.js +5 -5
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +5 -5
- package/dist/cjs/bcm-tab-item.cjs.entry.js +5 -5
- package/dist/cjs/bcm-table.cjs.entry.js +5 -5
- package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
- package/dist/cjs/bcm-text.cjs.entry.js +2 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +5 -4
- package/dist/cjs/bcm-toast.cjs.entry.js +27 -13
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{generate-84a14c1a.js → generate-d1447176.js} +1 -1
- package/dist/cjs/{global-5e41fa4e.js → global-cb2f8825.js} +1 -1
- package/dist/cjs/index-5279dea2.js +2571 -0
- package/dist/cjs/{input-template-b5038151.js → input-template-096e89a6.js} +1 -1
- package/dist/cjs/{json-parse-decarator-c18e611d.js → json-parse-decarator-5b03f2c1.js} +1 -1
- package/dist/cjs/{label-template-8d34230f.js → label-template-15c3c0ed.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{number-helper-59448c42.js → number-helper-963bdfd3.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +5 -5
- package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
- package/dist/cjs/{package-fe10d578.js → package-8e8fd90e.js} +1 -1
- package/dist/cjs/{popover-placement-86ece590.js → popover-placement-8866eab1.js} +1 -1
- package/dist/cjs/{slot-template-758beb71.js → slot-template-de6a91b1.js} +1 -1
- package/dist/cjs/{stepper-states-deb53239.js → stepper-states-35ea924b.js} +1 -1
- package/dist/cjs/{string-helper-b89a9828.js → string-helper-9b392049.js} +2 -2
- package/dist/cjs/{tooltip-helper-5b2ee66d.js → tooltip-helper-e51cfadd.js} +4 -4
- package/dist/cjs/{validators-d89fdce5.js → validators-b3ac8a39.js} +1 -1
- package/dist/collection/components/molecules/input-dropdown/input-dropdown.css +9 -2
- package/dist/collection/components/molecules/input-dropdown/input-dropdown.js +200 -149
- package/dist/collection/components/molecules/input-dropdown/input-dropdown.style.js +73 -0
- package/dist/collection/components/organism/date-picker/date-picker.css +1 -1
- package/dist/collection/components/organism/date-picker/date-picker.js +20 -1
- package/dist/collection/components/organism/datetime-picker/datetime-picker.css +13 -1
- package/dist/collection/components/organism/datetime-picker/datetime-picker.js +21 -1
- package/dist/collection/components/organism/list/list.css +1 -1
- package/dist/collection/components/organism/time-picker/time-picker.css +1 -1
- package/dist/collection/components/organism/time-picker/time-picker.js +20 -1
- package/dist/collection/components/other/toast/toast.js +25 -11
- package/dist/collection/helper/string-helper.js +2 -2
- package/dist/components/avatar.js +2 -1
- package/dist/components/badge.js +2 -2565
- package/dist/components/bcm-date-picker.js +4 -2
- package/dist/components/bcm-input-dropdown.js +214 -149
- package/dist/components/bcm-textarea.js +1 -214
- package/dist/components/bcm-time-picker.js +4 -2
- package/dist/components/bcm-toast.js +24 -10
- package/dist/components/datetime-picker.js +5 -2
- package/dist/components/generate.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index5.js +2569 -0
- package/dist/components/list.js +1 -1
- package/dist/components/string-helper.js +2 -2
- package/dist/{esm/bcm-textarea.entry.js → components/textarea.js} +80 -19
- package/dist/esm/bcm-accordion.entry.js +2 -2
- package/dist/esm/bcm-alert.entry.js +3 -3
- package/dist/esm/bcm-attendance.entry.js +2 -2
- package/dist/esm/bcm-avatar_2.entry.js +6 -2569
- package/dist/esm/bcm-breadcrumb.entry.js +2 -2
- package/dist/esm/bcm-button-group.entry.js +3 -3
- package/dist/esm/{bcm-button_8.entry.js → bcm-button_9.entry.js} +339 -139
- package/dist/esm/bcm-card.entry.js +4 -4
- package/dist/esm/bcm-checkbox-group.entry.js +5 -5
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/bcm-checkbox_2.entry.js +4 -4
- package/dist/esm/bcm-chip-group.entry.js +7 -7
- package/dist/esm/bcm-chip.entry.js +2 -2
- package/dist/esm/bcm-collapse.entry.js +2 -2
- package/dist/esm/bcm-color-input.entry.js +5 -5
- package/dist/esm/bcm-date-picker.entry.js +5 -4
- package/dist/esm/bcm-date.entry.js +7 -7
- package/dist/esm/bcm-datetime-picker.entry.js +10 -8
- package/dist/esm/bcm-default.entry.js +2 -2
- package/dist/esm/bcm-drawer.entry.js +5 -5
- package/dist/esm/bcm-dropdown.entry.js +3 -3
- package/dist/esm/bcm-expansion-panel.entry.js +3 -3
- package/dist/esm/bcm-form-2.entry.js +3 -3
- package/dist/esm/bcm-form.entry.js +1 -1
- package/dist/esm/bcm-input-custom.entry.js +2 -2
- package/dist/esm/bcm-item.entry.js +2 -2
- package/dist/esm/bcm-items.entry.js +3 -3
- package/dist/esm/bcm-list_3.entry.js +11 -11
- package/dist/esm/bcm-menu.entry.js +6 -6
- package/dist/esm/bcm-modal-2-footer.entry.js +5 -5
- package/dist/esm/bcm-modal-2-header.entry.js +5 -5
- package/dist/esm/bcm-modal-2.entry.js +5 -5
- package/dist/esm/bcm-modal.entry.js +4 -4
- package/dist/esm/bcm-popconfirm-box.entry.js +4 -4
- package/dist/esm/bcm-popconfirm.entry.js +2 -2
- package/dist/esm/bcm-popover.entry.js +5 -5
- package/dist/esm/bcm-progress.entry.js +2 -2
- package/dist/esm/bcm-radio-group.entry.js +5 -5
- package/dist/esm/bcm-radio.entry.js +5 -5
- package/dist/esm/bcm-range.entry.js +2 -2
- package/dist/esm/bcm-select.entry.js +1 -1
- package/dist/esm/bcm-skeleton.entry.js +2 -2
- package/dist/esm/bcm-step.entry.js +3 -3
- package/dist/esm/bcm-stepper.entry.js +6 -6
- package/dist/esm/bcm-switch.entry.js +2 -2
- package/dist/esm/bcm-tab-group.entry.js +5 -5
- package/dist/esm/bcm-tab-item-header.entry.js +5 -5
- package/dist/esm/bcm-tab-item.entry.js +5 -5
- package/dist/esm/bcm-table.entry.js +5 -5
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-text.entry.js +2 -2
- package/dist/esm/bcm-time-picker.entry.js +5 -4
- package/dist/esm/bcm-toast.entry.js +27 -13
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{generate-77bbe272.js → generate-8591a0f0.js} +1 -1
- package/dist/esm/{global-1b5f8bb5.js → global-e7818ee3.js} +1 -1
- package/dist/esm/index-3bc8c6e3.js +2569 -0
- package/dist/esm/{input-template-bf10f00a.js → input-template-6519906b.js} +1 -1
- package/dist/esm/{json-parse-decarator-7a13e271.js → json-parse-decarator-58846417.js} +1 -1
- package/dist/esm/{label-template-f156f33f.js → label-template-62e49c38.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{number-helper-787aa192.js → number-helper-6ef9165b.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +5 -5
- package/dist/esm/old-bcm-popover.entry.js +2 -2
- package/dist/esm/{package-42b4a30f.js → package-569c91f0.js} +1 -1
- package/dist/esm/{popover-placement-018109c4.js → popover-placement-7cce412f.js} +1 -1
- package/dist/esm/{slot-template-46035685.js → slot-template-7447145d.js} +1 -1
- package/dist/esm/{stepper-states-9f10dd4d.js → stepper-states-14adccae.js} +1 -1
- package/dist/esm/{string-helper-4a28f775.js → string-helper-5ef67a66.js} +2 -2
- package/dist/esm/{tooltip-helper-a6101f5d.js → tooltip-helper-3c146a26.js} +4 -4
- package/dist/esm/{validators-0ba6d217.js → validators-358cf956.js} +1 -1
- package/dist/types/components/molecules/input-dropdown/input-dropdown.d.ts +25 -17
- package/dist/types/components/molecules/input-dropdown/input-dropdown.style.d.ts +307 -0
- package/dist/types/components/organism/date-picker/date-picker.d.ts +1 -0
- package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +1 -0
- package/dist/types/components/organism/time-picker/time-picker.d.ts +1 -0
- package/dist/types/components/other/toast/toast.d.ts +1 -0
- package/dist/types/components.d.ts +19 -7
- package/package.json +1 -1
- package/dist/bromcom-ui/p-042efd5e.entry.js +0 -5
- package/dist/bromcom-ui/p-2608b100.entry.js +0 -5
- package/dist/bromcom-ui/p-2a9053d8.js +0 -5
- package/dist/bromcom-ui/p-2ba8bfb9.js +0 -5
- package/dist/bromcom-ui/p-45ca98b5.entry.js +0 -5
- package/dist/bromcom-ui/p-4ae97c02.entry.js +0 -5
- package/dist/bromcom-ui/p-5600c817.js +0 -5
- package/dist/bromcom-ui/p-57a08b2c.entry.js +0 -5
- package/dist/bromcom-ui/p-7014cade.entry.js +0 -5
- package/dist/bromcom-ui/p-8403e81f.entry.js +0 -5
- package/dist/bromcom-ui/p-bebbec89.entry.js +0 -5
- package/dist/bromcom-ui/p-edfa7c7b.entry.js +0 -5
- package/dist/bromcom-ui/p-f8a91bd5.js +0 -5
- package/dist/cjs/bcm-textarea.cjs.entry.js +0 -163
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import { Generate
|
|
5
|
+
import { Generate } from "@bcm/helpers";
|
|
6
6
|
import { Bcm } from "@bcm/model";
|
|
7
7
|
import { CaptionTemplate } from "@bcm/template";
|
|
8
|
-
import {
|
|
9
|
-
import { Host, h } from "@stencil/core";
|
|
8
|
+
import { Fragment, Host, forceUpdate, h } from "@stencil/core";
|
|
10
9
|
import cs from "classnames";
|
|
10
|
+
import { inputDropdownStyle } from "./input-dropdown.style";
|
|
11
11
|
class InputDropdownData {
|
|
12
12
|
}
|
|
13
|
-
export class
|
|
13
|
+
export class BcmInputDropdown {
|
|
14
14
|
constructor() {
|
|
15
15
|
this.handleKeyPress = e => {
|
|
16
16
|
var _a, _b;
|
|
@@ -19,31 +19,25 @@ export class InputDropdown {
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
this.onClickSave = () => {
|
|
23
|
-
const lateMin = +this.lateMinutes;
|
|
24
|
-
if (lateMin > 0) {
|
|
25
|
-
this.value = Object.assign(Object.assign({}, this.value), { late: lateMin });
|
|
26
|
-
this.onChangeDropdown.emit(this.value);
|
|
27
|
-
this.onCloseLateContent();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
22
|
this._id = Generate.UID();
|
|
31
23
|
this.value = undefined;
|
|
32
|
-
this.defaultValue =
|
|
33
|
-
this.
|
|
24
|
+
this.defaultValue = {};
|
|
25
|
+
this.lateKeys = "L";
|
|
34
26
|
this.maxCharacterLimit = 1;
|
|
35
27
|
this.size = Bcm.Size.medium;
|
|
36
28
|
this.label = undefined;
|
|
37
29
|
this.placeholder = undefined;
|
|
30
|
+
this.name = undefined;
|
|
38
31
|
this.fullWidth = false;
|
|
32
|
+
this.hideComment = false;
|
|
33
|
+
this.hideCaption = true;
|
|
39
34
|
this.disabled = false;
|
|
40
35
|
this.required = false;
|
|
41
36
|
this.readonly = false;
|
|
42
|
-
this.componentIsActive = false;
|
|
43
37
|
this.data = [
|
|
44
38
|
{ key: "/", value: "Present", color: "#00b050" },
|
|
45
39
|
{ key: "B", value: "Educated off site (NOT dual registration)", color: "#ffc000" },
|
|
46
|
-
{ key: "C", value: "Other authorised circumstance", color: "#
|
|
40
|
+
{ key: "C", value: "Other authorised circumstance", color: "#ffc000" },
|
|
47
41
|
{ key: "D", value: "Dual registration", color: "#0070c0" },
|
|
48
42
|
{ key: "E", value: "Excluded", color: "#ff0000" },
|
|
49
43
|
{ key: "F", value: "Free Study", color: "#ffc000" },
|
|
@@ -56,36 +50,67 @@ export class InputDropdown {
|
|
|
56
50
|
this.captionType = Bcm.Status.default;
|
|
57
51
|
this.captionError = undefined;
|
|
58
52
|
this.customErrorMessage = undefined;
|
|
59
|
-
this.invalid = false;
|
|
60
53
|
this.captionCache = undefined;
|
|
61
54
|
this.captionTypeCache = undefined;
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
}
|
|
65
|
-
get content() {
|
|
66
|
-
return document.getElementById(this._id + "-input-dropdown-main-content");
|
|
55
|
+
this.isOpenMenu = false;
|
|
56
|
+
this.invalid = false;
|
|
67
57
|
}
|
|
68
|
-
get
|
|
69
|
-
return document.getElementById(
|
|
58
|
+
get overlayContainer() {
|
|
59
|
+
return document.getElementById("bcm-overlay-container");
|
|
70
60
|
}
|
|
71
|
-
get
|
|
72
|
-
|
|
61
|
+
get menuContent() {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
return (_b = (_a = this.overlayContainer) === null || _a === void 0 ? void 0 : _a.querySelector("#" + `i-dropdown-menu-${this._id}`)) !== null && _b !== void 0 ? _b : this.el.querySelector("#" + `i-dropdown-menu-${this._id}`);
|
|
73
64
|
}
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
get keys() {
|
|
66
|
+
return this.lateKeys.toLocaleLowerCase().split(",");
|
|
76
67
|
}
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
get isLate() {
|
|
69
|
+
var _a, _b, _c, _d, _e, _f;
|
|
70
|
+
return (this.keys.includes((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase()) ||
|
|
71
|
+
((_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c.find(item => { var _a, _b, _c; return ((_a = item === null || item === void 0 ? void 0 : item.key) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.key) === null || _c === void 0 ? void 0 : _c.toLowerCase()); })) === null || _d === void 0 ? void 0 : _d.isLate) ||
|
|
72
|
+
((_f = (_e = this.data) === null || _e === void 0 ? void 0 : _e.find(item => { var _a, _b, _c; return ((_a = item === null || item === void 0 ? void 0 : item.key) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.key) === null || _c === void 0 ? void 0 : _c.toLowerCase()); })) === null || _f === void 0 ? void 0 : _f.lateMin) > 0);
|
|
79
73
|
}
|
|
80
|
-
|
|
74
|
+
componentWillLoad() {
|
|
75
|
+
var _a, _b;
|
|
81
76
|
this.captionCache = this.caption;
|
|
82
77
|
this.captionTypeCache = this.captionType;
|
|
78
|
+
if (((_a = Object.keys(this.defaultValue)) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
79
|
+
this.watchDefaultValueHandler(this.defaultValue);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
this.value = (_b = this.data) === null || _b === void 0 ? void 0 : _b.find(item => item.selected);
|
|
83
|
+
}
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
get commentContent() {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
return (_b = (_a = this.overlayContainer) === null || _a === void 0 ? void 0 : _a.querySelector("#" + `i-dropdown-comment-${this._id}`)) !== null && _b !== void 0 ? _b : this.el.querySelector("#" + `i-dropdown-comment-${this._id}`);
|
|
88
|
+
}
|
|
89
|
+
clickListener(e) {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const isSelf = Generate.findEventPath(e, this.el);
|
|
92
|
+
const isLinked = Generate.findEventPathWithNodeName(e, "BCM-LINKED");
|
|
93
|
+
if (!isSelf && !isLinked && !this.keys.includes((_a = this.value) === null || _a === void 0 ? void 0 : _a.key)) {
|
|
94
|
+
(_b = this.commentContent) === null || _b === void 0 ? void 0 : _b.hide();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
watchDefaultValueHandler(newValue) {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
if (newValue) {
|
|
101
|
+
this.value = (_a = this.data) === null || _a === void 0 ? void 0 : _a.find(item => { var _a, _b; return ((_a = item === null || item === void 0 ? void 0 : item.key) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = newValue.key) === null || _b === void 0 ? void 0 : _b.toLowerCase()); });
|
|
102
|
+
this.data = this.data.map(data => {
|
|
103
|
+
if (data.key === (newValue === null || newValue === void 0 ? void 0 : newValue.key)) {
|
|
104
|
+
data = newValue;
|
|
105
|
+
data.selected = true;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
data.selected = false;
|
|
109
|
+
}
|
|
110
|
+
return data;
|
|
111
|
+
});
|
|
112
|
+
this.value = (_b = this.data) === null || _b === void 0 ? void 0 : _b.find(item => item === null || item === void 0 ? void 0 : item.selected);
|
|
113
|
+
forceUpdate(this.el);
|
|
89
114
|
}
|
|
90
115
|
}
|
|
91
116
|
async set(data) {
|
|
@@ -95,7 +120,7 @@ export class InputDropdown {
|
|
|
95
120
|
return this.value;
|
|
96
121
|
}
|
|
97
122
|
async setClear() {
|
|
98
|
-
this.value =
|
|
123
|
+
this.value = null;
|
|
99
124
|
return Promise.resolve();
|
|
100
125
|
}
|
|
101
126
|
async resetCaption() {
|
|
@@ -105,124 +130,85 @@ export class InputDropdown {
|
|
|
105
130
|
this.invalid = false;
|
|
106
131
|
return Promise.resolve();
|
|
107
132
|
}
|
|
108
|
-
|
|
109
|
-
var _a
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
133
|
+
onSelectItem(item) {
|
|
134
|
+
var _a;
|
|
135
|
+
this.invalid = false;
|
|
136
|
+
this.data = this.data.map(data => (Object.assign(Object.assign({}, data), { selected: data.key === item.key })));
|
|
137
|
+
this.value = (_a = this.data) === null || _a === void 0 ? void 0 : _a.find(item => item === null || item === void 0 ? void 0 : item.selected);
|
|
138
|
+
this.onChangeDropdown.emit(this.value);
|
|
139
|
+
this.change.emit();
|
|
116
140
|
}
|
|
117
141
|
async handleInput(e) {
|
|
118
|
-
var _a, _b, _c, _d;
|
|
142
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
119
143
|
const value = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value;
|
|
144
|
+
this.isOpenMenu = true;
|
|
120
145
|
const maxLengthExceeded = (value === null || value === void 0 ? void 0 : value.length) >= +this.maxCharacterLimit;
|
|
121
146
|
if (maxLengthExceeded) {
|
|
122
147
|
const item = (_b = this.data) === null || _b === void 0 ? void 0 : _b.find(item => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.key) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === value.toLowerCase(); });
|
|
123
148
|
if (item) {
|
|
124
|
-
this.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if (this.isLate()) {
|
|
128
|
-
(_c = this.lateContent) === null || _c === void 0 ? void 0 : _c.show();
|
|
129
|
-
await delay(60);
|
|
130
|
-
document.querySelector("#" + this._id + "-input-dropdown-late-content-input input").focus();
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
(_d = this.lateContent) === null || _d === void 0 ? void 0 : _d.hide();
|
|
149
|
+
await ((_c = this.menuContent) === null || _c === void 0 ? void 0 : _c.hide());
|
|
150
|
+
if (!(item === null || item === void 0 ? void 0 : item.hideComment)) {
|
|
151
|
+
(_d = this.commentContent) === null || _d === void 0 ? void 0 : _d.show();
|
|
134
152
|
}
|
|
135
|
-
this.
|
|
153
|
+
this.onSelectItem(item);
|
|
136
154
|
}
|
|
137
155
|
else {
|
|
156
|
+
this.invalid = true;
|
|
138
157
|
this.value = e.target.value;
|
|
139
|
-
this.
|
|
158
|
+
await ((_e = this.menuContent) === null || _e === void 0 ? void 0 : _e.show());
|
|
140
159
|
this._input.style.color = "#ff0000";
|
|
141
|
-
this.invalid = true;
|
|
142
160
|
}
|
|
143
161
|
}
|
|
144
162
|
else {
|
|
145
|
-
this.
|
|
163
|
+
(_f = this.commentContent) === null || _f === void 0 ? void 0 : _f.hide();
|
|
164
|
+
(_g = this.menuContent) === null || _g === void 0 ? void 0 : _g.hide();
|
|
146
165
|
this.value = null;
|
|
147
166
|
this._input.style.color = "#000000";
|
|
148
167
|
this.invalid = false;
|
|
149
168
|
}
|
|
150
169
|
this.change.emit();
|
|
151
170
|
}
|
|
171
|
+
onClickSave() {
|
|
172
|
+
var _a;
|
|
173
|
+
(_a = this.commentContent) === null || _a === void 0 ? void 0 : _a.hide();
|
|
174
|
+
this.data = this.data.map(data => (Object.assign(Object.assign({}, data), (data.key === this.value.key && {
|
|
175
|
+
lateMin: this.value.lateMin,
|
|
176
|
+
comment: this.value.comment,
|
|
177
|
+
}))));
|
|
178
|
+
forceUpdate(this.el);
|
|
179
|
+
this.onChangeDropdown.emit(this.value);
|
|
180
|
+
this.change.emit();
|
|
181
|
+
}
|
|
152
182
|
async onClick(item) {
|
|
153
183
|
var _a, _b;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this._input.style.color = item.color;
|
|
157
|
-
this.onCloseMainContent();
|
|
158
|
-
if (this.isLate()) {
|
|
159
|
-
(_a = this.lateContent) === null || _a === void 0 ? void 0 : _a.show();
|
|
160
|
-
await delay(60);
|
|
161
|
-
document.querySelector("#" + this._id + "-input-dropdown-late-content-input input").focus();
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
(_b = this.lateContent) === null || _b === void 0 ? void 0 : _b.hide();
|
|
184
|
+
if (!(item === null || item === void 0 ? void 0 : item.hideComment)) {
|
|
185
|
+
(_a = this.commentContent) === null || _a === void 0 ? void 0 : _a.show();
|
|
165
186
|
}
|
|
166
|
-
this.
|
|
167
|
-
this.
|
|
187
|
+
await ((_b = this.menuContent) === null || _b === void 0 ? void 0 : _b.hide());
|
|
188
|
+
this.onSelectItem(item);
|
|
168
189
|
}
|
|
169
190
|
render() {
|
|
170
|
-
|
|
171
|
-
const
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
[Bcm.Size.small]: "tw-text-2",
|
|
175
|
-
[Bcm.Size.medium]: "tw-text-3 ",
|
|
176
|
-
[Bcm.Size.large]: "tw-text-4 ",
|
|
177
|
-
}[size];
|
|
178
|
-
const fontSizes = {
|
|
179
|
-
[Bcm.Size.small]: "tw-text-2",
|
|
180
|
-
[Bcm.Size.medium]: "tw-text-3",
|
|
181
|
-
[Bcm.Size.large]: "tw-text-4",
|
|
182
|
-
}[size];
|
|
183
|
-
const isError = invalid || captionType === "error";
|
|
184
|
-
const RenderMainContent = () => {
|
|
191
|
+
var _a, _b, _c, _d, _e;
|
|
192
|
+
const { size, label, placeholder, required, disabled, readonly, _id, invalid, hideComment, noCaption, customErrorMessage, caption, captionType, captionError, hideCaption } = this;
|
|
193
|
+
const { base, inputArea, input, button, menu, menuItem, commentArea, disabledItem, content, selectedItem } = inputDropdownStyle({ size, invalid, hideComment, disabled });
|
|
194
|
+
const MenuTemplates = () => {
|
|
185
195
|
var _a;
|
|
186
|
-
return (h(
|
|
187
|
-
_a.map(item => {
|
|
188
|
-
var _a;
|
|
189
|
-
return (h("li", { onClick: () => this.onClick(item), class: cs("tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 hover:tw-bg-blue-100", {
|
|
190
|
-
"tw-bg-primary-200": ((_a = this.value) === null || _a === void 0 ? void 0 : _a.key) == item.key,
|
|
191
|
-
}) }, h("span", null, " ", item.key), " - ", h("span", null, item.value)));
|
|
192
|
-
}))) : null));
|
|
196
|
+
return (h(Fragment, null, this.isOpenMenu ? (h("div", { class: menu() }, this.invalid && (h("li", { class: menuItem() + " tw-bg-red-100 hover:tw-bg-red-100" }, h("span", { class: "tw-text-red-900" }, h("i", { class: "far fa-exclamation-circle" })), h("span", null, "There is not mark you entered, please use"))), (_a = this.data) === null || _a === void 0 ? void 0 :
|
|
197
|
+
_a.map((item) => (h(Fragment, null, !(item === null || item === void 0 ? void 0 : item.disabled) ? (h("li", { class: (item === null || item === void 0 ? void 0 : item.selected) ? selectedItem() : menuItem(), onClick: () => this.onClick(item) }, h("span", null, item.key), " - ", h("span", null, item.value))) : (h("li", { class: disabledItem() }, h("span", null, item.key), " - ", h("span", null, item.value)))))))) : null));
|
|
193
198
|
};
|
|
194
|
-
const
|
|
195
|
-
var _a;
|
|
196
|
-
return (h("bcm-
|
|
197
|
-
var _a;
|
|
198
|
-
if (detail) {
|
|
199
|
-
(_a = this.el.querySelector("#" + this._id + "-input-dropdown-late-content-input")) === null || _a === void 0 ? void 0 : _a.onBcmFocus();
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
this._input.focus();
|
|
203
|
-
}
|
|
204
|
-
} }, this.componentIsActive ? (h("div", { class: "tw-flex tw-h-fit tw-w-full !tw-min-w-[288px] tw-flex-col tw-items-start tw-gap-4 tw-rounded tw-p-4 tw-shadow-2" }, h("div", { class: "tw-flex tw-w-full tw-flex-col tw-items-start tw-justify-center tw-gap-3" }, h("header", { class: "tw-flex tw-w-full tw-flex-row tw-items-center tw-justify-between" }, h("div", { class: "tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-2" }, h("i", { class: "tw-text-size-4 fas fa-clock tw-text-amber-600" }), h("bcm-label", { class: "!tw-mb-0", size: "large", value: "Minutes Late", required: true })), h("div", { class: " tw-flex tw-h-4 tw-w-4 tw-flex-row tw-items-center tw-justify-center", onClick: () => this.onCloseLateContent() }, h("i", { class: "tw-text-size-4 fas fa-times tw-text-slate-600" }))), h("bcm-input", { id: this._id + "-input-dropdown-late-content-input", type: "number", "full-width": true, "no-caption": true, value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.late, placeholder: "Enter Minus Late", required: true, "onBcm-change": (e) => (this.lateMinutes = +e.detail), onKeyDown: e => {
|
|
205
|
-
if (e.key === "Enter") {
|
|
206
|
-
this.onClickSave();
|
|
207
|
-
}
|
|
208
|
-
} })), h("section", { class: "tw-flex tw-w-full tw-flex-row tw-items-center tw-justify-end" }, h("bcm-button", { size: "small", variant: "save", color: "blue", disabled: +lateMinutes < 1, onClick: () => this.onClickSave() }, "Save")))) : null));
|
|
199
|
+
const CommentTemplate = () => {
|
|
200
|
+
var _a, _b, _c;
|
|
201
|
+
return (h(Fragment, null, this.isOpenMenu ? (h("div", { class: commentArea() }, this.isLate ? (h(Fragment, null, h("bcm-input", { label: "Minus Late", required: true, id: this._id + "-input-dropdown-late-content-input", type: "number", "full-width": true, "no-caption": true, autocomplete: false, value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.lateMin, placeholder: "Enter Minus Late", "onBcm-change": ({ detail }) => (this.value.lateMin = +detail) }, h("i", { slot: "prefix", class: "far fa-clock" })))) : null, h("bcm-textarea", { "full-width": true, value: (_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.comment) !== null && _c !== void 0 ? _c : "", "onBcm-change": ({ detail }) => (this.value.comment = detail), label: "Description", "no-caption": true, rows: 4 }), h("footer", { class: "tw-flex tw-w-full tw-flex-row tw-items-center tw-justify-end tw-gap-2" }, h("bcm-button", { icon: "fas fa-times", kind: "ghost", "icon-position": "prefix", onClick: () => { var _a; return (_a = this.commentContent) === null || _a === void 0 ? void 0 : _a.hide(); } }, "Close"), h("bcm-button", { icon: "fas fa-save", "icon-position": "prefix", onClick: () => this.onClickSave() }, "Save")))) : null));
|
|
209
202
|
};
|
|
210
|
-
return (h(Host, { class:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
"tw-
|
|
218
|
-
|
|
219
|
-
"hover:tw-border-default-600 hover:tw-bg-default-50": !disabled && !readonly && !isError,
|
|
220
|
-
"tw-outline-none focus:tw-ring-2 focus:tw-ring-default-400": !disabled && !readonly && !isError,
|
|
221
|
-
}) }, h("div", { class: " tw-flex tw-w-full tw-min-w-[42px] tw-flex-row tw-items-center tw-justify-center" }, value && (value === null || value === void 0 ? void 0 : value.late) && (h("bcm-tooltip", { message: `${lateMinutes} ${pluralize("Minute", lateMinutes)} Late`, trigger: "hover" }, h("i", { class: iconSizes + " fas fa-clock", onClick: () => this.lateContent.show() }))), captionType == Bcm.Status.error && h("i", { class: iconSizes + " tw-text-default-500" + " fas fa-exclamation-circle" }), h("input", { class: cs("tw-font-sans", "tw-h-full tw-w-full tw-bg-transparent tw-text-center tw-font-semibold !tw-uppercase tw-outline-none ", "disabled:tw-cursor-not-allowed disabled:tw-text-slate-400", "readonly:tw-text-slate-700 readonly:tw-cursor-text", `${fontSizes}`), id: this._id + "-dropdown-input", type: "text", tabIndex: -1, disabled: disabled, placeholder: this.placeholder, value: value === null || value === void 0 ? void 0 : value.key, required: this.required, readOnly: readonly, onKeyPress: e => this.handleKeyPress(e), onInput: e => this.handleInput(e), ref: el => (this._input = el), onFocus: () => this._input.select() })), h("button", { id: this._id + "-dropdown-input-button", class: cs("dropdown-input-button", "tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-1 tw-rounded tw-outline-none", "tw-border tw-border-solid tw-border-slate-300 tw-bg-slate-50 tw-font-medium tw-text-slate-600", "hover:tw-border-slate-400 hover:tw-bg-slate-200", "tw-min-w-[32px]", "tw-cursor-pointer", "disabled:tw-cursor-not-allowed disabled:tw-text-slate-400", "readonly:tw-text-slate-700 readonly:tw-cursor-text", {
|
|
222
|
-
"tw-h-[18px] tw-text-1 tw-leading-none": size == Bcm.Size.small,
|
|
223
|
-
"tw-h-[22px] tw-text-2": size == Bcm.Size.medium,
|
|
224
|
-
"tw-h-[30px] tw-text-2": size == Bcm.Size.large,
|
|
225
|
-
}), "aria-label": "dropdown", "aria-haspopup": "true", "aria-expanded": "false", disabled: disabled || readonly, tabIndex: -1 }, h("i", { class: "fas fa-chevron-down" })), h(RenderMainContent, null), h(RenderLateContent, null)), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption, customErrorMessage: this.customErrorMessage })));
|
|
203
|
+
return (h(Host, { class: base() }, label && h("bcm-label", { htmlFor: _id + "-dropdown-input", size: size, value: label, required: required }), h("div", { class: content() }, h("div", { class: inputArea() }, h("input", { id: _id + "-dropdown-input", class: input(), style: { color: (_a = this.value) === null || _a === void 0 ? void 0 : _a.color }, type: "text", tabIndex: -1, placeholder: placeholder, value: (_b = this.value) === null || _b === void 0 ? void 0 : _b.key, disabled: disabled, required: required, autoComplete: "off", readOnly: readonly, onKeyPress: e => this.handleKeyPress(e), onInput: e => this.handleInput(e), ref: el => (this._input = el) }), h("button", { disabled: disabled, id: `i-dropdown-button-${_id}`, class: button(), onClick: () => (this.isOpenMenu = true) }, h("i", { class: "fas fa-chevron-down" })), h("bcm-linked", { "onBcm-open": ({ detail }) => { var _a; return detail && ((_a = this.commentContent) === null || _a === void 0 ? void 0 : _a.hide()); }, class: "tw-mt-1", id: `i-dropdown-menu-${_id}`, "target-id": `i-dropdown-button-${_id}`, placement: "bottom-start" }, h(MenuTemplates, null)), h("bcm-linked", { id: `i-dropdown-comment-${_id}`, "target-id": _id, trigger: "custom", placement: "left" }, h(CommentTemplate, null))), !this.hideComment ? (h("span", { onClick: () => {
|
|
204
|
+
var _a, _b;
|
|
205
|
+
if ((_a = this.value) === null || _a === void 0 ? void 0 : _a.key) {
|
|
206
|
+
this.isOpenMenu = true;
|
|
207
|
+
(_b = this.commentContent) === null || _b === void 0 ? void 0 : _b.show();
|
|
208
|
+
}
|
|
209
|
+
}, class: cs(((_c = this.value) === null || _c === void 0 ? void 0 : _c.comment) || ((_d = this.value) === null || _d === void 0 ? void 0 : _d.lateMin) > 0 ? "tw-text-slate-600" : "tw-text-slate-400", {
|
|
210
|
+
"tw-cursor-pointer": (_e = this.value) === null || _e === void 0 ? void 0 : _e.key,
|
|
211
|
+
}) }, h("i", { class: "fas fa-comment" }))) : null), !hideCaption && h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption, customErrorMessage: customErrorMessage })));
|
|
226
212
|
}
|
|
227
213
|
static get is() { return "bcm-input-dropdown"; }
|
|
228
214
|
static get originalStyleUrls() {
|
|
@@ -256,29 +242,35 @@ export class InputDropdown {
|
|
|
256
242
|
"defaultValue": "Generate.UID()"
|
|
257
243
|
},
|
|
258
244
|
"value": {
|
|
259
|
-
"type": "
|
|
245
|
+
"type": "unknown",
|
|
260
246
|
"mutable": true,
|
|
261
247
|
"complexType": {
|
|
262
|
-
"original": "
|
|
263
|
-
"resolved": "
|
|
264
|
-
"references": {
|
|
248
|
+
"original": "InputDropdownData",
|
|
249
|
+
"resolved": "InputDropdownData",
|
|
250
|
+
"references": {
|
|
251
|
+
"InputDropdownData": {
|
|
252
|
+
"location": "global"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
265
255
|
},
|
|
266
256
|
"required": false,
|
|
267
257
|
"optional": false,
|
|
268
258
|
"docs": {
|
|
269
259
|
"tags": [],
|
|
270
260
|
"text": ""
|
|
271
|
-
}
|
|
272
|
-
"attribute": "value",
|
|
273
|
-
"reflect": false
|
|
261
|
+
}
|
|
274
262
|
},
|
|
275
263
|
"defaultValue": {
|
|
276
|
-
"type": "
|
|
264
|
+
"type": "unknown",
|
|
277
265
|
"mutable": true,
|
|
278
266
|
"complexType": {
|
|
279
|
-
"original": "
|
|
280
|
-
"resolved": "
|
|
281
|
-
"references": {
|
|
267
|
+
"original": "Object",
|
|
268
|
+
"resolved": "Object",
|
|
269
|
+
"references": {
|
|
270
|
+
"Object": {
|
|
271
|
+
"location": "global"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
282
274
|
},
|
|
283
275
|
"required": false,
|
|
284
276
|
"optional": false,
|
|
@@ -286,10 +278,9 @@ export class InputDropdown {
|
|
|
286
278
|
"tags": [],
|
|
287
279
|
"text": ""
|
|
288
280
|
},
|
|
289
|
-
"
|
|
290
|
-
"reflect": false
|
|
281
|
+
"defaultValue": "{}"
|
|
291
282
|
},
|
|
292
|
-
"
|
|
283
|
+
"lateKeys": {
|
|
293
284
|
"type": "string",
|
|
294
285
|
"mutable": true,
|
|
295
286
|
"complexType": {
|
|
@@ -303,7 +294,7 @@ export class InputDropdown {
|
|
|
303
294
|
"tags": [],
|
|
304
295
|
"text": ""
|
|
305
296
|
},
|
|
306
|
-
"attribute": "late-
|
|
297
|
+
"attribute": "late-keys",
|
|
307
298
|
"reflect": false,
|
|
308
299
|
"defaultValue": "\"L\""
|
|
309
300
|
},
|
|
@@ -382,6 +373,23 @@ export class InputDropdown {
|
|
|
382
373
|
"attribute": "placeholder",
|
|
383
374
|
"reflect": false
|
|
384
375
|
},
|
|
376
|
+
"name": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"mutable": false,
|
|
379
|
+
"complexType": {
|
|
380
|
+
"original": "string",
|
|
381
|
+
"resolved": "string",
|
|
382
|
+
"references": {}
|
|
383
|
+
},
|
|
384
|
+
"required": false,
|
|
385
|
+
"optional": false,
|
|
386
|
+
"docs": {
|
|
387
|
+
"tags": [],
|
|
388
|
+
"text": ""
|
|
389
|
+
},
|
|
390
|
+
"attribute": "name",
|
|
391
|
+
"reflect": false
|
|
392
|
+
},
|
|
385
393
|
"fullWidth": {
|
|
386
394
|
"type": "boolean",
|
|
387
395
|
"mutable": false,
|
|
@@ -400,6 +408,42 @@ export class InputDropdown {
|
|
|
400
408
|
"reflect": true,
|
|
401
409
|
"defaultValue": "false"
|
|
402
410
|
},
|
|
411
|
+
"hideComment": {
|
|
412
|
+
"type": "boolean",
|
|
413
|
+
"mutable": false,
|
|
414
|
+
"complexType": {
|
|
415
|
+
"original": "boolean",
|
|
416
|
+
"resolved": "boolean",
|
|
417
|
+
"references": {}
|
|
418
|
+
},
|
|
419
|
+
"required": false,
|
|
420
|
+
"optional": false,
|
|
421
|
+
"docs": {
|
|
422
|
+
"tags": [],
|
|
423
|
+
"text": ""
|
|
424
|
+
},
|
|
425
|
+
"attribute": "hide-comment",
|
|
426
|
+
"reflect": true,
|
|
427
|
+
"defaultValue": "false"
|
|
428
|
+
},
|
|
429
|
+
"hideCaption": {
|
|
430
|
+
"type": "boolean",
|
|
431
|
+
"mutable": false,
|
|
432
|
+
"complexType": {
|
|
433
|
+
"original": "boolean",
|
|
434
|
+
"resolved": "boolean",
|
|
435
|
+
"references": {}
|
|
436
|
+
},
|
|
437
|
+
"required": false,
|
|
438
|
+
"optional": false,
|
|
439
|
+
"docs": {
|
|
440
|
+
"tags": [],
|
|
441
|
+
"text": ""
|
|
442
|
+
},
|
|
443
|
+
"attribute": "hide-caption",
|
|
444
|
+
"reflect": false,
|
|
445
|
+
"defaultValue": "true"
|
|
446
|
+
},
|
|
403
447
|
"disabled": {
|
|
404
448
|
"type": "boolean",
|
|
405
449
|
"mutable": false,
|
|
@@ -456,7 +500,7 @@ export class InputDropdown {
|
|
|
456
500
|
},
|
|
457
501
|
"data": {
|
|
458
502
|
"type": "unknown",
|
|
459
|
-
"mutable":
|
|
503
|
+
"mutable": true,
|
|
460
504
|
"complexType": {
|
|
461
505
|
"original": "InputDropdownData[]",
|
|
462
506
|
"resolved": "InputDropdownData[]",
|
|
@@ -472,7 +516,7 @@ export class InputDropdown {
|
|
|
472
516
|
"tags": [],
|
|
473
517
|
"text": ""
|
|
474
518
|
},
|
|
475
|
-
"defaultValue": "[\n { key: \"/\", value: \"Present\", color: \"#00b050\" },\n { key: \"B\", value: \"Educated off site (NOT dual registration)\", color: \"#ffc000\" },\n { key: \"C\", value: \"Other authorised circumstance\", color: \"#
|
|
519
|
+
"defaultValue": "[\n { key: \"/\", value: \"Present\", color: \"#00b050\" },\n { key: \"B\", value: \"Educated off site (NOT dual registration)\", color: \"#ffc000\" },\n { key: \"C\", value: \"Other authorised circumstance\", color: \"#ffc000\" },\n { key: \"D\", value: \"Dual registration\", color: \"#0070c0\" },\n { key: \"E\", value: \"Excluded\", color: \"#ff0000\" },\n { key: \"F\", value: \"Free Study\", color: \"#ffc000\" },\n { key: \"I\", value: \"Illness\", color: \"#ff0000\" },\n { key: \"J\", value: \"Interview\", color: \"#ffc000\" },\n { key: \"L\", value: \"Late before reg. closed\", color: \"#ffc000\" },\n ]"
|
|
476
520
|
},
|
|
477
521
|
"caption": {
|
|
478
522
|
"type": "string",
|
|
@@ -570,12 +614,10 @@ export class InputDropdown {
|
|
|
570
614
|
}
|
|
571
615
|
static get states() {
|
|
572
616
|
return {
|
|
573
|
-
"componentIsActive": {},
|
|
574
|
-
"invalid": {},
|
|
575
617
|
"captionCache": {},
|
|
576
618
|
"captionTypeCache": {},
|
|
577
|
-
"
|
|
578
|
-
"
|
|
619
|
+
"isOpenMenu": {},
|
|
620
|
+
"invalid": {}
|
|
579
621
|
};
|
|
580
622
|
}
|
|
581
623
|
static get events() {
|
|
@@ -637,14 +679,17 @@ export class InputDropdown {
|
|
|
637
679
|
},
|
|
638
680
|
"get": {
|
|
639
681
|
"complexType": {
|
|
640
|
-
"signature": "() => Promise<
|
|
682
|
+
"signature": "() => Promise<InputDropdownData>",
|
|
641
683
|
"parameters": [],
|
|
642
684
|
"references": {
|
|
643
685
|
"Promise": {
|
|
644
686
|
"location": "global"
|
|
687
|
+
},
|
|
688
|
+
"InputDropdownData": {
|
|
689
|
+
"location": "global"
|
|
645
690
|
}
|
|
646
691
|
},
|
|
647
|
-
"return": "Promise<
|
|
692
|
+
"return": "Promise<InputDropdownData>"
|
|
648
693
|
},
|
|
649
694
|
"docs": {
|
|
650
695
|
"text": "",
|
|
@@ -686,6 +731,12 @@ export class InputDropdown {
|
|
|
686
731
|
};
|
|
687
732
|
}
|
|
688
733
|
static get elementRef() { return "el"; }
|
|
734
|
+
static get watchers() {
|
|
735
|
+
return [{
|
|
736
|
+
"propName": "defaultValue",
|
|
737
|
+
"methodName": "watchDefaultValueHandler"
|
|
738
|
+
}];
|
|
739
|
+
}
|
|
689
740
|
static get listeners() {
|
|
690
741
|
return [{
|
|
691
742
|
"name": "click",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import { tv } from "tailwind-variants";
|
|
6
|
+
export const inputDropdownStyle = tv({
|
|
7
|
+
slots: {
|
|
8
|
+
base: "tw-font-sans tw-flex tw-flex-col tw-items-start tw-justify-start tw-gap-2",
|
|
9
|
+
content: "tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-3",
|
|
10
|
+
inputArea: "tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-1 tw-box-content tw-border tw-border-solid tw-max-w-[100px] tw-uppercase tw-font-medium tw-text-center tw-border-gray-300 tw-rounded",
|
|
11
|
+
input: "tw-flex-1 tw-text-inherit tw-uppercase tw-font-semibold tw-text-center tw-border-none tw-bg-transparent tw-outline-none tw-w-full",
|
|
12
|
+
button: [
|
|
13
|
+
"input-dropdown-button tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-1 tw-rounded tw-outline-none tw-bg-slate-100",
|
|
14
|
+
"tw-border tw-border-solid tw-border-slate-300 tw-font-medium tw-text-slate-600",
|
|
15
|
+
"hover:tw-border-slate-400 hover:tw-bg-slate-200",
|
|
16
|
+
"tw-min-w-[32px]",
|
|
17
|
+
"tw-cursor-pointer",
|
|
18
|
+
"disabled:tw-cursor-not-allowed disabled:tw-text-slate-400 disabled:tw-pointer-events-none",
|
|
19
|
+
"readonly:tw-text-slate-700 readonly:tw-cursor-text",
|
|
20
|
+
],
|
|
21
|
+
menu: "tw-mt-1 tw-flex tw-flex-col tw-items-start tw-justify-center tw-gap-2 tw-overflow-auto tw-bg-white tw-p-3 tw-font-sans tw-text-3 tw-text-slate-700",
|
|
22
|
+
menuItem: "tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 hover:tw-bg-blue-100",
|
|
23
|
+
selectedItem: "tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 tw-bg-primary-200",
|
|
24
|
+
disabledItem: "tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-cursor-not-allowed tw-text-slate-400 tw-bg-slate-100 hover:tw-bg-slate-100 tw-list-none",
|
|
25
|
+
commentArea: "tw-flex tw-h-fit tw-w-full tw-min-w-[288px] tw-flex-col tw-items-start tw-gap-3 tw-rounded tw-p-4 tw-shadow-2",
|
|
26
|
+
},
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
small: {
|
|
30
|
+
button: "tw-h-[18px] tw-text-1 tw-leading-none",
|
|
31
|
+
},
|
|
32
|
+
medium: {
|
|
33
|
+
button: "tw-h-[24px] tw-text-2",
|
|
34
|
+
inputArea: "tw-p-0.5",
|
|
35
|
+
input: "tw-text-4",
|
|
36
|
+
},
|
|
37
|
+
large: {
|
|
38
|
+
button: "tw-h-[30px] tw-text-2",
|
|
39
|
+
inputArea: "tw-p-1",
|
|
40
|
+
input: "tw-text-6",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
invalid: {
|
|
44
|
+
true: {
|
|
45
|
+
inputArea: "tw-border-red-600 tw-bg-red-50",
|
|
46
|
+
input: "tw-text-red-500",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
disabled: {
|
|
50
|
+
true: {
|
|
51
|
+
base: "tw-opacity-50 tw-cursor-not-allowed",
|
|
52
|
+
input: "tw-cursor-not-allowed",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
hideComment: {
|
|
56
|
+
true: {
|
|
57
|
+
base: "tw-min-w-[98px]",
|
|
58
|
+
},
|
|
59
|
+
false: {
|
|
60
|
+
base: "tw-min-w-[128px] ",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
label: {
|
|
64
|
+
true: "",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
size: "medium",
|
|
69
|
+
invalid: false,
|
|
70
|
+
hideComment: false,
|
|
71
|
+
disabled: false,
|
|
72
|
+
},
|
|
73
|
+
});
|