@zanichelli/albe-web-components 3.2.2 → 4.0.0
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/CHANGELOG.md +1692 -0
- package/dist/cjs/{index-b1289f95.js → index-6b6a3299.js} +27 -29
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-33df2456.js → utils-8cc414c9.js} +28 -2
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-switcher_12.cjs.entry.js +1 -1
- package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-avatar.cjs.entry.js +1 -1
- package/dist/cjs/z-button-filter.cjs.entry.js +49 -0
- package/dist/cjs/z-chip.cjs.entry.js +2 -2
- package/dist/cjs/z-combobox.cjs.entry.js +5 -5
- package/dist/cjs/z-contextual-menu.cjs.entry.js +1 -1
- package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +0 -1
- package/dist/cjs/z-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/z-file.cjs.entry.js +1 -2
- package/dist/cjs/z-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-input-deprecated.cjs.entry.js +271 -0
- package/dist/cjs/z-input-label_2.cjs.entry.js +272 -0
- package/dist/cjs/z-input_2.cjs.entry.js +228 -0
- package/dist/cjs/z-list-group.cjs.entry.js +54 -0
- package/dist/cjs/{z-list_3.cjs.entry.js → z-list_2.cjs.entry.js} +5 -52
- package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +4 -4
- package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
- package/dist/cjs/z-modal-login.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-topbar.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +1 -1
- package/dist/cjs/z-pagination-bar.cjs.entry.js +2 -2
- package/dist/cjs/z-pagination.cjs.entry.js +2 -2
- package/dist/cjs/z-pocket_3.cjs.entry.js +2 -2
- package/dist/cjs/z-popover.cjs.entry.js +2 -2
- package/dist/cjs/z-section-title.cjs.entry.js +1 -1
- package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
- package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
- package/dist/cjs/z-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header.cjs.entry.js +2 -2
- package/dist/cjs/z-table-row.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/collection/beans/index.js +27 -29
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/buttons/z-toggle-switch/index.js +6 -6
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js +0 -1
- package/dist/collection/components/file-upload/z-file/index.js +0 -1
- package/dist/collection/components/inputs/z-combobox/index.js +4 -4
- package/dist/collection/components/inputs/z-input/index.js +58 -234
- package/dist/collection/components/inputs/z-input/styles.css +61 -34
- package/dist/collection/components/inputs/z-input-message/index.js +1 -1
- package/dist/collection/components/inputs/z-select/index.js +69 -134
- package/dist/collection/components/inputs/z-select/styles.css +16 -58
- package/dist/collection/components/modal/z-modal-login/index.js +1 -1
- package/dist/collection/components/navigation/z-menu-dropdown/index.js +4 -4
- package/dist/collection/components/z-date-picker/index.js +1 -1
- package/dist/collection/components/z-pagination/index.js +2 -2
- package/dist/collection/deprecated/z-input-deprecated/index.js +824 -0
- package/dist/collection/deprecated/z-input-deprecated/styles.css +296 -0
- package/dist/collection/{components/inputs → deprecated}/z-input-label/index.js +0 -0
- package/dist/collection/{components/inputs → deprecated}/z-input-label/styles.css +0 -0
- package/dist/collection/snowflakes/myz/z-otp/index.js +1 -1
- package/dist/collection/utils/utils.js +27 -2
- package/dist/esm/{index-7424c64c.js → index-46ca649a.js} +28 -30
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-93d2b922.js → utils-5d5963ef.js} +28 -3
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-switcher_12.entry.js +1 -1
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +1 -1
- package/dist/esm/z-button-filter.entry.js +45 -0
- package/dist/esm/z-chip.entry.js +2 -2
- package/dist/esm/z-combobox.entry.js +5 -5
- package/dist/esm/z-contextual-menu.entry.js +1 -1
- package/dist/esm/z-cookiebar.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +2 -2
- package/dist/esm/z-dragdrop-area_2.entry.js +0 -1
- package/dist/esm/z-file-upload.entry.js +2 -2
- package/dist/esm/z-file.entry.js +1 -2
- package/dist/esm/z-footer.entry.js +1 -1
- package/dist/esm/z-input-deprecated.entry.js +267 -0
- package/dist/esm/z-input-label_2.entry.js +267 -0
- package/dist/esm/z-input_2.entry.js +223 -0
- package/dist/esm/z-list-group.entry.js +50 -0
- package/dist/esm/z-list_2.entry.js +174 -0
- package/dist/esm/z-menu-dropdown_2.entry.js +4 -4
- package/dist/esm/z-messages-pocket.entry.js +1 -1
- package/dist/esm/z-modal-login.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +2 -2
- package/dist/esm/z-myz-card_4.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +2 -2
- package/dist/esm/z-myz-topbar.entry.js +1 -1
- package/dist/esm/z-navigation-tab-link.entry.js +1 -1
- package/dist/esm/z-navigation-tab.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +1 -1
- package/dist/esm/z-pagination-bar.entry.js +2 -2
- package/dist/esm/z-pagination.entry.js +2 -2
- package/dist/esm/z-pocket_3.entry.js +2 -2
- package/dist/esm/z-popover.entry.js +2 -2
- package/dist/esm/z-section-title.entry.js +1 -1
- package/dist/esm/z-skip-to-content.entry.js +2 -2
- package/dist/esm/z-slideshow.entry.js +2 -2
- package/dist/esm/z-status-tag.entry.js +1 -1
- package/dist/esm/z-table-cell.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +2 -2
- package/dist/esm/z-table-row.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -1
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +1 -1
- package/dist/esm/z-toggle-switch.entry.js +3 -3
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/types/beans/index.d.ts +6 -7
- package/dist/types/components/buttons/z-toggle-switch/index.d.ts +2 -2
- package/dist/types/components/inputs/z-input/index.d.ts +16 -29
- package/dist/types/components/inputs/z-select/index.d.ts +11 -17
- package/dist/types/components.d.ts +191 -30
- package/dist/types/deprecated/z-input-deprecated/index.d.ts +102 -0
- package/dist/types/{components/inputs → deprecated}/z-input-label/index.d.ts +0 -0
- package/dist/types/utils/utils.d.ts +5 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/{www/build/p-e9b90127.entry.js → dist/web-components-library/p-02ea7e49.entry.js} +1 -1
- package/dist/web-components-library/{p-21b9a94f.entry.js → p-08fa0a33.entry.js} +1 -1
- package/{www/build/p-e4b4b2e4.entry.js → dist/web-components-library/p-0a0aee35.entry.js} +1 -1
- package/dist/web-components-library/{p-2e510e79.entry.js → p-0d29d851.entry.js} +1 -1
- package/dist/web-components-library/{p-b0ea8c0e.entry.js → p-0ef6c549.entry.js} +1 -1
- package/dist/web-components-library/{p-4c282f06.entry.js → p-0f17db30.entry.js} +1 -1
- package/dist/web-components-library/{p-a391566a.entry.js → p-12af8652.entry.js} +1 -1
- package/dist/web-components-library/{p-3184d969.entry.js → p-1727c1c8.entry.js} +1 -1
- package/dist/web-components-library/{p-e7aadd3d.entry.js → p-20d62443.entry.js} +1 -1
- package/dist/web-components-library/{p-cd2ca92b.entry.js → p-3252be36.entry.js} +1 -1
- package/dist/web-components-library/{p-1b973c72.entry.js → p-3c111c2a.entry.js} +1 -1
- package/dist/web-components-library/{p-9721e132.entry.js → p-43329b81.entry.js} +1 -1
- package/dist/web-components-library/{p-9935973a.entry.js → p-4af112a7.entry.js} +1 -1
- package/dist/web-components-library/{p-03de95f1.entry.js → p-51cdabeb.entry.js} +1 -1
- package/dist/web-components-library/p-562e2d52.entry.js +1 -0
- package/dist/web-components-library/{p-709ab23c.entry.js → p-57d1acdc.entry.js} +1 -1
- package/dist/web-components-library/{p-0398165f.entry.js → p-5be162d5.entry.js} +1 -1
- package/{www/build/p-7e71d9b0.entry.js → dist/web-components-library/p-5eacbfc7.entry.js} +1 -1
- package/dist/web-components-library/{p-223bec2f.entry.js → p-63ccb013.entry.js} +1 -1
- package/dist/web-components-library/p-69ef6ddc.entry.js +1 -0
- package/dist/web-components-library/p-71accd8e.entry.js +1 -0
- package/dist/web-components-library/{p-56437e20.entry.js → p-7c6d4440.entry.js} +1 -1
- package/dist/web-components-library/p-99d7ab2f.entry.js +1 -0
- package/dist/web-components-library/{p-2ff952a3.entry.js → p-9aa5d36c.entry.js} +1 -1
- package/dist/web-components-library/p-9f5d707a.js +1 -0
- package/dist/web-components-library/{p-2711bc32.entry.js → p-9f9e4266.entry.js} +1 -1
- package/dist/web-components-library/{p-cce20009.entry.js → p-a851af81.entry.js} +1 -1
- package/dist/web-components-library/{p-d9d9d834.entry.js → p-a8875b97.entry.js} +2 -2
- package/dist/web-components-library/{p-adad78fc.entry.js → p-ae60bbdf.entry.js} +1 -1
- package/dist/web-components-library/p-b574d5f6.entry.js +1 -0
- package/dist/web-components-library/p-b9da171f.js +1 -0
- package/dist/web-components-library/{p-aae632ef.entry.js → p-ba29bc12.entry.js} +1 -1
- package/dist/web-components-library/p-bd886dd5.entry.js +1 -0
- package/dist/web-components-library/{p-542b3702.entry.js → p-bfe5693d.entry.js} +1 -1
- package/dist/web-components-library/{p-2b8975b1.entry.js → p-c9cdf4ee.entry.js} +1 -1
- package/dist/web-components-library/{p-dfc18671.entry.js → p-ccdebe3f.entry.js} +1 -1
- package/{www/build/p-8a637cae.entry.js → dist/web-components-library/p-cd8950d2.entry.js} +1 -1
- package/dist/web-components-library/{p-c787ea21.entry.js → p-d33fea26.entry.js} +1 -1
- package/dist/web-components-library/p-d8069dab.entry.js +1 -0
- package/dist/web-components-library/{p-f3080685.entry.js → p-d97a2db9.entry.js} +1 -1
- package/dist/web-components-library/{p-1eef76bb.entry.js → p-d995d9dc.entry.js} +1 -1
- package/dist/web-components-library/{p-895f636e.entry.js → p-de25c7f0.entry.js} +1 -1
- package/dist/web-components-library/{p-66fbe5b8.entry.js → p-df4e963b.entry.js} +1 -1
- package/dist/web-components-library/p-e2102da3.entry.js +1 -0
- package/dist/web-components-library/{p-459dab30.entry.js → p-e84d6807.entry.js} +1 -1
- package/dist/web-components-library/p-edb8d2ab.entry.js +1 -0
- package/dist/web-components-library/{p-0b590426.entry.js → p-f322c5f0.entry.js} +1 -1
- package/dist/web-components-library/{p-da7760a3.entry.js → p-f7c3e9c3.entry.js} +1 -1
- package/{www/build/p-dcf4d1b6.entry.js → dist/web-components-library/p-fa925198.entry.js} +1 -1
- package/dist/web-components-library/{p-2c823f4c.entry.js → p-fe927bf4.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +4 -3
- package/react/components.js.map +1 -1
- package/src-react/index.ts +1 -0
- package/www/build/index.esm.js +1 -1
- package/{dist/web-components-library/p-e9b90127.entry.js → www/build/p-02ea7e49.entry.js} +1 -1
- package/www/build/{p-21b9a94f.entry.js → p-08fa0a33.entry.js} +1 -1
- package/{dist/web-components-library/p-e4b4b2e4.entry.js → www/build/p-0a0aee35.entry.js} +1 -1
- package/www/build/{p-2e510e79.entry.js → p-0d29d851.entry.js} +1 -1
- package/www/build/{p-b0ea8c0e.entry.js → p-0ef6c549.entry.js} +1 -1
- package/www/build/{p-4c282f06.entry.js → p-0f17db30.entry.js} +1 -1
- package/www/build/{p-a391566a.entry.js → p-12af8652.entry.js} +1 -1
- package/www/build/{p-3184d969.entry.js → p-1727c1c8.entry.js} +1 -1
- package/www/build/{p-e7aadd3d.entry.js → p-20d62443.entry.js} +1 -1
- package/www/build/{p-cd2ca92b.entry.js → p-3252be36.entry.js} +1 -1
- package/www/build/{p-1b973c72.entry.js → p-3c111c2a.entry.js} +1 -1
- package/www/build/{p-9721e132.entry.js → p-43329b81.entry.js} +1 -1
- package/www/build/{p-9935973a.entry.js → p-4af112a7.entry.js} +1 -1
- package/www/build/{p-03de95f1.entry.js → p-51cdabeb.entry.js} +1 -1
- package/www/build/p-562e2d52.entry.js +1 -0
- package/www/build/{p-709ab23c.entry.js → p-57d1acdc.entry.js} +1 -1
- package/www/build/{p-0398165f.entry.js → p-5be162d5.entry.js} +1 -1
- package/{dist/web-components-library/p-7e71d9b0.entry.js → www/build/p-5eacbfc7.entry.js} +1 -1
- package/www/build/{p-223bec2f.entry.js → p-63ccb013.entry.js} +1 -1
- package/www/build/p-69ef6ddc.entry.js +1 -0
- package/www/build/p-71accd8e.entry.js +1 -0
- package/www/build/{p-56437e20.entry.js → p-7c6d4440.entry.js} +1 -1
- package/www/build/p-99d7ab2f.entry.js +1 -0
- package/www/build/{p-2ff952a3.entry.js → p-9aa5d36c.entry.js} +1 -1
- package/www/build/p-9f5d707a.js +1 -0
- package/www/build/{p-2711bc32.entry.js → p-9f9e4266.entry.js} +1 -1
- package/www/build/{p-cce20009.entry.js → p-a851af81.entry.js} +1 -1
- package/www/build/{p-d9d9d834.entry.js → p-a8875b97.entry.js} +2 -2
- package/www/build/{p-adad78fc.entry.js → p-ae60bbdf.entry.js} +1 -1
- package/www/build/p-b574d5f6.entry.js +1 -0
- package/www/build/p-b9da171f.js +1 -0
- package/www/build/{p-aae632ef.entry.js → p-ba29bc12.entry.js} +1 -1
- package/www/build/p-bd886dd5.entry.js +1 -0
- package/www/build/{p-542b3702.entry.js → p-bfe5693d.entry.js} +1 -1
- package/www/build/{p-2b8975b1.entry.js → p-c9cdf4ee.entry.js} +1 -1
- package/www/build/{p-dfc18671.entry.js → p-ccdebe3f.entry.js} +1 -1
- package/{dist/web-components-library/p-8a637cae.entry.js → www/build/p-cd8950d2.entry.js} +1 -1
- package/www/build/{p-c787ea21.entry.js → p-d33fea26.entry.js} +1 -1
- package/www/build/p-d8069dab.entry.js +1 -0
- package/www/build/{p-f3080685.entry.js → p-d97a2db9.entry.js} +1 -1
- package/www/build/{p-1eef76bb.entry.js → p-d995d9dc.entry.js} +1 -1
- package/www/build/{p-895f636e.entry.js → p-de25c7f0.entry.js} +1 -1
- package/www/build/{p-66fbe5b8.entry.js → p-df4e963b.entry.js} +1 -1
- package/www/build/p-e2102da3.entry.js +1 -0
- package/www/build/p-e76afdbc.js +1 -0
- package/www/build/{p-459dab30.entry.js → p-e84d6807.entry.js} +1 -1
- package/www/build/p-edb8d2ab.entry.js +1 -0
- package/www/build/{p-0b590426.entry.js → p-f322c5f0.entry.js} +1 -1
- package/www/build/{p-da7760a3.entry.js → p-f7c3e9c3.entry.js} +1 -1
- package/{dist/web-components-library/p-dcf4d1b6.entry.js → www/build/p-fa925198.entry.js} +1 -1
- package/www/build/{p-2c823f4c.entry.js → p-fe927bf4.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/z-button-filter_5.cjs.entry.js +0 -620
- package/dist/esm/z-button-filter_5.entry.js +0 -612
- package/dist/esm/z-list_3.entry.js +0 -220
- package/dist/web-components-library/p-14c9344f.entry.js +0 -1
- package/dist/web-components-library/p-57270965.entry.js +0 -1
- package/dist/web-components-library/p-70be81b6.entry.js +0 -1
- package/dist/web-components-library/p-80369bb8.entry.js +0 -1
- package/dist/web-components-library/p-80a3e18a.js +0 -1
- package/dist/web-components-library/p-a785ff38.entry.js +0 -1
- package/dist/web-components-library/p-fea5b98f.js +0 -1
- package/www/build/p-14c9344f.entry.js +0 -1
- package/www/build/p-57270965.entry.js +0 -1
- package/www/build/p-70be81b6.entry.js +0 -1
- package/www/build/p-80369bb8.entry.js +0 -1
- package/www/build/p-80a3e18a.js +0 -1
- package/www/build/p-a785ff38.entry.js +0 -1
- package/www/build/p-b058084c.js +0 -1
- package/www/build/p-fea5b98f.js +0 -1
|
@@ -0,0 +1,824 @@
|
|
|
1
|
+
import { Component, Prop, State, h, Method, Event, Element, Listen, } from "@stencil/core";
|
|
2
|
+
import { InputTypeEnum, } from "../../beans";
|
|
3
|
+
import { randomId } from "../../utils/utils";
|
|
4
|
+
export class ZInputDeprecated {
|
|
5
|
+
constructor() {
|
|
6
|
+
/** the id of the input element */
|
|
7
|
+
this.htmlid = `id-${randomId()}`;
|
|
8
|
+
/** the input is disabled */
|
|
9
|
+
this.disabled = false;
|
|
10
|
+
/** the input is readonly */
|
|
11
|
+
this.readonly = false;
|
|
12
|
+
/** the input is required (optional): available for text, password, number, email, textarea, checkbox */
|
|
13
|
+
this.required = false;
|
|
14
|
+
/** checked: available for checkbox, radio */
|
|
15
|
+
this.checked = false;
|
|
16
|
+
/** show input helper message (optional): available for text, password, number, email, textarea, select */
|
|
17
|
+
this.hasmessage = true;
|
|
18
|
+
/** the input label position: available for checkbox, radio */
|
|
19
|
+
this.labelafter = true;
|
|
20
|
+
/** timeout setting before trigger `inputChange` event (optional): available for text, textarea */
|
|
21
|
+
this.typingtimeout = 300;
|
|
22
|
+
/** multiple options can be selected (optional): available for select */
|
|
23
|
+
this.multiple = false;
|
|
24
|
+
/** render clear icon when typing (optional): available for text */
|
|
25
|
+
this.hasclearicon = true;
|
|
26
|
+
this.isTyping = false;
|
|
27
|
+
this.textareaWrapperHover = "";
|
|
28
|
+
this.textareaWrapperFocus = "";
|
|
29
|
+
this.passwordHidden = true;
|
|
30
|
+
}
|
|
31
|
+
inputCheckListener(e) {
|
|
32
|
+
const data = e.detail;
|
|
33
|
+
switch (this.type) {
|
|
34
|
+
case InputTypeEnum.radio:
|
|
35
|
+
if (data.type === InputTypeEnum.radio &&
|
|
36
|
+
data.name === this.name &&
|
|
37
|
+
data.id !== this.htmlid) {
|
|
38
|
+
this.checked = false;
|
|
39
|
+
}
|
|
40
|
+
default:
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** get the input value */
|
|
45
|
+
async getValue() {
|
|
46
|
+
switch (this.type) {
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
case "select":
|
|
49
|
+
return this.selectElem.getValue();
|
|
50
|
+
default:
|
|
51
|
+
return this.value;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** set the input value */
|
|
55
|
+
async setValue(value) {
|
|
56
|
+
switch (this.type) {
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
case "select":
|
|
59
|
+
this.selectElem.setValue(value);
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
if (typeof value === "string")
|
|
63
|
+
this.value = value;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** get checked status */
|
|
68
|
+
async isChecked() {
|
|
69
|
+
switch (this.type) {
|
|
70
|
+
case InputTypeEnum.checkbox:
|
|
71
|
+
case InputTypeEnum.radio:
|
|
72
|
+
return this.checked;
|
|
73
|
+
default:
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
emitInputChange(value, keycode) {
|
|
78
|
+
if (!this.isTyping) {
|
|
79
|
+
this.emitStartTyping();
|
|
80
|
+
}
|
|
81
|
+
let validity = {};
|
|
82
|
+
if (this.type === InputTypeEnum.textarea) {
|
|
83
|
+
validity = this.getValidity("textarea");
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
validity = this.getValidity("input");
|
|
87
|
+
}
|
|
88
|
+
this.value = value;
|
|
89
|
+
this.inputChange.emit({ value, keycode, validity });
|
|
90
|
+
clearTimeout(this.timer);
|
|
91
|
+
this.timer = setTimeout(() => {
|
|
92
|
+
this.emitStopTyping(this.value, validity);
|
|
93
|
+
}, this.typingtimeout);
|
|
94
|
+
}
|
|
95
|
+
emitStartTyping() {
|
|
96
|
+
this.isTyping = true;
|
|
97
|
+
this.startTyping.emit();
|
|
98
|
+
}
|
|
99
|
+
emitStopTyping(value, validity) {
|
|
100
|
+
this.isTyping = false;
|
|
101
|
+
this.stopTyping.emit({
|
|
102
|
+
value: value,
|
|
103
|
+
validity: validity,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
emitInputCheck(checked) {
|
|
107
|
+
this.inputCheck.emit({
|
|
108
|
+
id: this.htmlid,
|
|
109
|
+
checked: checked,
|
|
110
|
+
type: this.type,
|
|
111
|
+
name: this.name,
|
|
112
|
+
value: this.value,
|
|
113
|
+
validity: this.getValidity("input"),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
getValidity(type) {
|
|
117
|
+
const input = this.hostElement.querySelector(type);
|
|
118
|
+
return input.validity;
|
|
119
|
+
}
|
|
120
|
+
/* START text/password/email/number */
|
|
121
|
+
getTextAttributes() {
|
|
122
|
+
const attr = {
|
|
123
|
+
id: this.htmlid,
|
|
124
|
+
name: this.name,
|
|
125
|
+
placeholder: this.placeholder,
|
|
126
|
+
value: this.value,
|
|
127
|
+
disabled: this.disabled,
|
|
128
|
+
readonly: this.readonly,
|
|
129
|
+
required: this.required,
|
|
130
|
+
title: this.htmltitle,
|
|
131
|
+
class: [
|
|
132
|
+
`input_${this.status || "default"}`,
|
|
133
|
+
this.isTyping && "istyping",
|
|
134
|
+
!this.isTyping && this.value && "filled",
|
|
135
|
+
]
|
|
136
|
+
.filter(Boolean)
|
|
137
|
+
.join(" "),
|
|
138
|
+
onInput: (e) => this.emitInputChange(e.target.value, e.keyCode),
|
|
139
|
+
};
|
|
140
|
+
if (this.autocomplete) {
|
|
141
|
+
attr["autocomplete"] = this.autocomplete;
|
|
142
|
+
}
|
|
143
|
+
return attr;
|
|
144
|
+
}
|
|
145
|
+
renderInputText(type = InputTypeEnum.text) {
|
|
146
|
+
const attr = this.getTextAttributes();
|
|
147
|
+
if (this.icon || type === InputTypeEnum.password) {
|
|
148
|
+
attr.class += " hasIcon";
|
|
149
|
+
}
|
|
150
|
+
if (this.hasclearicon) {
|
|
151
|
+
attr.class += " hasClearIcon";
|
|
152
|
+
}
|
|
153
|
+
return (h("div", { class: "textWrapper" },
|
|
154
|
+
this.renderLabel(),
|
|
155
|
+
h("div", null,
|
|
156
|
+
h("input", Object.assign({ type: type === InputTypeEnum.password && !this.passwordHidden
|
|
157
|
+
? InputTypeEnum.text
|
|
158
|
+
: type }, attr, { "aria-label": this.ariaLabel || this.label })),
|
|
159
|
+
this.renderIcons()),
|
|
160
|
+
this.renderMessage()));
|
|
161
|
+
}
|
|
162
|
+
renderLabel() {
|
|
163
|
+
if (!this.label)
|
|
164
|
+
return;
|
|
165
|
+
return (h("z-input-label", { htmlfor: this.htmlid, value: this.label, disabled: this.disabled, "aria-label": this.label, id: `${this.htmlid}_label` }));
|
|
166
|
+
}
|
|
167
|
+
renderIcons() {
|
|
168
|
+
return (h("span", { class: {
|
|
169
|
+
iconsWrapper: true,
|
|
170
|
+
disabled: this.disabled,
|
|
171
|
+
} },
|
|
172
|
+
this.renderResetIcon(),
|
|
173
|
+
this.renderIcon()));
|
|
174
|
+
}
|
|
175
|
+
renderIcon() {
|
|
176
|
+
if (this.type === InputTypeEnum.password) {
|
|
177
|
+
return this.renderShowHidePassword();
|
|
178
|
+
}
|
|
179
|
+
if (!this.icon)
|
|
180
|
+
return;
|
|
181
|
+
return h("z-icon", { class: "inputIcon", name: this.icon });
|
|
182
|
+
}
|
|
183
|
+
renderResetIcon() {
|
|
184
|
+
if (!this.hasclearicon || !this.value || this.disabled || this.readonly)
|
|
185
|
+
return;
|
|
186
|
+
return (h("z-icon", { class: "resetIcon", name: "multiply", onClick: (e) => this.emitInputChange("", e.keyCode) }));
|
|
187
|
+
}
|
|
188
|
+
renderShowHidePassword() {
|
|
189
|
+
return (h("z-icon", { class: "showHidePasswordIcon", name: this.passwordHidden ? "view-filled" : "view-off-filled", onClick: () => (this.passwordHidden = !this.passwordHidden) }));
|
|
190
|
+
}
|
|
191
|
+
renderMessage() {
|
|
192
|
+
if (!this.hasmessage)
|
|
193
|
+
return;
|
|
194
|
+
return h("z-input-message", { message: this.message, status: this.status });
|
|
195
|
+
}
|
|
196
|
+
/* END text/password/email/number */
|
|
197
|
+
/* START textarea */
|
|
198
|
+
renderTextarea() {
|
|
199
|
+
const attributes = this.getTextAttributes();
|
|
200
|
+
return (h("div", { class: "textWrapper" },
|
|
201
|
+
this.renderLabel(),
|
|
202
|
+
h("div", { class: [
|
|
203
|
+
"textareaWrapper",
|
|
204
|
+
attributes.class,
|
|
205
|
+
attributes.disabled && "disabled",
|
|
206
|
+
attributes.readonly && "readonly",
|
|
207
|
+
this.isTyping && "istyping",
|
|
208
|
+
this.textareaWrapperFocus,
|
|
209
|
+
this.textareaWrapperHover,
|
|
210
|
+
]
|
|
211
|
+
.filter(Boolean)
|
|
212
|
+
.join(" ") },
|
|
213
|
+
h("textarea", Object.assign({}, attributes, { onFocus: () => (this.textareaWrapperFocus = "focus"), onBlur: () => (this.textareaWrapperFocus = ""), onMouseOver: () => (this.textareaWrapperHover = "hover"), onMouseOut: () => (this.textareaWrapperHover = ""), "aria-label": this.ariaLabel || this.label }))),
|
|
214
|
+
this.renderMessage()));
|
|
215
|
+
}
|
|
216
|
+
/* END textarea */
|
|
217
|
+
handleCheck(ev) {
|
|
218
|
+
this.checked = ev.target.checked;
|
|
219
|
+
this.emitInputCheck(this.checked);
|
|
220
|
+
}
|
|
221
|
+
/* START checkbox */
|
|
222
|
+
renderCheckbox() {
|
|
223
|
+
return (h("div", { class: "checkboxWrapper" },
|
|
224
|
+
h("input", { id: this.htmlid, type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, required: this.required, onChange: this.handleCheck.bind(this), value: this.value }),
|
|
225
|
+
h("label", { htmlFor: this.htmlid, class: {
|
|
226
|
+
checkboxLabel: true,
|
|
227
|
+
after: this.labelafter,
|
|
228
|
+
before: !this.labelafter,
|
|
229
|
+
} },
|
|
230
|
+
h("z-icon", { name: this.checked ? "checkbox-checked" : "checkbox", "aria-hidden": "true" }),
|
|
231
|
+
this.label && h("span", { innerHTML: this.label }))));
|
|
232
|
+
}
|
|
233
|
+
/* END checkbox */
|
|
234
|
+
/* START radio */
|
|
235
|
+
renderRadio() {
|
|
236
|
+
return (h("div", { class: "radioWrapper" },
|
|
237
|
+
h("input", { id: this.htmlid, type: "radio", name: this.name, checked: this.checked, disabled: this.disabled, readonly: this.readonly, onChange: this.handleCheck.bind(this), value: this.value }),
|
|
238
|
+
h("label", { htmlFor: this.htmlid, class: {
|
|
239
|
+
radioLabel: true,
|
|
240
|
+
after: this.labelafter,
|
|
241
|
+
before: !this.labelafter,
|
|
242
|
+
} },
|
|
243
|
+
h("z-icon", { name: this.checked ? "radio-button-checked" : "radio-button", "aria-hidden": "true" }),
|
|
244
|
+
this.label && h("span", { innerHTML: this.label }))));
|
|
245
|
+
}
|
|
246
|
+
/* END radio */
|
|
247
|
+
/* START select */
|
|
248
|
+
renderSelect() {
|
|
249
|
+
return (h("z-select", { htmlid: this.htmlid, items: this.items, name: this.name, label: this.label, "aria-label": this.ariaLabel, disabled: this.disabled, readonly: this.readonly, placeholder: this.placeholder, htmltitle: this.htmltitle, status: this.status, message: !this.hasmessage ? false : this.message, autocomplete: this.autocomplete, ref: (el) => (this.selectElem = el) }));
|
|
250
|
+
}
|
|
251
|
+
/* END select */
|
|
252
|
+
render() {
|
|
253
|
+
switch (this.type) {
|
|
254
|
+
case InputTypeEnum.text:
|
|
255
|
+
case InputTypeEnum.password:
|
|
256
|
+
case InputTypeEnum.number:
|
|
257
|
+
case InputTypeEnum.email:
|
|
258
|
+
return this.renderInputText(this.type);
|
|
259
|
+
case InputTypeEnum.textarea:
|
|
260
|
+
return this.renderTextarea();
|
|
261
|
+
case InputTypeEnum.checkbox:
|
|
262
|
+
return this.renderCheckbox();
|
|
263
|
+
case InputTypeEnum.radio:
|
|
264
|
+
return this.renderRadio();
|
|
265
|
+
// @ts-ignore
|
|
266
|
+
case "select":
|
|
267
|
+
return this.renderSelect();
|
|
268
|
+
default:
|
|
269
|
+
return this.renderInputText();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
static get is() { return "z-input-deprecated"; }
|
|
273
|
+
static get encapsulation() { return "scoped"; }
|
|
274
|
+
static get originalStyleUrls() { return {
|
|
275
|
+
"$": ["styles.css"]
|
|
276
|
+
}; }
|
|
277
|
+
static get styleUrls() { return {
|
|
278
|
+
"$": ["styles.css"]
|
|
279
|
+
}; }
|
|
280
|
+
static get properties() { return {
|
|
281
|
+
"htmlid": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"mutable": false,
|
|
284
|
+
"complexType": {
|
|
285
|
+
"original": "string",
|
|
286
|
+
"resolved": "string",
|
|
287
|
+
"references": {}
|
|
288
|
+
},
|
|
289
|
+
"required": false,
|
|
290
|
+
"optional": false,
|
|
291
|
+
"docs": {
|
|
292
|
+
"tags": [],
|
|
293
|
+
"text": "the id of the input element"
|
|
294
|
+
},
|
|
295
|
+
"attribute": "htmlid",
|
|
296
|
+
"reflect": false,
|
|
297
|
+
"defaultValue": "`id-${randomId()}`"
|
|
298
|
+
},
|
|
299
|
+
"type": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"mutable": false,
|
|
302
|
+
"complexType": {
|
|
303
|
+
"original": "InputTypeBean",
|
|
304
|
+
"resolved": "\"checkbox\" | \"email\" | \"number\" | \"password\" | \"radio\" | \"text\" | \"textarea\"",
|
|
305
|
+
"references": {
|
|
306
|
+
"InputTypeBean": {
|
|
307
|
+
"location": "import",
|
|
308
|
+
"path": "../../beans"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": false,
|
|
313
|
+
"optional": false,
|
|
314
|
+
"docs": {
|
|
315
|
+
"tags": [],
|
|
316
|
+
"text": "input types"
|
|
317
|
+
},
|
|
318
|
+
"attribute": "type",
|
|
319
|
+
"reflect": false
|
|
320
|
+
},
|
|
321
|
+
"name": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"mutable": false,
|
|
324
|
+
"complexType": {
|
|
325
|
+
"original": "string",
|
|
326
|
+
"resolved": "string",
|
|
327
|
+
"references": {}
|
|
328
|
+
},
|
|
329
|
+
"required": false,
|
|
330
|
+
"optional": true,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": "the input name"
|
|
334
|
+
},
|
|
335
|
+
"attribute": "name",
|
|
336
|
+
"reflect": false
|
|
337
|
+
},
|
|
338
|
+
"label": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"mutable": false,
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "string",
|
|
343
|
+
"resolved": "string",
|
|
344
|
+
"references": {}
|
|
345
|
+
},
|
|
346
|
+
"required": false,
|
|
347
|
+
"optional": true,
|
|
348
|
+
"docs": {
|
|
349
|
+
"tags": [],
|
|
350
|
+
"text": "the input label"
|
|
351
|
+
},
|
|
352
|
+
"attribute": "label",
|
|
353
|
+
"reflect": false
|
|
354
|
+
},
|
|
355
|
+
"ariaLabel": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"mutable": false,
|
|
358
|
+
"complexType": {
|
|
359
|
+
"original": "string",
|
|
360
|
+
"resolved": "string",
|
|
361
|
+
"references": {}
|
|
362
|
+
},
|
|
363
|
+
"required": false,
|
|
364
|
+
"optional": true,
|
|
365
|
+
"docs": {
|
|
366
|
+
"tags": [],
|
|
367
|
+
"text": "the input aria-label"
|
|
368
|
+
},
|
|
369
|
+
"attribute": "aria-label",
|
|
370
|
+
"reflect": false
|
|
371
|
+
},
|
|
372
|
+
"value": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"mutable": true,
|
|
375
|
+
"complexType": {
|
|
376
|
+
"original": "string",
|
|
377
|
+
"resolved": "string",
|
|
378
|
+
"references": {}
|
|
379
|
+
},
|
|
380
|
+
"required": false,
|
|
381
|
+
"optional": true,
|
|
382
|
+
"docs": {
|
|
383
|
+
"tags": [],
|
|
384
|
+
"text": "the input value"
|
|
385
|
+
},
|
|
386
|
+
"attribute": "value",
|
|
387
|
+
"reflect": false
|
|
388
|
+
},
|
|
389
|
+
"disabled": {
|
|
390
|
+
"type": "boolean",
|
|
391
|
+
"mutable": false,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "boolean",
|
|
394
|
+
"resolved": "boolean",
|
|
395
|
+
"references": {}
|
|
396
|
+
},
|
|
397
|
+
"required": false,
|
|
398
|
+
"optional": true,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [],
|
|
401
|
+
"text": "the input is disabled"
|
|
402
|
+
},
|
|
403
|
+
"attribute": "disabled",
|
|
404
|
+
"reflect": false,
|
|
405
|
+
"defaultValue": "false"
|
|
406
|
+
},
|
|
407
|
+
"readonly": {
|
|
408
|
+
"type": "boolean",
|
|
409
|
+
"mutable": false,
|
|
410
|
+
"complexType": {
|
|
411
|
+
"original": "boolean",
|
|
412
|
+
"resolved": "boolean",
|
|
413
|
+
"references": {}
|
|
414
|
+
},
|
|
415
|
+
"required": false,
|
|
416
|
+
"optional": true,
|
|
417
|
+
"docs": {
|
|
418
|
+
"tags": [],
|
|
419
|
+
"text": "the input is readonly"
|
|
420
|
+
},
|
|
421
|
+
"attribute": "readonly",
|
|
422
|
+
"reflect": false,
|
|
423
|
+
"defaultValue": "false"
|
|
424
|
+
},
|
|
425
|
+
"required": {
|
|
426
|
+
"type": "boolean",
|
|
427
|
+
"mutable": false,
|
|
428
|
+
"complexType": {
|
|
429
|
+
"original": "boolean",
|
|
430
|
+
"resolved": "boolean",
|
|
431
|
+
"references": {}
|
|
432
|
+
},
|
|
433
|
+
"required": false,
|
|
434
|
+
"optional": true,
|
|
435
|
+
"docs": {
|
|
436
|
+
"tags": [],
|
|
437
|
+
"text": "the input is required (optional): available for text, password, number, email, textarea, checkbox"
|
|
438
|
+
},
|
|
439
|
+
"attribute": "required",
|
|
440
|
+
"reflect": false,
|
|
441
|
+
"defaultValue": "false"
|
|
442
|
+
},
|
|
443
|
+
"checked": {
|
|
444
|
+
"type": "boolean",
|
|
445
|
+
"mutable": true,
|
|
446
|
+
"complexType": {
|
|
447
|
+
"original": "boolean",
|
|
448
|
+
"resolved": "boolean",
|
|
449
|
+
"references": {}
|
|
450
|
+
},
|
|
451
|
+
"required": false,
|
|
452
|
+
"optional": true,
|
|
453
|
+
"docs": {
|
|
454
|
+
"tags": [],
|
|
455
|
+
"text": "checked: available for checkbox, radio"
|
|
456
|
+
},
|
|
457
|
+
"attribute": "checked",
|
|
458
|
+
"reflect": false,
|
|
459
|
+
"defaultValue": "false"
|
|
460
|
+
},
|
|
461
|
+
"placeholder": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"mutable": false,
|
|
464
|
+
"complexType": {
|
|
465
|
+
"original": "string",
|
|
466
|
+
"resolved": "string",
|
|
467
|
+
"references": {}
|
|
468
|
+
},
|
|
469
|
+
"required": false,
|
|
470
|
+
"optional": true,
|
|
471
|
+
"docs": {
|
|
472
|
+
"tags": [],
|
|
473
|
+
"text": "the input placeholder (optional)"
|
|
474
|
+
},
|
|
475
|
+
"attribute": "placeholder",
|
|
476
|
+
"reflect": false
|
|
477
|
+
},
|
|
478
|
+
"htmltitle": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"mutable": false,
|
|
481
|
+
"complexType": {
|
|
482
|
+
"original": "string",
|
|
483
|
+
"resolved": "string",
|
|
484
|
+
"references": {}
|
|
485
|
+
},
|
|
486
|
+
"required": false,
|
|
487
|
+
"optional": true,
|
|
488
|
+
"docs": {
|
|
489
|
+
"tags": [],
|
|
490
|
+
"text": "the input html title (optional)"
|
|
491
|
+
},
|
|
492
|
+
"attribute": "htmltitle",
|
|
493
|
+
"reflect": false
|
|
494
|
+
},
|
|
495
|
+
"status": {
|
|
496
|
+
"type": "string",
|
|
497
|
+
"mutable": false,
|
|
498
|
+
"complexType": {
|
|
499
|
+
"original": "InputStatusBean",
|
|
500
|
+
"resolved": "\"error\" | \"success\" | \"warning\"",
|
|
501
|
+
"references": {
|
|
502
|
+
"InputStatusBean": {
|
|
503
|
+
"location": "import",
|
|
504
|
+
"path": "../../beans"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"required": false,
|
|
509
|
+
"optional": true,
|
|
510
|
+
"docs": {
|
|
511
|
+
"tags": [],
|
|
512
|
+
"text": "the input status (optional): available for text, password, number, email, textarea, select"
|
|
513
|
+
},
|
|
514
|
+
"attribute": "status",
|
|
515
|
+
"reflect": false
|
|
516
|
+
},
|
|
517
|
+
"hasmessage": {
|
|
518
|
+
"type": "boolean",
|
|
519
|
+
"mutable": false,
|
|
520
|
+
"complexType": {
|
|
521
|
+
"original": "boolean",
|
|
522
|
+
"resolved": "boolean",
|
|
523
|
+
"references": {}
|
|
524
|
+
},
|
|
525
|
+
"required": false,
|
|
526
|
+
"optional": true,
|
|
527
|
+
"docs": {
|
|
528
|
+
"tags": [],
|
|
529
|
+
"text": "show input helper message (optional): available for text, password, number, email, textarea, select"
|
|
530
|
+
},
|
|
531
|
+
"attribute": "hasmessage",
|
|
532
|
+
"reflect": false,
|
|
533
|
+
"defaultValue": "true"
|
|
534
|
+
},
|
|
535
|
+
"message": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"mutable": false,
|
|
538
|
+
"complexType": {
|
|
539
|
+
"original": "string",
|
|
540
|
+
"resolved": "string",
|
|
541
|
+
"references": {}
|
|
542
|
+
},
|
|
543
|
+
"required": false,
|
|
544
|
+
"optional": true,
|
|
545
|
+
"docs": {
|
|
546
|
+
"tags": [],
|
|
547
|
+
"text": "input helper message (optional): available for text, password, number, email, textarea, select"
|
|
548
|
+
},
|
|
549
|
+
"attribute": "message",
|
|
550
|
+
"reflect": false
|
|
551
|
+
},
|
|
552
|
+
"labelafter": {
|
|
553
|
+
"type": "boolean",
|
|
554
|
+
"mutable": false,
|
|
555
|
+
"complexType": {
|
|
556
|
+
"original": "boolean",
|
|
557
|
+
"resolved": "boolean",
|
|
558
|
+
"references": {}
|
|
559
|
+
},
|
|
560
|
+
"required": false,
|
|
561
|
+
"optional": true,
|
|
562
|
+
"docs": {
|
|
563
|
+
"tags": [],
|
|
564
|
+
"text": "the input label position: available for checkbox, radio"
|
|
565
|
+
},
|
|
566
|
+
"attribute": "labelafter",
|
|
567
|
+
"reflect": false,
|
|
568
|
+
"defaultValue": "true"
|
|
569
|
+
},
|
|
570
|
+
"typingtimeout": {
|
|
571
|
+
"type": "number",
|
|
572
|
+
"mutable": false,
|
|
573
|
+
"complexType": {
|
|
574
|
+
"original": "number",
|
|
575
|
+
"resolved": "number",
|
|
576
|
+
"references": {}
|
|
577
|
+
},
|
|
578
|
+
"required": false,
|
|
579
|
+
"optional": true,
|
|
580
|
+
"docs": {
|
|
581
|
+
"tags": [],
|
|
582
|
+
"text": "timeout setting before trigger `inputChange` event (optional): available for text, textarea"
|
|
583
|
+
},
|
|
584
|
+
"attribute": "typingtimeout",
|
|
585
|
+
"reflect": false,
|
|
586
|
+
"defaultValue": "300"
|
|
587
|
+
},
|
|
588
|
+
"items": {
|
|
589
|
+
"type": "string",
|
|
590
|
+
"mutable": false,
|
|
591
|
+
"complexType": {
|
|
592
|
+
"original": "SelectItemBean[] | string",
|
|
593
|
+
"resolved": "SelectItemBean[] | string",
|
|
594
|
+
"references": {
|
|
595
|
+
"SelectItemBean": {
|
|
596
|
+
"location": "import",
|
|
597
|
+
"path": "../../beans"
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
"required": false,
|
|
602
|
+
"optional": true,
|
|
603
|
+
"docs": {
|
|
604
|
+
"tags": [],
|
|
605
|
+
"text": "items (optional): available for select"
|
|
606
|
+
},
|
|
607
|
+
"attribute": "items",
|
|
608
|
+
"reflect": false
|
|
609
|
+
},
|
|
610
|
+
"autocomplete": {
|
|
611
|
+
"type": "any",
|
|
612
|
+
"mutable": false,
|
|
613
|
+
"complexType": {
|
|
614
|
+
"original": "boolean | string",
|
|
615
|
+
"resolved": "boolean | string",
|
|
616
|
+
"references": {}
|
|
617
|
+
},
|
|
618
|
+
"required": false,
|
|
619
|
+
"optional": true,
|
|
620
|
+
"docs": {
|
|
621
|
+
"tags": [],
|
|
622
|
+
"text": "the input has autocomplete option (optional): available for select, input"
|
|
623
|
+
},
|
|
624
|
+
"attribute": "autocomplete",
|
|
625
|
+
"reflect": false
|
|
626
|
+
},
|
|
627
|
+
"multiple": {
|
|
628
|
+
"type": "boolean",
|
|
629
|
+
"mutable": false,
|
|
630
|
+
"complexType": {
|
|
631
|
+
"original": "boolean",
|
|
632
|
+
"resolved": "boolean",
|
|
633
|
+
"references": {}
|
|
634
|
+
},
|
|
635
|
+
"required": false,
|
|
636
|
+
"optional": true,
|
|
637
|
+
"docs": {
|
|
638
|
+
"tags": [],
|
|
639
|
+
"text": "multiple options can be selected (optional): available for select"
|
|
640
|
+
},
|
|
641
|
+
"attribute": "multiple",
|
|
642
|
+
"reflect": false,
|
|
643
|
+
"defaultValue": "false"
|
|
644
|
+
},
|
|
645
|
+
"hasclearicon": {
|
|
646
|
+
"type": "boolean",
|
|
647
|
+
"mutable": false,
|
|
648
|
+
"complexType": {
|
|
649
|
+
"original": "boolean",
|
|
650
|
+
"resolved": "boolean",
|
|
651
|
+
"references": {}
|
|
652
|
+
},
|
|
653
|
+
"required": false,
|
|
654
|
+
"optional": true,
|
|
655
|
+
"docs": {
|
|
656
|
+
"tags": [],
|
|
657
|
+
"text": "render clear icon when typing (optional): available for text"
|
|
658
|
+
},
|
|
659
|
+
"attribute": "hasclearicon",
|
|
660
|
+
"reflect": false,
|
|
661
|
+
"defaultValue": "true"
|
|
662
|
+
},
|
|
663
|
+
"icon": {
|
|
664
|
+
"type": "string",
|
|
665
|
+
"mutable": false,
|
|
666
|
+
"complexType": {
|
|
667
|
+
"original": "string",
|
|
668
|
+
"resolved": "string",
|
|
669
|
+
"references": {}
|
|
670
|
+
},
|
|
671
|
+
"required": false,
|
|
672
|
+
"optional": true,
|
|
673
|
+
"docs": {
|
|
674
|
+
"tags": [],
|
|
675
|
+
"text": "render icon (optional): available for text, select"
|
|
676
|
+
},
|
|
677
|
+
"attribute": "icon",
|
|
678
|
+
"reflect": false
|
|
679
|
+
}
|
|
680
|
+
}; }
|
|
681
|
+
static get states() { return {
|
|
682
|
+
"isTyping": {},
|
|
683
|
+
"textareaWrapperHover": {},
|
|
684
|
+
"textareaWrapperFocus": {},
|
|
685
|
+
"passwordHidden": {}
|
|
686
|
+
}; }
|
|
687
|
+
static get events() { return [{
|
|
688
|
+
"method": "inputChange",
|
|
689
|
+
"name": "inputChange",
|
|
690
|
+
"bubbles": true,
|
|
691
|
+
"cancelable": true,
|
|
692
|
+
"composed": true,
|
|
693
|
+
"docs": {
|
|
694
|
+
"tags": [],
|
|
695
|
+
"text": "Emitted on input value change, returns value, keycode, validity"
|
|
696
|
+
},
|
|
697
|
+
"complexType": {
|
|
698
|
+
"original": "any",
|
|
699
|
+
"resolved": "any",
|
|
700
|
+
"references": {}
|
|
701
|
+
}
|
|
702
|
+
}, {
|
|
703
|
+
"method": "startTyping",
|
|
704
|
+
"name": "startTyping",
|
|
705
|
+
"bubbles": true,
|
|
706
|
+
"cancelable": true,
|
|
707
|
+
"composed": true,
|
|
708
|
+
"docs": {
|
|
709
|
+
"tags": [],
|
|
710
|
+
"text": "Emitted when user starts typing"
|
|
711
|
+
},
|
|
712
|
+
"complexType": {
|
|
713
|
+
"original": "any",
|
|
714
|
+
"resolved": "any",
|
|
715
|
+
"references": {}
|
|
716
|
+
}
|
|
717
|
+
}, {
|
|
718
|
+
"method": "stopTyping",
|
|
719
|
+
"name": "stopTyping",
|
|
720
|
+
"bubbles": true,
|
|
721
|
+
"cancelable": true,
|
|
722
|
+
"composed": true,
|
|
723
|
+
"docs": {
|
|
724
|
+
"tags": [],
|
|
725
|
+
"text": "Emitted when user stops typing, returns value, validity"
|
|
726
|
+
},
|
|
727
|
+
"complexType": {
|
|
728
|
+
"original": "any",
|
|
729
|
+
"resolved": "any",
|
|
730
|
+
"references": {}
|
|
731
|
+
}
|
|
732
|
+
}, {
|
|
733
|
+
"method": "inputCheck",
|
|
734
|
+
"name": "inputCheck",
|
|
735
|
+
"bubbles": true,
|
|
736
|
+
"cancelable": true,
|
|
737
|
+
"composed": true,
|
|
738
|
+
"docs": {
|
|
739
|
+
"tags": [],
|
|
740
|
+
"text": "Emitted on checkbox check/uncheck, returns id, checked, type, name, value, validity"
|
|
741
|
+
},
|
|
742
|
+
"complexType": {
|
|
743
|
+
"original": "any",
|
|
744
|
+
"resolved": "any",
|
|
745
|
+
"references": {}
|
|
746
|
+
}
|
|
747
|
+
}, {
|
|
748
|
+
"method": "optionSelect",
|
|
749
|
+
"name": "optionSelect",
|
|
750
|
+
"bubbles": true,
|
|
751
|
+
"cancelable": true,
|
|
752
|
+
"composed": true,
|
|
753
|
+
"docs": {
|
|
754
|
+
"tags": [],
|
|
755
|
+
"text": "Emitted on select option selection, returns select id, selected item id (or array of selected items ids if multiple)"
|
|
756
|
+
},
|
|
757
|
+
"complexType": {
|
|
758
|
+
"original": "any",
|
|
759
|
+
"resolved": "any",
|
|
760
|
+
"references": {}
|
|
761
|
+
}
|
|
762
|
+
}]; }
|
|
763
|
+
static get methods() { return {
|
|
764
|
+
"getValue": {
|
|
765
|
+
"complexType": {
|
|
766
|
+
"signature": "() => Promise<string | string[]>",
|
|
767
|
+
"parameters": [],
|
|
768
|
+
"references": {
|
|
769
|
+
"Promise": {
|
|
770
|
+
"location": "global"
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
"return": "Promise<string | string[]>"
|
|
774
|
+
},
|
|
775
|
+
"docs": {
|
|
776
|
+
"text": "get the input value",
|
|
777
|
+
"tags": []
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
"setValue": {
|
|
781
|
+
"complexType": {
|
|
782
|
+
"signature": "(value: string | string[]) => Promise<void>",
|
|
783
|
+
"parameters": [{
|
|
784
|
+
"tags": [],
|
|
785
|
+
"text": ""
|
|
786
|
+
}],
|
|
787
|
+
"references": {
|
|
788
|
+
"Promise": {
|
|
789
|
+
"location": "global"
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
"return": "Promise<void>"
|
|
793
|
+
},
|
|
794
|
+
"docs": {
|
|
795
|
+
"text": "set the input value",
|
|
796
|
+
"tags": []
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
"isChecked": {
|
|
800
|
+
"complexType": {
|
|
801
|
+
"signature": "() => Promise<boolean>",
|
|
802
|
+
"parameters": [],
|
|
803
|
+
"references": {
|
|
804
|
+
"Promise": {
|
|
805
|
+
"location": "global"
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"return": "Promise<boolean>"
|
|
809
|
+
},
|
|
810
|
+
"docs": {
|
|
811
|
+
"text": "get checked status",
|
|
812
|
+
"tags": []
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}; }
|
|
816
|
+
static get elementRef() { return "hostElement"; }
|
|
817
|
+
static get listeners() { return [{
|
|
818
|
+
"name": "inputCheck",
|
|
819
|
+
"method": "inputCheckListener",
|
|
820
|
+
"target": "document",
|
|
821
|
+
"capture": false,
|
|
822
|
+
"passive": false
|
|
823
|
+
}]; }
|
|
824
|
+
}
|