@almadar/ui 5.31.0 → 5.31.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/dist/avl/index.cjs +21 -20
- package/dist/avl/index.js +21 -20
- package/dist/components/core/atoms/Select.d.ts +4 -2
- package/dist/components/index.cjs +22 -21
- package/dist/components/index.js +22 -21
- package/dist/providers/index.cjs +20 -19
- package/dist/providers/index.js +20 -19
- package/dist/runtime/index.cjs +20 -19
- package/dist/runtime/index.js +20 -19
- package/package.json +1 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -3440,6 +3440,7 @@ function NativeSelect({
|
|
|
3440
3440
|
placeholder,
|
|
3441
3441
|
error,
|
|
3442
3442
|
onChange,
|
|
3443
|
+
onValueChange,
|
|
3443
3444
|
value,
|
|
3444
3445
|
...props
|
|
3445
3446
|
}) {
|
|
@@ -3448,8 +3449,9 @@ function NativeSelect({
|
|
|
3448
3449
|
if (typeof onChange === "string") {
|
|
3449
3450
|
eventBus.emit(`UI:${onChange}`, { value: e.target.value });
|
|
3450
3451
|
} else {
|
|
3451
|
-
onChange?.(e
|
|
3452
|
+
onChange?.(e);
|
|
3452
3453
|
}
|
|
3454
|
+
onValueChange?.(e.target.value);
|
|
3453
3455
|
};
|
|
3454
3456
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3455
3457
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3484,6 +3486,7 @@ function RichSelect({
|
|
|
3484
3486
|
placeholder,
|
|
3485
3487
|
error,
|
|
3486
3488
|
onChange,
|
|
3489
|
+
onValueChange,
|
|
3487
3490
|
value,
|
|
3488
3491
|
multiple,
|
|
3489
3492
|
searchable,
|
|
@@ -3507,18 +3510,16 @@ function RichSelect({
|
|
|
3507
3510
|
}
|
|
3508
3511
|
if (typeof onChange === "string") {
|
|
3509
3512
|
eventBus.emit(`UI:${onChange}`, { value: next });
|
|
3510
|
-
} else {
|
|
3511
|
-
onChange?.(next);
|
|
3512
3513
|
}
|
|
3514
|
+
onValueChange?.(next);
|
|
3513
3515
|
};
|
|
3514
3516
|
const clear = (e) => {
|
|
3515
3517
|
e.stopPropagation();
|
|
3516
3518
|
const next = multiple ? [] : "";
|
|
3517
3519
|
if (typeof onChange === "string") {
|
|
3518
3520
|
eventBus.emit(`UI:${onChange}`, { value: next });
|
|
3519
|
-
} else {
|
|
3520
|
-
onChange?.(next);
|
|
3521
3521
|
}
|
|
3522
|
+
onValueChange?.(next);
|
|
3522
3523
|
};
|
|
3523
3524
|
React79.useEffect(() => {
|
|
3524
3525
|
const handler = (e) => {
|
|
@@ -16310,7 +16311,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16310
16311
|
options: sourceOptions,
|
|
16311
16312
|
value: rule.sourceQuestionId,
|
|
16312
16313
|
placeholder: t("branchingLogic.selectQuestion"),
|
|
16313
|
-
|
|
16314
|
+
onValueChange: handleSource,
|
|
16314
16315
|
disabled: readOnly,
|
|
16315
16316
|
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
16316
16317
|
}
|
|
@@ -16320,7 +16321,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16320
16321
|
{
|
|
16321
16322
|
options: operatorOptions,
|
|
16322
16323
|
value: rule.operator,
|
|
16323
|
-
|
|
16324
|
+
onValueChange: handleOperator,
|
|
16324
16325
|
disabled: readOnly
|
|
16325
16326
|
}
|
|
16326
16327
|
) }),
|
|
@@ -16342,7 +16343,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16342
16343
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
16343
16344
|
value: "",
|
|
16344
16345
|
placeholder: t("branchingLogic.addValue"),
|
|
16345
|
-
|
|
16346
|
+
onValueChange: handleAddChip,
|
|
16346
16347
|
disabled: readOnly
|
|
16347
16348
|
}
|
|
16348
16349
|
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16368,7 +16369,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16368
16369
|
options: valueOptions,
|
|
16369
16370
|
value: scalarValue,
|
|
16370
16371
|
placeholder: t("branchingLogic.selectValue"),
|
|
16371
|
-
|
|
16372
|
+
onValueChange: (v) => onChange({ ...rule, value: v }),
|
|
16372
16373
|
disabled: readOnly
|
|
16373
16374
|
}
|
|
16374
16375
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16391,7 +16392,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16391
16392
|
options: targetOptions,
|
|
16392
16393
|
value: rule.targetQuestionId,
|
|
16393
16394
|
placeholder: t("branchingLogic.selectTarget"),
|
|
16394
|
-
|
|
16395
|
+
onValueChange: handleTarget,
|
|
16395
16396
|
disabled: readOnly,
|
|
16396
16397
|
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
16397
16398
|
}
|
|
@@ -18800,7 +18801,7 @@ var init_Pagination = __esm({
|
|
|
18800
18801
|
Select,
|
|
18801
18802
|
{
|
|
18802
18803
|
value: String(pageSize),
|
|
18803
|
-
|
|
18804
|
+
onValueChange: (v) => handlePageSizeChange(Number(v)),
|
|
18804
18805
|
options: pageSizeOptions.map((size) => ({
|
|
18805
18806
|
value: String(size),
|
|
18806
18807
|
label: String(size)
|
|
@@ -23730,7 +23731,7 @@ var init_FilterGroup = __esm({
|
|
|
23730
23731
|
Select,
|
|
23731
23732
|
{
|
|
23732
23733
|
value: selectedValues[filter.field] || "all",
|
|
23733
|
-
|
|
23734
|
+
onValueChange: (v) => handleFilterSelect(filter.field, v),
|
|
23734
23735
|
options: [
|
|
23735
23736
|
{ value: "all", label: t("filterGroup.all") },
|
|
23736
23737
|
...filter.options?.map((opt) => ({
|
|
@@ -23813,7 +23814,7 @@ var init_FilterGroup = __esm({
|
|
|
23813
23814
|
Select,
|
|
23814
23815
|
{
|
|
23815
23816
|
value: selectedValues[filter.field] || "all",
|
|
23816
|
-
|
|
23817
|
+
onValueChange: (v) => handleFilterSelect(filter.field, v),
|
|
23817
23818
|
options: [
|
|
23818
23819
|
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
23819
23820
|
...filter.options?.map((opt) => ({
|
|
@@ -23931,7 +23932,7 @@ var init_FilterGroup = __esm({
|
|
|
23931
23932
|
Select,
|
|
23932
23933
|
{
|
|
23933
23934
|
value: selectedValues[filter.field] || "all",
|
|
23934
|
-
|
|
23935
|
+
onValueChange: (v) => handleFilterSelect(filter.field, v),
|
|
23935
23936
|
options: [
|
|
23936
23937
|
{ value: "all", label: t("filterGroup.all") },
|
|
23937
23938
|
...filter.options?.map((opt) => ({
|
|
@@ -33649,7 +33650,7 @@ var init_VersionDiff = __esm({
|
|
|
33649
33650
|
{
|
|
33650
33651
|
options,
|
|
33651
33652
|
value: activeBeforeId,
|
|
33652
|
-
|
|
33653
|
+
onValueChange: handleBeforeChange,
|
|
33653
33654
|
"aria-label": t("versionDiff.beforeRevision")
|
|
33654
33655
|
}
|
|
33655
33656
|
) }),
|
|
@@ -33659,7 +33660,7 @@ var init_VersionDiff = __esm({
|
|
|
33659
33660
|
{
|
|
33660
33661
|
options,
|
|
33661
33662
|
value: activeAfterId,
|
|
33662
|
-
|
|
33663
|
+
onValueChange: handleAfterChange,
|
|
33663
33664
|
"aria-label": t("versionDiff.afterRevision")
|
|
33664
33665
|
}
|
|
33665
33666
|
) }),
|
|
@@ -38242,7 +38243,7 @@ function RuleEditor({
|
|
|
38242
38243
|
Select,
|
|
38243
38244
|
{
|
|
38244
38245
|
value: rule.whenEvent,
|
|
38245
|
-
|
|
38246
|
+
onValueChange: handleWhenChange,
|
|
38246
38247
|
options: availableEvents,
|
|
38247
38248
|
disabled,
|
|
38248
38249
|
className: "flex-1 min-w-0"
|
|
@@ -38253,7 +38254,7 @@ function RuleEditor({
|
|
|
38253
38254
|
Select,
|
|
38254
38255
|
{
|
|
38255
38256
|
value: rule.thenAction,
|
|
38256
|
-
|
|
38257
|
+
onValueChange: handleThenChange,
|
|
38257
38258
|
options: availableActions,
|
|
38258
38259
|
disabled,
|
|
38259
38260
|
className: "flex-1 min-w-0"
|
|
@@ -39310,7 +39311,7 @@ var init_Form = __esm({
|
|
|
39310
39311
|
...commonProps,
|
|
39311
39312
|
options,
|
|
39312
39313
|
value: String(currentValue),
|
|
39313
|
-
|
|
39314
|
+
onValueChange: (v) => handleChange(fieldName, v),
|
|
39314
39315
|
placeholder: field.placeholder || `Select ${label}...`
|
|
39315
39316
|
}
|
|
39316
39317
|
);
|
package/dist/runtime/index.js
CHANGED
|
@@ -3391,6 +3391,7 @@ function NativeSelect({
|
|
|
3391
3391
|
placeholder,
|
|
3392
3392
|
error,
|
|
3393
3393
|
onChange,
|
|
3394
|
+
onValueChange,
|
|
3394
3395
|
value,
|
|
3395
3396
|
...props
|
|
3396
3397
|
}) {
|
|
@@ -3399,8 +3400,9 @@ function NativeSelect({
|
|
|
3399
3400
|
if (typeof onChange === "string") {
|
|
3400
3401
|
eventBus.emit(`UI:${onChange}`, { value: e.target.value });
|
|
3401
3402
|
} else {
|
|
3402
|
-
onChange?.(e
|
|
3403
|
+
onChange?.(e);
|
|
3403
3404
|
}
|
|
3405
|
+
onValueChange?.(e.target.value);
|
|
3404
3406
|
};
|
|
3405
3407
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3406
3408
|
/* @__PURE__ */ jsxs(
|
|
@@ -3435,6 +3437,7 @@ function RichSelect({
|
|
|
3435
3437
|
placeholder,
|
|
3436
3438
|
error,
|
|
3437
3439
|
onChange,
|
|
3440
|
+
onValueChange,
|
|
3438
3441
|
value,
|
|
3439
3442
|
multiple,
|
|
3440
3443
|
searchable,
|
|
@@ -3458,18 +3461,16 @@ function RichSelect({
|
|
|
3458
3461
|
}
|
|
3459
3462
|
if (typeof onChange === "string") {
|
|
3460
3463
|
eventBus.emit(`UI:${onChange}`, { value: next });
|
|
3461
|
-
} else {
|
|
3462
|
-
onChange?.(next);
|
|
3463
3464
|
}
|
|
3465
|
+
onValueChange?.(next);
|
|
3464
3466
|
};
|
|
3465
3467
|
const clear = (e) => {
|
|
3466
3468
|
e.stopPropagation();
|
|
3467
3469
|
const next = multiple ? [] : "";
|
|
3468
3470
|
if (typeof onChange === "string") {
|
|
3469
3471
|
eventBus.emit(`UI:${onChange}`, { value: next });
|
|
3470
|
-
} else {
|
|
3471
|
-
onChange?.(next);
|
|
3472
3472
|
}
|
|
3473
|
+
onValueChange?.(next);
|
|
3473
3474
|
};
|
|
3474
3475
|
useEffect(() => {
|
|
3475
3476
|
const handler = (e) => {
|
|
@@ -16261,7 +16262,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16261
16262
|
options: sourceOptions,
|
|
16262
16263
|
value: rule.sourceQuestionId,
|
|
16263
16264
|
placeholder: t("branchingLogic.selectQuestion"),
|
|
16264
|
-
|
|
16265
|
+
onValueChange: handleSource,
|
|
16265
16266
|
disabled: readOnly,
|
|
16266
16267
|
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
16267
16268
|
}
|
|
@@ -16271,7 +16272,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16271
16272
|
{
|
|
16272
16273
|
options: operatorOptions,
|
|
16273
16274
|
value: rule.operator,
|
|
16274
|
-
|
|
16275
|
+
onValueChange: handleOperator,
|
|
16275
16276
|
disabled: readOnly
|
|
16276
16277
|
}
|
|
16277
16278
|
) }),
|
|
@@ -16293,7 +16294,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16293
16294
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
16294
16295
|
value: "",
|
|
16295
16296
|
placeholder: t("branchingLogic.addValue"),
|
|
16296
|
-
|
|
16297
|
+
onValueChange: handleAddChip,
|
|
16297
16298
|
disabled: readOnly
|
|
16298
16299
|
}
|
|
16299
16300
|
) }) : /* @__PURE__ */ jsx(
|
|
@@ -16319,7 +16320,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16319
16320
|
options: valueOptions,
|
|
16320
16321
|
value: scalarValue,
|
|
16321
16322
|
placeholder: t("branchingLogic.selectValue"),
|
|
16322
|
-
|
|
16323
|
+
onValueChange: (v) => onChange({ ...rule, value: v }),
|
|
16323
16324
|
disabled: readOnly
|
|
16324
16325
|
}
|
|
16325
16326
|
) : /* @__PURE__ */ jsx(
|
|
@@ -16342,7 +16343,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16342
16343
|
options: targetOptions,
|
|
16343
16344
|
value: rule.targetQuestionId,
|
|
16344
16345
|
placeholder: t("branchingLogic.selectTarget"),
|
|
16345
|
-
|
|
16346
|
+
onValueChange: handleTarget,
|
|
16346
16347
|
disabled: readOnly,
|
|
16347
16348
|
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
16348
16349
|
}
|
|
@@ -18751,7 +18752,7 @@ var init_Pagination = __esm({
|
|
|
18751
18752
|
Select,
|
|
18752
18753
|
{
|
|
18753
18754
|
value: String(pageSize),
|
|
18754
|
-
|
|
18755
|
+
onValueChange: (v) => handlePageSizeChange(Number(v)),
|
|
18755
18756
|
options: pageSizeOptions.map((size) => ({
|
|
18756
18757
|
value: String(size),
|
|
18757
18758
|
label: String(size)
|
|
@@ -23681,7 +23682,7 @@ var init_FilterGroup = __esm({
|
|
|
23681
23682
|
Select,
|
|
23682
23683
|
{
|
|
23683
23684
|
value: selectedValues[filter.field] || "all",
|
|
23684
|
-
|
|
23685
|
+
onValueChange: (v) => handleFilterSelect(filter.field, v),
|
|
23685
23686
|
options: [
|
|
23686
23687
|
{ value: "all", label: t("filterGroup.all") },
|
|
23687
23688
|
...filter.options?.map((opt) => ({
|
|
@@ -23764,7 +23765,7 @@ var init_FilterGroup = __esm({
|
|
|
23764
23765
|
Select,
|
|
23765
23766
|
{
|
|
23766
23767
|
value: selectedValues[filter.field] || "all",
|
|
23767
|
-
|
|
23768
|
+
onValueChange: (v) => handleFilterSelect(filter.field, v),
|
|
23768
23769
|
options: [
|
|
23769
23770
|
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
23770
23771
|
...filter.options?.map((opt) => ({
|
|
@@ -23882,7 +23883,7 @@ var init_FilterGroup = __esm({
|
|
|
23882
23883
|
Select,
|
|
23883
23884
|
{
|
|
23884
23885
|
value: selectedValues[filter.field] || "all",
|
|
23885
|
-
|
|
23886
|
+
onValueChange: (v) => handleFilterSelect(filter.field, v),
|
|
23886
23887
|
options: [
|
|
23887
23888
|
{ value: "all", label: t("filterGroup.all") },
|
|
23888
23889
|
...filter.options?.map((opt) => ({
|
|
@@ -33600,7 +33601,7 @@ var init_VersionDiff = __esm({
|
|
|
33600
33601
|
{
|
|
33601
33602
|
options,
|
|
33602
33603
|
value: activeBeforeId,
|
|
33603
|
-
|
|
33604
|
+
onValueChange: handleBeforeChange,
|
|
33604
33605
|
"aria-label": t("versionDiff.beforeRevision")
|
|
33605
33606
|
}
|
|
33606
33607
|
) }),
|
|
@@ -33610,7 +33611,7 @@ var init_VersionDiff = __esm({
|
|
|
33610
33611
|
{
|
|
33611
33612
|
options,
|
|
33612
33613
|
value: activeAfterId,
|
|
33613
|
-
|
|
33614
|
+
onValueChange: handleAfterChange,
|
|
33614
33615
|
"aria-label": t("versionDiff.afterRevision")
|
|
33615
33616
|
}
|
|
33616
33617
|
) }),
|
|
@@ -38193,7 +38194,7 @@ function RuleEditor({
|
|
|
38193
38194
|
Select,
|
|
38194
38195
|
{
|
|
38195
38196
|
value: rule.whenEvent,
|
|
38196
|
-
|
|
38197
|
+
onValueChange: handleWhenChange,
|
|
38197
38198
|
options: availableEvents,
|
|
38198
38199
|
disabled,
|
|
38199
38200
|
className: "flex-1 min-w-0"
|
|
@@ -38204,7 +38205,7 @@ function RuleEditor({
|
|
|
38204
38205
|
Select,
|
|
38205
38206
|
{
|
|
38206
38207
|
value: rule.thenAction,
|
|
38207
|
-
|
|
38208
|
+
onValueChange: handleThenChange,
|
|
38208
38209
|
options: availableActions,
|
|
38209
38210
|
disabled,
|
|
38210
38211
|
className: "flex-1 min-w-0"
|
|
@@ -39261,7 +39262,7 @@ var init_Form = __esm({
|
|
|
39261
39262
|
...commonProps,
|
|
39262
39263
|
options,
|
|
39263
39264
|
value: String(currentValue),
|
|
39264
|
-
|
|
39265
|
+
onValueChange: (v) => handleChange(fieldName, v),
|
|
39265
39266
|
placeholder: field.placeholder || `Select ${label}...`
|
|
39266
39267
|
}
|
|
39267
39268
|
);
|