@progress/kendo-react-inputs 13.3.0-develop.9 → 13.4.0-develop.1
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/checkbox/Checkbox.d.ts +49 -0
- package/checkbox/Checkbox.js +1 -1
- package/checkbox/Checkbox.mjs +35 -36
- package/checkbox/interfaces/CheckboxBlurEvent.d.ts +14 -0
- package/checkbox/interfaces/CheckboxChangeEvent.d.ts +18 -0
- package/checkbox/interfaces/CheckboxFocusEvent.d.ts +14 -0
- package/checkbox/interfaces/CheckboxProps.d.ts +148 -0
- package/colors/ColorContrastLabels.d.ts +22 -0
- package/colors/ColorContrastSvg.d.ts +25 -0
- package/colors/ColorGradient.d.ts +215 -0
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +20 -19
- package/colors/ColorInput.d.ts +40 -0
- package/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +20 -16
- package/colors/ColorPalette.d.ts +129 -0
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +7 -7
- package/colors/ColorPicker.d.ts +34 -0
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +96 -94
- package/colors/FlatColorPicker.d.ts +189 -0
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +41 -40
- package/colors/HexInput.d.ts +39 -0
- package/colors/HexInput.js +1 -1
- package/colors/HexInput.mjs +2 -1
- package/colors/Picker.d.ts +13 -0
- package/colors/interfaces/ColorGradientChangeEvent.d.ts +18 -0
- package/colors/interfaces/ColorGradientProps.d.ts +160 -0
- package/colors/interfaces/ColorPaletteChangeEvent.d.ts +22 -0
- package/colors/interfaces/ColorPaletteProps.d.ts +116 -0
- package/colors/interfaces/ColorPickerActiveColorClick.d.ts +29 -0
- package/colors/interfaces/ColorPickerBlurEvent.d.ts +20 -0
- package/colors/interfaces/ColorPickerChangeEvent.d.ts +29 -0
- package/colors/interfaces/ColorPickerFocusEvent.d.ts +20 -0
- package/colors/interfaces/ColorPickerGradientSettings.d.ts +29 -0
- package/colors/interfaces/ColorPickerPaletteSettings.d.ts +39 -0
- package/colors/interfaces/ColorPickerPopupSettings.d.ts +21 -0
- package/colors/interfaces/ColorPickerProps.d.ts +242 -0
- package/colors/interfaces/ColorPickerView.d.ts +17 -0
- package/colors/interfaces/PickerPopupSettings.d.ts +29 -0
- package/colors/interfaces/PickerProps.d.ts +57 -0
- package/colors/models/hsva.d.ts +16 -0
- package/colors/models/output-format.d.ts +11 -0
- package/colors/models/palette-presets.d.ts +60 -0
- package/colors/models/rgb.d.ts +15 -0
- package/colors/models/rgba.d.ts +16 -0
- package/colors/models/table-cell.d.ts +14 -0
- package/colors/models/tile-size.d.ts +18 -0
- package/colors/utils/color-cache.d.ts +37 -0
- package/colors/utils/color-palette.service.d.ts +19 -0
- package/colors/utils/color-parser.d.ts +72 -0
- package/colors/utils/color-parser.js +1 -1
- package/colors/utils/color-parser.mjs +1 -1
- package/colors/utils/misc.d.ts +23 -0
- package/colors/utils/svg-calc.d.ts +69 -0
- package/common/AdaptiveMode.d.ts +21 -0
- package/common/SliderTooltip.d.ts +25 -0
- package/common/SwitchController.d.ts +38 -0
- package/common/SwitchModel.d.ts +14 -0
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +72 -5128
- package/index.d.ts +72 -5128
- package/input/Input.d.ts +119 -0
- package/input/Input.js +1 -1
- package/input/Input.mjs +45 -43
- package/input/InputClearValue.d.ts +28 -0
- package/input/InputPrefix.d.ts +30 -0
- package/input/InputSeparator.d.ts +30 -0
- package/input/InputSuffix.d.ts +32 -0
- package/input/InputValidationIcon.d.ts +21 -0
- package/input/interfaces/InputChangeEvent.d.ts +18 -0
- package/interfaces/Direction.d.ts +8 -0
- package/interfaces/ToggleBaseProps.d.ts +24 -0
- package/maskedtextbox/MaskedTextBox.d.ts +224 -0
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +80 -79
- package/maskedtextbox/MaskedTextBoxProps.d.ts +273 -0
- package/maskedtextbox/masking.service.d.ts +48 -0
- package/maskedtextbox/masking.service.mjs +9 -9
- package/maskedtextbox/parsing/combinators.d.ts +16 -0
- package/maskedtextbox/parsing/parsers.d.ts +54 -0
- package/maskedtextbox/parsing/result.d.ts +30 -0
- package/maskedtextbox/parsing/stream.d.ts +29 -0
- package/maskedtextbox/utils.d.ts +23 -0
- package/messages/index.d.ts +177 -0
- package/numerictextbox/NumericTextBox.d.ts +21 -0
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +161 -161
- package/numerictextbox/interfaces/NumericTextBoxBlurEvent.d.ts +14 -0
- package/numerictextbox/interfaces/NumericTextBoxChangeEvent.d.ts +18 -0
- package/numerictextbox/interfaces/NumericTextBoxFocusEvent.d.ts +14 -0
- package/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +46 -0
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +212 -0
- package/numerictextbox/interfaces/NumericTextBoxState.d.ts +22 -0
- package/numerictextbox/utils/index.d.ts +126 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +10 -10
- package/radiobutton/RadioButton.d.ts +36 -0
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +8 -8
- package/radiobutton/RadioGroup.d.ts +36 -0
- package/radiobutton/interfaces/RadioButtonBlurEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioButtonChangeEvent.d.ts +18 -0
- package/radiobutton/interfaces/RadioButtonFocusEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioButtonProps.d.ts +107 -0
- package/radiobutton/interfaces/RadioGroupChangeEvent.d.ts +18 -0
- package/radiobutton/interfaces/RadioGroupFocusEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioGroupProps.d.ts +178 -0
- package/range-slider/RangeSlider.d.ts +152 -0
- package/range-slider/range-raducer.d.ts +46 -0
- package/rating/Rating.d.ts +302 -0
- package/rating/Rating.mjs +3 -3
- package/rating/RatingItem.d.ts +111 -0
- package/rating/models/index.d.ts +91 -0
- package/rating/rating-reducer.d.ts +39 -0
- package/rating/utils/index.d.ts +31 -0
- package/signature/Signature.d.ts +21 -0
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +26 -23
- package/signature/interfaces/SignatureBlurEvent.d.ts +14 -0
- package/signature/interfaces/SignatureChangeEvent.d.ts +18 -0
- package/signature/interfaces/SignatureCloseEvent.d.ts +14 -0
- package/signature/interfaces/SignatureFocusEvent.d.ts +14 -0
- package/signature/interfaces/SignatureHandle.d.ts +49 -0
- package/signature/interfaces/SignatureOpenEvent.d.ts +14 -0
- package/signature/interfaces/SignatureProps.d.ts +324 -0
- package/signature/interfaces/index.d.ts +14 -0
- package/signature/utils/index.d.ts +11 -0
- package/slider/Slider.d.ts +288 -0
- package/slider/Slider.mjs +9 -9
- package/slider/SliderLabel.d.ts +51 -0
- package/switch/Switch.d.ts +397 -0
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +29 -22
- package/textarea/TextArea.d.ts +40 -0
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +41 -41
- package/textarea/interfaces/TextAreaBlurEvent.d.ts +14 -0
- package/textarea/interfaces/TextAreaChangeEvent.d.ts +18 -0
- package/textarea/interfaces/TextAreaFocusEvent.d.ts +14 -0
- package/textarea/interfaces/TextAreaProps.d.ts +199 -0
- package/textbox/Textbox.d.ts +99 -0
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +70 -66
- package/utils.d.ts +11 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CustomComponent, FormComponentProps, InputsClassStructure } from '@progress/kendo-react-common';
|
|
9
|
+
import { MaskedTextBox } from './MaskedTextBox.js';
|
|
10
|
+
/**
|
|
11
|
+
* The arguments for a MaskedTextBox event.
|
|
12
|
+
*/
|
|
13
|
+
export interface MaskedTextBoxEvent {
|
|
14
|
+
/**
|
|
15
|
+
* A native DOM event.
|
|
16
|
+
*/
|
|
17
|
+
nativeEvent: Event;
|
|
18
|
+
/**
|
|
19
|
+
* A React [`SyntheticEvent`](https://react.dev/learn/responding-to-events).
|
|
20
|
+
*/
|
|
21
|
+
syntheticEvent: React.SyntheticEvent<HTMLElement>;
|
|
22
|
+
/**
|
|
23
|
+
* An event target.
|
|
24
|
+
*/
|
|
25
|
+
target: MaskedTextBox;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The arguments for the `change` event of the MaskedTextBox.
|
|
29
|
+
*/
|
|
30
|
+
export interface MaskedTextBoxChangeEvent extends MaskedTextBoxEvent {
|
|
31
|
+
/**
|
|
32
|
+
* Specifies the start of the selection which will be set to the MaskedTextBox when it is updated.
|
|
33
|
+
*/
|
|
34
|
+
selectionStart: number;
|
|
35
|
+
/**
|
|
36
|
+
* Specifies the end of the selection which will be set to the MaskedTextBox when it is updated.
|
|
37
|
+
*/
|
|
38
|
+
selectionEnd: number;
|
|
39
|
+
/**
|
|
40
|
+
* The current value of the component.
|
|
41
|
+
*/
|
|
42
|
+
value: any;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Represents the props of the [KendoReact MaskedTextBox component](https://www.telerik.com/kendo-react-ui/components/inputs/maskedtextbox).
|
|
46
|
+
*/
|
|
47
|
+
export interface MaskedTextBoxProps extends FormComponentProps {
|
|
48
|
+
/**
|
|
49
|
+
* Sets a class of the MaskedTextBox DOM element.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```jsx
|
|
53
|
+
* <MaskedTextBox className="custom-class" />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
className?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Sets additional CSS styles to the MaskedTextBox DOM element.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```jsx
|
|
62
|
+
* <MaskedTextBox style={{ color: 'red' }} />
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
style?: React.CSSProperties;
|
|
66
|
+
/**
|
|
67
|
+
* Specifies the value of the MaskedTextBox.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```jsx
|
|
71
|
+
* <MaskedTextBox value="123-45-6789" />
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
value?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Specifies the initial value. Leaves the subsequent updates uncontrolled.
|
|
77
|
+
*/
|
|
78
|
+
defaultValue?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Specifies the input placeholder.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```jsx
|
|
84
|
+
* <MaskedTextBox placeholder="Enter text here" />
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
placeholder?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Sets the title of the `input` element of the MaskedTextBox.
|
|
90
|
+
*/
|
|
91
|
+
title?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Represents the `dir` HTML attribute.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```jsx
|
|
97
|
+
* <MaskedTextBox dir="rtl" />
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
dir?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Sets the `tabIndex` property of the MaskedTextBox.
|
|
103
|
+
*/
|
|
104
|
+
tabIndex?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Specifies the `accessKey` of the MaskedTextBox.
|
|
107
|
+
*/
|
|
108
|
+
accessKey?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Specifies the width of the MaskedTextBox.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```jsx
|
|
114
|
+
* <MaskedTextBox width="200px" />
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
width?: number | string;
|
|
118
|
+
/**
|
|
119
|
+
* Determines whether the MaskedTextBox is disabled.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```jsx
|
|
123
|
+
* <MaskedTextBox disabled={true} />
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
disabled?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Renders a floating label for the MaskedTextBox.
|
|
129
|
+
*/
|
|
130
|
+
label?: React.ReactNode;
|
|
131
|
+
/**
|
|
132
|
+
* Sets the `id` of the `input` DOM element.
|
|
133
|
+
*/
|
|
134
|
+
id?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Sets a custom prefix to the MaskedTextBox component.
|
|
137
|
+
*/
|
|
138
|
+
prefix?: CustomComponent<any>;
|
|
139
|
+
/**
|
|
140
|
+
* Sets a custom suffix to the MaskedTextBox component.
|
|
141
|
+
*/
|
|
142
|
+
suffix?: CustomComponent<any>;
|
|
143
|
+
/**
|
|
144
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
145
|
+
* For example these elements could contain error or hint message.
|
|
146
|
+
*/
|
|
147
|
+
ariaDescribedBy?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Identifies the element(s) which will label the component.
|
|
150
|
+
*/
|
|
151
|
+
ariaLabelledBy?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Determines whether the MaskedTextBox is in its read-only state.
|
|
154
|
+
*/
|
|
155
|
+
readonly?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Represents a prompt character for the masked value. Defaults to `_`.
|
|
158
|
+
*/
|
|
159
|
+
prompt?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Indicates a character which represents an empty position in the raw value. Defaults to ` `.
|
|
162
|
+
*/
|
|
163
|
+
promptPlaceholder?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Indicates whether to include literals in the raw value. Defaults to `false`.
|
|
166
|
+
*/
|
|
167
|
+
includeLiterals?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Determines whether the built-in mask validator is enforced when a form is validated. Defaults to `true`.
|
|
170
|
+
*/
|
|
171
|
+
maskValidation?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Represents the current mask. If no mask is set, the component behaves as a standard `type="text"` input.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```jsx
|
|
177
|
+
* <MaskedTextBox mask="(999) 000-0000" />
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
mask?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Represents the RegExp-based mask validation array.
|
|
183
|
+
*/
|
|
184
|
+
rules?: {
|
|
185
|
+
[key: string]: RegExp;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Represents the beginning and ending of the selected portion of the input content that will be applied the next time when the MaskedTextBox is rendered.
|
|
189
|
+
*/
|
|
190
|
+
selection?: {
|
|
191
|
+
start: number;
|
|
192
|
+
end: number;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Determines the event handler that will be fired when the user edits the value.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```jsx
|
|
199
|
+
* <MaskedTextBox onChange={(e) => console.log(e.value)} />
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
onChange?: (event: MaskedTextBoxChangeEvent) => void;
|
|
203
|
+
/**
|
|
204
|
+
* Fires each time the user focuses the MaskedTextBox.
|
|
205
|
+
*/
|
|
206
|
+
onFocus?: (event: MaskedTextBoxEvent) => void;
|
|
207
|
+
/**
|
|
208
|
+
* Fires each time the MaskedTextBox gets blurred.
|
|
209
|
+
*/
|
|
210
|
+
onBlur?: (event: MaskedTextBoxEvent) => void;
|
|
211
|
+
/**
|
|
212
|
+
* Configures the `size` of the MaskedTextBox.
|
|
213
|
+
*
|
|
214
|
+
* The available options are:
|
|
215
|
+
* - small
|
|
216
|
+
* - medium
|
|
217
|
+
* - large
|
|
218
|
+
*
|
|
219
|
+
* @default undefined (theme-controlled)
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```tsx
|
|
223
|
+
* <MaskedTextBox size="large" />
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
size?: 'small' | 'medium' | 'large';
|
|
227
|
+
/**
|
|
228
|
+
* Configures the `roundness` of the MaskedTextBox.
|
|
229
|
+
*
|
|
230
|
+
* The available options are:
|
|
231
|
+
* - small
|
|
232
|
+
* - medium
|
|
233
|
+
* - large
|
|
234
|
+
* - full
|
|
235
|
+
*
|
|
236
|
+
* @default undefined (theme-controlled)
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```tsx
|
|
240
|
+
* <MaskedTextBox rounded="full" />
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
244
|
+
/**
|
|
245
|
+
* Configures the `fillMode` of the MaskedTextBox.
|
|
246
|
+
*
|
|
247
|
+
* The available options are:
|
|
248
|
+
* - solid
|
|
249
|
+
* - outline
|
|
250
|
+
* - flat
|
|
251
|
+
*
|
|
252
|
+
* @default undefined (theme-controlled)
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```tsx
|
|
256
|
+
* <MaskedTextBox fillMode="outline" />
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
fillMode?: 'solid' | 'flat' | 'outline';
|
|
260
|
+
/**
|
|
261
|
+
* Represents the `autoFocus` HTML attribute that will be applied to the input element of the MaskedTextBox. (Defaults to `false`)
|
|
262
|
+
*/
|
|
263
|
+
autoFocus?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* @hidden
|
|
266
|
+
*/
|
|
267
|
+
unstyled?: InputsClassStructure;
|
|
268
|
+
/**
|
|
269
|
+
* Sets the HTML attributes of the inner focusable input element.
|
|
270
|
+
* Attributes which are essential for certain component functionalities cannot be changed.
|
|
271
|
+
*/
|
|
272
|
+
inputAttributes?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
273
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare class MaskingService {
|
|
12
|
+
rules: {
|
|
13
|
+
[key: string]: RegExp;
|
|
14
|
+
};
|
|
15
|
+
prompt: string;
|
|
16
|
+
mask: string;
|
|
17
|
+
promptPlaceholder: string;
|
|
18
|
+
includeLiterals: boolean;
|
|
19
|
+
maskTokens: any[];
|
|
20
|
+
unmaskTokens: any[];
|
|
21
|
+
rawTokens: any[];
|
|
22
|
+
validationTokens: any[];
|
|
23
|
+
update({ mask, prompt, promptPlaceholder, rules, includeLiterals }: any): void;
|
|
24
|
+
validationValue(maskedValue?: string): string;
|
|
25
|
+
rawValue(maskedValue?: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
maskRaw(rawValue?: string): string;
|
|
30
|
+
maskInput(input: string, control: string, splitPoint: number): any;
|
|
31
|
+
maskInRange(pasted: string, oldValue: string, start: number, end: number): any;
|
|
32
|
+
private maskRemoved;
|
|
33
|
+
private adjustPosition;
|
|
34
|
+
private maskInserted;
|
|
35
|
+
protected get maskTokenCreator(): {
|
|
36
|
+
[key: string]: Function;
|
|
37
|
+
};
|
|
38
|
+
protected get unmaskTokenCreator(): {
|
|
39
|
+
[key: string]: Function;
|
|
40
|
+
};
|
|
41
|
+
protected get rawTokenCreator(): {
|
|
42
|
+
[key: string]: Function;
|
|
43
|
+
};
|
|
44
|
+
protected get validationTokenCreator(): {
|
|
45
|
+
[key: string]: Function;
|
|
46
|
+
};
|
|
47
|
+
private tokenize;
|
|
48
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { sequence as i, greedy as k } from "./parsing/combinators.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { mask as d, literal as T, unmask as p, unliteral as f, rawMask as m, rawLiteral as c, token as u } from "./parsing/parsers.mjs";
|
|
10
10
|
class C {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.rules = {}, this.prompt = "_", this.mask = "", this.promptPlaceholder = " ", this.includeLiterals = !1, this.maskTokens = [], this.unmaskTokens = [], this.rawTokens = [], this.validationTokens = [];
|
|
@@ -79,28 +79,28 @@ class C {
|
|
|
79
79
|
get maskTokenCreator() {
|
|
80
80
|
const { prompt: e, promptPlaceholder: s } = this;
|
|
81
81
|
return {
|
|
82
|
-
literal: (t) =>
|
|
83
|
-
mask: (t) =>
|
|
82
|
+
literal: (t) => T(t),
|
|
83
|
+
mask: (t) => d({ prompt: e, promptPlaceholder: s })(t)
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
get unmaskTokenCreator() {
|
|
87
87
|
return {
|
|
88
|
-
literal: (e) =>
|
|
89
|
-
mask: (e) =>
|
|
88
|
+
literal: (e) => f(e),
|
|
89
|
+
mask: (e) => p(this.prompt)(e)
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
get rawTokenCreator() {
|
|
93
93
|
const { prompt: e, promptPlaceholder: s, includeLiterals: t } = this;
|
|
94
94
|
return {
|
|
95
|
-
literal: (r) =>
|
|
96
|
-
mask: (r) =>
|
|
95
|
+
literal: (r) => c(t),
|
|
96
|
+
mask: (r) => m({ prompt: e, promptPlaceholder: s })
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
get validationTokenCreator() {
|
|
100
100
|
const { prompt: e } = this;
|
|
101
101
|
return {
|
|
102
|
-
literal: (s) =>
|
|
103
|
-
mask: (s) =>
|
|
102
|
+
literal: (s) => c(!1),
|
|
103
|
+
mask: (s) => m({ prompt: e, promptPlaceholder: "" })
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
tokenize() {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Parser } from './parsers.js';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const sequence: (list: any) => any;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare const greedy: (parser: any) => Parser;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Result } from './result.js';
|
|
9
|
+
import { Stream } from './stream.js';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export declare class Parser {
|
|
14
|
+
private parse;
|
|
15
|
+
constructor(parse: Function);
|
|
16
|
+
run(input: Stream | string, control?: string): Result;
|
|
17
|
+
map(f: Function): Parser;
|
|
18
|
+
chain(f: Function): Parser;
|
|
19
|
+
isLiteral(c: string): boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export declare const mask: (args: {
|
|
25
|
+
prompt: any;
|
|
26
|
+
promptPlaceholder: any;
|
|
27
|
+
}) => (rule: any) => Parser;
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
export declare const literal: (_token: any) => Parser;
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export declare const unmask: (prompt: any) => (rule: any) => Parser;
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
export declare const unliteral: (_token: any) => Parser;
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export declare const token: (rules: any, creator: any) => Parser;
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
export declare const rawMask: (args: {
|
|
48
|
+
prompt: any;
|
|
49
|
+
promptPlaceholder: any;
|
|
50
|
+
}) => Parser;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
export declare const rawLiteral: (includeLiterals: any) => Parser;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Stream } from './stream.js';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare enum ResultType {
|
|
13
|
+
Literal = 0,
|
|
14
|
+
Mask = 1,
|
|
15
|
+
Undefined = 2
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare class Result {
|
|
21
|
+
private value;
|
|
22
|
+
private rest;
|
|
23
|
+
type: ResultType;
|
|
24
|
+
constructor(value: any, rest: Stream, type?: ResultType);
|
|
25
|
+
map(fn: Function): Result;
|
|
26
|
+
chain(fn: Function): Result;
|
|
27
|
+
fold(s: Function, _?: Function): Result;
|
|
28
|
+
concat(r: Result): Result;
|
|
29
|
+
toString(): string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare class Stream {
|
|
12
|
+
private input;
|
|
13
|
+
private control;
|
|
14
|
+
private inputCursor;
|
|
15
|
+
private controlCursor;
|
|
16
|
+
constructor(input?: any[], control?: any[]);
|
|
17
|
+
eof(): boolean;
|
|
18
|
+
next(): {
|
|
19
|
+
char: string;
|
|
20
|
+
control: string;
|
|
21
|
+
};
|
|
22
|
+
peek(): {
|
|
23
|
+
char: string;
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
eat_input(): void;
|
|
27
|
+
eat_control(): void;
|
|
28
|
+
eat(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { MaskedTextBoxProps } from './MaskedTextBoxProps.js';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
declare const defaultRules: {
|
|
13
|
+
[key: string]: RegExp;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
declare const returnFalse: () => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
declare const maskingChanged: (prev: MaskedTextBoxProps, next: MaskedTextBoxProps) => boolean;
|
|
23
|
+
export { defaultRules, maskingChanged, returnFalse };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare const numericIncreaseValue = "numerictextbox.increment";
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare const numericDecreaseValue = "numerictextbox.decrement";
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export declare const sliderIncreaseValue = "slider.increment";
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export declare const sliderDecreaseValue = "slider.decrement";
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export declare const sliderDragTitle = "slider.dragTitle";
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
*/
|
|
31
|
+
export declare const colorGradientR = "colorGradient.r";
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export declare const colorGradientG = "colorGradient.g";
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
export declare const colorGradientB = "colorGradient.b";
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export declare const colorGradientA = "colorGradient.a";
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
export declare const colorGradientHex = "colorGradient.hex";
|
|
48
|
+
/**
|
|
49
|
+
* @hidden
|
|
50
|
+
*/
|
|
51
|
+
export declare const colorGradientContrastRatio = "colorGradient.contrastRatio";
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
export declare const colorGradientAALevel = "colorGradient.colorGradientAALevel";
|
|
56
|
+
/**
|
|
57
|
+
* @hidden
|
|
58
|
+
*/
|
|
59
|
+
export declare const colorGradientAAALevel = "colorGradient.colorGradientAAALevel";
|
|
60
|
+
/**
|
|
61
|
+
* @hidden
|
|
62
|
+
*/
|
|
63
|
+
export declare const colorGradientPass = "colorGradient.colorGradientPass";
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
export declare const colorGradientFail = "colorGradient.colorGradientFail";
|
|
68
|
+
/**
|
|
69
|
+
* @hidden
|
|
70
|
+
*/
|
|
71
|
+
export declare const colorGradientHueSliderLabel = "colorGradient.hueSliderLabel";
|
|
72
|
+
/**
|
|
73
|
+
* @hidden
|
|
74
|
+
*/
|
|
75
|
+
export declare const colorGradientAlphaSliderLabel = "colorGradient.alphaSliderLabel";
|
|
76
|
+
/**
|
|
77
|
+
* @hidden
|
|
78
|
+
*/
|
|
79
|
+
export declare const colorGradientToggleInputsButton = "colorGradient.toggleInputsButton";
|
|
80
|
+
/**
|
|
81
|
+
* @hidden
|
|
82
|
+
*/
|
|
83
|
+
export declare const flatColorPickerCancelBtn = "flatColorPicker.cancelBtn";
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
export declare const flatColorPickerApplyBtn = "flatColorPicker.applyBtn";
|
|
88
|
+
/**
|
|
89
|
+
* @hidden
|
|
90
|
+
*/
|
|
91
|
+
export declare const flatColorPickerColorGradientBtn = "flatColorPicker.colorGradientBtn";
|
|
92
|
+
/**
|
|
93
|
+
* @hidden
|
|
94
|
+
*/
|
|
95
|
+
export declare const flatColorPickerColorPaletteBtn = "flatColorPicker.colorPaletteBtn";
|
|
96
|
+
/**
|
|
97
|
+
* @hidden
|
|
98
|
+
*/
|
|
99
|
+
export declare const flatColorPickerClearBtn = "flatColorPicker.clearBtn";
|
|
100
|
+
/**
|
|
101
|
+
* @hidden
|
|
102
|
+
*/
|
|
103
|
+
export declare const colorPickerAdaptiveTitle = "colorPicker.adaptiveTitle";
|
|
104
|
+
/**
|
|
105
|
+
* @hidden
|
|
106
|
+
*/
|
|
107
|
+
export declare const checkboxValidation = "checkbox.validation";
|
|
108
|
+
/**
|
|
109
|
+
* @hidden
|
|
110
|
+
*/
|
|
111
|
+
export declare const checkboxOptionalText = "checkbox.optionalText";
|
|
112
|
+
/**
|
|
113
|
+
* @hidden
|
|
114
|
+
*/
|
|
115
|
+
export declare const radioButtonValidation = "radioButton.validation";
|
|
116
|
+
/**
|
|
117
|
+
* @hidden
|
|
118
|
+
*/
|
|
119
|
+
export declare const switchValidation = "switch.validation";
|
|
120
|
+
/**
|
|
121
|
+
* @hidden
|
|
122
|
+
*/
|
|
123
|
+
export declare const colorPickerDropdownButtonAriaLabel = "colorPicker.dropdownButtonAriaLabel";
|
|
124
|
+
/**
|
|
125
|
+
* @hidden
|
|
126
|
+
*/
|
|
127
|
+
export declare const ratingAriaLabel = "rating.ariaLabel";
|
|
128
|
+
/**
|
|
129
|
+
* @hidden
|
|
130
|
+
*/
|
|
131
|
+
export declare const signatureClear = "signature.clear";
|
|
132
|
+
/**
|
|
133
|
+
* @hidden
|
|
134
|
+
*/
|
|
135
|
+
export declare const signatureMaximize = "signature.maximize";
|
|
136
|
+
/**
|
|
137
|
+
* @hidden
|
|
138
|
+
*/
|
|
139
|
+
export declare const signatureMinimize = "signature.minimize";
|
|
140
|
+
/**
|
|
141
|
+
* @hidden
|
|
142
|
+
*/
|
|
143
|
+
export declare const messages: {
|
|
144
|
+
"numerictextbox.increment": string;
|
|
145
|
+
"numerictextbox.decrement": string;
|
|
146
|
+
"slider.increment": string;
|
|
147
|
+
"slider.decrement": string;
|
|
148
|
+
"slider.dragTitle": string;
|
|
149
|
+
"colorGradient.r": string;
|
|
150
|
+
"colorGradient.g": string;
|
|
151
|
+
"colorGradient.b": string;
|
|
152
|
+
"colorGradient.a": string;
|
|
153
|
+
"colorGradient.hex": string;
|
|
154
|
+
"colorGradient.contrastRatio": string;
|
|
155
|
+
"colorGradient.colorGradientAALevel": string;
|
|
156
|
+
"colorGradient.colorGradientAAALevel": string;
|
|
157
|
+
"colorGradient.colorGradientPass": string;
|
|
158
|
+
"colorGradient.colorGradientFail": string;
|
|
159
|
+
"colorGradient.hueSliderLabel": string;
|
|
160
|
+
"colorGradient.alphaSliderLabel": string;
|
|
161
|
+
"colorGradient.toggleInputsButton": string;
|
|
162
|
+
"flatColorPicker.cancelBtn": string;
|
|
163
|
+
"flatColorPicker.applyBtn": string;
|
|
164
|
+
"flatColorPicker.colorGradientBtn": string;
|
|
165
|
+
"flatColorPicker.colorPaletteBtn": string;
|
|
166
|
+
"flatColorPicker.clearBtn": string;
|
|
167
|
+
"colorPicker.adaptiveTitle": string;
|
|
168
|
+
"checkbox.validation": string;
|
|
169
|
+
"checkbox.optionalText": string;
|
|
170
|
+
"radioButton.validation": string;
|
|
171
|
+
"switch.validation": string;
|
|
172
|
+
"colorPicker.dropdownButtonAriaLabel": string;
|
|
173
|
+
"rating.ariaLabel": string;
|
|
174
|
+
"signature.clear": string;
|
|
175
|
+
"signature.maximize": string;
|
|
176
|
+
"signature.minimize": string;
|
|
177
|
+
};
|