unifyedx-storybook-new 0.1.43 → 0.1.45
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.
|
@@ -6814,7 +6814,63 @@ class DateLib {
|
|
|
6814
6814
|
formatNumber(value) {
|
|
6815
6815
|
return this.replaceDigits(value.toString());
|
|
6816
6816
|
}
|
|
6817
|
-
|
|
6817
|
+
/**
|
|
6818
|
+
* Returns the preferred ordering for month and year labels for the current
|
|
6819
|
+
* locale.
|
|
6820
|
+
*/
|
|
6821
|
+
getMonthYearOrder() {
|
|
6822
|
+
const code = this.options.locale?.code;
|
|
6823
|
+
if (!code) {
|
|
6824
|
+
return "month-first";
|
|
6825
|
+
}
|
|
6826
|
+
return DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
|
|
6827
|
+
}
|
|
6828
|
+
/**
|
|
6829
|
+
* Formats the month/year pair respecting locale conventions.
|
|
6830
|
+
*
|
|
6831
|
+
* @since 9.11.0
|
|
6832
|
+
*/
|
|
6833
|
+
formatMonthYear(date) {
|
|
6834
|
+
const { locale, timeZone, numerals } = this.options;
|
|
6835
|
+
const localeCode = locale?.code;
|
|
6836
|
+
if (localeCode && DateLib.yearFirstLocales.has(localeCode)) {
|
|
6837
|
+
try {
|
|
6838
|
+
const intl = new Intl.DateTimeFormat(localeCode, {
|
|
6839
|
+
month: "long",
|
|
6840
|
+
year: "numeric",
|
|
6841
|
+
timeZone,
|
|
6842
|
+
numberingSystem: numerals,
|
|
6843
|
+
});
|
|
6844
|
+
const formatted = intl.format(date);
|
|
6845
|
+
return formatted;
|
|
6846
|
+
}
|
|
6847
|
+
catch {
|
|
6848
|
+
// Fallback to date-fns formatting below.
|
|
6849
|
+
}
|
|
6850
|
+
}
|
|
6851
|
+
const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
6852
|
+
return this.format(date, pattern);
|
|
6853
|
+
}
|
|
6854
|
+
}
|
|
6855
|
+
DateLib.yearFirstLocales = new Set([
|
|
6856
|
+
"eu",
|
|
6857
|
+
"hu",
|
|
6858
|
+
"ja",
|
|
6859
|
+
"ja-Hira",
|
|
6860
|
+
"ja-JP",
|
|
6861
|
+
"ko",
|
|
6862
|
+
"ko-KR",
|
|
6863
|
+
"lt",
|
|
6864
|
+
"lt-LT",
|
|
6865
|
+
"lv",
|
|
6866
|
+
"lv-LV",
|
|
6867
|
+
"mn",
|
|
6868
|
+
"mn-MN",
|
|
6869
|
+
"zh",
|
|
6870
|
+
"zh-CN",
|
|
6871
|
+
"zh-HK",
|
|
6872
|
+
"zh-TW",
|
|
6873
|
+
]);
|
|
6818
6874
|
/**
|
|
6819
6875
|
* The default date library with English locale.
|
|
6820
6876
|
*
|
|
@@ -7710,7 +7766,7 @@ function getDefaultClassNames() {
|
|
|
7710
7766
|
/**
|
|
7711
7767
|
* Formats the caption of the month.
|
|
7712
7768
|
*
|
|
7713
|
-
* @defaultValue
|
|
7769
|
+
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
|
|
7714
7770
|
* @param month The date representing the month.
|
|
7715
7771
|
* @param options Configuration options for the date library.
|
|
7716
7772
|
* @param dateLib The date library to use for formatting. If not provided, a new
|
|
@@ -7720,7 +7776,8 @@ function getDefaultClassNames() {
|
|
|
7720
7776
|
* @see https://daypicker.dev/docs/translation#custom-formatters
|
|
7721
7777
|
*/
|
|
7722
7778
|
function formatCaption(month, options, dateLib) {
|
|
7723
|
-
|
|
7779
|
+
const lib = dateLib ?? new DateLib(options);
|
|
7780
|
+
return lib.formatMonthYear(month);
|
|
7724
7781
|
}
|
|
7725
7782
|
/**
|
|
7726
7783
|
* @private
|
|
@@ -8012,7 +8069,7 @@ const labelDay = labelDayButton;
|
|
|
8012
8069
|
* Generates the ARIA label for the month grid, which is announced when entering
|
|
8013
8070
|
* the grid.
|
|
8014
8071
|
*
|
|
8015
|
-
* @defaultValue
|
|
8072
|
+
* @defaultValue Locale-specific month/year order (e.g., "November 2022").
|
|
8016
8073
|
* @param date - The date representing the month.
|
|
8017
8074
|
* @param options - Optional configuration for the date formatting library.
|
|
8018
8075
|
* @param dateLib - An optional instance of the date formatting library.
|
|
@@ -8021,7 +8078,8 @@ const labelDay = labelDayButton;
|
|
|
8021
8078
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
8022
8079
|
*/
|
|
8023
8080
|
function labelGrid(date, options, dateLib) {
|
|
8024
|
-
|
|
8081
|
+
const lib = dateLib ?? new DateLib(options);
|
|
8082
|
+
return lib.formatMonthYear(date);
|
|
8025
8083
|
}
|
|
8026
8084
|
/**
|
|
8027
8085
|
* @ignore
|
|
@@ -9504,7 +9562,7 @@ function DayPicker(initialProps) {
|
|
|
9504
9562
|
formatters,
|
|
9505
9563
|
};
|
|
9506
9564
|
return (React__default.createElement(dayPickerContext.Provider, { value: contextValue },
|
|
9507
|
-
React__default.createElement(components.Root, { rootRef: props.animate ? rootElRef : undefined, className: className, style: style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], ...dataAttributes },
|
|
9565
|
+
React__default.createElement(components.Root, { rootRef: props.animate ? rootElRef : undefined, className: className, style: style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], ...dataAttributes },
|
|
9508
9566
|
React__default.createElement(components.Months, { className: classNames[UI.Months], style: styles?.[UI.Months] },
|
|
9509
9567
|
!props.hideNavigation && !navLayout && (React__default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),
|
|
9510
9568
|
months.map((calendarMonth, displayIndex) => {
|
|
@@ -9516,10 +9574,16 @@ function DayPicker(initialProps) {
|
|
|
9516
9574
|
displayIndex === 0 && (React__default.createElement(components.PreviousMonthButton, { type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, "aria-disabled": previousMonth ? undefined : true, "aria-label": labelPrevious(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : undefined },
|
|
9517
9575
|
React__default.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" }))),
|
|
9518
9576
|
React__default.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : undefined, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth: calendarMonth, displayIndex: displayIndex }, captionLayout?.startsWith("dropdown") ? (React__default.createElement(components.DropdownNav, { className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },
|
|
9519
|
-
|
|
9520
|
-
captionLayout === "dropdown
|
|
9521
|
-
|
|
9522
|
-
captionLayout === "dropdown
|
|
9577
|
+
(() => {
|
|
9578
|
+
const monthControl = captionLayout === "dropdown" ||
|
|
9579
|
+
captionLayout === "dropdown-months" ? (React__default.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown(), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib), style: styles?.[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) })) : (React__default.createElement("span", { key: "month" }, formatMonthDropdown(calendarMonth.date, dateLib)));
|
|
9580
|
+
const yearControl = captionLayout === "dropdown" ||
|
|
9581
|
+
captionLayout === "dropdown-years" ? (React__default.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown(dateLib.options), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)), style: styles?.[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) })) : (React__default.createElement("span", { key: "year" }, formatYearDropdown(calendarMonth.date, dateLib)));
|
|
9582
|
+
const controls = dateLib.getMonthYearOrder() === "year-first"
|
|
9583
|
+
? [yearControl, monthControl]
|
|
9584
|
+
: [monthControl, yearControl];
|
|
9585
|
+
return controls;
|
|
9586
|
+
})(),
|
|
9523
9587
|
React__default.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
9524
9588
|
border: 0,
|
|
9525
9589
|
clip: "rect(0 0 0 0)",
|
|
@@ -43733,6 +43797,26 @@ var createSubject = () => {
|
|
|
43733
43797
|
};
|
|
43734
43798
|
};
|
|
43735
43799
|
|
|
43800
|
+
function extractFormValues(fieldsState, formValues) {
|
|
43801
|
+
const values = {};
|
|
43802
|
+
for (const key in fieldsState) {
|
|
43803
|
+
if (fieldsState.hasOwnProperty(key)) {
|
|
43804
|
+
const fieldState = fieldsState[key];
|
|
43805
|
+
const fieldValue = formValues[key];
|
|
43806
|
+
if (fieldState && isObject$2(fieldState) && fieldValue) {
|
|
43807
|
+
const nestedFieldsState = extractFormValues(fieldState, fieldValue);
|
|
43808
|
+
if (isObject$2(nestedFieldsState)) {
|
|
43809
|
+
values[key] = nestedFieldsState;
|
|
43810
|
+
}
|
|
43811
|
+
}
|
|
43812
|
+
else if (fieldsState[key]) {
|
|
43813
|
+
values[key] = fieldValue;
|
|
43814
|
+
}
|
|
43815
|
+
}
|
|
43816
|
+
}
|
|
43817
|
+
return values;
|
|
43818
|
+
}
|
|
43819
|
+
|
|
43736
43820
|
var isEmptyObject$1 = (value) => isObject$2(value) && !Object.keys(value).length;
|
|
43737
43821
|
|
|
43738
43822
|
var isFileInput = (element) => element.type === 'file';
|
|
@@ -43801,46 +43885,40 @@ var objectHasFunction = (data) => {
|
|
|
43801
43885
|
return false;
|
|
43802
43886
|
};
|
|
43803
43887
|
|
|
43888
|
+
function isTraversable(value) {
|
|
43889
|
+
return Array.isArray(value) || (isObject$2(value) && !objectHasFunction(value));
|
|
43890
|
+
}
|
|
43804
43891
|
function markFieldsDirty(data, fields = {}) {
|
|
43805
|
-
const
|
|
43806
|
-
|
|
43807
|
-
|
|
43808
|
-
|
|
43809
|
-
|
|
43810
|
-
|
|
43811
|
-
|
|
43812
|
-
}
|
|
43813
|
-
else if (!isNullOrUndefined(data[key])) {
|
|
43814
|
-
fields[key] = true;
|
|
43815
|
-
}
|
|
43892
|
+
for (const key in data) {
|
|
43893
|
+
if (isTraversable(data[key])) {
|
|
43894
|
+
fields[key] = Array.isArray(data[key]) ? [] : {};
|
|
43895
|
+
markFieldsDirty(data[key], fields[key]);
|
|
43896
|
+
}
|
|
43897
|
+
else if (!isNullOrUndefined(data[key])) {
|
|
43898
|
+
fields[key] = true;
|
|
43816
43899
|
}
|
|
43817
43900
|
}
|
|
43818
43901
|
return fields;
|
|
43819
43902
|
}
|
|
43820
|
-
function
|
|
43821
|
-
|
|
43822
|
-
|
|
43823
|
-
|
|
43824
|
-
|
|
43825
|
-
|
|
43826
|
-
|
|
43827
|
-
|
|
43828
|
-
dirtyFieldsFromValues[key] = Array.isArray(data[key])
|
|
43829
|
-
? markFieldsDirty(data[key], [])
|
|
43830
|
-
: { ...markFieldsDirty(data[key]) };
|
|
43831
|
-
}
|
|
43832
|
-
else {
|
|
43833
|
-
getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
|
|
43834
|
-
}
|
|
43903
|
+
function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
|
|
43904
|
+
if (!dirtyFieldsFromValues) {
|
|
43905
|
+
dirtyFieldsFromValues = markFieldsDirty(formValues);
|
|
43906
|
+
}
|
|
43907
|
+
for (const key in data) {
|
|
43908
|
+
if (isTraversable(data[key])) {
|
|
43909
|
+
if (isUndefined$1(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
|
|
43910
|
+
dirtyFieldsFromValues[key] = markFieldsDirty(data[key], Array.isArray(data[key]) ? [] : {});
|
|
43835
43911
|
}
|
|
43836
43912
|
else {
|
|
43837
|
-
|
|
43913
|
+
getDirtyFields(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
|
|
43838
43914
|
}
|
|
43839
43915
|
}
|
|
43916
|
+
else {
|
|
43917
|
+
dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);
|
|
43918
|
+
}
|
|
43840
43919
|
}
|
|
43841
43920
|
return dirtyFieldsFromValues;
|
|
43842
43921
|
}
|
|
43843
|
-
var getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));
|
|
43844
43922
|
|
|
43845
43923
|
const defaultResult = {
|
|
43846
43924
|
value: false,
|
|
@@ -44074,15 +44152,13 @@ var updateFieldArrayRootError = (errors, error, name) => {
|
|
|
44074
44152
|
return errors;
|
|
44075
44153
|
};
|
|
44076
44154
|
|
|
44077
|
-
var isMessage = (value) => isString$1(value);
|
|
44078
|
-
|
|
44079
44155
|
function getValidateError(result, ref, type = 'validate') {
|
|
44080
|
-
if (
|
|
44081
|
-
(Array.isArray(result) && result.every(
|
|
44156
|
+
if (isString$1(result) ||
|
|
44157
|
+
(Array.isArray(result) && result.every(isString$1)) ||
|
|
44082
44158
|
(isBoolean$1(result) && !result)) {
|
|
44083
44159
|
return {
|
|
44084
44160
|
type,
|
|
44085
|
-
message:
|
|
44161
|
+
message: isString$1(result) ? result : '',
|
|
44086
44162
|
ref,
|
|
44087
44163
|
};
|
|
44088
44164
|
}
|
|
@@ -44135,7 +44211,7 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
|
|
|
44135
44211
|
(isBoolean$1(inputValue) && !inputValue) ||
|
|
44136
44212
|
(isCheckBox && !getCheckboxValue(refs).isValid) ||
|
|
44137
44213
|
(isRadio && !getRadioValue(refs).isValid))) {
|
|
44138
|
-
const { value, message } =
|
|
44214
|
+
const { value, message } = isString$1(required)
|
|
44139
44215
|
? { value: !!required, message: required }
|
|
44140
44216
|
: getValueAndMessage(required);
|
|
44141
44217
|
if (value) {
|
|
@@ -44541,11 +44617,11 @@ function createFormControl(props = {}) {
|
|
|
44541
44617
|
const isFieldArrayRoot = _names.array.has(_f.name);
|
|
44542
44618
|
const isPromiseFunction = field._f && hasPromiseValidation(field._f);
|
|
44543
44619
|
if (isPromiseFunction && _proxyFormState.validatingFields) {
|
|
44544
|
-
_updateIsValidating([name], true);
|
|
44620
|
+
_updateIsValidating([_f.name], true);
|
|
44545
44621
|
}
|
|
44546
44622
|
const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);
|
|
44547
44623
|
if (isPromiseFunction && _proxyFormState.validatingFields) {
|
|
44548
|
-
_updateIsValidating([name]);
|
|
44624
|
+
_updateIsValidating([_f.name]);
|
|
44549
44625
|
}
|
|
44550
44626
|
if (fieldError[_f.name]) {
|
|
44551
44627
|
context.valid = false;
|
|
@@ -44778,6 +44854,7 @@ function createFormControl(props = {}) {
|
|
|
44778
44854
|
}
|
|
44779
44855
|
if (isFieldValueUpdated) {
|
|
44780
44856
|
field._f.deps &&
|
|
44857
|
+
(!Array.isArray(field._f.deps) || field._f.deps.length > 0) &&
|
|
44781
44858
|
trigger(field._f.deps);
|
|
44782
44859
|
shouldRenderByError(name, isValid, error, fieldState);
|
|
44783
44860
|
}
|
|
@@ -44825,10 +44902,13 @@ function createFormControl(props = {}) {
|
|
|
44825
44902
|
iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);
|
|
44826
44903
|
return validationResult;
|
|
44827
44904
|
};
|
|
44828
|
-
const getValues = (fieldNames) => {
|
|
44829
|
-
|
|
44905
|
+
const getValues = (fieldNames, config) => {
|
|
44906
|
+
let values = {
|
|
44830
44907
|
...(_state.mount ? _formValues : _defaultValues),
|
|
44831
44908
|
};
|
|
44909
|
+
if (config) {
|
|
44910
|
+
values = extractFormValues(config.dirtyFields ? _formState.dirtyFields : _formState.touchedFields, values);
|
|
44911
|
+
}
|
|
44832
44912
|
return isUndefined$1(fieldNames)
|
|
44833
44913
|
? values
|
|
44834
44914
|
: isString$1(fieldNames)
|
|
@@ -46849,9 +46929,12 @@ class Schema {
|
|
|
46849
46929
|
*/
|
|
46850
46930
|
|
|
46851
46931
|
cast(value, options = {}) {
|
|
46852
|
-
let resolvedSchema = this.resolve(Object.assign({
|
|
46932
|
+
let resolvedSchema = this.resolve(Object.assign({}, options, {
|
|
46853
46933
|
value
|
|
46854
|
-
|
|
46934
|
+
// parent: options.parent,
|
|
46935
|
+
// context: options.context,
|
|
46936
|
+
}));
|
|
46937
|
+
|
|
46855
46938
|
let allowOptionality = options.assert === 'ignore-optionality';
|
|
46856
46939
|
let result = resolvedSchema._cast(value, options);
|
|
46857
46940
|
if (options.assert !== false && !resolvedSchema.isType(result)) {
|
|
@@ -46865,7 +46948,7 @@ class Schema {
|
|
|
46865
46948
|
return result;
|
|
46866
46949
|
}
|
|
46867
46950
|
_cast(rawValue, options) {
|
|
46868
|
-
let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);
|
|
46951
|
+
let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this, options), rawValue);
|
|
46869
46952
|
if (value === undefined) {
|
|
46870
46953
|
value = this.getDefault(options);
|
|
46871
46954
|
}
|
|
@@ -47388,10 +47471,10 @@ class DateSchema extends Schema {
|
|
|
47388
47471
|
}
|
|
47389
47472
|
});
|
|
47390
47473
|
this.withMutation(() => {
|
|
47391
|
-
this.transform((value, _raw
|
|
47474
|
+
this.transform((value, _raw) => {
|
|
47392
47475
|
// null -> InvalidDate isn't useful; treat all nulls as null and let it fail on
|
|
47393
47476
|
// nullability check vs TypeErrors
|
|
47394
|
-
if (!
|
|
47477
|
+
if (!this.spec.coerce || this.isType(value) || value === null) return value;
|
|
47395
47478
|
value = parseIsoDate(value);
|
|
47396
47479
|
|
|
47397
47480
|
// 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.
|
|
@@ -47478,7 +47561,7 @@ function sortByKeyOrder(keys) {
|
|
|
47478
47561
|
};
|
|
47479
47562
|
}
|
|
47480
47563
|
|
|
47481
|
-
const parseJson = (value, _,
|
|
47564
|
+
const parseJson = (value, _, schema) => {
|
|
47482
47565
|
if (typeof value !== 'string') {
|
|
47483
47566
|
return value;
|
|
47484
47567
|
}
|
|
@@ -47488,7 +47571,7 @@ const parseJson = (value, _, ctx) => {
|
|
|
47488
47571
|
} catch (err) {
|
|
47489
47572
|
/* */
|
|
47490
47573
|
}
|
|
47491
|
-
return
|
|
47574
|
+
return schema.isType(parsed) ? parsed : value;
|
|
47492
47575
|
};
|
|
47493
47576
|
|
|
47494
47577
|
// @ts-ignore
|
|
@@ -47568,9 +47651,9 @@ class ObjectSchema extends Schema {
|
|
|
47568
47651
|
for (const prop of props) {
|
|
47569
47652
|
let field = fields[prop];
|
|
47570
47653
|
let exists = (prop in value);
|
|
47654
|
+
let inputValue = value[prop];
|
|
47571
47655
|
if (field) {
|
|
47572
47656
|
let fieldValue;
|
|
47573
|
-
let inputValue = value[prop];
|
|
47574
47657
|
|
|
47575
47658
|
// safe to mutate since this is fired in sequence
|
|
47576
47659
|
innerOptions.path = (options.path ? `${options.path}.` : '') + prop;
|
|
@@ -47585,16 +47668,14 @@ class ObjectSchema extends Schema {
|
|
|
47585
47668
|
isChanged = isChanged || prop in value;
|
|
47586
47669
|
continue;
|
|
47587
47670
|
}
|
|
47588
|
-
fieldValue = !options.__validating || !strict ?
|
|
47589
|
-
// TODO: use _cast, this is double resolving
|
|
47590
|
-
field.cast(value[prop], innerOptions) : value[prop];
|
|
47671
|
+
fieldValue = !options.__validating || !strict ? field.cast(inputValue, innerOptions) : inputValue;
|
|
47591
47672
|
if (fieldValue !== undefined) {
|
|
47592
47673
|
intermediateValue[prop] = fieldValue;
|
|
47593
47674
|
}
|
|
47594
47675
|
} else if (exists && !strip) {
|
|
47595
|
-
intermediateValue[prop] =
|
|
47676
|
+
intermediateValue[prop] = inputValue;
|
|
47596
47677
|
}
|
|
47597
|
-
if (exists !== prop in intermediateValue || intermediateValue[prop] !==
|
|
47678
|
+
if (exists !== prop in intermediateValue || intermediateValue[prop] !== inputValue) {
|
|
47598
47679
|
isChanged = true;
|
|
47599
47680
|
}
|
|
47600
47681
|
}
|
|
@@ -47868,7 +47949,11 @@ class ArraySchema extends Schema {
|
|
|
47868
47949
|
let isChanged = false;
|
|
47869
47950
|
const castArray = value.map((v, idx) => {
|
|
47870
47951
|
const castElement = this.innerType.cast(v, Object.assign({}, _opts, {
|
|
47871
|
-
path: `${_opts.path || ''}[${idx}]
|
|
47952
|
+
path: `${_opts.path || ''}[${idx}]`,
|
|
47953
|
+
parent: value,
|
|
47954
|
+
originalValue: v,
|
|
47955
|
+
value: v,
|
|
47956
|
+
index: idx
|
|
47872
47957
|
}));
|
|
47873
47958
|
if (castElement !== v) {
|
|
47874
47959
|
isChanged = true;
|
|
@@ -75441,7 +75526,7 @@ function SectionRenderer({ item, data: initialData, updateHandler, validationErr
|
|
|
75441
75526
|
/* @__PURE__ */ jsx(
|
|
75442
75527
|
RadioGroup,
|
|
75443
75528
|
{
|
|
75444
|
-
selectedValue: data[field.key] || "",
|
|
75529
|
+
selectedValue: typeof data[field.key] !== "undefined" ? data[field.key] : field.default || "",
|
|
75445
75530
|
onValueChange: (value) => {
|
|
75446
75531
|
const newData = { ...data, [field.key]: value };
|
|
75447
75532
|
setData(newData);
|
|
@@ -76050,7 +76135,7 @@ function DataTableRenderer({ item, data: initialData, updateHandler, validationE
|
|
|
76050
76135
|
] }),
|
|
76051
76136
|
/* @__PURE__ */ jsx("p", { style: { fontSize: "14px", marginBottom: "10px" }, children: section.description })
|
|
76052
76137
|
] }),
|
|
76053
|
-
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "min-w-full bg-white border border-gray-300", children: [
|
|
76138
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "min-w-full bg-white border border-gray-300", style: { marginBottom: "20px" }, children: [
|
|
76054
76139
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "bg-gray-50", children: [
|
|
76055
76140
|
/* @__PURE__ */ jsx("th", { className: "px-4 py-2 w-10" }),
|
|
76056
76141
|
section.fields.map((field, idx) => /* @__PURE__ */ jsx(
|
|
@@ -76903,17 +76988,17 @@ const CustomGridToolbar = ({
|
|
|
76903
76988
|
const rect = target.getBoundingClientRect();
|
|
76904
76989
|
const viewportWidth = window.innerWidth;
|
|
76905
76990
|
const viewportHeight = window.innerHeight;
|
|
76906
|
-
let x = rect.left -
|
|
76907
|
-
let y = rect.bottom
|
|
76991
|
+
let x = rect.left - 115;
|
|
76992
|
+
let y = rect.bottom + 10;
|
|
76908
76993
|
x = Math.max(10, Math.min(x, viewportWidth - 320));
|
|
76909
76994
|
y = Math.max(10, Math.min(y, viewportHeight - 400));
|
|
76910
|
-
grid.
|
|
76995
|
+
grid.openColumnChooser?.(x, y);
|
|
76911
76996
|
} else {
|
|
76912
76997
|
const fallbackX = Math.min(1240, window.innerWidth - 320);
|
|
76913
|
-
grid.
|
|
76998
|
+
grid.openColumnChooser?.(fallbackX, 55);
|
|
76914
76999
|
}
|
|
76915
77000
|
} else {
|
|
76916
|
-
grid.
|
|
77001
|
+
grid.openColumnChooser?.();
|
|
76917
77002
|
}
|
|
76918
77003
|
break;
|
|
76919
77004
|
case "Print":
|