@globalpayments/vega 2.59.0 → 2.60.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/{app-globals-a8f5e755.js → app-globals-8a3536ba.js} +3 -3
- package/dist/cjs/{code-block-4bfae76d.js → code-block-7d901dfc.js} +1 -1
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-34f4577a.js → component-value-history-controller-slimmer.abstract-d61e5129.js} +2 -2
- package/dist/cjs/{content-state-0da174e0.js → content-state-2096aa5a.js} +3 -3
- package/dist/cjs/{design-token-deb195e9.js → design-token-52f9da81.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-299039f1.js → element-appender-slimmer-2a3e1e51.js} +2 -2
- package/dist/cjs/{image-annotation-action-117fee1f.js → image-annotation-action-8c1ecc99.js} +2 -2
- package/dist/cjs/index.cjs.js +8 -9
- package/dist/cjs/{inject-keyboard-manager-70382bae.js → inject-keyboard-manager-ad865c95.js} +1 -1
- package/dist/cjs/{keyboard-manager-6858915b.js → keyboard-manager-7f4e1f43.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-faca2038.js → keyboard-manager-slimmer-138a90e5.js} +1 -1
- package/dist/cjs/loader.cjs.js +6 -7
- package/dist/cjs/{public-rules-d1f7a352.js → public-rules-c711fae3.js} +4 -5
- package/dist/cjs/{responsive-format-facade-20c63e07.js → responsive-format-facade-3ab3b18c.js} +2 -2
- package/dist/cjs/{rich-text-editor-required-rule-fbf8cbab.js → rich-text-editor-required-rule-4d92437f.js} +1 -1
- package/dist/cjs/{state-background-color-formatter-c57409ea.js → state-background-color-formatter-aa5570f6.js} +1 -1
- package/dist/cjs/string-format-strategy.abstract-07a95352.js +60 -0
- package/dist/cjs/{string-input-formatter-slimmer-1b757bad.js → string-input-formatter-slimmer-941eaec2.js} +1 -224
- package/dist/cjs/string-mask-strategy-6bdad95e.js +172 -0
- package/dist/cjs/{style-formatter-e08163fd.js → style-formatter-dcb443fb.js} +2 -2
- package/dist/cjs/{type-guard-aa8fdeaf.js → type-guard-f12b5bae.js} +13 -3
- package/dist/cjs/{valid-credit-card-number-rule-4a1b00b8.js → valid-credit-card-number-rule-ce5c9147.js} +9 -9
- package/dist/cjs/vega-accordion.cjs.entry.js +6 -7
- package/dist/cjs/vega-app-header-button.cjs.entry.js +6 -7
- package/dist/cjs/vega-box.cjs.entry.js +7 -8
- package/dist/cjs/vega-button-circle.cjs.entry.js +6 -7
- package/dist/cjs/vega-button.cjs.entry.js +4 -5
- package/dist/cjs/vega-calendar_4.cjs.entry.js +14 -4
- package/dist/cjs/vega-card.cjs.entry.js +6 -7
- package/dist/cjs/vega-carousel.cjs.entry.js +4 -5
- package/dist/cjs/vega-chip.cjs.entry.js +6 -7
- package/dist/cjs/vega-code-block.cjs.entry.js +5 -6
- package/dist/cjs/vega-combo-box.cjs.entry.js +3 -4
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +36 -11
- package/dist/cjs/vega-dialog_2.cjs.entry.js +6 -7
- package/dist/cjs/vega-divider.cjs.entry.js +6 -7
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -8
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -7
- package/dist/cjs/vega-flex.cjs.entry.js +7 -8
- package/dist/cjs/vega-font.cjs.entry.js +6 -7
- package/dist/cjs/vega-grid.cjs.entry.js +6 -7
- package/dist/cjs/vega-icon.cjs.entry.js +6 -7
- package/dist/cjs/vega-image-uploader.cjs.entry.js +4 -5
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +241 -12
- package/dist/cjs/vega-input-numeric.cjs.entry.js +3 -4
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +110 -21
- package/dist/cjs/vega-input-select.cjs.entry.js +4 -5
- package/dist/cjs/vega-input.cjs.entry.js +16 -191
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +6 -7
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +4 -5
- package/dist/cjs/vega-pagination.cjs.entry.js +4 -5
- package/dist/cjs/vega-popover_2.cjs.entry.js +9 -10
- package/dist/cjs/vega-radio_2.cjs.entry.js +3 -4
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +4 -5
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +8 -9
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -5
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +4 -5
- package/dist/cjs/vega-signature-capture.cjs.entry.js +6 -7
- package/dist/cjs/vega-table_8.cjs.entry.js +4 -5
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +7 -8
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +7 -8
- package/dist/cjs/vega.cjs.js +6 -7
- package/dist/collection/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.js +12 -1
- package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.js +11 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.css +4 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +43 -0
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-mask-config-controller.js +4 -11
- package/dist/collection/components/vega-input/vega-input.js +1 -1
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +6 -3
- package/dist/collection/components/vega-input-phone-number/slimmers/renderers/phone-number-input-renderer.js +3 -16
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/link-annotation-handler.js +1 -1
- package/dist/collection/constants/card-config.js +4 -4
- package/dist/collection/helpers/formatter/string-formatter/credit-card-blur-mask-strategy.js +1 -1
- package/dist/collection/helpers/formatter/string-formatter/vega-phone-number-input-strategy.js +104 -0
- package/dist/collection/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.js +43 -0
- package/dist/esm/{app-globals-eec29b87.js → app-globals-c7699395.js} +3 -3
- package/dist/esm/{code-block-3d519665.js → code-block-055cae13.js} +1 -1
- package/dist/esm/{component-value-history-controller-slimmer.abstract-8b5be007.js → component-value-history-controller-slimmer.abstract-7a64c05a.js} +2 -2
- package/dist/esm/{content-state-100d1efd.js → content-state-460f6254.js} +3 -3
- package/dist/esm/{design-token-80dd7d60.js → design-token-e1821e4a.js} +3 -3
- package/dist/esm/{element-appender-slimmer-e2d3e79a.js → element-appender-slimmer-4260c020.js} +2 -2
- package/dist/esm/{image-annotation-action-215f92d6.js → image-annotation-action-95cc9118.js} +2 -2
- package/dist/esm/index.js +8 -9
- package/dist/esm/{inject-keyboard-manager-a28dfee4.js → inject-keyboard-manager-109817bf.js} +1 -1
- package/dist/esm/{keyboard-manager-fa6355cb.js → keyboard-manager-ab521d22.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-818050ee.js → keyboard-manager-slimmer-cae3a002.js} +1 -1
- package/dist/esm/loader.js +6 -7
- package/dist/esm/{public-rules-1016ce0c.js → public-rules-71e1883d.js} +4 -5
- package/dist/esm/{responsive-format-facade-4bf60125.js → responsive-format-facade-dbeffcd6.js} +2 -2
- package/dist/esm/{rich-text-editor-required-rule-423c3c83.js → rich-text-editor-required-rule-6cfdcaaf.js} +1 -1
- package/dist/esm/{state-background-color-formatter-da5e76e8.js → state-background-color-formatter-0f01d27a.js} +1 -1
- package/dist/esm/string-format-strategy.abstract-452f4398.js +58 -0
- package/dist/esm/{string-input-formatter-slimmer-b144e8d7.js → string-input-formatter-slimmer-6d99bb4f.js} +2 -223
- package/dist/esm/string-mask-strategy-6232a1c1.js +170 -0
- package/dist/esm/{style-formatter-184752b5.js → style-formatter-41ca4df2.js} +2 -2
- package/dist/esm/{type-guard-84b1f192.js → type-guard-12f7654b.js} +8 -2
- package/dist/esm/{valid-credit-card-number-rule-cc497bec.js → valid-credit-card-number-rule-81443274.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +6 -7
- package/dist/esm/vega-app-header-button.entry.js +6 -7
- package/dist/esm/vega-box.entry.js +7 -8
- package/dist/esm/vega-button-circle.entry.js +6 -7
- package/dist/esm/vega-button.entry.js +4 -5
- package/dist/esm/vega-calendar_4.entry.js +14 -4
- package/dist/esm/vega-card.entry.js +6 -7
- package/dist/esm/vega-carousel.entry.js +4 -5
- package/dist/esm/vega-chip.entry.js +6 -7
- package/dist/esm/vega-code-block.entry.js +5 -6
- package/dist/esm/vega-combo-box.entry.js +3 -4
- package/dist/esm/vega-date-picker_2.entry.js +35 -10
- package/dist/esm/vega-dialog_2.entry.js +6 -7
- package/dist/esm/vega-divider.entry.js +6 -7
- package/dist/esm/vega-dropdown_5.entry.js +7 -8
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-flag-icon.entry.js +6 -7
- package/dist/esm/vega-flex.entry.js +7 -8
- package/dist/esm/vega-font.entry.js +6 -7
- package/dist/esm/vega-grid.entry.js +6 -7
- package/dist/esm/vega-icon.entry.js +6 -7
- package/dist/esm/vega-image-uploader.entry.js +4 -5
- package/dist/esm/vega-input-credit-card.entry.js +240 -11
- package/dist/esm/vega-input-numeric.entry.js +3 -4
- package/dist/esm/vega-input-phone-number.entry.js +110 -21
- package/dist/esm/vega-input-select.entry.js +4 -5
- package/dist/esm/vega-input.entry.js +10 -185
- package/dist/esm/vega-left-nav_5.entry.js +6 -7
- package/dist/esm/vega-loader-wrapper_2.entry.js +4 -5
- package/dist/esm/vega-pagination.entry.js +4 -5
- package/dist/esm/vega-popover_2.entry.js +9 -10
- package/dist/esm/vega-radio_2.entry.js +3 -4
- package/dist/esm/vega-rich-text-content.entry.js +4 -5
- package/dist/esm/vega-rich-text-editor_4.entry.js +8 -9
- package/dist/esm/vega-selection-chip_2.entry.js +4 -5
- package/dist/esm/vega-sidenav_3.entry.js +4 -5
- package/dist/esm/vega-signature-capture.entry.js +6 -7
- package/dist/esm/vega-table_8.entry.js +4 -5
- package/dist/esm/vega-time-picker_2.entry.js +7 -8
- package/dist/esm/vega-tooltip_2.entry.js +7 -8
- package/dist/esm/vega.js +6 -7
- package/dist/types/components/vega-calendar/slimmers/month-view/renderers/vega-calendar-month-view-renderer.d.ts +1 -0
- package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-calendar-renderer.d.ts +1 -0
- package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +14 -0
- package/dist/types/components/vega-input/types.d.ts +3 -10
- package/dist/types/components.d.ts +14 -0
- package/dist/types/helpers/formatter/string-formatter/vega-phone-number-input-strategy.d.ts +49 -0
- package/dist/types/helpers/formatter/test/string-formatter/vega-phone-number-input-strategy.test.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-0dcec258.js +1 -0
- package/dist/vega/p-10063072.entry.js +1 -0
- package/dist/vega/p-1152850b.entry.js +1 -0
- package/dist/vega/p-165054fb.entry.js +1 -0
- package/dist/vega/p-1652cfc6.entry.js +1 -0
- package/dist/vega/p-16c6c22f.entry.js +1 -0
- package/dist/vega/p-1852ca80.entry.js +1 -0
- package/dist/vega/p-1b222c94.entry.js +1 -0
- package/dist/vega/p-1b91a882.js +1 -0
- package/dist/vega/{p-86f17433.js → p-1cabeb33.js} +1 -1
- package/dist/vega/p-1f8c46c4.entry.js +1 -0
- package/dist/vega/p-1fdf0f74.entry.js +1 -0
- package/dist/vega/{p-7934c09c.js → p-200ba358.js} +1 -1
- package/dist/vega/p-20b8b626.entry.js +1 -0
- package/dist/vega/{p-0fce930c.js → p-21873037.js} +1 -1
- package/dist/vega/{p-b40adb9e.js → p-2608b9fe.js} +1 -1
- package/dist/vega/{p-0f0baac3.js → p-27dfa896.js} +1 -1
- package/dist/vega/p-2e4bc8aa.entry.js +1 -0
- package/dist/vega/p-334e31a3.entry.js +1 -0
- package/dist/vega/p-394dfa02.entry.js +1 -0
- package/dist/vega/p-433ea113.entry.js +1 -0
- package/dist/vega/p-460bbd22.entry.js +1 -0
- package/dist/vega/p-46973cf9.entry.js +1 -0
- package/dist/vega/p-52c1dde9.entry.js +1 -0
- package/dist/vega/p-594ecdab.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-62898294.entry.js +1 -0
- package/dist/vega/p-636f7b17.entry.js +1 -0
- package/dist/vega/p-68eae19d.entry.js +1 -0
- package/dist/vega/p-69119f58.entry.js +1 -0
- package/dist/vega/p-6b71d5d1.entry.js +1 -0
- package/dist/vega/p-71f9c4d4.js +1 -0
- package/dist/vega/{p-59e990c7.entry.js → p-741a8b61.entry.js} +1 -1
- package/dist/vega/{p-436f7e27.js → p-743c5baf.js} +1 -1
- package/dist/vega/{p-09d63c0c.js → p-7e4fdccb.js} +1 -1
- package/dist/vega/p-824a06ba.js +1 -0
- package/dist/vega/{p-a6dacccd.js → p-8539e05e.js} +1 -1
- package/dist/vega/p-867a4970.js +1 -0
- package/dist/vega/{p-7bb74931.js → p-95ac7c7e.js} +1 -1
- package/dist/vega/p-95c30aed.entry.js +1 -0
- package/dist/vega/{p-6f90d444.js → p-9ce249a9.js} +1 -1
- package/dist/vega/{p-16ec4633.js → p-a433fef4.js} +1 -1
- package/dist/vega/p-af2de012.entry.js +1 -0
- package/dist/vega/p-b1faebe0.js +1 -0
- package/dist/vega/p-b56e2c89.entry.js +1 -0
- package/dist/vega/p-b8f50c69.entry.js +1 -0
- package/dist/vega/p-b9821a7f.entry.js +1 -0
- package/dist/vega/p-c883bce1.entry.js +1 -0
- package/dist/vega/p-cc2ceaa8.entry.js +1 -0
- package/dist/vega/{p-7f087c8b.js → p-d1ebec08.js} +1 -1
- package/dist/vega/{p-fc8badd3.entry.js → p-d35243c8.entry.js} +1 -1
- package/dist/vega/p-dbe5daa7.js +1 -0
- package/dist/vega/p-dd6a4ea6.entry.js +1 -0
- package/dist/vega/p-e3bb1cce.entry.js +13 -0
- package/dist/vega/p-e45f8a67.entry.js +1 -0
- package/dist/vega/p-e4fbd2b7.entry.js +1 -0
- package/dist/vega/p-eaa43f31.entry.js +1 -0
- package/dist/vega/p-ed50233f.entry.js +1 -0
- package/dist/vega/p-f1a2658b.entry.js +1 -0
- package/dist/vega/p-fc4c5265.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/card-config-2ee5505e.js +0 -65
- package/dist/cjs/regex-c1f70fd4.js +0 -15
- package/dist/esm/card-config-d2ad484e.js +0 -63
- package/dist/esm/regex-dfe11abf.js +0 -8
- package/dist/vega/p-0a2ff1e2.js +0 -1
- package/dist/vega/p-0b2fef0d.entry.js +0 -1
- package/dist/vega/p-11663b1c.js +0 -1
- package/dist/vega/p-18711f87.entry.js +0 -1
- package/dist/vega/p-19aa2dbe.entry.js +0 -1
- package/dist/vega/p-23f0dfeb.entry.js +0 -1
- package/dist/vega/p-2cc8e5f0.entry.js +0 -1
- package/dist/vega/p-323d2af0.entry.js +0 -1
- package/dist/vega/p-33f45d1b.entry.js +0 -1
- package/dist/vega/p-35a3c0e5.entry.js +0 -1
- package/dist/vega/p-3a0a4d15.js +0 -1
- package/dist/vega/p-3ce966b2.entry.js +0 -1
- package/dist/vega/p-42632023.entry.js +0 -1
- package/dist/vega/p-4452e085.js +0 -1
- package/dist/vega/p-49fd1009.js +0 -1
- package/dist/vega/p-4ca12302.entry.js +0 -13
- package/dist/vega/p-4ee21459.entry.js +0 -1
- package/dist/vega/p-4fb159d5.js +0 -1
- package/dist/vega/p-53d67971.entry.js +0 -1
- package/dist/vega/p-55b4b6ff.entry.js +0 -1
- package/dist/vega/p-56290b7e.entry.js +0 -1
- package/dist/vega/p-57ea996e.entry.js +0 -1
- package/dist/vega/p-5b7d347a.js +0 -1
- package/dist/vega/p-5e2c9e69.js +0 -1
- package/dist/vega/p-6a24c2d9.entry.js +0 -1
- package/dist/vega/p-6e42d500.entry.js +0 -1
- package/dist/vega/p-778b1d71.entry.js +0 -1
- package/dist/vega/p-7b1bb372.entry.js +0 -1
- package/dist/vega/p-7b365345.entry.js +0 -1
- package/dist/vega/p-801cb489.entry.js +0 -1
- package/dist/vega/p-80aac6eb.entry.js +0 -1
- package/dist/vega/p-966a9940.entry.js +0 -1
- package/dist/vega/p-a0954e7c.entry.js +0 -1
- package/dist/vega/p-aeea4154.entry.js +0 -1
- package/dist/vega/p-b6f78c1e.entry.js +0 -1
- package/dist/vega/p-c131544b.entry.js +0 -1
- package/dist/vega/p-cc20f01f.entry.js +0 -1
- package/dist/vega/p-d590402d.entry.js +0 -1
- package/dist/vega/p-d7558ed7.entry.js +0 -1
- package/dist/vega/p-d8566958.entry.js +0 -1
- package/dist/vega/p-e4674c00.entry.js +0 -1
- package/dist/vega/p-e9d2e0dc.entry.js +0 -1
- package/dist/vega/p-ee1e7389.entry.js +0 -1
- package/dist/vega/p-f993bcca.entry.js +0 -1
- package/dist/vega/p-ffaee583.entry.js +0 -1
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { S as StringFormatStrategy } from './string-format-strategy.abstract-452f4398.js';
|
|
2
|
+
import { i as isNonNullable } from './type-guard-12f7654b.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A class for formatting string with the given mask format
|
|
6
|
+
*
|
|
7
|
+
* @augments StringFormatStrategy
|
|
8
|
+
*/
|
|
9
|
+
class StringMaskStrategy extends StringFormatStrategy {
|
|
10
|
+
/**
|
|
11
|
+
* It creates a new instance of the Mask class.
|
|
12
|
+
*
|
|
13
|
+
* @param {MaskConfig} maskConfig - MaskConfig
|
|
14
|
+
*/
|
|
15
|
+
constructor(maskConfig) {
|
|
16
|
+
super();
|
|
17
|
+
/**
|
|
18
|
+
* The insert mode means adding some special character in the input string, will replace part of input string if insertMode set to false.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* mask: ****9999
|
|
22
|
+
* slot: 9
|
|
23
|
+
* value = 12345678
|
|
24
|
+
*
|
|
25
|
+
* insertMode=true The mask value should be ****1234
|
|
26
|
+
* insertMode=false The mask value should be ****5678
|
|
27
|
+
*/
|
|
28
|
+
this.insertMode = true;
|
|
29
|
+
this.maskConfig = maskConfig;
|
|
30
|
+
this.slotRegex = new RegExp(maskConfig.slot);
|
|
31
|
+
this.acceptRegex = new RegExp(maskConfig.accept, 'g');
|
|
32
|
+
this.insertMode = maskConfig.insertMode === false ? false : true;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Set the mask config
|
|
36
|
+
*
|
|
37
|
+
* @param {MaskConfig} maskConfig - MaskConfig
|
|
38
|
+
*/
|
|
39
|
+
setMaskConfig(maskConfig) {
|
|
40
|
+
this.maskConfig = maskConfig;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
format(input, inputStatus) {
|
|
46
|
+
const caretPosition = inputStatus === null || inputStatus === void 0 ? void 0 : inputStatus.caretPosition;
|
|
47
|
+
if (input.length > this.getLengthLimit() && isNonNullable(caretPosition)) {
|
|
48
|
+
const rawValueArr = [...input];
|
|
49
|
+
const exceededLength = input.length - this.getLengthLimit();
|
|
50
|
+
rawValueArr.splice(caretPosition - exceededLength, exceededLength);
|
|
51
|
+
return rawValueArr.join('');
|
|
52
|
+
}
|
|
53
|
+
return this.replaceMaskWithMatchedInputSlots(input, this.getMatchedInputSlotValue(input));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get the position of
|
|
57
|
+
*
|
|
58
|
+
* @param {string} input - The input string
|
|
59
|
+
* @param {number} caretPosition - The current position of caret
|
|
60
|
+
* @returns {Nullable<number>} The new position of caret
|
|
61
|
+
*/
|
|
62
|
+
calculateCaretPosition(input, caretPosition) {
|
|
63
|
+
if (!isNonNullable(caretPosition))
|
|
64
|
+
return null;
|
|
65
|
+
if (input.length > this.getLengthLimit()) {
|
|
66
|
+
const exceededLength = input.length - this.getLengthLimit();
|
|
67
|
+
return caretPosition - exceededLength;
|
|
68
|
+
}
|
|
69
|
+
const startValue = input.substring(0, caretPosition);
|
|
70
|
+
const maskedStartValue = this.format(startValue);
|
|
71
|
+
return caretPosition + (maskedStartValue.length - startValue.length);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* This TypeScript function determines whether a component value should be overridden based on the mask configuration.
|
|
75
|
+
*
|
|
76
|
+
* @returns {boolean} The result overrideValue controls whether the component value same as the internal input value after the input blur
|
|
77
|
+
* return false if property overrideValue is not exist or set to true, return false if maskConfig is not exist
|
|
78
|
+
*/
|
|
79
|
+
shouldOverrideComponentValueAfterBlur() {
|
|
80
|
+
if (!this.maskConfig || this.maskConfig.overrideValue !== true) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The function shouldTriggerAtInit returns true if the maskConfig is defined and its triggerAtInit
|
|
89
|
+
* property is set to true, otherwise it returns false.
|
|
90
|
+
*
|
|
91
|
+
* @returns {boolean} The function shouldTriggerAtInit() returns a boolean value. If the condition is met
|
|
92
|
+
* (this.maskConfig is truthy and this.maskConfig.triggerAtInit is true), it returns true. Otherwise,
|
|
93
|
+
* it returns false.
|
|
94
|
+
*/
|
|
95
|
+
shouldTriggerAtInit() {
|
|
96
|
+
if (!this.maskConfig || this.maskConfig.triggerAtInit !== true) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get the length limit by mask
|
|
105
|
+
*
|
|
106
|
+
* @returns {number} the max limit length
|
|
107
|
+
*/
|
|
108
|
+
getLengthLimit() {
|
|
109
|
+
return this.maskConfig.mask.length;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Given a string, return an array of all the digits in that string
|
|
113
|
+
*
|
|
114
|
+
* @param {string} input - The input string to be parsed.
|
|
115
|
+
* @returns {string[]} - An array of strings.
|
|
116
|
+
*/
|
|
117
|
+
getMatchedInputSlotValue(input) {
|
|
118
|
+
return input.match(this.acceptRegex) || [];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Replace the mask with the matched input slots
|
|
122
|
+
*
|
|
123
|
+
* @param {string} input - The input string that is being typed by the user.
|
|
124
|
+
* @param {string[]} matchedInputSlot - an array of the input slots that were matched by the mask.
|
|
125
|
+
* @returns {string} The result string builder.
|
|
126
|
+
*/
|
|
127
|
+
replaceMaskWithMatchedInputSlots(input, matchedInputSlot) {
|
|
128
|
+
const resultStringBuilder = [];
|
|
129
|
+
let resultStringBuilderCursor = -1;
|
|
130
|
+
for (let i = 0; i < this.maskConfig.mask.length; i++) {
|
|
131
|
+
const maskChar = this.maskConfig.mask.charAt(i);
|
|
132
|
+
if (this.slotRegex.test(maskChar) && matchedInputSlot.length) {
|
|
133
|
+
const inputSlot = matchedInputSlot.shift();
|
|
134
|
+
if (inputSlot) {
|
|
135
|
+
resultStringBuilder.push(inputSlot);
|
|
136
|
+
resultStringBuilderCursor = i;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
if (!this.insertMode) {
|
|
141
|
+
matchedInputSlot.shift();
|
|
142
|
+
}
|
|
143
|
+
if (input.charAt(i) === maskChar) {
|
|
144
|
+
resultStringBuilderCursor = i;
|
|
145
|
+
}
|
|
146
|
+
resultStringBuilder.push(maskChar);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//The replaceMode result length should be the origin input length
|
|
150
|
+
const resultLength = this.insertMode ? resultStringBuilderCursor + 1 : input.length;
|
|
151
|
+
return resultStringBuilder.join('').slice(0, resultLength);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
StringMaskStrategy.PHONE_MASK = new StringMaskStrategy({
|
|
155
|
+
mask: '(999) 999-9999',
|
|
156
|
+
slot: '9',
|
|
157
|
+
accept: /\d/g,
|
|
158
|
+
});
|
|
159
|
+
StringMaskStrategy.ZIPCODE_MASK = new StringMaskStrategy({
|
|
160
|
+
mask: '99999',
|
|
161
|
+
slot: '9',
|
|
162
|
+
accept: /\d/g,
|
|
163
|
+
});
|
|
164
|
+
StringMaskStrategy.TAX_ID_MASK = new StringMaskStrategy({
|
|
165
|
+
mask: '99-9999999',
|
|
166
|
+
slot: '9',
|
|
167
|
+
accept: /\d/g,
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
export { StringMaskStrategy as S };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isNonNullable } from './type-guard-
|
|
2
|
-
import { R as ResponsiveFormatFacade } from './responsive-format-facade-
|
|
1
|
+
import { i as isNonNullable } from './type-guard-12f7654b.js';
|
|
2
|
+
import { R as ResponsiveFormatFacade } from './responsive-format-facade-dbeffcd6.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Fomatter flex styles.
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { B as Breakpoints } from './breakpoints-d9faf11c.js';
|
|
2
2
|
import { a as BorderStyle, F as FlexDirections, b as FlexAlignItem, c as FlexJustifyContent, d as FlexWrap, e as BoxDisplay, T as TextAlign, C as CssStates } from './ui-8424715a.js';
|
|
3
|
-
import { G as GridColumnsRegex, a as GridRowsRegex } from './regex-dfe11abf.js';
|
|
4
3
|
import { a as TypographyKeys } from './typography-396de03f.js';
|
|
5
4
|
|
|
5
|
+
const GridRowsRegex = new RegExp(/^([1-9]|1[0-2])(-auto)?$/);
|
|
6
|
+
const GridColumnsRegex = new RegExp(/^([1-9]|1[0-2])(-auto)?$/);
|
|
7
|
+
const VisaRegex = /^4/;
|
|
8
|
+
const MasterCardRegex = /^(5[1-5]|677189)|^(222[1-9]|2[3-6]\d{2}|27[0-1]\d|2720)/;
|
|
9
|
+
const AmexRegex = /^3[47]/;
|
|
10
|
+
const DiscoverRegex = /^(6011|65|64[4-9]|622)/;
|
|
11
|
+
|
|
6
12
|
/* This file is generated by vega-design 2.0.77 */
|
|
7
13
|
/* eslint-disable */
|
|
8
14
|
/* tslint:disable */
|
|
@@ -683,4 +689,4 @@ const isVegaTableColumnGroupingModelType = (input) => {
|
|
|
683
689
|
typeof input.label === 'string');
|
|
684
690
|
};
|
|
685
691
|
|
|
686
|
-
export {
|
|
692
|
+
export { AmexRegex as A, BorderRadius as B, Colors as C, DiscoverRegex as D, isTranslocationType as E, FillBackgroundColors as F, isFlexDirectionType as G, isFlexAlignItemType as H, isFlexJustifyContentType as I, isFlexWrapType as J, isBoxDisplayType as K, isDirectionalBorderRadiusType as L, MasterCardRegex as M, isTextAlignType as N, isStateVariantTokenType as O, isAccordionObserverPayload as P, isArrayOfType as Q, isDropdownSourceItemType as R, StrokeBackgroundColors as S, TextColors as T, isSelectSourceItemType as U, VisaRegex as V, isVegaTableColumnGroupingModelType as W, BackgroundColors as a, BorderColors as b, TextColorMap as c, BackgroundColorMap as d, BorderColorMap as e, Shadows as f, ShadowMap as g, Spacing as h, isNonNullable as i, isBorderColorTokenType as j, isShadowsTokenType as k, isBorderTokenType as l, Borders as m, BorderMap as n, isSpacingTokenType as o, isBorderRadiusTokenType as p, isBackgroundColorTokenType as q, isTextColorTokenType as r, isBreakpointsTokenType as s, isBorderStyleType as t, isTypographyTokenType as u, isResponsiveType as v, isBreakpointsForPrefixType as w, isDirectionalSpacingType as x, isGridColumnsType as y, isGridRowsType as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VisaRegex, M as MasterCardRegex, A as AmexRegex, D as DiscoverRegex } from './
|
|
1
|
+
import { V as VisaRegex, M as MasterCardRegex, A as AmexRegex, D as DiscoverRegex } from './type-guard-12f7654b.js';
|
|
2
2
|
import { m as mapStringToNumberArray, a as mapParityDigits, s as sum } from './number-4398f2e1.js';
|
|
3
3
|
import { I as InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
|
|
4
4
|
|
|
@@ -3,7 +3,7 @@ import { c as MapToComponentField, V as VegaSlimmer, M as MapToComponentMethod,
|
|
|
3
3
|
import { s as slotPlaceholder } from './placeholder-bf562081.js';
|
|
4
4
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-a84cc93e.js';
|
|
5
5
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
6
|
-
import { f as formatAndValidResponsiveToken } from './design-token-
|
|
6
|
+
import { f as formatAndValidResponsiveToken } from './design-token-e1821e4a.js';
|
|
7
7
|
import { a as arrayToClassString } from './ui-c20be16d.js';
|
|
8
8
|
import { D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-999e21e3.js';
|
|
9
9
|
import { a as VegaClick, V as VegaExpand } from './dom-node-subject-factory-202655e7.js';
|
|
@@ -13,10 +13,10 @@ import { V as VegaInternalIconManager } from './internal-icon-manager-7eac52c8.j
|
|
|
13
13
|
import { O as Observer } from './observer-3959f9dd.js';
|
|
14
14
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
15
15
|
import { A as ACCORDION_EXPAND_TOPIC } from './static-subject-title-633b3474.js';
|
|
16
|
-
import {
|
|
16
|
+
import { P as isAccordionObserverPayload } from './type-guard-12f7654b.js';
|
|
17
17
|
import { c as createEventEmitSlimmer } from './event-emit-slimmer-40973ec2.js';
|
|
18
18
|
import './breakpoints-d9faf11c.js';
|
|
19
|
-
import './responsive-format-facade-
|
|
19
|
+
import './responsive-format-facade-dbeffcd6.js';
|
|
20
20
|
import './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
21
21
|
import './ui-8424715a.js';
|
|
22
22
|
import './try-get-document-bef0f526.js';
|
|
@@ -35,14 +35,13 @@ import './index-e9da316f.js';
|
|
|
35
35
|
import './icon-manager-2ee1c619.js';
|
|
36
36
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
37
37
|
import './translation-833d9ef4.js';
|
|
38
|
-
import './content-state-
|
|
39
|
-
import './code-block-
|
|
38
|
+
import './content-state-460f6254.js';
|
|
39
|
+
import './code-block-055cae13.js';
|
|
40
40
|
import './vega-internal-event-id-b7c865de.js';
|
|
41
41
|
import './string-a953eafc.js';
|
|
42
42
|
import './object-66c37948.js';
|
|
43
43
|
import './typography-396de03f.js';
|
|
44
|
-
import './state-background-color-formatter-
|
|
45
|
-
import './regex-dfe11abf.js';
|
|
44
|
+
import './state-background-color-formatter-0f01d27a.js';
|
|
46
45
|
|
|
47
46
|
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
48
47
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-057d0f70.js';
|
|
2
2
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
3
3
|
import { a as arrayToClassString } from './ui-c20be16d.js';
|
|
4
|
-
import { d as formatAndValidBackgroundColor, i as formatAndValidTextColor } from './design-token-
|
|
5
|
-
import { R as ResponsiveFormatFacade } from './responsive-format-facade-
|
|
4
|
+
import { d as formatAndValidBackgroundColor, i as formatAndValidTextColor } from './design-token-e1821e4a.js';
|
|
5
|
+
import { R as ResponsiveFormatFacade } from './responsive-format-facade-dbeffcd6.js';
|
|
6
6
|
import { c as MapToComponentField, V as VegaSlimmer, M as MapToComponentMethod, L as LogUtility, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
7
7
|
import { P as PageResizeObserverSlimmer, g as getCurrentBreakpoint } from './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
8
8
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-a84cc93e.js';
|
|
@@ -13,12 +13,11 @@ import { V as VegaInternalIconManager } from './internal-icon-manager-7eac52c8.j
|
|
|
13
13
|
import { c as chevronUp } from './chevron-up-b1989751.js';
|
|
14
14
|
import { c as chevronDown } from './chevron-down-4a75d28e.js';
|
|
15
15
|
import { D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-999e21e3.js';
|
|
16
|
-
import './type-guard-
|
|
16
|
+
import './type-guard-12f7654b.js';
|
|
17
17
|
import './breakpoints-d9faf11c.js';
|
|
18
18
|
import './ui-8424715a.js';
|
|
19
|
-
import './regex-dfe11abf.js';
|
|
20
19
|
import './typography-396de03f.js';
|
|
21
|
-
import './state-background-color-formatter-
|
|
20
|
+
import './state-background-color-formatter-0f01d27a.js';
|
|
22
21
|
import './number-4398f2e1.js';
|
|
23
22
|
import './pixel-f32c07ce.js';
|
|
24
23
|
import './array-7888f339.js';
|
|
@@ -37,8 +36,8 @@ import './index-e9da316f.js';
|
|
|
37
36
|
import './icon-manager-2ee1c619.js';
|
|
38
37
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
39
38
|
import './translation-833d9ef4.js';
|
|
40
|
-
import './content-state-
|
|
41
|
-
import './code-block-
|
|
39
|
+
import './content-state-460f6254.js';
|
|
40
|
+
import './code-block-055cae13.js';
|
|
42
41
|
import './vega-internal-event-id-b7c865de.js';
|
|
43
42
|
import './string-a953eafc.js';
|
|
44
43
|
import './object-66c37948.js';
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-057d0f70.js';
|
|
2
2
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
3
|
-
import { j as formatAndValidStateToken, f as formatAndValidResponsiveToken, k as formatAndValidBorderStyle } from './design-token-
|
|
3
|
+
import { j as formatAndValidStateToken, f as formatAndValidResponsiveToken, k as formatAndValidBorderStyle } from './design-token-e1821e4a.js';
|
|
4
4
|
import { a as arrayToClassString } from './ui-c20be16d.js';
|
|
5
5
|
import { c as MapToComponentField, M as MapToComponentMethod, V as VegaSlimmer, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
6
6
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-a84cc93e.js';
|
|
7
|
-
import { R as ResponsiveFormatFacade } from './responsive-format-facade-
|
|
7
|
+
import { R as ResponsiveFormatFacade } from './responsive-format-facade-dbeffcd6.js';
|
|
8
8
|
import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
9
|
-
import { f as formatFlexStyles } from './style-formatter-
|
|
10
|
-
import './type-guard-
|
|
9
|
+
import { f as formatFlexStyles } from './style-formatter-41ca4df2.js';
|
|
10
|
+
import './type-guard-12f7654b.js';
|
|
11
11
|
import './breakpoints-d9faf11c.js';
|
|
12
12
|
import './ui-8424715a.js';
|
|
13
|
-
import './regex-dfe11abf.js';
|
|
14
13
|
import './typography-396de03f.js';
|
|
15
|
-
import './state-background-color-formatter-
|
|
14
|
+
import './state-background-color-formatter-0f01d27a.js';
|
|
16
15
|
import './number-4398f2e1.js';
|
|
17
16
|
import './pixel-f32c07ce.js';
|
|
18
17
|
import './array-7888f339.js';
|
|
@@ -32,8 +31,8 @@ import './index-e9da316f.js';
|
|
|
32
31
|
import './icon-manager-2ee1c619.js';
|
|
33
32
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
34
33
|
import './translation-833d9ef4.js';
|
|
35
|
-
import './content-state-
|
|
36
|
-
import './code-block-
|
|
34
|
+
import './content-state-460f6254.js';
|
|
35
|
+
import './code-block-055cae13.js';
|
|
37
36
|
import './vega-internal-event-id-b7c865de.js';
|
|
38
37
|
import './string-a953eafc.js';
|
|
39
38
|
import './object-66c37948.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-057d0f70.js';
|
|
2
2
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
3
|
-
import { i as formatAndValidTextColor } from './design-token-
|
|
3
|
+
import { i as formatAndValidTextColor } from './design-token-e1821e4a.js';
|
|
4
4
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
5
5
|
import { F as FORM_SUBMIT, a as FORM_RESET } from './static-subject-title-633b3474.js';
|
|
6
6
|
import { I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
@@ -8,12 +8,11 @@ import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlim
|
|
|
8
8
|
import { c as createEventEmitSlimmer } from './event-emit-slimmer-40973ec2.js';
|
|
9
9
|
import { a as VegaClick } from './dom-node-subject-factory-202655e7.js';
|
|
10
10
|
import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-6b5b31f5.js';
|
|
11
|
-
import './type-guard-
|
|
11
|
+
import './type-guard-12f7654b.js';
|
|
12
12
|
import './breakpoints-d9faf11c.js';
|
|
13
13
|
import './ui-8424715a.js';
|
|
14
|
-
import './regex-dfe11abf.js';
|
|
15
14
|
import './typography-396de03f.js';
|
|
16
|
-
import './responsive-format-facade-
|
|
15
|
+
import './responsive-format-facade-dbeffcd6.js';
|
|
17
16
|
import './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
18
17
|
import './try-get-document-bef0f526.js';
|
|
19
18
|
import './number-4398f2e1.js';
|
|
@@ -33,12 +32,12 @@ import './index-e9da316f.js';
|
|
|
33
32
|
import './icon-manager-2ee1c619.js';
|
|
34
33
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
35
34
|
import './translation-833d9ef4.js';
|
|
36
|
-
import './content-state-
|
|
37
|
-
import './code-block-
|
|
35
|
+
import './content-state-460f6254.js';
|
|
36
|
+
import './code-block-055cae13.js';
|
|
38
37
|
import './vega-internal-event-id-b7c865de.js';
|
|
39
38
|
import './string-a953eafc.js';
|
|
40
39
|
import './object-66c37948.js';
|
|
41
|
-
import './state-background-color-formatter-
|
|
40
|
+
import './state-background-color-formatter-0f01d27a.js';
|
|
42
41
|
import './dom-node-subject-observer-factory-999e21e3.js';
|
|
43
42
|
|
|
44
43
|
const VegaButtonCircleRuntimeMetricsPayloadDefinition = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-057d0f70.js';
|
|
2
2
|
import { P as PageResizeObserverSlimmer, g as getCurrentBreakpoint } from './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
3
3
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
4
|
-
import { R as ResponsiveFormatFacade } from './responsive-format-facade-
|
|
4
|
+
import { R as ResponsiveFormatFacade } from './responsive-format-facade-dbeffcd6.js';
|
|
5
5
|
import { F as FORM_SUBMIT, a as FORM_RESET } from './static-subject-title-633b3474.js';
|
|
6
6
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
7
7
|
import { c as MapToComponentField, V as VegaSlimmer, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
@@ -12,8 +12,7 @@ import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-
|
|
|
12
12
|
import './ui-8424715a.js';
|
|
13
13
|
import './breakpoints-d9faf11c.js';
|
|
14
14
|
import './try-get-document-bef0f526.js';
|
|
15
|
-
import './type-guard-
|
|
16
|
-
import './regex-dfe11abf.js';
|
|
15
|
+
import './type-guard-12f7654b.js';
|
|
17
16
|
import './typography-396de03f.js';
|
|
18
17
|
import './number-4398f2e1.js';
|
|
19
18
|
import './pixel-f32c07ce.js';
|
|
@@ -32,8 +31,8 @@ import './index-e9da316f.js';
|
|
|
32
31
|
import './icon-manager-2ee1c619.js';
|
|
33
32
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
34
33
|
import './translation-833d9ef4.js';
|
|
35
|
-
import './content-state-
|
|
36
|
-
import './code-block-
|
|
34
|
+
import './content-state-460f6254.js';
|
|
35
|
+
import './code-block-055cae13.js';
|
|
37
36
|
import './vega-internal-event-id-b7c865de.js';
|
|
38
37
|
import './string-a953eafc.js';
|
|
39
38
|
import './object-66c37948.js';
|
|
@@ -8,8 +8,8 @@ import { V as VegaInternalIconManager } from './internal-icon-manager-7eac52c8.j
|
|
|
8
8
|
import { p as pad } from './date-c55b97f0.js';
|
|
9
9
|
import { c as createEventEmitSlimmer } from './event-emit-slimmer-40973ec2.js';
|
|
10
10
|
import { V as VegaInternalTranslation } from './translation-833d9ef4.js';
|
|
11
|
-
import { s as stateBackgroundColorFormatter } from './state-background-color-formatter-
|
|
12
|
-
import { q as isBackgroundColorTokenType } from './type-guard-
|
|
11
|
+
import { s as stateBackgroundColorFormatter } from './state-background-color-formatter-0f01d27a.js';
|
|
12
|
+
import { q as isBackgroundColorTokenType } from './type-guard-12f7654b.js';
|
|
13
13
|
import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-6b5b31f5.js';
|
|
14
14
|
import { v as VegaInternalCalendarMonthEventsChange, w as VegaInternalCalendarEventPreviewClear, x as VegaInternalCalendarEventPreviewUpdate } from './vega-internal-event-id-b7c865de.js';
|
|
15
15
|
import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
|
|
@@ -32,7 +32,6 @@ import './internal-vega-event-manager-526f8ed1.js';
|
|
|
32
32
|
import './try-get-document-bef0f526.js';
|
|
33
33
|
import './breakpoints-d9faf11c.js';
|
|
34
34
|
import './ui-8424715a.js';
|
|
35
|
-
import './regex-dfe11abf.js';
|
|
36
35
|
import './typography-396de03f.js';
|
|
37
36
|
import './vega-env-manager-8f8dc473.js';
|
|
38
37
|
import './feature-flag-controller-51659753.js';
|
|
@@ -378,7 +377,15 @@ class VegaCalendarMonthViewRenderer extends VegaSlimmer {
|
|
|
378
377
|
isMonthFirstDay && h("div", { class: "month-block" }, item.getMonthName(true)),
|
|
379
378
|
h("div", { role: "button", tabIndex: 0, class: "grid-col",
|
|
380
379
|
// eslint-disable-next-line react/jsx-no-bind
|
|
381
|
-
onDblClick: (e) =>
|
|
380
|
+
onDblClick: (e) => {
|
|
381
|
+
// only when showSwitchView is true, the double click event can switch to day view
|
|
382
|
+
if (!this.showSwitchView) {
|
|
383
|
+
e.stopPropagation();
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
this.goToCurrentDayView(e, item);
|
|
387
|
+
}
|
|
388
|
+
} }, item.date)));
|
|
382
389
|
}
|
|
383
390
|
/**
|
|
384
391
|
* switch to current date day view
|
|
@@ -444,6 +451,9 @@ __decorate$q([
|
|
|
444
451
|
__decorate$q([
|
|
445
452
|
MapToComponentField()
|
|
446
453
|
], VegaCalendarMonthViewRenderer.prototype, "isDateDisabled", void 0);
|
|
454
|
+
__decorate$q([
|
|
455
|
+
MapToComponentField()
|
|
456
|
+
], VegaCalendarMonthViewRenderer.prototype, "showSwitchView", void 0);
|
|
447
457
|
|
|
448
458
|
var __decorate$p = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
449
459
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-057d0f70.js';
|
|
2
2
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
3
|
-
import { b as formatAndValidShadow, f as formatAndValidResponsiveToken, d as formatAndValidBackgroundColor } from './design-token-
|
|
3
|
+
import { b as formatAndValidShadow, f as formatAndValidResponsiveToken, d as formatAndValidBackgroundColor } from './design-token-e1821e4a.js';
|
|
4
4
|
import { L as LogUtility, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
5
5
|
import { f as findParent, a as arrayToClassString } from './ui-c20be16d.js';
|
|
6
6
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-a84cc93e.js';
|
|
7
|
-
import './type-guard-
|
|
7
|
+
import './type-guard-12f7654b.js';
|
|
8
8
|
import './breakpoints-d9faf11c.js';
|
|
9
9
|
import './ui-8424715a.js';
|
|
10
|
-
import './regex-dfe11abf.js';
|
|
11
10
|
import './typography-396de03f.js';
|
|
12
|
-
import './responsive-format-facade-
|
|
11
|
+
import './responsive-format-facade-dbeffcd6.js';
|
|
13
12
|
import './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
14
13
|
import './try-get-document-bef0f526.js';
|
|
15
14
|
import './number-4398f2e1.js';
|
|
@@ -31,12 +30,12 @@ import './index-e9da316f.js';
|
|
|
31
30
|
import './icon-manager-2ee1c619.js';
|
|
32
31
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
33
32
|
import './translation-833d9ef4.js';
|
|
34
|
-
import './content-state-
|
|
35
|
-
import './code-block-
|
|
33
|
+
import './content-state-460f6254.js';
|
|
34
|
+
import './code-block-055cae13.js';
|
|
36
35
|
import './vega-internal-event-id-b7c865de.js';
|
|
37
36
|
import './string-a953eafc.js';
|
|
38
37
|
import './object-66c37948.js';
|
|
39
|
-
import './state-background-color-formatter-
|
|
38
|
+
import './state-background-color-formatter-0f01d27a.js';
|
|
40
39
|
|
|
41
40
|
/**
|
|
42
41
|
* This class is used to track the nested level of a component
|
|
@@ -3,7 +3,7 @@ import { S as SynchronizeTaskQueue } from './synchronize-task-queue-ac8acc3b.js'
|
|
|
3
3
|
import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
|
|
4
4
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
5
5
|
import { r as reflow, e as executeAfterTransition } from './effect-f50e072d.js';
|
|
6
|
-
import { R as ResponsiveFormatFacade } from './responsive-format-facade-
|
|
6
|
+
import { R as ResponsiveFormatFacade } from './responsive-format-facade-dbeffcd6.js';
|
|
7
7
|
import { I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
8
8
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-a84cc93e.js';
|
|
9
9
|
import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
@@ -11,10 +11,9 @@ import { c as createEventEmitSlimmer } from './event-emit-slimmer-40973ec2.js';
|
|
|
11
11
|
import { j as VegaPageUpdate } from './dom-node-subject-factory-202655e7.js';
|
|
12
12
|
import { c as createDeprecatedPropertySlimmer } from './deprecated-property-slimmer-2c14df89.js';
|
|
13
13
|
import { t as tryGetDocument } from './try-get-document-bef0f526.js';
|
|
14
|
-
import './type-guard-
|
|
14
|
+
import './type-guard-12f7654b.js';
|
|
15
15
|
import './breakpoints-d9faf11c.js';
|
|
16
16
|
import './ui-8424715a.js';
|
|
17
|
-
import './regex-dfe11abf.js';
|
|
18
17
|
import './typography-396de03f.js';
|
|
19
18
|
import './number-4398f2e1.js';
|
|
20
19
|
import './pixel-f32c07ce.js';
|
|
@@ -35,8 +34,8 @@ import './index-e9da316f.js';
|
|
|
35
34
|
import './icon-manager-2ee1c619.js';
|
|
36
35
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
37
36
|
import './translation-833d9ef4.js';
|
|
38
|
-
import './content-state-
|
|
39
|
-
import './code-block-
|
|
37
|
+
import './content-state-460f6254.js';
|
|
38
|
+
import './code-block-055cae13.js';
|
|
40
39
|
import './vega-internal-event-id-b7c865de.js';
|
|
41
40
|
import './string-a953eafc.js';
|
|
42
41
|
import './object-66c37948.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, g as getElement } from './index-057d0f70.js';
|
|
2
2
|
import { s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
3
|
-
import { R as ResponsiveFormatFacade } from './responsive-format-facade-
|
|
3
|
+
import { R as ResponsiveFormatFacade } from './responsive-format-facade-dbeffcd6.js';
|
|
4
4
|
import { a as arrayToClassString } from './ui-c20be16d.js';
|
|
5
|
-
import { d as formatAndValidBackgroundColor, i as formatAndValidTextColor } from './design-token-
|
|
5
|
+
import { d as formatAndValidBackgroundColor, i as formatAndValidTextColor } from './design-token-e1821e4a.js';
|
|
6
6
|
import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
|
|
7
7
|
import { P as PageResizeObserverSlimmer, g as getCurrentBreakpoint } from './page-resize-observer-slimmer-0bf7fbf3.js';
|
|
8
8
|
import { I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
@@ -10,10 +10,9 @@ import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlim
|
|
|
10
10
|
import { c as createEventEmitSlimmer } from './event-emit-slimmer-40973ec2.js';
|
|
11
11
|
import { a as VegaClick, c as VegaClose } from './dom-node-subject-factory-202655e7.js';
|
|
12
12
|
import { C as ChildNodesEventPreventSlimmer } from './child-nodes-event-prevent-slimmer-6b5b31f5.js';
|
|
13
|
-
import './type-guard-
|
|
13
|
+
import './type-guard-12f7654b.js';
|
|
14
14
|
import './breakpoints-d9faf11c.js';
|
|
15
15
|
import './ui-8424715a.js';
|
|
16
|
-
import './regex-dfe11abf.js';
|
|
17
16
|
import './typography-396de03f.js';
|
|
18
17
|
import './number-4398f2e1.js';
|
|
19
18
|
import './pixel-f32c07ce.js';
|
|
@@ -33,12 +32,12 @@ import './index-e9da316f.js';
|
|
|
33
32
|
import './icon-manager-2ee1c619.js';
|
|
34
33
|
import './wait-for-vega-handler-c2c07ac3.js';
|
|
35
34
|
import './translation-833d9ef4.js';
|
|
36
|
-
import './content-state-
|
|
37
|
-
import './code-block-
|
|
35
|
+
import './content-state-460f6254.js';
|
|
36
|
+
import './code-block-055cae13.js';
|
|
38
37
|
import './vega-internal-event-id-b7c865de.js';
|
|
39
38
|
import './string-a953eafc.js';
|
|
40
39
|
import './object-66c37948.js';
|
|
41
|
-
import './state-background-color-formatter-
|
|
40
|
+
import './state-background-color-formatter-0f01d27a.js';
|
|
42
41
|
import './try-get-document-bef0f526.js';
|
|
43
42
|
import './dom-node-subject-observer-factory-999e21e3.js';
|
|
44
43
|
|
|
@@ -6,12 +6,12 @@ import { V as VegaInternalIconManager } from './internal-icon-manager-7eac52c8.j
|
|
|
6
6
|
import { t as trashCan } from './trash-can-8819a939.js';
|
|
7
7
|
import { D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-999e21e3.js';
|
|
8
8
|
import { f as VegaChange, a as VegaClick, d as domNodeSubjectFactory, k as VegaRemove } from './dom-node-subject-factory-202655e7.js';
|
|
9
|
-
import { K as CodeLanguage } from './code-block-
|
|
9
|
+
import { K as CodeLanguage } from './code-block-055cae13.js';
|
|
10
10
|
import { a as arrayToClassString } from './ui-c20be16d.js';
|
|
11
11
|
import { c as createEventEmitSlimmer } from './event-emit-slimmer-40973ec2.js';
|
|
12
12
|
import { d as deepEqual } from './object-66c37948.js';
|
|
13
13
|
import { T as TranslationSlimmer } from './translation-slimmer-c83b52c1.js';
|
|
14
|
-
import { A as AutoRunWhenReRenderTaskQueueSlimmer, S as ShadowSelectionPolyfill, a as SelectionController, C as ComponentValueHistoryControllerSlimmer } from './component-value-history-controller-slimmer.abstract-
|
|
14
|
+
import { A as AutoRunWhenReRenderTaskQueueSlimmer, S as ShadowSelectionPolyfill, a as SelectionController, C as ComponentValueHistoryControllerSlimmer } from './component-value-history-controller-slimmer.abstract-7a64c05a.js';
|
|
15
15
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
16
16
|
import { p as VegaInternalCodeBlockSelectionChange } from './vega-internal-event-id-b7c865de.js';
|
|
17
17
|
import { d as debounce } from './timer-9321173b.js';
|
|
@@ -23,10 +23,9 @@ import './create-public-api-runtime-metrics-slimmer-bedf3a1e.js';
|
|
|
23
23
|
import './dynamic-slimmer-90b8af32.js';
|
|
24
24
|
import './observer-3959f9dd.js';
|
|
25
25
|
import './string-a953eafc.js';
|
|
26
|
-
import './type-guard-
|
|
26
|
+
import './type-guard-12f7654b.js';
|
|
27
27
|
import './breakpoints-d9faf11c.js';
|
|
28
28
|
import './ui-8424715a.js';
|
|
29
|
-
import './regex-dfe11abf.js';
|
|
30
29
|
import './typography-396de03f.js';
|
|
31
30
|
import './dark-mode-style-controller-3bbb32dc.js';
|
|
32
31
|
import './static-subject-title-633b3474.js';
|
|
@@ -34,8 +33,8 @@ import './internal-vega-event-manager-526f8ed1.js';
|
|
|
34
33
|
import './try-get-document-bef0f526.js';
|
|
35
34
|
import './translation-833d9ef4.js';
|
|
36
35
|
import './synchronize-task-queue-ac8acc3b.js';
|
|
37
|
-
import './keyboard-manager-slimmer-
|
|
38
|
-
import './keyboard-manager-
|
|
36
|
+
import './keyboard-manager-slimmer-cae3a002.js';
|
|
37
|
+
import './keyboard-manager-ab521d22.js';
|
|
39
38
|
import './vega-env-manager-8f8dc473.js';
|
|
40
39
|
import './feature-flag-controller-51659753.js';
|
|
41
40
|
import './index-e9da316f.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, F as Fragment, H as Host, r as registerInstance, c as createEvent, g as getElement } from './index-057d0f70.js';
|
|
2
2
|
import { R as RequiredFieldRule } from './required-field-rule-ab4bdc47.js';
|
|
3
3
|
import { g as getActiveElement, s as sanitizeVegaComponent } from './component-7d906393.js';
|
|
4
|
-
import {
|
|
4
|
+
import { Q as isArrayOfType, R as isDropdownSourceItemType } from './type-guard-12f7654b.js';
|
|
5
5
|
import { c as MapToComponentField, M as MapToComponentMethod, V as VegaSlimmer, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
|
|
6
6
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-a84cc93e.js';
|
|
7
7
|
import { F as FormFieldControllerSlimmer } from './form-field-controller-slimmer-47820eaa.js';
|
|
@@ -13,14 +13,13 @@ import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
|
13
13
|
import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
|
|
14
14
|
import { D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-999e21e3.js';
|
|
15
15
|
import { h as VegaInternalDropdownTemplateItemsChange } from './vega-internal-event-id-b7c865de.js';
|
|
16
|
-
import { K as KeyboardManagerSlimmer } from './keyboard-manager-slimmer-
|
|
16
|
+
import { K as KeyboardManagerSlimmer } from './keyboard-manager-slimmer-cae3a002.js';
|
|
17
17
|
import { f as findParent } from './ui-c20be16d.js';
|
|
18
18
|
import { M as MutationObserverSlimmer } from './mutation-observer-slimmer-58ebc13c.js';
|
|
19
19
|
import { T as TagNameMutationFilter } from './mutation-observer-filters-1a054fb0.js';
|
|
20
20
|
import './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
|
|
21
21
|
import './breakpoints-d9faf11c.js';
|
|
22
22
|
import './ui-8424715a.js';
|
|
23
|
-
import './regex-dfe11abf.js';
|
|
24
23
|
import './typography-396de03f.js';
|
|
25
24
|
import './string-a953eafc.js';
|
|
26
25
|
import './observer-3959f9dd.js';
|
|
@@ -37,7 +36,7 @@ import './vega-env-manager-8f8dc473.js';
|
|
|
37
36
|
import './feature-flag-controller-51659753.js';
|
|
38
37
|
import './index-e9da316f.js';
|
|
39
38
|
import './_commonjsHelpers-9943807e.js';
|
|
40
|
-
import './keyboard-manager-
|
|
39
|
+
import './keyboard-manager-ab521d22.js';
|
|
41
40
|
|
|
42
41
|
const VegaComboBoxRuntimeMetricsPayloadDefinition = [
|
|
43
42
|
{
|