bromcom-ui 2.7.37-rc.4-0 → 2.7.37-rc.4
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.esm.js +1 -1
- package/dist/bromcom-ui/{p-576c9e1a.js → p-02e409a7.js} +1 -1
- package/dist/bromcom-ui/{p-c9b1cee9.entry.js → p-0cb7f56d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8e1f99b0.entry.js → p-1001b996.entry.js} +1 -1
- package/dist/bromcom-ui/{p-17a333df.entry.js → p-1293c732.entry.js} +1 -1
- package/dist/bromcom-ui/p-134dab8d.entry.js +5 -0
- package/dist/bromcom-ui/{p-d6899b4a.entry.js → p-136835e2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fac43984.entry.js → p-17b76b14.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ea1352b5.entry.js → p-1d2f7e2a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-76be0458.entry.js → p-330e54fa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8c018ae0.js → p-3c7a0345.js} +1 -1
- package/dist/bromcom-ui/{p-3971afee.entry.js → p-3ce198ac.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4e8fe53f.entry.js → p-4a61404a.entry.js} +1 -1
- package/dist/bromcom-ui/p-4b9c5239.entry.js +5 -0
- package/dist/bromcom-ui/{p-da77656a.entry.js → p-4bac0542.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1e286e48.entry.js → p-4e0ad77f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7e44e6b5.js → p-5ae0a59b.js} +1 -1
- package/dist/bromcom-ui/{p-9c80f257.entry.js → p-5c124ef7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-650d0075.js → p-5c628a83.js} +1 -1
- package/dist/bromcom-ui/{p-de448df0.js → p-5ccfb7e1.js} +1 -1
- package/dist/bromcom-ui/{p-cfcd67d2.entry.js → p-61b69b38.entry.js} +1 -1
- package/dist/bromcom-ui/{p-05702e53.entry.js → p-67129170.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f6e52a9b.entry.js → p-6713ac32.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2bc9235f.entry.js → p-6be310cc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8255f60a.entry.js → p-6e873e3c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1b51a1a5.entry.js → p-6fe41aaf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d3401faf.entry.js → p-73c456b7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-32145a6a.entry.js → p-74f6a79a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0d778313.entry.js → p-75704e25.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5c33bc24.entry.js → p-78d5859f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fa8fd0b1.js → p-798ddccb.js} +1 -1
- package/dist/bromcom-ui/{p-4b318405.entry.js → p-7f88494f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-65605e2b.entry.js → p-8d0de360.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2462b461.entry.js → p-8d1ac847.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a8ad2743.entry.js → p-993ef128.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a98aecdf.entry.js → p-a08d69f0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-82f2ad3d.entry.js → p-a0dd1886.entry.js} +1 -1
- package/dist/bromcom-ui/p-a5e91b45.js +5 -0
- package/dist/bromcom-ui/{p-36506817.entry.js → p-a693e049.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a3ffcb0d.js → p-a8d1397d.js} +1 -1
- package/dist/bromcom-ui/{p-75bd9b2e.entry.js → p-aa3eab04.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2ab6e327.entry.js → p-abaa6215.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1507f99a.entry.js → p-ad9303de.entry.js} +1 -1
- package/dist/bromcom-ui/{p-78d48636.entry.js → p-adc35e17.entry.js} +1 -1
- package/dist/bromcom-ui/p-ae18981d.entry.js +5 -0
- package/dist/bromcom-ui/{p-87065fd4.entry.js → p-b34c45c6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d9fb53c9.entry.js → p-b4e2c796.entry.js} +1 -1
- package/dist/bromcom-ui/{p-74cb5833.entry.js → p-b682fda6.entry.js} +1 -1
- package/dist/bromcom-ui/p-b8ec7783.js +5 -0
- package/dist/bromcom-ui/{p-22a0e65d.entry.js → p-bb47fe4e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-71869daf.entry.js → p-bd74419c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-70214600.entry.js → p-c6b5640b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-959303e6.js → p-c706583c.js} +1 -1
- package/dist/bromcom-ui/{p-26931df9.entry.js → p-c72ea38e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9efe118a.entry.js → p-d11d1f5a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a6d7b8ff.entry.js → p-d26276b1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2b91dab0.entry.js → p-de4e1e66.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dbb106a4.entry.js → p-e9f81882.entry.js} +1 -1
- package/dist/bromcom-ui/{p-de89f82d.entry.js → p-ee60536b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a0f75665.entry.js → p-f05fbad7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8a1ad072.entry.js → p-f19989b2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a1d8b2f0.entry.js → p-f4e0efd6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-03b55cfb.entry.js → p-f7904fcd.entry.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button_7.cjs.entry.js +2424 -0
- package/dist/cjs/bcm-card.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
- package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form.cjs.entry.js +486 -0
- package/dist/cjs/bcm-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-item.cjs.entry.js +1 -1
- package/dist/cjs/bcm-items.cjs.entry.js +1 -1
- package/dist/cjs/bcm-linked.cjs.entry.js +3 -3
- package/dist/cjs/bcm-list.cjs.entry.js +5 -5
- package/dist/cjs/bcm-menu.cjs.entry.js +5 -5
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
- package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio.cjs.entry.js +1 -1
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- package/dist/cjs/bcm-search.cjs.entry.js +3 -3
- 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 +3 -3
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tab-group.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/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{generate-29f6c671.js → generate-55fb2e3e.js} +1 -1
- package/dist/cjs/{input-template-8d49a61c.js → input-template-bf26b388.js} +1 -1
- package/dist/cjs/{json-parse-decarator-5d872ae7.js → json-parse-decarator-a22bf884.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-288bbac7.js → number-helper-479ff55c.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-902494d8.js → stepper-states-59ee02a2.js} +1 -1
- package/dist/cjs/{tooltip-helper-4be3d320.js → tooltip-helper-b09a83de.js} +3 -3
- package/dist/cjs/{validators-9af1100c.js → validators-ffc47793.js} +1 -1
- package/dist/collection/components/molecules/modal/modal.js +7 -4
- package/dist/components/bcm-modal.js +6 -3
- package/dist/components/generate.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 +2 -2
- package/dist/esm/bcm-avatar_2.entry.js +6 -6
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-button_7.entry.js +2414 -0
- package/dist/esm/bcm-card.entry.js +3 -3
- package/dist/esm/bcm-checkbox-group.entry.js +2 -2
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/bcm-checkbox_2.entry.js +3 -3
- package/dist/esm/bcm-chip.entry.js +3 -3
- package/dist/esm/bcm-collapse-group.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-colorpicker.entry.js +2 -2
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +6 -6
- package/dist/esm/bcm-dropdown.entry.js +2 -2
- 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 +482 -0
- package/dist/esm/bcm-input.entry.js +5 -5
- package/dist/esm/bcm-item.entry.js +3 -3
- package/dist/esm/bcm-items.entry.js +1 -1
- package/dist/esm/bcm-linked.entry.js +6 -6
- package/dist/esm/bcm-list.entry.js +8 -8
- package/dist/esm/bcm-menu.entry.js +8 -8
- 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-popover.entry.js +6 -6
- package/dist/esm/bcm-progress.entry.js +3 -3
- package/dist/esm/bcm-radio-group.entry.js +2 -2
- package/dist/esm/bcm-radio.entry.js +3 -3
- package/dist/esm/bcm-range.entry.js +2 -2
- package/dist/esm/bcm-search.entry.js +4 -4
- 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 +4 -4
- package/dist/esm/bcm-switch.entry.js +2 -2
- package/dist/esm/bcm-tab-group.entry.js +1 -1
- 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-text.entry.js +2 -2
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +1 -1
- package/dist/esm/{color-helper-7e202fd8.js → color-helper-b5e9aa56.js} +1 -1
- package/dist/esm/{element-dragger-89bb52fd.js → element-dragger-7ea06c76.js} +1 -1
- package/dist/esm/{generate-d766aaed.js → generate-96b04324.js} +1 -1
- package/dist/esm/{input-template-c1019025.js → input-template-ea7eadee.js} +1 -1
- package/dist/esm/{json-parse-decarator-31a154cf.js → json-parse-decarator-637dd275.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-02ea488e.js → number-helper-455629d7.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-b515fe3a.js → stepper-states-4e3db756.js} +1 -1
- package/dist/esm/{tooltip-helper-7bb60a6c.js → tooltip-helper-54e225e0.js} +5 -5
- package/dist/esm/{utils-57652744.js → utils-b3338faf.js} +1 -1
- package/dist/esm/{validators-6d1beb42.js → validators-a6db6d05.js} +1 -1
- package/dist/types/components/molecules/modal/modal.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-02d75af2.js +0 -5
- package/dist/bromcom-ui/p-0a9b00a9.js +0 -5
- package/dist/bromcom-ui/p-26f3fdba.entry.js +0 -5
- package/dist/bromcom-ui/p-273f91af.entry.js +0 -5
- package/dist/bromcom-ui/p-94594729.entry.js +0 -5
- package/dist/bromcom-ui/p-97ab8650.entry.js +0 -5
- package/dist/bromcom-ui/p-b9983e4b.entry.js +0 -5
- package/dist/cjs/bcm-button_4.cjs.entry.js +0 -997
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1432
- package/dist/cjs/bcm-label_2.cjs.entry.js +0 -119
- package/dist/cjs/bcm-old-input.cjs.entry.js +0 -398
- package/dist/esm/bcm-button_4.entry.js +0 -990
- package/dist/esm/bcm-datetime-picker.entry.js +0 -1428
- package/dist/esm/bcm-label_2.entry.js +0 -114
- package/dist/esm/bcm-old-input.entry.js +0 -394
|
@@ -10,7 +10,7 @@ const index = require('./index-9d98aa56.js');
|
|
|
10
10
|
const index$1 = require('./index-a2b50e51.js');
|
|
11
11
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
12
12
|
const colorHelper = require('./color-helper-c9882bd8.js');
|
|
13
|
-
const generate = require('./generate-
|
|
13
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
14
14
|
const stringHelper = require('./string-helper-df40a475.js');
|
|
15
15
|
const slotTemplate = require('./slot-template-2ff0d22a.js');
|
|
16
16
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index$1 = require('./index-9d98aa56.js');
|
|
10
10
|
const index$2 = require('./index-a2b50e51.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
12
12
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
13
13
|
const utils = require('./utils-fc077139.js');
|
|
14
14
|
const index = require('./index-f8547ecd.js');
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const index$1 = require('./index-a2b50e51.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
12
12
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
13
13
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
14
14
|
const utils = require('./utils-fc077139.js');
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const index$1 = require('./index-a2b50e51.js');
|
|
11
11
|
const captionTemplate = require('./caption-template-954d34bc.js');
|
|
12
|
-
const generate = require('./generate-
|
|
12
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
13
13
|
const slotTemplate = require('./slot-template-2ff0d22a.js');
|
|
14
14
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
15
15
|
const utils = require('./utils-fc077139.js');
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
12
12
|
const index$1 = require('./index-a2b50e51.js');
|
|
13
13
|
const colorHelper = require('./color-helper-c9882bd8.js');
|
|
14
14
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const index$1 = require('./index-a2b50e51.js');
|
|
11
11
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
12
|
-
const generate = require('./generate-
|
|
12
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
13
13
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
14
14
|
|
|
15
15
|
const collapseCss = "@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}.bcm-collapse{display:block;border:1px solid var(--bcm-color-grey-5)}.bcm-collapse ::-webkit-details-marker{display:none}.bcm-collapse__header{display:flex;align-items:center;color:var(--bcm-color-grey-9);padding:16px;background-color:var(--bcm-color-grey-2);border-bottom:1px solid var(--bcm-color-grey-5);cursor:default;user-select:none}.bcm-collapse__header:focus{outline:none}.bcm-collapse__header .collapse-icon{margin-right:8px;display:flex;align-items:center;justify-content:center}.bcm-collapse__body{padding:16px;background-color:var(--bcm-color-grey-1);color:var(--bcm-color-grey-8)}.bcm-collapse--borderless{border:none}.bcm-collapse--borderless:not(.bcm-collapse--no-border){border-bottom:1px solid var(--bcm-color-grey-5)}.bcm-collapse--borderless .bcm-collapse__header{border-bottom:none}.bcm-collapse--borderless .bcm-collapse__body{background-color:var(--bcm-color-grey-2);padding:0 40px 16px}.bcm-collapse:not(.bcm-collapse--open) .bcm-collapse__header{border-bottom:none}.bcm-collapse:not(:first-child) .collapse{border-top:none}.bcm-collapse.hidden{display:none}";
|
|
@@ -10,7 +10,7 @@ const index = require('./index-9d98aa56.js');
|
|
|
10
10
|
const index$1 = require('./index-a2b50e51.js');
|
|
11
11
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
12
12
|
const datetimeHelper = require('./datetime-helper-eaf4fadb.js');
|
|
13
|
-
const generate = require('./generate-
|
|
13
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
14
14
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
15
15
|
const utils = require('./utils-fc077139.js');
|
|
16
16
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
12
12
|
|
|
13
13
|
const defaultCss = "@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}";
|
|
14
14
|
|
|
@@ -11,10 +11,10 @@ const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
|
11
11
|
const propertyDecorators = require('./property-decorators-cb2155ed.js');
|
|
12
12
|
require('./color-helper-c9882bd8.js');
|
|
13
13
|
require('./datetime-helper-eaf4fadb.js');
|
|
14
|
-
const generate = require('./generate-
|
|
15
|
-
require('./number-helper-
|
|
14
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
15
|
+
require('./number-helper-479ff55c.js');
|
|
16
16
|
require('./string-helper-df40a475.js');
|
|
17
|
-
require('./validators-
|
|
17
|
+
require('./validators-ffc47793.js');
|
|
18
18
|
require('./element-dragger-a8562f82.js');
|
|
19
19
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
20
20
|
const index$1 = require('./index-a2b50e51.js');
|
|
@@ -9,8 +9,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const index$1 = require('./index-a2b50e51.js');
|
|
11
11
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
12
|
-
const jsonParseDecarator = require('./json-parse-decarator-
|
|
13
|
-
const generate = require('./generate-
|
|
12
|
+
const jsonParseDecarator = require('./json-parse-decarator-a22bf884.js');
|
|
13
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
14
14
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
15
15
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
16
16
|
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
12
12
|
const index$1 = require('./index-a2b50e51.js');
|
|
13
13
|
const stringHelper = require('./string-helper-df40a475.js');
|
|
14
14
|
const colorHelper = require('./color-helper-c9882bd8.js');
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
10
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
12
12
|
const stringHelper = require('./string-helper-df40a475.js');
|
|
13
13
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
14
14
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
+
|
|
9
|
+
const index = require('./index-9d98aa56.js');
|
|
10
|
+
const index$1 = require('./index-a2b50e51.js');
|
|
11
|
+
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
12
|
+
const stringHelper = require('./string-helper-df40a475.js');
|
|
13
|
+
const utils = require('./utils-fc077139.js');
|
|
14
|
+
require('./_commonjsHelpers-bd20f4c0.js');
|
|
15
|
+
require('./bcm-2c51bf0c.js');
|
|
16
|
+
|
|
17
|
+
// /**
|
|
18
|
+
// *
|
|
19
|
+
// * @param type
|
|
20
|
+
// */
|
|
21
|
+
// export const required = (value:any) => {
|
|
22
|
+
// if ( value || value != null ) {
|
|
23
|
+
// return true
|
|
24
|
+
// } else {
|
|
25
|
+
// return true
|
|
26
|
+
// }
|
|
27
|
+
// }
|
|
28
|
+
class rules {
|
|
29
|
+
constructor() { }
|
|
30
|
+
response(status, message) {
|
|
31
|
+
return Object.assign(Object.assign({ valid: status }, (message && { message })), (!status && { type: 'error' }));
|
|
32
|
+
}
|
|
33
|
+
required(value, componentValidation) {
|
|
34
|
+
let validation = this.response(true);
|
|
35
|
+
if (value == '' || value == "" || value == undefined || value == null || value === false) {
|
|
36
|
+
validation = this.response(false, 'This field is required.');
|
|
37
|
+
}
|
|
38
|
+
if (componentValidation) {
|
|
39
|
+
if (!componentValidation.valid) {
|
|
40
|
+
validation = this.response(false, componentValidation.errorText);
|
|
41
|
+
}
|
|
42
|
+
if (value instanceof Object) {
|
|
43
|
+
if (value.isValid) {
|
|
44
|
+
if (value.isValid == false)
|
|
45
|
+
validation = this.response(false, 'This field is required.');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return validation;
|
|
50
|
+
}
|
|
51
|
+
selfValidation(input) {
|
|
52
|
+
let validation = this.response(true);
|
|
53
|
+
if (input.captionError != null || input.captionType == 'error') {
|
|
54
|
+
validation = this.response(false, input.captionError);
|
|
55
|
+
}
|
|
56
|
+
return validation;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const validate = new rules;
|
|
60
|
+
|
|
61
|
+
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}";
|
|
62
|
+
|
|
63
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
64
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
65
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
66
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
67
|
+
else
|
|
68
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
69
|
+
if (d = decorators[i])
|
|
70
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
71
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
72
|
+
};
|
|
73
|
+
const BcmForm = class {
|
|
74
|
+
constructor(hostRef) {
|
|
75
|
+
index.registerInstance(this, hostRef);
|
|
76
|
+
this.bcmForm = index.createEvent(this, "bcm-form", 7);
|
|
77
|
+
this.formData = {};
|
|
78
|
+
this.inputs = [];
|
|
79
|
+
this.duplicateInput = [];
|
|
80
|
+
this.isValid = true;
|
|
81
|
+
this.returnCaption = [];
|
|
82
|
+
this.Bromcom = {
|
|
83
|
+
errors: {
|
|
84
|
+
targetFormNotExist: 'target form is not exist --> ',
|
|
85
|
+
},
|
|
86
|
+
inputComponents: {
|
|
87
|
+
// Birbirinin aynısı
|
|
88
|
+
INPUT: 'input',
|
|
89
|
+
TEXTAREA: 'textarea',
|
|
90
|
+
//çok benzer
|
|
91
|
+
SWITCH: 'switch',
|
|
92
|
+
CHECKBOX: 'checkbox',
|
|
93
|
+
RADIO_GROUP: 'radio-group',
|
|
94
|
+
CHECKBOX_GROUP: 'checkbox-group',
|
|
95
|
+
RANGE: 'range',
|
|
96
|
+
// sadece value fırlatıyor
|
|
97
|
+
FORM: 'form',
|
|
98
|
+
FORM_GROUP: 'form-group',
|
|
99
|
+
// *En vakit alacak => içinde select, autocomplete, listbox, treeview özellikleri var
|
|
100
|
+
LIST: 'list',
|
|
101
|
+
//
|
|
102
|
+
COLORPICKER: 'colorpicker',
|
|
103
|
+
// picker aslında tek komponent hepsi datetimepicker
|
|
104
|
+
DATE_PICKER: 'date-picker',
|
|
105
|
+
TIME_PICKER: 'time-picker',
|
|
106
|
+
DATETIME_PICKER: 'datetime-picker',
|
|
107
|
+
// silinecek komponentler
|
|
108
|
+
SELECT: 'select',
|
|
109
|
+
LISTBOX: 'listbox'
|
|
110
|
+
},
|
|
111
|
+
helpers: {
|
|
112
|
+
randomId: function () {
|
|
113
|
+
return Math.random().toString(16).slice(2, -1);
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
this._id = (Math.random() * 4).toString(16).replace('.', '');
|
|
118
|
+
this.hidden = false;
|
|
119
|
+
this.validation = false;
|
|
120
|
+
this.name = "";
|
|
121
|
+
this.autocomplete = false;
|
|
122
|
+
}
|
|
123
|
+
handleSubmit() {
|
|
124
|
+
// if (lowercase(e.target.nodeName) === 'bcm-button') {
|
|
125
|
+
// if (e.target.type === 'submit') {
|
|
126
|
+
// this.submitFunction()
|
|
127
|
+
// }
|
|
128
|
+
// }
|
|
129
|
+
}
|
|
130
|
+
async submitFunction() {
|
|
131
|
+
this.formData = {};
|
|
132
|
+
this.inputs = [];
|
|
133
|
+
this.selector = this.el;
|
|
134
|
+
await this.getInputs();
|
|
135
|
+
await utils.delay(10);
|
|
136
|
+
const usrFrmData = await this.userFormData();
|
|
137
|
+
var formData = { isValid: true, formData: usrFrmData };
|
|
138
|
+
if (this.name) {
|
|
139
|
+
formData = Object.assign(Object.assign({}, formData), { formName: this.name });
|
|
140
|
+
}
|
|
141
|
+
if (this.isValid) {
|
|
142
|
+
this.bcmForm.emit(formData);
|
|
143
|
+
return formData;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.returnCaption = { isValid: false, 'message': 'Please fill in all inputs', 'errorDetails': this.returnCaption, formData: usrFrmData };
|
|
147
|
+
if (this.name) {
|
|
148
|
+
this.returnCaption = Object.assign(Object.assign({}, this.returnCaption), { formName: this.name });
|
|
149
|
+
}
|
|
150
|
+
this.bcmForm.emit(this.returnCaption);
|
|
151
|
+
return this.returnCaption;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async submit() {
|
|
155
|
+
return Promise.resolve(this.submitFunction());
|
|
156
|
+
}
|
|
157
|
+
async set(data) {
|
|
158
|
+
var _a;
|
|
159
|
+
const validate = this.validation;
|
|
160
|
+
this.validation = false;
|
|
161
|
+
// debugger
|
|
162
|
+
this.selector = this.el;
|
|
163
|
+
await this.getInputs();
|
|
164
|
+
if (data && ((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
165
|
+
for (const key of Object.keys(data)) {
|
|
166
|
+
const item = this.inputs.find(item => item.name === key);
|
|
167
|
+
if (item) {
|
|
168
|
+
try {
|
|
169
|
+
await item.set(data[key]);
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
console.log(item.nodeName, "set", error);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
this.validation = validate;
|
|
178
|
+
}
|
|
179
|
+
async get() {
|
|
180
|
+
var _a;
|
|
181
|
+
let formData = {};
|
|
182
|
+
this.selector = this.el;
|
|
183
|
+
const inputsCache = this.inputs;
|
|
184
|
+
await this.getInputs();
|
|
185
|
+
((_a = this.inputs) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.inputs.forEach(async (item) => {
|
|
186
|
+
try {
|
|
187
|
+
const value = await item.get();
|
|
188
|
+
formData = Object.assign(Object.assign({}, formData), { [item.name]: value });
|
|
189
|
+
}
|
|
190
|
+
catch (error) {
|
|
191
|
+
console.log(`${item.nodeName} get error`);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
this.inputs = inputsCache;
|
|
195
|
+
await utils.delay(10);
|
|
196
|
+
return Promise.resolve(formData);
|
|
197
|
+
}
|
|
198
|
+
async setClear() {
|
|
199
|
+
this.formData = {};
|
|
200
|
+
this.inputs = [];
|
|
201
|
+
this.selector = this.el;
|
|
202
|
+
let clear = [];
|
|
203
|
+
await this.getInputs();
|
|
204
|
+
this.inputs.forEach(async (item) => {
|
|
205
|
+
try {
|
|
206
|
+
clear.push(await item.setClear());
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
console.log(error);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
await Promise.all(clear).then(() => {
|
|
213
|
+
this.formData = {};
|
|
214
|
+
this.inputs = [];
|
|
215
|
+
this.duplicateInput = [];
|
|
216
|
+
this.isValid = true;
|
|
217
|
+
this.returnCaption = [];
|
|
218
|
+
});
|
|
219
|
+
await utils.delay(10);
|
|
220
|
+
return Promise.resolve(true);
|
|
221
|
+
}
|
|
222
|
+
async resetCaption() {
|
|
223
|
+
await utils.delay(10);
|
|
224
|
+
this.formData = {};
|
|
225
|
+
this.inputs = [];
|
|
226
|
+
this.selector = this.el;
|
|
227
|
+
await this.getInputs();
|
|
228
|
+
for (const item of this.inputs) {
|
|
229
|
+
try {
|
|
230
|
+
await item.resetCaption();
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
console.log(item.nodeName, "rc p");
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
await utils.delay(10);
|
|
237
|
+
return Promise.resolve();
|
|
238
|
+
}
|
|
239
|
+
async config(_config) {
|
|
240
|
+
if (_config['validation']) {
|
|
241
|
+
typeof _config['validation'] == 'boolean'
|
|
242
|
+
? this.validation = _config['validation']
|
|
243
|
+
: this.validation = false;
|
|
244
|
+
}
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
async getInputs() {
|
|
248
|
+
var form = this.selector;
|
|
249
|
+
if (!form) {
|
|
250
|
+
console.warn(this.Bromcom.errors.targetFormNotExist + this.selector);
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
const inputs = Array.from(form.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
|
|
254
|
+
this.duplicateInput = [];
|
|
255
|
+
// s-hn: Stencil private flag that contains host web component
|
|
256
|
+
// https://github.com/ionic-team/stencil/blob/45388e95edb46ef357eb9ae37cd32bbb5bc1ed23/src/runtime/vdom/vdom-render.ts#L116
|
|
257
|
+
const rootInputs = inputs.filter((input) => { var _a; return !input['s-hn'] || ((_a = input['s-hn']) === null || _a === void 0 ? void 0 : _a.nodeName) !== 'BcmForm'; });
|
|
258
|
+
// debugger;
|
|
259
|
+
for (const item of rootInputs) {
|
|
260
|
+
if (stringHelper.StringHelper.lowercase(item.nodeName) == "bcm-checkbox-group") {
|
|
261
|
+
let checkboxs = item.querySelectorAll("bcm-checkbox");
|
|
262
|
+
if (checkboxs) {
|
|
263
|
+
for (const checkbox of checkboxs) {
|
|
264
|
+
this.duplicateInput.push(checkbox.name);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (stringHelper.StringHelper.lowercase(item.nodeName) == "bcm-form") {
|
|
269
|
+
const groupInputs = Array.from(item.querySelectorAll('bcm-' + Object.values(this.Bromcom.inputComponents).join(',bcm-')));
|
|
270
|
+
let itemObject = {};
|
|
271
|
+
for (const element of groupInputs) {
|
|
272
|
+
var name = element.name;
|
|
273
|
+
var value = element.value;
|
|
274
|
+
itemObject = Object.assign(Object.assign({}, itemObject), { [name]: value });
|
|
275
|
+
this.duplicateInput.push(element.name);
|
|
276
|
+
}
|
|
277
|
+
item.value = itemObject;
|
|
278
|
+
let checkboxs = item.querySelectorAll("bcm-checkbox");
|
|
279
|
+
if (checkboxs) {
|
|
280
|
+
for (const checkbox of checkboxs) {
|
|
281
|
+
this.duplicateInput.push(checkbox.name);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
await utils.delay(10);
|
|
287
|
+
this.inputs = rootInputs;
|
|
288
|
+
}
|
|
289
|
+
getItemValue(item) {
|
|
290
|
+
const tagName = item.tagName.toLowerCase().replace('bcm-', '');
|
|
291
|
+
switch (tagName) {
|
|
292
|
+
/* case 'date-picker':
|
|
293
|
+
case 'datetime-picker':
|
|
294
|
+
return item.value.timestamp
|
|
295
|
+
case 'time-picker':
|
|
296
|
+
return item.value.time */
|
|
297
|
+
default:
|
|
298
|
+
return item.value;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
isWrapperComponent(item) {
|
|
302
|
+
return ['bcm-datetime-picker', 'bcm-date-picker', 'bcm-time-picker'].includes(item.toLowerCase());
|
|
303
|
+
}
|
|
304
|
+
isGroupComponent(item) {
|
|
305
|
+
return ['bcm-checkbox-group'].includes(item.toLowerCase());
|
|
306
|
+
}
|
|
307
|
+
isListComponent(item) {
|
|
308
|
+
return ['bcm-list'].includes(item.toLowerCase());
|
|
309
|
+
}
|
|
310
|
+
async userFormData() {
|
|
311
|
+
this.formData = {};
|
|
312
|
+
this.isValid = true;
|
|
313
|
+
this.returnCaption = [];
|
|
314
|
+
for (const item of this.inputs) {
|
|
315
|
+
// const isListComponent = this.isListComponent(item.tagName);
|
|
316
|
+
const isGroupComponent = this.isGroupComponent(item.tagName);
|
|
317
|
+
const isWrapperComponent = this.isWrapperComponent(item.tagName);
|
|
318
|
+
const wrapperComponent = isWrapperComponent && item;
|
|
319
|
+
const input = isWrapperComponent
|
|
320
|
+
? await item.getInput() && item
|
|
321
|
+
: item;
|
|
322
|
+
// input.caption = ''
|
|
323
|
+
// input.captionType = ''
|
|
324
|
+
if (this.validation) {
|
|
325
|
+
let valid = null;
|
|
326
|
+
// if (isListComponent) {
|
|
327
|
+
// valid = !(input.value && input.value.length > 0) && validate.required(input.value)
|
|
328
|
+
// } else
|
|
329
|
+
if (isWrapperComponent) {
|
|
330
|
+
const isPickerValid = await wrapperComponent.isValid();
|
|
331
|
+
valid = validate.required(input.value, isPickerValid);
|
|
332
|
+
if (valid) {
|
|
333
|
+
if (input.value instanceof Object) {
|
|
334
|
+
if (input.value["isValid"] == false) {
|
|
335
|
+
valid = validate.required("", isPickerValid);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
valid = validate.required(input.value, isPickerValid);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
else if (isGroupComponent) {
|
|
344
|
+
const childsCheckbox = utils.getChildElements(input, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
345
|
+
if (childsCheckbox && childsCheckbox.length > 0) {
|
|
346
|
+
for (const element of childsCheckbox) {
|
|
347
|
+
if (element && element.required === true) {
|
|
348
|
+
valid = validate.required(element.checked);
|
|
349
|
+
if (!valid['valid']) {
|
|
350
|
+
element.noCaption = false;
|
|
351
|
+
element.captionError = valid['message'];
|
|
352
|
+
element.captionType = valid['type'];
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
element.noCaption = input.noCaption;
|
|
356
|
+
element.captionError = null;
|
|
357
|
+
element.captionType = "default";
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
valid = validate.required(input.value);
|
|
365
|
+
}
|
|
366
|
+
if (input.required) {
|
|
367
|
+
if (!valid['valid']) {
|
|
368
|
+
input.captionError = valid['message'];
|
|
369
|
+
input.captionType = valid['type'];
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
input.captionError = null;
|
|
373
|
+
input.captionType = "default";
|
|
374
|
+
}
|
|
375
|
+
await utils.delay(10);
|
|
376
|
+
const selfValidation = validate.selfValidation(input);
|
|
377
|
+
if (valid['valid']) {
|
|
378
|
+
if (!selfValidation['valid']) {
|
|
379
|
+
input.captionError = selfValidation['message'];
|
|
380
|
+
input.captionType = selfValidation['type'];
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
let name = input.name;
|
|
385
|
+
let value = input.captionError;
|
|
386
|
+
!input.hidden && input.captionType == 'error' && (this.returnCaption = [...Array.from(this.returnCaption), { [name]: value }],
|
|
387
|
+
this.isValid = false);
|
|
388
|
+
}
|
|
389
|
+
if (input.name && !this.duplicateInput.includes(input.name)) {
|
|
390
|
+
var itemValue = this.getItemValue(input);
|
|
391
|
+
if (!itemValue || itemValue == undefined || itemValue == null) {
|
|
392
|
+
itemValue = null;
|
|
393
|
+
}
|
|
394
|
+
this.formData[input.name] = itemValue;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return this.formData;
|
|
398
|
+
}
|
|
399
|
+
async handleChange(e) {
|
|
400
|
+
const isWrapperComponent = this.isWrapperComponent(e.target.tagName);
|
|
401
|
+
const isGroupComponent = this.isGroupComponent(e.target.tagName);
|
|
402
|
+
let target;
|
|
403
|
+
if (isWrapperComponent) {
|
|
404
|
+
target = e.target.getInput && await e.target.getInput() || e.target;
|
|
405
|
+
}
|
|
406
|
+
else if (isGroupComponent) {
|
|
407
|
+
let req = false;
|
|
408
|
+
const childsCheckbox = utils.getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
409
|
+
childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
|
|
410
|
+
if (element && element.required === true) {
|
|
411
|
+
req = true;
|
|
412
|
+
}
|
|
413
|
+
}));
|
|
414
|
+
target = Object.assign(Object.assign({}, e.target), { required: req });
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
target = e.target;
|
|
418
|
+
}
|
|
419
|
+
const value = e.target.value;
|
|
420
|
+
const wrapperComponent = isWrapperComponent && e.target;
|
|
421
|
+
var isPickerValid;
|
|
422
|
+
if (isWrapperComponent) {
|
|
423
|
+
isPickerValid = await wrapperComponent.isValid();
|
|
424
|
+
}
|
|
425
|
+
const tick = setTimeout(() => {
|
|
426
|
+
if (target.required) {
|
|
427
|
+
let valid = null;
|
|
428
|
+
if (isWrapperComponent) {
|
|
429
|
+
valid = validate.required(value, isPickerValid);
|
|
430
|
+
if (valid) {
|
|
431
|
+
if (value instanceof Object) {
|
|
432
|
+
if (value["isValid"] == false) {
|
|
433
|
+
valid = validate.required("", isPickerValid);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
valid = validate.required(value, isPickerValid);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
else if (isGroupComponent) {
|
|
442
|
+
const childsCheckbox = utils.getChildElements(e.target, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
443
|
+
childsCheckbox.length > 0 && (childsCheckbox.forEach((element) => {
|
|
444
|
+
if (element && element.required === true) {
|
|
445
|
+
valid = validate.required(element.checked);
|
|
446
|
+
if (!valid['valid']) {
|
|
447
|
+
element.noCaption = false;
|
|
448
|
+
element.captionError = valid['message'];
|
|
449
|
+
element.captionType = valid['type'];
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
element.noCaption = e.target.noCaption;
|
|
453
|
+
element.captionError = null;
|
|
454
|
+
element.captionType = "default";
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}));
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
valid = validate.required(value);
|
|
461
|
+
}
|
|
462
|
+
if (valid['valid']) {
|
|
463
|
+
target.captionError = null;
|
|
464
|
+
target.captionType = null;
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
target.captionError = valid['message'];
|
|
468
|
+
target.captionType = valid['type'];
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
clearTimeout(tick);
|
|
472
|
+
});
|
|
473
|
+
this.value = await this.userFormData();
|
|
474
|
+
}
|
|
475
|
+
render() {
|
|
476
|
+
const hostClasses = index$1.classnames(this.hidden ? 'hidden' : null);
|
|
477
|
+
return (index.h(index.Host, { class: hostClasses, tabindex: "-1" }, index.h("form", { class: "bcm-form", autocomplete: this.autocomplete ? "on" : "off", tabindex: "-1" }, index.h("slot", null))));
|
|
478
|
+
}
|
|
479
|
+
get el() { return index.getElement(this); }
|
|
480
|
+
};
|
|
481
|
+
__decorate([
|
|
482
|
+
isLoadDecorator.IsLoad()
|
|
483
|
+
], BcmForm.prototype, "el", void 0);
|
|
484
|
+
BcmForm.style = formCss;
|
|
485
|
+
|
|
486
|
+
exports.bcm_form = BcmForm;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
|
-
const generate = require('./generate-
|
|
11
|
-
const numberHelper = require('./number-helper-
|
|
10
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
11
|
+
const numberHelper = require('./number-helper-479ff55c.js');
|
|
12
12
|
const stringHelper = require('./string-helper-df40a475.js');
|
|
13
|
-
const validators = require('./validators-
|
|
13
|
+
const validators = require('./validators-ffc47793.js');
|
|
14
14
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
15
15
|
const captionTemplate = require('./caption-template-954d34bc.js');
|
|
16
|
-
const inputTemplate = require('./input-template-
|
|
16
|
+
const inputTemplate = require('./input-template-bf26b388.js');
|
|
17
17
|
const index$1 = require('./index-a2b50e51.js');
|
|
18
18
|
const utils = require('./utils-fc077139.js');
|
|
19
19
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
|
-
const generate = require('./generate-
|
|
10
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
11
11
|
const bcm = require('./bcm-2c51bf0c.js');
|
|
12
12
|
const index$1 = require('./index-a2b50e51.js');
|
|
13
13
|
const colorHelper = require('./color-helper-c9882bd8.js');
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index = require('./index-9d98aa56.js');
|
|
10
|
-
const generate = require('./generate-
|
|
10
|
+
const generate = require('./generate-55fb2e3e.js');
|
|
11
11
|
const isLoadDecorator = require('./is-load-decorator-65755a67.js');
|
|
12
12
|
const stringHelper = require('./string-helper-df40a475.js');
|
|
13
13
|
require('./bcm-2c51bf0c.js');
|