extended-dynamic-forms 0.3.13 → 0.4.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/README.md +580 -25
- package/dist/WizardForm.d.ts +17 -2
- package/dist/components/FieldFeedbackContext.d.ts +4 -0
- package/dist/components/FieldStyleContext.d.ts +7 -0
- package/dist/components/SchemaSelectionContext.d.ts +20 -0
- package/dist/components/URLBlurValidationContext.d.ts +38 -0
- package/dist/components/fields/TextChangeScope.d.ts +28 -0
- package/dist/components/fields/TextEmptyArrayField.d.ts +3 -0
- package/dist/conditionals/v2/createConditionalEngineHook.d.ts +3 -1
- package/dist/conditionals/v2/index.d.ts +2 -1
- package/dist/conditionals/v2/types.d.ts +13 -0
- package/dist/conditionals/v2/utils/stepRules.d.ts +35 -0
- package/dist/events/FormEventContext.d.ts +3 -0
- package/dist/index.es.js +41796 -32825
- package/dist/index.umd.js +1618 -1606
- package/dist/layouts/wizard/WizardLayout.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/utils/normalizeUrlValue.d.ts +3 -0
- package/dist/utils/urlValue.d.ts +12 -0
- package/dist/widgets/base/URLParts.d.ts +5 -0
- package/dist/widgets/base/URLPreviewLink.d.ts +5 -0
- package/dist/widgets/base/inputStyles.d.ts +4 -0
- package/dist/widgets/base/inputTypography.d.ts +3 -0
- package/dist/widgets/base/numberInputStyles.d.ts +4 -0
- package/dist/widgets/base/telephoneAddons.d.ts +3 -0
- package/dist/widgets/base/types.d.ts +15 -1
- package/dist/widgets/base/useInputChrome.d.ts +5 -0
- package/dist/widgets/base/utils.d.ts +9 -1
- package/dist/widgets/choice/ChoiceWidget.types.d.ts +2 -0
- package/dist/widgets/choice/dropdownValidation.d.ts +8 -0
- package/dist/widgets/choice/inlineChoiceValidation.d.ts +5 -0
- package/dist/widgets/choice/presenters/InlineChoiceGroup.d.ts +888 -0
- package/dist/widgets/date/DateTimeWidget.d.ts +2 -21
- package/dist/widgets/date/calendarConstraints.d.ts +5 -0
- package/dist/widgets/date/dateRangeValue.d.ts +20 -0
- package/dist/widgets/date/dateTimeValue.d.ts +15 -0
- package/dist/widgets/file/FileUploadWidget.d.ts +3 -32
- package/dist/widgets/index.d.ts +6 -6
- package/dist/widgets/input/TelephoneWidget.d.ts +1 -1
- package/dist/widgets/input/emailValidation.d.ts +7 -0
- package/dist/widgets/input/telephoneMask.d.ts +7 -0
- package/dist/widgets/input/telephoneOptions.d.ts +14 -0
- package/package.json +9 -3
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}.rjsf-form{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.vertical-form-item .ant-form-item-label{padding-bottom:0!important;margin-bottom:0}.vertical-form-item .ant-form-item-label>label{margin-bottom:0}.vertical-form-item .edf-field-description,.vertical-form-item .edf-field-help{color:#8c8c8c;font-size:13px;line-height:1.5}.vertical-form-item .edf-field-description{margin-bottom:8px}.vertical-form-item .edf-field-help{margin-top:4px}.vertical-form-item.ant-form-item-has-error .edf-field-help{color:#8c8c8c}.vertical-form-item .edf-field-help-container{display:flex;flex-direction:column;gap:4px}.vertical-form-item .edf-field-error{margin-top:4px;color:#ff4d4f;font-size:13px;line-height:1.5}.vertical-form-item .ant-form-item-explain{transition:none!important}.ant-form-item-has-error .ant-form-item-label>label{color:#ff4d4f}.ant-form-item-required:before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:"*"}.edf-choice-widget{position:relative;width:100%}.edf-choice-widget--small{font-size:12px}.edf-choice-widget--middle{font-size:14px}.edf-choice-widget--large{font-size:16px}.edf-choice-widget--disabled{opacity:.6;cursor:not-allowed}.edf-choice-widget--readonly{pointer-events:none}.edf-choice-widget__loading{display:flex;align-items:center;gap:8px;padding:8px;color:#666}.edf-choice-widget__loading-spinner{display:inline-block;width:16px;height:16px;border:2px solid #f3f3f3;border-top:2px solid #1890ff;border-radius:50%;animation:edf-spin 1s linear infinite}.edf-choice-widget__loading-message{font-size:14px}.edf-choice-widget__loading-progress{width:100%;height:4px;background-color:#f0f0f0;border-radius:2px;overflow:hidden;margin-top:4px}.edf-choice-widget__loading-progress-bar{height:100%;background-color:#1890ff;transition:width .3s ease}.edf-choice-widget__error{display:flex;align-items:center;gap:8px;padding:8px;color:#ff4d4f;background-color:#fff2f0;border:1px solid #ffccc7;border-radius:4px;margin-top:4px}.edf-choice-widget__error-icon{font-size:16px;flex-shrink:0}.edf-choice-widget__error-message{font-size:14px;flex:1}.edf-choice-widget__error-hint{font-size:12px;color:#8c8c8c;font-style:italic}.edf-choice-widget__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;color:#8c8c8c;text-align:center}.edf-choice-widget__empty-icon{font-size:32px;margin-bottom:8px;opacity:.5}.edf-choice-widget__empty-message{font-size:14px}@keyframes edf-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.edf-choice-widget--dropdown .edf-choice-widget__wrapper{position:relative}.edf-choice-widget--dropdown .edf-choice-widget__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#ffffffe6;display:flex;align-items:center;justify-content:center;z-index:10;border-radius:4px}.edf-choice-widget--dropdown .edf-choice-widget__option-icon{margin-right:4px;display:inline-flex;align-items:center}.edf-choice-widget--dropdown .edf-choice-widget__option-label{flex:1}.edf-choice-widget--dropdown .edf-choice-widget__option-description{display:block;font-size:12px;color:#8c8c8c;margin-top:2px;white-space:normal}.edf-choice-widget--dropdown.has-error .ant-select-selector{border-color:#ff4d4f!important}.edf-choice-widget--dropdown.has-error .ant-select-focused .ant-select-selector{border-color:#ff7875!important;box-shadow:0 0 0 2px #ff4d4f33}.edf-choice-widget--radio .edf-choice-widget__wrapper{position:relative}.edf-choice-widget--radio .edf-choice-widget__radio-content{display:flex;flex-direction:column;gap:2px}.edf-choice-widget--radio .edf-choice-widget__radio-main{display:flex;align-items:center;gap:4px}.edf-choice-widget--radio .edf-choice-widget__option-icon{display:inline-flex;align-items:center;font-size:16px}.edf-choice-widget--radio .edf-choice-widget__option-label{font-weight:500}.edf-choice-widget--radio .edf-choice-widget__option-description{margin-left:24px;font-size:12px;color:#8c8c8c;line-height:1.5}.edf-choice-widget--radio .edf-choice-widget__radio-group-label{font-weight:600;color:#595959;margin-bottom:8px;margin-top:16px;padding-bottom:4px;border-bottom:1px solid #f0f0f0}.edf-choice-widget--radio .edf-choice-widget__radio-group-label:first-child{margin-top:0}.edf-choice-widget--radio .edf-choice-widget__radio-divider{height:1px;background-color:#f0f0f0;margin:12px 0}.edf-choice-widget--radio.has-error .ant-radio-group{border:1px solid #ff4d4f;border-radius:4px;padding:8px}.edf-choice-widget--radio .ant-radio-wrapper{margin-bottom:8px;display:flex;align-items:flex-start}.edf-choice-widget--radio .ant-radio-wrapper:last-child{margin-bottom:0}.edf-choice-widget--radio .ant-radio-wrapper-disabled{cursor:not-allowed;opacity:.6}.edf-choice-widget--radio .ant-space-horizontal .ant-radio-wrapper{margin-bottom:0;margin-right:16px}.edf-choice-widget--radio .ant-space-horizontal .ant-radio-wrapper:last-child{margin-right:0}
|
|
1
|
+
html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}.rjsf-form{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.edf-text-status-background,:where(.edf-text-status-group) .ant-input-affix-wrapper,:where(.edf-text-status-group) :where(.ant-input-wrapper)>.ant-input{background-color:var(--edf-text-status-bg)}.vertical-form-item .ant-form-item-label{padding-bottom:0!important;margin-bottom:0}.vertical-form-item .ant-form-item-label>label{margin-bottom:0}.vertical-form-item .edf-field-description,.vertical-form-item .edf-field-help{color:#8c8c8c;font-size:13px;line-height:1.5}.vertical-form-item .edf-field-description{margin-bottom:8px}.vertical-form-item .edf-field-help{margin-top:4px}.vertical-form-item.ant-form-item-has-error .edf-field-help{color:#8c8c8c}.vertical-form-item .edf-field-help-container{display:flex;flex-direction:column;gap:4px}.vertical-form-item .edf-field-error{margin-top:4px;color:#ff4d4f;font-size:13px;line-height:1.5}.vertical-form-item .ant-form-item-explain{transition:none!important}.ant-form-item-has-error .ant-form-item-label>label{color:#ff4d4f}.ant-form-item-required:before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:"*"}.edf-range-widget.edf-range-handle-fill [role=slider]:after{background-color:var(--edf-slider-handle-fill)}.edf-choice-widget{position:relative;width:100%}.edf-choice-widget--small{font-size:12px}.edf-choice-widget--middle{font-size:14px}.edf-choice-widget--large{font-size:16px}.edf-choice-widget--disabled{opacity:.6;cursor:not-allowed}.edf-choice-widget--readonly{pointer-events:none}.edf-choice-widget__loading{display:flex;align-items:center;gap:8px;padding:8px;color:#666}.edf-choice-widget__loading-spinner{display:inline-block;width:16px;height:16px;border:2px solid #f3f3f3;border-top:2px solid #1890ff;border-radius:50%;animation:edf-spin 1s linear infinite}.edf-choice-widget__loading-message{font-size:14px}.edf-choice-widget__loading-progress{width:100%;height:4px;background-color:#f0f0f0;border-radius:2px;overflow:hidden;margin-top:4px}.edf-choice-widget__loading-progress-bar{height:100%;background-color:#1890ff;transition:width .3s ease}.edf-choice-widget__error{display:flex;align-items:center;gap:8px;padding:8px;color:#ff4d4f;background-color:#fff2f0;border:1px solid #ffccc7;border-radius:4px;margin-top:4px}.edf-choice-widget__error-icon{font-size:16px;flex-shrink:0}.edf-choice-widget__error-message{font-size:14px;flex:1}.edf-choice-widget__error-hint{font-size:12px;color:#8c8c8c;font-style:italic}.edf-choice-widget__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;color:#8c8c8c;text-align:center}.edf-choice-widget__empty-icon{font-size:32px;margin-bottom:8px;opacity:.5}.edf-choice-widget__empty-message{font-size:14px}@keyframes edf-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.edf-choice-widget--dropdown .edf-choice-widget__wrapper{position:relative}.edf-choice-widget--dropdown .edf-choice-widget__loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#ffffffe6;display:flex;align-items:center;justify-content:center;z-index:10;border-radius:4px}.edf-choice-widget--dropdown .edf-choice-widget__option-icon{margin-right:4px;display:inline-flex;align-items:center}.edf-choice-widget--dropdown .edf-choice-widget__option-label{flex:1}.edf-choice-widget--dropdown .edf-choice-widget__option-description{display:block;font-size:12px;color:#8c8c8c;margin-top:2px;white-space:normal}.edf-choice-widget--dropdown.has-error .ant-select-selector{border-color:#ff4d4f!important}.edf-choice-widget--dropdown.has-error .ant-select-focused .ant-select-selector{border-color:#ff7875!important;box-shadow:0 0 0 2px #ff4d4f33}.edf-choice-widget--radio .edf-choice-widget__wrapper{position:relative}.edf-choice-widget--radio .edf-choice-widget__radio-content{display:flex;flex-direction:column;gap:2px}.edf-choice-widget--radio .edf-choice-widget__radio-main{display:flex;align-items:center;gap:4px}.edf-choice-widget--radio .edf-choice-widget__option-icon{display:inline-flex;align-items:center;font-size:16px}.edf-choice-widget--radio .edf-choice-widget__option-label{font-weight:500}.edf-choice-widget--radio .edf-choice-widget__option-description{margin-left:24px;font-size:12px;color:#8c8c8c;line-height:1.5}.edf-choice-widget--radio .edf-choice-widget__radio-group-label{font-weight:600;color:#595959;margin-bottom:8px;margin-top:16px;padding-bottom:4px;border-bottom:1px solid #f0f0f0}.edf-choice-widget--radio .edf-choice-widget__radio-group-label:first-child{margin-top:0}.edf-choice-widget--radio .edf-choice-widget__radio-divider{height:1px;background-color:#f0f0f0;margin:12px 0}.edf-choice-widget--radio.has-error .ant-radio-group{border:1px solid #ff4d4f;border-radius:4px;padding:8px}.edf-choice-widget--radio .ant-radio-wrapper{margin-bottom:8px;display:flex;align-items:flex-start}.edf-choice-widget--radio .ant-radio-wrapper:last-child{margin-bottom:0}.edf-choice-widget--radio .ant-radio-wrapper-disabled{cursor:not-allowed;opacity:.6}.edf-choice-widget--radio .ant-space-horizontal .ant-radio-wrapper{margin-bottom:0;margin-right:16px}.edf-choice-widget--radio .ant-space-horizontal .ant-radio-wrapper:last-child{margin-right:0}.edf-choice-widget__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.edf-choice-widget--checkbox .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled),.edf-choice-widget--radio .ant-radio-wrapper:not(.ant-radio-wrapper-disabled){color:inherit;font-size:inherit;font-family:inherit}.edf-choice-widget--status-warning .ant-checkbox-inner,.edf-choice-widget--status-warning .ant-radio-inner,.edf-choice-widget--status-warning .ant-radio-button-wrapper{border-color:#faad14}.edf-choice-widget--status-error .ant-checkbox-inner,.edf-choice-widget--status-error .ant-radio-inner,.edf-choice-widget--status-error .ant-radio-button-wrapper{border-color:#ff4d4f}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RJSFSchema, UiSchema } from '@rjsf/utils';
|
|
2
|
+
import { SchemaSelections } from '../components/SchemaSelectionContext';
|
|
3
|
+
|
|
4
|
+
type RegistryOverrides = {
|
|
5
|
+
widgets?: Record<string, unknown>;
|
|
6
|
+
fields?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
/** Copy only changed paths, preserving raw input until blur or acceptance. */
|
|
9
|
+
export declare function normalizeUrlValues<T>(data: T, schema: RJSFSchema, uiSchema?: UiSchema, selections?: SchemaSelections, id?: string, idSeparator?: string, changedInputs?: Map<string, string>, formContext?: unknown, registryOverrides?: RegistryOverrides): T;
|
|
10
|
+
/** Acceptance guards also cover restored values that never emit widget events. */
|
|
11
|
+
export declare function validateUrlValues(data: unknown, errors: unknown, schema: RJSFSchema, uiSchema?: UiSchema, selections?: SchemaSelections, id?: string, idSeparator?: string, formContext?: unknown, registryOverrides?: RegistryOverrides): void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
|
|
4
|
+
/** Display-only interpretation: never validate or write the respondent's answer. */
|
|
5
|
+
export declare function URLParts({ value, options }: Pick<WidgetProps, 'value' | 'options'>): ReactElement | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
3
|
+
|
|
4
|
+
/** Navigation eligibility is independent of the field's answer validation. */
|
|
5
|
+
export declare function URLPreviewLink({ value, options, disabled }: Pick<WidgetProps, 'value' | 'options' | 'disabled' | 'readonly'>): ReactElement | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
/** Keep layout/effects on the native outer surface; mirror only control presentation with addons. */
|
|
4
|
+
export declare function getControlPresentationStyle(source: CSSProperties | undefined, hasAddon: boolean): CSSProperties | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CSSProperties, RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
/** AntD 5 InputNumber has no semantic style slots for its control or editable input. */
|
|
4
|
+
export declare function useNumberInputStyles(inputRef: RefObject<HTMLInputElement>, style: CSSProperties | undefined, customPrefixCls: string | undefined): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { WidgetProps } from '@rjsf/utils';
|
|
3
3
|
import { TitleProps } from 'antd/es/typography/Title';
|
|
4
4
|
import { TextProps } from 'antd/es/typography/Text';
|
|
@@ -19,6 +19,7 @@ export interface AntInputOptions {
|
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
autoFocus?: boolean;
|
|
21
21
|
autoComplete?: string;
|
|
22
|
+
inputMode?: InputHTMLAttributes<HTMLInputElement>['inputMode'];
|
|
22
23
|
prefix?: ReactNode;
|
|
23
24
|
suffix?: ReactNode;
|
|
24
25
|
prefixIconName?: string;
|
|
@@ -39,7 +40,9 @@ export interface AntInputOptions {
|
|
|
39
40
|
style?: CSSProperties;
|
|
40
41
|
className?: string;
|
|
41
42
|
addonBefore?: ReactNode;
|
|
43
|
+
addonBeforePosition?: 'inside' | 'outside';
|
|
42
44
|
addonAfter?: ReactNode;
|
|
45
|
+
addonAfterPosition?: 'inside' | 'outside';
|
|
43
46
|
addonBeforeIconName?: string;
|
|
44
47
|
addonAfterIconName?: string;
|
|
45
48
|
emptyValue?: any;
|
|
@@ -95,9 +98,13 @@ export interface AntInputNumberOptions {
|
|
|
95
98
|
size?: 'large' | 'middle' | 'small';
|
|
96
99
|
placeholder?: string;
|
|
97
100
|
prefix?: ReactNode;
|
|
101
|
+
suffix?: ReactNode;
|
|
98
102
|
prefixIconName?: string;
|
|
103
|
+
suffixIconName?: string;
|
|
99
104
|
addonBeforeIconName?: string;
|
|
100
105
|
addonAfterIconName?: string;
|
|
106
|
+
/** Emit exact decimal strings. Requires schema.type = 'string' to avoid RJSF numeric coercion. */
|
|
107
|
+
stringMode?: boolean;
|
|
101
108
|
min?: number;
|
|
102
109
|
max?: number;
|
|
103
110
|
step?: number;
|
|
@@ -302,6 +309,11 @@ export interface HtmlWidgetOptions {
|
|
|
302
309
|
renderAs?: 'paragraph' | 'text';
|
|
303
310
|
align?: 'left' | 'center' | 'right' | 'justify';
|
|
304
311
|
preserveWhitespace?: boolean;
|
|
312
|
+
type?: TextProps['type'];
|
|
313
|
+
strong?: TextProps['strong'];
|
|
314
|
+
underline?: TextProps['underline'];
|
|
315
|
+
code?: TextProps['code'];
|
|
316
|
+
ellipsis?: boolean;
|
|
305
317
|
style?: CSSProperties;
|
|
306
318
|
className?: string;
|
|
307
319
|
}
|
|
@@ -310,6 +322,8 @@ export interface HtmlWidgetOptions {
|
|
|
310
322
|
*/
|
|
311
323
|
export interface SpacerWidgetOptions {
|
|
312
324
|
size?: 'small' | 'middle' | 'large' | number;
|
|
325
|
+
sizeToken?: 'small' | 'middle' | 'large';
|
|
326
|
+
sizePx?: number;
|
|
313
327
|
direction?: 'vertical' | 'horizontal';
|
|
314
328
|
fullWidth?: boolean;
|
|
315
329
|
fullHeight?: boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InputProps } from 'antd';
|
|
2
|
+
import { AntInputOptions } from './types';
|
|
3
|
+
|
|
4
|
+
/** Bridge RJSF field styles to the visible control, without repeating outer layout. */
|
|
5
|
+
export declare function useInputChrome(id: string, options: AntInputOptions, disabled?: boolean): Partial<InputProps>;
|
|
@@ -34,7 +34,10 @@ export declare const getAntInputNumberProps: (options?: AntInputNumberOptions) =
|
|
|
34
34
|
/**
|
|
35
35
|
* Extract Ant Design Slider props from uiSchema options
|
|
36
36
|
*/
|
|
37
|
-
export declare const getAntSliderProps: (options?: AntSliderOptions
|
|
37
|
+
export declare const getAntSliderProps: (options?: AntSliderOptions & {
|
|
38
|
+
tooltipVisible?: boolean | string;
|
|
39
|
+
tooltipPlacement?: NonNullable<SliderSingleProps["tooltip"]>["placement"];
|
|
40
|
+
}) => Partial<SliderSingleProps>;
|
|
38
41
|
/**
|
|
39
42
|
* Extract Ant Design Rate props from uiSchema options
|
|
40
43
|
*/
|
|
@@ -80,6 +83,11 @@ export declare const getHtmlDisplayProps: (options?: HtmlWidgetOptions) => {
|
|
|
80
83
|
renderAs: "paragraph" | "text";
|
|
81
84
|
align?: "left" | "center" | "right" | "justify";
|
|
82
85
|
preserveWhitespace?: boolean;
|
|
86
|
+
type?: HtmlWidgetOptions["type"];
|
|
87
|
+
strong?: boolean;
|
|
88
|
+
underline?: boolean;
|
|
89
|
+
code?: boolean;
|
|
90
|
+
ellipsis?: boolean;
|
|
83
91
|
markdownOptions?: HtmlWidgetOptions["markdownOptions"];
|
|
84
92
|
className?: string;
|
|
85
93
|
style?: React.CSSProperties;
|
|
@@ -404,6 +404,8 @@ export interface ChoiceWidgetConfig {
|
|
|
404
404
|
style?: React.CSSProperties;
|
|
405
405
|
/** Size variant for Ant Design components */
|
|
406
406
|
size?: 'small' | 'middle' | 'large';
|
|
407
|
+
/** Force virtualisation. False/unset retains automatic large-list virtualisation. */
|
|
408
|
+
virtualScroll?: boolean;
|
|
407
409
|
/** Whether to show option counts in multi-select */
|
|
408
410
|
showOptionCount?: boolean;
|
|
409
411
|
/** Custom loading component */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RJSFSchema, UiSchema } from '@rjsf/utils';
|
|
2
|
+
import { SchemaSelections } from '../../components/SchemaSelectionContext';
|
|
3
|
+
import { ChoiceWidgetConfig } from './ChoiceWidget.types';
|
|
4
|
+
|
|
5
|
+
/** Selection limits apply at acceptance as well as during interaction. */
|
|
6
|
+
export declare function dropdownSelectionLimitError(value: unknown, config: ChoiceWidgetConfig): string | undefined;
|
|
7
|
+
/** Enforce dropdown selection bounds for restored data, submission, and wizard navigation as well as input feedback. */
|
|
8
|
+
export declare function validateDropdownSelections(data: unknown, errors: unknown, schema: RJSFSchema | boolean, uiSchema?: UiSchema, rootSchema?: RJSFSchema, selections?: SchemaSelections, id?: string, idSeparator?: string, formContext?: unknown): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RJSFSchema, UiSchema } from '@rjsf/utils';
|
|
2
|
+
import { SchemaSelections } from '../../components/SchemaSelectionContext';
|
|
3
|
+
|
|
4
|
+
/** Enforce inline choice constraints for restored data and wizard/final submission. */
|
|
5
|
+
export declare function validateInlineChoiceValues(data: unknown, errors: unknown, schema: RJSFSchema | boolean, uiSchema?: UiSchema, rootSchema?: RJSFSchema, selections?: SchemaSelections, id?: string, idSeparator?: string): void;
|