bromcom-ui 2.9.0-rc.3 → 2.9.0-rc.5
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-0543a86f.js +5 -0
- package/dist/bromcom-ui/p-0a528362.entry.js +5 -0
- package/dist/bromcom-ui/{p-04410e89.entry.js → p-0c549bd0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-161864f8.entry.js → p-0d4372c9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8c9d109c.entry.js → p-15758356.entry.js} +1 -1
- package/dist/bromcom-ui/{p-259ede50.entry.js → p-179af180.entry.js} +1 -1
- package/dist/bromcom-ui/p-1a04159f.entry.js +5 -0
- package/dist/bromcom-ui/{p-9e64286c.entry.js → p-1a405289.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5648b456.entry.js → p-1b1f4b44.entry.js} +1 -1
- package/dist/bromcom-ui/p-1eabd5dc.js +10 -0
- package/dist/bromcom-ui/p-24cffc16.entry.js +13 -0
- package/dist/bromcom-ui/{p-2db9415f.entry.js → p-25f9928a.entry.js} +1 -1
- package/dist/bromcom-ui/p-285722ad.entry.js +5 -0
- package/dist/bromcom-ui/{p-d9dfbdae.entry.js → p-29a12785.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cfddaef7.entry.js → p-2a02b473.entry.js} +1 -1
- package/dist/bromcom-ui/p-2fc584c4.js +5 -0
- package/dist/bromcom-ui/{p-dfb4b928.entry.js → p-365eec45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-73dc124b.js → p-38972c46.js} +1 -1
- package/dist/bromcom-ui/{p-8c018ae0.js → p-3c7a0345.js} +1 -1
- package/dist/bromcom-ui/{p-159e5357.js → p-53448351.js} +1 -1
- package/dist/bromcom-ui/{p-276638cd.entry.js → p-546f5f82.entry.js} +1 -1
- package/dist/bromcom-ui/{p-13d9bcdb.entry.js → p-5855b125.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7e44e6b5.js → p-5ae0a59b.js} +1 -1
- package/dist/bromcom-ui/{p-4cd8a7c8.entry.js → p-5c3e9ac9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c0a97e15.entry.js → p-61172e12.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e74a2576.entry.js → p-65318f25.entry.js} +1 -1
- package/dist/bromcom-ui/p-663766cf.entry.js +5 -0
- package/dist/bromcom-ui/{p-30788121.entry.js → p-6c3e9e10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a471cdb2.entry.js → p-721e0cb5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-02ee5833.entry.js → p-7bff7371.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b198b3d5.entry.js → p-8260eda6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1647559e.entry.js → p-8bcfe3b3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4a8c583d.entry.js → p-8e2e77ca.entry.js} +1 -1
- package/dist/bromcom-ui/p-90e5c655.js +5 -0
- package/dist/bromcom-ui/p-947c78e3.js +5 -0
- package/dist/bromcom-ui/{p-4876c706.entry.js → p-96614f57.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2989694b.entry.js → p-9d98d32d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b45a0db2.entry.js → p-9e05f845.entry.js} +1 -1
- package/dist/bromcom-ui/{p-baa25b34.entry.js → p-a02c333f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9e1fa716.entry.js → p-a1335bd5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-400dcae2.entry.js → p-a3b54a22.entry.js} +1 -1
- package/dist/bromcom-ui/{p-454b49ef.entry.js → p-a4731c71.entry.js} +1 -1
- package/dist/bromcom-ui/p-a5953ecd.entry.js +5 -0
- package/dist/bromcom-ui/{p-3d5631ec.js → p-a8aaa382.js} +1 -1
- package/dist/bromcom-ui/{p-30a3320f.entry.js → p-b1c83bb8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dea8dd34.entry.js → p-ba89e3c7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ee3c724a.entry.js → p-c1de1367.entry.js} +1 -1
- package/dist/bromcom-ui/{p-feb06aca.entry.js → p-ca32c1b9.entry.js} +1 -1
- package/dist/bromcom-ui/p-cf0ab7f0.entry.js +5 -0
- package/dist/bromcom-ui/p-d37379d4.entry.js +5 -0
- package/dist/bromcom-ui/{p-61092688.entry.js → p-d58107e2.entry.js} +1 -1
- package/dist/bromcom-ui/p-dd422dd1.js +5 -0
- package/dist/bromcom-ui/{p-750ae53a.entry.js → p-e92d9879.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7a1e7141.entry.js → p-e9c963b3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dc9466d6.entry.js → p-ebee9f45.entry.js} +1 -1
- package/dist/bromcom-ui/{p-178b60e4.entry.js → p-ef8bbaf3.entry.js} +1 -1
- package/dist/bromcom-ui/p-f0350c0c.entry.js +5 -0
- package/dist/bromcom-ui/p-f302cbdf.entry.js +5 -0
- package/dist/bromcom-ui/{p-68abefd2.entry.js → p-f331e009.entry.js} +1 -1
- package/dist/bromcom-ui/{p-290645b8.entry.js → p-f3b546c6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ef14e4b5.entry.js → p-f532862e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-342bc96d.entry.js → p-f889d1b6.entry.js} +1 -1
- package/dist/bromcom-ui/p-f8bf531f.entry.js +5 -0
- package/dist/bromcom-ui/{p-d18f5ae5.entry.js → p-f8cbdade.entry.js} +1 -1
- package/dist/bromcom-ui/{p-139ee01e.entry.js → p-fb22bc06.entry.js} +1 -1
- package/dist/bromcom-ui/p-fceaf172.entry.js +5 -0
- 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.cjs.entry.js +126 -0
- package/dist/cjs/bcm-badge_15.cjs.entry.js +1738 -0
- 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-card.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +17 -17
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/{bcm-checkbox_2.cjs.entry.js → bcm-checkbox.cjs.entry.js} +2 -13
- package/dist/cjs/bcm-chip-group.cjs.entry.js +128 -0
- package/dist/cjs/bcm-chip.cjs.entry.js +90 -0
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
- package/dist/cjs/{bcm-avatar_15.cjs.entry.js → bcm-colorful.cjs.entry.js} +3 -6320
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form.cjs.entry.js +488 -0
- package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +370 -0
- package/dist/cjs/bcm-label.cjs.entry.js +44 -0
- package/dist/cjs/bcm-list_3.cjs.entry.js +4025 -0
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- 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 +5 -5
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
- package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
- 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/{color-helper-d6d2028b.js → color-helper-7ab15732.js} +27 -1
- package/dist/cjs/{generate-28ac852f.js → generate-d0470117.js} +55 -5
- package/dist/cjs/index-906fb4e5.js +540 -0
- package/dist/cjs/index-b08b037a.js +52 -0
- package/dist/cjs/{input-template-bcaa86c5.js → input-template-e1d297ed.js} +1 -1
- package/dist/cjs/{json-parse-decarator-0b5727ab.js → json-parse-decarator-026354f1.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-2fafa94f.js → number-helper-b3d57233.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-66d5d6c4.js → stepper-states-09cd4bed.js} +1 -1
- package/dist/cjs/{validators-b22310ad.js → validators-39ca1c93.js} +1 -1
- package/dist/collection/components/atoms/avatar/avatar.js +95 -80
- package/dist/collection/components/atoms/avatar/avatar.style.js +39 -0
- package/dist/collection/components/atoms/badge/badge.js +29 -90
- package/dist/collection/components/atoms/badge/badge.style.js +39 -0
- package/dist/collection/components/molecules/items/items.js +1 -1
- package/dist/collection/components/molecules/linked/linked.js +12 -0
- package/dist/collection/components/molecules/menu/menu.js +1 -0
- package/dist/collection/components/molecules/popover/popover.js +1 -1
- package/dist/collection/components/molecules/tab-group/tab-group.js +5 -1
- package/dist/collection/components/molecules/tab-group/tab-item-header.js +11 -26
- package/dist/collection/components/molecules/tooltip/tooltip.js +1 -1
- package/dist/collection/components/other/typography/typography.js +1 -1
- package/dist/collection/helper/color-helper.js +27 -1
- package/dist/collection/helper/generate.js +54 -4
- package/dist/collection/helper/popover-helper.js +13 -9
- package/dist/collection/helper/tooltip-helper.js +12 -4
- package/dist/components/avatar.js +91 -52
- package/dist/components/badge.js +109 -46
- package/dist/components/bcm-items.js +1 -1
- package/dist/components/bcm-popover.js +14 -10
- package/dist/components/bcm-tab-group.js +5 -1
- package/dist/components/bcm-tab-item-header.js +11 -26
- package/dist/components/color-helper.js +27 -1
- package/dist/components/generate.js +55 -5
- package/dist/components/linked.js +12 -0
- package/dist/components/menu.js +1 -0
- package/dist/components/tooltip-helper.js +12 -4
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.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.entry.js +122 -0
- package/dist/esm/bcm-badge_15.entry.js +1720 -0
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-card.entry.js +3 -3
- package/dist/esm/bcm-checkbox-group.entry.js +8 -8
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/{bcm-checkbox_2.entry.js → bcm-checkbox.entry.js} +4 -14
- package/dist/esm/bcm-chip-group.entry.js +124 -0
- package/dist/esm/bcm-chip.entry.js +86 -0
- package/dist/esm/bcm-collapse-group.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-color-input.entry.js +6 -6
- package/dist/esm/{bcm-avatar_15.entry.js → bcm-colorful.entry.js} +4 -6307
- package/dist/esm/bcm-colorpicker.entry.js +2 -2
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-datetime-picker.entry.js +3 -3
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +6 -6
- package/dist/esm/bcm-expansion-panel.entry.js +3 -3
- package/dist/esm/bcm-form-2.entry.js +1 -1
- package/dist/esm/bcm-form.entry.js +484 -0
- package/dist/esm/bcm-input-custom.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +366 -0
- package/dist/esm/bcm-label.entry.js +40 -0
- package/dist/esm/bcm-list_3.entry.js +4019 -0
- package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
- package/dist/esm/bcm-modal-2-header.entry.js +6 -6
- package/dist/esm/bcm-modal-2.entry.js +6 -6
- package/dist/esm/bcm-modal.entry.js +1 -1
- package/dist/esm/bcm-old-input.entry.js +1 -1
- package/dist/esm/bcm-old-tag_2.entry.js +1 -1
- package/dist/esm/bcm-popconfirm-box.entry.js +3 -3
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-progress.entry.js +3 -3
- package/dist/esm/bcm-radio-group.entry.js +6 -6
- package/dist/esm/bcm-radio.entry.js +6 -6
- 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 +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +7 -7
- package/dist/esm/bcm-switch.entry.js +2 -2
- package/dist/esm/bcm-table.entry.js +1 -1
- package/dist/esm/bcm-tabs-content.entry.js +1 -1
- package/dist/esm/bcm-tabs.entry.js +1 -1
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{color-helper-e8ce23d7.js → color-helper-116755ed.js} +28 -2
- package/dist/esm/{element-dragger-89bb52fd.js → element-dragger-7ea06c76.js} +1 -1
- package/dist/esm/{generate-ce54344e.js → generate-abec36e5.js} +55 -5
- package/dist/esm/index-6310a048.js +537 -0
- package/dist/esm/index-962dec74.js +50 -0
- package/dist/esm/{input-template-c94b6b1f.js → input-template-a02d00ff.js} +1 -1
- package/dist/esm/{json-parse-decarator-1ef87c07.js → json-parse-decarator-268fe3de.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-ec5c12ef.js → number-helper-cf26accd.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +4 -4
- package/dist/esm/old-bcm-popover.entry.js +1 -1
- package/dist/esm/{stepper-states-cbe1d076.js → stepper-states-cf443480.js} +1 -1
- package/dist/esm/{utils-57652744.js → utils-b3338faf.js} +1 -1
- package/dist/esm/{validators-c4976054.js → validators-63753298.js} +1 -1
- package/dist/types/components/atoms/avatar/avatar.d.ts +8 -10
- package/dist/types/components/atoms/avatar/avatar.style.d.ts +5 -0
- package/dist/types/components/atoms/badge/badge.d.ts +3 -7
- package/dist/types/components/atoms/badge/badge.style.d.ts +4 -0
- package/dist/types/components/molecules/linked/linked.d.ts +1 -0
- package/dist/types/components.d.ts +11 -13
- package/dist/types/helper/color-helper.d.ts +22 -2
- package/dist/types/helper/generate.d.ts +21 -1
- package/dist/types/helper/popover-helper.d.ts +0 -5
- package/dist/types/helper/tooltip-helper.d.ts +0 -1
- package/package.json +7 -4
- package/dist/bromcom-ui/p-294186b9.js +0 -5
- package/dist/bromcom-ui/p-327138ea.entry.js +0 -5
- package/dist/bromcom-ui/p-36a1427f.entry.js +0 -5
- package/dist/bromcom-ui/p-4a3ce7f3.entry.js +0 -5
- package/dist/bromcom-ui/p-5f63beda.js +0 -5
- package/dist/bromcom-ui/p-62e84379.js +0 -5
- package/dist/bromcom-ui/p-843905c8.js +0 -5
- package/dist/bromcom-ui/p-8a162271.entry.js +0 -5
- package/dist/bromcom-ui/p-8e66297f.entry.js +0 -5
- package/dist/bromcom-ui/p-96eeadc0.entry.js +0 -5
- package/dist/bromcom-ui/p-9c90a235.entry.js +0 -19
- package/dist/bromcom-ui/p-c165837c.entry.js +0 -5
- package/dist/bromcom-ui/p-c30f52d8.entry.js +0 -5
- package/dist/bromcom-ui/p-c7f37d7a.entry.js +0 -5
- package/dist/bromcom-ui/p-ccc60ce1.js +0 -5
- package/dist/bromcom-ui/p-d230907f.entry.js +0 -5
- package/dist/bromcom-ui/p-d832cf50.entry.js +0 -5
- package/dist/bromcom-ui/p-e9aaa98b.entry.js +0 -5
- package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -118
- package/dist/cjs/bcm-item.cjs.entry.js +0 -71
- package/dist/cjs/bcm-items.cjs.entry.js +0 -48
- package/dist/cjs/bcm-menu.cjs.entry.js +0 -149
- package/dist/cjs/bcm-popover.cjs.entry.js +0 -225
- package/dist/cjs/bcm-tab-group.cjs.entry.js +0 -205
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +0 -73
- package/dist/cjs/bcm-tab-item.cjs.entry.js +0 -90
- package/dist/cjs/bcm-text.cjs.entry.js +0 -49
- package/dist/cjs/tooltip-helper-9fc8df71.js +0 -150
- package/dist/collection/components/atoms/avatar/avatar.css +0 -198
- package/dist/collection/components/atoms/badge/badge.css +0 -231
- package/dist/esm/bcm-dropdown.entry.js +0 -114
- package/dist/esm/bcm-item.entry.js +0 -67
- package/dist/esm/bcm-items.entry.js +0 -44
- package/dist/esm/bcm-menu.entry.js +0 -145
- package/dist/esm/bcm-popover.entry.js +0 -221
- package/dist/esm/bcm-tab-group.entry.js +0 -201
- package/dist/esm/bcm-tab-item-header.entry.js +0 -69
- package/dist/esm/bcm-tab-item.entry.js +0 -86
- package/dist/esm/bcm-text.entry.js +0 -45
- package/dist/esm/tooltip-helper-92eb0102.js +0 -148
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, a as getAssetPath, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { E as ElementDragger, D as DragDirections } from './element-dragger-
|
|
6
|
+
import { E as ElementDragger, D as DragDirections } from './element-dragger-7ea06c76.js';
|
|
7
7
|
import { c as classnames } from './index-ed9652af.js';
|
|
8
|
-
import './utils-
|
|
8
|
+
import './utils-b3338faf.js';
|
|
9
9
|
import './_commonjsHelpers-3016b722.js';
|
|
10
10
|
|
|
11
11
|
const colorpickerCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{position:relative;margin:0 0 8px 0}.color-picker{position:relative;width:200px}.color-picker.open .picker{opacity:1;visibility:visible;transform:scale(1) translateY(56px)}.picker{width:300px;position:absolute;top:0;z-index:1;background-color:#ffffff;border:1px solid #F6F6F6;box-shadow:0px 3px 3.6px 0.4px rgba(0, 0, 0, 0.15);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px)}.label{display:flex;flex-direction:column;color:var(--bcm-color-grey-9);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.input{display:flex;cursor:pointer;border:1px solid var(--bcm-color-grey-5);border-radius:2px}.color{position:relative;width:100%;height:166px;user-select:none}.color img{width:100%;height:100%;user-select:none;pointer-events:none}.color-indicator{position:absolute;top:0;left:0;width:17px;height:17px;border:1px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 2px rgba(0, 0, 0, 0.25);transform:translate(0, 0);border-radius:100px;user-select:none;box-sizing:border-box;pointer-events:none}.colors{position:relative;width:100%;height:16px;margin-top:8px}.colors img{width:100%;user-select:none;pointer-events:none}.colors-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;user-select:none}.colors-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100px;user-select:none;box-sizing:border-box;pointer-events:none}.transparency{position:relative;width:100%;height:16px;margin-top:8px}.transparency-holder{position:absolute;top:50%;left:0;width:100%;height:8px;overflow:hidden;transform:translateY(-50%);border-radius:8px;background:transparent none repeat center center/20px}.transparency-indicator{position:absolute;top:50%;left:0;width:17px;height:17px;border:2px solid rgba(255, 255, 255, 0.82);box-shadow:0px 1px 4px rgba(0, 0, 0, 0.25);transform:translateY(-50%);border-radius:100px;user-select:none;box-sizing:border-box}.colors-transparency{padding:16px}.active-color{display:flex;align-items:center;width:100%;height:30px}.active-color .color-thumb{width:100%;height:100%;background-color:transparent;border-radius:1px 0 0 1px}.active-color .color-text{font-size:14px;color:#656565;margin-left:8px}.icon{display:flex;align-items:center;justify-content:center;cursor:pointer;width:30px;color:var(--bcm-color-grey-6)}.color-input{border:none;width:100%;padding:10px;outline:none;-webkit-tap-highlight-color:transparent}";
|
|
@@ -6,9 +6,9 @@ import { r as registerInstance, h, H as Host, g as getElement } from './index-34
|
|
|
6
6
|
import { c as classnames } from './index-ed9652af.js';
|
|
7
7
|
import { I as IsLoad } from './is-load-decorator-07d3502a.js';
|
|
8
8
|
import { D as DateTimeHelper } from './datetime-helper-df25808a.js';
|
|
9
|
-
import { G as Generate } from './generate-
|
|
9
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
10
10
|
import { a as Bcm } from './bcm-9f50af9c.js';
|
|
11
|
-
import { d as delay } from './utils-
|
|
11
|
+
import { d as delay } from './utils-b3338faf.js';
|
|
12
12
|
import './_commonjsHelpers-3016b722.js';
|
|
13
13
|
import './colors-44c95e7e.js';
|
|
14
14
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { D as DragDirections, E as ElementDragger } from './element-dragger-
|
|
6
|
+
import { D as DragDirections, E as ElementDragger } from './element-dragger-7ea06c76.js';
|
|
7
7
|
import { c as classnames } from './index-ed9652af.js';
|
|
8
8
|
import { D as DateTimeHelper } from './datetime-helper-df25808a.js';
|
|
9
|
-
import { d as delay } from './utils-
|
|
10
|
-
import { G as Generate } from './generate-
|
|
9
|
+
import { d as delay } from './utils-b3338faf.js';
|
|
10
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
11
11
|
import { a as Bcm } from './bcm-9f50af9c.js';
|
|
12
12
|
import { g as getPlacement, s as setPosition } from './popover-placement-78f86f15.js';
|
|
13
13
|
import { L as LabelTemplate } from './label-template-98dafeb3.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { G as Generate } from './generate-
|
|
6
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
7
7
|
import './colors-44c95e7e.js';
|
|
8
8
|
import './_commonjsHelpers-3016b722.js';
|
|
9
9
|
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import './color-helper-
|
|
6
|
+
import './color-helper-116755ed.js';
|
|
7
7
|
import './datetime-helper-df25808a.js';
|
|
8
|
-
import { G as Generate } from './generate-
|
|
9
|
-
import './number-helper-
|
|
8
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
9
|
+
import './number-helper-cf26accd.js';
|
|
10
10
|
import './string-helper-6bd24967.js';
|
|
11
|
-
import './validators-
|
|
12
|
-
import './element-dragger-
|
|
11
|
+
import './validators-63753298.js';
|
|
12
|
+
import './element-dragger-7ea06c76.js';
|
|
13
13
|
import { B as Bcm } from './bcm-9f50af9c.js';
|
|
14
14
|
import { c as classnames } from './index-ed9652af.js';
|
|
15
15
|
import './colors-1d7854ea.js';
|
|
16
|
-
import './utils-
|
|
16
|
+
import './utils-b3338faf.js';
|
|
17
17
|
import './colors-44c95e7e.js';
|
|
18
18
|
import './_commonjsHelpers-3016b722.js';
|
|
19
19
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { G as Generate } from './generate-
|
|
6
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
7
7
|
import { c as classnames } from './index-ed9652af.js';
|
|
8
8
|
import { S as StringHelper } from './string-helper-6bd24967.js';
|
|
9
|
-
import { C as ColorHelper } from './color-helper-
|
|
9
|
+
import { C as ColorHelper } from './color-helper-116755ed.js';
|
|
10
10
|
import './colors-44c95e7e.js';
|
|
11
11
|
import './_commonjsHelpers-3016b722.js';
|
|
12
12
|
import './bcm-9f50af9c.js';
|
|
13
13
|
import './colors-1d7854ea.js';
|
|
14
|
-
import './utils-
|
|
14
|
+
import './utils-b3338faf.js';
|
|
15
15
|
|
|
16
16
|
const expansionPanelCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-expansion-panel{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:block;width:100%;background-color:var(--bcm-new-ds-color-white);border-radius:8px;border:1px solid var(--bcm-new-ds-color-slate-300);box-sizing:border-box}.bcm-expansion-panel+.bcm-expansion-panel{margin-top:4px}.bcm-expansion-panel__header{display:flex;align-items:center;justify-content:flex-start;user-select:none;min-height:50px;border-radius:8px;padding:4px 24px;color:var(--bcm-new-ds-color-slate-700);font-weight:600}.bcm-expansion-panel__header-content{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:8px}.bcm-expansion-panel__header:hover{cursor:pointer}.bcm-expansion-panel__header-title{order:1;user-select:none;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:4px}.bcm-expansion-panel__header-title-description{margin-left:calc(4px / 2);color:var(--bcm-new-ds-color-slate-500);font-size:12px;line-height:calc(12px + 8px)}.bcm-expansion-panel__header-tooltip{line-height:1;color:var(--bcm-new-ds-color-slate-800)}.bcm-expansion-panel__header-toggle{height:100%;order:0;width:20px;display:flex;align-items:center;justify-content:center;transform:rotate(0deg);transition:transform 0.2s ease-in-out;font-size:12px}.bcm-expansion-panel__header-extra{display:none}.bcm-expansion-panel__header-extra:not(:empty){cursor:default;display:flex;align-items:center;order:5;line-height:1;padding:0 8px}.bcm-expansion-panel__header-extra .bcm-expansion-panel__extra-content{display:flex;align-items:center}.bcm-expansion-panel__body{display:none;padding:12px 24px}.bcm-expansion-panel--icon-right .bcm-expansion-panel__header{justify-content:space-between;padding-left:24px}.bcm-expansion-panel--icon-right .bcm-expansion-panel__header-toggle{order:6}.bcm-expansion-panel--invalid .bcm-expansion-panel__header-toggle,.bcm-expansion-panel--invalid .bcm-expansion-panel__header-content{color:var(--bcm-new-ds-color-red-500)}.bcm-expansion-panel--expanded{border-bottom:1px solid var(--bcm-color-grey-5)}.bcm-expansion-panel--expanded .bcm-expansion-panel__header{border-radius:8px 8px 0 0}.bcm-expansion-panel--expanded .bcm-expansion-panel__header-toggle{transform:rotate(180deg)}.bcm-expansion-panel--expanded .bcm-expansion-panel__body{display:block}";
|
|
17
17
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
6
|
import { I as IsLoad } from './is-load-decorator-07d3502a.js';
|
|
7
|
-
import { G as Generate, s as snq } from './generate-
|
|
7
|
+
import { G as Generate, s as snq } from './generate-abec36e5.js';
|
|
8
8
|
import { S as StringHelper } from './string-helper-6bd24967.js';
|
|
9
9
|
import { a as Bcm } from './bcm-9f50af9c.js';
|
|
10
10
|
import './colors-44c95e7e.js';
|
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
+
import { c as classnames } from './index-ed9652af.js';
|
|
7
|
+
import { I as IsLoad } from './is-load-decorator-07d3502a.js';
|
|
8
|
+
import { S as StringHelper } from './string-helper-6bd24967.js';
|
|
9
|
+
import { d as delay, a as getChildElements } from './utils-b3338faf.js';
|
|
10
|
+
import './_commonjsHelpers-3016b722.js';
|
|
11
|
+
import './bcm-9f50af9c.js';
|
|
12
|
+
|
|
13
|
+
// /**
|
|
14
|
+
// *
|
|
15
|
+
// * @param type
|
|
16
|
+
// */
|
|
17
|
+
// export const required = (value:any) => {
|
|
18
|
+
// if ( value || value != null ) {
|
|
19
|
+
// return true
|
|
20
|
+
// } else {
|
|
21
|
+
// return true
|
|
22
|
+
// }
|
|
23
|
+
// }
|
|
24
|
+
class rules {
|
|
25
|
+
constructor() { }
|
|
26
|
+
response(status, message) {
|
|
27
|
+
return Object.assign(Object.assign({ valid: status }, (message && { message })), (!status && { type: 'error' }));
|
|
28
|
+
}
|
|
29
|
+
required(value, componentValidation) {
|
|
30
|
+
let validation = this.response(true);
|
|
31
|
+
if (value == '' || value == "" || value == undefined || value == null || value === false) {
|
|
32
|
+
validation = this.response(false, 'This field is required.');
|
|
33
|
+
}
|
|
34
|
+
if (componentValidation) {
|
|
35
|
+
if (!componentValidation.valid) {
|
|
36
|
+
validation = this.response(false, componentValidation.errorText);
|
|
37
|
+
}
|
|
38
|
+
if (value instanceof Object) {
|
|
39
|
+
if (value.isValid) {
|
|
40
|
+
if (value.isValid == false)
|
|
41
|
+
validation = this.response(false, 'This field is required.');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return validation;
|
|
46
|
+
}
|
|
47
|
+
selfValidation(input) {
|
|
48
|
+
let validation = this.response(true);
|
|
49
|
+
if (input.captionError != null || input.captionType == 'error') {
|
|
50
|
+
validation = this.response(false, input.captionError);
|
|
51
|
+
}
|
|
52
|
+
return validation;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const validate = new rules;
|
|
56
|
+
|
|
57
|
+
const formCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block;margin-bottom:8px}:host(.hidden){display:none}";
|
|
58
|
+
|
|
59
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
60
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
62
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
63
|
+
else
|
|
64
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
65
|
+
if (d = decorators[i])
|
|
66
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
67
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
68
|
+
};
|
|
69
|
+
const BcmForm = class {
|
|
70
|
+
constructor(hostRef) {
|
|
71
|
+
registerInstance(this, hostRef);
|
|
72
|
+
this.bcmForm = createEvent(this, "bcm-form", 7);
|
|
73
|
+
this.formData = {};
|
|
74
|
+
this.inputs = [];
|
|
75
|
+
this.duplicateInput = [];
|
|
76
|
+
this.isValid = true;
|
|
77
|
+
this.returnCaption = [];
|
|
78
|
+
this.Bromcom = {
|
|
79
|
+
errors: {
|
|
80
|
+
targetFormNotExist: 'target form is not exist --> ',
|
|
81
|
+
},
|
|
82
|
+
inputComponents: {
|
|
83
|
+
CHIP_GROUP: 'chip-group',
|
|
84
|
+
// Birbirinin aynısı
|
|
85
|
+
INPUT: 'input',
|
|
86
|
+
TEXTAREA: 'textarea',
|
|
87
|
+
//çok benzer
|
|
88
|
+
SWITCH: 'switch',
|
|
89
|
+
CHECKBOX: 'checkbox',
|
|
90
|
+
RADIO_GROUP: 'radio-group',
|
|
91
|
+
CHECKBOX_GROUP: 'checkbox-group',
|
|
92
|
+
RANGE: 'range',
|
|
93
|
+
// sadece value fırlatıyor
|
|
94
|
+
FORM: 'form',
|
|
95
|
+
FORM_GROUP: 'form-group',
|
|
96
|
+
// *En vakit alacak => içinde select, autocomplete, listbox, treeview özellikleri var
|
|
97
|
+
LIST: 'list',
|
|
98
|
+
//
|
|
99
|
+
COLORPICKER: 'colorpicker',
|
|
100
|
+
// picker aslında tek komponent hepsi datetimepicker
|
|
101
|
+
DATE_PICKER: 'date-picker',
|
|
102
|
+
TIME_PICKER: 'time-picker',
|
|
103
|
+
DATETIME_PICKER: 'datetime-picker',
|
|
104
|
+
// silinecek komponentler
|
|
105
|
+
SELECT: 'select',
|
|
106
|
+
LISTBOX: 'listbox'
|
|
107
|
+
},
|
|
108
|
+
helpers: {
|
|
109
|
+
randomId: function () {
|
|
110
|
+
return Math.random().toString(16).slice(2, -1);
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
this._id = (Math.random() * 4).toString(16).replace('.', '');
|
|
115
|
+
this.hidden = false;
|
|
116
|
+
this.validation = false;
|
|
117
|
+
this.name = "";
|
|
118
|
+
this.value = undefined;
|
|
119
|
+
this.autocomplete = false;
|
|
120
|
+
}
|
|
121
|
+
handleSubmit() {
|
|
122
|
+
// if (lowercase(e.target.nodeName) === 'bcm-button') {
|
|
123
|
+
// if (e.target.type === 'submit') {
|
|
124
|
+
// this.submitFunction()
|
|
125
|
+
// }
|
|
126
|
+
// }
|
|
127
|
+
}
|
|
128
|
+
async submitFunction() {
|
|
129
|
+
this.formData = {};
|
|
130
|
+
this.inputs = [];
|
|
131
|
+
this.selector = this.el;
|
|
132
|
+
await this.getInputs();
|
|
133
|
+
await delay(10);
|
|
134
|
+
const usrFrmData = await this.userFormData();
|
|
135
|
+
var formData = { isValid: true, formData: usrFrmData };
|
|
136
|
+
if (this.name) {
|
|
137
|
+
formData = Object.assign(Object.assign({}, formData), { formName: this.name });
|
|
138
|
+
}
|
|
139
|
+
if (this.isValid) {
|
|
140
|
+
this.bcmForm.emit(formData);
|
|
141
|
+
return formData;
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.returnCaption = { isValid: false, 'message': 'Please fill in all inputs', 'errorDetails': this.returnCaption, formData: usrFrmData };
|
|
145
|
+
if (this.name) {
|
|
146
|
+
this.returnCaption = Object.assign(Object.assign({}, this.returnCaption), { formName: this.name });
|
|
147
|
+
}
|
|
148
|
+
this.bcmForm.emit(this.returnCaption);
|
|
149
|
+
return this.returnCaption;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
async submit() {
|
|
153
|
+
return Promise.resolve(this.submitFunction());
|
|
154
|
+
}
|
|
155
|
+
async set(data) {
|
|
156
|
+
var _a;
|
|
157
|
+
const validate = this.validation;
|
|
158
|
+
this.validation = false;
|
|
159
|
+
// debugger
|
|
160
|
+
this.selector = this.el;
|
|
161
|
+
await this.getInputs();
|
|
162
|
+
if (data && ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
163
|
+
for (const key of Object.keys(data)) {
|
|
164
|
+
const item = this.inputs.find(item => item.name === key);
|
|
165
|
+
if (item) {
|
|
166
|
+
try {
|
|
167
|
+
await item.set(data[key]);
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
console.log(item.nodeName, "set", error);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
this.validation = validate;
|
|
176
|
+
}
|
|
177
|
+
async get() {
|
|
178
|
+
var _a;
|
|
179
|
+
let formData = {};
|
|
180
|
+
this.selector = this.el;
|
|
181
|
+
const inputsCache = this.inputs;
|
|
182
|
+
await this.getInputs();
|
|
183
|
+
((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.inputs.forEach(async (item) => {
|
|
184
|
+
try {
|
|
185
|
+
const value = await item.get();
|
|
186
|
+
formData = Object.assign(Object.assign({}, formData), { [item.name]: value });
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
console.log(`${item.nodeName} get error`);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
this.inputs = inputsCache;
|
|
193
|
+
await delay(10);
|
|
194
|
+
return Promise.resolve(formData);
|
|
195
|
+
}
|
|
196
|
+
async setClear() {
|
|
197
|
+
this.formData = {};
|
|
198
|
+
this.inputs = [];
|
|
199
|
+
this.selector = this.el;
|
|
200
|
+
let clear = [];
|
|
201
|
+
await this.getInputs();
|
|
202
|
+
this.inputs.forEach(async (item) => {
|
|
203
|
+
try {
|
|
204
|
+
clear.push(await item.setClear());
|
|
205
|
+
}
|
|
206
|
+
catch (error) {
|
|
207
|
+
console.log(error);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
await Promise.all(clear).then(() => {
|
|
211
|
+
this.formData = {};
|
|
212
|
+
this.inputs = [];
|
|
213
|
+
this.duplicateInput = [];
|
|
214
|
+
this.isValid = true;
|
|
215
|
+
this.returnCaption = [];
|
|
216
|
+
});
|
|
217
|
+
await delay(10);
|
|
218
|
+
return Promise.resolve(true);
|
|
219
|
+
}
|
|
220
|
+
async resetCaption() {
|
|
221
|
+
await delay(10);
|
|
222
|
+
this.formData = {};
|
|
223
|
+
this.inputs = [];
|
|
224
|
+
this.selector = this.el;
|
|
225
|
+
await this.getInputs();
|
|
226
|
+
for (const item of this.inputs) {
|
|
227
|
+
try {
|
|
228
|
+
await item.resetCaption();
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
console.log(item.nodeName, "rc p");
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
await delay(10);
|
|
235
|
+
return Promise.resolve();
|
|
236
|
+
}
|
|
237
|
+
async config(_config) {
|
|
238
|
+
if (_config['validation']) {
|
|
239
|
+
typeof _config['validation'] == 'boolean'
|
|
240
|
+
? this.validation = _config['validation']
|
|
241
|
+
: this.validation = false;
|
|
242
|
+
}
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
async getInputs() {
|
|
246
|
+
var form = this.selector;
|
|
247
|
+
if (!form) {
|
|
248
|
+
console.warn(this.Bromcom.errors.targetFormNotExist + this.selector);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const inputs = Array.from(form.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
|
|
252
|
+
this.duplicateInput = [];
|
|
253
|
+
// s-hn: Stencil private flag that contains host web component
|
|
254
|
+
// https://github.com/ionic-team/stencil/blob/45388e95edb46ef357eb9ae37cd32bbb5bc1ed23/src/runtime/vdom/vdom-render.ts#L116
|
|
255
|
+
const rootInputs = inputs.filter((input) => { var _a; return !input['s-hn'] || ((_a = input['s-hn']) === null || _a === void 0 ? void 0 : _a.nodeName) !== 'BcmForm'; });
|
|
256
|
+
// debugger;
|
|
257
|
+
for (const item of rootInputs) {
|
|
258
|
+
if (StringHelper.lowercase(item.nodeName) == "bcm-checkbox-group") {
|
|
259
|
+
let checkboxs = item.querySelectorAll("bcm-checkbox");
|
|
260
|
+
if (checkboxs) {
|
|
261
|
+
for (const checkbox of checkboxs) {
|
|
262
|
+
this.duplicateInput.push(checkbox.name);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (StringHelper.lowercase(item.nodeName) == "bcm-form") {
|
|
267
|
+
const groupInputs = Array.from(item.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
|
|
268
|
+
let itemObject = {};
|
|
269
|
+
for (const element of groupInputs) {
|
|
270
|
+
var name = element.name;
|
|
271
|
+
var value = element.value;
|
|
272
|
+
itemObject = Object.assign(Object.assign({}, itemObject), { [name]: value });
|
|
273
|
+
this.duplicateInput.push(element.name);
|
|
274
|
+
}
|
|
275
|
+
item.value = itemObject;
|
|
276
|
+
let checkboxs = item.querySelectorAll("bcm-checkbox");
|
|
277
|
+
if (checkboxs) {
|
|
278
|
+
for (const checkbox of checkboxs) {
|
|
279
|
+
this.duplicateInput.push(checkbox.name);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
await delay(10);
|
|
285
|
+
this.inputs = rootInputs;
|
|
286
|
+
}
|
|
287
|
+
getItemValue(item) {
|
|
288
|
+
const tagName = item.tagName.toLowerCase().replace('bcm-', '');
|
|
289
|
+
switch (tagName) {
|
|
290
|
+
/* case 'date-picker':
|
|
291
|
+
case 'datetime-picker':
|
|
292
|
+
return item.value.timestamp
|
|
293
|
+
case 'time-picker':
|
|
294
|
+
return item.value.time */
|
|
295
|
+
default:
|
|
296
|
+
return item.value;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
isWrapperComponent(item) {
|
|
300
|
+
return ['bcm-datetime-picker', 'bcm-date-picker', 'bcm-time-picker'].includes(item.toLowerCase());
|
|
301
|
+
}
|
|
302
|
+
isGroupComponent(item) {
|
|
303
|
+
return ['bcm-checkbox-group'].includes(item.toLowerCase());
|
|
304
|
+
}
|
|
305
|
+
isListComponent(item) {
|
|
306
|
+
return ['bcm-list'].includes(item.toLowerCase());
|
|
307
|
+
}
|
|
308
|
+
async userFormData() {
|
|
309
|
+
this.formData = {};
|
|
310
|
+
this.isValid = true;
|
|
311
|
+
this.returnCaption = [];
|
|
312
|
+
for (const item of this.inputs) {
|
|
313
|
+
// const isListComponent = this.isListComponent(item.tagName);
|
|
314
|
+
const isGroupComponent = this.isGroupComponent(item.tagName);
|
|
315
|
+
const isWrapperComponent = this.isWrapperComponent(item.tagName);
|
|
316
|
+
const wrapperComponent = isWrapperComponent && item;
|
|
317
|
+
const input = isWrapperComponent
|
|
318
|
+
? await item.getInput() && item
|
|
319
|
+
: item;
|
|
320
|
+
// input.caption = ''
|
|
321
|
+
// input.captionType = ''
|
|
322
|
+
if (this.validation) {
|
|
323
|
+
let valid = null;
|
|
324
|
+
// if (isListComponent) {
|
|
325
|
+
// valid = !(input.value && input.value.length > 0) && validate.required(input.value)
|
|
326
|
+
// } else
|
|
327
|
+
if (isWrapperComponent) {
|
|
328
|
+
const isPickerValid = await wrapperComponent.isValid();
|
|
329
|
+
valid = validate.required(input.value, isPickerValid);
|
|
330
|
+
if (valid) {
|
|
331
|
+
if (input.value instanceof Object) {
|
|
332
|
+
if (input.value["isValid"] == false) {
|
|
333
|
+
valid = validate.required("", isPickerValid);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
valid = validate.required(input.value, isPickerValid);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
else if (isGroupComponent) {
|
|
342
|
+
const childsCheckbox = getChildElements(input, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
343
|
+
if (childsCheckbox && childsCheckbox.length > 0) {
|
|
344
|
+
for (const element of childsCheckbox) {
|
|
345
|
+
if (element && element.required === true) {
|
|
346
|
+
valid = validate.required(element.checked);
|
|
347
|
+
if (!valid['valid']) {
|
|
348
|
+
element.noCaption = false;
|
|
349
|
+
element.captionError = valid['message'];
|
|
350
|
+
element.captionType = valid['type'];
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
element.noCaption = input.noCaption;
|
|
354
|
+
element.captionError = null;
|
|
355
|
+
element.captionType = "default";
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
valid = validate.required(input.value);
|
|
363
|
+
}
|
|
364
|
+
if (input.required) {
|
|
365
|
+
if (!valid['valid']) {
|
|
366
|
+
input.captionError = valid['message'];
|
|
367
|
+
input.captionType = valid['type'];
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
input.captionError = null;
|
|
371
|
+
input.captionType = "default";
|
|
372
|
+
}
|
|
373
|
+
await delay(10);
|
|
374
|
+
const selfValidation = validate.selfValidation(input);
|
|
375
|
+
if (valid['valid']) {
|
|
376
|
+
if (!selfValidation['valid']) {
|
|
377
|
+
input.captionError = selfValidation['message'];
|
|
378
|
+
input.captionType = selfValidation['type'];
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
let name = input.name;
|
|
383
|
+
let value = input.captionError;
|
|
384
|
+
!input.hidden && input.captionType == 'error' && (this.returnCaption = [...Array.from(this.returnCaption), { [name]: value }],
|
|
385
|
+
this.isValid = false);
|
|
386
|
+
}
|
|
387
|
+
if (input.name && !this.duplicateInput.includes(input.name)) {
|
|
388
|
+
var itemValue = this.getItemValue(input);
|
|
389
|
+
if (!itemValue || itemValue == undefined || itemValue == null) {
|
|
390
|
+
itemValue = null;
|
|
391
|
+
}
|
|
392
|
+
this.formData[input.name] = itemValue;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
return this.formData;
|
|
396
|
+
}
|
|
397
|
+
async handleChange(e) {
|
|
398
|
+
const isWrapperComponent = this.isWrapperComponent(e.target.tagName);
|
|
399
|
+
const isGroupComponent = this.isGroupComponent(e.target.tagName);
|
|
400
|
+
let target;
|
|
401
|
+
if (isWrapperComponent) {
|
|
402
|
+
target = e.target.getInput && await e.target.getInput() || e.target;
|
|
403
|
+
}
|
|
404
|
+
else if (isGroupComponent) {
|
|
405
|
+
let req = false;
|
|
406
|
+
const childsCheckbox = getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
407
|
+
childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
|
|
408
|
+
if (element && element.required === true) {
|
|
409
|
+
req = true;
|
|
410
|
+
}
|
|
411
|
+
}));
|
|
412
|
+
target = Object.assign(Object.assign({}, e.target), { required: req });
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
target = e.target;
|
|
416
|
+
}
|
|
417
|
+
const value = e.target.value;
|
|
418
|
+
const wrapperComponent = isWrapperComponent && e.target;
|
|
419
|
+
var isPickerValid;
|
|
420
|
+
if (isWrapperComponent) {
|
|
421
|
+
isPickerValid = await wrapperComponent.isValid();
|
|
422
|
+
}
|
|
423
|
+
const tick = setTimeout(() => {
|
|
424
|
+
if (target.required) {
|
|
425
|
+
let valid = null;
|
|
426
|
+
if (isWrapperComponent) {
|
|
427
|
+
valid = validate.required(value, isPickerValid);
|
|
428
|
+
if (valid) {
|
|
429
|
+
if (value instanceof Object) {
|
|
430
|
+
if (value["isValid"] == false) {
|
|
431
|
+
valid = validate.required("", isPickerValid);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
valid = validate.required(value, isPickerValid);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
else if (isGroupComponent) {
|
|
440
|
+
const childsCheckbox = getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
441
|
+
childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
|
|
442
|
+
if (element && element.required === true) {
|
|
443
|
+
valid = validate.required(element.checked);
|
|
444
|
+
if (!valid['valid']) {
|
|
445
|
+
element.noCaption = false;
|
|
446
|
+
element.captionError = valid['message'];
|
|
447
|
+
element.captionType = valid['type'];
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
element.noCaption = e.target.noCaption;
|
|
451
|
+
element.captionError = null;
|
|
452
|
+
element.captionType = "default";
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}));
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
valid = validate.required(value);
|
|
459
|
+
}
|
|
460
|
+
if (valid['valid']) {
|
|
461
|
+
target.captionError = null;
|
|
462
|
+
target.captionType = null;
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
target.captionError = valid['message'];
|
|
466
|
+
target.captionType = valid['type'];
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
clearTimeout(tick);
|
|
470
|
+
});
|
|
471
|
+
this.value = await this.userFormData();
|
|
472
|
+
}
|
|
473
|
+
render() {
|
|
474
|
+
const hostClasses = classnames(this.hidden ? 'hidden' : null);
|
|
475
|
+
return (h(Host, { class: hostClasses }, h("form", { class: "bcm-form", autocomplete: this.autocomplete ? "on" : "off" }, h("slot", null))));
|
|
476
|
+
}
|
|
477
|
+
get el() { return getElement(this); }
|
|
478
|
+
};
|
|
479
|
+
__decorate([
|
|
480
|
+
IsLoad()
|
|
481
|
+
], BcmForm.prototype, "el", void 0);
|
|
482
|
+
BcmForm.style = formCss;
|
|
483
|
+
|
|
484
|
+
export { BcmForm as bcm_form };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-348b16ad.js';
|
|
6
|
-
import { G as Generate } from './generate-
|
|
6
|
+
import { G as Generate } from './generate-abec36e5.js';
|
|
7
7
|
import { c as classnames } from './index-ed9652af.js';
|
|
8
8
|
import './colors-44c95e7e.js';
|
|
9
9
|
import './_commonjsHelpers-3016b722.js';
|