@conduction/nextcloud-vue 2.56.0-beta.70 → 2.56.0-beta.72
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/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js +67 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue.js +1 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js +93 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js.map +1 -1
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js +11 -9
- package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +55 -6
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +40 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnStorePage/CnStorePage.vue.js +1 -1
- package/dist/esm/components/CnStorePage/CnStorePage.vue2.js +3 -3
- package/dist/esm/components/CnStorePage/CnStorePage.vue2.js.map +1 -1
- package/dist/esm/components/CnStorePage/CnStorePage.vue3.js +5 -5
- package/dist/esm/components/CnStorePage/CnStorePage.vue3.js.map +1 -1
- package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue.js +1 -1
- package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue2.js +6 -6
- package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue3.js +1 -1
- package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +62 -59
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +62 -59
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +82 -78
- package/dist/esm/utils/parentCrumb.js +86 -0
- package/dist/esm/utils/parentCrumb.js.map +1 -0
- package/dist/nextcloud-vue.cjs.js +923 -586
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +82 -78
- package/l10n/en.json +62 -59
- package/l10n/nl.json +62 -59
- package/package.json +1 -1
- package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +67 -1
- package/src/components/CnDataMatrix/CnDataMatrix.vue +105 -4
- package/src/components/CnDetailPage/CnDetailPage.vue +55 -6
- package/src/components/CnIndexPage/CnIndexPage.vue +40 -1
- package/src/components/CnStorePage/CnStorePage.vue +8 -8
- package/src/components/CnStorePage/CnStorePublishDialog.vue +7 -7
- package/src/utils/parentCrumb.js +83 -0
|
@@ -1415,15 +1415,15 @@ var translations$s = {
|
|
|
1415
1415
|
Installed: "Installed",
|
|
1416
1416
|
"Installed.": "Installed.",
|
|
1417
1417
|
"Installing…": "Installing…",
|
|
1418
|
-
"No
|
|
1418
|
+
"No marketplace registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.": "No marketplace registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.",
|
|
1419
1419
|
"Nothing matches that search": "Nothing matches that search",
|
|
1420
|
-
"Search the
|
|
1420
|
+
"Search the marketplace": "Search the marketplace",
|
|
1421
1421
|
"All items": "All items",
|
|
1422
1422
|
"Some parts were not installed: {schemas}": "Some parts were not installed: {schemas}",
|
|
1423
|
-
|
|
1423
|
+
Marketplace: "Marketplace",
|
|
1424
1424
|
"The item could not be installed.": "The item could not be installed.",
|
|
1425
1425
|
"The items below ship with this app.": "The items below ship with this app.",
|
|
1426
|
-
"The
|
|
1426
|
+
"The marketplace registry did not answer.": "The marketplace registry did not answer.",
|
|
1427
1427
|
"Try a different term, or clear the kind filter.": "Try a different term, or clear the kind filter.",
|
|
1428
1428
|
"Version {version}": "Version {version}",
|
|
1429
1429
|
"App template": "App template",
|
|
@@ -1440,19 +1440,6 @@ var translations$s = {
|
|
|
1440
1440
|
"Start over": "Start over",
|
|
1441
1441
|
"Continue where you left off": "Continue where you left off",
|
|
1442
1442
|
Active: "Active",
|
|
1443
|
-
"Add block": "Add block",
|
|
1444
|
-
"Block type": "Block type",
|
|
1445
|
-
Blocks: "Blocks",
|
|
1446
|
-
"No blocks yet.": "No blocks yet.",
|
|
1447
|
-
"Drag to change the order": "Drag to change the order",
|
|
1448
|
-
Keep: "Keep",
|
|
1449
|
-
"Draft kept.": "Draft kept.",
|
|
1450
|
-
"Draft discarded.": "Draft discarded.",
|
|
1451
|
-
"Block removed.": "Block removed.",
|
|
1452
|
-
"{type} block added at position {position}.": "{type} block added at position {position}.",
|
|
1453
|
-
"Block moved to position {position} of {total}.": "Block moved to position {position} of {total}.",
|
|
1454
|
-
"Block {position} is still a draft. Keep or discard it first.": "Block {position} is still a draft. Keep or discard it first.",
|
|
1455
|
-
"{action}: {type} block {position}": "{action}: {type} block {position}",
|
|
1456
1443
|
Appraisal: "Appraisal",
|
|
1457
1444
|
Archiving: "Archiving",
|
|
1458
1445
|
Basis: "Basis",
|
|
@@ -1753,11 +1740,6 @@ var translations$s = {
|
|
|
1753
1740
|
"Inversed by": "Inversed by",
|
|
1754
1741
|
"Inversed by property": "Inversed by property",
|
|
1755
1742
|
"Invalid JSON format": "Invalid JSON format",
|
|
1756
|
-
"This text is too long for a QR code.": "This text is too long for a QR code.",
|
|
1757
|
-
"This code could not be refreshed and may no longer work.": "This code could not be refreshed and may no longer work.",
|
|
1758
|
-
"QR code for: {label}": "QR code for: {label}",
|
|
1759
|
-
"QR code": "QR code",
|
|
1760
|
-
"Changes in {seconds} s": "Changes in {seconds} s",
|
|
1761
1743
|
"Invalid schema reference: Expected string, got number ({value}). This will be sent to backend as-is.": "Invalid schema reference: Expected string, got number ({value}). This will be sent to backend as-is.",
|
|
1762
1744
|
"IRI reference": "IRI reference",
|
|
1763
1745
|
Item: "Item",
|
|
@@ -2058,9 +2040,6 @@ var translations$s = {
|
|
|
2058
2040
|
"Visible to end users": "Visible to end users",
|
|
2059
2041
|
Widget: "Widget",
|
|
2060
2042
|
"When on (default), logged-in users qualify for any rule that targets the `public` group. Disable to make authenticated access strictly gated by explicit group memberships — anonymous users are unaffected either way.": "When on (default), logged-in users qualify for any rule that targets the `public` group. Disable to make authenticated access strictly gated by explicit group memberships — anonymous users are unaffected either way.",
|
|
2061
|
-
"updated at {time}": "updated at {time}",
|
|
2062
|
-
"Cannot reach the server. This shows what it knew at {time}.": "Cannot reach the server. This shows what it knew at {time}.",
|
|
2063
|
-
"Cannot reach the server. This may be out of date.": "Cannot reach the server. This may be out of date.",
|
|
2064
2043
|
"Widget not available": "Widget not available",
|
|
2065
2044
|
"Write a note…": "Write a note…",
|
|
2066
2045
|
"Write back": "Write back",
|
|
@@ -2161,7 +2140,6 @@ var translations$s = {
|
|
|
2161
2140
|
"Connecting...": "Connecting...",
|
|
2162
2141
|
"Loading conversations...": "Loading conversations...",
|
|
2163
2142
|
"Could not connect to AI service": "Could not connect to AI service",
|
|
2164
|
-
"Nothing to set yet.": "Nothing to set yet.",
|
|
2165
2143
|
"Tool: {toolId}": "Tool: {toolId}",
|
|
2166
2144
|
"Reply was cancelled": "Reply was cancelled",
|
|
2167
2145
|
"No cards linked yet": "No cards linked yet",
|
|
@@ -2362,8 +2340,6 @@ var translations$s = {
|
|
|
2362
2340
|
"Link automation": "Link automation",
|
|
2363
2341
|
"Unlink automation": "Unlink automation",
|
|
2364
2342
|
"Search automations": "Search automations",
|
|
2365
|
-
"Nothing to choose from.": "Nothing to choose from.",
|
|
2366
|
-
"Time left: {time}": "Time left: {time}",
|
|
2367
2343
|
"No automations available": "No automations available",
|
|
2368
2344
|
"No automations linked yet": "No automations linked yet",
|
|
2369
2345
|
"Create an automation in NC Workflow settings first.": "Create an automation in NC Workflow settings first.",
|
|
@@ -2564,8 +2540,6 @@ var translations$s = {
|
|
|
2564
2540
|
"Provided by": "Provided by",
|
|
2565
2541
|
"this app": "this app",
|
|
2566
2542
|
"another app": "another app",
|
|
2567
|
-
"Start timer": "Start timer",
|
|
2568
|
-
"Stop timer": "Stop timer",
|
|
2569
2543
|
"the platform": "the platform",
|
|
2570
2544
|
"We matched this row to its feature by judgement.": "We matched this row to its feature by judgement.",
|
|
2571
2545
|
"No capability matches {query}": "No capability matches {query}",
|
|
@@ -2666,9 +2640,6 @@ var translations$s = {
|
|
|
2666
2640
|
"Reset columns": "Reset columns",
|
|
2667
2641
|
"Open the copy": "Open the copy",
|
|
2668
2642
|
"{title} was not linked: {reason}": "{title} was not linked: {reason}",
|
|
2669
|
-
"Drag to reorder": "Drag to reorder",
|
|
2670
|
-
"{action}: {label}": "{action}: {label}",
|
|
2671
|
-
"{label} moved to position {position} of {total}.": "{label} moved to position {position} of {total}.",
|
|
2672
2643
|
"no reason given": "no reason given",
|
|
2673
2644
|
"Links to take along": "Links to take along",
|
|
2674
2645
|
"Links are not copied yet. Only the fields are copied.": "Links are not copied yet. Only the fields are copied.",
|
|
@@ -2769,10 +2740,6 @@ var translations$s = {
|
|
|
2769
2740
|
"Register {id}": "Register {id}",
|
|
2770
2741
|
"Schema {id}": "Schema {id}",
|
|
2771
2742
|
"The registers could not be loaded: {reason}": "The registers could not be loaded: {reason}",
|
|
2772
|
-
"Address (by hand)": "Address (by hand)",
|
|
2773
|
-
"Looking for your location…": "Looking for your location…",
|
|
2774
|
-
"No location found. You can carry on, or add the address by hand.": "No location found. You can carry on, or add the address by hand.",
|
|
2775
|
-
"Location is inaccurate (±{accuracy} m). Wait for a better signal or add the address by hand.": "Location is inaccurate (±{accuracy} m). Wait for a better signal or add the address by hand.",
|
|
2776
2743
|
"no connection": "no connection",
|
|
2777
2744
|
"Confirm action": "Confirm action",
|
|
2778
2745
|
"Are you sure you want to continue?": "Are you sure you want to continue?",
|
|
@@ -2972,14 +2939,7 @@ var translations$s = {
|
|
|
2972
2939
|
"This flow has no published version, so it cannot run. Publish a version first.": "This flow has no published version, so it cannot run. Publish a version first.",
|
|
2973
2940
|
"This version cannot be published while a step has nowhere to send its work.": "This version cannot be published while a step has nowhere to send its work.",
|
|
2974
2941
|
"This version cannot be removed while a run is still using it.": "This version cannot be removed while a run is still using it.",
|
|
2975
|
-
"Score: {score} of {max}": "Score: {score} of {max}",
|
|
2976
|
-
"(weight {weight})": "(weight {weight})",
|
|
2977
|
-
"{points} point": "{points} point",
|
|
2978
|
-
"{points} points": "{points} points",
|
|
2979
2942
|
"That change was refused by the flow's current state.": "That change was refused by the flow's current state.",
|
|
2980
|
-
"The connection dropped. It carries on from where it stopped.": "The connection dropped. It carries on from where it stopped.",
|
|
2981
|
-
Resume: "Resume",
|
|
2982
|
-
"{done} {unit} of {total} {unit}": "{done} {unit} of {total} {unit}",
|
|
2983
2943
|
"This flow could not be found. It may have been deleted, or you may not have access to it.": "This flow could not be found. It may have been deleted, or you may not have access to it.",
|
|
2984
2944
|
"This version is read-only. Create a draft to change its steps; the published version keeps running until you publish the draft.": "This version is read-only. Create a draft to change its steps; the published version keeps running until you publish the draft.",
|
|
2985
2945
|
"The list of available steps could not be read, so no steps can be added. This does not mean the instance has none.": "The list of available steps could not be read, so no steps can be added. This does not mean the instance has none.",
|
|
@@ -3183,12 +3143,6 @@ var translations$s = {
|
|
|
3183
3143
|
"You are not allowed to see this plan.": "You are not allowed to see this plan.",
|
|
3184
3144
|
"The plan could not be loaded. Try again.": "The plan could not be loaded. Try again.",
|
|
3185
3145
|
Start: "Start",
|
|
3186
|
-
Reset: "Reset",
|
|
3187
|
-
Timer: "Timer",
|
|
3188
|
-
"Close to the norm": "Close to the norm",
|
|
3189
|
-
"Over the norm": "Over the norm",
|
|
3190
|
-
"{elapsed} of {norm}": "{elapsed} of {norm}",
|
|
3191
|
-
"Enter minutes, or minutes and seconds as 04:23.": "Enter minutes, or minutes and seconds as 04:23.",
|
|
3192
3146
|
Stop: "Stop",
|
|
3193
3147
|
"Can start": "Can start",
|
|
3194
3148
|
Stopped: "Stopped",
|
|
@@ -3811,8 +3765,8 @@ var translations$s = {
|
|
|
3811
3765
|
"Could not save. Your text is kept here; it is saved again when you type.": "Could not save. Your text is kept here; it is saved again when you type.",
|
|
3812
3766
|
"Skip this step": "Skip this step",
|
|
3813
3767
|
"{label} (optional)": "{label} (optional)",
|
|
3814
|
-
"Installed from this
|
|
3815
|
-
"Nothing from this
|
|
3768
|
+
"Installed from this marketplace": "Installed from this marketplace",
|
|
3769
|
+
"Nothing from this marketplace is installed yet.": "Nothing from this marketplace is installed yet.",
|
|
3816
3770
|
Updates: "Updates",
|
|
3817
3771
|
"Everything is up to date.": "Everything is up to date.",
|
|
3818
3772
|
"Check now": "Check now",
|
|
@@ -3820,20 +3774,20 @@ var translations$s = {
|
|
|
3820
3774
|
"Updates available": "Updates available",
|
|
3821
3775
|
"{items} ship with the app. They show here when no registry is connected.": "{items} ship with the app. They show here when no registry is connected.",
|
|
3822
3776
|
"Version {version}, {latest} is out": "Version {version}, {latest} is out",
|
|
3823
|
-
"No
|
|
3777
|
+
"No marketplace registry is configured. An administrator connects one under Administration settings.": "No marketplace registry is configured. An administrator connects one under Administration settings.",
|
|
3824
3778
|
"Nothing of this kind on this instance yet.": "Nothing of this kind on this instance yet.",
|
|
3825
|
-
"Publish to the
|
|
3826
|
-
"Published to the
|
|
3779
|
+
"Publish to the marketplace": "Publish to the marketplace",
|
|
3780
|
+
"Published to the marketplace.": "Published to the marketplace.",
|
|
3827
3781
|
Publisher: "Publisher",
|
|
3828
3782
|
"Publishing…": "Publishing…",
|
|
3829
3783
|
"Share a template built from your own configuration with the registry.": "Share a template built from your own configuration with the registry.",
|
|
3830
3784
|
"The item could not be published.": "The item could not be published.",
|
|
3831
3785
|
"The item is too large to publish.": "The item is too large to publish.",
|
|
3832
|
-
"The
|
|
3833
|
-
"The
|
|
3834
|
-
"The
|
|
3786
|
+
"The marketplace registry did not answer. Try again later.": "The marketplace registry did not answer. Try again later.",
|
|
3787
|
+
"The marketplace registry is busy. Try again in a minute.": "The marketplace registry is busy. Try again in a minute.",
|
|
3788
|
+
"The marketplace registry refused the item.": "The marketplace registry refused the item.",
|
|
3835
3789
|
"What the template carries": "What the template carries",
|
|
3836
|
-
"You may not publish to this
|
|
3790
|
+
"You may not publish to this marketplace.": "You may not publish to this marketplace.",
|
|
3837
3791
|
"Move {name}": "Move {name}",
|
|
3838
3792
|
"Filter on {name}": "Filter on {name}",
|
|
3839
3793
|
"(empty)": "(empty)",
|
|
@@ -3897,7 +3851,56 @@ var translations$s = {
|
|
|
3897
3851
|
Condition: "Condition",
|
|
3898
3852
|
"These conditions are kept as written": "These conditions are kept as written",
|
|
3899
3853
|
"This group has no conditions yet.": "This group has no conditions yet.",
|
|
3854
|
+
"Add block": "Add block",
|
|
3855
|
+
"Block type": "Block type",
|
|
3856
|
+
Blocks: "Blocks",
|
|
3857
|
+
"No blocks yet.": "No blocks yet.",
|
|
3858
|
+
"Drag to change the order": "Drag to change the order",
|
|
3859
|
+
Keep: "Keep",
|
|
3860
|
+
"Draft kept.": "Draft kept.",
|
|
3861
|
+
"Draft discarded.": "Draft discarded.",
|
|
3862
|
+
"Block removed.": "Block removed.",
|
|
3863
|
+
"{type} block added at position {position}.": "{type} block added at position {position}.",
|
|
3864
|
+
"Block moved to position {position} of {total}.": "Block moved to position {position} of {total}.",
|
|
3865
|
+
"Block {position} is still a draft. Keep or discard it first.": "Block {position} is still a draft. Keep or discard it first.",
|
|
3866
|
+
"{action}: {type} block {position}": "{action}: {type} block {position}",
|
|
3867
|
+
"This text is too long for a QR code.": "This text is too long for a QR code.",
|
|
3868
|
+
"This code could not be refreshed and may no longer work.": "This code could not be refreshed and may no longer work.",
|
|
3869
|
+
"QR code for: {label}": "QR code for: {label}",
|
|
3870
|
+
"QR code": "QR code",
|
|
3871
|
+
"Changes in {seconds} s": "Changes in {seconds} s",
|
|
3872
|
+
"updated at {time}": "updated at {time}",
|
|
3873
|
+
"Cannot reach the server. This shows what it knew at {time}.": "Cannot reach the server. This shows what it knew at {time}.",
|
|
3874
|
+
"Cannot reach the server. This may be out of date.": "Cannot reach the server. This may be out of date.",
|
|
3875
|
+
"Nothing to set yet.": "Nothing to set yet.",
|
|
3876
|
+
"Nothing to choose from.": "Nothing to choose from.",
|
|
3877
|
+
"Time left: {time}": "Time left: {time}",
|
|
3878
|
+
"Start timer": "Start timer",
|
|
3879
|
+
"Stop timer": "Stop timer",
|
|
3880
|
+
"Drag to reorder": "Drag to reorder",
|
|
3881
|
+
"{action}: {label}": "{action}: {label}",
|
|
3882
|
+
"{label} moved to position {position} of {total}.": "{label} moved to position {position} of {total}.",
|
|
3883
|
+
"Address (by hand)": "Address (by hand)",
|
|
3884
|
+
"Looking for your location…": "Looking for your location…",
|
|
3885
|
+
"No location found. You can carry on, or add the address by hand.": "No location found. You can carry on, or add the address by hand.",
|
|
3886
|
+
"Location is inaccurate (±{accuracy} m). Wait for a better signal or add the address by hand.": "Location is inaccurate (±{accuracy} m). Wait for a better signal or add the address by hand.",
|
|
3887
|
+
"Score: {score} of {max}": "Score: {score} of {max}",
|
|
3888
|
+
"(weight {weight})": "(weight {weight})",
|
|
3889
|
+
"{points} point": "{points} point",
|
|
3890
|
+
"{points} points": "{points} points",
|
|
3891
|
+
"The connection dropped. It carries on from where it stopped.": "The connection dropped. It carries on from where it stopped.",
|
|
3892
|
+
Resume: "Resume",
|
|
3893
|
+
"{done} {unit} of {total} {unit}": "{done} {unit} of {total} {unit}",
|
|
3894
|
+
Reset: "Reset",
|
|
3895
|
+
Timer: "Timer",
|
|
3896
|
+
"Close to the norm": "Close to the norm",
|
|
3897
|
+
"Over the norm": "Over the norm",
|
|
3898
|
+
"{elapsed} of {norm}": "{elapsed} of {norm}",
|
|
3899
|
+
"Enter minutes, or minutes and seconds as 04:23.": "Enter minutes, or minutes and seconds as 04:23.",
|
|
3900
3900
|
Rank: "Rank",
|
|
3901
|
+
"{column}, {row}": "{column}, {row}",
|
|
3902
|
+
"{cell}: empty": "{cell}: empty",
|
|
3903
|
+
"{cell}: {value}": "{cell}: {value}",
|
|
3901
3904
|
"Keep this one": "Keep this one",
|
|
3902
3905
|
"Keep the server one": "Keep the server one",
|
|
3903
3906
|
"Conflict: which version do you keep?": "Conflict: which version do you keep?",
|
|
@@ -4517,19 +4520,6 @@ var translations$c = {
|
|
|
4517
4520
|
Ownership: "Eigendom",
|
|
4518
4521
|
"Record archival metadata": "Archiefmetadata van het object",
|
|
4519
4522
|
"Record state": "Archiefstatus",
|
|
4520
|
-
"Add block": "Blok toevoegen",
|
|
4521
|
-
"Block type": "Soort blok",
|
|
4522
|
-
Blocks: "Blokken",
|
|
4523
|
-
"No blocks yet.": "Nog geen blokken.",
|
|
4524
|
-
"Drag to change the order": "Sleep om de volgorde te wijzigen",
|
|
4525
|
-
Keep: "Bewaren",
|
|
4526
|
-
"Draft kept.": "Concept bewaard.",
|
|
4527
|
-
"Draft discarded.": "Concept weggegooid.",
|
|
4528
|
-
"Block removed.": "Blok verwijderd.",
|
|
4529
|
-
"{type} block added at position {position}.": "Blok {type} toegevoegd op positie {position}.",
|
|
4530
|
-
"Block moved to position {position} of {total}.": "Blok verplaatst naar positie {position} van {total}.",
|
|
4531
|
-
"Block {position} is still a draft. Keep or discard it first.": "Blok {position} is nog een concept. Bewaar of verwijder het eerst.",
|
|
4532
|
-
"{action}: {type} block {position}": "{action}: blok {type} {position}",
|
|
4533
4523
|
"Recorded on the object": "Vastgelegd op het object",
|
|
4534
4524
|
"Retention period": "Bewaartermijn",
|
|
4535
4525
|
"Schema archival annotation": "Archiveringsannotatie van het schema",
|
|
@@ -4830,11 +4820,6 @@ var translations$c = {
|
|
|
4830
4820
|
Hostname: "Hostnaam",
|
|
4831
4821
|
ID: "ID",
|
|
4832
4822
|
"ID / UUID:": "ID / UUID:",
|
|
4833
|
-
"This text is too long for a QR code.": "Deze tekst is te lang voor een QR-code.",
|
|
4834
|
-
"This code could not be refreshed and may no longer work.": "Deze code kon niet worden vernieuwd en werkt misschien niet meer.",
|
|
4835
|
-
"QR code for: {label}": "QR-code voor: {label}",
|
|
4836
|
-
"QR code": "QR-code",
|
|
4837
|
-
"Changes in {seconds} s": "Verandert over {seconds} s",
|
|
4838
4823
|
"IDN email": "IDN e-mail",
|
|
4839
4824
|
"image, document, audio, video": "afbeelding, document, audio, video",
|
|
4840
4825
|
"IDN hostname": "IDN-hostnaam",
|
|
@@ -5135,9 +5120,6 @@ var translations$c = {
|
|
|
5135
5120
|
"Title *": "Titel *",
|
|
5136
5121
|
Type: "Type",
|
|
5137
5122
|
"Type to search…": "Typ om te zoeken…",
|
|
5138
|
-
"updated at {time}": "bijgewerkt om {time}",
|
|
5139
|
-
"Cannot reach the server. This shows what it knew at {time}.": "De server is niet bereikbaar. Dit is de stand van {time}.",
|
|
5140
|
-
"Cannot reach the server. This may be out of date.": "De server is niet bereikbaar. Dit kan verouderd zijn.",
|
|
5141
5123
|
"Type value and press Enter": "Typ een waarde en druk op Enter",
|
|
5142
5124
|
"(technical) Property name": "(technische) Eigenschapsnaam",
|
|
5143
5125
|
"false — field must not exist": "false — veld mag niet bestaan",
|
|
@@ -5238,7 +5220,6 @@ var translations$c = {
|
|
|
5238
5220
|
"Start new chat": "Nieuwe chat starten",
|
|
5239
5221
|
History: "Historie",
|
|
5240
5222
|
"No audit entries yet": "Nog geen wijzigingen vastgelegd",
|
|
5241
|
-
"Nothing to set yet.": "Nog niets in te stellen.",
|
|
5242
5223
|
Meetings: "Afspraken",
|
|
5243
5224
|
"No meetings": "Geen afspraken",
|
|
5244
5225
|
"Open in Calendar": "Openen in Agenda",
|
|
@@ -5439,8 +5420,6 @@ var translations$c = {
|
|
|
5439
5420
|
"Create new project": "Nieuw project aanmaken",
|
|
5440
5421
|
"Search projects": "Projecten zoeken",
|
|
5441
5422
|
"No projects available": "Geen projecten beschikbaar",
|
|
5442
|
-
"Nothing to choose from.": "Niets om uit te kiezen.",
|
|
5443
|
-
"Time left: {time}": "Resterende tijd: {time}",
|
|
5444
5423
|
"Create a project in NC Costs first, or use the create dialog.": "Maak eerst een project aan in NC Kosten, of gebruik het aanmaakvenster.",
|
|
5445
5424
|
"NC Costs is not installed.": "NC Kosten is niet geïnstalleerd.",
|
|
5446
5425
|
"Link project": "Project koppelen",
|
|
@@ -5641,8 +5620,6 @@ var translations$c = {
|
|
|
5641
5620
|
"This run recorded no steps.": "Deze uitvoering heeft geen stappen vastgelegd.",
|
|
5642
5621
|
"Replay on the canvas": "Opnieuw afspelen op het canvas",
|
|
5643
5622
|
"Add a step": "Een stap toevoegen",
|
|
5644
|
-
"Start timer": "Timer starten",
|
|
5645
|
-
"Stop timer": "Timer stoppen",
|
|
5646
5623
|
"Version number. A semantic version appears once the flow is published.": "Versienummer. Een semantische versie verschijnt zodra de flow is gepubliceerd.",
|
|
5647
5624
|
"Numbered when semantic versions were introduced, not derived from a comparison.": "Genummerd toen semantische versies werden ingevoerd, niet afgeleid uit een vergelijking.",
|
|
5648
5625
|
"A major version means a step, a connection or a setting was removed.": "Een major versie betekent dat een stap, een verbinding of een instelling is verwijderd.",
|
|
@@ -5656,15 +5633,15 @@ var translations$c = {
|
|
|
5656
5633
|
Installed: "Geïnstalleerd",
|
|
5657
5634
|
"Installed.": "Geïnstalleerd.",
|
|
5658
5635
|
"Installing…": "Installeren…",
|
|
5659
|
-
"No
|
|
5636
|
+
"No marketplace registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.": "Er is geen marktplaatsregister ingesteld, dus er is niets van het netwerk opgevraagd. Een beheerder kan er een koppelen in de beheerinstellingen.",
|
|
5660
5637
|
"Nothing matches that search": "Niets gevonden voor die zoekopdracht",
|
|
5661
|
-
"Search the
|
|
5638
|
+
"Search the marketplace": "Zoek in de marktplaats",
|
|
5662
5639
|
"All items": "Alle",
|
|
5663
5640
|
"Some parts were not installed: {schemas}": "Sommige onderdelen zijn niet geïnstalleerd: {schemas}",
|
|
5664
|
-
|
|
5641
|
+
Marketplace: "Marktplaats",
|
|
5665
5642
|
"The item could not be installed.": "Het item kon niet worden geïnstalleerd.",
|
|
5666
5643
|
"The items below ship with this app.": "De items hieronder worden met deze app meegeleverd.",
|
|
5667
|
-
"The
|
|
5644
|
+
"The marketplace registry did not answer.": "Het marktplaatsregister gaf geen antwoord.",
|
|
5668
5645
|
"Try a different term, or clear the kind filter.": "Probeer een andere zoekterm of wis het soortfilter.",
|
|
5669
5646
|
"Version {version}": "Versie {version}",
|
|
5670
5647
|
"App template": "App-sjabloon",
|
|
@@ -5743,9 +5720,6 @@ var translations$c = {
|
|
|
5743
5720
|
"Show capabilities": "Toon functionaliteiten",
|
|
5744
5721
|
"Provided by": "Geleverd door",
|
|
5745
5722
|
"this app": "deze app",
|
|
5746
|
-
"Drag to reorder": "Sleep om te ordenen",
|
|
5747
|
-
"{action}: {label}": "{action}: {label}",
|
|
5748
|
-
"{label} moved to position {position} of {total}.": "{label} verplaatst naar positie {position} van {total}.",
|
|
5749
5723
|
"another app": "andere app",
|
|
5750
5724
|
"the platform": "het platform",
|
|
5751
5725
|
"We matched this row to its feature by judgement.": "Wij hebben deze rij op inschatting aan een functie gekoppeld.",
|
|
@@ -5846,10 +5820,6 @@ var translations$c = {
|
|
|
5846
5820
|
"Unpin {column}": "{column} losmaken",
|
|
5847
5821
|
"Reset columns": "Kolommen herstellen",
|
|
5848
5822
|
"Open the copy": "De kopie openen",
|
|
5849
|
-
"Address (by hand)": "Adres (handmatig)",
|
|
5850
|
-
"Looking for your location…": "Je locatie wordt gezocht…",
|
|
5851
|
-
"No location found. You can carry on, or add the address by hand.": "Geen locatie gevonden. Je kunt doorgaan, of het adres handmatig toevoegen.",
|
|
5852
|
-
"Location is inaccurate (±{accuracy} m). Wait for a better signal or add the address by hand.": "Locatie onnauwkeurig (±{accuracy} m). Wacht op beter signaal of voeg het adres handmatig toe.",
|
|
5853
5823
|
"{title} was not linked: {reason}": "{title} is niet gekoppeld: {reason}",
|
|
5854
5824
|
"no reason given": "geen reden opgegeven",
|
|
5855
5825
|
"Links to take along": "Koppelingen meenemen",
|
|
@@ -6049,14 +6019,7 @@ var translations$c = {
|
|
|
6049
6019
|
"Action completed.": "Actie uitgevoerd.",
|
|
6050
6020
|
"Run queued": "Run staat in de wachtrij",
|
|
6051
6021
|
"Agent runtime unavailable": "De agent-runtime is niet beschikbaar",
|
|
6052
|
-
"Score: {score} of {max}": "Score: {score} van {max}",
|
|
6053
|
-
"(weight {weight})": "(weging {weight})",
|
|
6054
|
-
"{points} point": "{points} punt",
|
|
6055
|
-
"{points} points": "{points} punten",
|
|
6056
6022
|
"Run completed.": "Run voltooid.",
|
|
6057
|
-
"The connection dropped. It carries on from where it stopped.": "De verbinding viel weg. Het gaat verder waar het was.",
|
|
6058
|
-
Resume: "Hervatten",
|
|
6059
|
-
"{done} {unit} of {total} {unit}": "{done} {unit} van {total} {unit}",
|
|
6060
6023
|
"Edit with Buildiq": "Bewerken met Buildiq",
|
|
6061
6024
|
"Save page": "Pagina opslaan",
|
|
6062
6025
|
"Edit in Buildiq": "Bewerken in Buildiq",
|
|
@@ -6472,12 +6435,6 @@ var translations$c = {
|
|
|
6472
6435
|
"You are not allowed to see this plan.": "Je mag dit plan niet zien.",
|
|
6473
6436
|
"The plan could not be loaded. Try again.": "Het plan kon niet worden geladen. Probeer het opnieuw.",
|
|
6474
6437
|
Start: "Starten",
|
|
6475
|
-
Reset: "Reset",
|
|
6476
|
-
Timer: "Timer",
|
|
6477
|
-
"Close to the norm": "Bijna aan de norm",
|
|
6478
|
-
"Over the norm": "Over de norm",
|
|
6479
|
-
"{elapsed} of {norm}": "{elapsed} van {norm}",
|
|
6480
|
-
"Enter minutes, or minutes and seconds as 04:23.": "Vul minuten in, of minuten en seconden als 04:23.",
|
|
6481
6438
|
Stop: "Stoppen",
|
|
6482
6439
|
"Can start": "Kan starten",
|
|
6483
6440
|
Stopped: "Gestopt",
|
|
@@ -7153,8 +7110,8 @@ var translations$c = {
|
|
|
7153
7110
|
"Could not save. Your text is kept here; it is saved again when you type.": "Opslaan is mislukt. Je tekst blijft hier staan en wordt opnieuw opgeslagen zodra je typt.",
|
|
7154
7111
|
"Skip this step": "Deze stap overslaan",
|
|
7155
7112
|
"{label} (optional)": "{label} (optioneel)",
|
|
7156
|
-
"Installed from this
|
|
7157
|
-
"Nothing from this
|
|
7113
|
+
"Installed from this marketplace": "Geïnstalleerd uit deze marktplaats",
|
|
7114
|
+
"Nothing from this marketplace is installed yet.": "Er is nog niets uit deze marktplaats geïnstalleerd.",
|
|
7158
7115
|
Updates: "Updates",
|
|
7159
7116
|
"Everything is up to date.": "Alles is bijgewerkt.",
|
|
7160
7117
|
"Check now": "Nu controleren",
|
|
@@ -7162,20 +7119,20 @@ var translations$c = {
|
|
|
7162
7119
|
"Updates available": "Updates beschikbaar",
|
|
7163
7120
|
"{items} ship with the app. They show here when no registry is connected.": "{items} komen mee met de app. Ze staan hier als er geen registry is gekoppeld.",
|
|
7164
7121
|
"Version {version}, {latest} is out": "Versie {version}, {latest} is uit",
|
|
7165
|
-
"No
|
|
7122
|
+
"No marketplace registry is configured. An administrator connects one under Administration settings.": "Er is geen marktplaats-registry ingesteld. Een beheerder koppelt er een onder Beheerinstellingen.",
|
|
7166
7123
|
"Nothing of this kind on this instance yet.": "Hier is nog niets van deze soort.",
|
|
7167
|
-
"Publish to the
|
|
7168
|
-
"Published to the
|
|
7124
|
+
"Publish to the marketplace": "Publiceren in de marktplaats",
|
|
7125
|
+
"Published to the marketplace.": "Gepubliceerd in de marktplaats.",
|
|
7169
7126
|
Publisher: "Uitgever",
|
|
7170
7127
|
"Publishing…": "Publiceren…",
|
|
7171
7128
|
"Share a template built from your own configuration with the registry.": "Deel een sjabloon uit je eigen inrichting met de registry.",
|
|
7172
7129
|
"The item could not be published.": "Het item kon niet worden gepubliceerd.",
|
|
7173
7130
|
"The item is too large to publish.": "Het item is te groot om te publiceren.",
|
|
7174
|
-
"The
|
|
7175
|
-
"The
|
|
7176
|
-
"The
|
|
7131
|
+
"The marketplace registry did not answer. Try again later.": "De marktplaats-registry antwoordde niet. Probeer het later opnieuw.",
|
|
7132
|
+
"The marketplace registry is busy. Try again in a minute.": "De marktplaats-registry is bezig. Probeer het over een minuut opnieuw.",
|
|
7133
|
+
"The marketplace registry refused the item.": "De marktplaats-registry weigerde het item.",
|
|
7177
7134
|
"What the template carries": "Wat het sjabloon meeneemt",
|
|
7178
|
-
"You may not publish to this
|
|
7135
|
+
"You may not publish to this marketplace.": "Je mag niet publiceren in deze marktplaats.",
|
|
7179
7136
|
"Move {name}": "{name} verplaatsen",
|
|
7180
7137
|
"Filter on {name}": "Filteren op {name}",
|
|
7181
7138
|
"(empty)": "(leeg)",
|
|
@@ -7239,7 +7196,56 @@ var translations$c = {
|
|
|
7239
7196
|
Condition: "Voorwaarde",
|
|
7240
7197
|
"These conditions are kept as written": "Deze voorwaarden blijven zoals ze zijn geschreven",
|
|
7241
7198
|
"This group has no conditions yet.": "Deze groep heeft nog geen voorwaarden.",
|
|
7199
|
+
"Add block": "Blok toevoegen",
|
|
7200
|
+
"Block type": "Soort blok",
|
|
7201
|
+
Blocks: "Blokken",
|
|
7202
|
+
"No blocks yet.": "Nog geen blokken.",
|
|
7203
|
+
"Drag to change the order": "Sleep om de volgorde te wijzigen",
|
|
7204
|
+
Keep: "Bewaren",
|
|
7205
|
+
"Draft kept.": "Concept bewaard.",
|
|
7206
|
+
"Draft discarded.": "Concept weggegooid.",
|
|
7207
|
+
"Block removed.": "Blok verwijderd.",
|
|
7208
|
+
"{type} block added at position {position}.": "Blok {type} toegevoegd op positie {position}.",
|
|
7209
|
+
"Block moved to position {position} of {total}.": "Blok verplaatst naar positie {position} van {total}.",
|
|
7210
|
+
"Block {position} is still a draft. Keep or discard it first.": "Blok {position} is nog een concept. Bewaar of verwijder het eerst.",
|
|
7211
|
+
"{action}: {type} block {position}": "{action}: blok {type} {position}",
|
|
7212
|
+
"This text is too long for a QR code.": "Deze tekst is te lang voor een QR-code.",
|
|
7213
|
+
"This code could not be refreshed and may no longer work.": "Deze code kon niet worden vernieuwd en werkt misschien niet meer.",
|
|
7214
|
+
"QR code for: {label}": "QR-code voor: {label}",
|
|
7215
|
+
"QR code": "QR-code",
|
|
7216
|
+
"Changes in {seconds} s": "Verandert over {seconds} s",
|
|
7217
|
+
"updated at {time}": "bijgewerkt om {time}",
|
|
7218
|
+
"Cannot reach the server. This shows what it knew at {time}.": "De server is niet bereikbaar. Dit is de stand van {time}.",
|
|
7219
|
+
"Cannot reach the server. This may be out of date.": "De server is niet bereikbaar. Dit kan verouderd zijn.",
|
|
7220
|
+
"Nothing to set yet.": "Nog niets in te stellen.",
|
|
7221
|
+
"Nothing to choose from.": "Niets om uit te kiezen.",
|
|
7222
|
+
"Time left: {time}": "Resterende tijd: {time}",
|
|
7223
|
+
"Start timer": "Timer starten",
|
|
7224
|
+
"Stop timer": "Timer stoppen",
|
|
7225
|
+
"Drag to reorder": "Sleep om te ordenen",
|
|
7226
|
+
"{action}: {label}": "{action}: {label}",
|
|
7227
|
+
"{label} moved to position {position} of {total}.": "{label} verplaatst naar positie {position} van {total}.",
|
|
7228
|
+
"Address (by hand)": "Adres (handmatig)",
|
|
7229
|
+
"Looking for your location…": "Je locatie wordt gezocht…",
|
|
7230
|
+
"No location found. You can carry on, or add the address by hand.": "Geen locatie gevonden. Je kunt doorgaan, of het adres handmatig toevoegen.",
|
|
7231
|
+
"Location is inaccurate (±{accuracy} m). Wait for a better signal or add the address by hand.": "Locatie onnauwkeurig (±{accuracy} m). Wacht op beter signaal of voeg het adres handmatig toe.",
|
|
7232
|
+
"Score: {score} of {max}": "Score: {score} van {max}",
|
|
7233
|
+
"(weight {weight})": "(weging {weight})",
|
|
7234
|
+
"{points} point": "{points} punt",
|
|
7235
|
+
"{points} points": "{points} punten",
|
|
7236
|
+
"The connection dropped. It carries on from where it stopped.": "De verbinding viel weg. Het gaat verder waar het was.",
|
|
7237
|
+
Resume: "Hervatten",
|
|
7238
|
+
"{done} {unit} of {total} {unit}": "{done} {unit} van {total} {unit}",
|
|
7239
|
+
Reset: "Reset",
|
|
7240
|
+
Timer: "Timer",
|
|
7241
|
+
"Close to the norm": "Bijna aan de norm",
|
|
7242
|
+
"Over the norm": "Over de norm",
|
|
7243
|
+
"{elapsed} of {norm}": "{elapsed} van {norm}",
|
|
7244
|
+
"Enter minutes, or minutes and seconds as 04:23.": "Vul minuten in, of minuten en seconden als 04:23.",
|
|
7242
7245
|
Rank: "Rang",
|
|
7246
|
+
"{column}, {row}": "{column}, {row}",
|
|
7247
|
+
"{cell}: empty": "{cell}: leeg",
|
|
7248
|
+
"{cell}: {value}": "{cell}: {value}",
|
|
7243
7249
|
"Keep this one": "Deze houden",
|
|
7244
7250
|
"Keep the server one": "Die van de server",
|
|
7245
7251
|
"Conflict: which version do you keep?": "Conflict: welke versie houdt u?",
|
|
@@ -14517,7 +14523,7 @@ function fillMyTeamToken(text, name) {
|
|
|
14517
14523
|
* @return {unknown} The value at the path, or undefined when a segment is missing.
|
|
14518
14524
|
* @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-primary-action-follows-the-stage
|
|
14519
14525
|
*/
|
|
14520
|
-
function readPath$
|
|
14526
|
+
function readPath$a(data, path) {
|
|
14521
14527
|
if (!path) {
|
|
14522
14528
|
return data
|
|
14523
14529
|
}
|
|
@@ -15224,7 +15230,7 @@ function resolveFilterValue(v, ctx) {
|
|
|
15224
15230
|
}
|
|
15225
15231
|
if (v.startsWith('@context.')) {
|
|
15226
15232
|
// @spec openspec/changes/files-second-line-fields/specs/files-second-line-fields/spec.md#requirement-widget-props-can-read-the-detail-pages-context-records
|
|
15227
|
-
const found = ctx && ctx.context ? readPath$
|
|
15233
|
+
const found = ctx && ctx.context ? readPath$a(ctx.context, v.slice('@context.'.length)) : undefined;
|
|
15228
15234
|
return found === undefined ? v : found
|
|
15229
15235
|
}
|
|
15230
15236
|
if (v.startsWith('@workspace.')) {
|
|
@@ -21912,11 +21918,11 @@ function buildReferenceStages({
|
|
|
21912
21918
|
} = {}) {
|
|
21913
21919
|
const list = (Array.isArray(refs) ? refs : []).filter((ref) => ref && typeof ref === 'object' && refIdOf$1(ref) !== '');
|
|
21914
21920
|
const narrowed = narrowBy && narrowBy.field && narrowValue !== ''
|
|
21915
|
-
? list.filter((ref) => refIdOf$1(readPath$
|
|
21921
|
+
? list.filter((ref) => refIdOf$1(readPath$a(ref, narrowBy.field)) === String(narrowValue))
|
|
21916
21922
|
: list;
|
|
21917
21923
|
|
|
21918
21924
|
const orderOf = (ref) => {
|
|
21919
|
-
const n = Number(orderField ? readPath$
|
|
21925
|
+
const n = Number(orderField ? readPath$a(ref, orderField) : NaN);
|
|
21920
21926
|
return Number.isFinite(n) ? n : Number.MAX_SAFE_INTEGER
|
|
21921
21927
|
};
|
|
21922
21928
|
const ordered = narrowed
|
|
@@ -21929,8 +21935,8 @@ function buildReferenceStages({
|
|
|
21929
21935
|
const refsByKey = new Map();
|
|
21930
21936
|
for (const ref of ordered) {
|
|
21931
21937
|
const id = refIdOf$1(ref);
|
|
21932
|
-
const label = textOf(labelField ? readPath$
|
|
21933
|
-
const key = mergeBy ? (textOf(readPath$
|
|
21938
|
+
const label = textOf(labelField ? readPath$a(ref, labelField) : (ref.name ?? ref.title)) || id;
|
|
21939
|
+
const key = mergeBy ? (textOf(readPath$a(ref, mergeBy)) || id) : id;
|
|
21934
21940
|
keyByValue.set(id, key);
|
|
21935
21941
|
if (!refsByKey.has(key)) {
|
|
21936
21942
|
refsByKey.set(key, []);
|
|
@@ -21952,7 +21958,7 @@ function buildReferenceStages({
|
|
|
21952
21958
|
}
|
|
21953
21959
|
state.color = mappedColor(state.color, colorMap);
|
|
21954
21960
|
if (closedField) {
|
|
21955
|
-
state.closed = rows.every((ref) => Boolean(readPath$
|
|
21961
|
+
state.closed = rows.every((ref) => Boolean(readPath$a(ref, closedField)));
|
|
21956
21962
|
}
|
|
21957
21963
|
}
|
|
21958
21964
|
return { states, keyByValue, refsByKey }
|
|
@@ -21975,12 +21981,12 @@ function buildReferenceStages({
|
|
|
21975
21981
|
function flattenItemRefs(rows, { itemsPath, keyField } = {}) {
|
|
21976
21982
|
const out = [];
|
|
21977
21983
|
for (const parent of Array.isArray(rows) ? rows : []) {
|
|
21978
|
-
const items = readPath$
|
|
21984
|
+
const items = readPath$a(parent, itemsPath);
|
|
21979
21985
|
if (!Array.isArray(items)) {
|
|
21980
21986
|
continue
|
|
21981
21987
|
}
|
|
21982
21988
|
for (const item of items) {
|
|
21983
|
-
const key = item && typeof item === 'object' ? textOf(readPath$
|
|
21989
|
+
const key = item && typeof item === 'object' ? textOf(readPath$a(item, keyField)) : '';
|
|
21984
21990
|
if (key !== '') {
|
|
21985
21991
|
out.push({ ...item, id: key, _parent: refIdOf$1(parent) });
|
|
21986
21992
|
}
|
|
@@ -21997,7 +22003,7 @@ function flattenItemRefs(rows, { itemsPath, keyField } = {}) {
|
|
|
21997
22003
|
* @return {string} The colour, '' when it has none.
|
|
21998
22004
|
*/
|
|
21999
22005
|
function colorOfRef(ref, colorField) {
|
|
22000
|
-
const color = colorField ? readPath$
|
|
22006
|
+
const color = colorField ? readPath$a(ref, colorField) : ref.color;
|
|
22001
22007
|
return typeof color === 'string' ? color : ''
|
|
22002
22008
|
}
|
|
22003
22009
|
|
|
@@ -22046,7 +22052,7 @@ function mappedColor(color, colorMap) {
|
|
|
22046
22052
|
* @spec openspec/changes/board-column-capacity/specs/board-view/spec.md#requirement-a-column-can-carry-a-capacity
|
|
22047
22053
|
*/
|
|
22048
22054
|
function capacityOfRef(ref, capacityField) {
|
|
22049
|
-
return capacityField ? capacityValue(readPath$
|
|
22055
|
+
return capacityField ? capacityValue(readPath$a(ref, capacityField)) : null
|
|
22050
22056
|
}
|
|
22051
22057
|
|
|
22052
22058
|
/**
|
|
@@ -22072,7 +22078,7 @@ function fullTargetOf({ target, card, rows = [], field, capacityField, rowKey =
|
|
|
22072
22078
|
}
|
|
22073
22079
|
const id = refIdOf$1(target);
|
|
22074
22080
|
const self = String(card?.[rowKey] ?? '');
|
|
22075
|
-
const count = (Array.isArray(rows) ? rows : []).filter((row) => String(row?.[rowKey] ?? '') !== self && refIdOf$1(readPath$
|
|
22081
|
+
const count = (Array.isArray(rows) ? rows : []).filter((row) => String(row?.[rowKey] ?? '') !== self && refIdOf$1(readPath$a(row, field)) === id).length;
|
|
22076
22082
|
return count >= capacity ? { count, capacity } : null
|
|
22077
22083
|
}
|
|
22078
22084
|
|
|
@@ -22092,7 +22098,7 @@ function buildValueStages({ rows = [], field = '', valueLabels = null, emptyLabe
|
|
|
22092
22098
|
const labels = valueLabels && typeof valueLabels === 'object' ? valueLabels : {};
|
|
22093
22099
|
const seen = new Map();
|
|
22094
22100
|
for (const row of Array.isArray(rows) ? rows : []) {
|
|
22095
|
-
const raw = readPath$
|
|
22101
|
+
const raw = readPath$a(row, field);
|
|
22096
22102
|
const id = refIdOf$1(raw);
|
|
22097
22103
|
if (id !== '' && !seen.has(id)) {
|
|
22098
22104
|
seen.set(id, typeof labels[id] === 'string' ? labels[id] : (textOf(raw) || id));
|
|
@@ -22117,7 +22123,7 @@ function buildValueStages({ rows = [], field = '', valueLabels = null, emptyLabe
|
|
|
22117
22123
|
* (which lands the card in the off-board column).
|
|
22118
22124
|
*/
|
|
22119
22125
|
function columnKeyOfRow(row, field, keyByValue) {
|
|
22120
|
-
const id = refIdOf$1(readPath$
|
|
22126
|
+
const id = refIdOf$1(readPath$a(row, field));
|
|
22121
22127
|
return keyByValue.has(id) ? keyByValue.get(id) : id
|
|
22122
22128
|
}
|
|
22123
22129
|
|
|
@@ -22144,8 +22150,8 @@ function resolveDropValue({ card, toKey, kind, refsByKey = new Map(), narrowBy =
|
|
|
22144
22150
|
return null
|
|
22145
22151
|
}
|
|
22146
22152
|
if (narrowBy && narrowBy.field && narrowBy.rowField) {
|
|
22147
|
-
const parent = refIdOf$1(readPath$
|
|
22148
|
-
const match = candidates.find((ref) => refIdOf$1(readPath$
|
|
22153
|
+
const parent = refIdOf$1(readPath$a(card, narrowBy.rowField));
|
|
22154
|
+
const match = candidates.find((ref) => refIdOf$1(readPath$a(ref, narrowBy.field)) === parent);
|
|
22149
22155
|
return match ? { value: refIdOf$1(match), target: match } : null
|
|
22150
22156
|
}
|
|
22151
22157
|
return { value: refIdOf$1(candidates[0]), target: candidates[0] }
|
|
@@ -23369,7 +23375,7 @@ function isCurrencyCode(value) {
|
|
|
23369
23375
|
* @param {string} path The path, e.g. `currency` or `price.currency`.
|
|
23370
23376
|
* @return {unknown} The value, or undefined.
|
|
23371
23377
|
*/
|
|
23372
|
-
function readPath$
|
|
23378
|
+
function readPath$9(object, path) {
|
|
23373
23379
|
return String(path).split('.').reduce((acc, key) => (acc && typeof acc === 'object' ? acc[key] : undefined), object)
|
|
23374
23380
|
}
|
|
23375
23381
|
|
|
@@ -23396,7 +23402,7 @@ function readPath$8(object, path) {
|
|
|
23396
23402
|
function resolveFormatCurrency(format, configCtx, object = null) {
|
|
23397
23403
|
const fmt = format || {};
|
|
23398
23404
|
if (typeof fmt.currencyField === 'string' && fmt.currencyField !== '' && object && typeof object === 'object') {
|
|
23399
|
-
const own = readPath$
|
|
23405
|
+
const own = readPath$9(object, fmt.currencyField);
|
|
23400
23406
|
if (isCurrencyCode(own)) {
|
|
23401
23407
|
return own.toUpperCase()
|
|
23402
23408
|
}
|
|
@@ -23713,16 +23719,16 @@ function pivotCells(records, config) {
|
|
|
23713
23719
|
if (!record || typeof record !== 'object') {
|
|
23714
23720
|
continue
|
|
23715
23721
|
}
|
|
23716
|
-
const row = keyOf$2(readPath$
|
|
23717
|
-
const column = keyOf$2(readPath$
|
|
23722
|
+
const row = keyOf$2(readPath$a(record, cfg.rowField));
|
|
23723
|
+
const column = keyOf$2(readPath$a(record, cfg.columnField));
|
|
23718
23724
|
if (row === null || column === null) {
|
|
23719
23725
|
continue
|
|
23720
23726
|
}
|
|
23721
|
-
note(rows, row, cfg.rowLabelField ? keyOf$2(readPath$
|
|
23722
|
-
note(columns, column, cfg.columnLabelField ? keyOf$2(readPath$
|
|
23727
|
+
note(rows, row, cfg.rowLabelField ? keyOf$2(readPath$a(record, cfg.rowLabelField)) : null, cfg.rowOrderField ? readPath$a(record, cfg.rowOrderField) : undefined);
|
|
23728
|
+
note(columns, column, cfg.columnLabelField ? keyOf$2(readPath$a(record, cfg.columnLabelField)) : null, cfg.columnOrderField ? readPath$a(record, cfg.columnOrderField) : undefined);
|
|
23723
23729
|
const cell = `${row}\u0000${column}`;
|
|
23724
23730
|
if (!cells.has(cell)) {
|
|
23725
|
-
const value = readPath$
|
|
23731
|
+
const value = readPath$a(record, cfg.valueField);
|
|
23726
23732
|
cells.set(cell, value === undefined ? null : value);
|
|
23727
23733
|
}
|
|
23728
23734
|
}
|
|
@@ -23762,12 +23768,12 @@ function pivotCells(records, config) {
|
|
|
23762
23768
|
*/
|
|
23763
23769
|
function cellsFromRecord(record, config, cellFilter = {}) {
|
|
23764
23770
|
const cfg = config && typeof config === 'object' ? config : {};
|
|
23765
|
-
const list = record ? readPath$
|
|
23771
|
+
const list = record ? readPath$a(record, cfg.cellsPath) : null;
|
|
23766
23772
|
const wanted = Object.entries(cellFilter && typeof cellFilter === 'object' ? cellFilter : {});
|
|
23767
23773
|
const cells = (Array.isArray(list) ? list : []).filter((cell) => cell && typeof cell === 'object'
|
|
23768
|
-
&& wanted.every(([field, value]) => keyOf$2(readPath$
|
|
23774
|
+
&& wanted.every(([field, value]) => keyOf$2(readPath$a(cell, field)) === keyOf$2(value)));
|
|
23769
23775
|
const axis = (path) => {
|
|
23770
|
-
const value = record && path ? readPath$
|
|
23776
|
+
const value = record && path ? readPath$a(record, path) : null;
|
|
23771
23777
|
return Array.isArray(value) ? value : undefined
|
|
23772
23778
|
};
|
|
23773
23779
|
return {
|
|
@@ -31918,11 +31924,11 @@ var script$8S = {
|
|
|
31918
31924
|
}
|
|
31919
31925
|
const sortField = badge.sortField || '';
|
|
31920
31926
|
const time = (row) => {
|
|
31921
|
-
const value = sortField ? Date.parse(readPath$
|
|
31927
|
+
const value = sortField ? Date.parse(readPath$a(row, sortField)) : NaN;
|
|
31922
31928
|
return Number.isNaN(value) ? 0 : value
|
|
31923
31929
|
};
|
|
31924
31930
|
const latest = [...this.badgeRows].sort((a, b) => time(b) - time(a))[0];
|
|
31925
|
-
const raw = readPath$
|
|
31931
|
+
const raw = readPath$a(latest, badge.path || 'status');
|
|
31926
31932
|
if (raw === undefined || raw === null || raw === '') {
|
|
31927
31933
|
return ''
|
|
31928
31934
|
}
|
|
@@ -31999,17 +32005,17 @@ var script$8S = {
|
|
|
31999
32005
|
const statusMap = c.statusMap && typeof c.statusMap === 'object' ? c.statusMap : {};
|
|
32000
32006
|
const stored = this.rawMessages()
|
|
32001
32007
|
.map(({ message, side, key }, index) => {
|
|
32002
|
-
const channel = c.channelField ? readPath$
|
|
32008
|
+
const channel = c.channelField ? readPath$a(message, c.channelField) : undefined;
|
|
32003
32009
|
const channelKey = channel === undefined || channel === null ? '' : String(channel);
|
|
32004
|
-
const status = c.statusField ? readPath$
|
|
32010
|
+
const status = c.statusField ? readPath$a(message, c.statusField) : undefined;
|
|
32005
32011
|
const statusKey = status === undefined || status === null ? '' : String(status);
|
|
32006
|
-
const sideOf = side || (String(readPath$
|
|
32012
|
+
const sideOf = side || (String(readPath$a(message, c.directionField || c.sideField || 'side')) === usValue ? 'us' : 'them');
|
|
32007
32013
|
return {
|
|
32008
32014
|
id: key,
|
|
32009
32015
|
author: this.authorOf(message, sideOf),
|
|
32010
|
-
subject: c.subjectField ? this.textOf(readPath$
|
|
32016
|
+
subject: c.subjectField ? this.textOf(readPath$a(message, c.subjectField)) : '',
|
|
32011
32017
|
note: this.noteOf(message),
|
|
32012
|
-
time: readPath$
|
|
32018
|
+
time: readPath$a(message, c.timestampField || c.timeField || 'time'),
|
|
32013
32019
|
text: this.bodyOf(message),
|
|
32014
32020
|
side: sideOf,
|
|
32015
32021
|
channel: channelKey === '' ? '' : this.tr(Object.hasOwn(channelMap, channelKey) ? channelMap[channelKey] : channelKey),
|
|
@@ -32221,8 +32227,8 @@ var script$8S = {
|
|
|
32221
32227
|
rawMessages() {
|
|
32222
32228
|
const c = this.content || {};
|
|
32223
32229
|
const lists = !this.source && Array.isArray(c.fields) && c.fields.length > 0
|
|
32224
|
-
? c.fields.filter((entry) => entry && typeof entry.field === 'string').map((entry) => ({ list: readPath$
|
|
32225
|
-
: [{ list: this.source ? this.listed : readPath$
|
|
32230
|
+
? c.fields.filter((entry) => entry && typeof entry.field === 'string').map((entry) => ({ list: readPath$a(this.objectData || {}, entry.field), side: entry.side === 'us' ? 'us' : 'them', prefix: entry.field }))
|
|
32231
|
+
: [{ list: this.source ? this.listed : readPath$a(this.objectData || {}, c.field || 'messages'), side: '', prefix: 'message' }];
|
|
32226
32232
|
return lists.flatMap(({ list, side, prefix }) => (Array.isArray(list) ? list : [])
|
|
32227
32233
|
.filter((message) => message && typeof message === 'object')
|
|
32228
32234
|
.map((message, index) => ({ message, side, key: String(message.id ?? `${prefix}-${index}`) })))
|
|
@@ -32241,7 +32247,7 @@ var script$8S = {
|
|
|
32241
32247
|
if (!when || typeof when !== 'object' || typeof when.field !== 'string') {
|
|
32242
32248
|
return true
|
|
32243
32249
|
}
|
|
32244
|
-
const value = readPath$
|
|
32250
|
+
const value = readPath$a(message, when.field);
|
|
32245
32251
|
if (when.empty === true) {
|
|
32246
32252
|
return value === undefined || value === null || value === ''
|
|
32247
32253
|
}
|
|
@@ -32299,7 +32305,7 @@ var script$8S = {
|
|
|
32299
32305
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
32300
32306
|
const path = action.endpoint
|
|
32301
32307
|
.replace(/@objectId/g, encodeURIComponent(String(this.objectId ?? '')))
|
|
32302
|
-
.replace(/\{([\w.]+)\}/g, (_m, field) => encodeURIComponent(String(readPath$
|
|
32308
|
+
.replace(/\{([\w.]+)\}/g, (_m, field) => encodeURIComponent(String(readPath$a(stored.message, field) ?? '')));
|
|
32303
32309
|
const response = await axios.request({ method: String(action.method || 'POST').toLowerCase(), url: generateUrl(path) });
|
|
32304
32310
|
if (await this.followUp(action, response?.data)) {
|
|
32305
32311
|
return
|
|
@@ -32334,7 +32340,7 @@ var script$8S = {
|
|
|
32334
32340
|
if (!map || typeof map !== 'object' || !answer || typeof answer !== 'object') {
|
|
32335
32341
|
return false
|
|
32336
32342
|
}
|
|
32337
|
-
const status = readPath$
|
|
32343
|
+
const status = readPath$a(answer, action.errors?.path || 'status');
|
|
32338
32344
|
const next = status === undefined || status === null ? null : map[String(status)];
|
|
32339
32345
|
if (!next || typeof next !== 'object') {
|
|
32340
32346
|
return false
|
|
@@ -32364,7 +32370,7 @@ var script$8S = {
|
|
|
32364
32370
|
if (!errors || typeof errors !== 'object' || !answer || typeof answer !== 'object') {
|
|
32365
32371
|
return ''
|
|
32366
32372
|
}
|
|
32367
|
-
const status = readPath$
|
|
32373
|
+
const status = readPath$a(answer, errors.path || 'status');
|
|
32368
32374
|
if (status === undefined || status === null || (errors.ok || ['sent', 'ok']).map(String).includes(String(status))) {
|
|
32369
32375
|
return ''
|
|
32370
32376
|
}
|
|
@@ -32388,8 +32394,8 @@ var script$8S = {
|
|
|
32388
32394
|
const c = this.content || {};
|
|
32389
32395
|
const field = (side === 'us' ? c.usAuthorField : c.themAuthorField) || c.senderField || c.authorField || 'author';
|
|
32390
32396
|
const value = typeof field === 'string' && field.startsWith('@object.')
|
|
32391
|
-
? readPath$
|
|
32392
|
-
: readPath$
|
|
32397
|
+
? readPath$a(this.objectData || {}, field.slice('@object.'.length))
|
|
32398
|
+
: readPath$a(message, field);
|
|
32393
32399
|
const text = this.textOf(value);
|
|
32394
32400
|
const format = side === 'us' ? c.usAuthorFormat : c.themAuthorFormat;
|
|
32395
32401
|
return format === 'user' && text !== '' ? (userDisplayName(text) || text) : text
|
|
@@ -32408,10 +32414,10 @@ var script$8S = {
|
|
|
32408
32414
|
const c = this.content || {};
|
|
32409
32415
|
const fields = c.bodyField || c.textField || 'text';
|
|
32410
32416
|
if (!Array.isArray(fields)) {
|
|
32411
|
-
return readPath$
|
|
32417
|
+
return readPath$a(message, fields)
|
|
32412
32418
|
}
|
|
32413
32419
|
for (const field of fields) {
|
|
32414
|
-
const value = readPath$
|
|
32420
|
+
const value = readPath$a(message, field);
|
|
32415
32421
|
if (value !== undefined && value !== null && value !== '') {
|
|
32416
32422
|
return value
|
|
32417
32423
|
}
|
|
@@ -32429,8 +32435,8 @@ var script$8S = {
|
|
|
32429
32435
|
*/
|
|
32430
32436
|
noteOf(message) {
|
|
32431
32437
|
const c = this.content || {};
|
|
32432
|
-
const note = c.noteField ? this.textOf(readPath$
|
|
32433
|
-
const count = c.attachmentCountField ? Number(readPath$
|
|
32438
|
+
const note = c.noteField ? this.textOf(readPath$a(message, c.noteField)) : '';
|
|
32439
|
+
const count = c.attachmentCountField ? Number(readPath$a(message, c.attachmentCountField)) : 0;
|
|
32434
32440
|
const attachments = Number.isFinite(count) && count > 0 ? l10n.translatePlural('nextcloud-vue', '%n attachment', '%n attachments', count) : '';
|
|
32435
32441
|
return [note, attachments].filter((part) => part !== '').join(', ')
|
|
32436
32442
|
},
|
|
@@ -34085,14 +34091,14 @@ var script$8M = {
|
|
|
34085
34091
|
return (Array.isArray(this.documents) ? this.documents : [])
|
|
34086
34092
|
.filter((document) => document && typeof document === 'object')
|
|
34087
34093
|
.map((document, index) => {
|
|
34088
|
-
const raw = readPath$
|
|
34094
|
+
const raw = readPath$a(document, this.statusField);
|
|
34089
34095
|
const wanted = raw === null || raw === undefined ? '' : String(raw).toLowerCase();
|
|
34090
34096
|
const status = this.effectiveStatuses.find((candidate) => candidate.value.toLowerCase() === wanted)
|
|
34091
34097
|
|| this.fallbackStatus;
|
|
34092
|
-
const name = readPath$
|
|
34093
|
-
const key = readPath$
|
|
34094
|
-
const href = readPath$
|
|
34095
|
-
const meta = readPath$
|
|
34098
|
+
const name = readPath$a(document, this.nameField) || document.title || document.filename || '';
|
|
34099
|
+
const key = readPath$a(document, this.rowKey);
|
|
34100
|
+
const href = readPath$a(document, this.hrefField);
|
|
34101
|
+
const meta = readPath$a(document, this.metaField);
|
|
34096
34102
|
return {
|
|
34097
34103
|
key: key === undefined || key === null ? `row-${index}` : String(key),
|
|
34098
34104
|
name: String(name),
|
|
@@ -34296,7 +34302,7 @@ var script$8L = {
|
|
|
34296
34302
|
* @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-document-review-list
|
|
34297
34303
|
*/
|
|
34298
34304
|
documents() {
|
|
34299
|
-
const value = readPath$
|
|
34305
|
+
const value = readPath$a(this.objectData || {}, this.content.field || 'documents');
|
|
34300
34306
|
return Array.isArray(value) ? value : []
|
|
34301
34307
|
},
|
|
34302
34308
|
|
|
@@ -34322,7 +34328,7 @@ var script$8L = {
|
|
|
34322
34328
|
*/
|
|
34323
34329
|
onRowAction(document) {
|
|
34324
34330
|
const route = this.content.rowAction?.route;
|
|
34325
|
-
const id = readPath$
|
|
34331
|
+
const id = readPath$a(document, this.content.rowKey || 'id');
|
|
34326
34332
|
if (typeof route !== 'string' || route === '' || !this.$router || id === undefined || id === null) {
|
|
34327
34333
|
return
|
|
34328
34334
|
}
|
|
@@ -34717,24 +34723,24 @@ function optionFromRow(row, from = {}) {
|
|
|
34717
34723
|
return row === '' ? null : { id: row, label: String(row) }
|
|
34718
34724
|
}
|
|
34719
34725
|
const id = typeof from.valueField === 'string' && from.valueField !== ''
|
|
34720
|
-
? readPath$
|
|
34726
|
+
? readPath$a(row, from.valueField)
|
|
34721
34727
|
: (row.id ?? row['@self']?.id ?? row.uuid);
|
|
34722
34728
|
if (id === null || id === undefined || id === '' || typeof id === 'object') {
|
|
34723
34729
|
return null
|
|
34724
34730
|
}
|
|
34725
34731
|
const label = typeof from.labelField === 'string' && from.labelField !== ''
|
|
34726
|
-
? readPath$
|
|
34732
|
+
? readPath$a(row, from.labelField)
|
|
34727
34733
|
: (row.title || row.name);
|
|
34728
34734
|
const option = { id, label: label === null || label === undefined || label === '' ? String(id) : String(label) };
|
|
34729
34735
|
// `keepFields`: values of the row the option carries along as `data`.
|
|
34730
34736
|
if (Array.isArray(from.keepFields) && from.keepFields.length > 0) {
|
|
34731
34737
|
option.data = Object.fromEntries(from.keepFields
|
|
34732
34738
|
.filter((field) => typeof field === 'string' && field !== '')
|
|
34733
|
-
.map((field) => [field, readPath$
|
|
34739
|
+
.map((field) => [field, readPath$a(row, field)]));
|
|
34734
34740
|
}
|
|
34735
34741
|
// `groupField`: the option's group, which keeps options of one group together.
|
|
34736
34742
|
if (typeof from.groupField === 'string' && from.groupField !== '') {
|
|
34737
|
-
const group = readPath$
|
|
34743
|
+
const group = readPath$a(row, from.groupField);
|
|
34738
34744
|
if (group !== null && group !== undefined && group !== '') {
|
|
34739
34745
|
option.group = String(group);
|
|
34740
34746
|
}
|
|
@@ -34786,11 +34792,11 @@ async function loadOptionsFrom(from, ctx = {}) {
|
|
|
34786
34792
|
function narrowRows(rows, from) {
|
|
34787
34793
|
let out = rows;
|
|
34788
34794
|
if (isPlainObject$d(from.where)) {
|
|
34789
|
-
out = out.filter((row) => row && typeof row === 'object' && Object.entries(from.where).every(([key, value]) => String(readPath$
|
|
34795
|
+
out = out.filter((row) => row && typeof row === 'object' && Object.entries(from.where).every(([key, value]) => String(readPath$a(row, key)) === String(value)));
|
|
34790
34796
|
}
|
|
34791
34797
|
if (typeof from.itemsPath === 'string' && from.itemsPath !== '') {
|
|
34792
34798
|
out = out.flatMap((row) => {
|
|
34793
|
-
const items = readPath$
|
|
34799
|
+
const items = readPath$a(row, from.itemsPath);
|
|
34794
34800
|
return Array.isArray(items) ? items : []
|
|
34795
34801
|
});
|
|
34796
34802
|
}
|
|
@@ -43150,14 +43156,14 @@ function objectRowsOf(object, spec) {
|
|
|
43150
43156
|
return []
|
|
43151
43157
|
}
|
|
43152
43158
|
const valuePath = typeof spec.valuePath === 'string' && spec.valuePath !== '' ? spec.valuePath : '';
|
|
43153
|
-
let value = readPath$
|
|
43159
|
+
let value = readPath$a(object, spec.path);
|
|
43154
43160
|
if (spec.where && typeof spec.where === 'object') {
|
|
43155
43161
|
const entries = Array.isArray(value) ? value : [];
|
|
43156
43162
|
const match = entries.find((entry) => entry && typeof entry === 'object'
|
|
43157
43163
|
&& Object.entries(spec.where).every(([key, wanted]) => entry[key] === wanted));
|
|
43158
|
-
value = match && valuePath ? readPath$
|
|
43164
|
+
value = match && valuePath ? readPath$a(match, valuePath) : match;
|
|
43159
43165
|
} else if (valuePath) {
|
|
43160
|
-
value = readPath$
|
|
43166
|
+
value = readPath$a(value, valuePath);
|
|
43161
43167
|
}
|
|
43162
43168
|
if (typeof value === 'string') {
|
|
43163
43169
|
try {
|
|
@@ -43203,7 +43209,7 @@ function stageOf(object, stageField = 'status') {
|
|
|
43203
43209
|
if (!object || typeof object !== 'object') {
|
|
43204
43210
|
return ''
|
|
43205
43211
|
}
|
|
43206
|
-
const value = readPath$
|
|
43212
|
+
const value = readPath$a(object, stageField || 'status');
|
|
43207
43213
|
if (value === null || value === undefined || typeof value === 'object') {
|
|
43208
43214
|
return ''
|
|
43209
43215
|
}
|
|
@@ -43356,7 +43362,7 @@ function isChecklistItemDone(item, object) {
|
|
|
43356
43362
|
return evaluateVisibleWhenLocal(item.doneWhen, data)
|
|
43357
43363
|
}
|
|
43358
43364
|
if (typeof item.doneField === 'string' && item.doneField !== '') {
|
|
43359
|
-
const value = readPath$
|
|
43365
|
+
const value = readPath$a(data, item.doneField);
|
|
43360
43366
|
return Array.isArray(value) ? value.length > 0 : Boolean(value)
|
|
43361
43367
|
}
|
|
43362
43368
|
return false
|
|
@@ -43523,7 +43529,7 @@ function resolveTabCount(tab, object) {
|
|
|
43523
43529
|
const unread = counts && typeof counts === 'object' && typeof key === 'string' ? Number(counts[key]) : 0;
|
|
43524
43530
|
return Number.isFinite(unread) && unread > 0 ? unread : null
|
|
43525
43531
|
}
|
|
43526
|
-
const value = readPath$
|
|
43532
|
+
const value = readPath$a(object && typeof object === 'object' ? object : {}, tab.countField);
|
|
43527
43533
|
if (Array.isArray(value)) {
|
|
43528
43534
|
return value.length
|
|
43529
43535
|
}
|
|
@@ -44795,7 +44801,7 @@ function fillTemplate(template, object, now = new Date(), context = null) {
|
|
|
44795
44801
|
}
|
|
44796
44802
|
let missing = false;
|
|
44797
44803
|
const text = template.replace(TOKEN$1, (_match, path, format, arg) => {
|
|
44798
|
-
const value = object && typeof object === 'object' ? readPath$
|
|
44804
|
+
const value = object && typeof object === 'object' ? readPath$a(object, path) : undefined;
|
|
44799
44805
|
const shown = formatValue(value, format || '', now, arg || '', object, context && context.config ? context.config : null, context && context.formatters ? context.formatters : null);
|
|
44800
44806
|
if (shown === '') {
|
|
44801
44807
|
missing = true;
|
|
@@ -47015,7 +47021,7 @@ function cellsOf(rows, rowId) {
|
|
|
47015
47021
|
* @param {Function} [readValue] How a path is read off the row; `readPath` by default.
|
|
47016
47022
|
* @return {object} The filter map.
|
|
47017
47023
|
*/
|
|
47018
|
-
function resolveRowWhere(where, row, readValue = readPath$
|
|
47024
|
+
function resolveRowWhere(where, row, readValue = readPath$a) {
|
|
47019
47025
|
const out = {};
|
|
47020
47026
|
for (const [key, value] of Object.entries(where || {})) {
|
|
47021
47027
|
out[key] = typeof value === 'string' && value.startsWith('@self.') ? readValue(row, value.slice('@self.'.length)) : value;
|
|
@@ -47031,7 +47037,7 @@ function resolveRowWhere(where, row, readValue = readPath$9) {
|
|
|
47031
47037
|
* @param {Function} [readValue] How a path is read off the row.
|
|
47032
47038
|
* @return {Promise<number|unknown|null>} The count, the highest value, or null when there is none.
|
|
47033
47039
|
*/
|
|
47034
|
-
async function fetchRowAggregate(agg, row, readValue = readPath$
|
|
47040
|
+
async function fetchRowAggregate(agg, row, readValue = readPath$a) {
|
|
47035
47041
|
const where = resolveRowWhere(agg.where, row, readValue);
|
|
47036
47042
|
const isMax = agg.op === 'max';
|
|
47037
47043
|
const params = isMax
|
|
@@ -47041,7 +47047,7 @@ async function fetchRowAggregate(agg, row, readValue = readPath$9) {
|
|
|
47041
47047
|
const data = res && res.data;
|
|
47042
47048
|
if (isMax) {
|
|
47043
47049
|
const first = data && Array.isArray(data.results) ? data.results[0] : undefined;
|
|
47044
|
-
const top = first === undefined ? undefined : readPath$
|
|
47050
|
+
const top = first === undefined ? undefined : readPath$a(first, agg.field);
|
|
47045
47051
|
return top === undefined || top === '' ? null : top
|
|
47046
47052
|
}
|
|
47047
47053
|
return (data && (data.total ?? (Array.isArray(data.results) ? data.results.length : undefined))) ?? 0
|
|
@@ -47274,7 +47280,7 @@ function resolveRowIndicators(indicators, row, cap = DEFAULT_ROW_INDICATOR_CAP)
|
|
|
47274
47280
|
* @param {Function} [readValue] How a path is read off the row.
|
|
47275
47281
|
* @return {string} The id.
|
|
47276
47282
|
*/
|
|
47277
|
-
function refIdOf(row, spec, readValue = readPath$
|
|
47283
|
+
function refIdOf(row, spec, readValue = readPath$a) {
|
|
47278
47284
|
const value = spec && typeof spec.field === 'string' ? readValue(row, spec.field) : undefined;
|
|
47279
47285
|
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
47280
47286
|
}
|
|
@@ -47317,7 +47323,7 @@ async function readReferenced(spec, id) {
|
|
|
47317
47323
|
* @param {Function} [readValue] How a path is read off a row.
|
|
47318
47324
|
* @return {Promise<object>} `{ [alias]: { [id]: record } }`; an unreadable id is absent.
|
|
47319
47325
|
*/
|
|
47320
|
-
async function loadSecondaryRefs(refs, rows, readValue = readPath$
|
|
47326
|
+
async function loadSecondaryRefs(refs, rows, readValue = readPath$a) {
|
|
47321
47327
|
const out = {};
|
|
47322
47328
|
const jobs = [];
|
|
47323
47329
|
for (const [alias, spec] of Object.entries(refs || {})) {
|
|
@@ -47348,7 +47354,7 @@ async function loadSecondaryRefs(refs, rows, readValue = readPath$9) {
|
|
|
47348
47354
|
* @param {Function} [readValue] How a path is read off the row.
|
|
47349
47355
|
* @return {object} The row and its references.
|
|
47350
47356
|
*/
|
|
47351
|
-
function rowWithRefs(row, refs, loaded, readValue = readPath$
|
|
47357
|
+
function rowWithRefs(row, refs, loaded, readValue = readPath$a) {
|
|
47352
47358
|
const out = { ...row };
|
|
47353
47359
|
for (const [alias, spec] of Object.entries(refs || {})) {
|
|
47354
47360
|
const id = refIdOf(row, spec, readValue);
|
|
@@ -47729,7 +47735,7 @@ var script$8y = {
|
|
|
47729
47735
|
if (templated !== '') {
|
|
47730
47736
|
return templated
|
|
47731
47737
|
}
|
|
47732
|
-
const candidates = [this.labelPath ? readPath$
|
|
47738
|
+
const candidates = [this.labelPath ? readPath$a(obj, this.labelPath) : undefined, obj[this.labelField], obj.title, obj['@self'] && obj['@self'].name];
|
|
47733
47739
|
for (const raw of candidates) {
|
|
47734
47740
|
if (typeof raw === 'string' && raw !== '') {
|
|
47735
47741
|
return raw
|
|
@@ -48774,7 +48780,7 @@ var script$8w = {
|
|
|
48774
48780
|
progressPercent() {
|
|
48775
48781
|
const props = this.widgetProps || {};
|
|
48776
48782
|
const fallbacks = Array.isArray(props.fallbackFields) ? props.fallbackFields : [];
|
|
48777
|
-
const candidates = [this.value, ...fallbacks.map((field) => readPath$
|
|
48783
|
+
const candidates = [this.value, ...fallbacks.map((field) => readPath$a(this.row || {}, field))];
|
|
48778
48784
|
const raw = candidates.find((v) => v !== null && v !== undefined && v !== '' && !Number.isNaN(Number(v)));
|
|
48779
48785
|
if (raw === undefined) {
|
|
48780
48786
|
return null
|
|
@@ -48822,12 +48828,12 @@ var script$8w = {
|
|
|
48822
48828
|
const row = this.row || {};
|
|
48823
48829
|
const when = badge.when && typeof badge.when === 'object' ? badge.when : {};
|
|
48824
48830
|
for (const [field, expected] of Object.entries(when)) {
|
|
48825
|
-
const actual = readPath$
|
|
48831
|
+
const actual = readPath$a(row, field);
|
|
48826
48832
|
if (actual !== undefined && actual !== null && actual !== '' && String(actual) !== String(expected)) {
|
|
48827
48833
|
return null
|
|
48828
48834
|
}
|
|
48829
48835
|
}
|
|
48830
|
-
const days = ageInDays(readPath$
|
|
48836
|
+
const days = ageInDays(readPath$a(row, badge.dateField || '@self.updated'));
|
|
48831
48837
|
const after = Number(badge.afterDays);
|
|
48832
48838
|
if (days === null || !Number.isFinite(after) || days < after) {
|
|
48833
48839
|
return null
|
|
@@ -48981,7 +48987,7 @@ var script$8w = {
|
|
|
48981
48987
|
if (!field || !this.row) {
|
|
48982
48988
|
return null
|
|
48983
48989
|
}
|
|
48984
|
-
const ref = readPath$
|
|
48990
|
+
const ref = readPath$a(this.row, field);
|
|
48985
48991
|
const empty = ref === null || ref === undefined || ref === '' || (Array.isArray(ref) && ref.length === 0);
|
|
48986
48992
|
return empty || (typeof ref === 'object' && !Array.isArray(ref)) ? null : ref
|
|
48987
48993
|
},
|
|
@@ -103700,7 +103706,7 @@ function fillAuditLabel(label, entry, { actor = '', object = null, valueLabels =
|
|
|
103700
103706
|
.replace('{state}', (entry && entry.stateAfter) || '')
|
|
103701
103707
|
.replace(/\{changed\.([\w.-]+)\}/g, (match, key) => changedValue(entry, key, valueLabels))
|
|
103702
103708
|
.replace(/\{object\.([\w.-]+)\}/g, (match, path) => {
|
|
103703
|
-
const value = object ? readPath$
|
|
103709
|
+
const value = object ? readPath$a(object, path) : undefined;
|
|
103704
103710
|
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
103705
103711
|
})
|
|
103706
103712
|
}
|
|
@@ -122073,7 +122079,7 @@ async function resolveObjectFolderInfo({ apiBase, register, schema, objectId, ui
|
|
|
122073
122079
|
* @param {string} path A dotted path; empty answers the value itself.
|
|
122074
122080
|
* @return {(Array|object|string|number|boolean|null|undefined)} What sits at the path, or undefined.
|
|
122075
122081
|
*/
|
|
122076
|
-
function readPath$
|
|
122082
|
+
function readPath$8(value, path) {
|
|
122077
122083
|
if (typeof path !== 'string' || path === '') {
|
|
122078
122084
|
return value
|
|
122079
122085
|
}
|
|
@@ -122097,7 +122103,7 @@ function readPath$7(value, path) {
|
|
|
122097
122103
|
* @return {object} The records by file id.
|
|
122098
122104
|
*/
|
|
122099
122105
|
function indexRowData(data, { path = '', key = 'fileId' } = {}) {
|
|
122100
|
-
let picked = readPath$
|
|
122106
|
+
let picked = readPath$8(data, path);
|
|
122101
122107
|
if (picked && typeof picked === 'object' && !Array.isArray(picked)) {
|
|
122102
122108
|
if (Array.isArray(picked.items)) {
|
|
122103
122109
|
picked = picked.items;
|
|
@@ -125094,7 +125100,7 @@ var script$7s = {
|
|
|
125094
125100
|
const entry = byId[node.fileid] ?? byId[String(node.fileid)] ?? {};
|
|
125095
125101
|
const out = {};
|
|
125096
125102
|
for (const [prop, field] of Object.entries(wanted)) {
|
|
125097
|
-
const value = readPath$
|
|
125103
|
+
const value = readPath$a(entry, String(field));
|
|
125098
125104
|
if (value !== undefined && value !== null && value !== '') {
|
|
125099
125105
|
out[prop] = value;
|
|
125100
125106
|
}
|
|
@@ -148959,7 +148965,7 @@ function endpointSource(declared = {}, context = {}) {
|
|
|
148959
148965
|
*/
|
|
148960
148966
|
function fillRowTemplate(template, row) {
|
|
148961
148967
|
return String(template).replace(/\{([\w.@]+)\}/g, (match, path) => {
|
|
148962
|
-
const value = readPath$
|
|
148968
|
+
const value = readPath$a(row, path);
|
|
148963
148969
|
return value === undefined || value === null ? '' : encodeURIComponent(String(value))
|
|
148964
148970
|
})
|
|
148965
148971
|
}
|
|
@@ -149054,7 +149060,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149054
149060
|
const labels = new Map();
|
|
149055
149061
|
for (const object of objects) {
|
|
149056
149062
|
const id = object.id || object.uuid || (object['@self'] && object['@self'].id);
|
|
149057
|
-
const label = readPath$
|
|
149063
|
+
const label = readPath$a(object, resolve.labelField || 'title') ?? object.name;
|
|
149058
149064
|
if (id !== undefined && label !== undefined && label !== null) {
|
|
149059
149065
|
labels.set(String(id), String(label));
|
|
149060
149066
|
}
|
|
@@ -149098,7 +149104,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149098
149104
|
return fillTemplate(translate(kind.linkedTemplate), object)
|
|
149099
149105
|
}
|
|
149100
149106
|
if (kind.linkedField) {
|
|
149101
|
-
const value = readPath$
|
|
149107
|
+
const value = readPath$a(object, kind.linkedField);
|
|
149102
149108
|
return value === undefined || value === null ? '' : String(value)
|
|
149103
149109
|
}
|
|
149104
149110
|
return ''
|
|
@@ -149115,7 +149121,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149115
149121
|
const labels = new Map();
|
|
149116
149122
|
for (const object of objects) {
|
|
149117
149123
|
const id = object.id || object.uuid || (object['@self'] && object['@self'].id);
|
|
149118
|
-
const label = readPath$
|
|
149124
|
+
const label = readPath$a(object, resolve.labelField || 'title') ?? object.name;
|
|
149119
149125
|
if (id !== undefined && label !== undefined && label !== null) {
|
|
149120
149126
|
labels.set(String(id), String(label));
|
|
149121
149127
|
}
|
|
@@ -149127,11 +149133,11 @@ function searchSource(config = {}, context = {}) {
|
|
|
149127
149133
|
if (kind.subtitleTemplate) {
|
|
149128
149134
|
const resolve = kind.subtitleResolve;
|
|
149129
149135
|
const data = labels && resolve
|
|
149130
|
-
? { ...object, [resolve.as || resolve.field]: labels.get(String(readPath$
|
|
149136
|
+
? { ...object, [resolve.as || resolve.field]: labels.get(String(readPath$a(object, resolve.field) ?? '')) ?? '' }
|
|
149131
149137
|
: object;
|
|
149132
149138
|
return fillTemplate(translate(kind.subtitleTemplate), data)
|
|
149133
149139
|
}
|
|
149134
|
-
return kind.subtitleField ? String(readPath$
|
|
149140
|
+
return kind.subtitleField ? String(readPath$a(object, kind.subtitleField) ?? '') : ''
|
|
149135
149141
|
};
|
|
149136
149142
|
|
|
149137
149143
|
// `linkedUser`: the Linked cell holds a user id; name the user instead.
|
|
@@ -149153,7 +149159,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149153
149159
|
total: typeof body.total === 'number' ? body.total : results.length,
|
|
149154
149160
|
rows: results.map((object) => {
|
|
149155
149161
|
const id = object.id || object.uuid || (object['@self'] && object['@self'].id);
|
|
149156
|
-
const rawStatus = kind.statusField ? readPath$
|
|
149162
|
+
const rawStatus = kind.statusField ? readPath$a(object, kind.statusField) : undefined;
|
|
149157
149163
|
const status = rawStatus === undefined || rawStatus === null
|
|
149158
149164
|
? ''
|
|
149159
149165
|
: (labels ? (labels.get(String(rawStatus)) || '') : String(rawStatus));
|
|
@@ -149162,7 +149168,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149162
149168
|
kind: kind.id,
|
|
149163
149169
|
kindLabel: kind.label,
|
|
149164
149170
|
kindText: kindTextOf(kind, object),
|
|
149165
|
-
title: String(readPath$
|
|
149171
|
+
title: String(readPath$a(object, kind.titleField || 'title') ?? object.name ?? id ?? ''),
|
|
149166
149172
|
subtitle: subtitleOf(kind, object, subtitleNames),
|
|
149167
149173
|
status,
|
|
149168
149174
|
linked: userNames ? (userNames.get(linkedOf(kind, object)) || linkedOf(kind, object)) : linkedOf(kind, object),
|
|
@@ -155715,7 +155721,7 @@ function spreadDottedFields(data, fields) {
|
|
|
155715
155721
|
if (!field || !isDottedKey(field.key)) {
|
|
155716
155722
|
continue
|
|
155717
155723
|
}
|
|
155718
|
-
const value = readPath$
|
|
155724
|
+
const value = readPath$a(out, field.key);
|
|
155719
155725
|
if (value !== undefined) {
|
|
155720
155726
|
out[field.key] = value;
|
|
155721
155727
|
}
|
|
@@ -159661,7 +159667,7 @@ var script$6E = {
|
|
|
159661
159667
|
const prefix = field.key + '.';
|
|
159662
159668
|
for (const other of this.resolvedFields) {
|
|
159663
159669
|
if (other.key.startsWith(prefix)) {
|
|
159664
|
-
const value = on ? readPath$
|
|
159670
|
+
const value = on ? readPath$a(defaults, other.key.slice(prefix.length)) : undefined;
|
|
159665
159671
|
this.updateField(other.key, value === undefined ? null : value);
|
|
159666
159672
|
}
|
|
159667
159673
|
}
|
|
@@ -162279,7 +162285,7 @@ var CnFormDialog = /*#__PURE__*/Object.freeze({
|
|
|
162279
162285
|
* @param {string} path Dotted path.
|
|
162280
162286
|
* @return {*} The value, or undefined.
|
|
162281
162287
|
*/
|
|
162282
|
-
function readPath$
|
|
162288
|
+
function readPath$7(obj, path) {
|
|
162283
162289
|
return String(path).split('.').reduce((cur, k) => (cur !== null && cur !== undefined && typeof cur === 'object' ? cur[k] : undefined), obj)
|
|
162284
162290
|
}
|
|
162285
162291
|
|
|
@@ -162319,7 +162325,7 @@ function pickRefLabel(obj, labelField) {
|
|
|
162319
162325
|
if (!path) {
|
|
162320
162326
|
continue
|
|
162321
162327
|
}
|
|
162322
|
-
const text = asText(path.includes('.') ? readPath$
|
|
162328
|
+
const text = asText(path.includes('.') ? readPath$7(obj, path) : obj[path]);
|
|
162323
162329
|
if (text !== '') {
|
|
162324
162330
|
return text
|
|
162325
162331
|
}
|
|
@@ -162339,7 +162345,7 @@ function pickRefField(obj, field) {
|
|
|
162339
162345
|
if (!obj || typeof obj !== 'object' || !field) {
|
|
162340
162346
|
return null
|
|
162341
162347
|
}
|
|
162342
|
-
const text = asText(readPath$
|
|
162348
|
+
const text = asText(readPath$7(obj, field));
|
|
162343
162349
|
return text !== '' ? text : null
|
|
162344
162350
|
}
|
|
162345
162351
|
|
|
@@ -162561,7 +162567,7 @@ function fillCountLabel(label, total, rows) {
|
|
|
162561
162567
|
.replace(/\{total\}/g, String(total))
|
|
162562
162568
|
.replace(/\{count:([^=}]+)=([^}]*)\}/g, (match, field, value) => {
|
|
162563
162569
|
const wanted = value.trim();
|
|
162564
|
-
return String((rows || []).filter((row) => String(readPath$
|
|
162570
|
+
return String((rows || []).filter((row) => String(readPath$a(row, field.trim())) === wanted).length)
|
|
162565
162571
|
})
|
|
162566
162572
|
}
|
|
162567
162573
|
|
|
@@ -162882,7 +162888,7 @@ const WHOLE_TOKEN = /^@row\.([A-Za-z0-9_.@-]+)$/;
|
|
|
162882
162888
|
* @return {string} The text.
|
|
162883
162889
|
*/
|
|
162884
162890
|
function rowText(row, path) {
|
|
162885
|
-
const value = readPath$
|
|
162891
|
+
const value = readPath$a(row, path);
|
|
162886
162892
|
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' ? String(value) : ''
|
|
162887
162893
|
}
|
|
162888
162894
|
|
|
@@ -165084,12 +165090,12 @@ var script$6C = {
|
|
|
165084
165090
|
return rows
|
|
165085
165091
|
.filter((row) => row && typeof row.path === 'string' && row.path !== '')
|
|
165086
165092
|
.map((row, index) => {
|
|
165087
|
-
const raw = readPath$
|
|
165093
|
+
const raw = readPath$a(record, row.path);
|
|
165088
165094
|
const value = row.format === 'currency'
|
|
165089
165095
|
? formatMoney(raw, { currency: row.currency, currencyField: row.currencyField }, record, null)
|
|
165090
165096
|
: (raw === null || raw === undefined ? '' : String(raw));
|
|
165091
165097
|
const label = tr(String(row.label || row.path)).replace(/\{([\w.@-]+)\}/g, (match, path) => {
|
|
165092
|
-
const filled = readPath$
|
|
165098
|
+
const filled = readPath$a(record, path);
|
|
165093
165099
|
return filled === null || filled === undefined || typeof filled === 'object' ? '' : String(filled)
|
|
165094
165100
|
});
|
|
165095
165101
|
return { key: `${index}-${row.path}`, label, value, emphasis: row.emphasis === true }
|
|
@@ -165486,7 +165492,7 @@ var script$6C = {
|
|
|
165486
165492
|
}
|
|
165487
165493
|
const where = config.where && typeof config.where === 'object' ? Object.entries(config.where) : [];
|
|
165488
165494
|
const matches = (row) => where.every(([field, want]) => {
|
|
165489
|
-
const value = readPath$
|
|
165495
|
+
const value = readPath$a(row, field);
|
|
165490
165496
|
return Array.isArray(want) ? want.map(String).includes(String(value)) : String(value) === String(want)
|
|
165491
165497
|
});
|
|
165492
165498
|
this.readOnlyRows = (Array.isArray(data) ? data : [])
|
|
@@ -166447,7 +166453,7 @@ var script$6C = {
|
|
|
166447
166453
|
const byField = this.content.rowRouteField && row ? (this.content.rowRouteMap || {})[String(row[this.content.rowRouteField])] : undefined;
|
|
166448
166454
|
const route = byField || this.content.rowRoute;
|
|
166449
166455
|
const field = this.content.rowIdField || this.content.rowRouteIdField;
|
|
166450
|
-
const raw = field ? readPath$
|
|
166456
|
+
const raw = field ? readPath$a(row, field) : row && (row.id || (row['@self'] && row['@self'].id));
|
|
166451
166457
|
const id = typeof raw === 'string' || typeof raw === 'number' ? String(raw) : '';
|
|
166452
166458
|
if (route && id && this.$router) {
|
|
166453
166459
|
markNewTabHandled(event, openRowTarget(event, { name: route, params: { id } }, this.$router));
|
|
@@ -171484,11 +171490,11 @@ var script$6w = {
|
|
|
171484
171490
|
if (answer === undefined) {
|
|
171485
171491
|
continue
|
|
171486
171492
|
}
|
|
171487
|
-
data = (link.path ? readPath$
|
|
171493
|
+
data = (link.path ? readPath$a(answer, link.path) : answer) || {};
|
|
171488
171494
|
}
|
|
171489
171495
|
let complete = true;
|
|
171490
171496
|
const label = this.translateLabel(link.label).replace(/\{([\w.]+)\}/g, (token, key) => {
|
|
171491
|
-
const value = readPath$
|
|
171497
|
+
const value = readPath$a(data, key);
|
|
171492
171498
|
if (value === undefined || value === null || value === '') {
|
|
171493
171499
|
complete = false;
|
|
171494
171500
|
return ''
|
|
@@ -172697,7 +172703,7 @@ var script$6w = {
|
|
|
172697
172703
|
try {
|
|
172698
172704
|
const url = router.generateUrl(interpolateUrlTokens(source.endpoint, { objectId: this.resolvedId, object: this.safeObjectData }));
|
|
172699
172705
|
const { data } = await axios.get(url);
|
|
172700
|
-
const list = source.path ? readPath$
|
|
172706
|
+
const list = source.path ? readPath$a(data, source.path) : data;
|
|
172701
172707
|
sections.push(...this.sectionsOf(source, Array.isArray(list) ? list : [], index));
|
|
172702
172708
|
} catch (error) {
|
|
172703
172709
|
// eslint-disable-next-line no-console
|
|
@@ -172705,7 +172711,7 @@ var script$6w = {
|
|
|
172705
172711
|
}
|
|
172706
172712
|
}));
|
|
172707
172713
|
await Promise.all(references.map(async (ref) => {
|
|
172708
|
-
const id = ref && ref.field ? readPath$
|
|
172714
|
+
const id = ref && ref.field ? readPath$a(this.safeObjectData, ref.field) : '';
|
|
172709
172715
|
if (typeof id !== 'string' || id.trim() === '' || id === String(this.resolvedId) || !ref.register || !ref.schema) {
|
|
172710
172716
|
return
|
|
172711
172717
|
}
|
|
@@ -172713,7 +172719,7 @@ var script$6w = {
|
|
|
172713
172719
|
const { data } = await axios.get(router.generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}', { register: ref.register, schema: ref.schema, id: id.trim() }));
|
|
172714
172720
|
const label = (ref.labelTemplate
|
|
172715
172721
|
? this.fillRow(ref.labelTemplate, data || {})
|
|
172716
|
-
: String(readPath$
|
|
172722
|
+
: String(readPath$a(data || {}, ref.labelField || 'title') ?? '')).trim();
|
|
172717
172723
|
if (label === '' || BARE_UUID.test(label)) {
|
|
172718
172724
|
return
|
|
172719
172725
|
}
|
|
@@ -172824,7 +172830,7 @@ var script$6w = {
|
|
|
172824
172830
|
*/
|
|
172825
172831
|
childrenFor(source, row) {
|
|
172826
172832
|
const spec = source.children;
|
|
172827
|
-
const list = spec && spec.path ? readPath$
|
|
172833
|
+
const list = spec && spec.path ? readPath$a(row, spec.path) : null;
|
|
172828
172834
|
if (!Array.isArray(list)) {
|
|
172829
172835
|
return []
|
|
172830
172836
|
}
|
|
@@ -172848,7 +172854,7 @@ var script$6w = {
|
|
|
172848
172854
|
async runSourceAction(action, raw) {
|
|
172849
172855
|
const row = raw && raw.row ? raw.row : raw;
|
|
172850
172856
|
const path = interpolateUrlTokens(action.endpoint, { objectId: this.resolvedId, object: this.safeObjectData })
|
|
172851
|
-
.replace(/\{([\w.@]+)\}/g, (_match, field) => encodeURIComponent(String(readPath$
|
|
172857
|
+
.replace(/\{([\w.@]+)\}/g, (_match, field) => encodeURIComponent(String(readPath$a(row, field) ?? '')));
|
|
172852
172858
|
this.runningAction = path;
|
|
172853
172859
|
this.sourceActionError = '';
|
|
172854
172860
|
try {
|
|
@@ -174198,7 +174204,7 @@ var script$6t = {
|
|
|
174198
174204
|
return false
|
|
174199
174205
|
}
|
|
174200
174206
|
const values = Array.isArray(this.content.archivedValues) ? this.content.archivedValues.map(String) : ['archived'];
|
|
174201
|
-
const saysArchived = values.includes(String(readPath$
|
|
174207
|
+
const saysArchived = values.includes(String(readPath$a(this.record, field) ?? ''));
|
|
174202
174208
|
return saysArchived !== Boolean(this.archived)
|
|
174203
174209
|
},
|
|
174204
174210
|
|
|
@@ -174235,7 +174241,7 @@ var script$6t = {
|
|
|
174235
174241
|
return null
|
|
174236
174242
|
}
|
|
174237
174243
|
const fields = { appraisal: 'appraisal', period: 'period', selectionListRow: 'selectionListRow', ...(this.content.expected?.fields || {}) };
|
|
174238
|
-
const pick = (row, key) => String(readPath$
|
|
174244
|
+
const pick = (row, key) => String(readPath$a(row, fields[key]) ?? '');
|
|
174239
174245
|
const outcomes = rows.map((row) => ({ appraisal: pick(row, 'appraisal'), period: pick(row, 'period'), selectionListRow: pick(row, 'selectionListRow') }));
|
|
174240
174246
|
const first = outcomes[0];
|
|
174241
174247
|
const agree = outcomes.every((o) => o.appraisal === first.appraisal && o.period === first.period);
|
|
@@ -177357,7 +177363,7 @@ const DECLARED_WIDGETS = ['text', 'textarea', 'number', 'date', 'select', 'templ
|
|
|
177357
177363
|
* @param {unknown} value The value.
|
|
177358
177364
|
* @return {string|null}
|
|
177359
177365
|
*/
|
|
177360
|
-
function text$
|
|
177366
|
+
function text$2(value) {
|
|
177361
177367
|
return typeof value === 'string' && value.trim() !== '' ? value.trim() : null
|
|
177362
177368
|
}
|
|
177363
177369
|
|
|
@@ -177379,7 +177385,7 @@ function declaredOptions(options) {
|
|
|
177379
177385
|
&& String(option.value).trim() !== '')
|
|
177380
177386
|
.map((option) => ({
|
|
177381
177387
|
value: String(option.value),
|
|
177382
|
-
label: text$
|
|
177388
|
+
label: text$2(option.label) || String(option.value),
|
|
177383
177389
|
}));
|
|
177384
177390
|
return usable.length > 0 ? usable : null
|
|
177385
177391
|
}
|
|
@@ -177402,11 +177408,11 @@ function normaliseInputs(declared) {
|
|
|
177402
177408
|
required: input.required === true,
|
|
177403
177409
|
picker: input.picker && typeof input.picker === 'object' ? input.picker : null,
|
|
177404
177410
|
fields: Array.isArray(input.fields) ? input.fields.filter((f) => typeof f === 'string') : null,
|
|
177405
|
-
label: text$
|
|
177411
|
+
label: text$2(input.label),
|
|
177406
177412
|
options: declaredOptions(input.options),
|
|
177407
177413
|
widget: DECLARED_WIDGETS.includes(input.widget) ? input.widget : null,
|
|
177408
|
-
optionsSource: text$
|
|
177409
|
-
other: input.other && typeof input.other === 'object' && text$
|
|
177414
|
+
optionsSource: text$2(input.optionsSource),
|
|
177415
|
+
other: input.other && typeof input.other === 'object' && text$2(input.other.label) ? input.other : null,
|
|
177410
177416
|
}))
|
|
177411
177417
|
}
|
|
177412
177418
|
|
|
@@ -177438,9 +177444,9 @@ function clampWidget(widget) {
|
|
|
177438
177444
|
* @return {{options: Array<{value: string, label: string}>, rows: Array<object>}}
|
|
177439
177445
|
*/
|
|
177440
177446
|
function sourcedOptions(input, context) {
|
|
177441
|
-
const list = readPath$
|
|
177442
|
-
const valueKey = text$
|
|
177443
|
-
const labelKey = text$
|
|
177447
|
+
const list = readPath$a(context || {}, input.optionsSource);
|
|
177448
|
+
const valueKey = text$2(input.optionValue) || 'value';
|
|
177449
|
+
const labelKey = text$2(input.optionLabel) || 'label';
|
|
177444
177450
|
const options = [];
|
|
177445
177451
|
const rows = [];
|
|
177446
177452
|
for (const row of Array.isArray(list) ? list : []) {
|
|
@@ -177449,7 +177455,7 @@ function sourcedOptions(input, context) {
|
|
|
177449
177455
|
continue
|
|
177450
177456
|
}
|
|
177451
177457
|
const label = row && typeof row === 'object' ? row[labelKey] : null;
|
|
177452
|
-
options.push({ value: String(value), label: text$
|
|
177458
|
+
options.push({ value: String(value), label: text$2(label) || String(value) });
|
|
177453
177459
|
rows.push(row);
|
|
177454
177460
|
}
|
|
177455
177461
|
return { options, rows }
|
|
@@ -177498,7 +177504,7 @@ function objectField(input, prop) {
|
|
|
177498
177504
|
function baseField(input, resolved, { schema, register, context }) {
|
|
177499
177505
|
const field = resolved.find((f) => f.key === input.field);
|
|
177500
177506
|
const label = input.label || (field && field.label) || input.field;
|
|
177501
|
-
const description = text$
|
|
177507
|
+
const description = text$2(input.description) || (field && field.description) || '';
|
|
177502
177508
|
|
|
177503
177509
|
if (input.widget === 'template') {
|
|
177504
177510
|
return { key: input.field, label, description, widget: 'template', required: false }
|
|
@@ -178075,7 +178081,7 @@ var script$6n = {
|
|
|
178075
178081
|
if (!this.summary || typeof this.summary !== 'object') {
|
|
178076
178082
|
return false
|
|
178077
178083
|
}
|
|
178078
|
-
return !this.summary.when || Boolean(readPath$
|
|
178084
|
+
return !this.summary.when || Boolean(readPath$a(this.context, this.summary.when))
|
|
178079
178085
|
},
|
|
178080
178086
|
|
|
178081
178087
|
/** The summary card's second line. */
|
|
@@ -178118,7 +178124,7 @@ var script$6n = {
|
|
|
178118
178124
|
if (!path) {
|
|
178119
178125
|
return ''
|
|
178120
178126
|
}
|
|
178121
|
-
const value = readPath$
|
|
178127
|
+
const value = readPath$a(this.context, path);
|
|
178122
178128
|
return value === null || value === undefined ? '' : String(value)
|
|
178123
178129
|
},
|
|
178124
178130
|
|
|
@@ -189165,7 +189171,7 @@ var script$68 = {
|
|
|
189165
189171
|
}
|
|
189166
189172
|
if (empty === null && shown === 'duration' && raw !== null && raw !== undefined && raw !== '') {
|
|
189167
189173
|
// A term in words, with the extension at `extendBy` when the object holds one.
|
|
189168
|
-
const extension = typeof field.extendBy === 'string' ? readPath$
|
|
189174
|
+
const extension = typeof field.extendBy === 'string' ? readPath$a(this.objectData || {}, field.extendBy) : null;
|
|
189169
189175
|
values[field.key] = formatTermDuration(raw, extension);
|
|
189170
189176
|
continue
|
|
189171
189177
|
}
|
|
@@ -192555,7 +192561,7 @@ function pickDeclaredProps(component, bindings, label) {
|
|
|
192555
192561
|
* @return {string} The text, or '' when the field is empty.
|
|
192556
192562
|
*/
|
|
192557
192563
|
function plainTokenText(object, path, schema, translate) {
|
|
192558
|
-
const value = readPath$
|
|
192564
|
+
const value = readPath$a(object, path);
|
|
192559
192565
|
if (value === null || value === undefined || value === '' || typeof value === 'object') {
|
|
192560
192566
|
return ''
|
|
192561
192567
|
}
|
|
@@ -193831,7 +193837,7 @@ var script$63 = {
|
|
|
193831
193837
|
if (!node.startsWith('@subject.')) {
|
|
193832
193838
|
return node
|
|
193833
193839
|
}
|
|
193834
|
-
const value = this.conditionRow ? readPath$
|
|
193840
|
+
const value = this.conditionRow ? readPath$a(this.conditionRow, node.slice('@subject.'.length)) : undefined;
|
|
193835
193841
|
return value === undefined || value === null ? '' : String(value)
|
|
193836
193842
|
}
|
|
193837
193843
|
if (Array.isArray(node)) {
|
|
@@ -194230,7 +194236,7 @@ var script$62 = {
|
|
|
194230
194236
|
rows() {
|
|
194231
194237
|
const idField = this.content.idField || 'id';
|
|
194232
194238
|
return this.items.map((item) => {
|
|
194233
|
-
const id = String(readPath$
|
|
194239
|
+
const id = String(readPath$a(item, idField) ?? '');
|
|
194234
194240
|
return {
|
|
194235
194241
|
id,
|
|
194236
194242
|
title: (this.content.title ? fillTemplate(this.cnTranslate(this.content.title), item).trim() : '') || String(item.title || id),
|
|
@@ -194269,7 +194275,7 @@ var script$62 = {
|
|
|
194269
194275
|
this.error = '';
|
|
194270
194276
|
try {
|
|
194271
194277
|
const data = await fetchEndpointSource(this.content.source, {}, { force: true });
|
|
194272
|
-
const list = this.content.itemsPath ? readPath$
|
|
194278
|
+
const list = this.content.itemsPath ? readPath$a(data, this.content.itemsPath) : data;
|
|
194273
194279
|
this.items = Array.isArray(list) ? list.filter((item) => item && typeof item === 'object') : [];
|
|
194274
194280
|
} catch (failure) {
|
|
194275
194281
|
const body = failure && failure.response && failure.response.data;
|
|
@@ -199258,7 +199264,7 @@ const TIMELINE_COMPOSE = 'cn:timeline:compose';
|
|
|
199258
199264
|
* @param {string} path The path.
|
|
199259
199265
|
* @return {unknown} What is there, or undefined.
|
|
199260
199266
|
*/
|
|
199261
|
-
function readPath$
|
|
199267
|
+
function readPath$6(value, path) {
|
|
199262
199268
|
return String(path).split('.').reduce((at, key) => (at === null || at === undefined ? undefined : at[key]), value)
|
|
199263
199269
|
}
|
|
199264
199270
|
|
|
@@ -199897,7 +199903,7 @@ var script$5T = {
|
|
|
199897
199903
|
if (value === '@objectId') {
|
|
199898
199904
|
out[key] = this.objectId;
|
|
199899
199905
|
} else if (typeof value === 'string' && value.startsWith('@row.')) {
|
|
199900
|
-
const found = readPath$
|
|
199906
|
+
const found = readPath$6(entry, value.slice('@row.'.length));
|
|
199901
199907
|
out[key] = found === undefined || found === null ? '' : found;
|
|
199902
199908
|
} else {
|
|
199903
199909
|
out[key] = value;
|
|
@@ -200370,7 +200376,7 @@ const __sfc_main$5N = script$5T;
|
|
|
200370
200376
|
* @param {string} path The dotted path.
|
|
200371
200377
|
* @return {unknown} The value, or undefined.
|
|
200372
200378
|
*/
|
|
200373
|
-
function readPath$
|
|
200379
|
+
function readPath$5(obj, path) {
|
|
200374
200380
|
if (!obj || typeof path !== 'string' || path === '') {
|
|
200375
200381
|
return undefined
|
|
200376
200382
|
}
|
|
@@ -200435,7 +200441,7 @@ function makeEvent(spec, now) {
|
|
|
200435
200441
|
function fieldEvents(object, fields, now = new Date()) {
|
|
200436
200442
|
return (Array.isArray(fields) ? fields : [])
|
|
200437
200443
|
.filter((f) => f && typeof f.field === 'string')
|
|
200438
|
-
.map((f) => makeEvent({ id: `field:${f.field}`, raw: readPath$
|
|
200444
|
+
.map((f) => makeEvent({ id: `field:${f.field}`, raw: readPath$5(object, f.field), label: f.label || f.field, source: 'field' }, now))
|
|
200439
200445
|
.filter(Boolean)
|
|
200440
200446
|
}
|
|
200441
200447
|
|
|
@@ -200458,7 +200464,7 @@ function textAt(row, path) {
|
|
|
200458
200464
|
if (!path) {
|
|
200459
200465
|
return ''
|
|
200460
200466
|
}
|
|
200461
|
-
const value = readPath$
|
|
200467
|
+
const value = readPath$5(row, path);
|
|
200462
200468
|
return value === null || value === undefined ? '' : String(value)
|
|
200463
200469
|
}
|
|
200464
200470
|
|
|
@@ -200496,10 +200502,10 @@ function listEvents(object, lists, now = new Date()) {
|
|
|
200496
200502
|
return (Array.isArray(lists) ? lists : [])
|
|
200497
200503
|
.filter((l) => l && typeof l.field === 'string' && typeof l.dateField === 'string')
|
|
200498
200504
|
.flatMap((l) => {
|
|
200499
|
-
const rows = readPath$
|
|
200505
|
+
const rows = readPath$5(object, l.field);
|
|
200500
200506
|
return (Array.isArray(rows) ? rows : []).map((row, i) => makeEvent({
|
|
200501
200507
|
id: `list:${l.field}:${i}`,
|
|
200502
|
-
raw: readPath$
|
|
200508
|
+
raw: readPath$5(row, l.dateField),
|
|
200503
200509
|
label: wordedValue(textAt(row, l.labelField), l.valueLabels) || l.label || l.field,
|
|
200504
200510
|
detail: textAt(row, l.detailField),
|
|
200505
200511
|
source: 'list',
|
|
@@ -200532,10 +200538,10 @@ function relatedEvents(rows, config, now = new Date(), translate = (text) => tex
|
|
|
200532
200538
|
.map((row, i) => {
|
|
200533
200539
|
const self = (row && row['@self']) || {};
|
|
200534
200540
|
const id = String(self.id || row.id || i);
|
|
200535
|
-
const title = cfg.titleField ? readPath$
|
|
200541
|
+
const title = cfg.titleField ? readPath$5(row, cfg.titleField) : (row && (row.title || row.name)) || self.name;
|
|
200536
200542
|
return makeEvent({
|
|
200537
200543
|
id: `related:${cfg.schema || ''}:${id}`,
|
|
200538
|
-
raw: readPath$
|
|
200544
|
+
raw: readPath$5(row, dateField),
|
|
200539
200545
|
label: named ? fillTemplate(translate(cfg.label), row, now) : (cfg.label || ''),
|
|
200540
200546
|
detail: named || title === undefined || title === null ? '' : String(title),
|
|
200541
200547
|
source: 'related',
|
|
@@ -200624,7 +200630,7 @@ function endpointEvents(items, config, typeLabel, untitled, now = new Date()) {
|
|
|
200624
200630
|
const type = textAt(item, config.typeField || 'type');
|
|
200625
200631
|
return makeEvent({
|
|
200626
200632
|
id: `endpoint:${type}:${item.id ?? i}`,
|
|
200627
|
-
raw: readPath$
|
|
200633
|
+
raw: readPath$5(item, config.dateField || 'date'),
|
|
200628
200634
|
label: textAt(item, config.labelField || 'title') || untitled,
|
|
200629
200635
|
detail: detail.length > 120 ? detail.substring(0, 120) + '...' : detail,
|
|
200630
200636
|
meta: [type ? typeLabel(type) : '', textAt(item, config.userField || 'user')].filter(Boolean).join(' · '),
|
|
@@ -200922,7 +200928,7 @@ var script$5S = {
|
|
|
200922
200928
|
referenceKey() {
|
|
200923
200929
|
const resolve = this.content.resolve && typeof this.content.resolve === 'object' ? this.content.resolve : {};
|
|
200924
200930
|
const object = this.resolvedObject || {};
|
|
200925
|
-
return JSON.stringify(Object.keys(resolve).map((field) => [field, readPath$
|
|
200931
|
+
return JSON.stringify(Object.keys(resolve).map((field) => [field, readPath$a(object, field)]))
|
|
200926
200932
|
},
|
|
200927
200933
|
|
|
200928
200934
|
/**
|
|
@@ -201057,7 +201063,7 @@ var script$5S = {
|
|
|
201057
201063
|
const object = this.resolvedObject || {};
|
|
201058
201064
|
const found = {};
|
|
201059
201065
|
await Promise.all(Object.entries(resolve).map(async ([field, ref]) => {
|
|
201060
|
-
const id = readPath$
|
|
201066
|
+
const id = readPath$a(object, field);
|
|
201061
201067
|
if (!ref || typeof ref.schema !== 'string' || typeof id !== 'string' || id === '') {
|
|
201062
201068
|
return
|
|
201063
201069
|
}
|
|
@@ -201263,10 +201269,10 @@ var script$5S = {
|
|
|
201263
201269
|
this.loading = true;
|
|
201264
201270
|
try {
|
|
201265
201271
|
const { data } = await axios.get(generateUrl(source.url), { params });
|
|
201266
|
-
const items = readPath$
|
|
201272
|
+
const items = readPath$a(data || {}, source.itemsPath || 'items');
|
|
201267
201273
|
this.endpointItems = page === 1 ? (Array.isArray(items) ? items : []) : [...this.endpointItems, ...(Array.isArray(items) ? items : [])];
|
|
201268
|
-
this.endpointPage = Number(readPath$
|
|
201269
|
-
this.endpointPages = Number(readPath$
|
|
201274
|
+
this.endpointPage = Number(readPath$a(data || {}, source.pagePath || 'page')) || page;
|
|
201275
|
+
this.endpointPages = Number(readPath$a(data || {}, source.pagesPath || 'pages')) || 1;
|
|
201270
201276
|
this.failedSources = this.failedSources.filter((part) => part !== 'endpoint');
|
|
201271
201277
|
} catch {
|
|
201272
201278
|
if (page === 1) {
|
|
@@ -202015,7 +202021,7 @@ var script$5R = {
|
|
|
202015
202021
|
if (!def || typeof def.field !== 'string') {
|
|
202016
202022
|
return ''
|
|
202017
202023
|
}
|
|
202018
|
-
const date = formatBoardDate(readPath$
|
|
202024
|
+
const date = formatBoardDate(readPath$a(this.object, def.field));
|
|
202019
202025
|
if (date === '') {
|
|
202020
202026
|
return ''
|
|
202021
202027
|
}
|
|
@@ -202034,7 +202040,7 @@ var script$5R = {
|
|
|
202034
202040
|
if (!def || typeof def.field !== 'string' || typeof def.overdueVariant !== 'string' || def.overdueVariant === '') {
|
|
202035
202041
|
return ''
|
|
202036
202042
|
}
|
|
202037
|
-
return this.dueVariant(readPath$
|
|
202043
|
+
return this.dueVariant(readPath$a(this.object, def.field), {}) === 'error' ? def.overdueVariant : ''
|
|
202038
202044
|
},
|
|
202039
202045
|
|
|
202040
202046
|
/**
|
|
@@ -202074,7 +202080,7 @@ var script$5R = {
|
|
|
202074
202080
|
if (label === '') {
|
|
202075
202081
|
return null
|
|
202076
202082
|
}
|
|
202077
|
-
const raw = readPath$
|
|
202083
|
+
const raw = readPath$a(this.object, def.field);
|
|
202078
202084
|
const mapped = def.colorMap && typeof def.colorMap === 'object' ? def.colorMap[String(raw)] || def.colorMap[String(raw).toLowerCase()] : undefined;
|
|
202079
202085
|
const labels = def.labels && typeof def.labels === 'object' ? def.labels : {};
|
|
202080
202086
|
const shown = typeof labels[String(raw)] === 'string' ? this.cnTranslate(labels[String(raw)]) : label;
|
|
@@ -202196,13 +202202,13 @@ var script$5R = {
|
|
|
202196
202202
|
return { field: part.template, value: null, text: fillTemplate(this.cnTranslate(part.template), this.object), column: null }
|
|
202197
202203
|
}
|
|
202198
202204
|
if (typeof part === 'string' && part !== '') {
|
|
202199
|
-
return { field: part, value: readPath$
|
|
202205
|
+
return { field: part, value: readPath$a(this.object, part), text: this.layoutText(part), column: this.layoutColumn(part) }
|
|
202200
202206
|
}
|
|
202201
202207
|
if (!part || typeof part !== 'object' || typeof part.field !== 'string' || part.field === '') {
|
|
202202
202208
|
return null
|
|
202203
202209
|
}
|
|
202204
202210
|
const column = typeof part.formatter === 'string' ? { formatter: part.formatter, formatterOptions: part.formatterOptions } : null;
|
|
202205
|
-
return { field: part.field, value: readPath$
|
|
202211
|
+
return { field: part.field, value: readPath$a(this.object, part.field), text: this.layoutText(part.field, column), column }
|
|
202206
202212
|
},
|
|
202207
202213
|
|
|
202208
202214
|
/**
|
|
@@ -202217,7 +202223,7 @@ var script$5R = {
|
|
|
202217
202223
|
* @spec openspec/changes/card-list-chips/specs/object-card/spec.md
|
|
202218
202224
|
*/
|
|
202219
202225
|
listChips(def) {
|
|
202220
|
-
const items = readPath$
|
|
202226
|
+
const items = readPath$a(this.object, def.field);
|
|
202221
202227
|
if (!Array.isArray(items)) {
|
|
202222
202228
|
return []
|
|
202223
202229
|
}
|
|
@@ -202226,7 +202232,7 @@ var script$5R = {
|
|
|
202226
202232
|
.map((item, index) => {
|
|
202227
202233
|
const label = template !== ''
|
|
202228
202234
|
? fillTemplate(template, item || {})
|
|
202229
|
-
: String(readPath$
|
|
202235
|
+
: String(readPath$a(item || {}, def.each) ?? '');
|
|
202230
202236
|
const tone = Array.isArray(def.tones)
|
|
202231
202237
|
? def.tones.find((entry) => entry && entry.when && evaluateVisibleWhenLocal(entry.when, item || {}))
|
|
202232
202238
|
: undefined;
|
|
@@ -202248,7 +202254,7 @@ var script$5R = {
|
|
|
202248
202254
|
if (typeof field !== 'string' || field === '') {
|
|
202249
202255
|
return ''
|
|
202250
202256
|
}
|
|
202251
|
-
const value = readPath$
|
|
202257
|
+
const value = readPath$a(this.object, field);
|
|
202252
202258
|
if (value === null || value === undefined || value === '') {
|
|
202253
202259
|
return ''
|
|
202254
202260
|
}
|
|
@@ -202289,7 +202295,7 @@ var script$5R = {
|
|
|
202289
202295
|
* @return {?{label: string, variant: string}}
|
|
202290
202296
|
*/
|
|
202291
202297
|
datePill(def) {
|
|
202292
|
-
const value = readPath$
|
|
202298
|
+
const value = readPath$a(this.object, def.field);
|
|
202293
202299
|
const variant = Array.isArray(def.variantWhen)
|
|
202294
202300
|
? this.dateRuleVariant(value, def.variantWhen)
|
|
202295
202301
|
: this.dueVariant(value, def.due);
|
|
@@ -202379,7 +202385,7 @@ var script$5R = {
|
|
|
202379
202385
|
return pill
|
|
202380
202386
|
}
|
|
202381
202387
|
const looks = this.pillLooks[def.field];
|
|
202382
|
-
const raw = readPath$
|
|
202388
|
+
const raw = readPath$a(this.object, def.field);
|
|
202383
202389
|
const look = pillLook(looks && raw !== null && raw !== undefined ? looks[String(raw)] : null);
|
|
202384
202390
|
return { ...pill, ...(look.variant ? { variant: look.variant } : {}), ...(look.icon ? { icon: look.icon } : {}) }
|
|
202385
202391
|
},
|
|
@@ -207602,7 +207608,7 @@ var script$5G = {
|
|
|
207602
207608
|
rowRouteFn() {
|
|
207603
207609
|
return (row) => {
|
|
207604
207610
|
const id = this.rowIdField
|
|
207605
|
-
? readPath$
|
|
207611
|
+
? readPath$a(row, this.rowIdField)
|
|
207606
207612
|
: row && (row.id || (row['@self'] && row['@self'].id));
|
|
207607
207613
|
return id !== null && id !== undefined && id !== '' && typeof id !== 'object' ? { name: this.rowRoute, params: { id: String(id) } } : null
|
|
207608
207614
|
}
|
|
@@ -213924,11 +213930,11 @@ var script$5A = {
|
|
|
213924
213930
|
const nameField = source.nameField || 'displayName';
|
|
213925
213931
|
const countField = source.countField || 'count';
|
|
213926
213932
|
const people = this.rows
|
|
213927
|
-
.filter((row) => row && typeof row === 'object' && readPath$
|
|
213933
|
+
.filter((row) => row && typeof row === 'object' && readPath$a(row, userField))
|
|
213928
213934
|
.map((row) => {
|
|
213929
|
-
const id = String(readPath$
|
|
213930
|
-
const name = String(readPath$
|
|
213931
|
-
return { id, name, count: Number(readPath$
|
|
213935
|
+
const id = String(readPath$a(row, userField));
|
|
213936
|
+
const name = String(readPath$a(row, nameField) || id);
|
|
213937
|
+
return { id, name, count: Number(readPath$a(row, countField)) || 0 }
|
|
213932
213938
|
});
|
|
213933
213939
|
const capacity = Number(this.content?.capacity) > 0
|
|
213934
213940
|
? Number(this.content.capacity)
|
|
@@ -214017,7 +214023,7 @@ var script$5A = {
|
|
|
214017
214023
|
fetchStatuses(axios),
|
|
214018
214024
|
]);
|
|
214019
214025
|
const body = answer && answer.data;
|
|
214020
|
-
const rows = source.responsePath ? readPath$
|
|
214026
|
+
const rows = source.responsePath ? readPath$a(body, source.responsePath) : body;
|
|
214021
214027
|
this.rows = Array.isArray(rows) ? rows : [];
|
|
214022
214028
|
this.statuses = statuses || {};
|
|
214023
214029
|
} catch {
|
|
@@ -215235,7 +215241,7 @@ const __sfc_main$5s = script$5y;
|
|
|
215235
215241
|
* @param {string} path A dotted path.
|
|
215236
215242
|
* @return {unknown} The value at the path.
|
|
215237
215243
|
*/
|
|
215238
|
-
function readPath$
|
|
215244
|
+
function readPath$4(value, path) {
|
|
215239
215245
|
return String(path || '').split('.').filter(Boolean).reduce((acc, key) => (acc === null || acc === undefined ? undefined : acc[key]), value)
|
|
215240
215246
|
}
|
|
215241
215247
|
|
|
@@ -215395,7 +215401,7 @@ var script$5x = {
|
|
|
215395
215401
|
: (Array.isArray(data.groups) ? data.groups : [])
|
|
215396
215402
|
.filter((g) => g && g.key !== undefined)
|
|
215397
215403
|
.map((g) => ({ ...g, items: Array.isArray(g.items) ? g.items : [] }));
|
|
215398
|
-
const total = Number(this.content.totalPath ? readPath$
|
|
215404
|
+
const total = Number(this.content.totalPath ? readPath$4(data, this.content.totalPath) : NaN);
|
|
215399
215405
|
this.total = Number.isFinite(total) ? total : this.groups.reduce((sum, group) => sum + group.items.length, 0);
|
|
215400
215406
|
this.hidden = Array.isArray(data.hiddenGroups) ? data.hiddenGroups.map(String) : [];
|
|
215401
215407
|
this.unavailable = Array.isArray(data.unavailable) ? data.unavailable.filter((s) => s && s.source) : [];
|
|
@@ -215416,7 +215422,7 @@ var script$5x = {
|
|
|
215416
215422
|
* @return {Array<object>}
|
|
215417
215423
|
*/
|
|
215418
215424
|
flatGroups(data) {
|
|
215419
|
-
const list = readPath$
|
|
215425
|
+
const list = readPath$4(data, this.content.itemsPath);
|
|
215420
215426
|
const items = (Array.isArray(list) ? list : [])
|
|
215421
215427
|
.filter((item) => item && item.id !== undefined)
|
|
215422
215428
|
.map((item) => (item.route || !item.routeName ? item : { ...item, route: { name: item.routeName, params: { id: item.id } } }));
|
|
@@ -215430,7 +215436,7 @@ var script$5x = {
|
|
|
215430
215436
|
* @return {boolean}
|
|
215431
215437
|
*/
|
|
215432
215438
|
isLate(item) {
|
|
215433
|
-
return this.content.lateField ? Boolean(readPath$
|
|
215439
|
+
return this.content.lateField ? Boolean(readPath$4(item, this.content.lateField)) : item.deadlineTier === 'overdue'
|
|
215434
215440
|
},
|
|
215435
215441
|
|
|
215436
215442
|
/**
|
|
@@ -215440,7 +215446,7 @@ var script$5x = {
|
|
|
215440
215446
|
* @return {string}
|
|
215441
215447
|
*/
|
|
215442
215448
|
dueOf(item) {
|
|
215443
|
-
const value = readPath$
|
|
215449
|
+
const value = readPath$4(item, this.content.dueField || 'dueAt');
|
|
215444
215450
|
return value === null || value === undefined ? '' : String(value)
|
|
215445
215451
|
},
|
|
215446
215452
|
|
|
@@ -215455,7 +215461,7 @@ var script$5x = {
|
|
|
215455
215461
|
if (!kind || !kind.field || !kind.labels) {
|
|
215456
215462
|
return ''
|
|
215457
215463
|
}
|
|
215458
|
-
return this.text(kind.labels[readPath$
|
|
215464
|
+
return this.text(kind.labels[readPath$4(item, kind.field)])
|
|
215459
215465
|
},
|
|
215460
215466
|
|
|
215461
215467
|
/**
|
|
@@ -215465,7 +215471,7 @@ var script$5x = {
|
|
|
215465
215471
|
* @return {string}
|
|
215466
215472
|
*/
|
|
215467
215473
|
subText(item) {
|
|
215468
|
-
const value = this.content.subField ? readPath$
|
|
215474
|
+
const value = this.content.subField ? readPath$4(item, this.content.subField) : '';
|
|
215469
215475
|
return value === null || value === undefined ? '' : String(value)
|
|
215470
215476
|
},
|
|
215471
215477
|
|
|
@@ -247343,7 +247349,7 @@ function resolveSourceTokens(value, record) {
|
|
|
247343
247349
|
const walk = (node) => {
|
|
247344
247350
|
if (typeof node === 'string') {
|
|
247345
247351
|
return node.replace(/@source\.([\w.@]+)/g, (match, path) => {
|
|
247346
|
-
const read = path === 'id' ? (record.id ?? readPath$
|
|
247352
|
+
const read = path === 'id' ? (record.id ?? readPath$a(record, '@self.id')) : readPath$a(record, path);
|
|
247347
247353
|
if (read === undefined || read === null || read === '' || typeof read === 'object') {
|
|
247348
247354
|
unresolved = true;
|
|
247349
247355
|
return match
|
|
@@ -247625,7 +247631,7 @@ var script$4z = {
|
|
|
247625
247631
|
const rows = this.cnDetailVisibilityRows && typeof this.cnDetailVisibilityRows === 'object' && 'value' in this.cnDetailVisibilityRows
|
|
247626
247632
|
? this.cnDetailVisibilityRows.value
|
|
247627
247633
|
: this.cnDetailVisibilityRows;
|
|
247628
|
-
const named = readPath$
|
|
247634
|
+
const named = readPath$a({ '@context': rows || {} }, from);
|
|
247629
247635
|
const list = Array.isArray(named) ? named.filter((entry) => entry && typeof entry === 'object' && !Array.isArray(entry)) : [];
|
|
247630
247636
|
if (list.length > 0) {
|
|
247631
247637
|
return list
|
|
@@ -247788,11 +247794,11 @@ var script$4z = {
|
|
|
247788
247794
|
}
|
|
247789
247795
|
const path = this.content?.source?.path;
|
|
247790
247796
|
if (this.resolvedSource && !this.endpointRequest && typeof path === 'string' && path !== '' && record) {
|
|
247791
|
-
const inner = readPath$
|
|
247797
|
+
const inner = readPath$a(record, path);
|
|
247792
247798
|
record = inner && typeof inner === 'object' && !Array.isArray(inner) ? inner : null;
|
|
247793
247799
|
}
|
|
247794
247800
|
const emptyWhen = this.content?.emptyWhen;
|
|
247795
|
-
if (record && typeof emptyWhen === 'string' && emptyWhen !== '' && readPath$
|
|
247801
|
+
if (record && typeof emptyWhen === 'string' && emptyWhen !== '' && readPath$a(record, emptyWhen)) {
|
|
247796
247802
|
return null
|
|
247797
247803
|
}
|
|
247798
247804
|
return record
|
|
@@ -247936,7 +247942,7 @@ var script$4z = {
|
|
|
247936
247942
|
if (kind === 'lead') {
|
|
247937
247943
|
block.subtitle = this.partsValue(record, field.subtitle);
|
|
247938
247944
|
block.icon = typeof field.icon === 'string' ? field.icon : '';
|
|
247939
|
-
block.initials = block.icon ? '' : this.initialsOf(field.initialsFrom === 'title' ? value : readPath$
|
|
247945
|
+
block.initials = block.icon ? '' : this.initialsOf(field.initialsFrom === 'title' ? value : readPath$a(record, field.initialsPath));
|
|
247940
247946
|
block.size = Number.isFinite(Number(field.size)) && Number(field.size) > 0 ? Number(field.size) : 0;
|
|
247941
247947
|
block.tone = ['success', 'info', 'warning', 'error', 'teal'].includes(field.tone) ? field.tone : 'neutral';
|
|
247942
247948
|
block.card = field.card === true;
|
|
@@ -247956,7 +247962,7 @@ var script$4z = {
|
|
|
247956
247962
|
block.size = field.size;
|
|
247957
247963
|
}
|
|
247958
247964
|
if (kind === 'pill') {
|
|
247959
|
-
const raw = readPath$
|
|
247965
|
+
const raw = readPath$a(record, field.path);
|
|
247960
247966
|
const colours = field.variantMap || field.colorMap;
|
|
247961
247967
|
// A resolved pill looks its tone up by the referenced object's tone field,
|
|
247962
247968
|
// then by the resolved label, then by the stored value.
|
|
@@ -248042,7 +248048,7 @@ var script$4z = {
|
|
|
248042
248048
|
if (!pill || typeof pill !== 'object' || !this.record) {
|
|
248043
248049
|
return null
|
|
248044
248050
|
}
|
|
248045
|
-
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$
|
|
248051
|
+
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$a(this.record, pill.path) : undefined;
|
|
248046
248052
|
const mapped = pill.map && (typeof raw === 'string' || typeof raw === 'number') && Object.hasOwn(pill.map, raw) ? pill.map[raw] : undefined;
|
|
248047
248053
|
const text = mapped ?? pill.text ?? raw;
|
|
248048
248054
|
if (typeof text !== 'string' && typeof text !== 'number') {
|
|
@@ -248314,7 +248320,7 @@ var script$4z = {
|
|
|
248314
248320
|
* @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-a-facts-card-can-show-progress
|
|
248315
248321
|
*/
|
|
248316
248322
|
progressOf(record, field) {
|
|
248317
|
-
const raw = readPath$
|
|
248323
|
+
const raw = readPath$a(record, field.path);
|
|
248318
248324
|
const number = raw === null || raw === undefined || raw === '' ? NaN : Number(raw);
|
|
248319
248325
|
const barWhen = field.barWhen ? evaluateVisibleWhenLocal(field.barWhen, record) : true;
|
|
248320
248326
|
const percent = Number.isFinite(number) && barWhen ? Math.max(0, Math.min(100, number)) : null;
|
|
@@ -248367,8 +248373,8 @@ var script$4z = {
|
|
|
248367
248373
|
* @spec openspec/changes/facts-meter-row/specs/facts-meter-row/spec.md#requirement-a-facts-entry-can-be-a-meter
|
|
248368
248374
|
*/
|
|
248369
248375
|
meterOf(record, field) {
|
|
248370
|
-
const amount = Number(readPath$
|
|
248371
|
-
const rawLimit = typeof field.limitPath === 'string' && field.limitPath !== '' ? readPath$
|
|
248376
|
+
const amount = Number(readPath$a(record, field.path));
|
|
248377
|
+
const rawLimit = typeof field.limitPath === 'string' && field.limitPath !== '' ? readPath$a(record, field.limitPath) : field.limit;
|
|
248372
248378
|
const limit = rawLimit === null || rawLimit === undefined || rawLimit === '' ? NaN : Number(rawLimit);
|
|
248373
248379
|
const label = this.tr(field.label || '');
|
|
248374
248380
|
const value = this.valueOf(record, field);
|
|
@@ -248498,7 +248504,7 @@ var script$4z = {
|
|
|
248498
248504
|
templateValue(record, template) {
|
|
248499
248505
|
let filled = false;
|
|
248500
248506
|
const text = this.tr(template).replace(/\{([\w.@]+)(?::([\w-]+))?\}/g, (match, path, format) => {
|
|
248501
|
-
const value = this.format(readPath$
|
|
248507
|
+
const value = this.format(readPath$a(record, path), format ? { format } : {}, record);
|
|
248502
248508
|
filled = filled || value !== '';
|
|
248503
248509
|
return value
|
|
248504
248510
|
});
|
|
@@ -248516,7 +248522,7 @@ var script$4z = {
|
|
|
248516
248522
|
*/
|
|
248517
248523
|
answeredRows(record, hideEmpty) {
|
|
248518
248524
|
const path = this.content?.rowsPath;
|
|
248519
|
-
const items = typeof path === 'string' && path !== '' ? readPath$
|
|
248525
|
+
const items = typeof path === 'string' && path !== '' ? readPath$a(record, path) : null;
|
|
248520
248526
|
if (!Array.isArray(items)) {
|
|
248521
248527
|
return []
|
|
248522
248528
|
}
|
|
@@ -248659,7 +248665,7 @@ var script$4z = {
|
|
|
248659
248665
|
if (!spec || typeof spec !== 'object' || typeof spec.path !== 'string') {
|
|
248660
248666
|
return null
|
|
248661
248667
|
}
|
|
248662
|
-
const raw = readPath$
|
|
248668
|
+
const raw = readPath$a(record, spec.path);
|
|
248663
248669
|
if (raw === undefined || raw === null || raw === '') {
|
|
248664
248670
|
return null
|
|
248665
248671
|
}
|
|
@@ -248682,7 +248688,7 @@ var script$4z = {
|
|
|
248682
248688
|
if (!field.pill || typeof field.pill !== 'object') {
|
|
248683
248689
|
return ''
|
|
248684
248690
|
}
|
|
248685
|
-
const variant = (field.pill.variantMap || {})[String(readPath$
|
|
248691
|
+
const variant = (field.pill.variantMap || {})[String(readPath$a(record, field.path))];
|
|
248686
248692
|
return isBadgeVariant(variant) ? variant : 'default'
|
|
248687
248693
|
},
|
|
248688
248694
|
|
|
@@ -248728,7 +248734,7 @@ var script$4z = {
|
|
|
248728
248734
|
pill: this.rowPillOf(record, field),
|
|
248729
248735
|
icon: typeof field.icon === 'string' ? field.icon : '',
|
|
248730
248736
|
path: field.path || '',
|
|
248731
|
-
raw: readPath$
|
|
248737
|
+
raw: readPath$a(record, field.path),
|
|
248732
248738
|
copy: field.copy === true && value !== '',
|
|
248733
248739
|
reveal: false,
|
|
248734
248740
|
masked: '',
|
|
@@ -248839,7 +248845,7 @@ var script$4z = {
|
|
|
248839
248845
|
const rows = this.cnDetailVisibilityRows && typeof this.cnDetailVisibilityRows === 'object' && 'value' in this.cnDetailVisibilityRows
|
|
248840
248846
|
? this.cnDetailVisibilityRows.value
|
|
248841
248847
|
: this.cnDetailVisibilityRows;
|
|
248842
|
-
const named = readPath$
|
|
248848
|
+
const named = readPath$a({ ...(record || {}), '@context': rows || {} }, field.labelPath);
|
|
248843
248849
|
if (typeof named === 'string' && named.trim() !== '') {
|
|
248844
248850
|
return this.tr(named.trim())
|
|
248845
248851
|
}
|
|
@@ -248971,7 +248977,7 @@ var script$4z = {
|
|
|
248971
248977
|
*/
|
|
248972
248978
|
refIds(raw, spec) {
|
|
248973
248979
|
return (Array.isArray(raw) ? raw : [raw])
|
|
248974
|
-
.map((item) => (item && typeof item === 'object' ? (spec.itemPath ? readPath$
|
|
248980
|
+
.map((item) => (item && typeof item === 'object' ? (spec.itemPath ? readPath$a(item, spec.itemPath) : (item.id ?? item.uuid)) : item))
|
|
248975
248981
|
.filter((id) => id !== null && id !== undefined && id !== '' && typeof id !== 'object')
|
|
248976
248982
|
.map(String)
|
|
248977
248983
|
},
|
|
@@ -248991,9 +248997,9 @@ var script$4z = {
|
|
|
248991
248997
|
return
|
|
248992
248998
|
}
|
|
248993
248999
|
if (from && spec.resolve && typeof spec.resolve === 'object' && spec.path) {
|
|
248994
|
-
specs.push({ spec, raw: readPath$
|
|
249000
|
+
specs.push({ spec, raw: readPath$a(from, spec.path) });
|
|
248995
249001
|
if (toneSpec(spec)) {
|
|
248996
|
-
specs.push({ spec: toneSpec(spec), raw: readPath$
|
|
249002
|
+
specs.push({ spec: toneSpec(spec), raw: readPath$a(from, spec.path) });
|
|
248997
249003
|
}
|
|
248998
249004
|
}
|
|
248999
249005
|
const nested = [...(Array.isArray(spec.parts) ? spec.parts : []), ...(Array.isArray(spec.firstOf) ? spec.firstOf : []), ...(Array.isArray(spec.title) ? spec.title : [spec.title]), ...(Array.isArray(spec.subtitle) ? spec.subtitle : [spec.subtitle])];
|
|
@@ -249158,7 +249164,7 @@ var script$4z = {
|
|
|
249158
249164
|
* @return {string}
|
|
249159
249165
|
*/
|
|
249160
249166
|
valueOf(record, field) {
|
|
249161
|
-
const raw = readPath$
|
|
249167
|
+
const raw = readPath$a(record, field.path);
|
|
249162
249168
|
return this.format(raw, field, record)
|
|
249163
249169
|
},
|
|
249164
249170
|
|
|
@@ -249183,7 +249189,7 @@ var script$4z = {
|
|
|
249183
249189
|
if (!spec.path && Array.isArray(spec.parts)) {
|
|
249184
249190
|
return this.lineValue(record, spec)
|
|
249185
249191
|
}
|
|
249186
|
-
const raw = readPath$
|
|
249192
|
+
const raw = readPath$a(record, spec.path);
|
|
249187
249193
|
if ((raw === null || raw === undefined || raw === '') && typeof spec.empty === 'string') {
|
|
249188
249194
|
return this.tr(spec.empty)
|
|
249189
249195
|
}
|
|
@@ -249243,7 +249249,7 @@ var script$4z = {
|
|
|
249243
249249
|
const format = spec.format || 'text';
|
|
249244
249250
|
if (format === 'list' || Array.isArray(raw)) {
|
|
249245
249251
|
const items = (Array.isArray(raw) ? raw : [raw])
|
|
249246
|
-
.map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath$
|
|
249252
|
+
.map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath$a(item, spec.itemPath) : item))
|
|
249247
249253
|
.map((item) => this.format(item, { ...spec, format: spec.itemFormat || 'text' }))
|
|
249248
249254
|
.filter((item) => item !== '');
|
|
249249
249255
|
return items.join(', ')
|
|
@@ -249269,7 +249275,7 @@ var script$4z = {
|
|
|
249269
249275
|
}
|
|
249270
249276
|
// A term in words, with the extension at `extendBy` on the record: "4 weken, te verdagen met 2".
|
|
249271
249277
|
if (format === 'duration') {
|
|
249272
|
-
return formatTermDuration(raw, typeof spec.extendBy === 'string' && record ? readPath$
|
|
249278
|
+
return formatTermDuration(raw, typeof spec.extendBy === 'string' && record ? readPath$a(record, spec.extendBy) : null)
|
|
249273
249279
|
}
|
|
249274
249280
|
// The month written out, the year only outside this year: "3 oktober".
|
|
249275
249281
|
// One segment of a path ("Team/Page"): its first or its last.
|
|
@@ -249380,7 +249386,7 @@ var script$4z = {
|
|
|
249380
249386
|
}
|
|
249381
249387
|
let unresolved = false;
|
|
249382
249388
|
const replaced = value.replace(/@source\.([\w.@]+)/g, (match, path) => {
|
|
249383
|
-
const read = record ? (path === 'id' ? (record.id ?? readPath$
|
|
249389
|
+
const read = record ? (path === 'id' ? (record.id ?? readPath$a(record, '@self.id')) : readPath$a(record, path)) : undefined;
|
|
249384
249390
|
if (read === undefined || read === null || read === '') {
|
|
249385
249391
|
unresolved = true;
|
|
249386
249392
|
return match
|
|
@@ -249411,7 +249417,7 @@ var script$4z = {
|
|
|
249411
249417
|
return null
|
|
249412
249418
|
}
|
|
249413
249419
|
const name = typeof route.nameField === 'string' && route.nameMap && typeof route.nameMap === 'object'
|
|
249414
|
-
? route.nameMap[String(readPath$
|
|
249420
|
+
? route.nameMap[String(readPath$a(record, route.nameField) ?? '')]
|
|
249415
249421
|
: route.name;
|
|
249416
249422
|
if (typeof name !== 'string' || name === '') {
|
|
249417
249423
|
return null
|
|
@@ -251174,7 +251180,7 @@ var script$4w = {
|
|
|
251174
251180
|
if (!frame.titleFrom?.field) {
|
|
251175
251181
|
return
|
|
251176
251182
|
}
|
|
251177
|
-
const value = readPath$
|
|
251183
|
+
const value = readPath$a(await this.firstOf(frame.titleFrom), frame.titleFrom.field);
|
|
251178
251184
|
if (typeof value === 'string' && value !== '') {
|
|
251179
251185
|
titles[index] = value;
|
|
251180
251186
|
}
|
|
@@ -251182,7 +251188,7 @@ var script$4w = {
|
|
|
251182
251188
|
this.readTitles = titles;
|
|
251183
251189
|
const synced = this.content?.status?.syncedFrom;
|
|
251184
251190
|
if (synced?.field) {
|
|
251185
|
-
const at = new Date(readPath$
|
|
251191
|
+
const at = new Date(readPath$a(await this.firstOf(synced, synced.field), synced.field) ?? '');
|
|
251186
251192
|
this.syncedTime = Number.isNaN(at.getTime()) ? '' : `${String(at.getHours()).padStart(2, '0')}:${String(at.getMinutes()).padStart(2, '0')}`;
|
|
251187
251193
|
}
|
|
251188
251194
|
},
|
|
@@ -251546,9 +251552,9 @@ var script$4v = {
|
|
|
251546
251552
|
*/
|
|
251547
251553
|
groups() {
|
|
251548
251554
|
const c = this.content || {};
|
|
251549
|
-
const listed = readPath$
|
|
251555
|
+
const listed = readPath$a(this.payload, c.groupsPath || 'groups');
|
|
251550
251556
|
const list = Array.isArray(listed) ? listed.filter((group) => group && typeof group === 'object') : [];
|
|
251551
|
-
const flat = typeof c.itemsPath === 'string' && c.itemsPath !== '' ? readPath$
|
|
251557
|
+
const flat = typeof c.itemsPath === 'string' && c.itemsPath !== '' ? readPath$a(this.payload, c.itemsPath) : null;
|
|
251552
251558
|
const groupField = typeof c.itemGroupField === 'string' && c.itemGroupField !== '' ? c.itemGroupField : '';
|
|
251553
251559
|
const flatItems = Array.isArray(flat) && groupField ? flat.filter((item) => item && typeof item === 'object') : null;
|
|
251554
251560
|
const groupIds = new Set(list.map((group) => String(group.id ?? '')).filter((id) => id !== ''));
|
|
@@ -251598,7 +251604,7 @@ var script$4v = {
|
|
|
251598
251604
|
if (!spec || typeof spec !== 'object' || !spec.path) {
|
|
251599
251605
|
return null
|
|
251600
251606
|
}
|
|
251601
|
-
const list = readPath$
|
|
251607
|
+
const list = readPath$a(this.payload, spec.path);
|
|
251602
251608
|
if (!Array.isArray(list) || list.length === 0) {
|
|
251603
251609
|
return null
|
|
251604
251610
|
}
|
|
@@ -251669,7 +251675,7 @@ var script$4v = {
|
|
|
251669
251675
|
const fill = (value) => {
|
|
251670
251676
|
if (typeof value === 'string') {
|
|
251671
251677
|
return value.replace(/@group\.([\w.]+)/g, (token, path) => {
|
|
251672
|
-
const found = readPath$
|
|
251678
|
+
const found = readPath$a(raw, path);
|
|
251673
251679
|
if (found === undefined || found === null || found === '') {
|
|
251674
251680
|
missing = true;
|
|
251675
251681
|
return ''
|
|
@@ -251801,11 +251807,11 @@ var script$4v = {
|
|
|
251801
251807
|
if (typeof value === 'string') {
|
|
251802
251808
|
const whole = value.match(/^@(item|group)\.([\w.]+)$/);
|
|
251803
251809
|
if (whole && !['url', 'target', 'href'].includes(key)) {
|
|
251804
|
-
return readPath$
|
|
251810
|
+
return readPath$a(scope[whole[1]], whole[2]) ?? null
|
|
251805
251811
|
}
|
|
251806
251812
|
const encode = ['url', 'target', 'href'].includes(key);
|
|
251807
251813
|
return value.replace(token, (match, root, path) => {
|
|
251808
|
-
const found = readPath$
|
|
251814
|
+
const found = readPath$a(scope[root], path);
|
|
251809
251815
|
const text = found === undefined || found === null ? '' : String(found);
|
|
251810
251816
|
return encode ? encodeURIComponent(text) : text
|
|
251811
251817
|
})
|
|
@@ -251831,7 +251837,7 @@ var script$4v = {
|
|
|
251831
251837
|
if (!spec || typeof spec !== 'object' || !spec.valuePath) {
|
|
251832
251838
|
return null
|
|
251833
251839
|
}
|
|
251834
|
-
const value = Number(readPath$
|
|
251840
|
+
const value = Number(readPath$a(raw, spec.valuePath));
|
|
251835
251841
|
if (!Number.isFinite(value)) {
|
|
251836
251842
|
return null
|
|
251837
251843
|
}
|
|
@@ -251919,7 +251925,7 @@ var script$4v = {
|
|
|
251919
251925
|
* @return {string} The text, '' when the number is missing.
|
|
251920
251926
|
*/
|
|
251921
251927
|
countText(part, rawItem) {
|
|
251922
|
-
const count = Number(readPath$
|
|
251928
|
+
const count = Number(readPath$a(rawItem, part.count));
|
|
251923
251929
|
if (!Number.isFinite(count)) {
|
|
251924
251930
|
return ''
|
|
251925
251931
|
}
|
|
@@ -252442,7 +252448,7 @@ function byOrder$1(list, field) {
|
|
|
252442
252448
|
return [...list]
|
|
252443
252449
|
}
|
|
252444
252450
|
const rank = (entry) => {
|
|
252445
|
-
const n = Number(readPath$
|
|
252451
|
+
const n = Number(readPath$a(entry, field));
|
|
252446
252452
|
return Number.isFinite(n) ? n : Infinity
|
|
252447
252453
|
};
|
|
252448
252454
|
return list.map((entry, index) => ({ entry, index })).sort((a, b) => (rank(a.entry) - rank(b.entry)) || (a.index - b.index)).map(({ entry }) => entry)
|
|
@@ -252538,6 +252544,8 @@ function clockOf(seconds) {
|
|
|
252538
252544
|
* follows that moment rather than the page's start, so a reload keeps it. At
|
|
252539
252545
|
* zero the page is saved and the run finishes. `submitLabel` adds a button
|
|
252540
252546
|
* that finishes from any page, and `savedText` says so while nothing is unsaved.
|
|
252547
|
+
* `saveEachAnswer: true` (or a wait in ms) saves each answer a moment after
|
|
252548
|
+
* it is given instead of when the user moves on.
|
|
252541
252549
|
*
|
|
252542
252550
|
* `noteWhen: { answers: [...] }` shows a question's note field only once its
|
|
252543
252551
|
* answer is one of those stored values (the board shows a note under "Nee"),
|
|
@@ -252586,7 +252594,8 @@ var script$4t = {
|
|
|
252586
252594
|
* answers | answersPath, answerKey?, answerFields?, recordPhotosField?,
|
|
252587
252595
|
* record?, saveAction?, finishAction?, pageSize?, allowNote?, noteWhen?,
|
|
252588
252596
|
* allowPhotos?, caption?, emptyText?, deadlineField?, serverNowField?,
|
|
252589
|
-
* timeLeftText?, timeWarningSeconds?, savedText?, submitLabel
|
|
252597
|
+
* timeLeftText?, timeWarningSeconds?, savedText?, submitLabel?,
|
|
252598
|
+
* saveEachAnswer? }`, as in the component
|
|
252590
252599
|
* description and docs/components/cn-checklist-run-widget.md.
|
|
252591
252600
|
*
|
|
252592
252601
|
* @type {object}
|
|
@@ -252655,11 +252664,29 @@ var script$4t = {
|
|
|
252655
252664
|
now: Date.now(),
|
|
252656
252665
|
recordReadAt: Date.now(),
|
|
252657
252666
|
deadlineTimer: null,
|
|
252667
|
+
// `saveEachAnswer`: the pending save, and the save that runs now.
|
|
252668
|
+
answerSaveTimer: null,
|
|
252669
|
+
pageSave: null,
|
|
252658
252670
|
finishedRun: false,
|
|
252659
252671
|
}
|
|
252660
252672
|
},
|
|
252661
252673
|
|
|
252662
252674
|
computed: {
|
|
252675
|
+
/**
|
|
252676
|
+
* The wait before an answer saves on its own (`saveEachAnswer`: `true`
|
|
252677
|
+
* waits 800 ms, a number that many ms), or null to save on moving on.
|
|
252678
|
+
*
|
|
252679
|
+
* @return {number|null}
|
|
252680
|
+
* @spec openspec/changes/checklist-run-save-each-answer/specs/checklist-run-widget/spec.md#requirement-a-run-can-save-each-answer-as-it-is-given
|
|
252681
|
+
*/
|
|
252682
|
+
answerSaveDelay() {
|
|
252683
|
+
const option = this.content?.saveEachAnswer;
|
|
252684
|
+
if (option === true) {
|
|
252685
|
+
return 800
|
|
252686
|
+
}
|
|
252687
|
+
return typeof option === 'number' && option >= 0 ? option : null
|
|
252688
|
+
},
|
|
252689
|
+
|
|
252663
252690
|
/** @return {object} What the tokens resolve against. */
|
|
252664
252691
|
tokenCtx() {
|
|
252665
252692
|
const unwrap = (c) => (c && typeof c === 'object' && 'value' in c ? c.value : c);
|
|
@@ -252729,7 +252756,7 @@ var script$4t = {
|
|
|
252729
252756
|
}
|
|
252730
252757
|
const object = this.tokenCtx.object || {};
|
|
252731
252758
|
return this.translate(template).replace(/\{([A-Za-z0-9_.]+)\}/g, (_m, path) => {
|
|
252732
|
-
const value = readPath$
|
|
252759
|
+
const value = readPath$a(object, path);
|
|
252733
252760
|
return value === null || value === undefined ? '' : String(value)
|
|
252734
252761
|
}).trim()
|
|
252735
252762
|
},
|
|
@@ -252875,14 +252902,14 @@ var script$4t = {
|
|
|
252875
252902
|
/** @return {number|null} The deadline as read off the open record, on this device's clock; null without one. */
|
|
252876
252903
|
deadlineAt() {
|
|
252877
252904
|
const field = this.content?.deadlineField;
|
|
252878
|
-
const date = field ? parseDateValue(readPath$
|
|
252905
|
+
const date = field ? parseDateValue(readPath$a(this.openRecord, field)) : null;
|
|
252879
252906
|
return date ? date.getTime() + this.serverOffset : null
|
|
252880
252907
|
},
|
|
252881
252908
|
|
|
252882
252909
|
/** @return {number} How far this device's clock runs ahead of the server's, in milliseconds. */
|
|
252883
252910
|
serverOffset() {
|
|
252884
252911
|
const field = this.content?.serverNowField;
|
|
252885
|
-
const serverNow = field ? parseDateValue(readPath$
|
|
252912
|
+
const serverNow = field ? parseDateValue(readPath$a(this.openRecord, field)) : null;
|
|
252886
252913
|
return serverNow ? this.recordReadAt - serverNow.getTime() : 0
|
|
252887
252914
|
},
|
|
252888
252915
|
|
|
@@ -252969,6 +252996,11 @@ var script$4t = {
|
|
|
252969
252996
|
|
|
252970
252997
|
beforeUnmount() {
|
|
252971
252998
|
clearInterval(this.deadlineTimer);
|
|
252999
|
+
if (this.answerSaveTimer) {
|
|
253000
|
+
clearTimeout(this.answerSaveTimer);
|
|
253001
|
+
this.answerSaveTimer = null;
|
|
253002
|
+
this.savePage();
|
|
253003
|
+
}
|
|
252972
253004
|
},
|
|
252973
253005
|
|
|
252974
253006
|
methods: {
|
|
@@ -253076,23 +253108,23 @@ var script$4t = {
|
|
|
253076
253108
|
*/
|
|
253077
253109
|
toQuestion(record, group = '') {
|
|
253078
253110
|
const f = this.fields;
|
|
253079
|
-
const raw = String(readPath$
|
|
253111
|
+
const raw = String(readPath$a(record, f.type) ?? '');
|
|
253080
253112
|
const mapped = this.content?.typeMap && typeof this.content.typeMap === 'object' ? this.content.typeMap[raw] : undefined;
|
|
253081
253113
|
const kind = KINDS.includes(mapped) ? mapped : (KINDS.includes(raw) ? raw : 'text');
|
|
253082
253114
|
const stored = { yes: 'yes', no: 'no', na: 'na', ...(this.content?.choiceValues || {}) };
|
|
253083
253115
|
let choices = (TYPE_CHOICES[kind] || []).map((c) => ({ value: String(stored[c.key]), label: l10n.translate('nextcloud-vue', c.label) }));
|
|
253084
253116
|
if (kind === 'choice') {
|
|
253085
|
-
const options = readPath$
|
|
253117
|
+
const options = readPath$a(record, f.options);
|
|
253086
253118
|
choices = (Array.isArray(options) ? options : []).map((o) => (o && typeof o === 'object'
|
|
253087
253119
|
? { value: String(o.value ?? o.label ?? ''), label: this.translate(String(o.label ?? o.value ?? '')) }
|
|
253088
253120
|
: { value: String(o), label: this.translate(String(o)) })).filter((c) => c.value !== '');
|
|
253089
253121
|
}
|
|
253090
|
-
const help = readPath$
|
|
253122
|
+
const help = readPath$a(record, f.help);
|
|
253091
253123
|
return {
|
|
253092
|
-
id: String(readPath$
|
|
253093
|
-
text: this.translate(String(readPath$
|
|
253124
|
+
id: String(readPath$a(record, f.id) ?? idOf$1(record)),
|
|
253125
|
+
text: this.translate(String(readPath$a(record, f.text) ?? '')),
|
|
253094
253126
|
kind,
|
|
253095
|
-
required: Boolean(readPath$
|
|
253127
|
+
required: Boolean(readPath$a(record, f.required)),
|
|
253096
253128
|
help: typeof help === 'string' && help !== '' ? this.translate(help) : '',
|
|
253097
253129
|
choices,
|
|
253098
253130
|
group,
|
|
@@ -253114,7 +253146,7 @@ var script$4t = {
|
|
|
253114
253146
|
if (!path) {
|
|
253115
253147
|
return 'never'
|
|
253116
253148
|
}
|
|
253117
|
-
const raw = readPath$
|
|
253149
|
+
const raw = readPath$a(record, path);
|
|
253118
253150
|
const map = { true: 'always', false: 'never', always: 'always', never: 'never', ...(this.content?.photoRequiredValues || {}) };
|
|
253119
253151
|
const rule = raw === null || raw === undefined ? 'never' : map[String(raw)];
|
|
253120
253152
|
if (rule && typeof rule === 'object' && rule.whenAnswer !== undefined) {
|
|
@@ -253191,7 +253223,7 @@ var script$4t = {
|
|
|
253191
253223
|
*/
|
|
253192
253224
|
questionsFromRecord() {
|
|
253193
253225
|
const c = this.content;
|
|
253194
|
-
const list = readPath$
|
|
253226
|
+
const list = readPath$a(this.openRecord, c.questionsPath);
|
|
253195
253227
|
const orderField = c.orderField === undefined ? 'order' : c.orderField;
|
|
253196
253228
|
const top = byOrder$1(Array.isArray(list) ? list : [], orderField);
|
|
253197
253229
|
if (!c.itemsKey) {
|
|
@@ -253199,8 +253231,8 @@ var script$4t = {
|
|
|
253199
253231
|
}
|
|
253200
253232
|
const labelField = c.groupLabelField || 'name';
|
|
253201
253233
|
return top.flatMap((group) => {
|
|
253202
|
-
const items = readPath$
|
|
253203
|
-
const label = readPath$
|
|
253234
|
+
const items = readPath$a(group, c.itemsKey);
|
|
253235
|
+
const label = readPath$a(group, labelField);
|
|
253204
253236
|
return byOrder$1(Array.isArray(items) ? items : [], orderField).map((record) => this.toQuestion(record, typeof label === 'string' ? this.translate(label) : ''))
|
|
253205
253237
|
})
|
|
253206
253238
|
},
|
|
@@ -253215,8 +253247,8 @@ var script$4t = {
|
|
|
253215
253247
|
draftFromEntry(question, entry) {
|
|
253216
253248
|
const af = this.answerFields;
|
|
253217
253249
|
const field = question.kind === 'number' ? af.number : (question.kind === 'choice' ? af.choice : af.value);
|
|
253218
|
-
const value = readPath$
|
|
253219
|
-
const note = readPath$
|
|
253250
|
+
const value = readPath$a(entry, field);
|
|
253251
|
+
const note = readPath$a(entry, af.note);
|
|
253220
253252
|
return { value: value === null || value === undefined ? '' : String(value), note: note === null || note === undefined ? '' : String(note) }
|
|
253221
253253
|
},
|
|
253222
253254
|
|
|
@@ -253267,30 +253299,30 @@ var script$4t = {
|
|
|
253267
253299
|
draft[question.id] = { value: '', note: '' };
|
|
253268
253300
|
}
|
|
253269
253301
|
if (this.inRecord) {
|
|
253270
|
-
const entries = readPath$
|
|
253302
|
+
const entries = readPath$a(this.openRecord, this.content.answersPath);
|
|
253271
253303
|
this.recordAnswers = Array.isArray(entries) ? entries : [];
|
|
253272
253304
|
const key = this.content.answerKey || 'questionId';
|
|
253273
253305
|
for (const entry of this.recordAnswers) {
|
|
253274
|
-
const qid = String(readPath$
|
|
253306
|
+
const qid = String(readPath$a(entry, key) ?? '');
|
|
253275
253307
|
const question = questions.find((x) => x.id === qid);
|
|
253276
253308
|
if (question && !answerIds[qid]) {
|
|
253277
|
-
draft[qid] = { ...this.draftFromEntry(question, entry), location: this.locationField ? (readPath$
|
|
253309
|
+
draft[qid] = { ...this.draftFromEntry(question, entry), location: this.locationField ? (readPath$a(entry, this.locationField) ?? null) : null };
|
|
253278
253310
|
answerIds[qid] = qid;
|
|
253279
|
-
const photos = readPath$
|
|
253311
|
+
const photos = readPath$a(entry, this.answerFields.photos);
|
|
253280
253312
|
storedPhotos[qid] = Array.isArray(photos) ? photos : [];
|
|
253281
253313
|
}
|
|
253282
253314
|
}
|
|
253283
253315
|
}
|
|
253284
253316
|
for (const answer of answers) {
|
|
253285
|
-
const qid = String(readPath$
|
|
253317
|
+
const qid = String(readPath$a(answer, a.questionField || 'question') ?? '');
|
|
253286
253318
|
if (draft[qid] && !answerIds[qid]) {
|
|
253287
253319
|
draft[qid] = {
|
|
253288
|
-
value: String(readPath$
|
|
253289
|
-
note: String(readPath$
|
|
253290
|
-
location: this.locationField ? (readPath$
|
|
253320
|
+
value: String(readPath$a(answer, a.valueField || 'answer') ?? ''),
|
|
253321
|
+
note: String(readPath$a(answer, a.noteField || 'note') ?? ''),
|
|
253322
|
+
location: this.locationField ? (readPath$a(answer, this.locationField) ?? null) : null,
|
|
253291
253323
|
};
|
|
253292
253324
|
answerIds[qid] = idOf$1(answer);
|
|
253293
|
-
const stored = a.photosField ? readPath$
|
|
253325
|
+
const stored = a.photosField ? readPath$a(answer, a.photosField) : null;
|
|
253294
253326
|
storedPhotos[qid] = Array.isArray(stored) ? stored : [];
|
|
253295
253327
|
}
|
|
253296
253328
|
}
|
|
@@ -253326,6 +253358,26 @@ var script$4t = {
|
|
|
253326
253358
|
this.dirty = { ...this.dirty, [id]: true };
|
|
253327
253359
|
this.missing = this.missing.filter((m) => m !== id);
|
|
253328
253360
|
this.startLocating(id);
|
|
253361
|
+
this.scheduleAnswerSave();
|
|
253362
|
+
},
|
|
253363
|
+
|
|
253364
|
+
/**
|
|
253365
|
+
* With `saveEachAnswer`, save the page a moment after the last change,
|
|
253366
|
+
* so typing saves once and a quick run of answers saves together.
|
|
253367
|
+
*
|
|
253368
|
+
* @return {void}
|
|
253369
|
+
* @spec openspec/changes/checklist-run-save-each-answer/specs/checklist-run-widget/spec.md#requirement-a-run-can-save-each-answer-as-it-is-given
|
|
253370
|
+
*/
|
|
253371
|
+
scheduleAnswerSave() {
|
|
253372
|
+
const delay = this.answerSaveDelay;
|
|
253373
|
+
if (delay === null) {
|
|
253374
|
+
return
|
|
253375
|
+
}
|
|
253376
|
+
clearTimeout(this.answerSaveTimer);
|
|
253377
|
+
this.answerSaveTimer = setTimeout(() => {
|
|
253378
|
+
this.answerSaveTimer = null;
|
|
253379
|
+
this.savePage();
|
|
253380
|
+
}, delay);
|
|
253329
253381
|
},
|
|
253330
253382
|
|
|
253331
253383
|
/**
|
|
@@ -253358,6 +253410,7 @@ var script$4t = {
|
|
|
253358
253410
|
setLocation(id, location) {
|
|
253359
253411
|
this.draft[id].location = location;
|
|
253360
253412
|
this.dirty = { ...this.dirty, [id]: true };
|
|
253413
|
+
this.scheduleAnswerSave();
|
|
253361
253414
|
},
|
|
253362
253415
|
|
|
253363
253416
|
/**
|
|
@@ -253389,6 +253442,7 @@ var script$4t = {
|
|
|
253389
253442
|
}
|
|
253390
253443
|
this.photos = { ...this.photos, [id]: [...(this.photos[id] || []), ...files] };
|
|
253391
253444
|
this.dirty = { ...this.dirty, [id]: true };
|
|
253445
|
+
this.scheduleAnswerSave();
|
|
253392
253446
|
this.missingPhoto = this.missingPhoto.filter((m) => m !== id);
|
|
253393
253447
|
if (event.target) {
|
|
253394
253448
|
event.target.value = '';
|
|
@@ -253404,6 +253458,24 @@ var script$4t = {
|
|
|
253404
253458
|
* @spec openspec/changes/checklist-run-widget/specs/checklist-run-widget/spec.md#requirement-answers-are-saved-under-the-readers-own-rights
|
|
253405
253459
|
*/
|
|
253406
253460
|
async savePage() {
|
|
253461
|
+
// One save at a time, so an answer is never created twice.
|
|
253462
|
+
while (this.pageSave) {
|
|
253463
|
+
await this.pageSave;
|
|
253464
|
+
}
|
|
253465
|
+
this.pageSave = this.savePageNow();
|
|
253466
|
+
try {
|
|
253467
|
+
return await this.pageSave
|
|
253468
|
+
} finally {
|
|
253469
|
+
this.pageSave = null;
|
|
253470
|
+
}
|
|
253471
|
+
},
|
|
253472
|
+
|
|
253473
|
+
/**
|
|
253474
|
+
* Save the changed answers of this page now (see `savePage`).
|
|
253475
|
+
*
|
|
253476
|
+
* @return {Promise<boolean>} True when everything saved.
|
|
253477
|
+
*/
|
|
253478
|
+
async savePageNow() {
|
|
253407
253479
|
const changed = this.pageQuestions.filter((q) => this.dirty[q.id]);
|
|
253408
253480
|
if (changed.length === 0) {
|
|
253409
253481
|
return true
|
|
@@ -253452,11 +253524,11 @@ var script$4t = {
|
|
|
253452
253524
|
const af = this.answerFields;
|
|
253453
253525
|
const key = c.answerKey || 'questionId';
|
|
253454
253526
|
const refField = c.photoRefField || 'id';
|
|
253455
|
-
let recordPhotos = Array.isArray(readPath$
|
|
253527
|
+
let recordPhotos = Array.isArray(readPath$a(this.openRecord, c.recordPhotosField)) ? readPath$a(this.openRecord, c.recordPhotosField) : [];
|
|
253456
253528
|
const entries = [...this.recordAnswers];
|
|
253457
253529
|
for (const question of changed) {
|
|
253458
253530
|
const draft = this.draft[question.id];
|
|
253459
|
-
const index = entries.findIndex((entry) => String(readPath$
|
|
253531
|
+
const index = entries.findIndex((entry) => String(readPath$a(entry, key) ?? '') === question.id);
|
|
253460
253532
|
const entry = { ...(index >= 0 ? entries[index] : { [key]: question.id }) };
|
|
253461
253533
|
if (question.kind === 'number') {
|
|
253462
253534
|
entry[af.number] = draft.value === '' ? null : Number(draft.value);
|
|
@@ -254017,7 +254089,7 @@ function render$4r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
254017
254089
|
}
|
|
254018
254090
|
|
|
254019
254091
|
script$4t.render = render$4r;
|
|
254020
|
-
script$4t.__scopeId = "data-v-
|
|
254092
|
+
script$4t.__scopeId = "data-v-e9adfb50";
|
|
254021
254093
|
const __sfc_main$4t = script$4t;
|
|
254022
254094
|
|
|
254023
254095
|
/**
|
|
@@ -254121,7 +254193,7 @@ var script$4s = {
|
|
|
254121
254193
|
*/
|
|
254122
254194
|
items() {
|
|
254123
254195
|
const content = this.content || {};
|
|
254124
|
-
const list = this.record ? readPath$
|
|
254196
|
+
const list = this.record ? readPath$a(this.record, content.path || 'checklist') : null;
|
|
254125
254197
|
if (!Array.isArray(list)) {
|
|
254126
254198
|
return []
|
|
254127
254199
|
}
|
|
@@ -254485,9 +254557,9 @@ var script$4r = {
|
|
|
254485
254557
|
return
|
|
254486
254558
|
}
|
|
254487
254559
|
this.loadedId = id;
|
|
254488
|
-
const text = readPath$
|
|
254560
|
+
const text = readPath$a(record, this.field);
|
|
254489
254561
|
this.text = typeof text === 'string' ? text : '';
|
|
254490
|
-
const choice = this.outcome ? readPath$
|
|
254562
|
+
const choice = this.outcome ? readPath$a(record, this.outcome.field) : '';
|
|
254491
254563
|
this.choice = typeof choice === 'string' ? choice : '';
|
|
254492
254564
|
},
|
|
254493
254565
|
},
|
|
@@ -256544,9 +256616,9 @@ var script$4o = {
|
|
|
256544
256616
|
}
|
|
256545
256617
|
const toneMap = source.toneMap && typeof source.toneMap === 'object' ? source.toneMap : {};
|
|
256546
256618
|
this.listed = rows.map((row, index) => {
|
|
256547
|
-
const raw = source.tonePath ? readPath$
|
|
256619
|
+
const raw = source.tonePath ? readPath$a(row, source.tonePath) : undefined;
|
|
256548
256620
|
const tone = Object.hasOwn(toneMap, String(raw)) ? toneMap[String(raw)] : raw;
|
|
256549
|
-
const label = readPath$
|
|
256621
|
+
const label = readPath$a(row, source.labelPath);
|
|
256550
256622
|
return { id: `source-${row?.id ?? index}`, label: typeof label === 'string' ? label : '', tone }
|
|
256551
256623
|
});
|
|
256552
256624
|
},
|
|
@@ -256570,7 +256642,7 @@ var script$4o = {
|
|
|
256570
256642
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
256571
256643
|
const url = source.url.replace(/@objectId/g, encodeURIComponent(String(this.partyId)));
|
|
256572
256644
|
const { data } = await axios.get(generateUrl(url));
|
|
256573
|
-
rows = source.itemsPath ? readPath$
|
|
256645
|
+
rows = source.itemsPath ? readPath$a(data, source.itemsPath) : data;
|
|
256574
256646
|
} catch {
|
|
256575
256647
|
this.loadError = this.tr(source.errorText || 'The warnings could not be loaded.');
|
|
256576
256648
|
return []
|
|
@@ -256580,14 +256652,14 @@ var script$4o = {
|
|
|
256580
256652
|
const toneLabels = source.toneLabels && typeof source.toneLabels === 'object' ? source.toneLabels : {};
|
|
256581
256653
|
const ack = source.ack && typeof source.ack === 'object' ? source.ack : null;
|
|
256582
256654
|
return (Array.isArray(rows) ? rows : []).filter((row) => row && typeof row === 'object').map((row, index) => {
|
|
256583
|
-
const raw = source.tonePath ? readPath$
|
|
256584
|
-
const label = readPath$
|
|
256655
|
+
const raw = source.tonePath ? readPath$a(row, source.tonePath) : undefined;
|
|
256656
|
+
const label = readPath$a(row, source.labelPath || 'label');
|
|
256585
256657
|
const meta = (Array.isArray(source.meta) ? source.meta : [])
|
|
256586
256658
|
.map((part) => firstFilled(part, row, (key) => this.tr(key)))
|
|
256587
256659
|
.filter((text) => text !== '')
|
|
256588
256660
|
.join(' · ');
|
|
256589
|
-
const needsAck = ack && readPath$
|
|
256590
|
-
const seen = ack && ack.seen && readPath$
|
|
256661
|
+
const needsAck = ack && readPath$a(row, ack.whenPath) === true && !readPath$a(row, ack.donePath);
|
|
256662
|
+
const seen = ack && ack.seen && readPath$a(row, ack.donePath) ? fillTemplate(this.tr(ack.seen), row) : '';
|
|
256591
256663
|
return {
|
|
256592
256664
|
id: `source-${row.id ?? index}`,
|
|
256593
256665
|
label: typeof label === 'string' ? label : '',
|
|
@@ -256617,7 +256689,7 @@ var script$4o = {
|
|
|
256617
256689
|
this.ackError = '';
|
|
256618
256690
|
try {
|
|
256619
256691
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
256620
|
-
const path = String(ack.endpoint).replace(/\{([\w.]+)\}/g, (_m, field) => encodeURIComponent(String(readPath$
|
|
256692
|
+
const path = String(ack.endpoint).replace(/\{([\w.]+)\}/g, (_m, field) => encodeURIComponent(String(readPath$a(indicator.row, field) ?? '')));
|
|
256621
256693
|
await axios.post(generateUrl(path));
|
|
256622
256694
|
await this.loadListed();
|
|
256623
256695
|
} catch {
|
|
@@ -256651,7 +256723,7 @@ var script$4o = {
|
|
|
256651
256723
|
const linked = { variant: 'secondary', ...action, inline: true };
|
|
256652
256724
|
const filter = typeof action.target === 'string' ? action.target.match(/^@object\.([\w.]+)\|(tel|mailto|geo)$/) : null;
|
|
256653
256725
|
if (filter) {
|
|
256654
|
-
linked.target = contactHref(filter[2], readPath$
|
|
256726
|
+
linked.target = contactHref(filter[2], readPath$a(object, filter[1]));
|
|
256655
256727
|
}
|
|
256656
256728
|
if (action.label.includes('{')) {
|
|
256657
256729
|
linked.label = fillTemplate(this.tr(action.label), object);
|
|
@@ -256872,14 +256944,14 @@ function safeRowHref(value) {
|
|
|
256872
256944
|
*/
|
|
256873
256945
|
function rowHref(entry, spec) {
|
|
256874
256946
|
if (spec && typeof spec === 'object') {
|
|
256875
|
-
const value = readPath$
|
|
256947
|
+
const value = readPath$a(entry, spec.path);
|
|
256876
256948
|
const text = typeof value === 'string' ? value.trim() : '';
|
|
256877
256949
|
if (text === '' || !['mailto', 'tel'].includes(spec.scheme)) {
|
|
256878
256950
|
return ''
|
|
256879
256951
|
}
|
|
256880
256952
|
return `${spec.scheme}:${spec.scheme === 'tel' ? text.replace(/[^\d+]/g, '') : encodeURIComponent(text).replace(/%40/g, '@')}`
|
|
256881
256953
|
}
|
|
256882
|
-
return safeRowHref(readPath$
|
|
256954
|
+
return safeRowHref(readPath$a(entry, spec))
|
|
256883
256955
|
}
|
|
256884
256956
|
|
|
256885
256957
|
var script$4n = {
|
|
@@ -256983,7 +257055,7 @@ var script$4n = {
|
|
|
256983
257055
|
* @return {Array}
|
|
256984
257056
|
*/
|
|
256985
257057
|
items() {
|
|
256986
|
-
const list = this.saved !== null ? this.saved : readPath$
|
|
257058
|
+
const list = this.saved !== null ? this.saved : readPath$a(this.objectData || {}, this.content.field);
|
|
256987
257059
|
return Array.isArray(list) ? list : []
|
|
256988
257060
|
},
|
|
256989
257061
|
|
|
@@ -257180,7 +257252,7 @@ var script$4n = {
|
|
|
257180
257252
|
return ''
|
|
257181
257253
|
}
|
|
257182
257254
|
return this.tr(this.content.lead).replace(/\{([\w.]+)\}/g, (m, path) => {
|
|
257183
|
-
const value = readPath$
|
|
257255
|
+
const value = readPath$a(this.objectData || {}, path);
|
|
257184
257256
|
return value === undefined || value === null ? '' : String(value)
|
|
257185
257257
|
})
|
|
257186
257258
|
},
|
|
@@ -257341,7 +257413,7 @@ var script$4n = {
|
|
|
257341
257413
|
}
|
|
257342
257414
|
const entries = list.filter((entry) => entry && typeof entry === 'object');
|
|
257343
257415
|
const chosen = (mirror.prefer && entries.find((entry) => entry[mirror.prefer] === true)) || entries[0];
|
|
257344
|
-
const value = chosen ? readPath$
|
|
257416
|
+
const value = chosen ? readPath$a(chosen, mirror.path) : '';
|
|
257345
257417
|
return { [mirror.field]: value === undefined || value === null ? '' : value }
|
|
257346
257418
|
},
|
|
257347
257419
|
|
|
@@ -257349,7 +257421,7 @@ var script$4n = {
|
|
|
257349
257421
|
if (item === null || typeof item !== 'object') {
|
|
257350
257422
|
return String(item)
|
|
257351
257423
|
}
|
|
257352
|
-
const key = this.content.key ? readPath$
|
|
257424
|
+
const key = this.content.key ? readPath$a(item, this.content.key) : undefined;
|
|
257353
257425
|
return key === undefined || key === null || key === '' ? `item-${index}` : String(key)
|
|
257354
257426
|
},
|
|
257355
257427
|
|
|
@@ -257365,7 +257437,7 @@ var script$4n = {
|
|
|
257365
257437
|
return ''
|
|
257366
257438
|
}
|
|
257367
257439
|
const def = typeof spec === 'string' ? { path: spec } : spec;
|
|
257368
|
-
const raw = readPath$
|
|
257440
|
+
const raw = readPath$a(entry, def.path);
|
|
257369
257441
|
if (raw === null || raw === undefined || raw === '') {
|
|
257370
257442
|
return ''
|
|
257371
257443
|
}
|
|
@@ -257434,9 +257506,9 @@ var script$4n = {
|
|
|
257434
257506
|
try {
|
|
257435
257507
|
const { axios } = await this.http();
|
|
257436
257508
|
const response = await axios.get(prefixUrl(this.resolve(source.url, {})));
|
|
257437
|
-
const list = source.path ? readPath$
|
|
257509
|
+
const list = source.path ? readPath$a(response && response.data, source.path) : response && response.data;
|
|
257438
257510
|
const options = (Array.isArray(list) ? list : [])
|
|
257439
|
-
.map((item) => ({ value: readPath$
|
|
257511
|
+
.map((item) => ({ value: readPath$a(item, source.valuePath || 'id'), label: String(readPath$a(item, source.labelPath || 'name') ?? '') }))
|
|
257440
257512
|
.filter((option, index, all) => option.value !== undefined && option.value !== null && option.value !== ''
|
|
257441
257513
|
&& all.findIndex((other) => String(other.value) === String(option.value)) === index);
|
|
257442
257514
|
this.sourcedOptions = { ...this.sourcedOptions, [field.key]: options };
|
|
@@ -257451,7 +257523,7 @@ var script$4n = {
|
|
|
257451
257523
|
if (!spec || !spec.path) {
|
|
257452
257524
|
return null
|
|
257453
257525
|
}
|
|
257454
|
-
const raw = readPath$
|
|
257526
|
+
const raw = readPath$a(entry, spec.path);
|
|
257455
257527
|
if (raw === null || raw === undefined || raw === '') {
|
|
257456
257528
|
return null
|
|
257457
257529
|
}
|
|
@@ -257481,7 +257553,7 @@ var script$4n = {
|
|
|
257481
257553
|
return true
|
|
257482
257554
|
}
|
|
257483
257555
|
return Object.entries(when).every(([field, expected]) => {
|
|
257484
|
-
const actual = readPath$
|
|
257556
|
+
const actual = readPath$a(entry, field);
|
|
257485
257557
|
if (expected && typeof expected === 'object' && !Array.isArray(expected)) {
|
|
257486
257558
|
return this.matchesOperators(entry, actual, expected)
|
|
257487
257559
|
}
|
|
@@ -257506,7 +257578,7 @@ var script$4n = {
|
|
|
257506
257578
|
const operand = (v) => {
|
|
257507
257579
|
if (typeof v === 'string' && v.startsWith('@')) {
|
|
257508
257580
|
const path = v.startsWith('@row.') ? v.slice('@row.'.length) : v.slice(1);
|
|
257509
|
-
return readPath$
|
|
257581
|
+
return readPath$a(entry, path)
|
|
257510
257582
|
}
|
|
257511
257583
|
return v
|
|
257512
257584
|
};
|
|
@@ -257536,7 +257608,7 @@ var script$4n = {
|
|
|
257536
257608
|
}
|
|
257537
257609
|
let missing = false;
|
|
257538
257610
|
const out = this.tr(template).replace(/\{([\w.@]+)\}/g, (match, path) => {
|
|
257539
|
-
const value = readPath$
|
|
257611
|
+
const value = readPath$a(entry, path);
|
|
257540
257612
|
if (value === undefined || value === null || value === '') {
|
|
257541
257613
|
missing = true;
|
|
257542
257614
|
return match
|
|
@@ -257595,7 +257667,7 @@ var script$4n = {
|
|
|
257595
257667
|
return encodeURIComponent(id)
|
|
257596
257668
|
})
|
|
257597
257669
|
.replace(/@(row|object)\.([\w.@]+)/g, (m, scope, path) => {
|
|
257598
|
-
const v = readPath$
|
|
257670
|
+
const v = readPath$a((scope === 'row' ? entry : object) || {}, path);
|
|
257599
257671
|
missing = missing || v === undefined || v === null || v === '';
|
|
257600
257672
|
return encodeURIComponent(String(v ?? ''))
|
|
257601
257673
|
});
|
|
@@ -257645,7 +257717,7 @@ var script$4n = {
|
|
|
257645
257717
|
}
|
|
257646
257718
|
const object = this.objectData || {};
|
|
257647
257719
|
const read = (source, path) => {
|
|
257648
|
-
const v = readPath$
|
|
257720
|
+
const v = readPath$a(source || {}, path);
|
|
257649
257721
|
return v === undefined || v === null ? '' : v
|
|
257650
257722
|
};
|
|
257651
257723
|
const whole = value.match(/^@(row|object)\.([\w.@]+)$/);
|
|
@@ -257676,10 +257748,10 @@ var script$4n = {
|
|
|
257676
257748
|
const { axios } = await this.http();
|
|
257677
257749
|
const response = await axios.get(prefixUrl(this.resolve(source.url, {})));
|
|
257678
257750
|
const data = response && response.data;
|
|
257679
|
-
const list = source.path ? readPath$
|
|
257751
|
+
const list = source.path ? readPath$a(data, source.path) : data;
|
|
257680
257752
|
const live = {};
|
|
257681
257753
|
for (const item of Array.isArray(list) ? list : []) {
|
|
257682
|
-
const key = item && readPath$
|
|
257754
|
+
const key = item && readPath$a(item, source.key);
|
|
257683
257755
|
if (key !== undefined && key !== null) {
|
|
257684
257756
|
live[String(key)] = item;
|
|
257685
257757
|
}
|
|
@@ -257710,10 +257782,10 @@ var script$4n = {
|
|
|
257710
257782
|
try {
|
|
257711
257783
|
const { axios } = await this.http();
|
|
257712
257784
|
const { data: stored } = await axios.get(prefixUrl(this.objectUrl));
|
|
257713
|
-
const current = readPath$
|
|
257785
|
+
const current = readPath$a(stored || {}, this.content.field);
|
|
257714
257786
|
const next = change(Array.isArray(current) ? current : []);
|
|
257715
257787
|
const { data } = await axios.patch(prefixUrl(this.objectUrl), { [this.content.field]: next, ...this.mirrorOf(next) });
|
|
257716
|
-
const written = readPath$
|
|
257788
|
+
const written = readPath$a(data || {}, this.content.field);
|
|
257717
257789
|
this.saved = Array.isArray(written) ? written : next;
|
|
257718
257790
|
/**
|
|
257719
257791
|
* @event saved The list was saved: one PATCH of the field succeeded.
|
|
@@ -257796,7 +257868,7 @@ var script$4n = {
|
|
|
257796
257868
|
const others = stored.filter((item, index) => editing === null || this.keyOf(item, index) !== editing);
|
|
257797
257869
|
const duplicate = scalar
|
|
257798
257870
|
? (unique && others.some((item) => String(item) === String(entry)))
|
|
257799
|
-
: (unique && others.some((item) => item && String(readPath$
|
|
257871
|
+
: (unique && others.some((item) => item && String(readPath$a(item, unique)) === String(entry[unique])));
|
|
257800
257872
|
if (duplicate) {
|
|
257801
257873
|
const error = new Error('duplicate');
|
|
257802
257874
|
error.userMessage = this.tr('This is already in the list.');
|
|
@@ -257855,7 +257927,7 @@ var script$4n = {
|
|
|
257855
257927
|
const draft = {};
|
|
257856
257928
|
for (const [index, field] of this.addFields.entries()) {
|
|
257857
257929
|
const scalarValue = this.content.add?.scalar === true && index === 0 ? row.item : undefined;
|
|
257858
|
-
const value = row.item && typeof row.item === 'object' ? readPath$
|
|
257930
|
+
const value = row.item && typeof row.item === 'object' ? readPath$a(row.item, field.key) : scalarValue;
|
|
257859
257931
|
draft[field.key] = value === undefined || value === null ? this.emptyValue(field) : value;
|
|
257860
257932
|
}
|
|
257861
257933
|
this.draft = draft;
|
|
@@ -257920,9 +257992,9 @@ var script$4n = {
|
|
|
257920
257992
|
return ''
|
|
257921
257993
|
}
|
|
257922
257994
|
if (item && typeof item === 'object' && typeof spec.path === 'string') {
|
|
257923
|
-
return String(readPath$
|
|
257995
|
+
return String(readPath$a(item, spec.path) ?? '')
|
|
257924
257996
|
}
|
|
257925
|
-
const map = typeof spec.field === 'string' ? readPath$
|
|
257997
|
+
const map = typeof spec.field === 'string' ? readPath$a(this.objectData || {}, spec.field) : null;
|
|
257926
257998
|
const code = map && typeof map === 'object' ? map[String(entry.value ?? item)] : '';
|
|
257927
257999
|
return typeof code === 'string' ? code : ''
|
|
257928
258000
|
},
|
|
@@ -257997,7 +258069,7 @@ var script$4n = {
|
|
|
257997
258069
|
.map((copy) => ({
|
|
257998
258070
|
path: copy.path,
|
|
257999
258071
|
label: this.tr(copy.label || 'Copy'),
|
|
258000
|
-
value: String(readPath$
|
|
258072
|
+
value: String(readPath$a(entry, copy.path) ?? ''),
|
|
258001
258073
|
}))
|
|
258002
258074
|
.filter((copy) => copy.value !== '')
|
|
258003
258075
|
},
|
|
@@ -259221,7 +259293,7 @@ var script$4l = {
|
|
|
259221
259293
|
const results = Array.isArray(data?.results) ? data.results : [];
|
|
259222
259294
|
return results.map((item) => ({
|
|
259223
259295
|
id: String(item.id ?? item.uuid),
|
|
259224
|
-
label: String(readPath$
|
|
259296
|
+
label: String(readPath$a(item, target.titleField || 'name') || item.id),
|
|
259225
259297
|
secondary: this.tr(target.label || ''),
|
|
259226
259298
|
type: target.type,
|
|
259227
259299
|
}))
|
|
@@ -259509,9 +259581,9 @@ var script$4k = {
|
|
|
259509
259581
|
rows() {
|
|
259510
259582
|
const c = this.content;
|
|
259511
259583
|
return this.links.map((link) => {
|
|
259512
|
-
const targetId = String(readPath$
|
|
259584
|
+
const targetId = String(readPath$a(link, c.to) ?? '');
|
|
259513
259585
|
const target = this.targetOf(link);
|
|
259514
|
-
const type = c.typeField ? readPath$
|
|
259586
|
+
const type = c.typeField ? readPath$a(link, c.typeField) : undefined;
|
|
259515
259587
|
return {
|
|
259516
259588
|
id: String(link.id ?? link.uuid ?? targetId),
|
|
259517
259589
|
link,
|
|
@@ -259585,7 +259657,7 @@ var script$4k = {
|
|
|
259585
259657
|
* @return {object|null}
|
|
259586
259658
|
*/
|
|
259587
259659
|
targetOf(link) {
|
|
259588
|
-
const kind = this.content.toType ? readPath$
|
|
259660
|
+
const kind = this.content.toType ? readPath$a(link, this.content.toType) : undefined;
|
|
259589
259661
|
return this.targets.find((target) => target.type === kind) || this.targets[0] || null
|
|
259590
259662
|
},
|
|
259591
259663
|
|
|
@@ -259645,7 +259717,7 @@ var script$4k = {
|
|
|
259645
259717
|
const wanted = new Map();
|
|
259646
259718
|
for (const link of this.links) {
|
|
259647
259719
|
const target = this.targetOf(link);
|
|
259648
|
-
const id = String(readPath$
|
|
259720
|
+
const id = String(readPath$a(link, this.content.to) ?? '');
|
|
259649
259721
|
const key = this.nameKey(target, id);
|
|
259650
259722
|
if (target && id && !(key in this.names)) {
|
|
259651
259723
|
wanted.set(key, { target, id });
|
|
@@ -259655,7 +259727,7 @@ var script$4k = {
|
|
|
259655
259727
|
await Promise.all([...wanted.entries()].map(async ([key, { target, id }]) => {
|
|
259656
259728
|
try {
|
|
259657
259729
|
const { data } = await axios.get(prefixUrl(objectsUrl(target.register, target.schema, id)));
|
|
259658
|
-
const title = readPath$
|
|
259730
|
+
const title = readPath$a(data || {}, target.titleField || 'name');
|
|
259659
259731
|
names[key] = title ? String(title) : id;
|
|
259660
259732
|
} catch {
|
|
259661
259733
|
names[key] = id;
|
|
@@ -259698,8 +259770,8 @@ var script$4k = {
|
|
|
259698
259770
|
if (!this.canAdd || !pick || !pick.target || !pick.target.id) {
|
|
259699
259771
|
return { ok: false, message: this.tr('This link cannot be saved here.') }
|
|
259700
259772
|
}
|
|
259701
|
-
const exists = this.links.some((link) => String(readPath$
|
|
259702
|
-
&& (!c.typeField || String(readPath$
|
|
259773
|
+
const exists = this.links.some((link) => String(readPath$a(link, c.to)) === String(pick.target.id)
|
|
259774
|
+
&& (!c.typeField || String(readPath$a(link, c.typeField)) === String(pick.type)));
|
|
259703
259775
|
if (exists) {
|
|
259704
259776
|
return { ok: false, message: this.tr(c.duplicateText || 'This link already exists.') }
|
|
259705
259777
|
}
|
|
@@ -259759,15 +259831,15 @@ var script$4k = {
|
|
|
259759
259831
|
const axios = await this.http();
|
|
259760
259832
|
await axios.delete(prefixUrl(objectsUrl(c.register, c.schema, row.id)));
|
|
259761
259833
|
if (c.pair && row.targetId) {
|
|
259762
|
-
const type = c.typeField ? readPath$
|
|
259763
|
-
const inverse = c.inverseField ? readPath$
|
|
259834
|
+
const type = c.typeField ? readPath$a(row.link, c.typeField) : undefined;
|
|
259835
|
+
const inverse = c.inverseField ? readPath$a(row.link, c.inverseField) : undefined;
|
|
259764
259836
|
const known = this.types.find((candidate) => String(candidate.value) === String(type));
|
|
259765
259837
|
const inverseType = inverse ?? (known && known.inverse !== undefined ? known.inverse : undefined);
|
|
259766
259838
|
const { data } = await axios.get(prefixUrl(objectsUrl(c.register, c.schema)), {
|
|
259767
259839
|
params: { [c.from]: row.targetId, [c.to]: this.recordId, _limit: 10 },
|
|
259768
259840
|
});
|
|
259769
259841
|
const back = (Array.isArray(data?.results) ? data.results : [])
|
|
259770
|
-
.filter((link) => inverseType === undefined || !c.typeField || String(readPath$
|
|
259842
|
+
.filter((link) => inverseType === undefined || !c.typeField || String(readPath$a(link, c.typeField)) === String(inverseType));
|
|
259771
259843
|
for (const link of back) {
|
|
259772
259844
|
await axios.delete(prefixUrl(objectsUrl(c.register, c.schema, link.id ?? link.uuid)));
|
|
259773
259845
|
}
|
|
@@ -260241,7 +260313,7 @@ var script$4j = {
|
|
|
260241
260313
|
if (this.controlled) {
|
|
260242
260314
|
return this.modelValue.map((item) => String(item))
|
|
260243
260315
|
}
|
|
260244
|
-
const list = this.saved !== null ? this.saved : readPath$
|
|
260316
|
+
const list = this.saved !== null ? this.saved : readPath$a(this.objectData || {}, this.content.field);
|
|
260245
260317
|
return Array.isArray(list) ? list.map((item) => String(item)) : []
|
|
260246
260318
|
},
|
|
260247
260319
|
|
|
@@ -260356,7 +260428,7 @@ var script$4j = {
|
|
|
260356
260428
|
this.error = '';
|
|
260357
260429
|
try {
|
|
260358
260430
|
const data = await writeFields(this.objectUrl, { [this.content.field]: next }, { save: this.content.save, object: this.objectData });
|
|
260359
|
-
const written = readPath$
|
|
260431
|
+
const written = readPath$a(data, this.content.field);
|
|
260360
260432
|
this.saved = Array.isArray(written) ? written.map((item) => String(item)) : next;
|
|
260361
260433
|
/**
|
|
260362
260434
|
* @event saved The list was written.
|
|
@@ -260943,7 +261015,7 @@ var script$4i = {
|
|
|
260943
261015
|
* @return {unknown}
|
|
260944
261016
|
*/
|
|
260945
261017
|
stored(field) {
|
|
260946
|
-
const value = readPath$
|
|
261018
|
+
const value = readPath$a(this.objectData || {}, field.key);
|
|
260947
261019
|
if (field.type === 'switch') {
|
|
260948
261020
|
return switchIsOn(value, field.values)
|
|
260949
261021
|
}
|
|
@@ -260963,7 +261035,7 @@ var script$4i = {
|
|
|
260963
261035
|
*/
|
|
260964
261036
|
shown(field) {
|
|
260965
261037
|
const value = this.stored(field);
|
|
260966
|
-
const absent = readPath$
|
|
261038
|
+
const absent = readPath$a(this.objectData || {}, field.key) === undefined || readPath$a(this.objectData || {}, field.key) === null || value === '' || (field.type === 'chips' && value.length === 0);
|
|
260967
261039
|
if (absent && field.default !== undefined) {
|
|
260968
261040
|
return field.type === 'chips' && Array.isArray(field.default) ? [...field.default] : field.default
|
|
260969
261041
|
}
|
|
@@ -261120,7 +261192,7 @@ var script$4i = {
|
|
|
261120
261192
|
const form = { ...this.form };
|
|
261121
261193
|
for (const key of Object.keys(patch)) {
|
|
261122
261194
|
const field = this.fields.find((candidate) => candidate.key === key);
|
|
261123
|
-
const answered = readPath$
|
|
261195
|
+
const answered = readPath$a(data, key);
|
|
261124
261196
|
const written = answered !== undefined ? answered : patch[key];
|
|
261125
261197
|
baseline[key] = field.type === 'switch' ? switchIsOn(written, field.values) : (written === null ? (field.type === 'chips' ? [] : '') : written);
|
|
261126
261198
|
form[key] = baseline[key];
|
|
@@ -261528,7 +261600,7 @@ var script$4h = {
|
|
|
261528
261600
|
adopt() {
|
|
261529
261601
|
const values = {};
|
|
261530
261602
|
for (const row of this.rows) {
|
|
261531
|
-
const stored = switchIsOn(readPath$
|
|
261603
|
+
const stored = switchIsOn(readPath$a(this.objectData || {}, row.key), this.valuesOf(row));
|
|
261532
261604
|
values[row.key] = row.invert ? !stored : stored;
|
|
261533
261605
|
}
|
|
261534
261606
|
this.saved = values;
|
|
@@ -261555,7 +261627,7 @@ var script$4h = {
|
|
|
261555
261627
|
const values = this.valuesOf(row);
|
|
261556
261628
|
try {
|
|
261557
261629
|
const data = await writeFields(this.objectUrl, { [row.key]: switchStoredValue(stored, values) }, { save: this.content.save, object: this.objectData });
|
|
261558
|
-
const answered = readPath$
|
|
261630
|
+
const answered = readPath$a(data, row.key);
|
|
261559
261631
|
const written = answered !== undefined ? switchIsOn(answered, values) : stored;
|
|
261560
261632
|
const shown = row.invert ? !written : written;
|
|
261561
261633
|
this.saved = { ...this.saved, [row.key]: shown };
|
|
@@ -261799,7 +261871,7 @@ var script$4g = {
|
|
|
261799
261871
|
|
|
261800
261872
|
/** Read the choice off the object. */
|
|
261801
261873
|
adopt() {
|
|
261802
|
-
const stored = readPath$
|
|
261874
|
+
const stored = readPath$a(this.objectData || {}, this.content.field);
|
|
261803
261875
|
this.saved = stored === undefined || stored === null ? '' : String(stored);
|
|
261804
261876
|
this.value = this.saved;
|
|
261805
261877
|
},
|
|
@@ -261825,7 +261897,7 @@ var script$4g = {
|
|
|
261825
261897
|
this.value = String(option.value);
|
|
261826
261898
|
try {
|
|
261827
261899
|
const data = await writeFields(this.objectUrl, { [this.content.field]: option.value }, { save: this.content.save, object: this.objectData });
|
|
261828
|
-
const written = readPath$
|
|
261900
|
+
const written = readPath$a(data, this.content.field);
|
|
261829
261901
|
this.saved = String(written !== undefined && written !== null ? written : option.value);
|
|
261830
261902
|
this.value = this.saved;
|
|
261831
261903
|
/**
|
|
@@ -262148,7 +262220,7 @@ var script$4f = {
|
|
|
262148
262220
|
* @return {unknown}
|
|
262149
262221
|
*/
|
|
262150
262222
|
stored(field) {
|
|
262151
|
-
return Object.hasOwn(this.saved, field) ? this.saved[field] : readPath$
|
|
262223
|
+
return Object.hasOwn(this.saved, field) ? this.saved[field] : readPath$a(this.objectData || {}, field)
|
|
262152
262224
|
},
|
|
262153
262225
|
|
|
262154
262226
|
/**
|
|
@@ -262183,7 +262255,7 @@ var script$4f = {
|
|
|
262183
262255
|
return this.rowSaved[row.key]
|
|
262184
262256
|
}
|
|
262185
262257
|
if (this.bind.mode === 'each') {
|
|
262186
|
-
return this.bind.field ? readPath$
|
|
262258
|
+
return this.bind.field ? readPath$a(row.item || row, this.bind.field) : undefined
|
|
262187
262259
|
}
|
|
262188
262260
|
const map = this.bind.url ? this.map : (this.bind.field ? this.stored(this.bind.field) : null);
|
|
262189
262261
|
return map && typeof map === 'object' ? map[row.key] : undefined
|
|
@@ -262199,7 +262271,7 @@ var script$4f = {
|
|
|
262199
262271
|
const object = this.objectData || {};
|
|
262200
262272
|
return String(url)
|
|
262201
262273
|
.replace(/@objectId/g, () => encodeURIComponent(String(this.objectId || object.id || '')))
|
|
262202
|
-
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$
|
|
262274
|
+
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$a(object, path) ?? '')))
|
|
262203
262275
|
},
|
|
262204
262276
|
|
|
262205
262277
|
/**
|
|
@@ -262215,7 +262287,7 @@ var script$4f = {
|
|
|
262215
262287
|
try {
|
|
262216
262288
|
const { default: axios } = await import('@nextcloud/axios');
|
|
262217
262289
|
const { data } = await axios.get(prefixUrl(this.fillUrl(this.bind.url)));
|
|
262218
|
-
const map = this.bind.path ? readPath$
|
|
262290
|
+
const map = this.bind.path ? readPath$a(data, this.bind.path) : data;
|
|
262219
262291
|
this.map = map && typeof map === 'object' ? map : {};
|
|
262220
262292
|
} catch (e) {
|
|
262221
262293
|
this.notice = serverErrorMessage(e);
|
|
@@ -262239,7 +262311,7 @@ var script$4f = {
|
|
|
262239
262311
|
throw new Error(this.tr('This switch cannot be saved here.'))
|
|
262240
262312
|
}
|
|
262241
262313
|
const data = await writeFields(url, { [this.bind.field]: value }, { save, object: row.item || row });
|
|
262242
|
-
const answered = hasSave ? undefined : readPath$
|
|
262314
|
+
const answered = hasSave ? undefined : readPath$a(data, this.bind.field);
|
|
262243
262315
|
return answered !== undefined ? answered : value
|
|
262244
262316
|
}
|
|
262245
262317
|
if (this.bind.url) {
|
|
@@ -262264,7 +262336,7 @@ var script$4f = {
|
|
|
262264
262336
|
* @return {string}
|
|
262265
262337
|
*/
|
|
262266
262338
|
cell(row, column) {
|
|
262267
|
-
const raw = readPath$
|
|
262339
|
+
const raw = readPath$a(row, column.path);
|
|
262268
262340
|
if (raw === undefined || raw === null || raw === '') {
|
|
262269
262341
|
return ''
|
|
262270
262342
|
}
|
|
@@ -262284,15 +262356,15 @@ var script$4f = {
|
|
|
262284
262356
|
try {
|
|
262285
262357
|
const { default: axios } = await import('@nextcloud/axios');
|
|
262286
262358
|
const { data } = await axios.get(prefixUrl(url));
|
|
262287
|
-
const list = source.path ? readPath$
|
|
262359
|
+
const list = source.path ? readPath$a(data, source.path) : data;
|
|
262288
262360
|
this.sourced = (Array.isArray(list) ? list : [])
|
|
262289
|
-
.filter((item) => item && readPath$
|
|
262361
|
+
.filter((item) => item && readPath$a(item, source.key) !== undefined)
|
|
262290
262362
|
.map((item) => ({
|
|
262291
262363
|
...item,
|
|
262292
262364
|
item,
|
|
262293
|
-
key: String(readPath$
|
|
262294
|
-
title: String(readPath$
|
|
262295
|
-
hint: source.hint ? String(readPath$
|
|
262365
|
+
key: String(readPath$a(item, source.key)),
|
|
262366
|
+
title: String(readPath$a(item, source.label || source.key) ?? readPath$a(item, source.key)),
|
|
262367
|
+
hint: source.hint ? String(readPath$a(item, source.hint) ?? '') : '',
|
|
262296
262368
|
}));
|
|
262297
262369
|
} catch (e) {
|
|
262298
262370
|
this.notice = serverErrorMessage(e);
|
|
@@ -262340,7 +262412,7 @@ var script$4f = {
|
|
|
262340
262412
|
this.busy = row.key;
|
|
262341
262413
|
try {
|
|
262342
262414
|
const data = await writeFields(this.objectUrl, { [field]: next }, { save: this.content.save, object: this.objectData });
|
|
262343
|
-
const answered = readPath$
|
|
262415
|
+
const answered = readPath$a(data, field);
|
|
262344
262416
|
const written = answered !== undefined ? answered : next;
|
|
262345
262417
|
this.saved = { ...this.saved, [field]: written };
|
|
262346
262418
|
/**
|
|
@@ -262631,7 +262703,7 @@ var script$4e = {
|
|
|
262631
262703
|
if (!this.content.editablePath) {
|
|
262632
262704
|
return true
|
|
262633
262705
|
}
|
|
262634
|
-
return readPath$
|
|
262706
|
+
return readPath$a(this.answer, this.content.editablePath) === true
|
|
262635
262707
|
},
|
|
262636
262708
|
|
|
262637
262709
|
/**
|
|
@@ -262647,11 +262719,11 @@ var script$4e = {
|
|
|
262647
262719
|
const value = this.controlValue(control);
|
|
262648
262720
|
const base = { ...control, label: this.tr(control.label || control.param), value };
|
|
262649
262721
|
if (control.type === 'date') {
|
|
262650
|
-
return { ...base, max: control.maxPath ? readPath$
|
|
262722
|
+
return { ...base, max: control.maxPath ? readPath$a(this.answer, control.maxPath) : '', today: control.todayPath ? readPath$a(this.answer, control.todayPath) : '' }
|
|
262651
262723
|
}
|
|
262652
|
-
const options = (readPath$
|
|
262653
|
-
value: String(readPath$
|
|
262654
|
-
label: String(readPath$
|
|
262724
|
+
const options = (readPath$a(this.answer, control.optionsPath || '') || []).map((option) => ({
|
|
262725
|
+
value: String(readPath$a(option, control.optionValue || 'id') ?? ''),
|
|
262726
|
+
label: String(readPath$a(option, control.optionLabel || 'name') ?? ''),
|
|
262655
262727
|
}));
|
|
262656
262728
|
return { ...base, type: 'select', options, selected: options.find((option) => option.value === value) || null }
|
|
262657
262729
|
})
|
|
@@ -262704,7 +262776,7 @@ var script$4e = {
|
|
|
262704
262776
|
|
|
262705
262777
|
heading() {
|
|
262706
262778
|
const text = this.tr(this.content.heading || '');
|
|
262707
|
-
const suffix = this.content.headingPath ? readPath$
|
|
262779
|
+
const suffix = this.content.headingPath ? readPath$a(this.answer, this.content.headingPath) : '';
|
|
262708
262780
|
if (text && suffix) {
|
|
262709
262781
|
return `${text} · ${suffix}`
|
|
262710
262782
|
}
|
|
@@ -262799,7 +262871,7 @@ var script$4e = {
|
|
|
262799
262871
|
if (typeof query[control.param] === 'string' && query[control.param] !== '') {
|
|
262800
262872
|
return query[control.param]
|
|
262801
262873
|
}
|
|
262802
|
-
const answered = control.valuePath ? readPath$
|
|
262874
|
+
const answered = control.valuePath ? readPath$a(this.answer, control.valuePath) : '';
|
|
262803
262875
|
return answered === null || answered === undefined ? '' : String(answered)
|
|
262804
262876
|
},
|
|
262805
262877
|
|
|
@@ -262816,7 +262888,7 @@ var script$4e = {
|
|
|
262816
262888
|
if (!rule || !rule.path) {
|
|
262817
262889
|
return false
|
|
262818
262890
|
}
|
|
262819
|
-
const value = readPath$
|
|
262891
|
+
const value = readPath$a(data, rule.path);
|
|
262820
262892
|
const present = value !== null && value !== undefined && value !== '' && value !== false
|
|
262821
262893
|
&& !(Array.isArray(value) && value.length === 0);
|
|
262822
262894
|
if (Object.hasOwn(rule, 'equals')) {
|
|
@@ -262881,7 +262953,7 @@ var script$4e = {
|
|
|
262881
262953
|
const keyField = this.content.rowKey || 'id';
|
|
262882
262954
|
const labelField = this.content.labelField || 'name';
|
|
262883
262955
|
const stateField = this.content.stateField || 'state';
|
|
262884
|
-
const list = readPath$
|
|
262956
|
+
const list = readPath$a(this.answer, this.content.rowsPath || 'rows');
|
|
262885
262957
|
this.rows = (Array.isArray(list) ? list : []).map((source) => {
|
|
262886
262958
|
const state = typeof source[stateField] === 'string' && source[stateField] !== '' ? source[stateField] : this.defaultState;
|
|
262887
262959
|
const values = {};
|
|
@@ -263009,7 +263081,7 @@ var script$4e = {
|
|
|
263009
263081
|
*/
|
|
263010
263082
|
rowBadges(row) {
|
|
263011
263083
|
const read = (path) => {
|
|
263012
|
-
const value = readPath$
|
|
263084
|
+
const value = readPath$a(row.source, path);
|
|
263013
263085
|
return value === null || value === undefined ? '' : String(value)
|
|
263014
263086
|
};
|
|
263015
263087
|
return (Array.isArray(this.content.badges) ? this.content.badges : [])
|
|
@@ -263115,7 +263187,7 @@ var script$4e = {
|
|
|
263115
263187
|
}
|
|
263116
263188
|
const body = {};
|
|
263117
263189
|
for (const [key, path] of Object.entries(save.body || {})) {
|
|
263118
|
-
const value = readPath$
|
|
263190
|
+
const value = readPath$a(this.answer, path);
|
|
263119
263191
|
body[key] = value === undefined || value === '' ? null : value;
|
|
263120
263192
|
}
|
|
263121
263193
|
body[save.rowsKey || 'rows'] = this.rows.map((row) => this.rowToSave(row));
|
|
@@ -263682,7 +263754,7 @@ var script$4d = {
|
|
|
263682
263754
|
for (let page = 1; ; page++) {
|
|
263683
263755
|
const { data } = await axios$1.get(url, { params: { ...(this.source.filter || {}), _limit: PAGE_SIZE, _page: page } });
|
|
263684
263756
|
const results = Array.isArray(data) ? data : (data && (data.results || data.objects)) || [];
|
|
263685
|
-
items.push(...results.map((item) => ({ ...item, id: String(item.id || item.uuid || readPath$
|
|
263757
|
+
items.push(...results.map((item) => ({ ...item, id: String(item.id || item.uuid || readPath$a(item, '@self.id') || '') })));
|
|
263686
263758
|
const pages = Number(data && data.pages) || 1;
|
|
263687
263759
|
if (Array.isArray(data) || page >= pages || results.length === 0) {
|
|
263688
263760
|
break
|
|
@@ -264023,13 +264095,13 @@ var script$4c = {
|
|
|
264023
264095
|
options() {
|
|
264024
264096
|
const items = [...(Array.isArray(this.content.items) ? this.content.items : []), ...this.sourced];
|
|
264025
264097
|
return items
|
|
264026
|
-
.filter((item) => item && readPath$
|
|
264098
|
+
.filter((item) => item && readPath$a(item, this.spec.key || 'key') !== undefined)
|
|
264027
264099
|
.map((item) => {
|
|
264028
|
-
const key = String(readPath$
|
|
264029
|
-
const refusal = this.spec.refusal ? readPath$
|
|
264100
|
+
const key = String(readPath$a(item, this.spec.key || 'key'));
|
|
264101
|
+
const refusal = this.spec.refusal ? readPath$a(item, this.spec.refusal) : '';
|
|
264030
264102
|
return {
|
|
264031
264103
|
key,
|
|
264032
|
-
title: String(readPath$
|
|
264104
|
+
title: String(readPath$a(item, this.spec.label || 'label') ?? key),
|
|
264033
264105
|
swatches: this.listOf(item, this.spec.swatches).filter((colour) => typeof colour === 'string'),
|
|
264034
264106
|
pill: this.pillOf(item),
|
|
264035
264107
|
refusal: typeof refusal === 'string' ? refusal : '',
|
|
@@ -264101,7 +264173,7 @@ var script$4c = {
|
|
|
264101
264173
|
|
|
264102
264174
|
/** Read the current choice off the object. */
|
|
264103
264175
|
adopt() {
|
|
264104
|
-
const stored = readPath$
|
|
264176
|
+
const stored = readPath$a(this.objectData || {}, this.content.field);
|
|
264105
264177
|
this.saved = stored === undefined || stored === null ? '' : String(stored);
|
|
264106
264178
|
this.chosen = this.saved;
|
|
264107
264179
|
},
|
|
@@ -264114,7 +264186,7 @@ var script$4c = {
|
|
|
264114
264186
|
* @return {Array}
|
|
264115
264187
|
*/
|
|
264116
264188
|
listOf(item, path) {
|
|
264117
|
-
const list = path ? readPath$
|
|
264189
|
+
const list = path ? readPath$a(item, path) : [];
|
|
264118
264190
|
return Array.isArray(list) ? list : []
|
|
264119
264191
|
},
|
|
264120
264192
|
|
|
@@ -264129,7 +264201,7 @@ var script$4c = {
|
|
|
264129
264201
|
if (!state || !state.path) {
|
|
264130
264202
|
return null
|
|
264131
264203
|
}
|
|
264132
|
-
const raw = readPath$
|
|
264204
|
+
const raw = readPath$a(item, state.path);
|
|
264133
264205
|
const empty = raw === undefined || raw === null || raw === '';
|
|
264134
264206
|
if (empty) {
|
|
264135
264207
|
return state.empty ? { label: this.tr(state.empty), variant: isBadgeVariant(state.emptyVariant) ? state.emptyVariant : 'default' } : null
|
|
@@ -264158,7 +264230,7 @@ var script$4c = {
|
|
|
264158
264230
|
if (!entry || typeof entry !== 'object' || !spec.item) {
|
|
264159
264231
|
return ''
|
|
264160
264232
|
}
|
|
264161
|
-
return this.tr(spec.item).replace(/\{([\w.]+)\}/g, (m, path) => String(readPath$
|
|
264233
|
+
return this.tr(spec.item).replace(/\{([\w.]+)\}/g, (m, path) => String(readPath$a(entry, path) ?? ''))
|
|
264162
264234
|
})
|
|
264163
264235
|
.filter((line) => line !== '')
|
|
264164
264236
|
},
|
|
@@ -264189,11 +264261,11 @@ var script$4c = {
|
|
|
264189
264261
|
}
|
|
264190
264262
|
const whole = value.match(/^@object\.([\w.@]+)$/);
|
|
264191
264263
|
if (whole) {
|
|
264192
|
-
return readPath$
|
|
264264
|
+
return readPath$a(object, whole[1])
|
|
264193
264265
|
}
|
|
264194
264266
|
return value
|
|
264195
264267
|
.replace(/@objectId/g, () => encodeURIComponent(String(this.objectId || object.id || '')))
|
|
264196
|
-
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$
|
|
264268
|
+
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$a(object, path) ?? '')))
|
|
264197
264269
|
.replace(/@value/g, () => encodeURIComponent(String(vars.value)))
|
|
264198
264270
|
},
|
|
264199
264271
|
|
|
@@ -264206,7 +264278,7 @@ var script$4c = {
|
|
|
264206
264278
|
try {
|
|
264207
264279
|
const { default: axios } = await import('@nextcloud/axios');
|
|
264208
264280
|
const { data } = await axios.get(prefixUrl(String(this.resolve(this.spec.url, { value: '', confirmed: false }))));
|
|
264209
|
-
const list = this.spec.path ? readPath$
|
|
264281
|
+
const list = this.spec.path ? readPath$a(data, this.spec.path) : data;
|
|
264210
264282
|
this.sourced = Array.isArray(list) ? list : [];
|
|
264211
264283
|
} catch (e) {
|
|
264212
264284
|
this.noticeType = 'error';
|
|
@@ -264547,13 +264619,13 @@ function snapshotKeys(local, office) {
|
|
|
264547
264619
|
* @spec openspec/changes/conflict-resolve-card/specs/conflict-resolve-card/spec.md#requirement-a-card-shows-both-versions-of-each-differing-field
|
|
264548
264620
|
*/
|
|
264549
264621
|
function conflictFields(record, options = {}) {
|
|
264550
|
-
const local = asObject(readPath$
|
|
264551
|
-
const office = asObject(readPath$
|
|
264622
|
+
const local = asObject(readPath$a(record, options.localPath || 'clientVersion'));
|
|
264623
|
+
const office = asObject(readPath$a(record, options.officePath || 'serverVersion'));
|
|
264552
264624
|
const named = pathList(options.fields);
|
|
264553
|
-
const listed = named.length > 0 ? named : pathList(readPath$
|
|
264625
|
+
const listed = named.length > 0 ? named : pathList(readPath$a(record, options.fieldsPath || 'conflictFields'));
|
|
264554
264626
|
const paths = listed.length > 0 ? listed : snapshotKeys(local, office);
|
|
264555
264627
|
return paths
|
|
264556
|
-
.map((path) => ({ path, local: valueText$1(readPath$
|
|
264628
|
+
.map((path) => ({ path, local: valueText$1(readPath$a(local, path)), office: valueText$1(readPath$a(office, path)) }))
|
|
264557
264629
|
.filter((field) => field.local !== field.office)
|
|
264558
264630
|
}
|
|
264559
264631
|
|
|
@@ -264699,7 +264771,7 @@ var script$4b = {
|
|
|
264699
264771
|
return true
|
|
264700
264772
|
}
|
|
264701
264773
|
try {
|
|
264702
|
-
return Boolean(readPath$
|
|
264774
|
+
return Boolean(readPath$a(capabilities.getCapabilities() || {}, capability))
|
|
264703
264775
|
} catch {
|
|
264704
264776
|
return false
|
|
264705
264777
|
}
|
|
@@ -264726,7 +264798,7 @@ var script$4b = {
|
|
|
264726
264798
|
cards() {
|
|
264727
264799
|
const options = { localPath: this.content.localPath, officePath: this.content.officePath, fieldsPath: this.content.fieldsPath, fields: this.content.fields };
|
|
264728
264800
|
return this.records
|
|
264729
|
-
.map((record) => ({ id: String(readPath$
|
|
264801
|
+
.map((record) => ({ id: String(readPath$a(record, 'id') ?? readPath$a(record, '@self.id') ?? ''), record, fields: conflictFields(record, options) }))
|
|
264730
264802
|
.filter((card) => card.id !== '' && card.fields.length > 0)
|
|
264731
264803
|
},
|
|
264732
264804
|
|
|
@@ -265245,9 +265317,9 @@ var script$4a = {
|
|
|
265245
265317
|
leafProps(row) {
|
|
265246
265318
|
const leaf = this.leaf || {};
|
|
265247
265319
|
return {
|
|
265248
|
-
objectId: String(readPath$
|
|
265320
|
+
objectId: String(readPath$a(row, leaf.objectIdField || 'id') ?? ''),
|
|
265249
265321
|
register: leaf.register || '',
|
|
265250
|
-
schema: leaf.schemaField ? String(readPath$
|
|
265322
|
+
schema: leaf.schemaField ? String(readPath$a(row, leaf.schemaField) ?? '') : (leaf.schema || ''),
|
|
265251
265323
|
surface: 'row',
|
|
265252
265324
|
}
|
|
265253
265325
|
},
|
|
@@ -265261,10 +265333,10 @@ var script$4a = {
|
|
|
265261
265333
|
*/
|
|
265262
265334
|
urlOf(row) {
|
|
265263
265335
|
if (this.action.urlField) {
|
|
265264
|
-
return String(readPath$
|
|
265336
|
+
return String(readPath$a(row, this.action.urlField) ?? '')
|
|
265265
265337
|
}
|
|
265266
265338
|
const template = String(this.action.url || '');
|
|
265267
|
-
return template.replace(/\{([A-Za-z0-9_.]+)\}/g, (_, path) => encodeURIComponent(String(readPath$
|
|
265339
|
+
return template.replace(/\{([A-Za-z0-9_.]+)\}/g, (_, path) => encodeURIComponent(String(readPath$a(row, path) ?? '')))
|
|
265268
265340
|
},
|
|
265269
265341
|
|
|
265270
265342
|
/**
|
|
@@ -266310,7 +266382,7 @@ var script$49 = {
|
|
|
266310
266382
|
const labels = c.valueLabels && typeof c.valueLabels[c.groupBy] === 'object' ? c.valueLabels[c.groupBy] : {};
|
|
266311
266383
|
const buckets = new Map();
|
|
266312
266384
|
for (const item of this.items) {
|
|
266313
|
-
const raw = readPath$
|
|
266385
|
+
const raw = readPath$a(item.row, c.groupBy);
|
|
266314
266386
|
const value = raw === null || raw === undefined || typeof raw === 'object' ? '' : String(raw);
|
|
266315
266387
|
if (!buckets.has(value)) {
|
|
266316
266388
|
buckets.set(value, []);
|
|
@@ -266402,7 +266474,7 @@ var script$49 = {
|
|
|
266402
266474
|
row: item.row,
|
|
266403
266475
|
rowActions: this.rowActions.length > 0 ? this.rowActionsOf(item.row) : [],
|
|
266404
266476
|
to: item.attrs.to || null,
|
|
266405
|
-
depth: indentPath ? Math.max(0, Math.floor(Number(readPath$
|
|
266477
|
+
depth: indentPath ? Math.max(0, Math.floor(Number(readPath$a(item.row, indentPath)) || 0)) : 0,
|
|
266406
266478
|
cells: this.tableColumns.map((col) => {
|
|
266407
266479
|
const text = this.fill(col.value, item.row);
|
|
266408
266480
|
const limit = Number(col.alertAbove);
|
|
@@ -266498,7 +266570,7 @@ var script$49 = {
|
|
|
266498
266570
|
if (!field) {
|
|
266499
266571
|
return 0
|
|
266500
266572
|
}
|
|
266501
|
-
return Math.max(0, ...this.rows.slice(0, this.limit).map((row) => Number(readPath$
|
|
266573
|
+
return Math.max(0, ...this.rows.slice(0, this.limit).map((row) => Number(readPath$a(row, field)) || 0))
|
|
266502
266574
|
},
|
|
266503
266575
|
|
|
266504
266576
|
/** @return {object|null} The header link with `{total}` filled and tokens resolved; null while an href param is unresolved. */
|
|
@@ -266750,7 +266822,7 @@ var script$49 = {
|
|
|
266750
266822
|
}
|
|
266751
266823
|
const ids = new Set();
|
|
266752
266824
|
for (const row of this.rows.slice(0, this.limit)) {
|
|
266753
|
-
const list = readPath$
|
|
266825
|
+
const list = readPath$a(row, field);
|
|
266754
266826
|
for (const id of Array.isArray(list) ? list : []) {
|
|
266755
266827
|
if (typeof id === 'string' && id !== '') {
|
|
266756
266828
|
ids.add(id);
|
|
@@ -266893,7 +266965,7 @@ var script$49 = {
|
|
|
266893
266965
|
}
|
|
266894
266966
|
let mapped = '';
|
|
266895
266967
|
if (typeof def.field === 'string' && def.field !== '') {
|
|
266896
|
-
const raw = readPath$
|
|
266968
|
+
const raw = readPath$a(row, def.field);
|
|
266897
266969
|
if (raw === null || raw === undefined || raw === '') {
|
|
266898
266970
|
return ''
|
|
266899
266971
|
}
|
|
@@ -266920,7 +266992,7 @@ var script$49 = {
|
|
|
266920
266992
|
return flags
|
|
266921
266993
|
.filter((flag) => flag && typeof flag.field === 'string' && typeof flag.label === 'string' && flag.label !== '')
|
|
266922
266994
|
.filter((flag) => {
|
|
266923
|
-
const raw = readPath$
|
|
266995
|
+
const raw = readPath$a(row, flag.field);
|
|
266924
266996
|
return flag.value !== undefined ? String(raw) === String(flag.value) : raw === true || raw === 'true' || raw === 1
|
|
266925
266997
|
})
|
|
266926
266998
|
.map((flag) => this.translate(flag.label))
|
|
@@ -267015,11 +267087,11 @@ var script$49 = {
|
|
|
267015
267087
|
if (!bar || typeof bar !== 'object' || !bar.valueField) {
|
|
267016
267088
|
return null
|
|
267017
267089
|
}
|
|
267018
|
-
const value = Number(readPath$
|
|
267090
|
+
const value = Number(readPath$a(row, bar.valueField));
|
|
267019
267091
|
if (!Number.isFinite(value)) {
|
|
267020
267092
|
return null
|
|
267021
267093
|
}
|
|
267022
|
-
const ownMax = bar.maxField ? Number(readPath$
|
|
267094
|
+
const ownMax = bar.maxField ? Number(readPath$a(row, bar.maxField)) : NaN;
|
|
267023
267095
|
const max = bar.maxField ? (Number.isFinite(ownMax) && ownMax > 0 ? ownMax : 0) : scale;
|
|
267024
267096
|
const share = max > 0 ? Math.min(100, Math.max(0, (value / max) * 100)) : 0;
|
|
267025
267097
|
const over = Boolean(bar.maxField) && bar.overVariant === 'error' && max > 0 && value > max;
|
|
@@ -267039,7 +267111,7 @@ var script$49 = {
|
|
|
267039
267111
|
if (!tone || typeof tone !== 'object' || typeof tone.field !== 'string' || !tone.map || typeof tone.map !== 'object') {
|
|
267040
267112
|
return ''
|
|
267041
267113
|
}
|
|
267042
|
-
const variant = tone.map[String(readPath$
|
|
267114
|
+
const variant = tone.map[String(readPath$a(row, tone.field) ?? '')];
|
|
267043
267115
|
return ['default', 'success', 'warning', 'error', 'info', 'purple', 'teal'].includes(variant) ? variant : ''
|
|
267044
267116
|
},
|
|
267045
267117
|
|
|
@@ -267058,7 +267130,7 @@ var script$49 = {
|
|
|
267058
267130
|
if (!icon || typeof icon !== 'object' || typeof icon.field !== 'string' || !icon.map || typeof icon.map !== 'object') {
|
|
267059
267131
|
return ''
|
|
267060
267132
|
}
|
|
267061
|
-
const name = icon.map[String(readPath$
|
|
267133
|
+
const name = icon.map[String(readPath$a(row, icon.field) ?? '')];
|
|
267062
267134
|
return typeof name === 'string' ? name : ''
|
|
267063
267135
|
},
|
|
267064
267136
|
|
|
@@ -267202,7 +267274,7 @@ var script$49 = {
|
|
|
267202
267274
|
let label = typeof action.label === 'string' ? action.label : '';
|
|
267203
267275
|
const by = action.labels;
|
|
267204
267276
|
if (by && typeof by === 'object' && typeof by.field === 'string' && by.map && typeof by.map === 'object') {
|
|
267205
|
-
const raw = readPath$
|
|
267277
|
+
const raw = readPath$a(row, by.field);
|
|
267206
267278
|
if (raw !== null && raw !== undefined && typeof by.map[String(raw)] === 'string') {
|
|
267207
267279
|
label = by.map[String(raw)];
|
|
267208
267280
|
}
|
|
@@ -267281,7 +267353,7 @@ var script$49 = {
|
|
|
267281
267353
|
*/
|
|
267282
267354
|
rowIdOf(row) {
|
|
267283
267355
|
const field = this.content?.rowIdField;
|
|
267284
|
-
const id = field ? readPath$
|
|
267356
|
+
const id = field ? readPath$a(row, field) : (row && (row.id || row['@self']?.id));
|
|
267285
267357
|
return (id === null || id === undefined || id === '' || typeof id === 'object') ? null : String(id)
|
|
267286
267358
|
},
|
|
267287
267359
|
|
|
@@ -267329,7 +267401,7 @@ var script$49 = {
|
|
|
267329
267401
|
*/
|
|
267330
267402
|
rowHref(row) {
|
|
267331
267403
|
const field = this.content?.rowHrefField;
|
|
267332
|
-
const href = field && row ? readPath$
|
|
267404
|
+
const href = field && row ? readPath$a(row, field) : null;
|
|
267333
267405
|
if (typeof href !== 'string' || !/^(\/(?!\/)|https?:\/\/)/i.test(href)) {
|
|
267334
267406
|
return ''
|
|
267335
267407
|
}
|
|
@@ -267339,13 +267411,13 @@ var script$49 = {
|
|
|
267339
267411
|
rowLink(row) {
|
|
267340
267412
|
// `rowRouteField`: the route name read from the row, for a list
|
|
267341
267413
|
// whose rows open different pages (a case and a task).
|
|
267342
|
-
const byField = this.content?.rowRouteField ? readPath$
|
|
267414
|
+
const byField = this.content?.rowRouteField ? readPath$a(row, this.content.rowRouteField) : null;
|
|
267343
267415
|
const route = (typeof byField === 'string' && byField !== '') ? byField : this.content?.rowRoute;
|
|
267344
267416
|
if (!route || !this.$router || !row) {
|
|
267345
267417
|
return null
|
|
267346
267418
|
}
|
|
267347
267419
|
const field = this.content?.rowIdField;
|
|
267348
|
-
const id = field ? readPath$
|
|
267420
|
+
const id = field ? readPath$a(row, field) : (row.id || row['@self']?.id);
|
|
267349
267421
|
if (id === null || id === undefined || id === '' || typeof id === 'object') {
|
|
267350
267422
|
return null
|
|
267351
267423
|
}
|
|
@@ -267366,7 +267438,7 @@ var script$49 = {
|
|
|
267366
267438
|
if (!due || typeof due !== 'object' || !due.field) {
|
|
267367
267439
|
return null
|
|
267368
267440
|
}
|
|
267369
|
-
return resolveDue(readPath$
|
|
267441
|
+
return resolveDue(readPath$a(row, due.field), due, (text) => this.translate(text))
|
|
267370
267442
|
},
|
|
267371
267443
|
|
|
267372
267444
|
/**
|
|
@@ -267492,7 +267564,7 @@ var script$49 = {
|
|
|
267492
267564
|
* @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-a-record-list-can-act-on-its-rows-and-link-onwards
|
|
267493
267565
|
*/
|
|
267494
267566
|
countBadgeOf(row, badge, index) {
|
|
267495
|
-
const raw = readPath$
|
|
267567
|
+
const raw = readPath$a(row, badge.field);
|
|
267496
267568
|
const count = Array.isArray(raw) ? raw.length : Number(raw);
|
|
267497
267569
|
if (!Number.isFinite(count) || count < 1) {
|
|
267498
267570
|
return null
|
|
@@ -267532,7 +267604,7 @@ var script$49 = {
|
|
|
267532
267604
|
if (tone.override && typeof tone.override === 'object' && evaluateVisibleWhenLocal(tone.override.when, row || {})) {
|
|
267533
267605
|
variant = tone.override.tone;
|
|
267534
267606
|
} else {
|
|
267535
|
-
const value = tone.field ? readPath$
|
|
267607
|
+
const value = tone.field ? readPath$a(row, tone.field) : text;
|
|
267536
267608
|
const map = tone.map && typeof tone.map === 'object' ? tone.map : {};
|
|
267537
267609
|
variant = Object.hasOwn(map, String(value)) ? map[String(value)] : tone.default;
|
|
267538
267610
|
}
|
|
@@ -267629,7 +267701,7 @@ var script$49 = {
|
|
|
267629
267701
|
return records
|
|
267630
267702
|
}
|
|
267631
267703
|
return records.flatMap((record) => {
|
|
267632
|
-
const list = readPath$
|
|
267704
|
+
const list = readPath$a(record, path);
|
|
267633
267705
|
return Array.isArray(list)
|
|
267634
267706
|
? list.filter((entry) => entry && typeof entry === 'object').map((entry) => ({ ...entry, '@parent': record }))
|
|
267635
267707
|
: []
|
|
@@ -267682,7 +267754,7 @@ var script$49 = {
|
|
|
267682
267754
|
if (!spec || typeof spec !== 'object' || !spec.field) {
|
|
267683
267755
|
return []
|
|
267684
267756
|
}
|
|
267685
|
-
const list = readPath$
|
|
267757
|
+
const list = readPath$a(row, spec.field);
|
|
267686
267758
|
if (!Array.isArray(list)) {
|
|
267687
267759
|
return []
|
|
267688
267760
|
}
|
|
@@ -267720,7 +267792,7 @@ var script$49 = {
|
|
|
267720
267792
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
267721
267793
|
const found = {};
|
|
267722
267794
|
await Promise.all(refs.map(async (ref) => {
|
|
267723
|
-
const ids = [...new Set(this.rows.map((row) => readPath$
|
|
267795
|
+
const ids = [...new Set(this.rows.map((row) => readPath$a(row, ref.field)).filter((id) => typeof id === 'string' && id !== ''))].slice(0, 50);
|
|
267724
267796
|
found[ref.as] = {};
|
|
267725
267797
|
await Promise.all(ids.map(async (id) => {
|
|
267726
267798
|
try {
|
|
@@ -267739,7 +267811,7 @@ var script$49 = {
|
|
|
267739
267811
|
this.rows = this.rows.map((row) => {
|
|
267740
267812
|
const extra = {};
|
|
267741
267813
|
for (const ref of refs) {
|
|
267742
|
-
const record = found[ref.as]?.[readPath$
|
|
267814
|
+
const record = found[ref.as]?.[readPath$a(row, ref.field)];
|
|
267743
267815
|
if (record) {
|
|
267744
267816
|
extra[ref.as] = record;
|
|
267745
267817
|
}
|
|
@@ -267788,9 +267860,9 @@ var script$49 = {
|
|
|
267788
267860
|
}
|
|
267789
267861
|
const whole = text.match(/^\{([\w.@]+)\}$/);
|
|
267790
267862
|
if (whole) {
|
|
267791
|
-
return readPath$
|
|
267863
|
+
return readPath$a(row, whole[1]) ?? ''
|
|
267792
267864
|
}
|
|
267793
|
-
return text.replace(/\{([\w.@]+)\}/g, (_m, field) => String(readPath$
|
|
267865
|
+
return text.replace(/\{([\w.@]+)\}/g, (_m, field) => String(readPath$a(row, field) ?? ''))
|
|
267794
267866
|
},
|
|
267795
267867
|
|
|
267796
267868
|
/**
|
|
@@ -267803,7 +267875,7 @@ var script$49 = {
|
|
|
267803
267875
|
*/
|
|
267804
267876
|
setFieldDone(action, row) {
|
|
267805
267877
|
const object = this.tokenCtx.object || {};
|
|
267806
|
-
const current = readPath$
|
|
267878
|
+
const current = readPath$a(object, action.field);
|
|
267807
267879
|
const value = this.fillRow(action.value, row);
|
|
267808
267880
|
return Boolean(action.doneLabel) && value !== '' && current !== undefined && current !== null && String(current) === String(value)
|
|
267809
267881
|
},
|
|
@@ -267880,7 +267952,7 @@ var script$49 = {
|
|
|
267880
267952
|
return
|
|
267881
267953
|
}
|
|
267882
267954
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
267883
|
-
const path = interpolateUrlTokens(action.endpoint, this.tokenCtx).replace(/\{([\w.@]+)\}/g, (_match, field) => encodeURIComponent(String(readPath$
|
|
267955
|
+
const path = interpolateUrlTokens(action.endpoint, this.tokenCtx).replace(/\{([\w.@]+)\}/g, (_match, field) => encodeURIComponent(String(readPath$a(row, field) ?? '')));
|
|
267884
267956
|
const method = typeof action.method === 'string' ? action.method.toLowerCase() : 'post';
|
|
267885
267957
|
try {
|
|
267886
267958
|
await axios.request({ method, url: generateUrl(path) });
|
|
@@ -267926,7 +267998,7 @@ var script$49 = {
|
|
|
267926
267998
|
return
|
|
267927
267999
|
}
|
|
267928
268000
|
if (badge.kind === 'stale') {
|
|
267929
|
-
const days = ageInDays(readPath$
|
|
268001
|
+
const days = ageInDays(readPath$a(row, badge.field));
|
|
267930
268002
|
const after = Number(badge.afterDays);
|
|
267931
268003
|
if (days === null || !Number.isFinite(after) || days <= after) {
|
|
267932
268004
|
return
|
|
@@ -267998,7 +268070,7 @@ var script$49 = {
|
|
|
267998
268070
|
if (!pill || typeof pill !== 'object' || !pill.field) {
|
|
267999
268071
|
return null
|
|
268000
268072
|
}
|
|
268001
|
-
const raw = readPath$
|
|
268073
|
+
const raw = readPath$a(row, pill.field);
|
|
268002
268074
|
if (raw === null || raw === undefined || raw === '' || typeof raw === 'object') {
|
|
268003
268075
|
return null
|
|
268004
268076
|
}
|
|
@@ -268014,7 +268086,7 @@ var script$49 = {
|
|
|
268014
268086
|
const rule = Array.isArray(pill.variantWhen)
|
|
268015
268087
|
? pill.variantWhen.find((entry) => entry && entry.when && evaluateVisibleWhenLocal(entry.when, row || {}))
|
|
268016
268088
|
: null;
|
|
268017
|
-
const colour = pill.colorField ? readPath$
|
|
268089
|
+
const colour = pill.colorField ? readPath$a(row, pill.colorField) : null;
|
|
268018
268090
|
const fromRow = typeof colour === 'string' && colour !== '' ? variantForColor(colour) : null;
|
|
268019
268091
|
const variant = rule ? rule.variant : (found ? map[found] : (fromRow || pill.variant));
|
|
268020
268092
|
return {
|
|
@@ -268065,7 +268137,7 @@ var script$49 = {
|
|
|
268065
268137
|
return icon
|
|
268066
268138
|
}
|
|
268067
268139
|
if (icon && typeof icon === 'object') {
|
|
268068
|
-
const raw = icon.field ? readPath$
|
|
268140
|
+
const raw = icon.field ? readPath$a(row, icon.field) : undefined;
|
|
268069
268141
|
const map = icon.map && typeof icon.map === 'object' ? icon.map : {};
|
|
268070
268142
|
if (raw !== null && raw !== undefined && map[String(raw)]) {
|
|
268071
268143
|
return map[String(raw)]
|
|
@@ -323799,7 +323871,7 @@ function footerNoteForView(byView, view, footerNote) {
|
|
|
323799
323871
|
* @param {string} path The dot-path.
|
|
323800
323872
|
* @return {unknown} The value, or undefined.
|
|
323801
323873
|
*/
|
|
323802
|
-
function readPath$
|
|
323874
|
+
function readPath$3(row, path) {
|
|
323803
323875
|
return String(path).split('.').reduce((value, key) => (value && typeof value === 'object' ? value[key] : undefined), row)
|
|
323804
323876
|
}
|
|
323805
323877
|
|
|
@@ -323838,11 +323910,11 @@ async function labelsByField(source, get) {
|
|
|
323838
323910
|
}
|
|
323839
323911
|
const out = {};
|
|
323840
323912
|
for (const row of rows) {
|
|
323841
|
-
const key = readPath$
|
|
323913
|
+
const key = readPath$3(row, s.field);
|
|
323842
323914
|
if (key === undefined || key === null || !values.includes(String(key))) {
|
|
323843
323915
|
continue
|
|
323844
323916
|
}
|
|
323845
|
-
const label = (s.labelField ? readPath$
|
|
323917
|
+
const label = (s.labelField ? readPath$3(row, s.labelField) : undefined) ?? row?.title ?? row?.name;
|
|
323846
323918
|
if (label !== undefined && label !== null && String(label) !== '') {
|
|
323847
323919
|
out[String(key)] = String(label);
|
|
323848
323920
|
}
|
|
@@ -324178,7 +324250,7 @@ function mapListItems(rows, spec, { rowKey, located, translate = (text) => text,
|
|
|
324178
324250
|
if (!pill || typeof pill !== 'object') {
|
|
324179
324251
|
return null
|
|
324180
324252
|
}
|
|
324181
|
-
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$
|
|
324253
|
+
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$a(row, pill.path) : undefined;
|
|
324182
324254
|
const formatter = typeof pill.formatter === 'string' && formatters ? formatters[pill.formatter] : null;
|
|
324183
324255
|
const formatted = typeof formatter === 'function' && (typeof raw === 'string' || typeof raw === 'number') && raw !== '' ? formatter(raw, row) : undefined;
|
|
324184
324256
|
const mapped = pill.map && (typeof raw === 'string' || typeof raw === 'number') && Object.hasOwn(pill.map, raw) ? pill.map[raw] : formatted;
|
|
@@ -326257,7 +326329,7 @@ function reverseSortKeys(keys) {
|
|
|
326257
326329
|
* @spec openspec/changes/sidebar-sort-source/specs/index-page/spec.md#requirement-a-sort-option-can-take-its-rows-from-an-endpoint
|
|
326258
326330
|
*/
|
|
326259
326331
|
function rowsFromSourceBody(body, source = {}) {
|
|
326260
|
-
const entries = Array.isArray(body) ? body : readPath$
|
|
326332
|
+
const entries = Array.isArray(body) ? body : readPath$a(body, source.rowsPath || 'results');
|
|
326261
326333
|
if (!Array.isArray(entries)) {
|
|
326262
326334
|
return []
|
|
326263
326335
|
}
|
|
@@ -326267,7 +326339,7 @@ function rowsFromSourceBody(body, source = {}) {
|
|
|
326267
326339
|
if (!entry || typeof entry !== 'object') {
|
|
326268
326340
|
continue
|
|
326269
326341
|
}
|
|
326270
|
-
const row = source.rowPath ? readPath$
|
|
326342
|
+
const row = source.rowPath ? readPath$a(entry, source.rowPath) : entry;
|
|
326271
326343
|
if (!row || typeof row !== 'object' || Array.isArray(row)) {
|
|
326272
326344
|
continue
|
|
326273
326345
|
}
|
|
@@ -326295,7 +326367,7 @@ function rowsFromSourceBody(body, source = {}) {
|
|
|
326295
326367
|
* @return {unknown} The value.
|
|
326296
326368
|
*/
|
|
326297
326369
|
function fieldOf(row, key) {
|
|
326298
|
-
const value = readPath$
|
|
326370
|
+
const value = readPath$a(row, key);
|
|
326299
326371
|
if (value !== undefined) {
|
|
326300
326372
|
return value
|
|
326301
326373
|
}
|
|
@@ -326415,7 +326487,7 @@ function annotateRows(rows, sourceRows, source = {}) {
|
|
|
326415
326487
|
}
|
|
326416
326488
|
const idPath = source.idPath || 'id';
|
|
326417
326489
|
const idOf = (row) => {
|
|
326418
|
-
const id = readPath$
|
|
326490
|
+
const id = readPath$a(row, idPath) ?? (row && row['@self'] ? row['@self'].id : undefined);
|
|
326419
326491
|
return id === undefined || id === null ? '' : String(id)
|
|
326420
326492
|
};
|
|
326421
326493
|
const byId = new Map();
|
|
@@ -328691,7 +328763,7 @@ function dueStateForRow(row, rule, now = new Date()) {
|
|
|
328691
328763
|
if (!rule || typeof rule.field !== 'string' || rule.field === '' || !row) {
|
|
328692
328764
|
return null
|
|
328693
328765
|
}
|
|
328694
|
-
return dueStateOf(readPath$
|
|
328766
|
+
return dueStateOf(readPath$a(row, rule.field), rule, now)
|
|
328695
328767
|
}
|
|
328696
328768
|
|
|
328697
328769
|
/**
|
|
@@ -329135,7 +329207,7 @@ var script$3p = {
|
|
|
329135
329207
|
},
|
|
329136
329208
|
|
|
329137
329209
|
methods: {
|
|
329138
|
-
readPath: readPath$
|
|
329210
|
+
readPath: readPath$a,
|
|
329139
329211
|
|
|
329140
329212
|
/**
|
|
329141
329213
|
* A card action was picked: tell the host, as a row action does.
|
|
@@ -329431,7 +329503,7 @@ var script$3p = {
|
|
|
329431
329503
|
* @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-card-field-can-show-through-a-formatter
|
|
329432
329504
|
*/
|
|
329433
329505
|
fieldText(card, field) {
|
|
329434
|
-
const raw = readPath$
|
|
329506
|
+
const raw = readPath$a(card, field);
|
|
329435
329507
|
const id = this.roles.formatters[field];
|
|
329436
329508
|
const fn = id && this.cnFormatters ? this.cnFormatters[id] : null;
|
|
329437
329509
|
if (typeof fn === 'function') {
|
|
@@ -329501,7 +329573,7 @@ var script$3p = {
|
|
|
329501
329573
|
if (!given || !given.resolve || !this.roles.pill || !this.pillLooks) {
|
|
329502
329574
|
return {}
|
|
329503
329575
|
}
|
|
329504
|
-
const raw = readPath$
|
|
329576
|
+
const raw = readPath$a(card, this.roles.pill);
|
|
329505
329577
|
const looks = this.pillLooks[this.roles.pill];
|
|
329506
329578
|
return pillLook(looks && raw !== null && raw !== undefined && typeof raw !== 'object' ? looks[String(raw)] : null)
|
|
329507
329579
|
},
|
|
@@ -329517,7 +329589,7 @@ var script$3p = {
|
|
|
329517
329589
|
if (this.roles.due === '') {
|
|
329518
329590
|
return ''
|
|
329519
329591
|
}
|
|
329520
|
-
const value = readPath$
|
|
329592
|
+
const value = readPath$a(card, this.roles.due);
|
|
329521
329593
|
const days = daysUntil(value, this.today);
|
|
329522
329594
|
if (days === null) {
|
|
329523
329595
|
return ''
|
|
@@ -329582,7 +329654,7 @@ var script$3p = {
|
|
|
329582
329654
|
return ''
|
|
329583
329655
|
}
|
|
329584
329656
|
const total = column.cards.reduce((sum, card) => {
|
|
329585
|
-
const n = Number(readPath$
|
|
329657
|
+
const n = Number(readPath$a(card, this.sumField));
|
|
329586
329658
|
return Number.isFinite(n) ? sum + n : sum
|
|
329587
329659
|
}, 0);
|
|
329588
329660
|
return formatMetricValue(total, this.sumFormat || { style: 'decimal', decimals: 0 }, {})
|
|
@@ -332281,7 +332353,7 @@ var script$3k = {
|
|
|
332281
332353
|
|
|
332282
332354
|
computed: {
|
|
332283
332355
|
title() {
|
|
332284
|
-
return String(readPath$
|
|
332356
|
+
return String(readPath$a(this.object, this.layout.title || 'title') ?? '')
|
|
332285
332357
|
},
|
|
332286
332358
|
|
|
332287
332359
|
badge() {
|
|
@@ -332293,7 +332365,7 @@ var script$3k = {
|
|
|
332293
332365
|
},
|
|
332294
332366
|
|
|
332295
332367
|
description() {
|
|
332296
|
-
return this.layout.description ? String(readPath$
|
|
332368
|
+
return this.layout.description ? String(readPath$a(this.object, this.layout.description) ?? '') : ''
|
|
332297
332369
|
},
|
|
332298
332370
|
|
|
332299
332371
|
chips() {
|
|
@@ -332301,7 +332373,7 @@ var script$3k = {
|
|
|
332301
332373
|
if (!def || !def.field) {
|
|
332302
332374
|
return []
|
|
332303
332375
|
}
|
|
332304
|
-
const items = readPath$
|
|
332376
|
+
const items = readPath$a(this.object, def.field);
|
|
332305
332377
|
if (!Array.isArray(items)) {
|
|
332306
332378
|
return []
|
|
332307
332379
|
}
|
|
@@ -332309,7 +332381,7 @@ var script$3k = {
|
|
|
332309
332381
|
.map((item, index) => {
|
|
332310
332382
|
const label = def.each && def.each.includes('{')
|
|
332311
332383
|
? fillTemplate(this.tr(def.each), item || {})
|
|
332312
|
-
: String(readPath$
|
|
332384
|
+
: String(readPath$a(item || {}, def.each || 'name') ?? '');
|
|
332313
332385
|
const tone = toneOf(def.tones, item);
|
|
332314
332386
|
const variant = tone ? tone.variant : def.variant;
|
|
332315
332387
|
return { key: def.field + '.' + index, label, variant: isBadgeVariant(variant) ? variant : 'default' }
|
|
@@ -332342,7 +332414,7 @@ var script$3k = {
|
|
|
332342
332414
|
},
|
|
332343
332415
|
|
|
332344
332416
|
tableRows() {
|
|
332345
|
-
const rows = this.table ? readPath$
|
|
332417
|
+
const rows = this.table ? readPath$a(this.object, this.table.field) : null;
|
|
332346
332418
|
return Array.isArray(rows) ? rows : []
|
|
332347
332419
|
},
|
|
332348
332420
|
|
|
@@ -332396,7 +332468,7 @@ var script$3k = {
|
|
|
332396
332468
|
|
|
332397
332469
|
methods: {
|
|
332398
332470
|
t: l10n.translate,
|
|
332399
|
-
readPath: readPath$
|
|
332471
|
+
readPath: readPath$a,
|
|
332400
332472
|
|
|
332401
332473
|
/**
|
|
332402
332474
|
* @param {string} text Text in the host's source language.
|
|
@@ -332428,7 +332500,7 @@ var script$3k = {
|
|
|
332428
332500
|
if (column.template) {
|
|
332429
332501
|
return fillTemplate(this.tr(column.template), entry || {})
|
|
332430
332502
|
}
|
|
332431
|
-
const value = column.key ? readPath$
|
|
332503
|
+
const value = column.key ? readPath$a(entry || {}, column.key) : '';
|
|
332432
332504
|
return value === null || value === undefined ? '' : String(value)
|
|
332433
332505
|
},
|
|
332434
332506
|
|
|
@@ -332480,7 +332552,7 @@ var script$3k = {
|
|
|
332480
332552
|
return this.percent(row.entry, column)
|
|
332481
332553
|
}
|
|
332482
332554
|
if (column.as === 'check' || column.as === 'yesNo') {
|
|
332483
|
-
return readPath$
|
|
332555
|
+
return readPath$a(row.entry || {}, column.key) ? 1 : 0
|
|
332484
332556
|
}
|
|
332485
332557
|
return this.displayValue(row, column)
|
|
332486
332558
|
},
|
|
@@ -332498,9 +332570,9 @@ var script$3k = {
|
|
|
332498
332570
|
case 'bar':
|
|
332499
332571
|
return this.percent(entry, column) + '%'
|
|
332500
332572
|
case 'check':
|
|
332501
|
-
return readPath$
|
|
332573
|
+
return readPath$a(entry || {}, column.key) ? this.tr(column.text || '') || l10n.translate('nextcloud-vue', 'Yes') : ''
|
|
332502
332574
|
case 'yesNo':
|
|
332503
|
-
return readPath$
|
|
332575
|
+
return readPath$a(entry || {}, column.key) ? l10n.translate('nextcloud-vue', 'Yes') : l10n.translate('nextcloud-vue', 'No')
|
|
332504
332576
|
case 'pill': {
|
|
332505
332577
|
const pill = this.pillOf(entry, column);
|
|
332506
332578
|
return pill ? pill.label : ''
|
|
@@ -332633,7 +332705,7 @@ var script$3k = {
|
|
|
332633
332705
|
* @return {number} The value as a whole percentage from 0 to 100.
|
|
332634
332706
|
*/
|
|
332635
332707
|
percent(entry, column) {
|
|
332636
|
-
const value = Number(readPath$
|
|
332708
|
+
const value = Number(readPath$a(entry || {}, column.key));
|
|
332637
332709
|
return Number.isFinite(value) ? Math.max(0, Math.min(100, Math.round(value))) : 0
|
|
332638
332710
|
},
|
|
332639
332711
|
|
|
@@ -333239,7 +333311,7 @@ async function listChildren(davRoot, relPath, depth) {
|
|
|
333239
333311
|
const nodes = [];
|
|
333240
333312
|
|
|
333241
333313
|
for (const res of responses) {
|
|
333242
|
-
const href = text(res, 'href');
|
|
333314
|
+
const href = text$1(res, 'href');
|
|
333243
333315
|
if (!href) {
|
|
333244
333316
|
continue
|
|
333245
333317
|
}
|
|
@@ -333276,7 +333348,7 @@ async function listChildren(davRoot, relPath, depth) {
|
|
|
333276
333348
|
* @param {string} local The local (namespace-less) tag name.
|
|
333277
333349
|
* @return {string} The text content, or ''.
|
|
333278
333350
|
*/
|
|
333279
|
-
function text(parent, local) {
|
|
333351
|
+
function text$1(parent, local) {
|
|
333280
333352
|
const el = parent.getElementsByTagNameNS('DAV:', local)[0];
|
|
333281
333353
|
return el ? el.textContent : ''
|
|
333282
333354
|
}
|
|
@@ -340225,7 +340297,7 @@ var script$38 = {
|
|
|
340225
340297
|
*/
|
|
340226
340298
|
subtitlePart(token) {
|
|
340227
340299
|
const [key, name] = token.split('|').map((part) => part.trim());
|
|
340228
|
-
const value = readPath$
|
|
340300
|
+
const value = readPath$a(this.object, key);
|
|
340229
340301
|
const format = name && this.cnFormatters ? this.cnFormatters[name] : null;
|
|
340230
340302
|
if (typeof format === 'function') {
|
|
340231
340303
|
const shown = format(value, this.object);
|
|
@@ -340241,7 +340313,7 @@ var script$38 = {
|
|
|
340241
340313
|
* @return {unknown} The value.
|
|
340242
340314
|
*/
|
|
340243
340315
|
cellValue(cell) {
|
|
340244
|
-
return readPath$
|
|
340316
|
+
return readPath$a(this.object, cell.key)
|
|
340245
340317
|
},
|
|
340246
340318
|
|
|
340247
340319
|
/**
|
|
@@ -343920,7 +343992,7 @@ function resolveActionHandler(action, ctx) {
|
|
|
343920
343992
|
}
|
|
343921
343993
|
return (row) => ctx.openModal(action.target, {
|
|
343922
343994
|
object: row,
|
|
343923
|
-
objectId: row && ctx.rowKey ? readPath$
|
|
343995
|
+
objectId: row && ctx.rowKey ? readPath$a(row, ctx.rowKey) : undefined,
|
|
343924
343996
|
...(action.props && typeof action.props === 'object' ? action.props : {}),
|
|
343925
343997
|
})
|
|
343926
343998
|
}
|
|
@@ -343929,7 +344001,7 @@ function resolveActionHandler(action, ctx) {
|
|
|
343929
344001
|
if (type === 'api-call') {
|
|
343930
344002
|
return async (row) => {
|
|
343931
344003
|
const { value: url } = resolveRowToken(action.url, row);
|
|
343932
|
-
const objectId = row && ctx.rowKey ? readPath$
|
|
344004
|
+
const objectId = row && ctx.rowKey ? readPath$a(row, ctx.rowKey) : undefined;
|
|
343933
344005
|
const result = await dispatchAction$1({ ...action, url, refresh: false }, {
|
|
343934
344006
|
translate: ctx.translate,
|
|
343935
344007
|
tokenCtx: { objectId, object: row },
|
|
@@ -346344,6 +346416,21 @@ var script$2Y = {
|
|
|
346344
346416
|
default: null,
|
|
346345
346417
|
},
|
|
346346
346418
|
|
|
346419
|
+
/**
|
|
346420
|
+
* Text added to the count line after a middle dot while a quick filter
|
|
346421
|
+
* or lens is selected (manifest `config.countSuffixByFilter`),
|
|
346422
|
+
* `{ <tab id or label>: text }`: a lens that sorts by waiting time
|
|
346423
|
+
* says "longest waiting first". A quick filter tab can also carry
|
|
346424
|
+
* its own `countSuffix`, which comes first. The text goes through the
|
|
346425
|
+
* host translate function. Null (the default) adds nothing.
|
|
346426
|
+
*
|
|
346427
|
+
* @spec openspec/changes/index-count-suffix-per-filter/specs/index-page/spec.md#requirement-the-count-line-can-say-what-the-selected-quick-filter-does
|
|
346428
|
+
*/
|
|
346429
|
+
countSuffixByFilter: {
|
|
346430
|
+
type: Object,
|
|
346431
|
+
default: null,
|
|
346432
|
+
},
|
|
346433
|
+
|
|
346347
346434
|
/**
|
|
346348
346435
|
* The property keys the card's facts list shows, in order (manifest key
|
|
346349
346436
|
* `config.cardFields`). Without it the board look shows the first four
|
|
@@ -353262,7 +353349,8 @@ var script$2Y = {
|
|
|
353262
353349
|
* @return {string}
|
|
353263
353350
|
*/
|
|
353264
353351
|
headerDescription() {
|
|
353265
|
-
const
|
|
353352
|
+
const suffix = this.quickFilterCountSuffix;
|
|
353353
|
+
const base = suffix && this.headerDescriptionBase ? `${this.headerDescriptionBase} · ${suffix}` : this.headerDescriptionBase;
|
|
353266
353354
|
if (this.currentViewMode !== 'map' || !this.mapListEnabled) {
|
|
353267
353355
|
return base
|
|
353268
353356
|
}
|
|
@@ -353284,6 +353372,29 @@ var script$2Y = {
|
|
|
353284
353372
|
return active || this.quickFilterNarrows
|
|
353285
353373
|
},
|
|
353286
353374
|
|
|
353375
|
+
/**
|
|
353376
|
+
* The count line text of the selected quick filters or lenses: each
|
|
353377
|
+
* tab's `countSuffix`, else its entry in `countSuffixByFilter` (by
|
|
353378
|
+
* id, then by label), translated and joined by a middle dot.
|
|
353379
|
+
*
|
|
353380
|
+
* @return {string}
|
|
353381
|
+
* @spec openspec/changes/index-count-suffix-per-filter/specs/index-page/spec.md#requirement-the-count-line-can-say-what-the-selected-quick-filter-does
|
|
353382
|
+
*/
|
|
353383
|
+
quickFilterCountSuffix() {
|
|
353384
|
+
const tabs = this.tabStripEntries || [];
|
|
353385
|
+
const byFilter = this.countSuffixByFilter && typeof this.countSuffixByFilter === 'object' ? this.countSuffixByFilter : {};
|
|
353386
|
+
const indices = this.quickFilterMultiple
|
|
353387
|
+
? (this.selectedQuickFilterIndices || [])
|
|
353388
|
+
: [this.activeQuickFilterIndex];
|
|
353389
|
+
return indices
|
|
353390
|
+
.map((index) => (typeof index === 'number' ? tabs[index] : null))
|
|
353391
|
+
.filter(Boolean)
|
|
353392
|
+
.map((tab) => [tab.countSuffix, byFilter[tab.id], byFilter[tab.label]].find((text) => typeof text === 'string' && text !== ''))
|
|
353393
|
+
.filter(Boolean)
|
|
353394
|
+
.map((text) => this.cnTranslate(text))
|
|
353395
|
+
.join(' · ')
|
|
353396
|
+
},
|
|
353397
|
+
|
|
353287
353398
|
/**
|
|
353288
353399
|
* Whether a selected quick filter tab carries a filter (an "All" tab
|
|
353289
353400
|
* does not).
|
|
@@ -364293,7 +364404,7 @@ var script$2M = {
|
|
|
364293
364404
|
return ''
|
|
364294
364405
|
}
|
|
364295
364406
|
const source = match[1] === 'object' ? this.tokenCtx.object : unwrap(this.cnDetailVisibilityRows);
|
|
364296
|
-
const value = source ? readPath$
|
|
364407
|
+
const value = source ? readPath$a(source, match[2]) : '';
|
|
364297
364408
|
return typeof value === 'string' ? value.trim() : ''
|
|
364298
364409
|
}
|
|
364299
364410
|
if (!from || typeof from !== 'object' || !from.register || !from.schema || !from.path) {
|
|
@@ -364311,7 +364422,7 @@ var script$2M = {
|
|
|
364311
364422
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
364312
364423
|
const { data } = await axios.get(generateUrl('/apps/openregister/api/objects/{register}/{schema}', { register: from.register, schema: from.schema }), { params });
|
|
364313
364424
|
const first = data && Array.isArray(data.results) ? data.results[0] : null;
|
|
364314
|
-
const value = first ? readPath$
|
|
364425
|
+
const value = first ? readPath$a(first, from.path) : '';
|
|
364315
364426
|
return typeof value === 'string' ? value.trim() : ''
|
|
364316
364427
|
},
|
|
364317
364428
|
|
|
@@ -366350,7 +366461,7 @@ var script$2H = {
|
|
|
366350
366461
|
if (typeof path !== 'string' || path === '' || !this.objectData) {
|
|
366351
366462
|
return []
|
|
366352
366463
|
}
|
|
366353
|
-
const raw = readPath$
|
|
366464
|
+
const raw = readPath$a(this.objectData, path);
|
|
366354
366465
|
if (!Array.isArray(raw)) {
|
|
366355
366466
|
return []
|
|
366356
366467
|
}
|
|
@@ -366379,7 +366490,7 @@ var script$2H = {
|
|
|
366379
366490
|
if (!config || typeof config !== 'object' || typeof config.path !== 'string' || !this.objectData) {
|
|
366380
366491
|
return null
|
|
366381
366492
|
}
|
|
366382
|
-
const stored = readPath$
|
|
366493
|
+
const stored = readPath$a(this.objectData, config.path);
|
|
366383
366494
|
if (!stored || typeof stored !== 'object') {
|
|
366384
366495
|
return null
|
|
366385
366496
|
}
|
|
@@ -367907,7 +368018,7 @@ function newPartyRecord(create, values) {
|
|
|
367907
368018
|
continue
|
|
367908
368019
|
}
|
|
367909
368020
|
if (field.address && field.address.path) {
|
|
367910
|
-
const list = readPath$
|
|
368021
|
+
const list = readPath$a(record, field.address.path);
|
|
367911
368022
|
const entry = { kind: field.address.kind || 'correspondence', type: field.address.type || 'email', value };
|
|
367912
368023
|
writePath(record, field.address.path, [...(Array.isArray(list) ? list : []), entry]);
|
|
367913
368024
|
continue
|
|
@@ -367916,7 +368027,7 @@ function newPartyRecord(create, values) {
|
|
|
367916
368027
|
}
|
|
367917
368028
|
for (const [target, paths] of Object.entries(create?.compose && typeof create.compose === 'object' ? create.compose : {})) {
|
|
367918
368029
|
const joined = (Array.isArray(paths) ? paths : [])
|
|
367919
|
-
.map((path) => String(readPath$
|
|
368030
|
+
.map((path) => String(readPath$a(record, path) ?? '').trim())
|
|
367920
368031
|
.filter((part) => part !== '')
|
|
367921
368032
|
.join(' ');
|
|
367922
368033
|
if (joined !== '') {
|
|
@@ -368673,7 +368784,7 @@ var script$2E = {
|
|
|
368673
368784
|
}
|
|
368674
368785
|
const answers = await Promise.all(uuids.map((uuid) => this.read(this.urlOf(spec.endpoint, uuid))));
|
|
368675
368786
|
uuids.forEach((uuid, i) => {
|
|
368676
|
-
const answer = spec.path ? readPath$
|
|
368787
|
+
const answer = spec.path ? readPath$a(answers[i], spec.path) : answers[i];
|
|
368677
368788
|
if (answer && typeof answer === 'object') {
|
|
368678
368789
|
extra[`${index}|${uuid}`] = answer;
|
|
368679
368790
|
}
|
|
@@ -368689,7 +368800,7 @@ var script$2E = {
|
|
|
368689
368800
|
return
|
|
368690
368801
|
}
|
|
368691
368802
|
const data = await this.read(this.urlOf(spec.endpoint));
|
|
368692
|
-
const list = spec.path ? readPath$
|
|
368803
|
+
const list = spec.path ? readPath$a(data, spec.path) : data;
|
|
368693
368804
|
this.documents = Array.isArray(list) ? list : [];
|
|
368694
368805
|
},
|
|
368695
368806
|
|
|
@@ -371972,7 +372083,8 @@ function numberIn(raw) {
|
|
|
371972
372083
|
|
|
371973
372084
|
/**
|
|
371974
372085
|
* CnDataMatrix — Inline-edit data grid for matrix-shaped data
|
|
371975
|
-
* (rows × columns). Each cell is click-to-edit
|
|
372086
|
+
* (rows × columns). Each cell is click-to-edit, and keyboard editable:
|
|
372087
|
+
* Tab reaches it, Enter or F2 opens it, Enter commits, Escape cancels. Commits emit
|
|
371976
372088
|
* `@cell-edit({ rowId, colKey, value })` so the parent can persist.
|
|
371977
372089
|
* Optional row / column / grand totals computed from the live data
|
|
371978
372090
|
* with the column's `aggregate` setting (`sum` by default).
|
|
@@ -372184,6 +372296,97 @@ var script$2B = {
|
|
|
372184
372296
|
return Boolean(col.readOnly || col.formula)
|
|
372185
372297
|
},
|
|
372186
372298
|
|
|
372299
|
+
/**
|
|
372300
|
+
* Whether a cell can be edited, and so takes keyboard focus.
|
|
372301
|
+
*
|
|
372302
|
+
* @param {object} row Row record.
|
|
372303
|
+
* @param {object} col Column definition.
|
|
372304
|
+
* @return {boolean}
|
|
372305
|
+
*/
|
|
372306
|
+
isCellEditable(row, col) {
|
|
372307
|
+
return !this.readOnly && !this.isCellReadOnly(row, col)
|
|
372308
|
+
},
|
|
372309
|
+
|
|
372310
|
+
/**
|
|
372311
|
+
* Accessible name of a cell's input: its column and row.
|
|
372312
|
+
*
|
|
372313
|
+
* @param {object} row Row record.
|
|
372314
|
+
* @param {object} col Column definition.
|
|
372315
|
+
* @return {string} The label.
|
|
372316
|
+
*/
|
|
372317
|
+
inputLabel(row, col) {
|
|
372318
|
+
return l10n.translate('nextcloud-vue', '{column}, {row}', {
|
|
372319
|
+
column: col.label || col.key,
|
|
372320
|
+
row: row[this.rowLabelKey] ?? row[this.rowIdKey],
|
|
372321
|
+
}, undefined, { escape: false })
|
|
372322
|
+
},
|
|
372323
|
+
|
|
372324
|
+
/**
|
|
372325
|
+
* Accessible name of an editable cell: its column, row and value.
|
|
372326
|
+
*
|
|
372327
|
+
* @param {object} row Row record.
|
|
372328
|
+
* @param {object} col Column definition.
|
|
372329
|
+
* @return {string} The label.
|
|
372330
|
+
*/
|
|
372331
|
+
cellLabel(row, col) {
|
|
372332
|
+
const value = this.formatCell(this.cellValue(row, col), col);
|
|
372333
|
+
const vars = { cell: this.inputLabel(row, col), value: String(value) };
|
|
372334
|
+
return value === ''
|
|
372335
|
+
? l10n.translate('nextcloud-vue', '{cell}: empty', vars, undefined, { escape: false })
|
|
372336
|
+
: l10n.translate('nextcloud-vue', '{cell}: {value}', vars, undefined, { escape: false })
|
|
372337
|
+
},
|
|
372338
|
+
|
|
372339
|
+
/**
|
|
372340
|
+
* Enter or F2 on a focused cell starts editing it.
|
|
372341
|
+
*
|
|
372342
|
+
* @param {KeyboardEvent} event The key event.
|
|
372343
|
+
* @param {object} row Row record.
|
|
372344
|
+
* @param {object} col Column definition.
|
|
372345
|
+
* @return {void}
|
|
372346
|
+
*/
|
|
372347
|
+
onCellKeydown(event, row, col) {
|
|
372348
|
+
if ((event.key === 'Enter' || event.key === 'F2') && this.isCellEditable(row, col)) {
|
|
372349
|
+
event.preventDefault();
|
|
372350
|
+
this.startEdit(row, col);
|
|
372351
|
+
}
|
|
372352
|
+
},
|
|
372353
|
+
|
|
372354
|
+
/**
|
|
372355
|
+
* Enter commits and Escape cancels the edit; both return focus to the cell.
|
|
372356
|
+
*
|
|
372357
|
+
* @param {KeyboardEvent} event The key event.
|
|
372358
|
+
* @param {object} row Row record.
|
|
372359
|
+
* @param {object} col Column definition.
|
|
372360
|
+
* @return {void}
|
|
372361
|
+
*/
|
|
372362
|
+
onInputKeydown(event, row, col) {
|
|
372363
|
+
if (event.key === 'Enter') {
|
|
372364
|
+
event.preventDefault();
|
|
372365
|
+
this.commitEdit(row, col, event.target.value);
|
|
372366
|
+
this.focusCell(row, col);
|
|
372367
|
+
} else if (event.key === 'Escape' || event.key === 'Esc') {
|
|
372368
|
+
event.preventDefault();
|
|
372369
|
+
this.cancelEdit();
|
|
372370
|
+
this.focusCell(row, col);
|
|
372371
|
+
}
|
|
372372
|
+
},
|
|
372373
|
+
|
|
372374
|
+
/**
|
|
372375
|
+
* Move focus to a cell's value after the edit input is gone.
|
|
372376
|
+
*
|
|
372377
|
+
* @param {object} row Row record.
|
|
372378
|
+
* @param {object} col Column definition.
|
|
372379
|
+
* @return {void}
|
|
372380
|
+
*/
|
|
372381
|
+
focusCell(row, col) {
|
|
372382
|
+
const rowId = String(row[this.rowIdKey]);
|
|
372383
|
+
this.$nextTick(() => {
|
|
372384
|
+
const cell = Array.from(this.$el.querySelectorAll('.cn-data-matrix__cell'))
|
|
372385
|
+
.find((td) => td.dataset.rowId === rowId && td.dataset.colKey === col.key);
|
|
372386
|
+
cell?.querySelector('.cn-data-matrix__cell-value')?.focus();
|
|
372387
|
+
});
|
|
372388
|
+
},
|
|
372389
|
+
|
|
372187
372390
|
/**
|
|
372188
372391
|
* Read the cell value from the row.
|
|
372189
372392
|
*
|
|
@@ -372442,8 +372645,8 @@ const _hoisted_12$Y = {
|
|
|
372442
372645
|
class: "cn-data-matrix__row-sublabel"
|
|
372443
372646
|
};
|
|
372444
372647
|
const _hoisted_13$P = ["data-row-id", "data-col-key"];
|
|
372445
|
-
const _hoisted_14$O = ["value", "disabled", "onBlur", "onKeydown"];
|
|
372446
|
-
const _hoisted_15$K = ["onClick"];
|
|
372648
|
+
const _hoisted_14$O = ["value", "aria-label", "disabled", "onBlur", "onKeydown"];
|
|
372649
|
+
const _hoisted_15$K = ["tabindex", "role", "aria-label", "onClick", "onKeydown"];
|
|
372447
372650
|
const _hoisted_16$F = {
|
|
372448
372651
|
key: 1,
|
|
372449
372652
|
class: "cn-data-matrix__total-cell"
|
|
@@ -372546,18 +372749,20 @@ function render$2A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
372546
372749
|
type: "text",
|
|
372547
372750
|
class: "cn-data-matrix__cell-input",
|
|
372548
372751
|
value: $options.cellValue(row, col),
|
|
372752
|
+
"aria-label": $options.inputLabel(row, col),
|
|
372549
372753
|
disabled: $props.readOnly || $options.isCellReadOnly(row, col),
|
|
372550
372754
|
onBlur: $event => ($options.commitEdit(row, col, $event.target.value)),
|
|
372551
|
-
onKeydown:
|
|
372552
|
-
vue$1.withKeys($event => ($options.commitEdit(row, col, $event.target.value)), ["enter"]),
|
|
372553
|
-
_cache[0] || (_cache[0] = vue$1.withKeys((...args) => ($options.cancelEdit && $options.cancelEdit(...args)), ["esc"]))
|
|
372554
|
-
]
|
|
372755
|
+
onKeydown: $event => ($options.onInputKeydown($event, row, col))
|
|
372555
372756
|
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_14$O))
|
|
372556
372757
|
: (vue$1.openBlock(), vue$1.createElementBlock("span", {
|
|
372557
372758
|
key: 1,
|
|
372558
372759
|
class: "cn-data-matrix__cell-value",
|
|
372559
|
-
|
|
372560
|
-
|
|
372760
|
+
tabindex: $options.isCellEditable(row, col) ? 0 : null,
|
|
372761
|
+
role: $options.isCellEditable(row, col) ? 'button' : null,
|
|
372762
|
+
"aria-label": $options.isCellEditable(row, col) ? $options.cellLabel(row, col) : null,
|
|
372763
|
+
onClick: $event => ($options.startEdit(row, col)),
|
|
372764
|
+
onKeydown: $event => ($options.onCellKeydown($event, row, col))
|
|
372765
|
+
}, vue$1.toDisplayString($options.formatCell($options.cellValue(row, col), col)), 41 /* TEXT, PROPS, NEED_HYDRATION */, _hoisted_15$K))
|
|
372561
372766
|
], 10 /* CLASS, PROPS */, _hoisted_13$P))
|
|
372562
372767
|
}), 128 /* KEYED_FRAGMENT */)),
|
|
372563
372768
|
($props.showRowTotals)
|
|
@@ -372597,7 +372802,7 @@ function render$2A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
372597
372802
|
}
|
|
372598
372803
|
|
|
372599
372804
|
script$2B.render = render$2A;
|
|
372600
|
-
script$2B.__scopeId = "data-v-
|
|
372805
|
+
script$2B.__scopeId = "data-v-7c401d14";
|
|
372601
372806
|
const __sfc_main$2B = script$2B;
|
|
372602
372807
|
|
|
372603
372808
|
/**
|
|
@@ -373994,7 +374199,7 @@ var script$2w = {
|
|
|
373994
374199
|
this.loading = true;
|
|
373995
374200
|
try {
|
|
373996
374201
|
const { data } = await axios$1.get(this.url(this.statusUrl));
|
|
373997
|
-
this.exists = readPath$
|
|
374202
|
+
this.exists = readPath$a(data || {}, this.statusPath) === true;
|
|
373998
374203
|
} catch {
|
|
373999
374204
|
this.error = l10n.translate('nextcloud-vue', 'The address could not be read.');
|
|
374000
374205
|
} finally {
|
|
@@ -374015,9 +374220,9 @@ var script$2w = {
|
|
|
374015
374220
|
try {
|
|
374016
374221
|
const method = String(this.createMethod).toUpperCase() === 'PUT' ? 'put' : 'post';
|
|
374017
374222
|
const { data } = await axios$1[method](this.url(this.createUrl));
|
|
374018
|
-
this.address = String(readPath$
|
|
374223
|
+
this.address = String(readPath$a(data || {}, this.addressPath) ?? '');
|
|
374019
374224
|
this.links = this.extraLinks
|
|
374020
|
-
.map((link) => ({ href: this.linkHref(readPath$
|
|
374225
|
+
.map((link) => ({ href: this.linkHref(readPath$a(data || {}, link.path)), label: this.tr(link.label || '') }))
|
|
374021
374226
|
.filter((link) => link.href !== '' && link.label !== '');
|
|
374022
374227
|
this.exists = this.address !== '';
|
|
374023
374228
|
this.revoked = false;
|
|
@@ -375237,7 +375442,7 @@ var script$2s = {
|
|
|
375237
375442
|
this.uploadError = '';
|
|
375238
375443
|
try {
|
|
375239
375444
|
const response = await axios$1.post(prefixUrl(this.field.uploadUrl), form);
|
|
375240
|
-
const fromAnswer = this.field.uploadValuePath ? readPath$
|
|
375445
|
+
const fromAnswer = this.field.uploadValuePath ? readPath$a(response?.data, this.field.uploadValuePath) : '';
|
|
375241
375446
|
const next = fromAnswer || (this.field.previewUrl ? `${prefixUrl(this.field.previewUrl)}${this.field.previewUrl.includes('?') ? '&' : '?'}v=${Date.now()}` : '');
|
|
375242
375447
|
/**
|
|
375243
375448
|
* @event uploaded An image was uploaded. Payload: its new url.
|
|
@@ -375392,8 +375597,8 @@ var script$2s = {
|
|
|
375392
375597
|
const { data } = await axios$1.get(prefixUrl(url));
|
|
375393
375598
|
const list = Array.isArray(data?.results) ? data.results : [];
|
|
375394
375599
|
this.sourceOptions = list.filter((item) => item && typeof item === 'object').map((item) => {
|
|
375395
|
-
const value = source.valueField ? readPath$
|
|
375396
|
-
const label = source.labelField ? readPath$
|
|
375600
|
+
const value = source.valueField ? readPath$a(item, source.valueField) : (item.id ?? item.uuid ?? item['@self']?.id);
|
|
375601
|
+
const label = source.labelField ? readPath$a(item, source.labelField) : (item.name ?? item.title);
|
|
375397
375602
|
return { label: String(label || value || ''), value }
|
|
375398
375603
|
});
|
|
375399
375604
|
this.sourceTruncated = Number(data?.total) > list.length;
|
|
@@ -375425,14 +375630,14 @@ var script$2s = {
|
|
|
375425
375630
|
return
|
|
375426
375631
|
}
|
|
375427
375632
|
const data = await response.json();
|
|
375428
|
-
const list = this.field.optionsPath ? readPath$
|
|
375633
|
+
const list = this.field.optionsPath ? readPath$a(data, this.field.optionsPath) : (Array.isArray(data) ? data : data?.results);
|
|
375429
375634
|
this.fetchedOptions = (Array.isArray(list) ? list : []).map((item) => {
|
|
375430
375635
|
if (!item || typeof item !== 'object') {
|
|
375431
375636
|
return { label: String(item), value: item }
|
|
375432
375637
|
}
|
|
375433
|
-
const value = this.field.optionValue ? readPath$
|
|
375434
|
-
const label = this.field.optionLabel ? readPath$
|
|
375435
|
-
const detail = this.field.optionDetail ? readPath$
|
|
375638
|
+
const value = this.field.optionValue ? readPath$a(item, this.field.optionValue) : (item.value ?? item.id);
|
|
375639
|
+
const label = this.field.optionLabel ? readPath$a(item, this.field.optionLabel) : (item.label ?? item.title ?? item.name ?? value);
|
|
375640
|
+
const detail = this.field.optionDetail ? readPath$a(item, this.field.optionDetail) : '';
|
|
375436
375641
|
return { label: detail ? `${label ?? ''} (${detail})` : String(label ?? ''), value }
|
|
375437
375642
|
});
|
|
375438
375643
|
} catch {
|
|
@@ -375967,7 +376172,7 @@ function literalFirst(data, key) {
|
|
|
375967
376172
|
if (data && typeof data === 'object' && Object.hasOwn(data, key)) {
|
|
375968
376173
|
return data[key]
|
|
375969
376174
|
}
|
|
375970
|
-
return readPath$
|
|
376175
|
+
return readPath$a(data, key)
|
|
375971
376176
|
}
|
|
375972
376177
|
|
|
375973
376178
|
/**
|
|
@@ -377020,7 +377225,7 @@ var script$2r = {
|
|
|
377020
377225
|
const values = (this.valuesPath ? literalFirst(data, this.valuesPath) : data) || {};
|
|
377021
377226
|
const parts = pathParts(field);
|
|
377022
377227
|
if (parts) {
|
|
377023
|
-
return readPath$
|
|
377228
|
+
return readPath$a(storedObject(literalFirst(values, parts.root)).object, parts.rest)
|
|
377024
377229
|
}
|
|
377025
377230
|
return literalFirst(values, field.key)
|
|
377026
377231
|
},
|
|
@@ -393910,7 +394115,7 @@ function summaryLines(record, fields) {
|
|
|
393910
394115
|
if (typeof key !== 'string' || key === '') {
|
|
393911
394116
|
continue
|
|
393912
394117
|
}
|
|
393913
|
-
const value = readPath$
|
|
394118
|
+
const value = readPath$2(record, key);
|
|
393914
394119
|
if (value === undefined || value === null || value === '') {
|
|
393915
394120
|
continue
|
|
393916
394121
|
}
|
|
@@ -393930,7 +394135,7 @@ function summaryLines(record, fields) {
|
|
|
393930
394135
|
* @param {string} path The dotted path.
|
|
393931
394136
|
* @return {string|number|boolean|Array|object|undefined} The value, or undefined.
|
|
393932
394137
|
*/
|
|
393933
|
-
function readPath$
|
|
394138
|
+
function readPath$2(record, path) {
|
|
393934
394139
|
return path.split('.').reduce((node, part) => (node === null || node === undefined ? undefined : node[part]), record)
|
|
393935
394140
|
}
|
|
393936
394141
|
|
|
@@ -398811,13 +399016,13 @@ var script$1S = {
|
|
|
398811
399016
|
* @return {Array<{value: string, label: string, secondary: string}>}
|
|
398812
399017
|
*/
|
|
398813
399018
|
checkItems(field) {
|
|
398814
|
-
const listed = Array.isArray(field.options) ? field.options : readPath$
|
|
399019
|
+
const listed = Array.isArray(field.options) ? field.options : readPath$a(this.record || {}, field.itemsPath || '');
|
|
398815
399020
|
return (Array.isArray(listed) ? listed : []).map((item) => {
|
|
398816
399021
|
if (item === null || typeof item !== 'object') {
|
|
398817
399022
|
return { value: String(item), label: String(item), secondary: '' }
|
|
398818
399023
|
}
|
|
398819
399024
|
return {
|
|
398820
|
-
value: String(readPath$
|
|
399025
|
+
value: String(readPath$a(item, field.optionValue || 'value') ?? item.id ?? ''),
|
|
398821
399026
|
label: fillTemplate(field.optionLabel || '{label}', item),
|
|
398822
399027
|
secondary: field.optionSecondary ? fillTemplate(field.optionSecondary, item) : '',
|
|
398823
399028
|
}
|
|
@@ -398953,7 +399158,7 @@ var script$1S = {
|
|
|
398953
399158
|
}
|
|
398954
399159
|
try {
|
|
398955
399160
|
const data = await this.read(def.source);
|
|
398956
|
-
const list = def.itemsPath ? readPath$
|
|
399161
|
+
const list = def.itemsPath ? readPath$a(data, def.itemsPath) : data;
|
|
398957
399162
|
this.items = Array.isArray(list) ? list.filter((item) => item && item.id !== undefined) : [];
|
|
398958
399163
|
} catch {
|
|
398959
399164
|
this.items = [];
|
|
@@ -399026,9 +399231,9 @@ var script$1S = {
|
|
|
399026
399231
|
}
|
|
399027
399232
|
try {
|
|
399028
399233
|
const data = await this.read(def.source);
|
|
399029
|
-
const entry = def.listPath ? this.matchIn(readPath$
|
|
399030
|
-
this.allowed = readPath$
|
|
399031
|
-
this.refusal = this.allowed || !def.reasonPath ? '' : String(readPath$
|
|
399234
|
+
const entry = def.listPath ? this.matchIn(readPath$a(data, def.listPath), def.match) : data;
|
|
399235
|
+
this.allowed = readPath$a(entry, def.allowedPath || 'allowed') === true;
|
|
399236
|
+
this.refusal = this.allowed || !def.reasonPath ? '' : String(readPath$a(entry, def.reasonPath) || '');
|
|
399032
399237
|
} catch {
|
|
399033
399238
|
this.allowed = false;
|
|
399034
399239
|
}
|
|
@@ -399069,7 +399274,7 @@ var script$1S = {
|
|
|
399069
399274
|
const method = String(request.method || 'POST').toLowerCase();
|
|
399070
399275
|
const answer = await axios$1[['post', 'put', 'patch', 'delete'].includes(method) ? method : 'post'](/^https?:\/\//i.test(url) ? url : router.generateUrl(url), body);
|
|
399071
399276
|
if (request.answerPath) {
|
|
399072
|
-
const said = readPath$
|
|
399277
|
+
const said = readPath$a(answer?.data, request.answerPath);
|
|
399073
399278
|
this.answerText = said === null || said === undefined ? '' : String(said);
|
|
399074
399279
|
}
|
|
399075
399280
|
} else if (this.confirmConfig.action && typeof this.cnDispatchAction === 'function') {
|
|
@@ -399101,7 +399306,7 @@ var script$1S = {
|
|
|
399101
399306
|
const values = { ...this.values };
|
|
399102
399307
|
for (const field of this.fields) {
|
|
399103
399308
|
if (field.valuePath && !['secret', 'checks'].includes(field.type) && !(field.field in values)) {
|
|
399104
|
-
const value = readPath$
|
|
399309
|
+
const value = readPath$a(this.record, field.valuePath);
|
|
399105
399310
|
if (value !== null && value !== undefined) {
|
|
399106
399311
|
values[field.field] = String(value);
|
|
399107
399312
|
}
|
|
@@ -399117,7 +399322,7 @@ var script$1S = {
|
|
|
399117
399322
|
* @return {boolean}
|
|
399118
399323
|
*/
|
|
399119
399324
|
secretStored(field) {
|
|
399120
|
-
return field.type === 'secret' && Boolean(field.storedPath && this.record && readPath$
|
|
399325
|
+
return field.type === 'secret' && Boolean(field.storedPath && this.record && readPath$a(this.record, field.storedPath))
|
|
399121
399326
|
},
|
|
399122
399327
|
|
|
399123
399328
|
/** Close the dialog, unless the action is running. */
|
|
@@ -399938,7 +400143,7 @@ var script$1R = {
|
|
|
399938
400143
|
/** @return {string} Who has the record now, read from it. */
|
|
399939
400144
|
current() {
|
|
399940
400145
|
const path = this.assigneeConfig.currentPath;
|
|
399941
|
-
const value = path && this.record ? readPath$
|
|
400146
|
+
const value = path && this.record ? readPath$a(this.record, path) : '';
|
|
399942
400147
|
return value === undefined || value === null ? '' : String(value)
|
|
399943
400148
|
},
|
|
399944
400149
|
|
|
@@ -406836,6 +407041,90 @@ function hasGridRow(item = {}) {
|
|
|
406836
407041
|
return item.gridY !== undefined && Boolean(item.gridHeight)
|
|
406837
407042
|
}
|
|
406838
407043
|
|
|
407044
|
+
/**
|
|
407045
|
+
* SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
407046
|
+
* SPDX-License-Identifier: EUPL-1.2
|
|
407047
|
+
*
|
|
407048
|
+
* parentCrumb: the breadcrumb entry for the record a sub-record belongs to.
|
|
407049
|
+
*
|
|
407050
|
+
* A crumb that carries `parent` names a `visibilityContext` entry of the
|
|
407051
|
+
* detail page. The page reads that record beside the loaded one; this
|
|
407052
|
+
* helper turns it into a crumb with the parent's label and a link to its
|
|
407053
|
+
* page.
|
|
407054
|
+
*
|
|
407055
|
+
* @module utils/parentCrumb
|
|
407056
|
+
*/
|
|
407057
|
+
|
|
407058
|
+
/**
|
|
407059
|
+
* Read a dotted path from an object.
|
|
407060
|
+
*
|
|
407061
|
+
* @param {object|null} obj The object to read.
|
|
407062
|
+
* @param {string} path A dotted path, e.g. `identifier` or `@self.name`.
|
|
407063
|
+
* @return {unknown} The value, or undefined.
|
|
407064
|
+
*/
|
|
407065
|
+
function readPath$1(obj, path) {
|
|
407066
|
+
return path.split('.').reduce((o, part) => (o === null || o === undefined ? undefined : o[part]), obj)
|
|
407067
|
+
}
|
|
407068
|
+
|
|
407069
|
+
/**
|
|
407070
|
+
* A non-empty string for a value, or ''.
|
|
407071
|
+
*
|
|
407072
|
+
* @param {unknown} value Any value.
|
|
407073
|
+
* @return {string} The text.
|
|
407074
|
+
*/
|
|
407075
|
+
function text(value) {
|
|
407076
|
+
if (typeof value === 'number') {
|
|
407077
|
+
return String(value)
|
|
407078
|
+
}
|
|
407079
|
+
return typeof value === 'string' ? value.trim() : ''
|
|
407080
|
+
}
|
|
407081
|
+
|
|
407082
|
+
/**
|
|
407083
|
+
* The crumb for a record's parent.
|
|
407084
|
+
*
|
|
407085
|
+
* The crumb is dropped (null) when the record holds no reference to a
|
|
407086
|
+
* parent. Its label is the parent's `labelField` value, else the parent's
|
|
407087
|
+
* name or title, else the crumb's own `label` (translated); without any of
|
|
407088
|
+
* those it is dropped too. The link goes to `route` with the parent's id in
|
|
407089
|
+
* `param` (default `id`), or to `href` with `{id}` filled in.
|
|
407090
|
+
*
|
|
407091
|
+
* @param {object} crumb `{ parent, labelField?, label?, route?, params?, param?, href?, icon? }`.
|
|
407092
|
+
* @param {Array<{key: string, id: string}>} refs The page's context references.
|
|
407093
|
+
* @param {object} rows The context records read so far, by name.
|
|
407094
|
+
* @param {(key: string) => string} translate The host translate function.
|
|
407095
|
+
* @return {{label: string, to?: object, href?: string, icon?: string}|null} The crumb, or null.
|
|
407096
|
+
* @spec openspec/changes/detail-parent-crumb/specs/detail-page/spec.md#requirement-a-sub-record-trail-can-show-its-parent-record
|
|
407097
|
+
*/
|
|
407098
|
+
function parentCrumb(crumb, refs, rows, translate) {
|
|
407099
|
+
const ref = (refs || []).find((r) => r.key === crumb.parent);
|
|
407100
|
+
if (!ref || !ref.id) {
|
|
407101
|
+
return null
|
|
407102
|
+
}
|
|
407103
|
+
const row = rows && rows[crumb.parent] && typeof rows[crumb.parent] === 'object' ? rows[crumb.parent] : null;
|
|
407104
|
+
let label = '';
|
|
407105
|
+
if (row) {
|
|
407106
|
+
label = (typeof crumb.labelField === 'string' && crumb.labelField !== '' ? text(readPath$1(row, crumb.labelField)) : '')
|
|
407107
|
+
|| text(readPath$1(row, '@self.name')) || text(row.name) || text(row.title);
|
|
407108
|
+
}
|
|
407109
|
+
if (label === '' && typeof crumb.label === 'string' && crumb.label !== '') {
|
|
407110
|
+
label = translate(crumb.label);
|
|
407111
|
+
}
|
|
407112
|
+
if (label === '') {
|
|
407113
|
+
return null
|
|
407114
|
+
}
|
|
407115
|
+
const entry = { label };
|
|
407116
|
+
if (typeof crumb.icon === 'string' && crumb.icon !== '') {
|
|
407117
|
+
entry.icon = crumb.icon;
|
|
407118
|
+
}
|
|
407119
|
+
if (crumb.route) {
|
|
407120
|
+
const param = typeof crumb.param === 'string' && crumb.param !== '' ? crumb.param : 'id';
|
|
407121
|
+
entry.to = { name: crumb.route, params: { ...(crumb.params || {}), [param]: ref.id } };
|
|
407122
|
+
} else if (typeof crumb.href === 'string' && crumb.href !== '') {
|
|
407123
|
+
entry.href = crumb.href.split('{id}').join(encodeURIComponent(ref.id));
|
|
407124
|
+
}
|
|
407125
|
+
return entry
|
|
407126
|
+
}
|
|
407127
|
+
|
|
406839
407128
|
// SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
406840
407129
|
// SPDX-License-Identifier: EUPL-1.2
|
|
406841
407130
|
|
|
@@ -407849,6 +408138,24 @@ var script$1D = {
|
|
|
407849
408138
|
default: false,
|
|
407850
408139
|
},
|
|
407851
408140
|
|
|
408141
|
+
/**
|
|
408142
|
+
* A condition on the record, in the `visibleWhen` grammar (manifest
|
|
408143
|
+
* `config.readOnlyWhen`): while it holds, the page treats the record
|
|
408144
|
+
* as one it may not update, as with `can.update` false. The Edit
|
|
408145
|
+
* button, the header actions with role `edit` or `update` and the
|
|
408146
|
+
* inline editors are off. `{ field: "mergedInto", op: "notEmpty" }`
|
|
408147
|
+
* keeps a record merged into another from being edited. It is decided
|
|
408148
|
+
* on the page (no `endpoint` or `source`) and may read the
|
|
408149
|
+
* `visibilityContext` records as `@context.<name>.<path>`. Null
|
|
408150
|
+
* (the default) changes nothing.
|
|
408151
|
+
*
|
|
408152
|
+
* @spec openspec/changes/detail-read-only-when/specs/detail-page/spec.md#requirement-a-detail-page-can-make-a-record-read-only-by-a-condition
|
|
408153
|
+
*/
|
|
408154
|
+
readOnlyWhen: {
|
|
408155
|
+
type: Object,
|
|
408156
|
+
default: null,
|
|
408157
|
+
},
|
|
408158
|
+
|
|
407852
408159
|
/**
|
|
407853
408160
|
* Hide valueless fields on the auto-rendered data widget, instead of
|
|
407854
408161
|
* showing them with an em dash. See `CnObjectDataWidget`'s `hide-empty`.
|
|
@@ -408434,8 +408741,12 @@ var script$1D = {
|
|
|
408434
408741
|
* @spec openspec/changes/zuiddrecht-pixel-gaps-3/specs/zuiddrecht-pixel-gaps-3/spec.md#requirement-a-breadcrumb-can-name-the-record-by-a-field-and-use-a-text-separator
|
|
408435
408742
|
* A list of such crumbs draws a deeper trail ("Settings / Case types /"
|
|
408436
408743
|
* and then the record); `currentField` and `separator` may sit on any
|
|
408437
|
-
* of them.
|
|
408744
|
+
* of them. A crumb with `parent` (a `visibilityContext` name) instead
|
|
408745
|
+
* of `label` is the record's parent: its `labelField` value (else its
|
|
408746
|
+
* name), linked by `route` + `param` (default `id`) or `href` with
|
|
408747
|
+
* `{id}`; it drops out when the record has no parent.
|
|
408438
408748
|
*
|
|
408749
|
+
* @spec openspec/changes/detail-parent-crumb/specs/detail-page/spec.md#requirement-a-sub-record-trail-can-show-its-parent-record
|
|
408439
408750
|
* @spec openspec/changes/detail-breadcrumb-trail/specs/detail-page/spec.md#requirement-a-record-page-breadcrumb-can-name-more-than-one-level
|
|
408440
408751
|
* @type {{label: string, route?: string, params?: object, href?: string, icon?: string, currentField?: string, separator?: string}|Array<object>|null}
|
|
408441
408752
|
*/
|
|
@@ -410987,13 +411298,30 @@ var script$1D = {
|
|
|
410987
411298
|
},
|
|
410988
411299
|
|
|
410989
411300
|
/**
|
|
410990
|
-
* Whether the record refuses this reader's updates (`can.update === false`)
|
|
411301
|
+
* Whether the record refuses this reader's updates (`can.update === false`),
|
|
411302
|
+
* or the page's `readOnlyWhen` holds for it.
|
|
410991
411303
|
*
|
|
410992
411304
|
* @return {boolean}
|
|
410993
411305
|
* @spec openspec/changes/detail-page-record-rights/specs/detail-page-record-rights/spec.md#requirement-edit-controls-follow-the-records-update-right
|
|
410994
411306
|
*/
|
|
410995
411307
|
recordUpdateDenied() {
|
|
410996
|
-
return Boolean(this.recordCan && this.recordCan.update === false)
|
|
411308
|
+
return Boolean(this.recordCan && this.recordCan.update === false) || this.readOnlyByCondition
|
|
411309
|
+
},
|
|
411310
|
+
|
|
411311
|
+
/**
|
|
411312
|
+
* Whether the page's `readOnlyWhen` holds for the record (and its
|
|
411313
|
+
* `visibilityContext` records). False without the option, and while
|
|
411314
|
+
* the record or those records are still on their way.
|
|
411315
|
+
*
|
|
411316
|
+
* @return {boolean}
|
|
411317
|
+
* @spec openspec/changes/detail-read-only-when/specs/detail-page/spec.md#requirement-a-detail-page-can-make-a-record-read-only-by-a-condition
|
|
411318
|
+
*/
|
|
411319
|
+
readOnlyByCondition() {
|
|
411320
|
+
const when = this.readOnlyWhen;
|
|
411321
|
+
if (!when || typeof when !== 'object' || !this.widgetVisibilityData || this.visibilityRowsPending) {
|
|
411322
|
+
return false
|
|
411323
|
+
}
|
|
411324
|
+
return detailWidgetVisible({ visibleWhen: when }, this.widgetVisibilityData)
|
|
410997
411325
|
},
|
|
410998
411326
|
|
|
410999
411327
|
/**
|
|
@@ -411058,7 +411386,7 @@ var script$1D = {
|
|
|
411058
411386
|
*/
|
|
411059
411387
|
declaredCrumbs() {
|
|
411060
411388
|
const list = Array.isArray(this.breadcrumb) ? this.breadcrumb : (this.breadcrumb ? [this.breadcrumb] : []);
|
|
411061
|
-
return list.filter((crumb) => crumb && typeof crumb.label === 'string' && crumb.label !== ''
|
|
411389
|
+
return list.filter((crumb) => crumb && ((typeof crumb.label === 'string' && crumb.label !== '') || (typeof crumb.parent === 'string' && crumb.parent !== ''))
|
|
411062
411390
|
&& (!crumb.visibleWhen || detailWidgetVisible({ visibleWhen: crumb.visibleWhen }, this.widgetVisibilityData)))
|
|
411063
411391
|
},
|
|
411064
411392
|
|
|
@@ -411066,11 +411394,14 @@ var script$1D = {
|
|
|
411066
411394
|
* The breadcrumb trail: the declared crumbs (each a router target from
|
|
411067
411395
|
* `route` + `params`, or an `href`), then the record's display name
|
|
411068
411396
|
* as the current crumb. Empty without a declared crumb. A crumb
|
|
411069
|
-
* carries `icon` only when the manifest declares one.
|
|
411397
|
+
* carries `icon` only when the manifest declares one. A crumb with
|
|
411398
|
+
* `parent` is the record's parent (see `parentCrumb`) and drops out
|
|
411399
|
+
* when the record has none.
|
|
411070
411400
|
*
|
|
411071
411401
|
* @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-detail-page-drops-its-eyebrow-and-shows-a-breadcrumb
|
|
411072
411402
|
* @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-declared-breadcrumb-label-shows-as-text
|
|
411073
411403
|
* @spec openspec/changes/detail-breadcrumb-trail/specs/detail-page/spec.md#requirement-a-record-page-breadcrumb-can-name-more-than-one-level
|
|
411404
|
+
* @spec openspec/changes/detail-parent-crumb/specs/detail-page/spec.md#requirement-a-sub-record-trail-can-show-its-parent-record
|
|
411074
411405
|
* @return {Array<{label: string, to?: object, href?: string, icon?: string}>}
|
|
411075
411406
|
*/
|
|
411076
411407
|
breadcrumbCrumbs() {
|
|
@@ -411078,6 +411409,9 @@ var script$1D = {
|
|
|
411078
411409
|
return []
|
|
411079
411410
|
}
|
|
411080
411411
|
const crumbs = this.declaredCrumbs.map((crumb) => {
|
|
411412
|
+
if (typeof crumb.parent === 'string' && crumb.parent !== '') {
|
|
411413
|
+
return parentCrumb(crumb, this.visibilityRefs, this.visibilityRows, this.effectiveTranslate)
|
|
411414
|
+
}
|
|
411081
411415
|
const entry = { label: this.effectiveTranslate(crumb.label) };
|
|
411082
411416
|
if (typeof crumb.icon === 'string' && crumb.icon !== '') {
|
|
411083
411417
|
entry.icon = crumb.icon;
|
|
@@ -411088,7 +411422,10 @@ var script$1D = {
|
|
|
411088
411422
|
entry.href = crumb.href;
|
|
411089
411423
|
}
|
|
411090
411424
|
return entry
|
|
411091
|
-
});
|
|
411425
|
+
}).filter((crumb) => crumb !== null);
|
|
411426
|
+
if (crumbs.length === 0) {
|
|
411427
|
+
return []
|
|
411428
|
+
}
|
|
411092
411429
|
return [...crumbs, { label: this.breadcrumbCurrentLabel }]
|
|
411093
411430
|
},
|
|
411094
411431
|
|
|
@@ -434348,8 +434685,8 @@ var script$15 = {
|
|
|
434348
434685
|
});
|
|
434349
434686
|
const rows = Array.isArray(data && data.results) ? data.results : (Array.isArray(data) ? data : []);
|
|
434350
434687
|
return rows.filter((row) => row && typeof row === 'object').map((row) => ({
|
|
434351
|
-
value: readPath$
|
|
434352
|
-
label: String(readPath$
|
|
434688
|
+
value: readPath$a(row, from.valueField || 'id'),
|
|
434689
|
+
label: String(readPath$a(row, from.labelField || 'title') ?? readPath$a(row, 'name') ?? readPath$a(row, 'id') ?? ''),
|
|
434353
434690
|
row,
|
|
434354
434691
|
}))
|
|
434355
434692
|
} catch {
|
|
@@ -434412,12 +434749,12 @@ var script$15 = {
|
|
|
434412
434749
|
}
|
|
434413
434750
|
for (const [target, rule] of Object.entries(this.config.derive || {})) {
|
|
434414
434751
|
const option = rule && this.selected[rule.from];
|
|
434415
|
-
let list = option && option.row ? readPath$
|
|
434752
|
+
let list = option && option.row ? readPath$a(option.row, rule.path) : null;
|
|
434416
434753
|
if (Array.isArray(list) && list.length > 0) {
|
|
434417
434754
|
if (rule.sortBy) {
|
|
434418
|
-
list = [...list].sort((a, b) => (Number(readPath$
|
|
434755
|
+
list = [...list].sort((a, b) => (Number(readPath$a(a, rule.sortBy)) || 0) - (Number(readPath$a(b, rule.sortBy)) || 0));
|
|
434419
434756
|
}
|
|
434420
|
-
const value = readPath$
|
|
434757
|
+
const value = readPath$a(list[0], rule.field);
|
|
434421
434758
|
if (value !== undefined && value !== null) {
|
|
434422
434759
|
body[target] = value;
|
|
434423
434760
|
}
|
|
@@ -434827,7 +435164,7 @@ var script$14 = {
|
|
|
434827
435164
|
? this.config.subtitle.map((part) => this.fill(part, item))
|
|
434828
435165
|
: [this.fill(this.config.subtitle, item)];
|
|
434829
435166
|
if (due && typeof due === 'object' && due.field) {
|
|
434830
|
-
const resolved = resolveDue(readPath$
|
|
435167
|
+
const resolved = resolveDue(readPath$a(item, due.field), due, (text) => this.cnTranslate(text));
|
|
434831
435168
|
const dueText = resolved ? resolved.text : '';
|
|
434832
435169
|
return due.withSubtitle ? [...parts, dueText].filter(Boolean).join(' · ') : dueText
|
|
434833
435170
|
}
|
|
@@ -434887,7 +435224,7 @@ var script$14 = {
|
|
|
434887
435224
|
const items = lists.flat();
|
|
434888
435225
|
const sortBy = this.config.sortBy;
|
|
434889
435226
|
this.items = sortBy
|
|
434890
|
-
? items.sort((a, b) => (Date.parse(readPath$
|
|
435227
|
+
? items.sort((a, b) => (Date.parse(readPath$a(b, sortBy)) || 0) - (Date.parse(readPath$a(a, sortBy)) || 0))
|
|
434891
435228
|
: items;
|
|
434892
435229
|
} catch {
|
|
434893
435230
|
if (ticket === this.loadTicket) {
|
|
@@ -434917,7 +435254,7 @@ var script$14 = {
|
|
|
434917
435254
|
? { url: `/apps/openregister/api/objects/${source.register}/${source.schema}`, params: { _limit: this.limit, ...params, ...search } }
|
|
434918
435255
|
: { url: source.url, responsePath: source.responsePath, params: { ...params, ...search } };
|
|
434919
435256
|
const data = await fetchEndpointSource(request, {}, { fresh: true });
|
|
434920
|
-
const list = readPath$
|
|
435257
|
+
const list = readPath$a(data, this.config.itemsPath || (source.register ? 'results' : '')) ?? data;
|
|
434921
435258
|
const kind = this.text(source.kind);
|
|
434922
435259
|
return (Array.isArray(list) ? list : [])
|
|
434923
435260
|
.filter((item) => item && typeof item === 'object')
|
|
@@ -434943,7 +435280,7 @@ var script$14 = {
|
|
|
434943
435280
|
*/
|
|
434944
435281
|
actionsFor(row) {
|
|
434945
435282
|
const item = this.itemsById.get(row.id) || {};
|
|
434946
|
-
return this.rowActions.filter((action) => !action.copy || !['', null, undefined].includes(readPath$
|
|
435283
|
+
return this.rowActions.filter((action) => !action.copy || !['', null, undefined].includes(readPath$a(item, action.copy)))
|
|
434947
435284
|
},
|
|
434948
435285
|
|
|
434949
435286
|
/**
|
|
@@ -434973,7 +435310,7 @@ var script$14 = {
|
|
|
434973
435310
|
}
|
|
434974
435311
|
if (action.copy) {
|
|
434975
435312
|
try {
|
|
434976
|
-
await navigator.clipboard.writeText(String(readPath$
|
|
435313
|
+
await navigator.clipboard.writeText(String(readPath$a(item, action.copy)));
|
|
434977
435314
|
this.copied = true;
|
|
434978
435315
|
setTimeout(() => {
|
|
434979
435316
|
this.copied = false;
|
|
@@ -439464,7 +439801,7 @@ var script$T = {
|
|
|
439464
439801
|
|
|
439465
439802
|
/** @return {string} The open document's grounds. */
|
|
439466
439803
|
grounds() {
|
|
439467
|
-
const list = this.config.groundsPath ? readPath$
|
|
439804
|
+
const list = this.config.groundsPath ? readPath$a(this.current, this.config.groundsPath) : null;
|
|
439468
439805
|
return Array.isArray(list) ? list.join(', ') : ''
|
|
439469
439806
|
},
|
|
439470
439807
|
|
|
@@ -448412,7 +448749,7 @@ var script$E = {
|
|
|
448412
448749
|
});
|
|
448413
448750
|
const body = await response.json();
|
|
448414
448751
|
if (body.outcome === 'ok') {
|
|
448415
|
-
showSuccess(l10n.t('nextcloud-vue', 'Published to the
|
|
448752
|
+
showSuccess(l10n.t('nextcloud-vue', 'Published to the marketplace.'));
|
|
448416
448753
|
this.$emit('published', body.slug);
|
|
448417
448754
|
return
|
|
448418
448755
|
}
|
|
@@ -448433,14 +448770,14 @@ var script$E = {
|
|
|
448433
448770
|
*/
|
|
448434
448771
|
outcomeMessage(body, status) {
|
|
448435
448772
|
if (status === 403) {
|
|
448436
|
-
return l10n.t('nextcloud-vue', 'You may not publish to this
|
|
448773
|
+
return l10n.t('nextcloud-vue', 'You may not publish to this marketplace.')
|
|
448437
448774
|
}
|
|
448438
448775
|
const messages = {
|
|
448439
|
-
not_configured: l10n.t('nextcloud-vue', 'No
|
|
448440
|
-
store_unreachable: l10n.t('nextcloud-vue', 'The
|
|
448441
|
-
store_rejected: l10n.t('nextcloud-vue', 'The
|
|
448776
|
+
not_configured: l10n.t('nextcloud-vue', 'No marketplace registry is configured. An administrator connects one under Administration settings.'),
|
|
448777
|
+
store_unreachable: l10n.t('nextcloud-vue', 'The marketplace registry did not answer. Try again later.'),
|
|
448778
|
+
store_rejected: l10n.t('nextcloud-vue', 'The marketplace registry refused the item.'),
|
|
448442
448779
|
too_large: l10n.t('nextcloud-vue', 'The item is too large to publish.'),
|
|
448443
|
-
rate_limited: l10n.t('nextcloud-vue', 'The
|
|
448780
|
+
rate_limited: l10n.t('nextcloud-vue', 'The marketplace registry is busy. Try again in a minute.'),
|
|
448444
448781
|
};
|
|
448445
448782
|
return messages[body?.outcome] || body?.message || l10n.t('nextcloud-vue', 'The item could not be published.')
|
|
448446
448783
|
},
|
|
@@ -448467,7 +448804,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
448467
448804
|
const _component_CnDialog = vue$1.resolveComponent("CnDialog");
|
|
448468
448805
|
|
|
448469
448806
|
return (vue$1.openBlock(), vue$1.createBlock(_component_CnDialog, {
|
|
448470
|
-
name: $options.t('nextcloud-vue', 'Publish to the
|
|
448807
|
+
name: $options.t('nextcloud-vue', 'Publish to the marketplace'),
|
|
448471
448808
|
subtitle: $options.t('nextcloud-vue', 'Share a template built from your own configuration with the registry.'),
|
|
448472
448809
|
"data-testid": "store-publish-dialog",
|
|
448473
448810
|
onClosing: _cache[7] || (_cache[7] = $event => (_ctx.$emit('close')))
|
|
@@ -448562,7 +448899,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
448562
448899
|
}
|
|
448563
448900
|
|
|
448564
448901
|
script$E.render = render$D;
|
|
448565
|
-
script$E.__scopeId = "data-v-
|
|
448902
|
+
script$E.__scopeId = "data-v-daaf434a";
|
|
448566
448903
|
const __sfc_main$E = script$E;
|
|
448567
448904
|
|
|
448568
448905
|
/**
|
|
@@ -448806,7 +449143,7 @@ var script$D = {
|
|
|
448806
449143
|
* @return {string} The heading to render.
|
|
448807
449144
|
*/
|
|
448808
449145
|
resolvedTitle() {
|
|
448809
|
-
return this.title || this.page?.title || l10n.t('nextcloud-vue', '
|
|
449146
|
+
return this.title || this.page?.title || l10n.t('nextcloud-vue', 'Marketplace')
|
|
448810
449147
|
},
|
|
448811
449148
|
|
|
448812
449149
|
/**
|
|
@@ -449105,7 +449442,7 @@ var script$D = {
|
|
|
449105
449442
|
notConfiguredMessage() {
|
|
449106
449443
|
const base = l10n.t(
|
|
449107
449444
|
'nextcloud-vue',
|
|
449108
|
-
'No
|
|
449445
|
+
'No marketplace registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.',
|
|
449109
449446
|
);
|
|
449110
449447
|
|
|
449111
449448
|
return this.builtIn.length > 0
|
|
@@ -449119,7 +449456,7 @@ var script$D = {
|
|
|
449119
449456
|
* @return {string} The unreachable note.
|
|
449120
449457
|
*/
|
|
449121
449458
|
unreachableMessage() {
|
|
449122
|
-
const base = l10n.t('nextcloud-vue', 'The
|
|
449459
|
+
const base = l10n.t('nextcloud-vue', 'The marketplace registry did not answer.');
|
|
449123
449460
|
|
|
449124
449461
|
return this.builtIn.length > 0
|
|
449125
449462
|
? `${base} ${l10n.t('nextcloud-vue', 'The items below ship with this app.')}`
|
|
@@ -449663,8 +450000,8 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449663
450000
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.query) = $event)),
|
|
449664
450001
|
type: "search",
|
|
449665
450002
|
class: "cn-store-page__lens-search-input",
|
|
449666
|
-
placeholder: $options.t('nextcloud-vue', 'Search the
|
|
449667
|
-
"aria-label": $options.t('nextcloud-vue', 'Search the
|
|
450003
|
+
placeholder: $options.t('nextcloud-vue', 'Search the marketplace'),
|
|
450004
|
+
"aria-label": $options.t('nextcloud-vue', 'Search the marketplace'),
|
|
449668
450005
|
disabled: $options.offline,
|
|
449669
450006
|
"data-testid": "store-search",
|
|
449670
450007
|
onInput: _cache[1] || (_cache[1] = (...args) => ($options.onSearchInput && $options.onSearchInput(...args)))
|
|
@@ -449680,7 +450017,7 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449680
450017
|
_cache[2] || (_cache[2] = $event => (($data.query) = $event)),
|
|
449681
450018
|
$options.onSearchInput
|
|
449682
450019
|
],
|
|
449683
|
-
label: $options.t('nextcloud-vue', 'Search the
|
|
450020
|
+
label: $options.t('nextcloud-vue', 'Search the marketplace'),
|
|
449684
450021
|
disabled: $options.offline,
|
|
449685
450022
|
"data-testid": "store-search"
|
|
449686
450023
|
}, null, 8 /* PROPS */, ["modelValue", "label", "disabled", "onUpdate:modelValue"]),
|
|
@@ -449885,9 +450222,9 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449885
450222
|
($options.isBoardLook && !$data.loading && !$options.offline && !$options.unreachable)
|
|
449886
450223
|
? (vue$1.openBlock(), vue$1.createElementBlock("aside", _hoisted_33$4, [
|
|
449887
450224
|
vue$1.createElementVNode("section", _hoisted_34$4, [
|
|
449888
|
-
vue$1.createElementVNode("h2", _hoisted_35$4, vue$1.toDisplayString($options.t('nextcloud-vue', 'Installed from this
|
|
450225
|
+
vue$1.createElementVNode("h2", _hoisted_35$4, vue$1.toDisplayString($options.t('nextcloud-vue', 'Installed from this marketplace')), 1 /* TEXT */),
|
|
449889
450226
|
($options.installedCards.length === 0)
|
|
449890
|
-
? (vue$1.openBlock(), vue$1.createElementBlock("p", _hoisted_36$4, vue$1.toDisplayString($options.t('nextcloud-vue', 'Nothing from this
|
|
450227
|
+
? (vue$1.openBlock(), vue$1.createElementBlock("p", _hoisted_36$4, vue$1.toDisplayString($options.t('nextcloud-vue', 'Nothing from this marketplace is installed yet.')), 1 /* TEXT */))
|
|
449891
450228
|
: (vue$1.openBlock(), vue$1.createElementBlock("ul", _hoisted_37$3, [
|
|
449892
450229
|
(vue$1.openBlock(true), vue$1.createElementBlock(vue$1.Fragment, null, vue$1.renderList($options.installedCards, (card) => {
|
|
449893
450230
|
return (vue$1.openBlock(), vue$1.createElementBlock("li", {
|
|
@@ -449953,7 +450290,7 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449953
450290
|
}
|
|
449954
450291
|
|
|
449955
450292
|
script$D.render = render$C;
|
|
449956
|
-
script$D.__scopeId = "data-v-
|
|
450293
|
+
script$D.__scopeId = "data-v-45414193";
|
|
449957
450294
|
const __sfc_main$D = script$D;
|
|
449958
450295
|
|
|
449959
450296
|
var CnStorePage = /*#__PURE__*/Object.freeze({
|
|
@@ -474240,7 +474577,7 @@ var script$5 = {
|
|
|
474240
474577
|
const raw = this.loadedItems !== null ? this.loadedItems : this.items;
|
|
474241
474578
|
const map = { ...DEFAULT_FIELDS, ...(this.fields || {}) };
|
|
474242
474579
|
return (Array.isArray(raw) ? raw : []).map((row, index) => {
|
|
474243
|
-
const read = (key) => readPath$
|
|
474580
|
+
const read = (key) => readPath$a(row, map[key]);
|
|
474244
474581
|
const met = read('met');
|
|
474245
474582
|
return {
|
|
474246
474583
|
id: String(read('id') ?? index),
|
|
@@ -474365,7 +474702,7 @@ var script$5 = {
|
|
|
474365
474702
|
this.loadError = '';
|
|
474366
474703
|
try {
|
|
474367
474704
|
const { data } = await axios$1.get(router.generateUrl(this.source));
|
|
474368
|
-
const rows = Array.isArray(data) ? data : readPath$
|
|
474705
|
+
const rows = Array.isArray(data) ? data : readPath$a(data, this.itemsPath);
|
|
474369
474706
|
this.loadedItems = Array.isArray(rows) ? rows : [];
|
|
474370
474707
|
/** @event loaded The source answered. Payload: the whole answer. */
|
|
474371
474708
|
this.$emit('loaded', data);
|