@globalpayments/vega 2.57.0 → 2.58.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/dist/cjs/card-config-2ee5505e.js +65 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-92ab034f.js → string-input-formatter-slimmer-dc1747ad.js} +20 -1
- package/dist/cjs/vega-calendar_3.cjs.entry.js +197 -114
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +28 -4
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +20 -116
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +1 -1
- package/dist/cjs/vega-input-select.cjs.entry.js +6 -3
- package/dist/cjs/vega-input.cjs.entry.js +194 -2
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +26 -2
- package/dist/cjs/vega.cjs.js +1 -1
- package/dist/collection/components/vega-calendar/slimmers/common/controllers/vega-calendar-post-operation-date-controller.js +48 -0
- package/dist/collection/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.js +8 -2
- package/dist/collection/components/vega-calendar/vega-calendar.js +42 -1
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +27 -3
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.css +6 -0
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +25 -2
- package/dist/collection/components/vega-input/vega-input.js +1 -1
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +13 -52
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.css +4 -0
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +5 -2
- package/dist/collection/components/vega-input-select/vega-input-select.css +0 -3
- package/dist/collection/components/vega-selection-tile/slimmers/controllers/vega-selection-tile-state-controller.js +7 -0
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +37 -0
- package/dist/collection/components/vega-selection-tile/vega-selection-tile.css +12 -0
- package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +7 -2
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +1 -1
- package/dist/collection/components/vega-table/vega-table.js +1 -1
- package/dist/collection/constants/card-config.js +4 -4
- package/dist/collection/helpers/calendar/calendar-period/month-period.js +15 -1
- package/dist/collection/helpers/calendar/calendar-period/week-period.js +6 -7
- package/dist/collection/helpers/calendar/test/calendar-period/month-period.test.js +12 -4
- package/dist/collection/helpers/calendar/test/calendar-period/week-period.test.js +2 -2
- package/dist/collection/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.js +74 -0
- package/dist/collection/helpers/formatter/string-formatter/credit-card-input-mask-strategy.js +34 -0
- package/dist/collection/helpers/formatter/string-formatter/credit-card-mask-strategy.abstract.js +63 -0
- package/dist/collection/helpers/formatter/string-formatter/string-format-strategy.abstract.js +4 -1
- package/dist/collection/helpers/formatter/string-formatter/string-mask-strategy.js +8 -0
- package/dist/collection/helpers/slimmers/string-input-formatter-slimmer.js +8 -0
- package/dist/esm/{app-globals-366415b3.js → app-globals-ee6a1250.js} +3 -3
- package/dist/esm/card-config-d2ad484e.js +63 -0
- package/dist/esm/{code-block-73869a3c.js → code-block-7bd4cb87.js} +1 -1
- package/dist/esm/{component-value-history-controller-slimmer.abstract-dfe89c93.js → component-value-history-controller-slimmer.abstract-41c58caf.js} +2 -2
- package/dist/esm/{content-state-953906e8.js → content-state-a43e703e.js} +1 -1
- package/dist/esm/{design-token-28a0a2e6.js → design-token-23522f5c.js} +1 -1
- package/dist/esm/{element-appender-slimmer-7b9f4a8e.js → element-appender-slimmer-042df95a.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-707a6da2.js → form-field-controller-slimmer-f0982f11.js} +2 -2
- package/dist/esm/{image-annotation-action-5bfda07c.js → image-annotation-action-1e88f5a0.js} +1 -1
- package/dist/esm/{index-3e551cbe.js → index-fb3b74bd.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{public-rules-c5d2c1e1.js → public-rules-287d4d77.js} +4 -4
- package/dist/esm/{responsive-format-facade-60731164.js → responsive-format-facade-d2632288.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-4429066e.js → rich-text-editor-required-rule-69d5f035.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-6ab5cad6.js → string-input-formatter-slimmer-09478e0d.js} +23 -4
- package/dist/esm/{style-formatter-57fc600a.js → style-formatter-f7951677.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-1c4d1e78.js → sub-state-notify-slimmer-0a6c3cbb.js} +1 -1
- package/dist/esm/{sub-state-observer-slimmer-1e9af9ec.js → sub-state-observer-slimmer-53eec5fb.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +5 -5
- package/dist/esm/vega-app-header-button.entry.js +5 -5
- package/dist/esm/vega-box.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +5 -5
- package/dist/esm/vega-button-group_2.entry.js +3 -3
- package/dist/esm/vega-button.entry.js +4 -4
- package/dist/esm/vega-calendar_3.entry.js +200 -117
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +4 -4
- package/dist/esm/vega-checkbox_2.entry.js +3 -3
- package/dist/esm/vega-chip.entry.js +5 -5
- package/dist/esm/vega-code-block.entry.js +3 -3
- package/dist/esm/vega-color-picker.entry.js +3 -3
- package/dist/esm/vega-combo-box.entry.js +3 -3
- package/dist/esm/vega-date-picker_2.entry.js +9 -9
- package/dist/esm/vega-dialog_2.entry.js +5 -5
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +35 -11
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-flag-icon.entry.js +5 -5
- package/dist/esm/vega-flex.entry.js +6 -6
- package/dist/esm/vega-font.entry.js +5 -5
- package/dist/esm/vega-form.entry.js +4 -4
- package/dist/esm/vega-grid.entry.js +5 -5
- package/dist/esm/vega-icon.entry.js +5 -5
- package/dist/esm/vega-image-uploader.entry.js +6 -6
- package/dist/esm/vega-input-credit-card.entry.js +21 -117
- package/dist/esm/vega-input-numeric.entry.js +4 -4
- package/dist/esm/vega-input-phone-number.entry.js +6 -6
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +12 -9
- package/dist/esm/vega-input.entry.js +198 -6
- package/dist/esm/{vega-internal-event-id-f0ea2bab.js → vega-internal-event-id-4072659b.js} +1 -1
- package/dist/esm/vega-left-nav_5.entry.js +7 -7
- package/dist/esm/vega-loader-wrapper_2.entry.js +4 -4
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +1 -1
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +1 -1
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-popover_2.entry.js +5 -5
- package/dist/esm/vega-radio_2.entry.js +3 -3
- package/dist/esm/vega-rich-text-content.entry.js +6 -6
- package/dist/esm/vega-rich-text-editor_4.entry.js +10 -10
- package/dist/esm/vega-selection-chip_2.entry.js +7 -7
- package/dist/esm/vega-selection-tile_2.entry.js +30 -6
- package/dist/esm/vega-sidenav_3.entry.js +6 -6
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-stepper.entry.js +3 -3
- package/dist/esm/vega-table_8.entry.js +6 -6
- package/dist/esm/vega-textarea.entry.js +3 -3
- package/dist/esm/vega-time-picker_2.entry.js +7 -7
- package/dist/esm/vega-toggle-switch.entry.js +3 -3
- package/dist/esm/vega-tooltip_2.entry.js +5 -5
- package/dist/esm/vega.js +6 -6
- package/dist/types/components/vega-calendar/slimmers/common/controllers/vega-calendar-post-operation-date-controller.d.ts +23 -0
- package/dist/types/components/vega-calendar/slimmers/common/renderers/vega-calendar-switch-panel.d.ts +2 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +15 -1
- package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +4 -0
- package/dist/types/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.d.ts +7 -0
- package/dist/types/components/vega-input/types.d.ts +10 -1
- package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +1 -13
- package/dist/types/components/vega-selection-tile/slimmers/controllers/vega-selection-tile-state-controller.d.ts +1 -0
- package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +8 -0
- package/dist/types/components/vega-selection-tile/vega-selection-tile.d.ts +4 -0
- package/dist/types/components/vega-table/interface.d.ts +18 -11
- package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +1 -1
- package/dist/types/components/vega-table/vega-table.d.ts +1 -1
- package/dist/types/components.d.ts +24 -4
- package/dist/types/helpers/calendar/calendar-period/calendar-period.abstract.d.ts +3 -3
- package/dist/types/helpers/calendar/calendar-period/month-period.d.ts +7 -1
- package/dist/types/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.d.ts +28 -0
- package/dist/types/helpers/formatter/string-formatter/credit-card-input-mask-strategy.d.ts +21 -0
- package/dist/types/helpers/formatter/string-formatter/credit-card-mask-strategy.abstract.d.ts +36 -0
- package/dist/types/helpers/formatter/string-formatter/string-format-strategy.abstract.d.ts +1 -1
- package/dist/types/helpers/formatter/string-formatter/string-mask-strategy.d.ts +9 -3
- package/dist/types/helpers/slimmers/string-input-formatter-slimmer.d.ts +4 -0
- package/dist/types/types/public-api.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-6acf0a51.entry.js → p-083af15f.entry.js} +1 -1
- package/dist/vega/{p-75ff12da.entry.js → p-091ab617.entry.js} +1 -1
- package/dist/vega/{p-47e89c0e.entry.js → p-0b5330e1.entry.js} +1 -1
- package/dist/vega/{p-f4a7acff.entry.js → p-1a4f77de.entry.js} +1 -1
- package/dist/vega/{p-21a7530c.entry.js → p-1a6dacc7.entry.js} +1 -1
- package/dist/vega/{p-2ebef70f.entry.js → p-1db2ba98.entry.js} +1 -1
- package/dist/vega/{p-e277ea73.entry.js → p-1f9a735a.entry.js} +1 -1
- package/dist/vega/{p-44880bdf.entry.js → p-24042f0c.entry.js} +1 -1
- package/dist/vega/{p-e28fcf04.entry.js → p-27a9ad35.entry.js} +1 -1
- package/dist/vega/{p-0496f1cb.entry.js → p-27ec0c07.entry.js} +1 -1
- package/dist/vega/{p-27dca371.entry.js → p-317920e6.entry.js} +1 -1
- package/dist/vega/{p-a2ef3429.entry.js → p-376b3ec7.entry.js} +1 -1
- package/dist/vega/{p-dc16e6ba.entry.js → p-394594e9.entry.js} +1 -1
- package/dist/vega/{p-8fb5bcb0.entry.js → p-42ec43ef.entry.js} +1 -1
- package/dist/vega/{p-6e1b5949.js → p-43263510.js} +1 -1
- package/dist/vega/{p-29f4cbed.entry.js → p-435451be.entry.js} +1 -1
- package/dist/vega/p-472108bd.entry.js +1 -0
- package/dist/vega/{p-6131f229.entry.js → p-48ae6f02.entry.js} +1 -1
- package/dist/vega/{p-1c4d05de.entry.js → p-48b24fd3.entry.js} +1 -1
- package/dist/vega/{p-fb8c99c5.js → p-4a237308.js} +1 -1
- package/dist/vega/{p-5dec9bd9.entry.js → p-4ab67150.entry.js} +1 -1
- package/dist/vega/{p-d82ceacf.entry.js → p-4c4ac1a5.entry.js} +1 -1
- package/dist/vega/p-4fb159d5.js +1 -0
- package/dist/vega/p-5bd3487e.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-39049341.entry.js → p-5fe47fe8.entry.js} +1 -1
- package/dist/vega/{p-d5ab867e.entry.js → p-61ea2d75.entry.js} +1 -1
- package/dist/vega/{p-e32efc2e.entry.js → p-63adca7b.entry.js} +1 -1
- package/dist/vega/{p-7c0004dc.entry.js → p-699032fc.entry.js} +1 -1
- package/dist/vega/{p-0b77c6c9.entry.js → p-710da484.entry.js} +1 -1
- package/dist/vega/{p-007bf7df.js → p-71c65f7e.js} +1 -1
- package/dist/vega/{p-a92a8172.entry.js → p-81279fea.entry.js} +1 -1
- package/dist/vega/{p-ecd032fc.js → p-8782abeb.js} +1 -1
- package/dist/vega/p-88e08a33.js +1 -0
- package/dist/vega/{p-4f5eb8d5.js → p-8c4f893b.js} +1 -1
- package/dist/vega/p-8e2b1dae.entry.js +1 -0
- package/dist/vega/{p-2873b600.entry.js → p-8f8de5ab.entry.js} +1 -1
- package/dist/vega/p-92355996.entry.js +1 -0
- package/dist/vega/p-9540e3ed.entry.js +1 -0
- package/dist/vega/p-997a2064.entry.js +1 -0
- package/dist/vega/{p-ce14af16.js → p-9a956a00.js} +1 -1
- package/dist/vega/{p-fcb04960.js → p-9afdcf65.js} +1 -1
- package/dist/vega/p-9b08ed46.entry.js +1 -0
- package/dist/vega/{p-b44ebc84.entry.js → p-9ce0bd82.entry.js} +1 -1
- package/dist/vega/{p-f8f8e7d2.entry.js → p-a04491cc.entry.js} +1 -1
- package/dist/vega/{p-99c4559e.entry.js → p-a1056063.entry.js} +1 -1
- package/dist/vega/{p-b449fe9a.entry.js → p-a4a0fcfd.entry.js} +1 -1
- package/dist/vega/{p-f79c82c7.entry.js → p-a7042a5a.entry.js} +1 -1
- package/dist/vega/p-acf7667e.entry.js +1 -0
- package/dist/vega/{p-8ba8a7cc.entry.js → p-b21b128c.entry.js} +1 -1
- package/dist/vega/{p-766ed063.entry.js → p-b75a8edb.entry.js} +1 -1
- package/dist/vega/{p-1e3f4007.entry.js → p-c21295cf.entry.js} +1 -1
- package/dist/vega/{p-5130bb06.entry.js → p-c69a6547.entry.js} +1 -1
- package/dist/vega/{p-79c2282c.entry.js → p-c9740710.entry.js} +1 -1
- package/dist/vega/{p-f4546425.entry.js → p-ce5a3589.entry.js} +1 -1
- package/dist/vega/{p-cd3d468c.js → p-d1355307.js} +1 -1
- package/dist/vega/{p-07927476.entry.js → p-d661a5aa.entry.js} +1 -1
- package/dist/vega/{p-8246f8ae.js → p-d7e0c57a.js} +1 -1
- package/dist/vega/p-e1ed78db.js +1 -0
- package/dist/vega/{p-34643550.entry.js → p-ef84dc90.entry.js} +1 -1
- package/dist/vega/{p-2458ad97.js → p-f229d6d1.js} +1 -1
- package/dist/vega/{p-fd2f699b.js → p-f25570f5.js} +1 -1
- package/dist/vega/{p-888dc143.entry.js → p-f27fcc7c.entry.js} +1 -1
- package/dist/vega/{p-f3f7d059.entry.js → p-f543e911.entry.js} +1 -1
- package/dist/vega/{p-65d8c2bc.js → p-f5ac60f5.js} +1 -1
- package/dist/vega/{p-bdaf1143.entry.js → p-f7b5833d.entry.js} +1 -1
- package/dist/vega/p-fc02a67a.js +1 -0
- package/dist/vega/{p-a33c6652.entry.js → p-fcb5b40f.entry.js} +1 -1
- package/dist/vega/{p-aed3320d.js → p-fda6f8bc.js} +1 -1
- package/dist/vega/{p-e5196440.entry.js → p-fe1512f9.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-0604563a.entry.js +0 -1
- package/dist/vega/p-3a7e897b.entry.js +0 -1
- package/dist/vega/p-51297b96.js +0 -1
- package/dist/vega/p-51a4dc20.entry.js +0 -1
- package/dist/vega/p-53e9595f.js +0 -1
- package/dist/vega/p-6ec338b0.entry.js +0 -1
- package/dist/vega/p-76818196.entry.js +0 -1
- package/dist/vega/p-79a0a06c.js +0 -1
- package/dist/vega/p-9481c073.entry.js +0 -1
- package/dist/vega/p-b8d7d4a9.js +0 -1
- package/dist/vega/p-f8e0e4f0.entry.js +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Nullable } from '../../../types/general';
|
|
2
|
+
import { MaskConfigType } from '../../../components/vega-input/types';
|
|
3
|
+
import { CreditCardMaskStrategy } from './credit-card-mask-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* A class for formatting string with the given mask format
|
|
6
|
+
*
|
|
7
|
+
* @augments StringFormatStrategy
|
|
8
|
+
*/
|
|
9
|
+
export declare class CreditCardBlurMaskStrategy extends CreditCardMaskStrategy {
|
|
10
|
+
private hideCardNumberOnBlur;
|
|
11
|
+
/**
|
|
12
|
+
* It creates a new instance of the Mask class.
|
|
13
|
+
*
|
|
14
|
+
* @param {boolean} hideCardNumberOnBlur - boolean
|
|
15
|
+
*/
|
|
16
|
+
constructor(hideCardNumberOnBlur: boolean);
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
protected getCreditCardMaskConfig(value: string): Nullable<MaskConfigType>;
|
|
21
|
+
/**
|
|
22
|
+
* Transform the input card number with dynamic card number mask, for example: '4111 2222 3333 44' will be transformed to 'XXXX XXXX XXXX 99'
|
|
23
|
+
*
|
|
24
|
+
* @param {string} value - card number string
|
|
25
|
+
* @returns {MaskConfigType} - mask config type
|
|
26
|
+
*/
|
|
27
|
+
private generateDynamicMask;
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Nullable } from '../../../types/general';
|
|
2
|
+
import { MaskConfigType } from '../../../components/vega-input/types';
|
|
3
|
+
import { CreditCardMaskStrategy } from './credit-card-mask-strategy.abstract';
|
|
4
|
+
/**
|
|
5
|
+
* A class for formatting string with the given mask format
|
|
6
|
+
*
|
|
7
|
+
* @augments StringFormatStrategy
|
|
8
|
+
*/
|
|
9
|
+
export declare class CreditCardInputMaskStrategy extends CreditCardMaskStrategy {
|
|
10
|
+
/**
|
|
11
|
+
* It creates a new instance of the Mask class.
|
|
12
|
+
*/
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* get credit card mask config
|
|
16
|
+
*
|
|
17
|
+
* @param {string} value - card number string
|
|
18
|
+
* @returns {Nullable<MaskConfigType>} - mask config type
|
|
19
|
+
*/
|
|
20
|
+
protected getCreditCardMaskConfig(value: string): Nullable<MaskConfigType>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MaskConfigType } from '../../../components/vega-input/types';
|
|
2
|
+
import { CardConfigType } from '../../../constants/card-config';
|
|
3
|
+
import { Nullable } from '../../../types/general';
|
|
4
|
+
import { InputStatus } from './string-format-strategy.abstract';
|
|
5
|
+
import { StringMaskStrategy } from './string-mask-strategy';
|
|
6
|
+
/**
|
|
7
|
+
* Credit card mask strategy abstract class
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class CreditCardMaskStrategy extends StringMaskStrategy {
|
|
10
|
+
/**
|
|
11
|
+
* Get the position of caret
|
|
12
|
+
*
|
|
13
|
+
* @param {string} input - The input string
|
|
14
|
+
* @param {number} caretPosition - The current position of caret
|
|
15
|
+
* @returns {Nullable<number>} The new position of caret
|
|
16
|
+
*/
|
|
17
|
+
calculateCaretPosition(input: string, caretPosition: Nullable<number>): Nullable<number>;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
format(input: string, inputStatus?: InputStatus): string;
|
|
22
|
+
/**
|
|
23
|
+
* get credit card type
|
|
24
|
+
*
|
|
25
|
+
* @param {string} value - card number string
|
|
26
|
+
* @returns {CardConfigType} - card type config
|
|
27
|
+
*/
|
|
28
|
+
protected getCreditCardType(value: string): CardConfigType;
|
|
29
|
+
/**
|
|
30
|
+
* get credit card mask config
|
|
31
|
+
*
|
|
32
|
+
* @param {string} value - card number string
|
|
33
|
+
* @returns {Nullable<MaskConfigType>} - mask config type
|
|
34
|
+
*/
|
|
35
|
+
protected abstract getCreditCardMaskConfig(value: string): Nullable<MaskConfigType>;
|
|
36
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Nullable } from '../../../types/general';
|
|
2
|
-
export declare type FormatTrigger = 'blur' | 'input' | 'init';
|
|
2
|
+
export declare type FormatTrigger = 'blur' | 'change' | 'input' | 'init';
|
|
3
3
|
export declare type FormatTarget = 'component' | 'native-input';
|
|
4
4
|
export declare type InputStatus = {
|
|
5
5
|
isBlurred?: boolean;
|
|
@@ -38,6 +38,12 @@ export declare class StringMaskStrategy extends StringFormatStrategy {
|
|
|
38
38
|
* @param {MaskConfig} maskConfig - MaskConfig
|
|
39
39
|
*/
|
|
40
40
|
constructor(maskConfig: MaskConfig);
|
|
41
|
+
/**
|
|
42
|
+
* Set the mask config
|
|
43
|
+
*
|
|
44
|
+
* @param {MaskConfig} maskConfig - MaskConfig
|
|
45
|
+
*/
|
|
46
|
+
setMaskConfig(maskConfig: MaskConfig): void;
|
|
41
47
|
/**
|
|
42
48
|
* @inheritDoc
|
|
43
49
|
*/
|
|
@@ -71,14 +77,14 @@ export declare class StringMaskStrategy extends StringFormatStrategy {
|
|
|
71
77
|
*
|
|
72
78
|
* @returns {number} the max limit length
|
|
73
79
|
*/
|
|
74
|
-
|
|
80
|
+
protected getLengthLimit(): number;
|
|
75
81
|
/**
|
|
76
82
|
* Given a string, return an array of all the digits in that string
|
|
77
83
|
*
|
|
78
84
|
* @param {string} input - The input string to be parsed.
|
|
79
85
|
* @returns {string[]} - An array of strings.
|
|
80
86
|
*/
|
|
81
|
-
|
|
87
|
+
protected getMatchedInputSlotValue(input: string): string[];
|
|
82
88
|
/**
|
|
83
89
|
* Replace the mask with the matched input slots
|
|
84
90
|
*
|
|
@@ -86,5 +92,5 @@ export declare class StringMaskStrategy extends StringFormatStrategy {
|
|
|
86
92
|
* @param {string[]} matchedInputSlot - an array of the input slots that were matched by the mask.
|
|
87
93
|
* @returns {string} The result string builder.
|
|
88
94
|
*/
|
|
89
|
-
|
|
95
|
+
protected replaceMaskWithMatchedInputSlots(input: string, matchedInputSlot: string[]): string;
|
|
90
96
|
}
|
|
@@ -23,6 +23,10 @@ export declare abstract class StringInputFormatterSlimmer extends VegaSlimmer {
|
|
|
23
23
|
* It removes the event listener from the input element.
|
|
24
24
|
*/
|
|
25
25
|
destroy(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Format string and update input field
|
|
28
|
+
*/
|
|
29
|
+
formatValueAfterValueChange(): void;
|
|
26
30
|
/**
|
|
27
31
|
* Format the value by input strategy and blur strategy when formatter config change.
|
|
28
32
|
*/
|
|
@@ -41,3 +41,4 @@ export { CssStates, FlexDirections, BoxDisplay } from '../constants/ui';
|
|
|
41
41
|
export { Breakpoints } from '../constants/tokens/breakpoints';
|
|
42
42
|
export { GridColumns, GridRows } from '../constants/tokens/tailwind.extend';
|
|
43
43
|
export { CodeLanguage } from '../components/vega-code-block/types';
|
|
44
|
+
export { VegaTableColumnGroupingModel, VegaTableColumnGroupingLeafModel, } from '../components/vega-table/interface';
|
package/dist/vega/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getCurrentBreakpoint}from"./p-7d9cd9c8.js";export{L as LogUtility,s as setVegaLogLevel}from"./p-6e1ab235.js";export{d as formatAndValidBackgroundColor,e as formatAndValidBorderColor,g as formatAndValidBorderRadius,c as formatAndValidBreakpointSize,a as formatAndValidGap,h as formatAndValidPadding,f as formatAndValidResponsiveToken,b as formatAndValidShadow,i as formatAndValidTextColor}from"./p-
|
|
1
|
+
export{g as getCurrentBreakpoint}from"./p-7d9cd9c8.js";export{L as LogUtility,s as setVegaLogLevel}from"./p-6e1ab235.js";export{d as formatAndValidBackgroundColor,e as formatAndValidBorderColor,g as formatAndValidBorderRadius,c as formatAndValidBreakpointSize,a as formatAndValidGap,h as formatAndValidPadding,f as formatAndValidResponsiveToken,b as formatAndValidShadow,i as formatAndValidTextColor}from"./p-fda6f8bc.js";export{c as camelToDashCase}from"./p-0bb29d98.js";export{d as BackgroundColorMap,a as BackgroundColors,e as BorderColorMap,b as BorderColors,B as BorderRadius,C as Colors,F as FillBackgroundColors,g as ShadowMap,f as Shadows,h as Spacing,S as StrokeBackgroundColors,c as TextColorMap,T as TextColors}from"./p-5e2c9e69.js";export{B as Breakpoints}from"./p-ed45b3b6.js";export{I as Icons,g as getIconFromToken}from"./p-16493e5b.js";export{b as Typography,a as TypographyKeys,T as TypographyUrls}from"./p-d884c644.js";export{e as BoxDisplay,B as BreakpointKeys,C as CssStates,F as FlexDirections}from"./p-74168615.js";export{F as FrameworkEnum,v as VegaEnvManager}from"./p-5f377954.js";export{c as VegaDialog,d as VegaEventManager,V as VegaLoader,a as VegaNotify,f as VegaSkeletonLoader,b as VegaThemeManager,e as VegaZIndexManager}from"./p-bcdb235d.js";export{F as FeatureFlag}from"./p-e77a83e4.js";export{B as VegaJQueryDelegatedEventStrategy}from"./p-613ee009.js";export{V as VegaIconManager}from"./p-8c46e116.js";export{V as ValidCreditCardNumberRule}from"./p-6f90d444.js";export{w as waitForVega}from"./p-e1ed78db.js";export{a as VegaTranslation,s as VegaTranslationResourceEN}from"./p-9d6003ef.js";export{R as RTEImageBlock,b as RTEListBlock,a as RTEListItemBlock,V as VegaRTEContent}from"./p-88e08a33.js";export{M as ModifyContentAction,i as RTEBlock,a as RTEImageNode,v as RTENode,d as RTETextBlock,g as RTETextNode}from"./p-d7e0c57a.js";export{G as GridColumns,a as GridRows}from"./p-4a237308.js";export{C as CodeLanguage}from"./p-d1cb7f28.js";export{C as CheckBoxRequiredRule}from"./p-590fd123.js";export{D as DateRequiredRule}from"./p-8fae8f9e.js";export{I as InputPhoneNumberRequiredRule}from"./p-07c2725a.js";export{I as InputRangeRequiredRule}from"./p-f396c69a.js";export{R as RequiredFieldRule}from"./p-280cbcdb.js";export{R as RichTextEditorRequiredRule}from"./p-9afdcf65.js";export{T as TimeRangeRequiredRule,a as TimeRequiredRule}from"./p-924b4e24.js";export{T as ToggleSwitchRequiredRule}from"./p-7c0b4c36.js";export{F as FileUploaderRequiredRule}from"./p-0bb860cc.js";import"./p-b75ee3ba.js";import"./p-49fd1009.js";import"./p-3a0a4d15.js";import"./p-a4670e23.js";import"./p-6a334573.js";import"./p-d5776087.js";import"./p-0c8bd757.js";import"./p-5773a9a3.js";import"./p-2d0d575f.js";import"./p-331a62d5.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-db8cdba6.js";import"./p-6e01f0a2.js";import"./p-abd7aeaa.js";import"./p-5d676a94.js";import"./p-f5ac60f5.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-08835909.js";const o=["ring-input-focus","dark-ring-input-focus","ring-input-danger-focus","dark-ring-input-danger-focus","ring-action-focus","dark-ring-action-focus","ring-action-danger-focus","dark-ring-action-danger-focus"];export{o as Rings}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as o,H as r,g as a}from"./p-21d26bb4.js";import{s as p}from"./p-519a7d55.js";import{I as s}from"./p-e940bc37.js";import{c as i,M as n,V as c,I as l}from"./p-6e1ab235.js";import{V as v,I as h}from"./p-d849e0f5.js";import{c as m}from"./p-012cbd8f.js";import{d as g,M as d,N as f}from"./p-6e01f0a2.js";import{E as b}from"./p-
|
|
1
|
+
import{h as e,r as t,c as o,H as r,g as a}from"./p-21d26bb4.js";import{s as p}from"./p-519a7d55.js";import{I as s}from"./p-e940bc37.js";import{c as i,M as n,V as c,I as l}from"./p-6e1ab235.js";import{V as v,I as h}from"./p-d849e0f5.js";import{c as m}from"./p-012cbd8f.js";import{d as g,M as d,N as f}from"./p-6e01f0a2.js";import{E as b}from"./p-f25570f5.js";import{r as w}from"./p-77e64f26.js";import{r as x}from"./p-f5ac60f5.js";import"./p-8e662f26.js";import"./p-d5776087.js";import"./p-5e2c9e69.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-6a334573.js";import"./p-2d0d575f.js";import"./p-e7b00bf0.js";import"./p-331a62d5.js";import"./p-613ee009.js";import"./p-b75ee3ba.js";import"./p-bcdb235d.js";import"./p-a4670e23.js";import"./p-7d9cd9c8.js";import"./p-0c8bd757.js";import"./p-5773a9a3.js";import"./p-112455b1.js";import"./p-262ec334.js";import"./p-4a237308.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-8c46e116.js";import"./p-5d676a94.js";import"./p-9d6003ef.js";import"./p-88e08a33.js";import"./p-d7e0c57a.js";var j=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};class u extends c{appendPopoverSlotContent(){const e=this.host.querySelector("[slot='popover']");e&&this.popoverContentBox.appendChild(e)}getPopoverContentBox(){return this.popoverContentBox}render(){return e("vega-popover-content-box",{ref:e=>this.popoverContentBox=e,showArrow:this.showArrow})}}j([i()],u.prototype,"host",void 0),j([i()],u.prototype,"showArrow",void 0),j([n("componentDidRender")],u.prototype,"appendPopoverSlotContent",null);var R=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};class y extends b{constructor(){super((()=>this.generateShowConfigFactory()),(()=>this.trigger),"isPopoverShow")}connectedCallback(){this.registerRemoteMethod()}disconnectedCallback(){w.unRegister(g.getSubject(this.host,x))}generateShowConfigFactory(){return{target:this.target||this.host,appendableElement:this.appenderRenderer.getPopoverContentBox(),positionRelativeTo:this.positionRelativeTo,matchTargetWidth:!1,size:this.size,placement:this.placement,alignment:this.alignment,isScreenPosition:this.isScreenPosition}}registerRemoteMethod(){w.register(g.getSubject(this.host,x),(e=>{this.target=e,super.updateShowConfigFactory(this.generateShowConfigFactory.bind(this))}))}}R([i()],y.prototype,"host",void 0),R([i()],y.prototype,"trigger",void 0),R([i()],y.prototype,"positionRelativeTo",void 0),R([i()],y.prototype,"placement",void 0),R([i()],y.prototype,"alignment",void 0),R([i()],y.prototype,"size",void 0),R([i()],y.prototype,"isScreenPosition",void 0),R([i({writable:!0})],y.prototype,"isPopoverShow",void 0),R([i()],y.prototype,"appenderRenderer",void 0),R([n("connectedCallback")],y.prototype,"connectedCallback",null),R([n("disconnectedCallback")],y.prototype,"disconnectedCallback",null);var S=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};const k=class{constructor(e){t(this,e),this.vegaPopoverShow=o(this,"vegaPopoverShow",7),this.popoverShow=o(this,"popoverShow",7),this.vegaPopoverHide=o(this,"vegaPopoverHide",7),this.popoverHide=o(this,"popoverHide",7),this.globalSlimmers={},this.appenderRenderer=new u,this.appenderController=new y,this.popoverShowEventEmitter=m(k,d),this.popoverHideEventEmitter=m(k,f),this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.isPopoverShow=!1,this.placement="top",this.alignment="center",this.trigger="click",this.showArrow=!0,this.isScreenPosition=!1,this.showPopover=()=>{this.appenderController.show()},this.hidePopover=()=>{this.appenderController.hide()}}async watchIsPopoverShow(){this.isPopoverShow?this.popoverShowEventEmitter.emit():this.popoverHideEventEmitter.emit()}watchToRefreshPopover(){this.isPopoverShow&&this.appenderController.show()}componentDidRender(){}async show(){this.isPopoverShow||this.showPopover()}async hide(){this.isPopoverShow&&this.hidePopover()}render(){return p(e(r,null,e("slot",{name:"popover-content"}),this.appenderRenderer.render()),this.host)}get host(){return a(this)}static get watchers(){return{isPopoverShow:["watchIsPopoverShow"],size:["watchToRefreshPopover"],placement:["watchToRefreshPopover"],alignment:["watchToRefreshPopover"]}}};S([h()],k.prototype,"globalSlimmers",void 0),S([l()],k.prototype,"appenderRenderer",void 0),S([l()],k.prototype,"appenderController",void 0),S([l()],k.prototype,"popoverShowEventEmitter",void 0),S([l()],k.prototype,"popoverHideEventEmitter",void 0),S([l()],k.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),S([s((e=>[{keyCode:"Escape",activeElementInScope:[e.host],callback:e.hidePopover},{keyCode:"Tab",activeElementOutScope:[e.host,e.appenderRenderer.getPopoverContentBox()],callback:e.hidePopover},{keyCode:"Tab",activeElementInScope:[e.host],callback:()=>{"hover"===e.trigger&&e.showPopover()}}]))],k.prototype,"host",void 0),k.style=":host{display:inline-block}";var C=function(e,t,o,r){var a,p=arguments.length,s=p<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(a=e[i])&&(s=(p<3?a(s):p>3?a(t,o,s):a(t,o))||s);return p>3&&s&&Object.defineProperty(t,o,s),s};const P=class{constructor(e){t(this,e),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new v,this.showArrow=!0}render(){return p(e(r,{class:{"vega-popover":!0,"no-arrow":!this.showArrow},role:"tooltip"},e("div",{class:"vega-popover-content"},e("slot",{name:"popover"}),this.showArrow&&e("div",{class:"vega-arrow"})),e("slot",null)),this.host)}get host(){return a(this)}};C([h()],P.prototype,"globalSlimmers",void 0),C([l()],P.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),P.style=':host{position:absolute}:host(.vega-force-hidden){display:none !important}.vega-popover-content{border-radius:8px;padding:16px;position:relative;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));box-shadow:var(--v-shadow-popover, 0px 0px 88px 0px rgba(2, 2, 15, 0.01), 0px 0px 32px 0px rgba(2, 2, 15, 0.02), 0px 4px 72px 0px rgba(2, 2, 15, 0.06))}.vega-popover-content .vega-arrow{position:absolute}.vega-popover-content .vega-arrow::after{display:inline-block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));content:"";border-right-width:0px;border-bottom-width:0px;border-radius:4px 1px 0 1px;transform:skewX(18deg);width:18px;height:17.12px;border-right-color:transparent;border-bottom-color:transparent}:host(.vega-placement-left) .vega-arrow{transform:rotate(144deg);right:-9px}:host(.vega-placement-left.vega-alignment-start) .vega-arrow{top:8px}:host(.vega-placement-left.vega-alignment-center) .vega-arrow{top:calc(50% - 14px)}:host(.vega-placement-left.vega-alignment-end) .vega-arrow{bottom:12px}:host(.vega-placement-right) .vega-arrow{transform:rotate(324deg);left:-9px}:host(.vega-placement-right.vega-alignment-start) .vega-arrow{top:12px}:host(.vega-placement-right.vega-alignment-center) .vega-arrow{top:calc(50% - 10px)}:host(.vega-placement-right.vega-alignment-end) .vega-arrow{bottom:8px}:host(.vega-placement-top) .vega-arrow{transform:rotate(234deg);bottom:-10.65px}:host(.vega-placement-top.vega-alignment-start) .vega-arrow{left:24px}:host(.vega-placement-top.vega-alignment-center) .vega-arrow{left:calc(50% - 9px)}:host(.vega-placement-top.vega-alignment-end) .vega-arrow{right:18px}:host(.vega-placement-bottom) .vega-arrow{transform:rotate(54deg);top:-10.65px}:host(.vega-placement-bottom.vega-alignment-start) .vega-arrow{left:18px}:host(.vega-placement-bottom.vega-alignment-center) .vega-arrow{left:calc(50% - 14px)}:host(.vega-placement-bottom.vega-alignment-end) .vega-arrow{right:24px}:host(.vega-placement-top){margin-top:-20px}:host(.vega-placement-bottom){margin-top:20px}:host(.vega-placement-right){margin-left:20px}:host(.vega-placement-left){margin-left:-20px}:host(.no-arrow.vega-placement-top){margin-top:-8px}:host(.no-arrow.vega-placement-bottom){margin-top:8px}:host(.no-arrow.vega-placement-right){margin-left:8px}:host(.no-arrow.vega-placement-left){margin-left:-8px}';export{k as vega_popover,P as vega_popover_content_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as s,g as o}from"./p-21d26bb4.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as p,M as n,I as l}from"./p-6e1ab235.js";import{V as c,I as h}from"./p-d849e0f5.js";import{D as f}from"./p-e7b00bf0.js";import{f as m}from"./p-6e01f0a2.js";import{C as d}from"./p-d789b291.js";import{c as u}from"./p-012cbd8f.js";import{b as v}from"./p-5773a9a3.js";import{C as j}from"./p-2d0d575f.js";import{K as b}from"./p-832b59af.js";import{c as w,b as x}from"./p-262ec334.js";import{F as y}from"./p-
|
|
1
|
+
import{h as t,r as e,c as i,H as s,g as o}from"./p-21d26bb4.js";import{s as r}from"./p-519a7d55.js";import{c as a,V as p,M as n,I as l}from"./p-6e1ab235.js";import{V as c,I as h}from"./p-d849e0f5.js";import{D as f}from"./p-e7b00bf0.js";import{f as m}from"./p-6e01f0a2.js";import{C as d}from"./p-d789b291.js";import{c as u}from"./p-012cbd8f.js";import{b as v}from"./p-5773a9a3.js";import{C as j}from"./p-2d0d575f.js";import{K as b}from"./p-832b59af.js";import{c as w,b as x}from"./p-262ec334.js";import{F as y}from"./p-43263510.js";import{R}from"./p-280cbcdb.js";import{c as C}from"./p-8c4f893b.js";import"./p-331a62d5.js";import"./p-d5776087.js";import"./p-613ee009.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-6a334573.js";import"./p-b75ee3ba.js";import"./p-8e662f26.js";import"./p-5e2c9e69.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-3a0a4d15.js";import"./p-d884c644.js";import"./p-0bb29d98.js";import"./p-a4670e23.js";import"./p-f5ac60f5.js";import"./p-9d6003ef.js";import"./p-7d9cd9c8.js";import"./p-abd7aeaa.js";import"./p-78a57a17.js";import"./p-52b8f2d2.js";import"./p-d27ae9ff.js";import"./p-8782abeb.js";var g=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class I extends p{constructor(){super(...arguments),this.onInputChange=t=>{this.valueController.updateValue(t.detail)}}getInputRef(){return this.vegaInputRef.shadowRoot.querySelector("input")}getContainerRef(){return this.vegaInputRef.shadowRoot.querySelector(".vega-input-container")}render(){const e={thousandComma:this.thousandComma};return this.integerOnly&&(e.precision=0),t("vega-input",{value:this.value||"",showClearIcon:this.showClearIcon,disabled:this.disabled,label:this.label,hint:this.hint,required:this.required,type:"number",placeholder:this.placeholder,size:"small"===this.size?"small":"default",prefixIcon:this.prefixIcon,ref:t=>{this.vegaInputRef=t,f.addUniqueObserverToNode(t,m,(t=>this.onInputChange(t)))},maskConfig:{type:"number",options:e}})}}g([a()],I.prototype,"prefixIcon",void 0),g([a()],I.prototype,"showClearIcon",void 0),g([a()],I.prototype,"value",void 0),g([a()],I.prototype,"size",void 0),g([a()],I.prototype,"disabled",void 0),g([a()],I.prototype,"placeholder",void 0),g([a()],I.prototype,"label",void 0),g([a()],I.prototype,"hint",void 0),g([a()],I.prototype,"required",void 0),g([a()],I.prototype,"thousandComma",void 0),g([a()],I.prototype,"integerOnly",void 0),g([a()],I.prototype,"valueController",void 0);var T=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class V extends p{watchValue(){this.changeEventEmitter.emit(this.value),j.notify(v,{host:this.host,detail:this.value})}updateValue(t){this.value=t}}T([a()],V.prototype,"host",void 0),T([a({writable:!0})],V.prototype,"value",void 0),T([a()],V.prototype,"changeEventEmitter",void 0),T([n("watchValue")],V.prototype,"watchValue",null);var S=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};class O extends b{constructor(){super((t=>[{keyCode:["ArrowUp","ArrowDown"],activeElementInScope:[t.host],callback:t.onArrowUpOrDown},{keyCode:["ArrowUp"],eventName:"keydown",activeElementInScope:[t.host],callback:t=>{t.preventDefault()}}])),this.onArrowUpOrDown=t=>{const e=t.shiftKey?this.majorIncrement:this.minorIncrement,i=w(this.value.replace(/,/g,""))||0,s=Math.max(x(i),x(e));"ArrowUp"===t.code?this.valueController.updateValue(`${(i+e).toFixed(s)}`):"ArrowDown"===t.code&&this.valueController.updateValue(`${(i-e).toFixed(s)}`)}}}S([a()],O.prototype,"host",void 0),S([a()],O.prototype,"value",void 0),S([a()],O.prototype,"minorIncrement",void 0),S([a()],O.prototype,"majorIncrement",void 0),S([a()],O.prototype,"valueController",void 0);var k=function(t,e,i,s){var o,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(o=t[p])&&(a=(r<3?o(a):r>3?o(e,i,a):o(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const E=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.valueController=new V,this.keyboardController=new O,this.renderer=new I,this.changeEventEmitter=u(E,m),this.inputEventPrevent=new d([m],(()=>this.host),{useCapture:!0}),this.formFieldController=new y({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new R:null}],validationRulesName:"validationRules",inputContainerGetter:()=>this.renderer.getContainerRef(),touchableAreaGetter:()=>[this.renderer.getInputRef()],defaultValue:"",attributeGetter:t=>this[t]}),this.prefixTextNotifySlimmer=C(E,"prefixText","watchPrefixText"),this.suffixTextNotifySlimmer=C(E,"suffixText","watchSuffixText"),this.isCompactInputWidthNotifySlimmer=C(E,"isCompactInputWidth"),this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.isCompactInputWidth=!0,this.prefixText="",this.value="",this.size="medium",this.thousandComma=!1,this.integerOnly=!1,this.disabled=!1,this.minorIncrement=1,this.majorIncrement=10,this.label="",this.validationRules=[],this.isValid=null,this.autoValidation=!0,this.showClearIcon=!0}watchPrefixText(){}watchSuffixText(){}watchValue(){}watchValidationRules(){}render(){return r(t(s,null,this.renderer.render()),this.host)}get host(){return o(this)}static get watchers(){return{prefixText:["watchPrefixText"],suffixText:["watchSuffixText"],value:["watchValue"],validationRules:["watchValidationRules"]}}};k([h()],E.prototype,"globalSlimmers",void 0),k([l()],E.prototype,"valueController",void 0),k([l()],E.prototype,"keyboardController",void 0),k([l()],E.prototype,"renderer",void 0),k([l()],E.prototype,"changeEventEmitter",void 0),k([l()],E.prototype,"inputEventPrevent",void 0),k([l()],E.prototype,"formFieldController",void 0),k([l()],E.prototype,"prefixTextNotifySlimmer",void 0),k([l()],E.prototype,"suffixTextNotifySlimmer",void 0),k([l()],E.prototype,"isCompactInputWidthNotifySlimmer",void 0),k([l()],E.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),E.style=":host{display:inline-block;width:100%}";export{E as vega_input_numeric}
|