@conduction/nextcloud-vue 2.56.0-beta.70 → 2.56.0-beta.71
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/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 +59 -59
- package/dist/esm/l10n/nl.json.js +59 -59
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +55 -55
- package/dist/esm/utils/parentCrumb.js +86 -0
- package/dist/esm/utils/parentCrumb.js.map +1 -0
- package/dist/nextcloud-vue.cjs.js +813 -576
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +55 -55
- package/l10n/en.json +59 -59
- package/l10n/nl.json +59 -59
- package/package.json +1 -1
- package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +67 -1
- 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,6 +3851,52 @@ 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
3901
|
"Keep this one": "Keep this one",
|
|
3902
3902
|
"Keep the server one": "Keep the server one",
|
|
@@ -4517,19 +4517,6 @@ var translations$c = {
|
|
|
4517
4517
|
Ownership: "Eigendom",
|
|
4518
4518
|
"Record archival metadata": "Archiefmetadata van het object",
|
|
4519
4519
|
"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
4520
|
"Recorded on the object": "Vastgelegd op het object",
|
|
4534
4521
|
"Retention period": "Bewaartermijn",
|
|
4535
4522
|
"Schema archival annotation": "Archiveringsannotatie van het schema",
|
|
@@ -4830,11 +4817,6 @@ var translations$c = {
|
|
|
4830
4817
|
Hostname: "Hostnaam",
|
|
4831
4818
|
ID: "ID",
|
|
4832
4819
|
"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
4820
|
"IDN email": "IDN e-mail",
|
|
4839
4821
|
"image, document, audio, video": "afbeelding, document, audio, video",
|
|
4840
4822
|
"IDN hostname": "IDN-hostnaam",
|
|
@@ -5135,9 +5117,6 @@ var translations$c = {
|
|
|
5135
5117
|
"Title *": "Titel *",
|
|
5136
5118
|
Type: "Type",
|
|
5137
5119
|
"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
5120
|
"Type value and press Enter": "Typ een waarde en druk op Enter",
|
|
5142
5121
|
"(technical) Property name": "(technische) Eigenschapsnaam",
|
|
5143
5122
|
"false — field must not exist": "false — veld mag niet bestaan",
|
|
@@ -5238,7 +5217,6 @@ var translations$c = {
|
|
|
5238
5217
|
"Start new chat": "Nieuwe chat starten",
|
|
5239
5218
|
History: "Historie",
|
|
5240
5219
|
"No audit entries yet": "Nog geen wijzigingen vastgelegd",
|
|
5241
|
-
"Nothing to set yet.": "Nog niets in te stellen.",
|
|
5242
5220
|
Meetings: "Afspraken",
|
|
5243
5221
|
"No meetings": "Geen afspraken",
|
|
5244
5222
|
"Open in Calendar": "Openen in Agenda",
|
|
@@ -5439,8 +5417,6 @@ var translations$c = {
|
|
|
5439
5417
|
"Create new project": "Nieuw project aanmaken",
|
|
5440
5418
|
"Search projects": "Projecten zoeken",
|
|
5441
5419
|
"No projects available": "Geen projecten beschikbaar",
|
|
5442
|
-
"Nothing to choose from.": "Niets om uit te kiezen.",
|
|
5443
|
-
"Time left: {time}": "Resterende tijd: {time}",
|
|
5444
5420
|
"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
5421
|
"NC Costs is not installed.": "NC Kosten is niet geïnstalleerd.",
|
|
5446
5422
|
"Link project": "Project koppelen",
|
|
@@ -5641,8 +5617,6 @@ var translations$c = {
|
|
|
5641
5617
|
"This run recorded no steps.": "Deze uitvoering heeft geen stappen vastgelegd.",
|
|
5642
5618
|
"Replay on the canvas": "Opnieuw afspelen op het canvas",
|
|
5643
5619
|
"Add a step": "Een stap toevoegen",
|
|
5644
|
-
"Start timer": "Timer starten",
|
|
5645
|
-
"Stop timer": "Timer stoppen",
|
|
5646
5620
|
"Version number. A semantic version appears once the flow is published.": "Versienummer. Een semantische versie verschijnt zodra de flow is gepubliceerd.",
|
|
5647
5621
|
"Numbered when semantic versions were introduced, not derived from a comparison.": "Genummerd toen semantische versies werden ingevoerd, niet afgeleid uit een vergelijking.",
|
|
5648
5622
|
"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 +5630,15 @@ var translations$c = {
|
|
|
5656
5630
|
Installed: "Geïnstalleerd",
|
|
5657
5631
|
"Installed.": "Geïnstalleerd.",
|
|
5658
5632
|
"Installing…": "Installeren…",
|
|
5659
|
-
"No
|
|
5633
|
+
"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
5634
|
"Nothing matches that search": "Niets gevonden voor die zoekopdracht",
|
|
5661
|
-
"Search the
|
|
5635
|
+
"Search the marketplace": "Zoek in de marktplaats",
|
|
5662
5636
|
"All items": "Alle",
|
|
5663
5637
|
"Some parts were not installed: {schemas}": "Sommige onderdelen zijn niet geïnstalleerd: {schemas}",
|
|
5664
|
-
|
|
5638
|
+
Marketplace: "Marktplaats",
|
|
5665
5639
|
"The item could not be installed.": "Het item kon niet worden geïnstalleerd.",
|
|
5666
5640
|
"The items below ship with this app.": "De items hieronder worden met deze app meegeleverd.",
|
|
5667
|
-
"The
|
|
5641
|
+
"The marketplace registry did not answer.": "Het marktplaatsregister gaf geen antwoord.",
|
|
5668
5642
|
"Try a different term, or clear the kind filter.": "Probeer een andere zoekterm of wis het soortfilter.",
|
|
5669
5643
|
"Version {version}": "Versie {version}",
|
|
5670
5644
|
"App template": "App-sjabloon",
|
|
@@ -5743,9 +5717,6 @@ var translations$c = {
|
|
|
5743
5717
|
"Show capabilities": "Toon functionaliteiten",
|
|
5744
5718
|
"Provided by": "Geleverd door",
|
|
5745
5719
|
"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
5720
|
"another app": "andere app",
|
|
5750
5721
|
"the platform": "het platform",
|
|
5751
5722
|
"We matched this row to its feature by judgement.": "Wij hebben deze rij op inschatting aan een functie gekoppeld.",
|
|
@@ -5846,10 +5817,6 @@ var translations$c = {
|
|
|
5846
5817
|
"Unpin {column}": "{column} losmaken",
|
|
5847
5818
|
"Reset columns": "Kolommen herstellen",
|
|
5848
5819
|
"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
5820
|
"{title} was not linked: {reason}": "{title} is niet gekoppeld: {reason}",
|
|
5854
5821
|
"no reason given": "geen reden opgegeven",
|
|
5855
5822
|
"Links to take along": "Koppelingen meenemen",
|
|
@@ -6049,14 +6016,7 @@ var translations$c = {
|
|
|
6049
6016
|
"Action completed.": "Actie uitgevoerd.",
|
|
6050
6017
|
"Run queued": "Run staat in de wachtrij",
|
|
6051
6018
|
"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
6019
|
"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
6020
|
"Edit with Buildiq": "Bewerken met Buildiq",
|
|
6061
6021
|
"Save page": "Pagina opslaan",
|
|
6062
6022
|
"Edit in Buildiq": "Bewerken in Buildiq",
|
|
@@ -6472,12 +6432,6 @@ var translations$c = {
|
|
|
6472
6432
|
"You are not allowed to see this plan.": "Je mag dit plan niet zien.",
|
|
6473
6433
|
"The plan could not be loaded. Try again.": "Het plan kon niet worden geladen. Probeer het opnieuw.",
|
|
6474
6434
|
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
6435
|
Stop: "Stoppen",
|
|
6482
6436
|
"Can start": "Kan starten",
|
|
6483
6437
|
Stopped: "Gestopt",
|
|
@@ -7153,8 +7107,8 @@ var translations$c = {
|
|
|
7153
7107
|
"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
7108
|
"Skip this step": "Deze stap overslaan",
|
|
7155
7109
|
"{label} (optional)": "{label} (optioneel)",
|
|
7156
|
-
"Installed from this
|
|
7157
|
-
"Nothing from this
|
|
7110
|
+
"Installed from this marketplace": "Geïnstalleerd uit deze marktplaats",
|
|
7111
|
+
"Nothing from this marketplace is installed yet.": "Er is nog niets uit deze marktplaats geïnstalleerd.",
|
|
7158
7112
|
Updates: "Updates",
|
|
7159
7113
|
"Everything is up to date.": "Alles is bijgewerkt.",
|
|
7160
7114
|
"Check now": "Nu controleren",
|
|
@@ -7162,20 +7116,20 @@ var translations$c = {
|
|
|
7162
7116
|
"Updates available": "Updates beschikbaar",
|
|
7163
7117
|
"{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
7118
|
"Version {version}, {latest} is out": "Versie {version}, {latest} is uit",
|
|
7165
|
-
"No
|
|
7119
|
+
"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
7120
|
"Nothing of this kind on this instance yet.": "Hier is nog niets van deze soort.",
|
|
7167
|
-
"Publish to the
|
|
7168
|
-
"Published to the
|
|
7121
|
+
"Publish to the marketplace": "Publiceren in de marktplaats",
|
|
7122
|
+
"Published to the marketplace.": "Gepubliceerd in de marktplaats.",
|
|
7169
7123
|
Publisher: "Uitgever",
|
|
7170
7124
|
"Publishing…": "Publiceren…",
|
|
7171
7125
|
"Share a template built from your own configuration with the registry.": "Deel een sjabloon uit je eigen inrichting met de registry.",
|
|
7172
7126
|
"The item could not be published.": "Het item kon niet worden gepubliceerd.",
|
|
7173
7127
|
"The item is too large to publish.": "Het item is te groot om te publiceren.",
|
|
7174
|
-
"The
|
|
7175
|
-
"The
|
|
7176
|
-
"The
|
|
7128
|
+
"The marketplace registry did not answer. Try again later.": "De marktplaats-registry antwoordde niet. Probeer het later opnieuw.",
|
|
7129
|
+
"The marketplace registry is busy. Try again in a minute.": "De marktplaats-registry is bezig. Probeer het over een minuut opnieuw.",
|
|
7130
|
+
"The marketplace registry refused the item.": "De marktplaats-registry weigerde het item.",
|
|
7177
7131
|
"What the template carries": "Wat het sjabloon meeneemt",
|
|
7178
|
-
"You may not publish to this
|
|
7132
|
+
"You may not publish to this marketplace.": "Je mag niet publiceren in deze marktplaats.",
|
|
7179
7133
|
"Move {name}": "{name} verplaatsen",
|
|
7180
7134
|
"Filter on {name}": "Filteren op {name}",
|
|
7181
7135
|
"(empty)": "(leeg)",
|
|
@@ -7239,6 +7193,52 @@ var translations$c = {
|
|
|
7239
7193
|
Condition: "Voorwaarde",
|
|
7240
7194
|
"These conditions are kept as written": "Deze voorwaarden blijven zoals ze zijn geschreven",
|
|
7241
7195
|
"This group has no conditions yet.": "Deze groep heeft nog geen voorwaarden.",
|
|
7196
|
+
"Add block": "Blok toevoegen",
|
|
7197
|
+
"Block type": "Soort blok",
|
|
7198
|
+
Blocks: "Blokken",
|
|
7199
|
+
"No blocks yet.": "Nog geen blokken.",
|
|
7200
|
+
"Drag to change the order": "Sleep om de volgorde te wijzigen",
|
|
7201
|
+
Keep: "Bewaren",
|
|
7202
|
+
"Draft kept.": "Concept bewaard.",
|
|
7203
|
+
"Draft discarded.": "Concept weggegooid.",
|
|
7204
|
+
"Block removed.": "Blok verwijderd.",
|
|
7205
|
+
"{type} block added at position {position}.": "Blok {type} toegevoegd op positie {position}.",
|
|
7206
|
+
"Block moved to position {position} of {total}.": "Blok verplaatst naar positie {position} van {total}.",
|
|
7207
|
+
"Block {position} is still a draft. Keep or discard it first.": "Blok {position} is nog een concept. Bewaar of verwijder het eerst.",
|
|
7208
|
+
"{action}: {type} block {position}": "{action}: blok {type} {position}",
|
|
7209
|
+
"This text is too long for a QR code.": "Deze tekst is te lang voor een QR-code.",
|
|
7210
|
+
"This code could not be refreshed and may no longer work.": "Deze code kon niet worden vernieuwd en werkt misschien niet meer.",
|
|
7211
|
+
"QR code for: {label}": "QR-code voor: {label}",
|
|
7212
|
+
"QR code": "QR-code",
|
|
7213
|
+
"Changes in {seconds} s": "Verandert over {seconds} s",
|
|
7214
|
+
"updated at {time}": "bijgewerkt om {time}",
|
|
7215
|
+
"Cannot reach the server. This shows what it knew at {time}.": "De server is niet bereikbaar. Dit is de stand van {time}.",
|
|
7216
|
+
"Cannot reach the server. This may be out of date.": "De server is niet bereikbaar. Dit kan verouderd zijn.",
|
|
7217
|
+
"Nothing to set yet.": "Nog niets in te stellen.",
|
|
7218
|
+
"Nothing to choose from.": "Niets om uit te kiezen.",
|
|
7219
|
+
"Time left: {time}": "Resterende tijd: {time}",
|
|
7220
|
+
"Start timer": "Timer starten",
|
|
7221
|
+
"Stop timer": "Timer stoppen",
|
|
7222
|
+
"Drag to reorder": "Sleep om te ordenen",
|
|
7223
|
+
"{action}: {label}": "{action}: {label}",
|
|
7224
|
+
"{label} moved to position {position} of {total}.": "{label} verplaatst naar positie {position} van {total}.",
|
|
7225
|
+
"Address (by hand)": "Adres (handmatig)",
|
|
7226
|
+
"Looking for your location…": "Je locatie wordt gezocht…",
|
|
7227
|
+
"No location found. You can carry on, or add the address by hand.": "Geen locatie gevonden. Je kunt doorgaan, of het adres handmatig toevoegen.",
|
|
7228
|
+
"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.",
|
|
7229
|
+
"Score: {score} of {max}": "Score: {score} van {max}",
|
|
7230
|
+
"(weight {weight})": "(weging {weight})",
|
|
7231
|
+
"{points} point": "{points} punt",
|
|
7232
|
+
"{points} points": "{points} punten",
|
|
7233
|
+
"The connection dropped. It carries on from where it stopped.": "De verbinding viel weg. Het gaat verder waar het was.",
|
|
7234
|
+
Resume: "Hervatten",
|
|
7235
|
+
"{done} {unit} of {total} {unit}": "{done} {unit} van {total} {unit}",
|
|
7236
|
+
Reset: "Reset",
|
|
7237
|
+
Timer: "Timer",
|
|
7238
|
+
"Close to the norm": "Bijna aan de norm",
|
|
7239
|
+
"Over the norm": "Over de norm",
|
|
7240
|
+
"{elapsed} of {norm}": "{elapsed} van {norm}",
|
|
7241
|
+
"Enter minutes, or minutes and seconds as 04:23.": "Vul minuten in, of minuten en seconden als 04:23.",
|
|
7242
7242
|
Rank: "Rang",
|
|
7243
7243
|
"Keep this one": "Deze houden",
|
|
7244
7244
|
"Keep the server one": "Die van de server",
|
|
@@ -14517,7 +14517,7 @@ function fillMyTeamToken(text, name) {
|
|
|
14517
14517
|
* @return {unknown} The value at the path, or undefined when a segment is missing.
|
|
14518
14518
|
* @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-primary-action-follows-the-stage
|
|
14519
14519
|
*/
|
|
14520
|
-
function readPath$
|
|
14520
|
+
function readPath$a(data, path) {
|
|
14521
14521
|
if (!path) {
|
|
14522
14522
|
return data
|
|
14523
14523
|
}
|
|
@@ -15224,7 +15224,7 @@ function resolveFilterValue(v, ctx) {
|
|
|
15224
15224
|
}
|
|
15225
15225
|
if (v.startsWith('@context.')) {
|
|
15226
15226
|
// @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$
|
|
15227
|
+
const found = ctx && ctx.context ? readPath$a(ctx.context, v.slice('@context.'.length)) : undefined;
|
|
15228
15228
|
return found === undefined ? v : found
|
|
15229
15229
|
}
|
|
15230
15230
|
if (v.startsWith('@workspace.')) {
|
|
@@ -21912,11 +21912,11 @@ function buildReferenceStages({
|
|
|
21912
21912
|
} = {}) {
|
|
21913
21913
|
const list = (Array.isArray(refs) ? refs : []).filter((ref) => ref && typeof ref === 'object' && refIdOf$1(ref) !== '');
|
|
21914
21914
|
const narrowed = narrowBy && narrowBy.field && narrowValue !== ''
|
|
21915
|
-
? list.filter((ref) => refIdOf$1(readPath$
|
|
21915
|
+
? list.filter((ref) => refIdOf$1(readPath$a(ref, narrowBy.field)) === String(narrowValue))
|
|
21916
21916
|
: list;
|
|
21917
21917
|
|
|
21918
21918
|
const orderOf = (ref) => {
|
|
21919
|
-
const n = Number(orderField ? readPath$
|
|
21919
|
+
const n = Number(orderField ? readPath$a(ref, orderField) : NaN);
|
|
21920
21920
|
return Number.isFinite(n) ? n : Number.MAX_SAFE_INTEGER
|
|
21921
21921
|
};
|
|
21922
21922
|
const ordered = narrowed
|
|
@@ -21929,8 +21929,8 @@ function buildReferenceStages({
|
|
|
21929
21929
|
const refsByKey = new Map();
|
|
21930
21930
|
for (const ref of ordered) {
|
|
21931
21931
|
const id = refIdOf$1(ref);
|
|
21932
|
-
const label = textOf(labelField ? readPath$
|
|
21933
|
-
const key = mergeBy ? (textOf(readPath$
|
|
21932
|
+
const label = textOf(labelField ? readPath$a(ref, labelField) : (ref.name ?? ref.title)) || id;
|
|
21933
|
+
const key = mergeBy ? (textOf(readPath$a(ref, mergeBy)) || id) : id;
|
|
21934
21934
|
keyByValue.set(id, key);
|
|
21935
21935
|
if (!refsByKey.has(key)) {
|
|
21936
21936
|
refsByKey.set(key, []);
|
|
@@ -21952,7 +21952,7 @@ function buildReferenceStages({
|
|
|
21952
21952
|
}
|
|
21953
21953
|
state.color = mappedColor(state.color, colorMap);
|
|
21954
21954
|
if (closedField) {
|
|
21955
|
-
state.closed = rows.every((ref) => Boolean(readPath$
|
|
21955
|
+
state.closed = rows.every((ref) => Boolean(readPath$a(ref, closedField)));
|
|
21956
21956
|
}
|
|
21957
21957
|
}
|
|
21958
21958
|
return { states, keyByValue, refsByKey }
|
|
@@ -21975,12 +21975,12 @@ function buildReferenceStages({
|
|
|
21975
21975
|
function flattenItemRefs(rows, { itemsPath, keyField } = {}) {
|
|
21976
21976
|
const out = [];
|
|
21977
21977
|
for (const parent of Array.isArray(rows) ? rows : []) {
|
|
21978
|
-
const items = readPath$
|
|
21978
|
+
const items = readPath$a(parent, itemsPath);
|
|
21979
21979
|
if (!Array.isArray(items)) {
|
|
21980
21980
|
continue
|
|
21981
21981
|
}
|
|
21982
21982
|
for (const item of items) {
|
|
21983
|
-
const key = item && typeof item === 'object' ? textOf(readPath$
|
|
21983
|
+
const key = item && typeof item === 'object' ? textOf(readPath$a(item, keyField)) : '';
|
|
21984
21984
|
if (key !== '') {
|
|
21985
21985
|
out.push({ ...item, id: key, _parent: refIdOf$1(parent) });
|
|
21986
21986
|
}
|
|
@@ -21997,7 +21997,7 @@ function flattenItemRefs(rows, { itemsPath, keyField } = {}) {
|
|
|
21997
21997
|
* @return {string} The colour, '' when it has none.
|
|
21998
21998
|
*/
|
|
21999
21999
|
function colorOfRef(ref, colorField) {
|
|
22000
|
-
const color = colorField ? readPath$
|
|
22000
|
+
const color = colorField ? readPath$a(ref, colorField) : ref.color;
|
|
22001
22001
|
return typeof color === 'string' ? color : ''
|
|
22002
22002
|
}
|
|
22003
22003
|
|
|
@@ -22046,7 +22046,7 @@ function mappedColor(color, colorMap) {
|
|
|
22046
22046
|
* @spec openspec/changes/board-column-capacity/specs/board-view/spec.md#requirement-a-column-can-carry-a-capacity
|
|
22047
22047
|
*/
|
|
22048
22048
|
function capacityOfRef(ref, capacityField) {
|
|
22049
|
-
return capacityField ? capacityValue(readPath$
|
|
22049
|
+
return capacityField ? capacityValue(readPath$a(ref, capacityField)) : null
|
|
22050
22050
|
}
|
|
22051
22051
|
|
|
22052
22052
|
/**
|
|
@@ -22072,7 +22072,7 @@ function fullTargetOf({ target, card, rows = [], field, capacityField, rowKey =
|
|
|
22072
22072
|
}
|
|
22073
22073
|
const id = refIdOf$1(target);
|
|
22074
22074
|
const self = String(card?.[rowKey] ?? '');
|
|
22075
|
-
const count = (Array.isArray(rows) ? rows : []).filter((row) => String(row?.[rowKey] ?? '') !== self && refIdOf$1(readPath$
|
|
22075
|
+
const count = (Array.isArray(rows) ? rows : []).filter((row) => String(row?.[rowKey] ?? '') !== self && refIdOf$1(readPath$a(row, field)) === id).length;
|
|
22076
22076
|
return count >= capacity ? { count, capacity } : null
|
|
22077
22077
|
}
|
|
22078
22078
|
|
|
@@ -22092,7 +22092,7 @@ function buildValueStages({ rows = [], field = '', valueLabels = null, emptyLabe
|
|
|
22092
22092
|
const labels = valueLabels && typeof valueLabels === 'object' ? valueLabels : {};
|
|
22093
22093
|
const seen = new Map();
|
|
22094
22094
|
for (const row of Array.isArray(rows) ? rows : []) {
|
|
22095
|
-
const raw = readPath$
|
|
22095
|
+
const raw = readPath$a(row, field);
|
|
22096
22096
|
const id = refIdOf$1(raw);
|
|
22097
22097
|
if (id !== '' && !seen.has(id)) {
|
|
22098
22098
|
seen.set(id, typeof labels[id] === 'string' ? labels[id] : (textOf(raw) || id));
|
|
@@ -22117,7 +22117,7 @@ function buildValueStages({ rows = [], field = '', valueLabels = null, emptyLabe
|
|
|
22117
22117
|
* (which lands the card in the off-board column).
|
|
22118
22118
|
*/
|
|
22119
22119
|
function columnKeyOfRow(row, field, keyByValue) {
|
|
22120
|
-
const id = refIdOf$1(readPath$
|
|
22120
|
+
const id = refIdOf$1(readPath$a(row, field));
|
|
22121
22121
|
return keyByValue.has(id) ? keyByValue.get(id) : id
|
|
22122
22122
|
}
|
|
22123
22123
|
|
|
@@ -22144,8 +22144,8 @@ function resolveDropValue({ card, toKey, kind, refsByKey = new Map(), narrowBy =
|
|
|
22144
22144
|
return null
|
|
22145
22145
|
}
|
|
22146
22146
|
if (narrowBy && narrowBy.field && narrowBy.rowField) {
|
|
22147
|
-
const parent = refIdOf$1(readPath$
|
|
22148
|
-
const match = candidates.find((ref) => refIdOf$1(readPath$
|
|
22147
|
+
const parent = refIdOf$1(readPath$a(card, narrowBy.rowField));
|
|
22148
|
+
const match = candidates.find((ref) => refIdOf$1(readPath$a(ref, narrowBy.field)) === parent);
|
|
22149
22149
|
return match ? { value: refIdOf$1(match), target: match } : null
|
|
22150
22150
|
}
|
|
22151
22151
|
return { value: refIdOf$1(candidates[0]), target: candidates[0] }
|
|
@@ -23369,7 +23369,7 @@ function isCurrencyCode(value) {
|
|
|
23369
23369
|
* @param {string} path The path, e.g. `currency` or `price.currency`.
|
|
23370
23370
|
* @return {unknown} The value, or undefined.
|
|
23371
23371
|
*/
|
|
23372
|
-
function readPath$
|
|
23372
|
+
function readPath$9(object, path) {
|
|
23373
23373
|
return String(path).split('.').reduce((acc, key) => (acc && typeof acc === 'object' ? acc[key] : undefined), object)
|
|
23374
23374
|
}
|
|
23375
23375
|
|
|
@@ -23396,7 +23396,7 @@ function readPath$8(object, path) {
|
|
|
23396
23396
|
function resolveFormatCurrency(format, configCtx, object = null) {
|
|
23397
23397
|
const fmt = format || {};
|
|
23398
23398
|
if (typeof fmt.currencyField === 'string' && fmt.currencyField !== '' && object && typeof object === 'object') {
|
|
23399
|
-
const own = readPath$
|
|
23399
|
+
const own = readPath$9(object, fmt.currencyField);
|
|
23400
23400
|
if (isCurrencyCode(own)) {
|
|
23401
23401
|
return own.toUpperCase()
|
|
23402
23402
|
}
|
|
@@ -23713,16 +23713,16 @@ function pivotCells(records, config) {
|
|
|
23713
23713
|
if (!record || typeof record !== 'object') {
|
|
23714
23714
|
continue
|
|
23715
23715
|
}
|
|
23716
|
-
const row = keyOf$2(readPath$
|
|
23717
|
-
const column = keyOf$2(readPath$
|
|
23716
|
+
const row = keyOf$2(readPath$a(record, cfg.rowField));
|
|
23717
|
+
const column = keyOf$2(readPath$a(record, cfg.columnField));
|
|
23718
23718
|
if (row === null || column === null) {
|
|
23719
23719
|
continue
|
|
23720
23720
|
}
|
|
23721
|
-
note(rows, row, cfg.rowLabelField ? keyOf$2(readPath$
|
|
23722
|
-
note(columns, column, cfg.columnLabelField ? keyOf$2(readPath$
|
|
23721
|
+
note(rows, row, cfg.rowLabelField ? keyOf$2(readPath$a(record, cfg.rowLabelField)) : null, cfg.rowOrderField ? readPath$a(record, cfg.rowOrderField) : undefined);
|
|
23722
|
+
note(columns, column, cfg.columnLabelField ? keyOf$2(readPath$a(record, cfg.columnLabelField)) : null, cfg.columnOrderField ? readPath$a(record, cfg.columnOrderField) : undefined);
|
|
23723
23723
|
const cell = `${row}\u0000${column}`;
|
|
23724
23724
|
if (!cells.has(cell)) {
|
|
23725
|
-
const value = readPath$
|
|
23725
|
+
const value = readPath$a(record, cfg.valueField);
|
|
23726
23726
|
cells.set(cell, value === undefined ? null : value);
|
|
23727
23727
|
}
|
|
23728
23728
|
}
|
|
@@ -23762,12 +23762,12 @@ function pivotCells(records, config) {
|
|
|
23762
23762
|
*/
|
|
23763
23763
|
function cellsFromRecord(record, config, cellFilter = {}) {
|
|
23764
23764
|
const cfg = config && typeof config === 'object' ? config : {};
|
|
23765
|
-
const list = record ? readPath$
|
|
23765
|
+
const list = record ? readPath$a(record, cfg.cellsPath) : null;
|
|
23766
23766
|
const wanted = Object.entries(cellFilter && typeof cellFilter === 'object' ? cellFilter : {});
|
|
23767
23767
|
const cells = (Array.isArray(list) ? list : []).filter((cell) => cell && typeof cell === 'object'
|
|
23768
|
-
&& wanted.every(([field, value]) => keyOf$2(readPath$
|
|
23768
|
+
&& wanted.every(([field, value]) => keyOf$2(readPath$a(cell, field)) === keyOf$2(value)));
|
|
23769
23769
|
const axis = (path) => {
|
|
23770
|
-
const value = record && path ? readPath$
|
|
23770
|
+
const value = record && path ? readPath$a(record, path) : null;
|
|
23771
23771
|
return Array.isArray(value) ? value : undefined
|
|
23772
23772
|
};
|
|
23773
23773
|
return {
|
|
@@ -31918,11 +31918,11 @@ var script$8S = {
|
|
|
31918
31918
|
}
|
|
31919
31919
|
const sortField = badge.sortField || '';
|
|
31920
31920
|
const time = (row) => {
|
|
31921
|
-
const value = sortField ? Date.parse(readPath$
|
|
31921
|
+
const value = sortField ? Date.parse(readPath$a(row, sortField)) : NaN;
|
|
31922
31922
|
return Number.isNaN(value) ? 0 : value
|
|
31923
31923
|
};
|
|
31924
31924
|
const latest = [...this.badgeRows].sort((a, b) => time(b) - time(a))[0];
|
|
31925
|
-
const raw = readPath$
|
|
31925
|
+
const raw = readPath$a(latest, badge.path || 'status');
|
|
31926
31926
|
if (raw === undefined || raw === null || raw === '') {
|
|
31927
31927
|
return ''
|
|
31928
31928
|
}
|
|
@@ -31999,17 +31999,17 @@ var script$8S = {
|
|
|
31999
31999
|
const statusMap = c.statusMap && typeof c.statusMap === 'object' ? c.statusMap : {};
|
|
32000
32000
|
const stored = this.rawMessages()
|
|
32001
32001
|
.map(({ message, side, key }, index) => {
|
|
32002
|
-
const channel = c.channelField ? readPath$
|
|
32002
|
+
const channel = c.channelField ? readPath$a(message, c.channelField) : undefined;
|
|
32003
32003
|
const channelKey = channel === undefined || channel === null ? '' : String(channel);
|
|
32004
|
-
const status = c.statusField ? readPath$
|
|
32004
|
+
const status = c.statusField ? readPath$a(message, c.statusField) : undefined;
|
|
32005
32005
|
const statusKey = status === undefined || status === null ? '' : String(status);
|
|
32006
|
-
const sideOf = side || (String(readPath$
|
|
32006
|
+
const sideOf = side || (String(readPath$a(message, c.directionField || c.sideField || 'side')) === usValue ? 'us' : 'them');
|
|
32007
32007
|
return {
|
|
32008
32008
|
id: key,
|
|
32009
32009
|
author: this.authorOf(message, sideOf),
|
|
32010
|
-
subject: c.subjectField ? this.textOf(readPath$
|
|
32010
|
+
subject: c.subjectField ? this.textOf(readPath$a(message, c.subjectField)) : '',
|
|
32011
32011
|
note: this.noteOf(message),
|
|
32012
|
-
time: readPath$
|
|
32012
|
+
time: readPath$a(message, c.timestampField || c.timeField || 'time'),
|
|
32013
32013
|
text: this.bodyOf(message),
|
|
32014
32014
|
side: sideOf,
|
|
32015
32015
|
channel: channelKey === '' ? '' : this.tr(Object.hasOwn(channelMap, channelKey) ? channelMap[channelKey] : channelKey),
|
|
@@ -32221,8 +32221,8 @@ var script$8S = {
|
|
|
32221
32221
|
rawMessages() {
|
|
32222
32222
|
const c = this.content || {};
|
|
32223
32223
|
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$
|
|
32224
|
+
? 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 }))
|
|
32225
|
+
: [{ list: this.source ? this.listed : readPath$a(this.objectData || {}, c.field || 'messages'), side: '', prefix: 'message' }];
|
|
32226
32226
|
return lists.flatMap(({ list, side, prefix }) => (Array.isArray(list) ? list : [])
|
|
32227
32227
|
.filter((message) => message && typeof message === 'object')
|
|
32228
32228
|
.map((message, index) => ({ message, side, key: String(message.id ?? `${prefix}-${index}`) })))
|
|
@@ -32241,7 +32241,7 @@ var script$8S = {
|
|
|
32241
32241
|
if (!when || typeof when !== 'object' || typeof when.field !== 'string') {
|
|
32242
32242
|
return true
|
|
32243
32243
|
}
|
|
32244
|
-
const value = readPath$
|
|
32244
|
+
const value = readPath$a(message, when.field);
|
|
32245
32245
|
if (when.empty === true) {
|
|
32246
32246
|
return value === undefined || value === null || value === ''
|
|
32247
32247
|
}
|
|
@@ -32299,7 +32299,7 @@ var script$8S = {
|
|
|
32299
32299
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
32300
32300
|
const path = action.endpoint
|
|
32301
32301
|
.replace(/@objectId/g, encodeURIComponent(String(this.objectId ?? '')))
|
|
32302
|
-
.replace(/\{([\w.]+)\}/g, (_m, field) => encodeURIComponent(String(readPath$
|
|
32302
|
+
.replace(/\{([\w.]+)\}/g, (_m, field) => encodeURIComponent(String(readPath$a(stored.message, field) ?? '')));
|
|
32303
32303
|
const response = await axios.request({ method: String(action.method || 'POST').toLowerCase(), url: generateUrl(path) });
|
|
32304
32304
|
if (await this.followUp(action, response?.data)) {
|
|
32305
32305
|
return
|
|
@@ -32334,7 +32334,7 @@ var script$8S = {
|
|
|
32334
32334
|
if (!map || typeof map !== 'object' || !answer || typeof answer !== 'object') {
|
|
32335
32335
|
return false
|
|
32336
32336
|
}
|
|
32337
|
-
const status = readPath$
|
|
32337
|
+
const status = readPath$a(answer, action.errors?.path || 'status');
|
|
32338
32338
|
const next = status === undefined || status === null ? null : map[String(status)];
|
|
32339
32339
|
if (!next || typeof next !== 'object') {
|
|
32340
32340
|
return false
|
|
@@ -32364,7 +32364,7 @@ var script$8S = {
|
|
|
32364
32364
|
if (!errors || typeof errors !== 'object' || !answer || typeof answer !== 'object') {
|
|
32365
32365
|
return ''
|
|
32366
32366
|
}
|
|
32367
|
-
const status = readPath$
|
|
32367
|
+
const status = readPath$a(answer, errors.path || 'status');
|
|
32368
32368
|
if (status === undefined || status === null || (errors.ok || ['sent', 'ok']).map(String).includes(String(status))) {
|
|
32369
32369
|
return ''
|
|
32370
32370
|
}
|
|
@@ -32388,8 +32388,8 @@ var script$8S = {
|
|
|
32388
32388
|
const c = this.content || {};
|
|
32389
32389
|
const field = (side === 'us' ? c.usAuthorField : c.themAuthorField) || c.senderField || c.authorField || 'author';
|
|
32390
32390
|
const value = typeof field === 'string' && field.startsWith('@object.')
|
|
32391
|
-
? readPath$
|
|
32392
|
-
: readPath$
|
|
32391
|
+
? readPath$a(this.objectData || {}, field.slice('@object.'.length))
|
|
32392
|
+
: readPath$a(message, field);
|
|
32393
32393
|
const text = this.textOf(value);
|
|
32394
32394
|
const format = side === 'us' ? c.usAuthorFormat : c.themAuthorFormat;
|
|
32395
32395
|
return format === 'user' && text !== '' ? (userDisplayName(text) || text) : text
|
|
@@ -32408,10 +32408,10 @@ var script$8S = {
|
|
|
32408
32408
|
const c = this.content || {};
|
|
32409
32409
|
const fields = c.bodyField || c.textField || 'text';
|
|
32410
32410
|
if (!Array.isArray(fields)) {
|
|
32411
|
-
return readPath$
|
|
32411
|
+
return readPath$a(message, fields)
|
|
32412
32412
|
}
|
|
32413
32413
|
for (const field of fields) {
|
|
32414
|
-
const value = readPath$
|
|
32414
|
+
const value = readPath$a(message, field);
|
|
32415
32415
|
if (value !== undefined && value !== null && value !== '') {
|
|
32416
32416
|
return value
|
|
32417
32417
|
}
|
|
@@ -32429,8 +32429,8 @@ var script$8S = {
|
|
|
32429
32429
|
*/
|
|
32430
32430
|
noteOf(message) {
|
|
32431
32431
|
const c = this.content || {};
|
|
32432
|
-
const note = c.noteField ? this.textOf(readPath$
|
|
32433
|
-
const count = c.attachmentCountField ? Number(readPath$
|
|
32432
|
+
const note = c.noteField ? this.textOf(readPath$a(message, c.noteField)) : '';
|
|
32433
|
+
const count = c.attachmentCountField ? Number(readPath$a(message, c.attachmentCountField)) : 0;
|
|
32434
32434
|
const attachments = Number.isFinite(count) && count > 0 ? l10n.translatePlural('nextcloud-vue', '%n attachment', '%n attachments', count) : '';
|
|
32435
32435
|
return [note, attachments].filter((part) => part !== '').join(', ')
|
|
32436
32436
|
},
|
|
@@ -34085,14 +34085,14 @@ var script$8M = {
|
|
|
34085
34085
|
return (Array.isArray(this.documents) ? this.documents : [])
|
|
34086
34086
|
.filter((document) => document && typeof document === 'object')
|
|
34087
34087
|
.map((document, index) => {
|
|
34088
|
-
const raw = readPath$
|
|
34088
|
+
const raw = readPath$a(document, this.statusField);
|
|
34089
34089
|
const wanted = raw === null || raw === undefined ? '' : String(raw).toLowerCase();
|
|
34090
34090
|
const status = this.effectiveStatuses.find((candidate) => candidate.value.toLowerCase() === wanted)
|
|
34091
34091
|
|| this.fallbackStatus;
|
|
34092
|
-
const name = readPath$
|
|
34093
|
-
const key = readPath$
|
|
34094
|
-
const href = readPath$
|
|
34095
|
-
const meta = readPath$
|
|
34092
|
+
const name = readPath$a(document, this.nameField) || document.title || document.filename || '';
|
|
34093
|
+
const key = readPath$a(document, this.rowKey);
|
|
34094
|
+
const href = readPath$a(document, this.hrefField);
|
|
34095
|
+
const meta = readPath$a(document, this.metaField);
|
|
34096
34096
|
return {
|
|
34097
34097
|
key: key === undefined || key === null ? `row-${index}` : String(key),
|
|
34098
34098
|
name: String(name),
|
|
@@ -34296,7 +34296,7 @@ var script$8L = {
|
|
|
34296
34296
|
* @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-document-review-list
|
|
34297
34297
|
*/
|
|
34298
34298
|
documents() {
|
|
34299
|
-
const value = readPath$
|
|
34299
|
+
const value = readPath$a(this.objectData || {}, this.content.field || 'documents');
|
|
34300
34300
|
return Array.isArray(value) ? value : []
|
|
34301
34301
|
},
|
|
34302
34302
|
|
|
@@ -34322,7 +34322,7 @@ var script$8L = {
|
|
|
34322
34322
|
*/
|
|
34323
34323
|
onRowAction(document) {
|
|
34324
34324
|
const route = this.content.rowAction?.route;
|
|
34325
|
-
const id = readPath$
|
|
34325
|
+
const id = readPath$a(document, this.content.rowKey || 'id');
|
|
34326
34326
|
if (typeof route !== 'string' || route === '' || !this.$router || id === undefined || id === null) {
|
|
34327
34327
|
return
|
|
34328
34328
|
}
|
|
@@ -34717,24 +34717,24 @@ function optionFromRow(row, from = {}) {
|
|
|
34717
34717
|
return row === '' ? null : { id: row, label: String(row) }
|
|
34718
34718
|
}
|
|
34719
34719
|
const id = typeof from.valueField === 'string' && from.valueField !== ''
|
|
34720
|
-
? readPath$
|
|
34720
|
+
? readPath$a(row, from.valueField)
|
|
34721
34721
|
: (row.id ?? row['@self']?.id ?? row.uuid);
|
|
34722
34722
|
if (id === null || id === undefined || id === '' || typeof id === 'object') {
|
|
34723
34723
|
return null
|
|
34724
34724
|
}
|
|
34725
34725
|
const label = typeof from.labelField === 'string' && from.labelField !== ''
|
|
34726
|
-
? readPath$
|
|
34726
|
+
? readPath$a(row, from.labelField)
|
|
34727
34727
|
: (row.title || row.name);
|
|
34728
34728
|
const option = { id, label: label === null || label === undefined || label === '' ? String(id) : String(label) };
|
|
34729
34729
|
// `keepFields`: values of the row the option carries along as `data`.
|
|
34730
34730
|
if (Array.isArray(from.keepFields) && from.keepFields.length > 0) {
|
|
34731
34731
|
option.data = Object.fromEntries(from.keepFields
|
|
34732
34732
|
.filter((field) => typeof field === 'string' && field !== '')
|
|
34733
|
-
.map((field) => [field, readPath$
|
|
34733
|
+
.map((field) => [field, readPath$a(row, field)]));
|
|
34734
34734
|
}
|
|
34735
34735
|
// `groupField`: the option's group, which keeps options of one group together.
|
|
34736
34736
|
if (typeof from.groupField === 'string' && from.groupField !== '') {
|
|
34737
|
-
const group = readPath$
|
|
34737
|
+
const group = readPath$a(row, from.groupField);
|
|
34738
34738
|
if (group !== null && group !== undefined && group !== '') {
|
|
34739
34739
|
option.group = String(group);
|
|
34740
34740
|
}
|
|
@@ -34786,11 +34786,11 @@ async function loadOptionsFrom(from, ctx = {}) {
|
|
|
34786
34786
|
function narrowRows(rows, from) {
|
|
34787
34787
|
let out = rows;
|
|
34788
34788
|
if (isPlainObject$d(from.where)) {
|
|
34789
|
-
out = out.filter((row) => row && typeof row === 'object' && Object.entries(from.where).every(([key, value]) => String(readPath$
|
|
34789
|
+
out = out.filter((row) => row && typeof row === 'object' && Object.entries(from.where).every(([key, value]) => String(readPath$a(row, key)) === String(value)));
|
|
34790
34790
|
}
|
|
34791
34791
|
if (typeof from.itemsPath === 'string' && from.itemsPath !== '') {
|
|
34792
34792
|
out = out.flatMap((row) => {
|
|
34793
|
-
const items = readPath$
|
|
34793
|
+
const items = readPath$a(row, from.itemsPath);
|
|
34794
34794
|
return Array.isArray(items) ? items : []
|
|
34795
34795
|
});
|
|
34796
34796
|
}
|
|
@@ -43150,14 +43150,14 @@ function objectRowsOf(object, spec) {
|
|
|
43150
43150
|
return []
|
|
43151
43151
|
}
|
|
43152
43152
|
const valuePath = typeof spec.valuePath === 'string' && spec.valuePath !== '' ? spec.valuePath : '';
|
|
43153
|
-
let value = readPath$
|
|
43153
|
+
let value = readPath$a(object, spec.path);
|
|
43154
43154
|
if (spec.where && typeof spec.where === 'object') {
|
|
43155
43155
|
const entries = Array.isArray(value) ? value : [];
|
|
43156
43156
|
const match = entries.find((entry) => entry && typeof entry === 'object'
|
|
43157
43157
|
&& Object.entries(spec.where).every(([key, wanted]) => entry[key] === wanted));
|
|
43158
|
-
value = match && valuePath ? readPath$
|
|
43158
|
+
value = match && valuePath ? readPath$a(match, valuePath) : match;
|
|
43159
43159
|
} else if (valuePath) {
|
|
43160
|
-
value = readPath$
|
|
43160
|
+
value = readPath$a(value, valuePath);
|
|
43161
43161
|
}
|
|
43162
43162
|
if (typeof value === 'string') {
|
|
43163
43163
|
try {
|
|
@@ -43203,7 +43203,7 @@ function stageOf(object, stageField = 'status') {
|
|
|
43203
43203
|
if (!object || typeof object !== 'object') {
|
|
43204
43204
|
return ''
|
|
43205
43205
|
}
|
|
43206
|
-
const value = readPath$
|
|
43206
|
+
const value = readPath$a(object, stageField || 'status');
|
|
43207
43207
|
if (value === null || value === undefined || typeof value === 'object') {
|
|
43208
43208
|
return ''
|
|
43209
43209
|
}
|
|
@@ -43356,7 +43356,7 @@ function isChecklistItemDone(item, object) {
|
|
|
43356
43356
|
return evaluateVisibleWhenLocal(item.doneWhen, data)
|
|
43357
43357
|
}
|
|
43358
43358
|
if (typeof item.doneField === 'string' && item.doneField !== '') {
|
|
43359
|
-
const value = readPath$
|
|
43359
|
+
const value = readPath$a(data, item.doneField);
|
|
43360
43360
|
return Array.isArray(value) ? value.length > 0 : Boolean(value)
|
|
43361
43361
|
}
|
|
43362
43362
|
return false
|
|
@@ -43523,7 +43523,7 @@ function resolveTabCount(tab, object) {
|
|
|
43523
43523
|
const unread = counts && typeof counts === 'object' && typeof key === 'string' ? Number(counts[key]) : 0;
|
|
43524
43524
|
return Number.isFinite(unread) && unread > 0 ? unread : null
|
|
43525
43525
|
}
|
|
43526
|
-
const value = readPath$
|
|
43526
|
+
const value = readPath$a(object && typeof object === 'object' ? object : {}, tab.countField);
|
|
43527
43527
|
if (Array.isArray(value)) {
|
|
43528
43528
|
return value.length
|
|
43529
43529
|
}
|
|
@@ -44795,7 +44795,7 @@ function fillTemplate(template, object, now = new Date(), context = null) {
|
|
|
44795
44795
|
}
|
|
44796
44796
|
let missing = false;
|
|
44797
44797
|
const text = template.replace(TOKEN$1, (_match, path, format, arg) => {
|
|
44798
|
-
const value = object && typeof object === 'object' ? readPath$
|
|
44798
|
+
const value = object && typeof object === 'object' ? readPath$a(object, path) : undefined;
|
|
44799
44799
|
const shown = formatValue(value, format || '', now, arg || '', object, context && context.config ? context.config : null, context && context.formatters ? context.formatters : null);
|
|
44800
44800
|
if (shown === '') {
|
|
44801
44801
|
missing = true;
|
|
@@ -47015,7 +47015,7 @@ function cellsOf(rows, rowId) {
|
|
|
47015
47015
|
* @param {Function} [readValue] How a path is read off the row; `readPath` by default.
|
|
47016
47016
|
* @return {object} The filter map.
|
|
47017
47017
|
*/
|
|
47018
|
-
function resolveRowWhere(where, row, readValue = readPath$
|
|
47018
|
+
function resolveRowWhere(where, row, readValue = readPath$a) {
|
|
47019
47019
|
const out = {};
|
|
47020
47020
|
for (const [key, value] of Object.entries(where || {})) {
|
|
47021
47021
|
out[key] = typeof value === 'string' && value.startsWith('@self.') ? readValue(row, value.slice('@self.'.length)) : value;
|
|
@@ -47031,7 +47031,7 @@ function resolveRowWhere(where, row, readValue = readPath$9) {
|
|
|
47031
47031
|
* @param {Function} [readValue] How a path is read off the row.
|
|
47032
47032
|
* @return {Promise<number|unknown|null>} The count, the highest value, or null when there is none.
|
|
47033
47033
|
*/
|
|
47034
|
-
async function fetchRowAggregate(agg, row, readValue = readPath$
|
|
47034
|
+
async function fetchRowAggregate(agg, row, readValue = readPath$a) {
|
|
47035
47035
|
const where = resolveRowWhere(agg.where, row, readValue);
|
|
47036
47036
|
const isMax = agg.op === 'max';
|
|
47037
47037
|
const params = isMax
|
|
@@ -47041,7 +47041,7 @@ async function fetchRowAggregate(agg, row, readValue = readPath$9) {
|
|
|
47041
47041
|
const data = res && res.data;
|
|
47042
47042
|
if (isMax) {
|
|
47043
47043
|
const first = data && Array.isArray(data.results) ? data.results[0] : undefined;
|
|
47044
|
-
const top = first === undefined ? undefined : readPath$
|
|
47044
|
+
const top = first === undefined ? undefined : readPath$a(first, agg.field);
|
|
47045
47045
|
return top === undefined || top === '' ? null : top
|
|
47046
47046
|
}
|
|
47047
47047
|
return (data && (data.total ?? (Array.isArray(data.results) ? data.results.length : undefined))) ?? 0
|
|
@@ -47274,7 +47274,7 @@ function resolveRowIndicators(indicators, row, cap = DEFAULT_ROW_INDICATOR_CAP)
|
|
|
47274
47274
|
* @param {Function} [readValue] How a path is read off the row.
|
|
47275
47275
|
* @return {string} The id.
|
|
47276
47276
|
*/
|
|
47277
|
-
function refIdOf(row, spec, readValue = readPath$
|
|
47277
|
+
function refIdOf(row, spec, readValue = readPath$a) {
|
|
47278
47278
|
const value = spec && typeof spec.field === 'string' ? readValue(row, spec.field) : undefined;
|
|
47279
47279
|
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
47280
47280
|
}
|
|
@@ -47317,7 +47317,7 @@ async function readReferenced(spec, id) {
|
|
|
47317
47317
|
* @param {Function} [readValue] How a path is read off a row.
|
|
47318
47318
|
* @return {Promise<object>} `{ [alias]: { [id]: record } }`; an unreadable id is absent.
|
|
47319
47319
|
*/
|
|
47320
|
-
async function loadSecondaryRefs(refs, rows, readValue = readPath$
|
|
47320
|
+
async function loadSecondaryRefs(refs, rows, readValue = readPath$a) {
|
|
47321
47321
|
const out = {};
|
|
47322
47322
|
const jobs = [];
|
|
47323
47323
|
for (const [alias, spec] of Object.entries(refs || {})) {
|
|
@@ -47348,7 +47348,7 @@ async function loadSecondaryRefs(refs, rows, readValue = readPath$9) {
|
|
|
47348
47348
|
* @param {Function} [readValue] How a path is read off the row.
|
|
47349
47349
|
* @return {object} The row and its references.
|
|
47350
47350
|
*/
|
|
47351
|
-
function rowWithRefs(row, refs, loaded, readValue = readPath$
|
|
47351
|
+
function rowWithRefs(row, refs, loaded, readValue = readPath$a) {
|
|
47352
47352
|
const out = { ...row };
|
|
47353
47353
|
for (const [alias, spec] of Object.entries(refs || {})) {
|
|
47354
47354
|
const id = refIdOf(row, spec, readValue);
|
|
@@ -47729,7 +47729,7 @@ var script$8y = {
|
|
|
47729
47729
|
if (templated !== '') {
|
|
47730
47730
|
return templated
|
|
47731
47731
|
}
|
|
47732
|
-
const candidates = [this.labelPath ? readPath$
|
|
47732
|
+
const candidates = [this.labelPath ? readPath$a(obj, this.labelPath) : undefined, obj[this.labelField], obj.title, obj['@self'] && obj['@self'].name];
|
|
47733
47733
|
for (const raw of candidates) {
|
|
47734
47734
|
if (typeof raw === 'string' && raw !== '') {
|
|
47735
47735
|
return raw
|
|
@@ -48774,7 +48774,7 @@ var script$8w = {
|
|
|
48774
48774
|
progressPercent() {
|
|
48775
48775
|
const props = this.widgetProps || {};
|
|
48776
48776
|
const fallbacks = Array.isArray(props.fallbackFields) ? props.fallbackFields : [];
|
|
48777
|
-
const candidates = [this.value, ...fallbacks.map((field) => readPath$
|
|
48777
|
+
const candidates = [this.value, ...fallbacks.map((field) => readPath$a(this.row || {}, field))];
|
|
48778
48778
|
const raw = candidates.find((v) => v !== null && v !== undefined && v !== '' && !Number.isNaN(Number(v)));
|
|
48779
48779
|
if (raw === undefined) {
|
|
48780
48780
|
return null
|
|
@@ -48822,12 +48822,12 @@ var script$8w = {
|
|
|
48822
48822
|
const row = this.row || {};
|
|
48823
48823
|
const when = badge.when && typeof badge.when === 'object' ? badge.when : {};
|
|
48824
48824
|
for (const [field, expected] of Object.entries(when)) {
|
|
48825
|
-
const actual = readPath$
|
|
48825
|
+
const actual = readPath$a(row, field);
|
|
48826
48826
|
if (actual !== undefined && actual !== null && actual !== '' && String(actual) !== String(expected)) {
|
|
48827
48827
|
return null
|
|
48828
48828
|
}
|
|
48829
48829
|
}
|
|
48830
|
-
const days = ageInDays(readPath$
|
|
48830
|
+
const days = ageInDays(readPath$a(row, badge.dateField || '@self.updated'));
|
|
48831
48831
|
const after = Number(badge.afterDays);
|
|
48832
48832
|
if (days === null || !Number.isFinite(after) || days < after) {
|
|
48833
48833
|
return null
|
|
@@ -48981,7 +48981,7 @@ var script$8w = {
|
|
|
48981
48981
|
if (!field || !this.row) {
|
|
48982
48982
|
return null
|
|
48983
48983
|
}
|
|
48984
|
-
const ref = readPath$
|
|
48984
|
+
const ref = readPath$a(this.row, field);
|
|
48985
48985
|
const empty = ref === null || ref === undefined || ref === '' || (Array.isArray(ref) && ref.length === 0);
|
|
48986
48986
|
return empty || (typeof ref === 'object' && !Array.isArray(ref)) ? null : ref
|
|
48987
48987
|
},
|
|
@@ -103700,7 +103700,7 @@ function fillAuditLabel(label, entry, { actor = '', object = null, valueLabels =
|
|
|
103700
103700
|
.replace('{state}', (entry && entry.stateAfter) || '')
|
|
103701
103701
|
.replace(/\{changed\.([\w.-]+)\}/g, (match, key) => changedValue(entry, key, valueLabels))
|
|
103702
103702
|
.replace(/\{object\.([\w.-]+)\}/g, (match, path) => {
|
|
103703
|
-
const value = object ? readPath$
|
|
103703
|
+
const value = object ? readPath$a(object, path) : undefined;
|
|
103704
103704
|
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
103705
103705
|
})
|
|
103706
103706
|
}
|
|
@@ -122073,7 +122073,7 @@ async function resolveObjectFolderInfo({ apiBase, register, schema, objectId, ui
|
|
|
122073
122073
|
* @param {string} path A dotted path; empty answers the value itself.
|
|
122074
122074
|
* @return {(Array|object|string|number|boolean|null|undefined)} What sits at the path, or undefined.
|
|
122075
122075
|
*/
|
|
122076
|
-
function readPath$
|
|
122076
|
+
function readPath$8(value, path) {
|
|
122077
122077
|
if (typeof path !== 'string' || path === '') {
|
|
122078
122078
|
return value
|
|
122079
122079
|
}
|
|
@@ -122097,7 +122097,7 @@ function readPath$7(value, path) {
|
|
|
122097
122097
|
* @return {object} The records by file id.
|
|
122098
122098
|
*/
|
|
122099
122099
|
function indexRowData(data, { path = '', key = 'fileId' } = {}) {
|
|
122100
|
-
let picked = readPath$
|
|
122100
|
+
let picked = readPath$8(data, path);
|
|
122101
122101
|
if (picked && typeof picked === 'object' && !Array.isArray(picked)) {
|
|
122102
122102
|
if (Array.isArray(picked.items)) {
|
|
122103
122103
|
picked = picked.items;
|
|
@@ -125094,7 +125094,7 @@ var script$7s = {
|
|
|
125094
125094
|
const entry = byId[node.fileid] ?? byId[String(node.fileid)] ?? {};
|
|
125095
125095
|
const out = {};
|
|
125096
125096
|
for (const [prop, field] of Object.entries(wanted)) {
|
|
125097
|
-
const value = readPath$
|
|
125097
|
+
const value = readPath$a(entry, String(field));
|
|
125098
125098
|
if (value !== undefined && value !== null && value !== '') {
|
|
125099
125099
|
out[prop] = value;
|
|
125100
125100
|
}
|
|
@@ -148959,7 +148959,7 @@ function endpointSource(declared = {}, context = {}) {
|
|
|
148959
148959
|
*/
|
|
148960
148960
|
function fillRowTemplate(template, row) {
|
|
148961
148961
|
return String(template).replace(/\{([\w.@]+)\}/g, (match, path) => {
|
|
148962
|
-
const value = readPath$
|
|
148962
|
+
const value = readPath$a(row, path);
|
|
148963
148963
|
return value === undefined || value === null ? '' : encodeURIComponent(String(value))
|
|
148964
148964
|
})
|
|
148965
148965
|
}
|
|
@@ -149054,7 +149054,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149054
149054
|
const labels = new Map();
|
|
149055
149055
|
for (const object of objects) {
|
|
149056
149056
|
const id = object.id || object.uuid || (object['@self'] && object['@self'].id);
|
|
149057
|
-
const label = readPath$
|
|
149057
|
+
const label = readPath$a(object, resolve.labelField || 'title') ?? object.name;
|
|
149058
149058
|
if (id !== undefined && label !== undefined && label !== null) {
|
|
149059
149059
|
labels.set(String(id), String(label));
|
|
149060
149060
|
}
|
|
@@ -149098,7 +149098,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149098
149098
|
return fillTemplate(translate(kind.linkedTemplate), object)
|
|
149099
149099
|
}
|
|
149100
149100
|
if (kind.linkedField) {
|
|
149101
|
-
const value = readPath$
|
|
149101
|
+
const value = readPath$a(object, kind.linkedField);
|
|
149102
149102
|
return value === undefined || value === null ? '' : String(value)
|
|
149103
149103
|
}
|
|
149104
149104
|
return ''
|
|
@@ -149115,7 +149115,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149115
149115
|
const labels = new Map();
|
|
149116
149116
|
for (const object of objects) {
|
|
149117
149117
|
const id = object.id || object.uuid || (object['@self'] && object['@self'].id);
|
|
149118
|
-
const label = readPath$
|
|
149118
|
+
const label = readPath$a(object, resolve.labelField || 'title') ?? object.name;
|
|
149119
149119
|
if (id !== undefined && label !== undefined && label !== null) {
|
|
149120
149120
|
labels.set(String(id), String(label));
|
|
149121
149121
|
}
|
|
@@ -149127,11 +149127,11 @@ function searchSource(config = {}, context = {}) {
|
|
|
149127
149127
|
if (kind.subtitleTemplate) {
|
|
149128
149128
|
const resolve = kind.subtitleResolve;
|
|
149129
149129
|
const data = labels && resolve
|
|
149130
|
-
? { ...object, [resolve.as || resolve.field]: labels.get(String(readPath$
|
|
149130
|
+
? { ...object, [resolve.as || resolve.field]: labels.get(String(readPath$a(object, resolve.field) ?? '')) ?? '' }
|
|
149131
149131
|
: object;
|
|
149132
149132
|
return fillTemplate(translate(kind.subtitleTemplate), data)
|
|
149133
149133
|
}
|
|
149134
|
-
return kind.subtitleField ? String(readPath$
|
|
149134
|
+
return kind.subtitleField ? String(readPath$a(object, kind.subtitleField) ?? '') : ''
|
|
149135
149135
|
};
|
|
149136
149136
|
|
|
149137
149137
|
// `linkedUser`: the Linked cell holds a user id; name the user instead.
|
|
@@ -149153,7 +149153,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149153
149153
|
total: typeof body.total === 'number' ? body.total : results.length,
|
|
149154
149154
|
rows: results.map((object) => {
|
|
149155
149155
|
const id = object.id || object.uuid || (object['@self'] && object['@self'].id);
|
|
149156
|
-
const rawStatus = kind.statusField ? readPath$
|
|
149156
|
+
const rawStatus = kind.statusField ? readPath$a(object, kind.statusField) : undefined;
|
|
149157
149157
|
const status = rawStatus === undefined || rawStatus === null
|
|
149158
149158
|
? ''
|
|
149159
149159
|
: (labels ? (labels.get(String(rawStatus)) || '') : String(rawStatus));
|
|
@@ -149162,7 +149162,7 @@ function searchSource(config = {}, context = {}) {
|
|
|
149162
149162
|
kind: kind.id,
|
|
149163
149163
|
kindLabel: kind.label,
|
|
149164
149164
|
kindText: kindTextOf(kind, object),
|
|
149165
|
-
title: String(readPath$
|
|
149165
|
+
title: String(readPath$a(object, kind.titleField || 'title') ?? object.name ?? id ?? ''),
|
|
149166
149166
|
subtitle: subtitleOf(kind, object, subtitleNames),
|
|
149167
149167
|
status,
|
|
149168
149168
|
linked: userNames ? (userNames.get(linkedOf(kind, object)) || linkedOf(kind, object)) : linkedOf(kind, object),
|
|
@@ -155715,7 +155715,7 @@ function spreadDottedFields(data, fields) {
|
|
|
155715
155715
|
if (!field || !isDottedKey(field.key)) {
|
|
155716
155716
|
continue
|
|
155717
155717
|
}
|
|
155718
|
-
const value = readPath$
|
|
155718
|
+
const value = readPath$a(out, field.key);
|
|
155719
155719
|
if (value !== undefined) {
|
|
155720
155720
|
out[field.key] = value;
|
|
155721
155721
|
}
|
|
@@ -159661,7 +159661,7 @@ var script$6E = {
|
|
|
159661
159661
|
const prefix = field.key + '.';
|
|
159662
159662
|
for (const other of this.resolvedFields) {
|
|
159663
159663
|
if (other.key.startsWith(prefix)) {
|
|
159664
|
-
const value = on ? readPath$
|
|
159664
|
+
const value = on ? readPath$a(defaults, other.key.slice(prefix.length)) : undefined;
|
|
159665
159665
|
this.updateField(other.key, value === undefined ? null : value);
|
|
159666
159666
|
}
|
|
159667
159667
|
}
|
|
@@ -162279,7 +162279,7 @@ var CnFormDialog = /*#__PURE__*/Object.freeze({
|
|
|
162279
162279
|
* @param {string} path Dotted path.
|
|
162280
162280
|
* @return {*} The value, or undefined.
|
|
162281
162281
|
*/
|
|
162282
|
-
function readPath$
|
|
162282
|
+
function readPath$7(obj, path) {
|
|
162283
162283
|
return String(path).split('.').reduce((cur, k) => (cur !== null && cur !== undefined && typeof cur === 'object' ? cur[k] : undefined), obj)
|
|
162284
162284
|
}
|
|
162285
162285
|
|
|
@@ -162319,7 +162319,7 @@ function pickRefLabel(obj, labelField) {
|
|
|
162319
162319
|
if (!path) {
|
|
162320
162320
|
continue
|
|
162321
162321
|
}
|
|
162322
|
-
const text = asText(path.includes('.') ? readPath$
|
|
162322
|
+
const text = asText(path.includes('.') ? readPath$7(obj, path) : obj[path]);
|
|
162323
162323
|
if (text !== '') {
|
|
162324
162324
|
return text
|
|
162325
162325
|
}
|
|
@@ -162339,7 +162339,7 @@ function pickRefField(obj, field) {
|
|
|
162339
162339
|
if (!obj || typeof obj !== 'object' || !field) {
|
|
162340
162340
|
return null
|
|
162341
162341
|
}
|
|
162342
|
-
const text = asText(readPath$
|
|
162342
|
+
const text = asText(readPath$7(obj, field));
|
|
162343
162343
|
return text !== '' ? text : null
|
|
162344
162344
|
}
|
|
162345
162345
|
|
|
@@ -162561,7 +162561,7 @@ function fillCountLabel(label, total, rows) {
|
|
|
162561
162561
|
.replace(/\{total\}/g, String(total))
|
|
162562
162562
|
.replace(/\{count:([^=}]+)=([^}]*)\}/g, (match, field, value) => {
|
|
162563
162563
|
const wanted = value.trim();
|
|
162564
|
-
return String((rows || []).filter((row) => String(readPath$
|
|
162564
|
+
return String((rows || []).filter((row) => String(readPath$a(row, field.trim())) === wanted).length)
|
|
162565
162565
|
})
|
|
162566
162566
|
}
|
|
162567
162567
|
|
|
@@ -162882,7 +162882,7 @@ const WHOLE_TOKEN = /^@row\.([A-Za-z0-9_.@-]+)$/;
|
|
|
162882
162882
|
* @return {string} The text.
|
|
162883
162883
|
*/
|
|
162884
162884
|
function rowText(row, path) {
|
|
162885
|
-
const value = readPath$
|
|
162885
|
+
const value = readPath$a(row, path);
|
|
162886
162886
|
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' ? String(value) : ''
|
|
162887
162887
|
}
|
|
162888
162888
|
|
|
@@ -165084,12 +165084,12 @@ var script$6C = {
|
|
|
165084
165084
|
return rows
|
|
165085
165085
|
.filter((row) => row && typeof row.path === 'string' && row.path !== '')
|
|
165086
165086
|
.map((row, index) => {
|
|
165087
|
-
const raw = readPath$
|
|
165087
|
+
const raw = readPath$a(record, row.path);
|
|
165088
165088
|
const value = row.format === 'currency'
|
|
165089
165089
|
? formatMoney(raw, { currency: row.currency, currencyField: row.currencyField }, record, null)
|
|
165090
165090
|
: (raw === null || raw === undefined ? '' : String(raw));
|
|
165091
165091
|
const label = tr(String(row.label || row.path)).replace(/\{([\w.@-]+)\}/g, (match, path) => {
|
|
165092
|
-
const filled = readPath$
|
|
165092
|
+
const filled = readPath$a(record, path);
|
|
165093
165093
|
return filled === null || filled === undefined || typeof filled === 'object' ? '' : String(filled)
|
|
165094
165094
|
});
|
|
165095
165095
|
return { key: `${index}-${row.path}`, label, value, emphasis: row.emphasis === true }
|
|
@@ -165486,7 +165486,7 @@ var script$6C = {
|
|
|
165486
165486
|
}
|
|
165487
165487
|
const where = config.where && typeof config.where === 'object' ? Object.entries(config.where) : [];
|
|
165488
165488
|
const matches = (row) => where.every(([field, want]) => {
|
|
165489
|
-
const value = readPath$
|
|
165489
|
+
const value = readPath$a(row, field);
|
|
165490
165490
|
return Array.isArray(want) ? want.map(String).includes(String(value)) : String(value) === String(want)
|
|
165491
165491
|
});
|
|
165492
165492
|
this.readOnlyRows = (Array.isArray(data) ? data : [])
|
|
@@ -166447,7 +166447,7 @@ var script$6C = {
|
|
|
166447
166447
|
const byField = this.content.rowRouteField && row ? (this.content.rowRouteMap || {})[String(row[this.content.rowRouteField])] : undefined;
|
|
166448
166448
|
const route = byField || this.content.rowRoute;
|
|
166449
166449
|
const field = this.content.rowIdField || this.content.rowRouteIdField;
|
|
166450
|
-
const raw = field ? readPath$
|
|
166450
|
+
const raw = field ? readPath$a(row, field) : row && (row.id || (row['@self'] && row['@self'].id));
|
|
166451
166451
|
const id = typeof raw === 'string' || typeof raw === 'number' ? String(raw) : '';
|
|
166452
166452
|
if (route && id && this.$router) {
|
|
166453
166453
|
markNewTabHandled(event, openRowTarget(event, { name: route, params: { id } }, this.$router));
|
|
@@ -171484,11 +171484,11 @@ var script$6w = {
|
|
|
171484
171484
|
if (answer === undefined) {
|
|
171485
171485
|
continue
|
|
171486
171486
|
}
|
|
171487
|
-
data = (link.path ? readPath$
|
|
171487
|
+
data = (link.path ? readPath$a(answer, link.path) : answer) || {};
|
|
171488
171488
|
}
|
|
171489
171489
|
let complete = true;
|
|
171490
171490
|
const label = this.translateLabel(link.label).replace(/\{([\w.]+)\}/g, (token, key) => {
|
|
171491
|
-
const value = readPath$
|
|
171491
|
+
const value = readPath$a(data, key);
|
|
171492
171492
|
if (value === undefined || value === null || value === '') {
|
|
171493
171493
|
complete = false;
|
|
171494
171494
|
return ''
|
|
@@ -172697,7 +172697,7 @@ var script$6w = {
|
|
|
172697
172697
|
try {
|
|
172698
172698
|
const url = router.generateUrl(interpolateUrlTokens(source.endpoint, { objectId: this.resolvedId, object: this.safeObjectData }));
|
|
172699
172699
|
const { data } = await axios.get(url);
|
|
172700
|
-
const list = source.path ? readPath$
|
|
172700
|
+
const list = source.path ? readPath$a(data, source.path) : data;
|
|
172701
172701
|
sections.push(...this.sectionsOf(source, Array.isArray(list) ? list : [], index));
|
|
172702
172702
|
} catch (error) {
|
|
172703
172703
|
// eslint-disable-next-line no-console
|
|
@@ -172705,7 +172705,7 @@ var script$6w = {
|
|
|
172705
172705
|
}
|
|
172706
172706
|
}));
|
|
172707
172707
|
await Promise.all(references.map(async (ref) => {
|
|
172708
|
-
const id = ref && ref.field ? readPath$
|
|
172708
|
+
const id = ref && ref.field ? readPath$a(this.safeObjectData, ref.field) : '';
|
|
172709
172709
|
if (typeof id !== 'string' || id.trim() === '' || id === String(this.resolvedId) || !ref.register || !ref.schema) {
|
|
172710
172710
|
return
|
|
172711
172711
|
}
|
|
@@ -172713,7 +172713,7 @@ var script$6w = {
|
|
|
172713
172713
|
const { data } = await axios.get(router.generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}', { register: ref.register, schema: ref.schema, id: id.trim() }));
|
|
172714
172714
|
const label = (ref.labelTemplate
|
|
172715
172715
|
? this.fillRow(ref.labelTemplate, data || {})
|
|
172716
|
-
: String(readPath$
|
|
172716
|
+
: String(readPath$a(data || {}, ref.labelField || 'title') ?? '')).trim();
|
|
172717
172717
|
if (label === '' || BARE_UUID.test(label)) {
|
|
172718
172718
|
return
|
|
172719
172719
|
}
|
|
@@ -172824,7 +172824,7 @@ var script$6w = {
|
|
|
172824
172824
|
*/
|
|
172825
172825
|
childrenFor(source, row) {
|
|
172826
172826
|
const spec = source.children;
|
|
172827
|
-
const list = spec && spec.path ? readPath$
|
|
172827
|
+
const list = spec && spec.path ? readPath$a(row, spec.path) : null;
|
|
172828
172828
|
if (!Array.isArray(list)) {
|
|
172829
172829
|
return []
|
|
172830
172830
|
}
|
|
@@ -172848,7 +172848,7 @@ var script$6w = {
|
|
|
172848
172848
|
async runSourceAction(action, raw) {
|
|
172849
172849
|
const row = raw && raw.row ? raw.row : raw;
|
|
172850
172850
|
const path = interpolateUrlTokens(action.endpoint, { objectId: this.resolvedId, object: this.safeObjectData })
|
|
172851
|
-
.replace(/\{([\w.@]+)\}/g, (_match, field) => encodeURIComponent(String(readPath$
|
|
172851
|
+
.replace(/\{([\w.@]+)\}/g, (_match, field) => encodeURIComponent(String(readPath$a(row, field) ?? '')));
|
|
172852
172852
|
this.runningAction = path;
|
|
172853
172853
|
this.sourceActionError = '';
|
|
172854
172854
|
try {
|
|
@@ -174198,7 +174198,7 @@ var script$6t = {
|
|
|
174198
174198
|
return false
|
|
174199
174199
|
}
|
|
174200
174200
|
const values = Array.isArray(this.content.archivedValues) ? this.content.archivedValues.map(String) : ['archived'];
|
|
174201
|
-
const saysArchived = values.includes(String(readPath$
|
|
174201
|
+
const saysArchived = values.includes(String(readPath$a(this.record, field) ?? ''));
|
|
174202
174202
|
return saysArchived !== Boolean(this.archived)
|
|
174203
174203
|
},
|
|
174204
174204
|
|
|
@@ -174235,7 +174235,7 @@ var script$6t = {
|
|
|
174235
174235
|
return null
|
|
174236
174236
|
}
|
|
174237
174237
|
const fields = { appraisal: 'appraisal', period: 'period', selectionListRow: 'selectionListRow', ...(this.content.expected?.fields || {}) };
|
|
174238
|
-
const pick = (row, key) => String(readPath$
|
|
174238
|
+
const pick = (row, key) => String(readPath$a(row, fields[key]) ?? '');
|
|
174239
174239
|
const outcomes = rows.map((row) => ({ appraisal: pick(row, 'appraisal'), period: pick(row, 'period'), selectionListRow: pick(row, 'selectionListRow') }));
|
|
174240
174240
|
const first = outcomes[0];
|
|
174241
174241
|
const agree = outcomes.every((o) => o.appraisal === first.appraisal && o.period === first.period);
|
|
@@ -177357,7 +177357,7 @@ const DECLARED_WIDGETS = ['text', 'textarea', 'number', 'date', 'select', 'templ
|
|
|
177357
177357
|
* @param {unknown} value The value.
|
|
177358
177358
|
* @return {string|null}
|
|
177359
177359
|
*/
|
|
177360
|
-
function text$
|
|
177360
|
+
function text$2(value) {
|
|
177361
177361
|
return typeof value === 'string' && value.trim() !== '' ? value.trim() : null
|
|
177362
177362
|
}
|
|
177363
177363
|
|
|
@@ -177379,7 +177379,7 @@ function declaredOptions(options) {
|
|
|
177379
177379
|
&& String(option.value).trim() !== '')
|
|
177380
177380
|
.map((option) => ({
|
|
177381
177381
|
value: String(option.value),
|
|
177382
|
-
label: text$
|
|
177382
|
+
label: text$2(option.label) || String(option.value),
|
|
177383
177383
|
}));
|
|
177384
177384
|
return usable.length > 0 ? usable : null
|
|
177385
177385
|
}
|
|
@@ -177402,11 +177402,11 @@ function normaliseInputs(declared) {
|
|
|
177402
177402
|
required: input.required === true,
|
|
177403
177403
|
picker: input.picker && typeof input.picker === 'object' ? input.picker : null,
|
|
177404
177404
|
fields: Array.isArray(input.fields) ? input.fields.filter((f) => typeof f === 'string') : null,
|
|
177405
|
-
label: text$
|
|
177405
|
+
label: text$2(input.label),
|
|
177406
177406
|
options: declaredOptions(input.options),
|
|
177407
177407
|
widget: DECLARED_WIDGETS.includes(input.widget) ? input.widget : null,
|
|
177408
|
-
optionsSource: text$
|
|
177409
|
-
other: input.other && typeof input.other === 'object' && text$
|
|
177408
|
+
optionsSource: text$2(input.optionsSource),
|
|
177409
|
+
other: input.other && typeof input.other === 'object' && text$2(input.other.label) ? input.other : null,
|
|
177410
177410
|
}))
|
|
177411
177411
|
}
|
|
177412
177412
|
|
|
@@ -177438,9 +177438,9 @@ function clampWidget(widget) {
|
|
|
177438
177438
|
* @return {{options: Array<{value: string, label: string}>, rows: Array<object>}}
|
|
177439
177439
|
*/
|
|
177440
177440
|
function sourcedOptions(input, context) {
|
|
177441
|
-
const list = readPath$
|
|
177442
|
-
const valueKey = text$
|
|
177443
|
-
const labelKey = text$
|
|
177441
|
+
const list = readPath$a(context || {}, input.optionsSource);
|
|
177442
|
+
const valueKey = text$2(input.optionValue) || 'value';
|
|
177443
|
+
const labelKey = text$2(input.optionLabel) || 'label';
|
|
177444
177444
|
const options = [];
|
|
177445
177445
|
const rows = [];
|
|
177446
177446
|
for (const row of Array.isArray(list) ? list : []) {
|
|
@@ -177449,7 +177449,7 @@ function sourcedOptions(input, context) {
|
|
|
177449
177449
|
continue
|
|
177450
177450
|
}
|
|
177451
177451
|
const label = row && typeof row === 'object' ? row[labelKey] : null;
|
|
177452
|
-
options.push({ value: String(value), label: text$
|
|
177452
|
+
options.push({ value: String(value), label: text$2(label) || String(value) });
|
|
177453
177453
|
rows.push(row);
|
|
177454
177454
|
}
|
|
177455
177455
|
return { options, rows }
|
|
@@ -177498,7 +177498,7 @@ function objectField(input, prop) {
|
|
|
177498
177498
|
function baseField(input, resolved, { schema, register, context }) {
|
|
177499
177499
|
const field = resolved.find((f) => f.key === input.field);
|
|
177500
177500
|
const label = input.label || (field && field.label) || input.field;
|
|
177501
|
-
const description = text$
|
|
177501
|
+
const description = text$2(input.description) || (field && field.description) || '';
|
|
177502
177502
|
|
|
177503
177503
|
if (input.widget === 'template') {
|
|
177504
177504
|
return { key: input.field, label, description, widget: 'template', required: false }
|
|
@@ -178075,7 +178075,7 @@ var script$6n = {
|
|
|
178075
178075
|
if (!this.summary || typeof this.summary !== 'object') {
|
|
178076
178076
|
return false
|
|
178077
178077
|
}
|
|
178078
|
-
return !this.summary.when || Boolean(readPath$
|
|
178078
|
+
return !this.summary.when || Boolean(readPath$a(this.context, this.summary.when))
|
|
178079
178079
|
},
|
|
178080
178080
|
|
|
178081
178081
|
/** The summary card's second line. */
|
|
@@ -178118,7 +178118,7 @@ var script$6n = {
|
|
|
178118
178118
|
if (!path) {
|
|
178119
178119
|
return ''
|
|
178120
178120
|
}
|
|
178121
|
-
const value = readPath$
|
|
178121
|
+
const value = readPath$a(this.context, path);
|
|
178122
178122
|
return value === null || value === undefined ? '' : String(value)
|
|
178123
178123
|
},
|
|
178124
178124
|
|
|
@@ -189165,7 +189165,7 @@ var script$68 = {
|
|
|
189165
189165
|
}
|
|
189166
189166
|
if (empty === null && shown === 'duration' && raw !== null && raw !== undefined && raw !== '') {
|
|
189167
189167
|
// A term in words, with the extension at `extendBy` when the object holds one.
|
|
189168
|
-
const extension = typeof field.extendBy === 'string' ? readPath$
|
|
189168
|
+
const extension = typeof field.extendBy === 'string' ? readPath$a(this.objectData || {}, field.extendBy) : null;
|
|
189169
189169
|
values[field.key] = formatTermDuration(raw, extension);
|
|
189170
189170
|
continue
|
|
189171
189171
|
}
|
|
@@ -192555,7 +192555,7 @@ function pickDeclaredProps(component, bindings, label) {
|
|
|
192555
192555
|
* @return {string} The text, or '' when the field is empty.
|
|
192556
192556
|
*/
|
|
192557
192557
|
function plainTokenText(object, path, schema, translate) {
|
|
192558
|
-
const value = readPath$
|
|
192558
|
+
const value = readPath$a(object, path);
|
|
192559
192559
|
if (value === null || value === undefined || value === '' || typeof value === 'object') {
|
|
192560
192560
|
return ''
|
|
192561
192561
|
}
|
|
@@ -193831,7 +193831,7 @@ var script$63 = {
|
|
|
193831
193831
|
if (!node.startsWith('@subject.')) {
|
|
193832
193832
|
return node
|
|
193833
193833
|
}
|
|
193834
|
-
const value = this.conditionRow ? readPath$
|
|
193834
|
+
const value = this.conditionRow ? readPath$a(this.conditionRow, node.slice('@subject.'.length)) : undefined;
|
|
193835
193835
|
return value === undefined || value === null ? '' : String(value)
|
|
193836
193836
|
}
|
|
193837
193837
|
if (Array.isArray(node)) {
|
|
@@ -194230,7 +194230,7 @@ var script$62 = {
|
|
|
194230
194230
|
rows() {
|
|
194231
194231
|
const idField = this.content.idField || 'id';
|
|
194232
194232
|
return this.items.map((item) => {
|
|
194233
|
-
const id = String(readPath$
|
|
194233
|
+
const id = String(readPath$a(item, idField) ?? '');
|
|
194234
194234
|
return {
|
|
194235
194235
|
id,
|
|
194236
194236
|
title: (this.content.title ? fillTemplate(this.cnTranslate(this.content.title), item).trim() : '') || String(item.title || id),
|
|
@@ -194269,7 +194269,7 @@ var script$62 = {
|
|
|
194269
194269
|
this.error = '';
|
|
194270
194270
|
try {
|
|
194271
194271
|
const data = await fetchEndpointSource(this.content.source, {}, { force: true });
|
|
194272
|
-
const list = this.content.itemsPath ? readPath$
|
|
194272
|
+
const list = this.content.itemsPath ? readPath$a(data, this.content.itemsPath) : data;
|
|
194273
194273
|
this.items = Array.isArray(list) ? list.filter((item) => item && typeof item === 'object') : [];
|
|
194274
194274
|
} catch (failure) {
|
|
194275
194275
|
const body = failure && failure.response && failure.response.data;
|
|
@@ -199258,7 +199258,7 @@ const TIMELINE_COMPOSE = 'cn:timeline:compose';
|
|
|
199258
199258
|
* @param {string} path The path.
|
|
199259
199259
|
* @return {unknown} What is there, or undefined.
|
|
199260
199260
|
*/
|
|
199261
|
-
function readPath$
|
|
199261
|
+
function readPath$6(value, path) {
|
|
199262
199262
|
return String(path).split('.').reduce((at, key) => (at === null || at === undefined ? undefined : at[key]), value)
|
|
199263
199263
|
}
|
|
199264
199264
|
|
|
@@ -199897,7 +199897,7 @@ var script$5T = {
|
|
|
199897
199897
|
if (value === '@objectId') {
|
|
199898
199898
|
out[key] = this.objectId;
|
|
199899
199899
|
} else if (typeof value === 'string' && value.startsWith('@row.')) {
|
|
199900
|
-
const found = readPath$
|
|
199900
|
+
const found = readPath$6(entry, value.slice('@row.'.length));
|
|
199901
199901
|
out[key] = found === undefined || found === null ? '' : found;
|
|
199902
199902
|
} else {
|
|
199903
199903
|
out[key] = value;
|
|
@@ -200370,7 +200370,7 @@ const __sfc_main$5N = script$5T;
|
|
|
200370
200370
|
* @param {string} path The dotted path.
|
|
200371
200371
|
* @return {unknown} The value, or undefined.
|
|
200372
200372
|
*/
|
|
200373
|
-
function readPath$
|
|
200373
|
+
function readPath$5(obj, path) {
|
|
200374
200374
|
if (!obj || typeof path !== 'string' || path === '') {
|
|
200375
200375
|
return undefined
|
|
200376
200376
|
}
|
|
@@ -200435,7 +200435,7 @@ function makeEvent(spec, now) {
|
|
|
200435
200435
|
function fieldEvents(object, fields, now = new Date()) {
|
|
200436
200436
|
return (Array.isArray(fields) ? fields : [])
|
|
200437
200437
|
.filter((f) => f && typeof f.field === 'string')
|
|
200438
|
-
.map((f) => makeEvent({ id: `field:${f.field}`, raw: readPath$
|
|
200438
|
+
.map((f) => makeEvent({ id: `field:${f.field}`, raw: readPath$5(object, f.field), label: f.label || f.field, source: 'field' }, now))
|
|
200439
200439
|
.filter(Boolean)
|
|
200440
200440
|
}
|
|
200441
200441
|
|
|
@@ -200458,7 +200458,7 @@ function textAt(row, path) {
|
|
|
200458
200458
|
if (!path) {
|
|
200459
200459
|
return ''
|
|
200460
200460
|
}
|
|
200461
|
-
const value = readPath$
|
|
200461
|
+
const value = readPath$5(row, path);
|
|
200462
200462
|
return value === null || value === undefined ? '' : String(value)
|
|
200463
200463
|
}
|
|
200464
200464
|
|
|
@@ -200496,10 +200496,10 @@ function listEvents(object, lists, now = new Date()) {
|
|
|
200496
200496
|
return (Array.isArray(lists) ? lists : [])
|
|
200497
200497
|
.filter((l) => l && typeof l.field === 'string' && typeof l.dateField === 'string')
|
|
200498
200498
|
.flatMap((l) => {
|
|
200499
|
-
const rows = readPath$
|
|
200499
|
+
const rows = readPath$5(object, l.field);
|
|
200500
200500
|
return (Array.isArray(rows) ? rows : []).map((row, i) => makeEvent({
|
|
200501
200501
|
id: `list:${l.field}:${i}`,
|
|
200502
|
-
raw: readPath$
|
|
200502
|
+
raw: readPath$5(row, l.dateField),
|
|
200503
200503
|
label: wordedValue(textAt(row, l.labelField), l.valueLabels) || l.label || l.field,
|
|
200504
200504
|
detail: textAt(row, l.detailField),
|
|
200505
200505
|
source: 'list',
|
|
@@ -200532,10 +200532,10 @@ function relatedEvents(rows, config, now = new Date(), translate = (text) => tex
|
|
|
200532
200532
|
.map((row, i) => {
|
|
200533
200533
|
const self = (row && row['@self']) || {};
|
|
200534
200534
|
const id = String(self.id || row.id || i);
|
|
200535
|
-
const title = cfg.titleField ? readPath$
|
|
200535
|
+
const title = cfg.titleField ? readPath$5(row, cfg.titleField) : (row && (row.title || row.name)) || self.name;
|
|
200536
200536
|
return makeEvent({
|
|
200537
200537
|
id: `related:${cfg.schema || ''}:${id}`,
|
|
200538
|
-
raw: readPath$
|
|
200538
|
+
raw: readPath$5(row, dateField),
|
|
200539
200539
|
label: named ? fillTemplate(translate(cfg.label), row, now) : (cfg.label || ''),
|
|
200540
200540
|
detail: named || title === undefined || title === null ? '' : String(title),
|
|
200541
200541
|
source: 'related',
|
|
@@ -200624,7 +200624,7 @@ function endpointEvents(items, config, typeLabel, untitled, now = new Date()) {
|
|
|
200624
200624
|
const type = textAt(item, config.typeField || 'type');
|
|
200625
200625
|
return makeEvent({
|
|
200626
200626
|
id: `endpoint:${type}:${item.id ?? i}`,
|
|
200627
|
-
raw: readPath$
|
|
200627
|
+
raw: readPath$5(item, config.dateField || 'date'),
|
|
200628
200628
|
label: textAt(item, config.labelField || 'title') || untitled,
|
|
200629
200629
|
detail: detail.length > 120 ? detail.substring(0, 120) + '...' : detail,
|
|
200630
200630
|
meta: [type ? typeLabel(type) : '', textAt(item, config.userField || 'user')].filter(Boolean).join(' · '),
|
|
@@ -200922,7 +200922,7 @@ var script$5S = {
|
|
|
200922
200922
|
referenceKey() {
|
|
200923
200923
|
const resolve = this.content.resolve && typeof this.content.resolve === 'object' ? this.content.resolve : {};
|
|
200924
200924
|
const object = this.resolvedObject || {};
|
|
200925
|
-
return JSON.stringify(Object.keys(resolve).map((field) => [field, readPath$
|
|
200925
|
+
return JSON.stringify(Object.keys(resolve).map((field) => [field, readPath$a(object, field)]))
|
|
200926
200926
|
},
|
|
200927
200927
|
|
|
200928
200928
|
/**
|
|
@@ -201057,7 +201057,7 @@ var script$5S = {
|
|
|
201057
201057
|
const object = this.resolvedObject || {};
|
|
201058
201058
|
const found = {};
|
|
201059
201059
|
await Promise.all(Object.entries(resolve).map(async ([field, ref]) => {
|
|
201060
|
-
const id = readPath$
|
|
201060
|
+
const id = readPath$a(object, field);
|
|
201061
201061
|
if (!ref || typeof ref.schema !== 'string' || typeof id !== 'string' || id === '') {
|
|
201062
201062
|
return
|
|
201063
201063
|
}
|
|
@@ -201263,10 +201263,10 @@ var script$5S = {
|
|
|
201263
201263
|
this.loading = true;
|
|
201264
201264
|
try {
|
|
201265
201265
|
const { data } = await axios.get(generateUrl(source.url), { params });
|
|
201266
|
-
const items = readPath$
|
|
201266
|
+
const items = readPath$a(data || {}, source.itemsPath || 'items');
|
|
201267
201267
|
this.endpointItems = page === 1 ? (Array.isArray(items) ? items : []) : [...this.endpointItems, ...(Array.isArray(items) ? items : [])];
|
|
201268
|
-
this.endpointPage = Number(readPath$
|
|
201269
|
-
this.endpointPages = Number(readPath$
|
|
201268
|
+
this.endpointPage = Number(readPath$a(data || {}, source.pagePath || 'page')) || page;
|
|
201269
|
+
this.endpointPages = Number(readPath$a(data || {}, source.pagesPath || 'pages')) || 1;
|
|
201270
201270
|
this.failedSources = this.failedSources.filter((part) => part !== 'endpoint');
|
|
201271
201271
|
} catch {
|
|
201272
201272
|
if (page === 1) {
|
|
@@ -202015,7 +202015,7 @@ var script$5R = {
|
|
|
202015
202015
|
if (!def || typeof def.field !== 'string') {
|
|
202016
202016
|
return ''
|
|
202017
202017
|
}
|
|
202018
|
-
const date = formatBoardDate(readPath$
|
|
202018
|
+
const date = formatBoardDate(readPath$a(this.object, def.field));
|
|
202019
202019
|
if (date === '') {
|
|
202020
202020
|
return ''
|
|
202021
202021
|
}
|
|
@@ -202034,7 +202034,7 @@ var script$5R = {
|
|
|
202034
202034
|
if (!def || typeof def.field !== 'string' || typeof def.overdueVariant !== 'string' || def.overdueVariant === '') {
|
|
202035
202035
|
return ''
|
|
202036
202036
|
}
|
|
202037
|
-
return this.dueVariant(readPath$
|
|
202037
|
+
return this.dueVariant(readPath$a(this.object, def.field), {}) === 'error' ? def.overdueVariant : ''
|
|
202038
202038
|
},
|
|
202039
202039
|
|
|
202040
202040
|
/**
|
|
@@ -202074,7 +202074,7 @@ var script$5R = {
|
|
|
202074
202074
|
if (label === '') {
|
|
202075
202075
|
return null
|
|
202076
202076
|
}
|
|
202077
|
-
const raw = readPath$
|
|
202077
|
+
const raw = readPath$a(this.object, def.field);
|
|
202078
202078
|
const mapped = def.colorMap && typeof def.colorMap === 'object' ? def.colorMap[String(raw)] || def.colorMap[String(raw).toLowerCase()] : undefined;
|
|
202079
202079
|
const labels = def.labels && typeof def.labels === 'object' ? def.labels : {};
|
|
202080
202080
|
const shown = typeof labels[String(raw)] === 'string' ? this.cnTranslate(labels[String(raw)]) : label;
|
|
@@ -202196,13 +202196,13 @@ var script$5R = {
|
|
|
202196
202196
|
return { field: part.template, value: null, text: fillTemplate(this.cnTranslate(part.template), this.object), column: null }
|
|
202197
202197
|
}
|
|
202198
202198
|
if (typeof part === 'string' && part !== '') {
|
|
202199
|
-
return { field: part, value: readPath$
|
|
202199
|
+
return { field: part, value: readPath$a(this.object, part), text: this.layoutText(part), column: this.layoutColumn(part) }
|
|
202200
202200
|
}
|
|
202201
202201
|
if (!part || typeof part !== 'object' || typeof part.field !== 'string' || part.field === '') {
|
|
202202
202202
|
return null
|
|
202203
202203
|
}
|
|
202204
202204
|
const column = typeof part.formatter === 'string' ? { formatter: part.formatter, formatterOptions: part.formatterOptions } : null;
|
|
202205
|
-
return { field: part.field, value: readPath$
|
|
202205
|
+
return { field: part.field, value: readPath$a(this.object, part.field), text: this.layoutText(part.field, column), column }
|
|
202206
202206
|
},
|
|
202207
202207
|
|
|
202208
202208
|
/**
|
|
@@ -202217,7 +202217,7 @@ var script$5R = {
|
|
|
202217
202217
|
* @spec openspec/changes/card-list-chips/specs/object-card/spec.md
|
|
202218
202218
|
*/
|
|
202219
202219
|
listChips(def) {
|
|
202220
|
-
const items = readPath$
|
|
202220
|
+
const items = readPath$a(this.object, def.field);
|
|
202221
202221
|
if (!Array.isArray(items)) {
|
|
202222
202222
|
return []
|
|
202223
202223
|
}
|
|
@@ -202226,7 +202226,7 @@ var script$5R = {
|
|
|
202226
202226
|
.map((item, index) => {
|
|
202227
202227
|
const label = template !== ''
|
|
202228
202228
|
? fillTemplate(template, item || {})
|
|
202229
|
-
: String(readPath$
|
|
202229
|
+
: String(readPath$a(item || {}, def.each) ?? '');
|
|
202230
202230
|
const tone = Array.isArray(def.tones)
|
|
202231
202231
|
? def.tones.find((entry) => entry && entry.when && evaluateVisibleWhenLocal(entry.when, item || {}))
|
|
202232
202232
|
: undefined;
|
|
@@ -202248,7 +202248,7 @@ var script$5R = {
|
|
|
202248
202248
|
if (typeof field !== 'string' || field === '') {
|
|
202249
202249
|
return ''
|
|
202250
202250
|
}
|
|
202251
|
-
const value = readPath$
|
|
202251
|
+
const value = readPath$a(this.object, field);
|
|
202252
202252
|
if (value === null || value === undefined || value === '') {
|
|
202253
202253
|
return ''
|
|
202254
202254
|
}
|
|
@@ -202289,7 +202289,7 @@ var script$5R = {
|
|
|
202289
202289
|
* @return {?{label: string, variant: string}}
|
|
202290
202290
|
*/
|
|
202291
202291
|
datePill(def) {
|
|
202292
|
-
const value = readPath$
|
|
202292
|
+
const value = readPath$a(this.object, def.field);
|
|
202293
202293
|
const variant = Array.isArray(def.variantWhen)
|
|
202294
202294
|
? this.dateRuleVariant(value, def.variantWhen)
|
|
202295
202295
|
: this.dueVariant(value, def.due);
|
|
@@ -202379,7 +202379,7 @@ var script$5R = {
|
|
|
202379
202379
|
return pill
|
|
202380
202380
|
}
|
|
202381
202381
|
const looks = this.pillLooks[def.field];
|
|
202382
|
-
const raw = readPath$
|
|
202382
|
+
const raw = readPath$a(this.object, def.field);
|
|
202383
202383
|
const look = pillLook(looks && raw !== null && raw !== undefined ? looks[String(raw)] : null);
|
|
202384
202384
|
return { ...pill, ...(look.variant ? { variant: look.variant } : {}), ...(look.icon ? { icon: look.icon } : {}) }
|
|
202385
202385
|
},
|
|
@@ -207602,7 +207602,7 @@ var script$5G = {
|
|
|
207602
207602
|
rowRouteFn() {
|
|
207603
207603
|
return (row) => {
|
|
207604
207604
|
const id = this.rowIdField
|
|
207605
|
-
? readPath$
|
|
207605
|
+
? readPath$a(row, this.rowIdField)
|
|
207606
207606
|
: row && (row.id || (row['@self'] && row['@self'].id));
|
|
207607
207607
|
return id !== null && id !== undefined && id !== '' && typeof id !== 'object' ? { name: this.rowRoute, params: { id: String(id) } } : null
|
|
207608
207608
|
}
|
|
@@ -213924,11 +213924,11 @@ var script$5A = {
|
|
|
213924
213924
|
const nameField = source.nameField || 'displayName';
|
|
213925
213925
|
const countField = source.countField || 'count';
|
|
213926
213926
|
const people = this.rows
|
|
213927
|
-
.filter((row) => row && typeof row === 'object' && readPath$
|
|
213927
|
+
.filter((row) => row && typeof row === 'object' && readPath$a(row, userField))
|
|
213928
213928
|
.map((row) => {
|
|
213929
|
-
const id = String(readPath$
|
|
213930
|
-
const name = String(readPath$
|
|
213931
|
-
return { id, name, count: Number(readPath$
|
|
213929
|
+
const id = String(readPath$a(row, userField));
|
|
213930
|
+
const name = String(readPath$a(row, nameField) || id);
|
|
213931
|
+
return { id, name, count: Number(readPath$a(row, countField)) || 0 }
|
|
213932
213932
|
});
|
|
213933
213933
|
const capacity = Number(this.content?.capacity) > 0
|
|
213934
213934
|
? Number(this.content.capacity)
|
|
@@ -214017,7 +214017,7 @@ var script$5A = {
|
|
|
214017
214017
|
fetchStatuses(axios),
|
|
214018
214018
|
]);
|
|
214019
214019
|
const body = answer && answer.data;
|
|
214020
|
-
const rows = source.responsePath ? readPath$
|
|
214020
|
+
const rows = source.responsePath ? readPath$a(body, source.responsePath) : body;
|
|
214021
214021
|
this.rows = Array.isArray(rows) ? rows : [];
|
|
214022
214022
|
this.statuses = statuses || {};
|
|
214023
214023
|
} catch {
|
|
@@ -215235,7 +215235,7 @@ const __sfc_main$5s = script$5y;
|
|
|
215235
215235
|
* @param {string} path A dotted path.
|
|
215236
215236
|
* @return {unknown} The value at the path.
|
|
215237
215237
|
*/
|
|
215238
|
-
function readPath$
|
|
215238
|
+
function readPath$4(value, path) {
|
|
215239
215239
|
return String(path || '').split('.').filter(Boolean).reduce((acc, key) => (acc === null || acc === undefined ? undefined : acc[key]), value)
|
|
215240
215240
|
}
|
|
215241
215241
|
|
|
@@ -215395,7 +215395,7 @@ var script$5x = {
|
|
|
215395
215395
|
: (Array.isArray(data.groups) ? data.groups : [])
|
|
215396
215396
|
.filter((g) => g && g.key !== undefined)
|
|
215397
215397
|
.map((g) => ({ ...g, items: Array.isArray(g.items) ? g.items : [] }));
|
|
215398
|
-
const total = Number(this.content.totalPath ? readPath$
|
|
215398
|
+
const total = Number(this.content.totalPath ? readPath$4(data, this.content.totalPath) : NaN);
|
|
215399
215399
|
this.total = Number.isFinite(total) ? total : this.groups.reduce((sum, group) => sum + group.items.length, 0);
|
|
215400
215400
|
this.hidden = Array.isArray(data.hiddenGroups) ? data.hiddenGroups.map(String) : [];
|
|
215401
215401
|
this.unavailable = Array.isArray(data.unavailable) ? data.unavailable.filter((s) => s && s.source) : [];
|
|
@@ -215416,7 +215416,7 @@ var script$5x = {
|
|
|
215416
215416
|
* @return {Array<object>}
|
|
215417
215417
|
*/
|
|
215418
215418
|
flatGroups(data) {
|
|
215419
|
-
const list = readPath$
|
|
215419
|
+
const list = readPath$4(data, this.content.itemsPath);
|
|
215420
215420
|
const items = (Array.isArray(list) ? list : [])
|
|
215421
215421
|
.filter((item) => item && item.id !== undefined)
|
|
215422
215422
|
.map((item) => (item.route || !item.routeName ? item : { ...item, route: { name: item.routeName, params: { id: item.id } } }));
|
|
@@ -215430,7 +215430,7 @@ var script$5x = {
|
|
|
215430
215430
|
* @return {boolean}
|
|
215431
215431
|
*/
|
|
215432
215432
|
isLate(item) {
|
|
215433
|
-
return this.content.lateField ? Boolean(readPath$
|
|
215433
|
+
return this.content.lateField ? Boolean(readPath$4(item, this.content.lateField)) : item.deadlineTier === 'overdue'
|
|
215434
215434
|
},
|
|
215435
215435
|
|
|
215436
215436
|
/**
|
|
@@ -215440,7 +215440,7 @@ var script$5x = {
|
|
|
215440
215440
|
* @return {string}
|
|
215441
215441
|
*/
|
|
215442
215442
|
dueOf(item) {
|
|
215443
|
-
const value = readPath$
|
|
215443
|
+
const value = readPath$4(item, this.content.dueField || 'dueAt');
|
|
215444
215444
|
return value === null || value === undefined ? '' : String(value)
|
|
215445
215445
|
},
|
|
215446
215446
|
|
|
@@ -215455,7 +215455,7 @@ var script$5x = {
|
|
|
215455
215455
|
if (!kind || !kind.field || !kind.labels) {
|
|
215456
215456
|
return ''
|
|
215457
215457
|
}
|
|
215458
|
-
return this.text(kind.labels[readPath$
|
|
215458
|
+
return this.text(kind.labels[readPath$4(item, kind.field)])
|
|
215459
215459
|
},
|
|
215460
215460
|
|
|
215461
215461
|
/**
|
|
@@ -215465,7 +215465,7 @@ var script$5x = {
|
|
|
215465
215465
|
* @return {string}
|
|
215466
215466
|
*/
|
|
215467
215467
|
subText(item) {
|
|
215468
|
-
const value = this.content.subField ? readPath$
|
|
215468
|
+
const value = this.content.subField ? readPath$4(item, this.content.subField) : '';
|
|
215469
215469
|
return value === null || value === undefined ? '' : String(value)
|
|
215470
215470
|
},
|
|
215471
215471
|
|
|
@@ -247343,7 +247343,7 @@ function resolveSourceTokens(value, record) {
|
|
|
247343
247343
|
const walk = (node) => {
|
|
247344
247344
|
if (typeof node === 'string') {
|
|
247345
247345
|
return node.replace(/@source\.([\w.@]+)/g, (match, path) => {
|
|
247346
|
-
const read = path === 'id' ? (record.id ?? readPath$
|
|
247346
|
+
const read = path === 'id' ? (record.id ?? readPath$a(record, '@self.id')) : readPath$a(record, path);
|
|
247347
247347
|
if (read === undefined || read === null || read === '' || typeof read === 'object') {
|
|
247348
247348
|
unresolved = true;
|
|
247349
247349
|
return match
|
|
@@ -247625,7 +247625,7 @@ var script$4z = {
|
|
|
247625
247625
|
const rows = this.cnDetailVisibilityRows && typeof this.cnDetailVisibilityRows === 'object' && 'value' in this.cnDetailVisibilityRows
|
|
247626
247626
|
? this.cnDetailVisibilityRows.value
|
|
247627
247627
|
: this.cnDetailVisibilityRows;
|
|
247628
|
-
const named = readPath$
|
|
247628
|
+
const named = readPath$a({ '@context': rows || {} }, from);
|
|
247629
247629
|
const list = Array.isArray(named) ? named.filter((entry) => entry && typeof entry === 'object' && !Array.isArray(entry)) : [];
|
|
247630
247630
|
if (list.length > 0) {
|
|
247631
247631
|
return list
|
|
@@ -247788,11 +247788,11 @@ var script$4z = {
|
|
|
247788
247788
|
}
|
|
247789
247789
|
const path = this.content?.source?.path;
|
|
247790
247790
|
if (this.resolvedSource && !this.endpointRequest && typeof path === 'string' && path !== '' && record) {
|
|
247791
|
-
const inner = readPath$
|
|
247791
|
+
const inner = readPath$a(record, path);
|
|
247792
247792
|
record = inner && typeof inner === 'object' && !Array.isArray(inner) ? inner : null;
|
|
247793
247793
|
}
|
|
247794
247794
|
const emptyWhen = this.content?.emptyWhen;
|
|
247795
|
-
if (record && typeof emptyWhen === 'string' && emptyWhen !== '' && readPath$
|
|
247795
|
+
if (record && typeof emptyWhen === 'string' && emptyWhen !== '' && readPath$a(record, emptyWhen)) {
|
|
247796
247796
|
return null
|
|
247797
247797
|
}
|
|
247798
247798
|
return record
|
|
@@ -247936,7 +247936,7 @@ var script$4z = {
|
|
|
247936
247936
|
if (kind === 'lead') {
|
|
247937
247937
|
block.subtitle = this.partsValue(record, field.subtitle);
|
|
247938
247938
|
block.icon = typeof field.icon === 'string' ? field.icon : '';
|
|
247939
|
-
block.initials = block.icon ? '' : this.initialsOf(field.initialsFrom === 'title' ? value : readPath$
|
|
247939
|
+
block.initials = block.icon ? '' : this.initialsOf(field.initialsFrom === 'title' ? value : readPath$a(record, field.initialsPath));
|
|
247940
247940
|
block.size = Number.isFinite(Number(field.size)) && Number(field.size) > 0 ? Number(field.size) : 0;
|
|
247941
247941
|
block.tone = ['success', 'info', 'warning', 'error', 'teal'].includes(field.tone) ? field.tone : 'neutral';
|
|
247942
247942
|
block.card = field.card === true;
|
|
@@ -247956,7 +247956,7 @@ var script$4z = {
|
|
|
247956
247956
|
block.size = field.size;
|
|
247957
247957
|
}
|
|
247958
247958
|
if (kind === 'pill') {
|
|
247959
|
-
const raw = readPath$
|
|
247959
|
+
const raw = readPath$a(record, field.path);
|
|
247960
247960
|
const colours = field.variantMap || field.colorMap;
|
|
247961
247961
|
// A resolved pill looks its tone up by the referenced object's tone field,
|
|
247962
247962
|
// then by the resolved label, then by the stored value.
|
|
@@ -248042,7 +248042,7 @@ var script$4z = {
|
|
|
248042
248042
|
if (!pill || typeof pill !== 'object' || !this.record) {
|
|
248043
248043
|
return null
|
|
248044
248044
|
}
|
|
248045
|
-
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$
|
|
248045
|
+
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$a(this.record, pill.path) : undefined;
|
|
248046
248046
|
const mapped = pill.map && (typeof raw === 'string' || typeof raw === 'number') && Object.hasOwn(pill.map, raw) ? pill.map[raw] : undefined;
|
|
248047
248047
|
const text = mapped ?? pill.text ?? raw;
|
|
248048
248048
|
if (typeof text !== 'string' && typeof text !== 'number') {
|
|
@@ -248314,7 +248314,7 @@ var script$4z = {
|
|
|
248314
248314
|
* @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-a-facts-card-can-show-progress
|
|
248315
248315
|
*/
|
|
248316
248316
|
progressOf(record, field) {
|
|
248317
|
-
const raw = readPath$
|
|
248317
|
+
const raw = readPath$a(record, field.path);
|
|
248318
248318
|
const number = raw === null || raw === undefined || raw === '' ? NaN : Number(raw);
|
|
248319
248319
|
const barWhen = field.barWhen ? evaluateVisibleWhenLocal(field.barWhen, record) : true;
|
|
248320
248320
|
const percent = Number.isFinite(number) && barWhen ? Math.max(0, Math.min(100, number)) : null;
|
|
@@ -248367,8 +248367,8 @@ var script$4z = {
|
|
|
248367
248367
|
* @spec openspec/changes/facts-meter-row/specs/facts-meter-row/spec.md#requirement-a-facts-entry-can-be-a-meter
|
|
248368
248368
|
*/
|
|
248369
248369
|
meterOf(record, field) {
|
|
248370
|
-
const amount = Number(readPath$
|
|
248371
|
-
const rawLimit = typeof field.limitPath === 'string' && field.limitPath !== '' ? readPath$
|
|
248370
|
+
const amount = Number(readPath$a(record, field.path));
|
|
248371
|
+
const rawLimit = typeof field.limitPath === 'string' && field.limitPath !== '' ? readPath$a(record, field.limitPath) : field.limit;
|
|
248372
248372
|
const limit = rawLimit === null || rawLimit === undefined || rawLimit === '' ? NaN : Number(rawLimit);
|
|
248373
248373
|
const label = this.tr(field.label || '');
|
|
248374
248374
|
const value = this.valueOf(record, field);
|
|
@@ -248498,7 +248498,7 @@ var script$4z = {
|
|
|
248498
248498
|
templateValue(record, template) {
|
|
248499
248499
|
let filled = false;
|
|
248500
248500
|
const text = this.tr(template).replace(/\{([\w.@]+)(?::([\w-]+))?\}/g, (match, path, format) => {
|
|
248501
|
-
const value = this.format(readPath$
|
|
248501
|
+
const value = this.format(readPath$a(record, path), format ? { format } : {}, record);
|
|
248502
248502
|
filled = filled || value !== '';
|
|
248503
248503
|
return value
|
|
248504
248504
|
});
|
|
@@ -248516,7 +248516,7 @@ var script$4z = {
|
|
|
248516
248516
|
*/
|
|
248517
248517
|
answeredRows(record, hideEmpty) {
|
|
248518
248518
|
const path = this.content?.rowsPath;
|
|
248519
|
-
const items = typeof path === 'string' && path !== '' ? readPath$
|
|
248519
|
+
const items = typeof path === 'string' && path !== '' ? readPath$a(record, path) : null;
|
|
248520
248520
|
if (!Array.isArray(items)) {
|
|
248521
248521
|
return []
|
|
248522
248522
|
}
|
|
@@ -248659,7 +248659,7 @@ var script$4z = {
|
|
|
248659
248659
|
if (!spec || typeof spec !== 'object' || typeof spec.path !== 'string') {
|
|
248660
248660
|
return null
|
|
248661
248661
|
}
|
|
248662
|
-
const raw = readPath$
|
|
248662
|
+
const raw = readPath$a(record, spec.path);
|
|
248663
248663
|
if (raw === undefined || raw === null || raw === '') {
|
|
248664
248664
|
return null
|
|
248665
248665
|
}
|
|
@@ -248682,7 +248682,7 @@ var script$4z = {
|
|
|
248682
248682
|
if (!field.pill || typeof field.pill !== 'object') {
|
|
248683
248683
|
return ''
|
|
248684
248684
|
}
|
|
248685
|
-
const variant = (field.pill.variantMap || {})[String(readPath$
|
|
248685
|
+
const variant = (field.pill.variantMap || {})[String(readPath$a(record, field.path))];
|
|
248686
248686
|
return isBadgeVariant(variant) ? variant : 'default'
|
|
248687
248687
|
},
|
|
248688
248688
|
|
|
@@ -248728,7 +248728,7 @@ var script$4z = {
|
|
|
248728
248728
|
pill: this.rowPillOf(record, field),
|
|
248729
248729
|
icon: typeof field.icon === 'string' ? field.icon : '',
|
|
248730
248730
|
path: field.path || '',
|
|
248731
|
-
raw: readPath$
|
|
248731
|
+
raw: readPath$a(record, field.path),
|
|
248732
248732
|
copy: field.copy === true && value !== '',
|
|
248733
248733
|
reveal: false,
|
|
248734
248734
|
masked: '',
|
|
@@ -248839,7 +248839,7 @@ var script$4z = {
|
|
|
248839
248839
|
const rows = this.cnDetailVisibilityRows && typeof this.cnDetailVisibilityRows === 'object' && 'value' in this.cnDetailVisibilityRows
|
|
248840
248840
|
? this.cnDetailVisibilityRows.value
|
|
248841
248841
|
: this.cnDetailVisibilityRows;
|
|
248842
|
-
const named = readPath$
|
|
248842
|
+
const named = readPath$a({ ...(record || {}), '@context': rows || {} }, field.labelPath);
|
|
248843
248843
|
if (typeof named === 'string' && named.trim() !== '') {
|
|
248844
248844
|
return this.tr(named.trim())
|
|
248845
248845
|
}
|
|
@@ -248971,7 +248971,7 @@ var script$4z = {
|
|
|
248971
248971
|
*/
|
|
248972
248972
|
refIds(raw, spec) {
|
|
248973
248973
|
return (Array.isArray(raw) ? raw : [raw])
|
|
248974
|
-
.map((item) => (item && typeof item === 'object' ? (spec.itemPath ? readPath$
|
|
248974
|
+
.map((item) => (item && typeof item === 'object' ? (spec.itemPath ? readPath$a(item, spec.itemPath) : (item.id ?? item.uuid)) : item))
|
|
248975
248975
|
.filter((id) => id !== null && id !== undefined && id !== '' && typeof id !== 'object')
|
|
248976
248976
|
.map(String)
|
|
248977
248977
|
},
|
|
@@ -248991,9 +248991,9 @@ var script$4z = {
|
|
|
248991
248991
|
return
|
|
248992
248992
|
}
|
|
248993
248993
|
if (from && spec.resolve && typeof spec.resolve === 'object' && spec.path) {
|
|
248994
|
-
specs.push({ spec, raw: readPath$
|
|
248994
|
+
specs.push({ spec, raw: readPath$a(from, spec.path) });
|
|
248995
248995
|
if (toneSpec(spec)) {
|
|
248996
|
-
specs.push({ spec: toneSpec(spec), raw: readPath$
|
|
248996
|
+
specs.push({ spec: toneSpec(spec), raw: readPath$a(from, spec.path) });
|
|
248997
248997
|
}
|
|
248998
248998
|
}
|
|
248999
248999
|
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 +249158,7 @@ var script$4z = {
|
|
|
249158
249158
|
* @return {string}
|
|
249159
249159
|
*/
|
|
249160
249160
|
valueOf(record, field) {
|
|
249161
|
-
const raw = readPath$
|
|
249161
|
+
const raw = readPath$a(record, field.path);
|
|
249162
249162
|
return this.format(raw, field, record)
|
|
249163
249163
|
},
|
|
249164
249164
|
|
|
@@ -249183,7 +249183,7 @@ var script$4z = {
|
|
|
249183
249183
|
if (!spec.path && Array.isArray(spec.parts)) {
|
|
249184
249184
|
return this.lineValue(record, spec)
|
|
249185
249185
|
}
|
|
249186
|
-
const raw = readPath$
|
|
249186
|
+
const raw = readPath$a(record, spec.path);
|
|
249187
249187
|
if ((raw === null || raw === undefined || raw === '') && typeof spec.empty === 'string') {
|
|
249188
249188
|
return this.tr(spec.empty)
|
|
249189
249189
|
}
|
|
@@ -249243,7 +249243,7 @@ var script$4z = {
|
|
|
249243
249243
|
const format = spec.format || 'text';
|
|
249244
249244
|
if (format === 'list' || Array.isArray(raw)) {
|
|
249245
249245
|
const items = (Array.isArray(raw) ? raw : [raw])
|
|
249246
|
-
.map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath$
|
|
249246
|
+
.map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath$a(item, spec.itemPath) : item))
|
|
249247
249247
|
.map((item) => this.format(item, { ...spec, format: spec.itemFormat || 'text' }))
|
|
249248
249248
|
.filter((item) => item !== '');
|
|
249249
249249
|
return items.join(', ')
|
|
@@ -249269,7 +249269,7 @@ var script$4z = {
|
|
|
249269
249269
|
}
|
|
249270
249270
|
// A term in words, with the extension at `extendBy` on the record: "4 weken, te verdagen met 2".
|
|
249271
249271
|
if (format === 'duration') {
|
|
249272
|
-
return formatTermDuration(raw, typeof spec.extendBy === 'string' && record ? readPath$
|
|
249272
|
+
return formatTermDuration(raw, typeof spec.extendBy === 'string' && record ? readPath$a(record, spec.extendBy) : null)
|
|
249273
249273
|
}
|
|
249274
249274
|
// The month written out, the year only outside this year: "3 oktober".
|
|
249275
249275
|
// One segment of a path ("Team/Page"): its first or its last.
|
|
@@ -249380,7 +249380,7 @@ var script$4z = {
|
|
|
249380
249380
|
}
|
|
249381
249381
|
let unresolved = false;
|
|
249382
249382
|
const replaced = value.replace(/@source\.([\w.@]+)/g, (match, path) => {
|
|
249383
|
-
const read = record ? (path === 'id' ? (record.id ?? readPath$
|
|
249383
|
+
const read = record ? (path === 'id' ? (record.id ?? readPath$a(record, '@self.id')) : readPath$a(record, path)) : undefined;
|
|
249384
249384
|
if (read === undefined || read === null || read === '') {
|
|
249385
249385
|
unresolved = true;
|
|
249386
249386
|
return match
|
|
@@ -249411,7 +249411,7 @@ var script$4z = {
|
|
|
249411
249411
|
return null
|
|
249412
249412
|
}
|
|
249413
249413
|
const name = typeof route.nameField === 'string' && route.nameMap && typeof route.nameMap === 'object'
|
|
249414
|
-
? route.nameMap[String(readPath$
|
|
249414
|
+
? route.nameMap[String(readPath$a(record, route.nameField) ?? '')]
|
|
249415
249415
|
: route.name;
|
|
249416
249416
|
if (typeof name !== 'string' || name === '') {
|
|
249417
249417
|
return null
|
|
@@ -251174,7 +251174,7 @@ var script$4w = {
|
|
|
251174
251174
|
if (!frame.titleFrom?.field) {
|
|
251175
251175
|
return
|
|
251176
251176
|
}
|
|
251177
|
-
const value = readPath$
|
|
251177
|
+
const value = readPath$a(await this.firstOf(frame.titleFrom), frame.titleFrom.field);
|
|
251178
251178
|
if (typeof value === 'string' && value !== '') {
|
|
251179
251179
|
titles[index] = value;
|
|
251180
251180
|
}
|
|
@@ -251182,7 +251182,7 @@ var script$4w = {
|
|
|
251182
251182
|
this.readTitles = titles;
|
|
251183
251183
|
const synced = this.content?.status?.syncedFrom;
|
|
251184
251184
|
if (synced?.field) {
|
|
251185
|
-
const at = new Date(readPath$
|
|
251185
|
+
const at = new Date(readPath$a(await this.firstOf(synced, synced.field), synced.field) ?? '');
|
|
251186
251186
|
this.syncedTime = Number.isNaN(at.getTime()) ? '' : `${String(at.getHours()).padStart(2, '0')}:${String(at.getMinutes()).padStart(2, '0')}`;
|
|
251187
251187
|
}
|
|
251188
251188
|
},
|
|
@@ -251546,9 +251546,9 @@ var script$4v = {
|
|
|
251546
251546
|
*/
|
|
251547
251547
|
groups() {
|
|
251548
251548
|
const c = this.content || {};
|
|
251549
|
-
const listed = readPath$
|
|
251549
|
+
const listed = readPath$a(this.payload, c.groupsPath || 'groups');
|
|
251550
251550
|
const list = Array.isArray(listed) ? listed.filter((group) => group && typeof group === 'object') : [];
|
|
251551
|
-
const flat = typeof c.itemsPath === 'string' && c.itemsPath !== '' ? readPath$
|
|
251551
|
+
const flat = typeof c.itemsPath === 'string' && c.itemsPath !== '' ? readPath$a(this.payload, c.itemsPath) : null;
|
|
251552
251552
|
const groupField = typeof c.itemGroupField === 'string' && c.itemGroupField !== '' ? c.itemGroupField : '';
|
|
251553
251553
|
const flatItems = Array.isArray(flat) && groupField ? flat.filter((item) => item && typeof item === 'object') : null;
|
|
251554
251554
|
const groupIds = new Set(list.map((group) => String(group.id ?? '')).filter((id) => id !== ''));
|
|
@@ -251598,7 +251598,7 @@ var script$4v = {
|
|
|
251598
251598
|
if (!spec || typeof spec !== 'object' || !spec.path) {
|
|
251599
251599
|
return null
|
|
251600
251600
|
}
|
|
251601
|
-
const list = readPath$
|
|
251601
|
+
const list = readPath$a(this.payload, spec.path);
|
|
251602
251602
|
if (!Array.isArray(list) || list.length === 0) {
|
|
251603
251603
|
return null
|
|
251604
251604
|
}
|
|
@@ -251669,7 +251669,7 @@ var script$4v = {
|
|
|
251669
251669
|
const fill = (value) => {
|
|
251670
251670
|
if (typeof value === 'string') {
|
|
251671
251671
|
return value.replace(/@group\.([\w.]+)/g, (token, path) => {
|
|
251672
|
-
const found = readPath$
|
|
251672
|
+
const found = readPath$a(raw, path);
|
|
251673
251673
|
if (found === undefined || found === null || found === '') {
|
|
251674
251674
|
missing = true;
|
|
251675
251675
|
return ''
|
|
@@ -251801,11 +251801,11 @@ var script$4v = {
|
|
|
251801
251801
|
if (typeof value === 'string') {
|
|
251802
251802
|
const whole = value.match(/^@(item|group)\.([\w.]+)$/);
|
|
251803
251803
|
if (whole && !['url', 'target', 'href'].includes(key)) {
|
|
251804
|
-
return readPath$
|
|
251804
|
+
return readPath$a(scope[whole[1]], whole[2]) ?? null
|
|
251805
251805
|
}
|
|
251806
251806
|
const encode = ['url', 'target', 'href'].includes(key);
|
|
251807
251807
|
return value.replace(token, (match, root, path) => {
|
|
251808
|
-
const found = readPath$
|
|
251808
|
+
const found = readPath$a(scope[root], path);
|
|
251809
251809
|
const text = found === undefined || found === null ? '' : String(found);
|
|
251810
251810
|
return encode ? encodeURIComponent(text) : text
|
|
251811
251811
|
})
|
|
@@ -251831,7 +251831,7 @@ var script$4v = {
|
|
|
251831
251831
|
if (!spec || typeof spec !== 'object' || !spec.valuePath) {
|
|
251832
251832
|
return null
|
|
251833
251833
|
}
|
|
251834
|
-
const value = Number(readPath$
|
|
251834
|
+
const value = Number(readPath$a(raw, spec.valuePath));
|
|
251835
251835
|
if (!Number.isFinite(value)) {
|
|
251836
251836
|
return null
|
|
251837
251837
|
}
|
|
@@ -251919,7 +251919,7 @@ var script$4v = {
|
|
|
251919
251919
|
* @return {string} The text, '' when the number is missing.
|
|
251920
251920
|
*/
|
|
251921
251921
|
countText(part, rawItem) {
|
|
251922
|
-
const count = Number(readPath$
|
|
251922
|
+
const count = Number(readPath$a(rawItem, part.count));
|
|
251923
251923
|
if (!Number.isFinite(count)) {
|
|
251924
251924
|
return ''
|
|
251925
251925
|
}
|
|
@@ -252442,7 +252442,7 @@ function byOrder$1(list, field) {
|
|
|
252442
252442
|
return [...list]
|
|
252443
252443
|
}
|
|
252444
252444
|
const rank = (entry) => {
|
|
252445
|
-
const n = Number(readPath$
|
|
252445
|
+
const n = Number(readPath$a(entry, field));
|
|
252446
252446
|
return Number.isFinite(n) ? n : Infinity
|
|
252447
252447
|
};
|
|
252448
252448
|
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 +252538,8 @@ function clockOf(seconds) {
|
|
|
252538
252538
|
* follows that moment rather than the page's start, so a reload keeps it. At
|
|
252539
252539
|
* zero the page is saved and the run finishes. `submitLabel` adds a button
|
|
252540
252540
|
* that finishes from any page, and `savedText` says so while nothing is unsaved.
|
|
252541
|
+
* `saveEachAnswer: true` (or a wait in ms) saves each answer a moment after
|
|
252542
|
+
* it is given instead of when the user moves on.
|
|
252541
252543
|
*
|
|
252542
252544
|
* `noteWhen: { answers: [...] }` shows a question's note field only once its
|
|
252543
252545
|
* answer is one of those stored values (the board shows a note under "Nee"),
|
|
@@ -252586,7 +252588,8 @@ var script$4t = {
|
|
|
252586
252588
|
* answers | answersPath, answerKey?, answerFields?, recordPhotosField?,
|
|
252587
252589
|
* record?, saveAction?, finishAction?, pageSize?, allowNote?, noteWhen?,
|
|
252588
252590
|
* allowPhotos?, caption?, emptyText?, deadlineField?, serverNowField?,
|
|
252589
|
-
* timeLeftText?, timeWarningSeconds?, savedText?, submitLabel
|
|
252591
|
+
* timeLeftText?, timeWarningSeconds?, savedText?, submitLabel?,
|
|
252592
|
+
* saveEachAnswer? }`, as in the component
|
|
252590
252593
|
* description and docs/components/cn-checklist-run-widget.md.
|
|
252591
252594
|
*
|
|
252592
252595
|
* @type {object}
|
|
@@ -252655,11 +252658,29 @@ var script$4t = {
|
|
|
252655
252658
|
now: Date.now(),
|
|
252656
252659
|
recordReadAt: Date.now(),
|
|
252657
252660
|
deadlineTimer: null,
|
|
252661
|
+
// `saveEachAnswer`: the pending save, and the save that runs now.
|
|
252662
|
+
answerSaveTimer: null,
|
|
252663
|
+
pageSave: null,
|
|
252658
252664
|
finishedRun: false,
|
|
252659
252665
|
}
|
|
252660
252666
|
},
|
|
252661
252667
|
|
|
252662
252668
|
computed: {
|
|
252669
|
+
/**
|
|
252670
|
+
* The wait before an answer saves on its own (`saveEachAnswer`: `true`
|
|
252671
|
+
* waits 800 ms, a number that many ms), or null to save on moving on.
|
|
252672
|
+
*
|
|
252673
|
+
* @return {number|null}
|
|
252674
|
+
* @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
|
|
252675
|
+
*/
|
|
252676
|
+
answerSaveDelay() {
|
|
252677
|
+
const option = this.content?.saveEachAnswer;
|
|
252678
|
+
if (option === true) {
|
|
252679
|
+
return 800
|
|
252680
|
+
}
|
|
252681
|
+
return typeof option === 'number' && option >= 0 ? option : null
|
|
252682
|
+
},
|
|
252683
|
+
|
|
252663
252684
|
/** @return {object} What the tokens resolve against. */
|
|
252664
252685
|
tokenCtx() {
|
|
252665
252686
|
const unwrap = (c) => (c && typeof c === 'object' && 'value' in c ? c.value : c);
|
|
@@ -252729,7 +252750,7 @@ var script$4t = {
|
|
|
252729
252750
|
}
|
|
252730
252751
|
const object = this.tokenCtx.object || {};
|
|
252731
252752
|
return this.translate(template).replace(/\{([A-Za-z0-9_.]+)\}/g, (_m, path) => {
|
|
252732
|
-
const value = readPath$
|
|
252753
|
+
const value = readPath$a(object, path);
|
|
252733
252754
|
return value === null || value === undefined ? '' : String(value)
|
|
252734
252755
|
}).trim()
|
|
252735
252756
|
},
|
|
@@ -252875,14 +252896,14 @@ var script$4t = {
|
|
|
252875
252896
|
/** @return {number|null} The deadline as read off the open record, on this device's clock; null without one. */
|
|
252876
252897
|
deadlineAt() {
|
|
252877
252898
|
const field = this.content?.deadlineField;
|
|
252878
|
-
const date = field ? parseDateValue(readPath$
|
|
252899
|
+
const date = field ? parseDateValue(readPath$a(this.openRecord, field)) : null;
|
|
252879
252900
|
return date ? date.getTime() + this.serverOffset : null
|
|
252880
252901
|
},
|
|
252881
252902
|
|
|
252882
252903
|
/** @return {number} How far this device's clock runs ahead of the server's, in milliseconds. */
|
|
252883
252904
|
serverOffset() {
|
|
252884
252905
|
const field = this.content?.serverNowField;
|
|
252885
|
-
const serverNow = field ? parseDateValue(readPath$
|
|
252906
|
+
const serverNow = field ? parseDateValue(readPath$a(this.openRecord, field)) : null;
|
|
252886
252907
|
return serverNow ? this.recordReadAt - serverNow.getTime() : 0
|
|
252887
252908
|
},
|
|
252888
252909
|
|
|
@@ -252969,6 +252990,11 @@ var script$4t = {
|
|
|
252969
252990
|
|
|
252970
252991
|
beforeUnmount() {
|
|
252971
252992
|
clearInterval(this.deadlineTimer);
|
|
252993
|
+
if (this.answerSaveTimer) {
|
|
252994
|
+
clearTimeout(this.answerSaveTimer);
|
|
252995
|
+
this.answerSaveTimer = null;
|
|
252996
|
+
this.savePage();
|
|
252997
|
+
}
|
|
252972
252998
|
},
|
|
252973
252999
|
|
|
252974
253000
|
methods: {
|
|
@@ -253076,23 +253102,23 @@ var script$4t = {
|
|
|
253076
253102
|
*/
|
|
253077
253103
|
toQuestion(record, group = '') {
|
|
253078
253104
|
const f = this.fields;
|
|
253079
|
-
const raw = String(readPath$
|
|
253105
|
+
const raw = String(readPath$a(record, f.type) ?? '');
|
|
253080
253106
|
const mapped = this.content?.typeMap && typeof this.content.typeMap === 'object' ? this.content.typeMap[raw] : undefined;
|
|
253081
253107
|
const kind = KINDS.includes(mapped) ? mapped : (KINDS.includes(raw) ? raw : 'text');
|
|
253082
253108
|
const stored = { yes: 'yes', no: 'no', na: 'na', ...(this.content?.choiceValues || {}) };
|
|
253083
253109
|
let choices = (TYPE_CHOICES[kind] || []).map((c) => ({ value: String(stored[c.key]), label: l10n.translate('nextcloud-vue', c.label) }));
|
|
253084
253110
|
if (kind === 'choice') {
|
|
253085
|
-
const options = readPath$
|
|
253111
|
+
const options = readPath$a(record, f.options);
|
|
253086
253112
|
choices = (Array.isArray(options) ? options : []).map((o) => (o && typeof o === 'object'
|
|
253087
253113
|
? { value: String(o.value ?? o.label ?? ''), label: this.translate(String(o.label ?? o.value ?? '')) }
|
|
253088
253114
|
: { value: String(o), label: this.translate(String(o)) })).filter((c) => c.value !== '');
|
|
253089
253115
|
}
|
|
253090
|
-
const help = readPath$
|
|
253116
|
+
const help = readPath$a(record, f.help);
|
|
253091
253117
|
return {
|
|
253092
|
-
id: String(readPath$
|
|
253093
|
-
text: this.translate(String(readPath$
|
|
253118
|
+
id: String(readPath$a(record, f.id) ?? idOf$1(record)),
|
|
253119
|
+
text: this.translate(String(readPath$a(record, f.text) ?? '')),
|
|
253094
253120
|
kind,
|
|
253095
|
-
required: Boolean(readPath$
|
|
253121
|
+
required: Boolean(readPath$a(record, f.required)),
|
|
253096
253122
|
help: typeof help === 'string' && help !== '' ? this.translate(help) : '',
|
|
253097
253123
|
choices,
|
|
253098
253124
|
group,
|
|
@@ -253114,7 +253140,7 @@ var script$4t = {
|
|
|
253114
253140
|
if (!path) {
|
|
253115
253141
|
return 'never'
|
|
253116
253142
|
}
|
|
253117
|
-
const raw = readPath$
|
|
253143
|
+
const raw = readPath$a(record, path);
|
|
253118
253144
|
const map = { true: 'always', false: 'never', always: 'always', never: 'never', ...(this.content?.photoRequiredValues || {}) };
|
|
253119
253145
|
const rule = raw === null || raw === undefined ? 'never' : map[String(raw)];
|
|
253120
253146
|
if (rule && typeof rule === 'object' && rule.whenAnswer !== undefined) {
|
|
@@ -253191,7 +253217,7 @@ var script$4t = {
|
|
|
253191
253217
|
*/
|
|
253192
253218
|
questionsFromRecord() {
|
|
253193
253219
|
const c = this.content;
|
|
253194
|
-
const list = readPath$
|
|
253220
|
+
const list = readPath$a(this.openRecord, c.questionsPath);
|
|
253195
253221
|
const orderField = c.orderField === undefined ? 'order' : c.orderField;
|
|
253196
253222
|
const top = byOrder$1(Array.isArray(list) ? list : [], orderField);
|
|
253197
253223
|
if (!c.itemsKey) {
|
|
@@ -253199,8 +253225,8 @@ var script$4t = {
|
|
|
253199
253225
|
}
|
|
253200
253226
|
const labelField = c.groupLabelField || 'name';
|
|
253201
253227
|
return top.flatMap((group) => {
|
|
253202
|
-
const items = readPath$
|
|
253203
|
-
const label = readPath$
|
|
253228
|
+
const items = readPath$a(group, c.itemsKey);
|
|
253229
|
+
const label = readPath$a(group, labelField);
|
|
253204
253230
|
return byOrder$1(Array.isArray(items) ? items : [], orderField).map((record) => this.toQuestion(record, typeof label === 'string' ? this.translate(label) : ''))
|
|
253205
253231
|
})
|
|
253206
253232
|
},
|
|
@@ -253215,8 +253241,8 @@ var script$4t = {
|
|
|
253215
253241
|
draftFromEntry(question, entry) {
|
|
253216
253242
|
const af = this.answerFields;
|
|
253217
253243
|
const field = question.kind === 'number' ? af.number : (question.kind === 'choice' ? af.choice : af.value);
|
|
253218
|
-
const value = readPath$
|
|
253219
|
-
const note = readPath$
|
|
253244
|
+
const value = readPath$a(entry, field);
|
|
253245
|
+
const note = readPath$a(entry, af.note);
|
|
253220
253246
|
return { value: value === null || value === undefined ? '' : String(value), note: note === null || note === undefined ? '' : String(note) }
|
|
253221
253247
|
},
|
|
253222
253248
|
|
|
@@ -253267,30 +253293,30 @@ var script$4t = {
|
|
|
253267
253293
|
draft[question.id] = { value: '', note: '' };
|
|
253268
253294
|
}
|
|
253269
253295
|
if (this.inRecord) {
|
|
253270
|
-
const entries = readPath$
|
|
253296
|
+
const entries = readPath$a(this.openRecord, this.content.answersPath);
|
|
253271
253297
|
this.recordAnswers = Array.isArray(entries) ? entries : [];
|
|
253272
253298
|
const key = this.content.answerKey || 'questionId';
|
|
253273
253299
|
for (const entry of this.recordAnswers) {
|
|
253274
|
-
const qid = String(readPath$
|
|
253300
|
+
const qid = String(readPath$a(entry, key) ?? '');
|
|
253275
253301
|
const question = questions.find((x) => x.id === qid);
|
|
253276
253302
|
if (question && !answerIds[qid]) {
|
|
253277
|
-
draft[qid] = { ...this.draftFromEntry(question, entry), location: this.locationField ? (readPath$
|
|
253303
|
+
draft[qid] = { ...this.draftFromEntry(question, entry), location: this.locationField ? (readPath$a(entry, this.locationField) ?? null) : null };
|
|
253278
253304
|
answerIds[qid] = qid;
|
|
253279
|
-
const photos = readPath$
|
|
253305
|
+
const photos = readPath$a(entry, this.answerFields.photos);
|
|
253280
253306
|
storedPhotos[qid] = Array.isArray(photos) ? photos : [];
|
|
253281
253307
|
}
|
|
253282
253308
|
}
|
|
253283
253309
|
}
|
|
253284
253310
|
for (const answer of answers) {
|
|
253285
|
-
const qid = String(readPath$
|
|
253311
|
+
const qid = String(readPath$a(answer, a.questionField || 'question') ?? '');
|
|
253286
253312
|
if (draft[qid] && !answerIds[qid]) {
|
|
253287
253313
|
draft[qid] = {
|
|
253288
|
-
value: String(readPath$
|
|
253289
|
-
note: String(readPath$
|
|
253290
|
-
location: this.locationField ? (readPath$
|
|
253314
|
+
value: String(readPath$a(answer, a.valueField || 'answer') ?? ''),
|
|
253315
|
+
note: String(readPath$a(answer, a.noteField || 'note') ?? ''),
|
|
253316
|
+
location: this.locationField ? (readPath$a(answer, this.locationField) ?? null) : null,
|
|
253291
253317
|
};
|
|
253292
253318
|
answerIds[qid] = idOf$1(answer);
|
|
253293
|
-
const stored = a.photosField ? readPath$
|
|
253319
|
+
const stored = a.photosField ? readPath$a(answer, a.photosField) : null;
|
|
253294
253320
|
storedPhotos[qid] = Array.isArray(stored) ? stored : [];
|
|
253295
253321
|
}
|
|
253296
253322
|
}
|
|
@@ -253326,6 +253352,26 @@ var script$4t = {
|
|
|
253326
253352
|
this.dirty = { ...this.dirty, [id]: true };
|
|
253327
253353
|
this.missing = this.missing.filter((m) => m !== id);
|
|
253328
253354
|
this.startLocating(id);
|
|
253355
|
+
this.scheduleAnswerSave();
|
|
253356
|
+
},
|
|
253357
|
+
|
|
253358
|
+
/**
|
|
253359
|
+
* With `saveEachAnswer`, save the page a moment after the last change,
|
|
253360
|
+
* so typing saves once and a quick run of answers saves together.
|
|
253361
|
+
*
|
|
253362
|
+
* @return {void}
|
|
253363
|
+
* @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
|
|
253364
|
+
*/
|
|
253365
|
+
scheduleAnswerSave() {
|
|
253366
|
+
const delay = this.answerSaveDelay;
|
|
253367
|
+
if (delay === null) {
|
|
253368
|
+
return
|
|
253369
|
+
}
|
|
253370
|
+
clearTimeout(this.answerSaveTimer);
|
|
253371
|
+
this.answerSaveTimer = setTimeout(() => {
|
|
253372
|
+
this.answerSaveTimer = null;
|
|
253373
|
+
this.savePage();
|
|
253374
|
+
}, delay);
|
|
253329
253375
|
},
|
|
253330
253376
|
|
|
253331
253377
|
/**
|
|
@@ -253358,6 +253404,7 @@ var script$4t = {
|
|
|
253358
253404
|
setLocation(id, location) {
|
|
253359
253405
|
this.draft[id].location = location;
|
|
253360
253406
|
this.dirty = { ...this.dirty, [id]: true };
|
|
253407
|
+
this.scheduleAnswerSave();
|
|
253361
253408
|
},
|
|
253362
253409
|
|
|
253363
253410
|
/**
|
|
@@ -253389,6 +253436,7 @@ var script$4t = {
|
|
|
253389
253436
|
}
|
|
253390
253437
|
this.photos = { ...this.photos, [id]: [...(this.photos[id] || []), ...files] };
|
|
253391
253438
|
this.dirty = { ...this.dirty, [id]: true };
|
|
253439
|
+
this.scheduleAnswerSave();
|
|
253392
253440
|
this.missingPhoto = this.missingPhoto.filter((m) => m !== id);
|
|
253393
253441
|
if (event.target) {
|
|
253394
253442
|
event.target.value = '';
|
|
@@ -253404,6 +253452,24 @@ var script$4t = {
|
|
|
253404
253452
|
* @spec openspec/changes/checklist-run-widget/specs/checklist-run-widget/spec.md#requirement-answers-are-saved-under-the-readers-own-rights
|
|
253405
253453
|
*/
|
|
253406
253454
|
async savePage() {
|
|
253455
|
+
// One save at a time, so an answer is never created twice.
|
|
253456
|
+
while (this.pageSave) {
|
|
253457
|
+
await this.pageSave;
|
|
253458
|
+
}
|
|
253459
|
+
this.pageSave = this.savePageNow();
|
|
253460
|
+
try {
|
|
253461
|
+
return await this.pageSave
|
|
253462
|
+
} finally {
|
|
253463
|
+
this.pageSave = null;
|
|
253464
|
+
}
|
|
253465
|
+
},
|
|
253466
|
+
|
|
253467
|
+
/**
|
|
253468
|
+
* Save the changed answers of this page now (see `savePage`).
|
|
253469
|
+
*
|
|
253470
|
+
* @return {Promise<boolean>} True when everything saved.
|
|
253471
|
+
*/
|
|
253472
|
+
async savePageNow() {
|
|
253407
253473
|
const changed = this.pageQuestions.filter((q) => this.dirty[q.id]);
|
|
253408
253474
|
if (changed.length === 0) {
|
|
253409
253475
|
return true
|
|
@@ -253452,11 +253518,11 @@ var script$4t = {
|
|
|
253452
253518
|
const af = this.answerFields;
|
|
253453
253519
|
const key = c.answerKey || 'questionId';
|
|
253454
253520
|
const refField = c.photoRefField || 'id';
|
|
253455
|
-
let recordPhotos = Array.isArray(readPath$
|
|
253521
|
+
let recordPhotos = Array.isArray(readPath$a(this.openRecord, c.recordPhotosField)) ? readPath$a(this.openRecord, c.recordPhotosField) : [];
|
|
253456
253522
|
const entries = [...this.recordAnswers];
|
|
253457
253523
|
for (const question of changed) {
|
|
253458
253524
|
const draft = this.draft[question.id];
|
|
253459
|
-
const index = entries.findIndex((entry) => String(readPath$
|
|
253525
|
+
const index = entries.findIndex((entry) => String(readPath$a(entry, key) ?? '') === question.id);
|
|
253460
253526
|
const entry = { ...(index >= 0 ? entries[index] : { [key]: question.id }) };
|
|
253461
253527
|
if (question.kind === 'number') {
|
|
253462
253528
|
entry[af.number] = draft.value === '' ? null : Number(draft.value);
|
|
@@ -254017,7 +254083,7 @@ function render$4r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
254017
254083
|
}
|
|
254018
254084
|
|
|
254019
254085
|
script$4t.render = render$4r;
|
|
254020
|
-
script$4t.__scopeId = "data-v-
|
|
254086
|
+
script$4t.__scopeId = "data-v-e9adfb50";
|
|
254021
254087
|
const __sfc_main$4t = script$4t;
|
|
254022
254088
|
|
|
254023
254089
|
/**
|
|
@@ -254121,7 +254187,7 @@ var script$4s = {
|
|
|
254121
254187
|
*/
|
|
254122
254188
|
items() {
|
|
254123
254189
|
const content = this.content || {};
|
|
254124
|
-
const list = this.record ? readPath$
|
|
254190
|
+
const list = this.record ? readPath$a(this.record, content.path || 'checklist') : null;
|
|
254125
254191
|
if (!Array.isArray(list)) {
|
|
254126
254192
|
return []
|
|
254127
254193
|
}
|
|
@@ -254485,9 +254551,9 @@ var script$4r = {
|
|
|
254485
254551
|
return
|
|
254486
254552
|
}
|
|
254487
254553
|
this.loadedId = id;
|
|
254488
|
-
const text = readPath$
|
|
254554
|
+
const text = readPath$a(record, this.field);
|
|
254489
254555
|
this.text = typeof text === 'string' ? text : '';
|
|
254490
|
-
const choice = this.outcome ? readPath$
|
|
254556
|
+
const choice = this.outcome ? readPath$a(record, this.outcome.field) : '';
|
|
254491
254557
|
this.choice = typeof choice === 'string' ? choice : '';
|
|
254492
254558
|
},
|
|
254493
254559
|
},
|
|
@@ -256544,9 +256610,9 @@ var script$4o = {
|
|
|
256544
256610
|
}
|
|
256545
256611
|
const toneMap = source.toneMap && typeof source.toneMap === 'object' ? source.toneMap : {};
|
|
256546
256612
|
this.listed = rows.map((row, index) => {
|
|
256547
|
-
const raw = source.tonePath ? readPath$
|
|
256613
|
+
const raw = source.tonePath ? readPath$a(row, source.tonePath) : undefined;
|
|
256548
256614
|
const tone = Object.hasOwn(toneMap, String(raw)) ? toneMap[String(raw)] : raw;
|
|
256549
|
-
const label = readPath$
|
|
256615
|
+
const label = readPath$a(row, source.labelPath);
|
|
256550
256616
|
return { id: `source-${row?.id ?? index}`, label: typeof label === 'string' ? label : '', tone }
|
|
256551
256617
|
});
|
|
256552
256618
|
},
|
|
@@ -256570,7 +256636,7 @@ var script$4o = {
|
|
|
256570
256636
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
256571
256637
|
const url = source.url.replace(/@objectId/g, encodeURIComponent(String(this.partyId)));
|
|
256572
256638
|
const { data } = await axios.get(generateUrl(url));
|
|
256573
|
-
rows = source.itemsPath ? readPath$
|
|
256639
|
+
rows = source.itemsPath ? readPath$a(data, source.itemsPath) : data;
|
|
256574
256640
|
} catch {
|
|
256575
256641
|
this.loadError = this.tr(source.errorText || 'The warnings could not be loaded.');
|
|
256576
256642
|
return []
|
|
@@ -256580,14 +256646,14 @@ var script$4o = {
|
|
|
256580
256646
|
const toneLabels = source.toneLabels && typeof source.toneLabels === 'object' ? source.toneLabels : {};
|
|
256581
256647
|
const ack = source.ack && typeof source.ack === 'object' ? source.ack : null;
|
|
256582
256648
|
return (Array.isArray(rows) ? rows : []).filter((row) => row && typeof row === 'object').map((row, index) => {
|
|
256583
|
-
const raw = source.tonePath ? readPath$
|
|
256584
|
-
const label = readPath$
|
|
256649
|
+
const raw = source.tonePath ? readPath$a(row, source.tonePath) : undefined;
|
|
256650
|
+
const label = readPath$a(row, source.labelPath || 'label');
|
|
256585
256651
|
const meta = (Array.isArray(source.meta) ? source.meta : [])
|
|
256586
256652
|
.map((part) => firstFilled(part, row, (key) => this.tr(key)))
|
|
256587
256653
|
.filter((text) => text !== '')
|
|
256588
256654
|
.join(' · ');
|
|
256589
|
-
const needsAck = ack && readPath$
|
|
256590
|
-
const seen = ack && ack.seen && readPath$
|
|
256655
|
+
const needsAck = ack && readPath$a(row, ack.whenPath) === true && !readPath$a(row, ack.donePath);
|
|
256656
|
+
const seen = ack && ack.seen && readPath$a(row, ack.donePath) ? fillTemplate(this.tr(ack.seen), row) : '';
|
|
256591
256657
|
return {
|
|
256592
256658
|
id: `source-${row.id ?? index}`,
|
|
256593
256659
|
label: typeof label === 'string' ? label : '',
|
|
@@ -256617,7 +256683,7 @@ var script$4o = {
|
|
|
256617
256683
|
this.ackError = '';
|
|
256618
256684
|
try {
|
|
256619
256685
|
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$
|
|
256686
|
+
const path = String(ack.endpoint).replace(/\{([\w.]+)\}/g, (_m, field) => encodeURIComponent(String(readPath$a(indicator.row, field) ?? '')));
|
|
256621
256687
|
await axios.post(generateUrl(path));
|
|
256622
256688
|
await this.loadListed();
|
|
256623
256689
|
} catch {
|
|
@@ -256651,7 +256717,7 @@ var script$4o = {
|
|
|
256651
256717
|
const linked = { variant: 'secondary', ...action, inline: true };
|
|
256652
256718
|
const filter = typeof action.target === 'string' ? action.target.match(/^@object\.([\w.]+)\|(tel|mailto|geo)$/) : null;
|
|
256653
256719
|
if (filter) {
|
|
256654
|
-
linked.target = contactHref(filter[2], readPath$
|
|
256720
|
+
linked.target = contactHref(filter[2], readPath$a(object, filter[1]));
|
|
256655
256721
|
}
|
|
256656
256722
|
if (action.label.includes('{')) {
|
|
256657
256723
|
linked.label = fillTemplate(this.tr(action.label), object);
|
|
@@ -256872,14 +256938,14 @@ function safeRowHref(value) {
|
|
|
256872
256938
|
*/
|
|
256873
256939
|
function rowHref(entry, spec) {
|
|
256874
256940
|
if (spec && typeof spec === 'object') {
|
|
256875
|
-
const value = readPath$
|
|
256941
|
+
const value = readPath$a(entry, spec.path);
|
|
256876
256942
|
const text = typeof value === 'string' ? value.trim() : '';
|
|
256877
256943
|
if (text === '' || !['mailto', 'tel'].includes(spec.scheme)) {
|
|
256878
256944
|
return ''
|
|
256879
256945
|
}
|
|
256880
256946
|
return `${spec.scheme}:${spec.scheme === 'tel' ? text.replace(/[^\d+]/g, '') : encodeURIComponent(text).replace(/%40/g, '@')}`
|
|
256881
256947
|
}
|
|
256882
|
-
return safeRowHref(readPath$
|
|
256948
|
+
return safeRowHref(readPath$a(entry, spec))
|
|
256883
256949
|
}
|
|
256884
256950
|
|
|
256885
256951
|
var script$4n = {
|
|
@@ -256983,7 +257049,7 @@ var script$4n = {
|
|
|
256983
257049
|
* @return {Array}
|
|
256984
257050
|
*/
|
|
256985
257051
|
items() {
|
|
256986
|
-
const list = this.saved !== null ? this.saved : readPath$
|
|
257052
|
+
const list = this.saved !== null ? this.saved : readPath$a(this.objectData || {}, this.content.field);
|
|
256987
257053
|
return Array.isArray(list) ? list : []
|
|
256988
257054
|
},
|
|
256989
257055
|
|
|
@@ -257180,7 +257246,7 @@ var script$4n = {
|
|
|
257180
257246
|
return ''
|
|
257181
257247
|
}
|
|
257182
257248
|
return this.tr(this.content.lead).replace(/\{([\w.]+)\}/g, (m, path) => {
|
|
257183
|
-
const value = readPath$
|
|
257249
|
+
const value = readPath$a(this.objectData || {}, path);
|
|
257184
257250
|
return value === undefined || value === null ? '' : String(value)
|
|
257185
257251
|
})
|
|
257186
257252
|
},
|
|
@@ -257341,7 +257407,7 @@ var script$4n = {
|
|
|
257341
257407
|
}
|
|
257342
257408
|
const entries = list.filter((entry) => entry && typeof entry === 'object');
|
|
257343
257409
|
const chosen = (mirror.prefer && entries.find((entry) => entry[mirror.prefer] === true)) || entries[0];
|
|
257344
|
-
const value = chosen ? readPath$
|
|
257410
|
+
const value = chosen ? readPath$a(chosen, mirror.path) : '';
|
|
257345
257411
|
return { [mirror.field]: value === undefined || value === null ? '' : value }
|
|
257346
257412
|
},
|
|
257347
257413
|
|
|
@@ -257349,7 +257415,7 @@ var script$4n = {
|
|
|
257349
257415
|
if (item === null || typeof item !== 'object') {
|
|
257350
257416
|
return String(item)
|
|
257351
257417
|
}
|
|
257352
|
-
const key = this.content.key ? readPath$
|
|
257418
|
+
const key = this.content.key ? readPath$a(item, this.content.key) : undefined;
|
|
257353
257419
|
return key === undefined || key === null || key === '' ? `item-${index}` : String(key)
|
|
257354
257420
|
},
|
|
257355
257421
|
|
|
@@ -257365,7 +257431,7 @@ var script$4n = {
|
|
|
257365
257431
|
return ''
|
|
257366
257432
|
}
|
|
257367
257433
|
const def = typeof spec === 'string' ? { path: spec } : spec;
|
|
257368
|
-
const raw = readPath$
|
|
257434
|
+
const raw = readPath$a(entry, def.path);
|
|
257369
257435
|
if (raw === null || raw === undefined || raw === '') {
|
|
257370
257436
|
return ''
|
|
257371
257437
|
}
|
|
@@ -257434,9 +257500,9 @@ var script$4n = {
|
|
|
257434
257500
|
try {
|
|
257435
257501
|
const { axios } = await this.http();
|
|
257436
257502
|
const response = await axios.get(prefixUrl(this.resolve(source.url, {})));
|
|
257437
|
-
const list = source.path ? readPath$
|
|
257503
|
+
const list = source.path ? readPath$a(response && response.data, source.path) : response && response.data;
|
|
257438
257504
|
const options = (Array.isArray(list) ? list : [])
|
|
257439
|
-
.map((item) => ({ value: readPath$
|
|
257505
|
+
.map((item) => ({ value: readPath$a(item, source.valuePath || 'id'), label: String(readPath$a(item, source.labelPath || 'name') ?? '') }))
|
|
257440
257506
|
.filter((option, index, all) => option.value !== undefined && option.value !== null && option.value !== ''
|
|
257441
257507
|
&& all.findIndex((other) => String(other.value) === String(option.value)) === index);
|
|
257442
257508
|
this.sourcedOptions = { ...this.sourcedOptions, [field.key]: options };
|
|
@@ -257451,7 +257517,7 @@ var script$4n = {
|
|
|
257451
257517
|
if (!spec || !spec.path) {
|
|
257452
257518
|
return null
|
|
257453
257519
|
}
|
|
257454
|
-
const raw = readPath$
|
|
257520
|
+
const raw = readPath$a(entry, spec.path);
|
|
257455
257521
|
if (raw === null || raw === undefined || raw === '') {
|
|
257456
257522
|
return null
|
|
257457
257523
|
}
|
|
@@ -257481,7 +257547,7 @@ var script$4n = {
|
|
|
257481
257547
|
return true
|
|
257482
257548
|
}
|
|
257483
257549
|
return Object.entries(when).every(([field, expected]) => {
|
|
257484
|
-
const actual = readPath$
|
|
257550
|
+
const actual = readPath$a(entry, field);
|
|
257485
257551
|
if (expected && typeof expected === 'object' && !Array.isArray(expected)) {
|
|
257486
257552
|
return this.matchesOperators(entry, actual, expected)
|
|
257487
257553
|
}
|
|
@@ -257506,7 +257572,7 @@ var script$4n = {
|
|
|
257506
257572
|
const operand = (v) => {
|
|
257507
257573
|
if (typeof v === 'string' && v.startsWith('@')) {
|
|
257508
257574
|
const path = v.startsWith('@row.') ? v.slice('@row.'.length) : v.slice(1);
|
|
257509
|
-
return readPath$
|
|
257575
|
+
return readPath$a(entry, path)
|
|
257510
257576
|
}
|
|
257511
257577
|
return v
|
|
257512
257578
|
};
|
|
@@ -257536,7 +257602,7 @@ var script$4n = {
|
|
|
257536
257602
|
}
|
|
257537
257603
|
let missing = false;
|
|
257538
257604
|
const out = this.tr(template).replace(/\{([\w.@]+)\}/g, (match, path) => {
|
|
257539
|
-
const value = readPath$
|
|
257605
|
+
const value = readPath$a(entry, path);
|
|
257540
257606
|
if (value === undefined || value === null || value === '') {
|
|
257541
257607
|
missing = true;
|
|
257542
257608
|
return match
|
|
@@ -257595,7 +257661,7 @@ var script$4n = {
|
|
|
257595
257661
|
return encodeURIComponent(id)
|
|
257596
257662
|
})
|
|
257597
257663
|
.replace(/@(row|object)\.([\w.@]+)/g, (m, scope, path) => {
|
|
257598
|
-
const v = readPath$
|
|
257664
|
+
const v = readPath$a((scope === 'row' ? entry : object) || {}, path);
|
|
257599
257665
|
missing = missing || v === undefined || v === null || v === '';
|
|
257600
257666
|
return encodeURIComponent(String(v ?? ''))
|
|
257601
257667
|
});
|
|
@@ -257645,7 +257711,7 @@ var script$4n = {
|
|
|
257645
257711
|
}
|
|
257646
257712
|
const object = this.objectData || {};
|
|
257647
257713
|
const read = (source, path) => {
|
|
257648
|
-
const v = readPath$
|
|
257714
|
+
const v = readPath$a(source || {}, path);
|
|
257649
257715
|
return v === undefined || v === null ? '' : v
|
|
257650
257716
|
};
|
|
257651
257717
|
const whole = value.match(/^@(row|object)\.([\w.@]+)$/);
|
|
@@ -257676,10 +257742,10 @@ var script$4n = {
|
|
|
257676
257742
|
const { axios } = await this.http();
|
|
257677
257743
|
const response = await axios.get(prefixUrl(this.resolve(source.url, {})));
|
|
257678
257744
|
const data = response && response.data;
|
|
257679
|
-
const list = source.path ? readPath$
|
|
257745
|
+
const list = source.path ? readPath$a(data, source.path) : data;
|
|
257680
257746
|
const live = {};
|
|
257681
257747
|
for (const item of Array.isArray(list) ? list : []) {
|
|
257682
|
-
const key = item && readPath$
|
|
257748
|
+
const key = item && readPath$a(item, source.key);
|
|
257683
257749
|
if (key !== undefined && key !== null) {
|
|
257684
257750
|
live[String(key)] = item;
|
|
257685
257751
|
}
|
|
@@ -257710,10 +257776,10 @@ var script$4n = {
|
|
|
257710
257776
|
try {
|
|
257711
257777
|
const { axios } = await this.http();
|
|
257712
257778
|
const { data: stored } = await axios.get(prefixUrl(this.objectUrl));
|
|
257713
|
-
const current = readPath$
|
|
257779
|
+
const current = readPath$a(stored || {}, this.content.field);
|
|
257714
257780
|
const next = change(Array.isArray(current) ? current : []);
|
|
257715
257781
|
const { data } = await axios.patch(prefixUrl(this.objectUrl), { [this.content.field]: next, ...this.mirrorOf(next) });
|
|
257716
|
-
const written = readPath$
|
|
257782
|
+
const written = readPath$a(data || {}, this.content.field);
|
|
257717
257783
|
this.saved = Array.isArray(written) ? written : next;
|
|
257718
257784
|
/**
|
|
257719
257785
|
* @event saved The list was saved: one PATCH of the field succeeded.
|
|
@@ -257796,7 +257862,7 @@ var script$4n = {
|
|
|
257796
257862
|
const others = stored.filter((item, index) => editing === null || this.keyOf(item, index) !== editing);
|
|
257797
257863
|
const duplicate = scalar
|
|
257798
257864
|
? (unique && others.some((item) => String(item) === String(entry)))
|
|
257799
|
-
: (unique && others.some((item) => item && String(readPath$
|
|
257865
|
+
: (unique && others.some((item) => item && String(readPath$a(item, unique)) === String(entry[unique])));
|
|
257800
257866
|
if (duplicate) {
|
|
257801
257867
|
const error = new Error('duplicate');
|
|
257802
257868
|
error.userMessage = this.tr('This is already in the list.');
|
|
@@ -257855,7 +257921,7 @@ var script$4n = {
|
|
|
257855
257921
|
const draft = {};
|
|
257856
257922
|
for (const [index, field] of this.addFields.entries()) {
|
|
257857
257923
|
const scalarValue = this.content.add?.scalar === true && index === 0 ? row.item : undefined;
|
|
257858
|
-
const value = row.item && typeof row.item === 'object' ? readPath$
|
|
257924
|
+
const value = row.item && typeof row.item === 'object' ? readPath$a(row.item, field.key) : scalarValue;
|
|
257859
257925
|
draft[field.key] = value === undefined || value === null ? this.emptyValue(field) : value;
|
|
257860
257926
|
}
|
|
257861
257927
|
this.draft = draft;
|
|
@@ -257920,9 +257986,9 @@ var script$4n = {
|
|
|
257920
257986
|
return ''
|
|
257921
257987
|
}
|
|
257922
257988
|
if (item && typeof item === 'object' && typeof spec.path === 'string') {
|
|
257923
|
-
return String(readPath$
|
|
257989
|
+
return String(readPath$a(item, spec.path) ?? '')
|
|
257924
257990
|
}
|
|
257925
|
-
const map = typeof spec.field === 'string' ? readPath$
|
|
257991
|
+
const map = typeof spec.field === 'string' ? readPath$a(this.objectData || {}, spec.field) : null;
|
|
257926
257992
|
const code = map && typeof map === 'object' ? map[String(entry.value ?? item)] : '';
|
|
257927
257993
|
return typeof code === 'string' ? code : ''
|
|
257928
257994
|
},
|
|
@@ -257997,7 +258063,7 @@ var script$4n = {
|
|
|
257997
258063
|
.map((copy) => ({
|
|
257998
258064
|
path: copy.path,
|
|
257999
258065
|
label: this.tr(copy.label || 'Copy'),
|
|
258000
|
-
value: String(readPath$
|
|
258066
|
+
value: String(readPath$a(entry, copy.path) ?? ''),
|
|
258001
258067
|
}))
|
|
258002
258068
|
.filter((copy) => copy.value !== '')
|
|
258003
258069
|
},
|
|
@@ -259221,7 +259287,7 @@ var script$4l = {
|
|
|
259221
259287
|
const results = Array.isArray(data?.results) ? data.results : [];
|
|
259222
259288
|
return results.map((item) => ({
|
|
259223
259289
|
id: String(item.id ?? item.uuid),
|
|
259224
|
-
label: String(readPath$
|
|
259290
|
+
label: String(readPath$a(item, target.titleField || 'name') || item.id),
|
|
259225
259291
|
secondary: this.tr(target.label || ''),
|
|
259226
259292
|
type: target.type,
|
|
259227
259293
|
}))
|
|
@@ -259509,9 +259575,9 @@ var script$4k = {
|
|
|
259509
259575
|
rows() {
|
|
259510
259576
|
const c = this.content;
|
|
259511
259577
|
return this.links.map((link) => {
|
|
259512
|
-
const targetId = String(readPath$
|
|
259578
|
+
const targetId = String(readPath$a(link, c.to) ?? '');
|
|
259513
259579
|
const target = this.targetOf(link);
|
|
259514
|
-
const type = c.typeField ? readPath$
|
|
259580
|
+
const type = c.typeField ? readPath$a(link, c.typeField) : undefined;
|
|
259515
259581
|
return {
|
|
259516
259582
|
id: String(link.id ?? link.uuid ?? targetId),
|
|
259517
259583
|
link,
|
|
@@ -259585,7 +259651,7 @@ var script$4k = {
|
|
|
259585
259651
|
* @return {object|null}
|
|
259586
259652
|
*/
|
|
259587
259653
|
targetOf(link) {
|
|
259588
|
-
const kind = this.content.toType ? readPath$
|
|
259654
|
+
const kind = this.content.toType ? readPath$a(link, this.content.toType) : undefined;
|
|
259589
259655
|
return this.targets.find((target) => target.type === kind) || this.targets[0] || null
|
|
259590
259656
|
},
|
|
259591
259657
|
|
|
@@ -259645,7 +259711,7 @@ var script$4k = {
|
|
|
259645
259711
|
const wanted = new Map();
|
|
259646
259712
|
for (const link of this.links) {
|
|
259647
259713
|
const target = this.targetOf(link);
|
|
259648
|
-
const id = String(readPath$
|
|
259714
|
+
const id = String(readPath$a(link, this.content.to) ?? '');
|
|
259649
259715
|
const key = this.nameKey(target, id);
|
|
259650
259716
|
if (target && id && !(key in this.names)) {
|
|
259651
259717
|
wanted.set(key, { target, id });
|
|
@@ -259655,7 +259721,7 @@ var script$4k = {
|
|
|
259655
259721
|
await Promise.all([...wanted.entries()].map(async ([key, { target, id }]) => {
|
|
259656
259722
|
try {
|
|
259657
259723
|
const { data } = await axios.get(prefixUrl(objectsUrl(target.register, target.schema, id)));
|
|
259658
|
-
const title = readPath$
|
|
259724
|
+
const title = readPath$a(data || {}, target.titleField || 'name');
|
|
259659
259725
|
names[key] = title ? String(title) : id;
|
|
259660
259726
|
} catch {
|
|
259661
259727
|
names[key] = id;
|
|
@@ -259698,8 +259764,8 @@ var script$4k = {
|
|
|
259698
259764
|
if (!this.canAdd || !pick || !pick.target || !pick.target.id) {
|
|
259699
259765
|
return { ok: false, message: this.tr('This link cannot be saved here.') }
|
|
259700
259766
|
}
|
|
259701
|
-
const exists = this.links.some((link) => String(readPath$
|
|
259702
|
-
&& (!c.typeField || String(readPath$
|
|
259767
|
+
const exists = this.links.some((link) => String(readPath$a(link, c.to)) === String(pick.target.id)
|
|
259768
|
+
&& (!c.typeField || String(readPath$a(link, c.typeField)) === String(pick.type)));
|
|
259703
259769
|
if (exists) {
|
|
259704
259770
|
return { ok: false, message: this.tr(c.duplicateText || 'This link already exists.') }
|
|
259705
259771
|
}
|
|
@@ -259759,15 +259825,15 @@ var script$4k = {
|
|
|
259759
259825
|
const axios = await this.http();
|
|
259760
259826
|
await axios.delete(prefixUrl(objectsUrl(c.register, c.schema, row.id)));
|
|
259761
259827
|
if (c.pair && row.targetId) {
|
|
259762
|
-
const type = c.typeField ? readPath$
|
|
259763
|
-
const inverse = c.inverseField ? readPath$
|
|
259828
|
+
const type = c.typeField ? readPath$a(row.link, c.typeField) : undefined;
|
|
259829
|
+
const inverse = c.inverseField ? readPath$a(row.link, c.inverseField) : undefined;
|
|
259764
259830
|
const known = this.types.find((candidate) => String(candidate.value) === String(type));
|
|
259765
259831
|
const inverseType = inverse ?? (known && known.inverse !== undefined ? known.inverse : undefined);
|
|
259766
259832
|
const { data } = await axios.get(prefixUrl(objectsUrl(c.register, c.schema)), {
|
|
259767
259833
|
params: { [c.from]: row.targetId, [c.to]: this.recordId, _limit: 10 },
|
|
259768
259834
|
});
|
|
259769
259835
|
const back = (Array.isArray(data?.results) ? data.results : [])
|
|
259770
|
-
.filter((link) => inverseType === undefined || !c.typeField || String(readPath$
|
|
259836
|
+
.filter((link) => inverseType === undefined || !c.typeField || String(readPath$a(link, c.typeField)) === String(inverseType));
|
|
259771
259837
|
for (const link of back) {
|
|
259772
259838
|
await axios.delete(prefixUrl(objectsUrl(c.register, c.schema, link.id ?? link.uuid)));
|
|
259773
259839
|
}
|
|
@@ -260241,7 +260307,7 @@ var script$4j = {
|
|
|
260241
260307
|
if (this.controlled) {
|
|
260242
260308
|
return this.modelValue.map((item) => String(item))
|
|
260243
260309
|
}
|
|
260244
|
-
const list = this.saved !== null ? this.saved : readPath$
|
|
260310
|
+
const list = this.saved !== null ? this.saved : readPath$a(this.objectData || {}, this.content.field);
|
|
260245
260311
|
return Array.isArray(list) ? list.map((item) => String(item)) : []
|
|
260246
260312
|
},
|
|
260247
260313
|
|
|
@@ -260356,7 +260422,7 @@ var script$4j = {
|
|
|
260356
260422
|
this.error = '';
|
|
260357
260423
|
try {
|
|
260358
260424
|
const data = await writeFields(this.objectUrl, { [this.content.field]: next }, { save: this.content.save, object: this.objectData });
|
|
260359
|
-
const written = readPath$
|
|
260425
|
+
const written = readPath$a(data, this.content.field);
|
|
260360
260426
|
this.saved = Array.isArray(written) ? written.map((item) => String(item)) : next;
|
|
260361
260427
|
/**
|
|
260362
260428
|
* @event saved The list was written.
|
|
@@ -260943,7 +261009,7 @@ var script$4i = {
|
|
|
260943
261009
|
* @return {unknown}
|
|
260944
261010
|
*/
|
|
260945
261011
|
stored(field) {
|
|
260946
|
-
const value = readPath$
|
|
261012
|
+
const value = readPath$a(this.objectData || {}, field.key);
|
|
260947
261013
|
if (field.type === 'switch') {
|
|
260948
261014
|
return switchIsOn(value, field.values)
|
|
260949
261015
|
}
|
|
@@ -260963,7 +261029,7 @@ var script$4i = {
|
|
|
260963
261029
|
*/
|
|
260964
261030
|
shown(field) {
|
|
260965
261031
|
const value = this.stored(field);
|
|
260966
|
-
const absent = readPath$
|
|
261032
|
+
const absent = readPath$a(this.objectData || {}, field.key) === undefined || readPath$a(this.objectData || {}, field.key) === null || value === '' || (field.type === 'chips' && value.length === 0);
|
|
260967
261033
|
if (absent && field.default !== undefined) {
|
|
260968
261034
|
return field.type === 'chips' && Array.isArray(field.default) ? [...field.default] : field.default
|
|
260969
261035
|
}
|
|
@@ -261120,7 +261186,7 @@ var script$4i = {
|
|
|
261120
261186
|
const form = { ...this.form };
|
|
261121
261187
|
for (const key of Object.keys(patch)) {
|
|
261122
261188
|
const field = this.fields.find((candidate) => candidate.key === key);
|
|
261123
|
-
const answered = readPath$
|
|
261189
|
+
const answered = readPath$a(data, key);
|
|
261124
261190
|
const written = answered !== undefined ? answered : patch[key];
|
|
261125
261191
|
baseline[key] = field.type === 'switch' ? switchIsOn(written, field.values) : (written === null ? (field.type === 'chips' ? [] : '') : written);
|
|
261126
261192
|
form[key] = baseline[key];
|
|
@@ -261528,7 +261594,7 @@ var script$4h = {
|
|
|
261528
261594
|
adopt() {
|
|
261529
261595
|
const values = {};
|
|
261530
261596
|
for (const row of this.rows) {
|
|
261531
|
-
const stored = switchIsOn(readPath$
|
|
261597
|
+
const stored = switchIsOn(readPath$a(this.objectData || {}, row.key), this.valuesOf(row));
|
|
261532
261598
|
values[row.key] = row.invert ? !stored : stored;
|
|
261533
261599
|
}
|
|
261534
261600
|
this.saved = values;
|
|
@@ -261555,7 +261621,7 @@ var script$4h = {
|
|
|
261555
261621
|
const values = this.valuesOf(row);
|
|
261556
261622
|
try {
|
|
261557
261623
|
const data = await writeFields(this.objectUrl, { [row.key]: switchStoredValue(stored, values) }, { save: this.content.save, object: this.objectData });
|
|
261558
|
-
const answered = readPath$
|
|
261624
|
+
const answered = readPath$a(data, row.key);
|
|
261559
261625
|
const written = answered !== undefined ? switchIsOn(answered, values) : stored;
|
|
261560
261626
|
const shown = row.invert ? !written : written;
|
|
261561
261627
|
this.saved = { ...this.saved, [row.key]: shown };
|
|
@@ -261799,7 +261865,7 @@ var script$4g = {
|
|
|
261799
261865
|
|
|
261800
261866
|
/** Read the choice off the object. */
|
|
261801
261867
|
adopt() {
|
|
261802
|
-
const stored = readPath$
|
|
261868
|
+
const stored = readPath$a(this.objectData || {}, this.content.field);
|
|
261803
261869
|
this.saved = stored === undefined || stored === null ? '' : String(stored);
|
|
261804
261870
|
this.value = this.saved;
|
|
261805
261871
|
},
|
|
@@ -261825,7 +261891,7 @@ var script$4g = {
|
|
|
261825
261891
|
this.value = String(option.value);
|
|
261826
261892
|
try {
|
|
261827
261893
|
const data = await writeFields(this.objectUrl, { [this.content.field]: option.value }, { save: this.content.save, object: this.objectData });
|
|
261828
|
-
const written = readPath$
|
|
261894
|
+
const written = readPath$a(data, this.content.field);
|
|
261829
261895
|
this.saved = String(written !== undefined && written !== null ? written : option.value);
|
|
261830
261896
|
this.value = this.saved;
|
|
261831
261897
|
/**
|
|
@@ -262148,7 +262214,7 @@ var script$4f = {
|
|
|
262148
262214
|
* @return {unknown}
|
|
262149
262215
|
*/
|
|
262150
262216
|
stored(field) {
|
|
262151
|
-
return Object.hasOwn(this.saved, field) ? this.saved[field] : readPath$
|
|
262217
|
+
return Object.hasOwn(this.saved, field) ? this.saved[field] : readPath$a(this.objectData || {}, field)
|
|
262152
262218
|
},
|
|
262153
262219
|
|
|
262154
262220
|
/**
|
|
@@ -262183,7 +262249,7 @@ var script$4f = {
|
|
|
262183
262249
|
return this.rowSaved[row.key]
|
|
262184
262250
|
}
|
|
262185
262251
|
if (this.bind.mode === 'each') {
|
|
262186
|
-
return this.bind.field ? readPath$
|
|
262252
|
+
return this.bind.field ? readPath$a(row.item || row, this.bind.field) : undefined
|
|
262187
262253
|
}
|
|
262188
262254
|
const map = this.bind.url ? this.map : (this.bind.field ? this.stored(this.bind.field) : null);
|
|
262189
262255
|
return map && typeof map === 'object' ? map[row.key] : undefined
|
|
@@ -262199,7 +262265,7 @@ var script$4f = {
|
|
|
262199
262265
|
const object = this.objectData || {};
|
|
262200
262266
|
return String(url)
|
|
262201
262267
|
.replace(/@objectId/g, () => encodeURIComponent(String(this.objectId || object.id || '')))
|
|
262202
|
-
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$
|
|
262268
|
+
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$a(object, path) ?? '')))
|
|
262203
262269
|
},
|
|
262204
262270
|
|
|
262205
262271
|
/**
|
|
@@ -262215,7 +262281,7 @@ var script$4f = {
|
|
|
262215
262281
|
try {
|
|
262216
262282
|
const { default: axios } = await import('@nextcloud/axios');
|
|
262217
262283
|
const { data } = await axios.get(prefixUrl(this.fillUrl(this.bind.url)));
|
|
262218
|
-
const map = this.bind.path ? readPath$
|
|
262284
|
+
const map = this.bind.path ? readPath$a(data, this.bind.path) : data;
|
|
262219
262285
|
this.map = map && typeof map === 'object' ? map : {};
|
|
262220
262286
|
} catch (e) {
|
|
262221
262287
|
this.notice = serverErrorMessage(e);
|
|
@@ -262239,7 +262305,7 @@ var script$4f = {
|
|
|
262239
262305
|
throw new Error(this.tr('This switch cannot be saved here.'))
|
|
262240
262306
|
}
|
|
262241
262307
|
const data = await writeFields(url, { [this.bind.field]: value }, { save, object: row.item || row });
|
|
262242
|
-
const answered = hasSave ? undefined : readPath$
|
|
262308
|
+
const answered = hasSave ? undefined : readPath$a(data, this.bind.field);
|
|
262243
262309
|
return answered !== undefined ? answered : value
|
|
262244
262310
|
}
|
|
262245
262311
|
if (this.bind.url) {
|
|
@@ -262264,7 +262330,7 @@ var script$4f = {
|
|
|
262264
262330
|
* @return {string}
|
|
262265
262331
|
*/
|
|
262266
262332
|
cell(row, column) {
|
|
262267
|
-
const raw = readPath$
|
|
262333
|
+
const raw = readPath$a(row, column.path);
|
|
262268
262334
|
if (raw === undefined || raw === null || raw === '') {
|
|
262269
262335
|
return ''
|
|
262270
262336
|
}
|
|
@@ -262284,15 +262350,15 @@ var script$4f = {
|
|
|
262284
262350
|
try {
|
|
262285
262351
|
const { default: axios } = await import('@nextcloud/axios');
|
|
262286
262352
|
const { data } = await axios.get(prefixUrl(url));
|
|
262287
|
-
const list = source.path ? readPath$
|
|
262353
|
+
const list = source.path ? readPath$a(data, source.path) : data;
|
|
262288
262354
|
this.sourced = (Array.isArray(list) ? list : [])
|
|
262289
|
-
.filter((item) => item && readPath$
|
|
262355
|
+
.filter((item) => item && readPath$a(item, source.key) !== undefined)
|
|
262290
262356
|
.map((item) => ({
|
|
262291
262357
|
...item,
|
|
262292
262358
|
item,
|
|
262293
|
-
key: String(readPath$
|
|
262294
|
-
title: String(readPath$
|
|
262295
|
-
hint: source.hint ? String(readPath$
|
|
262359
|
+
key: String(readPath$a(item, source.key)),
|
|
262360
|
+
title: String(readPath$a(item, source.label || source.key) ?? readPath$a(item, source.key)),
|
|
262361
|
+
hint: source.hint ? String(readPath$a(item, source.hint) ?? '') : '',
|
|
262296
262362
|
}));
|
|
262297
262363
|
} catch (e) {
|
|
262298
262364
|
this.notice = serverErrorMessage(e);
|
|
@@ -262340,7 +262406,7 @@ var script$4f = {
|
|
|
262340
262406
|
this.busy = row.key;
|
|
262341
262407
|
try {
|
|
262342
262408
|
const data = await writeFields(this.objectUrl, { [field]: next }, { save: this.content.save, object: this.objectData });
|
|
262343
|
-
const answered = readPath$
|
|
262409
|
+
const answered = readPath$a(data, field);
|
|
262344
262410
|
const written = answered !== undefined ? answered : next;
|
|
262345
262411
|
this.saved = { ...this.saved, [field]: written };
|
|
262346
262412
|
/**
|
|
@@ -262631,7 +262697,7 @@ var script$4e = {
|
|
|
262631
262697
|
if (!this.content.editablePath) {
|
|
262632
262698
|
return true
|
|
262633
262699
|
}
|
|
262634
|
-
return readPath$
|
|
262700
|
+
return readPath$a(this.answer, this.content.editablePath) === true
|
|
262635
262701
|
},
|
|
262636
262702
|
|
|
262637
262703
|
/**
|
|
@@ -262647,11 +262713,11 @@ var script$4e = {
|
|
|
262647
262713
|
const value = this.controlValue(control);
|
|
262648
262714
|
const base = { ...control, label: this.tr(control.label || control.param), value };
|
|
262649
262715
|
if (control.type === 'date') {
|
|
262650
|
-
return { ...base, max: control.maxPath ? readPath$
|
|
262716
|
+
return { ...base, max: control.maxPath ? readPath$a(this.answer, control.maxPath) : '', today: control.todayPath ? readPath$a(this.answer, control.todayPath) : '' }
|
|
262651
262717
|
}
|
|
262652
|
-
const options = (readPath$
|
|
262653
|
-
value: String(readPath$
|
|
262654
|
-
label: String(readPath$
|
|
262718
|
+
const options = (readPath$a(this.answer, control.optionsPath || '') || []).map((option) => ({
|
|
262719
|
+
value: String(readPath$a(option, control.optionValue || 'id') ?? ''),
|
|
262720
|
+
label: String(readPath$a(option, control.optionLabel || 'name') ?? ''),
|
|
262655
262721
|
}));
|
|
262656
262722
|
return { ...base, type: 'select', options, selected: options.find((option) => option.value === value) || null }
|
|
262657
262723
|
})
|
|
@@ -262704,7 +262770,7 @@ var script$4e = {
|
|
|
262704
262770
|
|
|
262705
262771
|
heading() {
|
|
262706
262772
|
const text = this.tr(this.content.heading || '');
|
|
262707
|
-
const suffix = this.content.headingPath ? readPath$
|
|
262773
|
+
const suffix = this.content.headingPath ? readPath$a(this.answer, this.content.headingPath) : '';
|
|
262708
262774
|
if (text && suffix) {
|
|
262709
262775
|
return `${text} · ${suffix}`
|
|
262710
262776
|
}
|
|
@@ -262799,7 +262865,7 @@ var script$4e = {
|
|
|
262799
262865
|
if (typeof query[control.param] === 'string' && query[control.param] !== '') {
|
|
262800
262866
|
return query[control.param]
|
|
262801
262867
|
}
|
|
262802
|
-
const answered = control.valuePath ? readPath$
|
|
262868
|
+
const answered = control.valuePath ? readPath$a(this.answer, control.valuePath) : '';
|
|
262803
262869
|
return answered === null || answered === undefined ? '' : String(answered)
|
|
262804
262870
|
},
|
|
262805
262871
|
|
|
@@ -262816,7 +262882,7 @@ var script$4e = {
|
|
|
262816
262882
|
if (!rule || !rule.path) {
|
|
262817
262883
|
return false
|
|
262818
262884
|
}
|
|
262819
|
-
const value = readPath$
|
|
262885
|
+
const value = readPath$a(data, rule.path);
|
|
262820
262886
|
const present = value !== null && value !== undefined && value !== '' && value !== false
|
|
262821
262887
|
&& !(Array.isArray(value) && value.length === 0);
|
|
262822
262888
|
if (Object.hasOwn(rule, 'equals')) {
|
|
@@ -262881,7 +262947,7 @@ var script$4e = {
|
|
|
262881
262947
|
const keyField = this.content.rowKey || 'id';
|
|
262882
262948
|
const labelField = this.content.labelField || 'name';
|
|
262883
262949
|
const stateField = this.content.stateField || 'state';
|
|
262884
|
-
const list = readPath$
|
|
262950
|
+
const list = readPath$a(this.answer, this.content.rowsPath || 'rows');
|
|
262885
262951
|
this.rows = (Array.isArray(list) ? list : []).map((source) => {
|
|
262886
262952
|
const state = typeof source[stateField] === 'string' && source[stateField] !== '' ? source[stateField] : this.defaultState;
|
|
262887
262953
|
const values = {};
|
|
@@ -263009,7 +263075,7 @@ var script$4e = {
|
|
|
263009
263075
|
*/
|
|
263010
263076
|
rowBadges(row) {
|
|
263011
263077
|
const read = (path) => {
|
|
263012
|
-
const value = readPath$
|
|
263078
|
+
const value = readPath$a(row.source, path);
|
|
263013
263079
|
return value === null || value === undefined ? '' : String(value)
|
|
263014
263080
|
};
|
|
263015
263081
|
return (Array.isArray(this.content.badges) ? this.content.badges : [])
|
|
@@ -263115,7 +263181,7 @@ var script$4e = {
|
|
|
263115
263181
|
}
|
|
263116
263182
|
const body = {};
|
|
263117
263183
|
for (const [key, path] of Object.entries(save.body || {})) {
|
|
263118
|
-
const value = readPath$
|
|
263184
|
+
const value = readPath$a(this.answer, path);
|
|
263119
263185
|
body[key] = value === undefined || value === '' ? null : value;
|
|
263120
263186
|
}
|
|
263121
263187
|
body[save.rowsKey || 'rows'] = this.rows.map((row) => this.rowToSave(row));
|
|
@@ -263682,7 +263748,7 @@ var script$4d = {
|
|
|
263682
263748
|
for (let page = 1; ; page++) {
|
|
263683
263749
|
const { data } = await axios$1.get(url, { params: { ...(this.source.filter || {}), _limit: PAGE_SIZE, _page: page } });
|
|
263684
263750
|
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$
|
|
263751
|
+
items.push(...results.map((item) => ({ ...item, id: String(item.id || item.uuid || readPath$a(item, '@self.id') || '') })));
|
|
263686
263752
|
const pages = Number(data && data.pages) || 1;
|
|
263687
263753
|
if (Array.isArray(data) || page >= pages || results.length === 0) {
|
|
263688
263754
|
break
|
|
@@ -264023,13 +264089,13 @@ var script$4c = {
|
|
|
264023
264089
|
options() {
|
|
264024
264090
|
const items = [...(Array.isArray(this.content.items) ? this.content.items : []), ...this.sourced];
|
|
264025
264091
|
return items
|
|
264026
|
-
.filter((item) => item && readPath$
|
|
264092
|
+
.filter((item) => item && readPath$a(item, this.spec.key || 'key') !== undefined)
|
|
264027
264093
|
.map((item) => {
|
|
264028
|
-
const key = String(readPath$
|
|
264029
|
-
const refusal = this.spec.refusal ? readPath$
|
|
264094
|
+
const key = String(readPath$a(item, this.spec.key || 'key'));
|
|
264095
|
+
const refusal = this.spec.refusal ? readPath$a(item, this.spec.refusal) : '';
|
|
264030
264096
|
return {
|
|
264031
264097
|
key,
|
|
264032
|
-
title: String(readPath$
|
|
264098
|
+
title: String(readPath$a(item, this.spec.label || 'label') ?? key),
|
|
264033
264099
|
swatches: this.listOf(item, this.spec.swatches).filter((colour) => typeof colour === 'string'),
|
|
264034
264100
|
pill: this.pillOf(item),
|
|
264035
264101
|
refusal: typeof refusal === 'string' ? refusal : '',
|
|
@@ -264101,7 +264167,7 @@ var script$4c = {
|
|
|
264101
264167
|
|
|
264102
264168
|
/** Read the current choice off the object. */
|
|
264103
264169
|
adopt() {
|
|
264104
|
-
const stored = readPath$
|
|
264170
|
+
const stored = readPath$a(this.objectData || {}, this.content.field);
|
|
264105
264171
|
this.saved = stored === undefined || stored === null ? '' : String(stored);
|
|
264106
264172
|
this.chosen = this.saved;
|
|
264107
264173
|
},
|
|
@@ -264114,7 +264180,7 @@ var script$4c = {
|
|
|
264114
264180
|
* @return {Array}
|
|
264115
264181
|
*/
|
|
264116
264182
|
listOf(item, path) {
|
|
264117
|
-
const list = path ? readPath$
|
|
264183
|
+
const list = path ? readPath$a(item, path) : [];
|
|
264118
264184
|
return Array.isArray(list) ? list : []
|
|
264119
264185
|
},
|
|
264120
264186
|
|
|
@@ -264129,7 +264195,7 @@ var script$4c = {
|
|
|
264129
264195
|
if (!state || !state.path) {
|
|
264130
264196
|
return null
|
|
264131
264197
|
}
|
|
264132
|
-
const raw = readPath$
|
|
264198
|
+
const raw = readPath$a(item, state.path);
|
|
264133
264199
|
const empty = raw === undefined || raw === null || raw === '';
|
|
264134
264200
|
if (empty) {
|
|
264135
264201
|
return state.empty ? { label: this.tr(state.empty), variant: isBadgeVariant(state.emptyVariant) ? state.emptyVariant : 'default' } : null
|
|
@@ -264158,7 +264224,7 @@ var script$4c = {
|
|
|
264158
264224
|
if (!entry || typeof entry !== 'object' || !spec.item) {
|
|
264159
264225
|
return ''
|
|
264160
264226
|
}
|
|
264161
|
-
return this.tr(spec.item).replace(/\{([\w.]+)\}/g, (m, path) => String(readPath$
|
|
264227
|
+
return this.tr(spec.item).replace(/\{([\w.]+)\}/g, (m, path) => String(readPath$a(entry, path) ?? ''))
|
|
264162
264228
|
})
|
|
264163
264229
|
.filter((line) => line !== '')
|
|
264164
264230
|
},
|
|
@@ -264189,11 +264255,11 @@ var script$4c = {
|
|
|
264189
264255
|
}
|
|
264190
264256
|
const whole = value.match(/^@object\.([\w.@]+)$/);
|
|
264191
264257
|
if (whole) {
|
|
264192
|
-
return readPath$
|
|
264258
|
+
return readPath$a(object, whole[1])
|
|
264193
264259
|
}
|
|
264194
264260
|
return value
|
|
264195
264261
|
.replace(/@objectId/g, () => encodeURIComponent(String(this.objectId || object.id || '')))
|
|
264196
|
-
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$
|
|
264262
|
+
.replace(/@object\.([\w.@]+)/g, (m, path) => encodeURIComponent(String(readPath$a(object, path) ?? '')))
|
|
264197
264263
|
.replace(/@value/g, () => encodeURIComponent(String(vars.value)))
|
|
264198
264264
|
},
|
|
264199
264265
|
|
|
@@ -264206,7 +264272,7 @@ var script$4c = {
|
|
|
264206
264272
|
try {
|
|
264207
264273
|
const { default: axios } = await import('@nextcloud/axios');
|
|
264208
264274
|
const { data } = await axios.get(prefixUrl(String(this.resolve(this.spec.url, { value: '', confirmed: false }))));
|
|
264209
|
-
const list = this.spec.path ? readPath$
|
|
264275
|
+
const list = this.spec.path ? readPath$a(data, this.spec.path) : data;
|
|
264210
264276
|
this.sourced = Array.isArray(list) ? list : [];
|
|
264211
264277
|
} catch (e) {
|
|
264212
264278
|
this.noticeType = 'error';
|
|
@@ -264547,13 +264613,13 @@ function snapshotKeys(local, office) {
|
|
|
264547
264613
|
* @spec openspec/changes/conflict-resolve-card/specs/conflict-resolve-card/spec.md#requirement-a-card-shows-both-versions-of-each-differing-field
|
|
264548
264614
|
*/
|
|
264549
264615
|
function conflictFields(record, options = {}) {
|
|
264550
|
-
const local = asObject(readPath$
|
|
264551
|
-
const office = asObject(readPath$
|
|
264616
|
+
const local = asObject(readPath$a(record, options.localPath || 'clientVersion'));
|
|
264617
|
+
const office = asObject(readPath$a(record, options.officePath || 'serverVersion'));
|
|
264552
264618
|
const named = pathList(options.fields);
|
|
264553
|
-
const listed = named.length > 0 ? named : pathList(readPath$
|
|
264619
|
+
const listed = named.length > 0 ? named : pathList(readPath$a(record, options.fieldsPath || 'conflictFields'));
|
|
264554
264620
|
const paths = listed.length > 0 ? listed : snapshotKeys(local, office);
|
|
264555
264621
|
return paths
|
|
264556
|
-
.map((path) => ({ path, local: valueText$1(readPath$
|
|
264622
|
+
.map((path) => ({ path, local: valueText$1(readPath$a(local, path)), office: valueText$1(readPath$a(office, path)) }))
|
|
264557
264623
|
.filter((field) => field.local !== field.office)
|
|
264558
264624
|
}
|
|
264559
264625
|
|
|
@@ -264699,7 +264765,7 @@ var script$4b = {
|
|
|
264699
264765
|
return true
|
|
264700
264766
|
}
|
|
264701
264767
|
try {
|
|
264702
|
-
return Boolean(readPath$
|
|
264768
|
+
return Boolean(readPath$a(capabilities.getCapabilities() || {}, capability))
|
|
264703
264769
|
} catch {
|
|
264704
264770
|
return false
|
|
264705
264771
|
}
|
|
@@ -264726,7 +264792,7 @@ var script$4b = {
|
|
|
264726
264792
|
cards() {
|
|
264727
264793
|
const options = { localPath: this.content.localPath, officePath: this.content.officePath, fieldsPath: this.content.fieldsPath, fields: this.content.fields };
|
|
264728
264794
|
return this.records
|
|
264729
|
-
.map((record) => ({ id: String(readPath$
|
|
264795
|
+
.map((record) => ({ id: String(readPath$a(record, 'id') ?? readPath$a(record, '@self.id') ?? ''), record, fields: conflictFields(record, options) }))
|
|
264730
264796
|
.filter((card) => card.id !== '' && card.fields.length > 0)
|
|
264731
264797
|
},
|
|
264732
264798
|
|
|
@@ -265245,9 +265311,9 @@ var script$4a = {
|
|
|
265245
265311
|
leafProps(row) {
|
|
265246
265312
|
const leaf = this.leaf || {};
|
|
265247
265313
|
return {
|
|
265248
|
-
objectId: String(readPath$
|
|
265314
|
+
objectId: String(readPath$a(row, leaf.objectIdField || 'id') ?? ''),
|
|
265249
265315
|
register: leaf.register || '',
|
|
265250
|
-
schema: leaf.schemaField ? String(readPath$
|
|
265316
|
+
schema: leaf.schemaField ? String(readPath$a(row, leaf.schemaField) ?? '') : (leaf.schema || ''),
|
|
265251
265317
|
surface: 'row',
|
|
265252
265318
|
}
|
|
265253
265319
|
},
|
|
@@ -265261,10 +265327,10 @@ var script$4a = {
|
|
|
265261
265327
|
*/
|
|
265262
265328
|
urlOf(row) {
|
|
265263
265329
|
if (this.action.urlField) {
|
|
265264
|
-
return String(readPath$
|
|
265330
|
+
return String(readPath$a(row, this.action.urlField) ?? '')
|
|
265265
265331
|
}
|
|
265266
265332
|
const template = String(this.action.url || '');
|
|
265267
|
-
return template.replace(/\{([A-Za-z0-9_.]+)\}/g, (_, path) => encodeURIComponent(String(readPath$
|
|
265333
|
+
return template.replace(/\{([A-Za-z0-9_.]+)\}/g, (_, path) => encodeURIComponent(String(readPath$a(row, path) ?? '')))
|
|
265268
265334
|
},
|
|
265269
265335
|
|
|
265270
265336
|
/**
|
|
@@ -266310,7 +266376,7 @@ var script$49 = {
|
|
|
266310
266376
|
const labels = c.valueLabels && typeof c.valueLabels[c.groupBy] === 'object' ? c.valueLabels[c.groupBy] : {};
|
|
266311
266377
|
const buckets = new Map();
|
|
266312
266378
|
for (const item of this.items) {
|
|
266313
|
-
const raw = readPath$
|
|
266379
|
+
const raw = readPath$a(item.row, c.groupBy);
|
|
266314
266380
|
const value = raw === null || raw === undefined || typeof raw === 'object' ? '' : String(raw);
|
|
266315
266381
|
if (!buckets.has(value)) {
|
|
266316
266382
|
buckets.set(value, []);
|
|
@@ -266402,7 +266468,7 @@ var script$49 = {
|
|
|
266402
266468
|
row: item.row,
|
|
266403
266469
|
rowActions: this.rowActions.length > 0 ? this.rowActionsOf(item.row) : [],
|
|
266404
266470
|
to: item.attrs.to || null,
|
|
266405
|
-
depth: indentPath ? Math.max(0, Math.floor(Number(readPath$
|
|
266471
|
+
depth: indentPath ? Math.max(0, Math.floor(Number(readPath$a(item.row, indentPath)) || 0)) : 0,
|
|
266406
266472
|
cells: this.tableColumns.map((col) => {
|
|
266407
266473
|
const text = this.fill(col.value, item.row);
|
|
266408
266474
|
const limit = Number(col.alertAbove);
|
|
@@ -266498,7 +266564,7 @@ var script$49 = {
|
|
|
266498
266564
|
if (!field) {
|
|
266499
266565
|
return 0
|
|
266500
266566
|
}
|
|
266501
|
-
return Math.max(0, ...this.rows.slice(0, this.limit).map((row) => Number(readPath$
|
|
266567
|
+
return Math.max(0, ...this.rows.slice(0, this.limit).map((row) => Number(readPath$a(row, field)) || 0))
|
|
266502
266568
|
},
|
|
266503
266569
|
|
|
266504
266570
|
/** @return {object|null} The header link with `{total}` filled and tokens resolved; null while an href param is unresolved. */
|
|
@@ -266750,7 +266816,7 @@ var script$49 = {
|
|
|
266750
266816
|
}
|
|
266751
266817
|
const ids = new Set();
|
|
266752
266818
|
for (const row of this.rows.slice(0, this.limit)) {
|
|
266753
|
-
const list = readPath$
|
|
266819
|
+
const list = readPath$a(row, field);
|
|
266754
266820
|
for (const id of Array.isArray(list) ? list : []) {
|
|
266755
266821
|
if (typeof id === 'string' && id !== '') {
|
|
266756
266822
|
ids.add(id);
|
|
@@ -266893,7 +266959,7 @@ var script$49 = {
|
|
|
266893
266959
|
}
|
|
266894
266960
|
let mapped = '';
|
|
266895
266961
|
if (typeof def.field === 'string' && def.field !== '') {
|
|
266896
|
-
const raw = readPath$
|
|
266962
|
+
const raw = readPath$a(row, def.field);
|
|
266897
266963
|
if (raw === null || raw === undefined || raw === '') {
|
|
266898
266964
|
return ''
|
|
266899
266965
|
}
|
|
@@ -266920,7 +266986,7 @@ var script$49 = {
|
|
|
266920
266986
|
return flags
|
|
266921
266987
|
.filter((flag) => flag && typeof flag.field === 'string' && typeof flag.label === 'string' && flag.label !== '')
|
|
266922
266988
|
.filter((flag) => {
|
|
266923
|
-
const raw = readPath$
|
|
266989
|
+
const raw = readPath$a(row, flag.field);
|
|
266924
266990
|
return flag.value !== undefined ? String(raw) === String(flag.value) : raw === true || raw === 'true' || raw === 1
|
|
266925
266991
|
})
|
|
266926
266992
|
.map((flag) => this.translate(flag.label))
|
|
@@ -267015,11 +267081,11 @@ var script$49 = {
|
|
|
267015
267081
|
if (!bar || typeof bar !== 'object' || !bar.valueField) {
|
|
267016
267082
|
return null
|
|
267017
267083
|
}
|
|
267018
|
-
const value = Number(readPath$
|
|
267084
|
+
const value = Number(readPath$a(row, bar.valueField));
|
|
267019
267085
|
if (!Number.isFinite(value)) {
|
|
267020
267086
|
return null
|
|
267021
267087
|
}
|
|
267022
|
-
const ownMax = bar.maxField ? Number(readPath$
|
|
267088
|
+
const ownMax = bar.maxField ? Number(readPath$a(row, bar.maxField)) : NaN;
|
|
267023
267089
|
const max = bar.maxField ? (Number.isFinite(ownMax) && ownMax > 0 ? ownMax : 0) : scale;
|
|
267024
267090
|
const share = max > 0 ? Math.min(100, Math.max(0, (value / max) * 100)) : 0;
|
|
267025
267091
|
const over = Boolean(bar.maxField) && bar.overVariant === 'error' && max > 0 && value > max;
|
|
@@ -267039,7 +267105,7 @@ var script$49 = {
|
|
|
267039
267105
|
if (!tone || typeof tone !== 'object' || typeof tone.field !== 'string' || !tone.map || typeof tone.map !== 'object') {
|
|
267040
267106
|
return ''
|
|
267041
267107
|
}
|
|
267042
|
-
const variant = tone.map[String(readPath$
|
|
267108
|
+
const variant = tone.map[String(readPath$a(row, tone.field) ?? '')];
|
|
267043
267109
|
return ['default', 'success', 'warning', 'error', 'info', 'purple', 'teal'].includes(variant) ? variant : ''
|
|
267044
267110
|
},
|
|
267045
267111
|
|
|
@@ -267058,7 +267124,7 @@ var script$49 = {
|
|
|
267058
267124
|
if (!icon || typeof icon !== 'object' || typeof icon.field !== 'string' || !icon.map || typeof icon.map !== 'object') {
|
|
267059
267125
|
return ''
|
|
267060
267126
|
}
|
|
267061
|
-
const name = icon.map[String(readPath$
|
|
267127
|
+
const name = icon.map[String(readPath$a(row, icon.field) ?? '')];
|
|
267062
267128
|
return typeof name === 'string' ? name : ''
|
|
267063
267129
|
},
|
|
267064
267130
|
|
|
@@ -267202,7 +267268,7 @@ var script$49 = {
|
|
|
267202
267268
|
let label = typeof action.label === 'string' ? action.label : '';
|
|
267203
267269
|
const by = action.labels;
|
|
267204
267270
|
if (by && typeof by === 'object' && typeof by.field === 'string' && by.map && typeof by.map === 'object') {
|
|
267205
|
-
const raw = readPath$
|
|
267271
|
+
const raw = readPath$a(row, by.field);
|
|
267206
267272
|
if (raw !== null && raw !== undefined && typeof by.map[String(raw)] === 'string') {
|
|
267207
267273
|
label = by.map[String(raw)];
|
|
267208
267274
|
}
|
|
@@ -267281,7 +267347,7 @@ var script$49 = {
|
|
|
267281
267347
|
*/
|
|
267282
267348
|
rowIdOf(row) {
|
|
267283
267349
|
const field = this.content?.rowIdField;
|
|
267284
|
-
const id = field ? readPath$
|
|
267350
|
+
const id = field ? readPath$a(row, field) : (row && (row.id || row['@self']?.id));
|
|
267285
267351
|
return (id === null || id === undefined || id === '' || typeof id === 'object') ? null : String(id)
|
|
267286
267352
|
},
|
|
267287
267353
|
|
|
@@ -267329,7 +267395,7 @@ var script$49 = {
|
|
|
267329
267395
|
*/
|
|
267330
267396
|
rowHref(row) {
|
|
267331
267397
|
const field = this.content?.rowHrefField;
|
|
267332
|
-
const href = field && row ? readPath$
|
|
267398
|
+
const href = field && row ? readPath$a(row, field) : null;
|
|
267333
267399
|
if (typeof href !== 'string' || !/^(\/(?!\/)|https?:\/\/)/i.test(href)) {
|
|
267334
267400
|
return ''
|
|
267335
267401
|
}
|
|
@@ -267339,13 +267405,13 @@ var script$49 = {
|
|
|
267339
267405
|
rowLink(row) {
|
|
267340
267406
|
// `rowRouteField`: the route name read from the row, for a list
|
|
267341
267407
|
// whose rows open different pages (a case and a task).
|
|
267342
|
-
const byField = this.content?.rowRouteField ? readPath$
|
|
267408
|
+
const byField = this.content?.rowRouteField ? readPath$a(row, this.content.rowRouteField) : null;
|
|
267343
267409
|
const route = (typeof byField === 'string' && byField !== '') ? byField : this.content?.rowRoute;
|
|
267344
267410
|
if (!route || !this.$router || !row) {
|
|
267345
267411
|
return null
|
|
267346
267412
|
}
|
|
267347
267413
|
const field = this.content?.rowIdField;
|
|
267348
|
-
const id = field ? readPath$
|
|
267414
|
+
const id = field ? readPath$a(row, field) : (row.id || row['@self']?.id);
|
|
267349
267415
|
if (id === null || id === undefined || id === '' || typeof id === 'object') {
|
|
267350
267416
|
return null
|
|
267351
267417
|
}
|
|
@@ -267366,7 +267432,7 @@ var script$49 = {
|
|
|
267366
267432
|
if (!due || typeof due !== 'object' || !due.field) {
|
|
267367
267433
|
return null
|
|
267368
267434
|
}
|
|
267369
|
-
return resolveDue(readPath$
|
|
267435
|
+
return resolveDue(readPath$a(row, due.field), due, (text) => this.translate(text))
|
|
267370
267436
|
},
|
|
267371
267437
|
|
|
267372
267438
|
/**
|
|
@@ -267492,7 +267558,7 @@ var script$49 = {
|
|
|
267492
267558
|
* @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
267559
|
*/
|
|
267494
267560
|
countBadgeOf(row, badge, index) {
|
|
267495
|
-
const raw = readPath$
|
|
267561
|
+
const raw = readPath$a(row, badge.field);
|
|
267496
267562
|
const count = Array.isArray(raw) ? raw.length : Number(raw);
|
|
267497
267563
|
if (!Number.isFinite(count) || count < 1) {
|
|
267498
267564
|
return null
|
|
@@ -267532,7 +267598,7 @@ var script$49 = {
|
|
|
267532
267598
|
if (tone.override && typeof tone.override === 'object' && evaluateVisibleWhenLocal(tone.override.when, row || {})) {
|
|
267533
267599
|
variant = tone.override.tone;
|
|
267534
267600
|
} else {
|
|
267535
|
-
const value = tone.field ? readPath$
|
|
267601
|
+
const value = tone.field ? readPath$a(row, tone.field) : text;
|
|
267536
267602
|
const map = tone.map && typeof tone.map === 'object' ? tone.map : {};
|
|
267537
267603
|
variant = Object.hasOwn(map, String(value)) ? map[String(value)] : tone.default;
|
|
267538
267604
|
}
|
|
@@ -267629,7 +267695,7 @@ var script$49 = {
|
|
|
267629
267695
|
return records
|
|
267630
267696
|
}
|
|
267631
267697
|
return records.flatMap((record) => {
|
|
267632
|
-
const list = readPath$
|
|
267698
|
+
const list = readPath$a(record, path);
|
|
267633
267699
|
return Array.isArray(list)
|
|
267634
267700
|
? list.filter((entry) => entry && typeof entry === 'object').map((entry) => ({ ...entry, '@parent': record }))
|
|
267635
267701
|
: []
|
|
@@ -267682,7 +267748,7 @@ var script$49 = {
|
|
|
267682
267748
|
if (!spec || typeof spec !== 'object' || !spec.field) {
|
|
267683
267749
|
return []
|
|
267684
267750
|
}
|
|
267685
|
-
const list = readPath$
|
|
267751
|
+
const list = readPath$a(row, spec.field);
|
|
267686
267752
|
if (!Array.isArray(list)) {
|
|
267687
267753
|
return []
|
|
267688
267754
|
}
|
|
@@ -267720,7 +267786,7 @@ var script$49 = {
|
|
|
267720
267786
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
267721
267787
|
const found = {};
|
|
267722
267788
|
await Promise.all(refs.map(async (ref) => {
|
|
267723
|
-
const ids = [...new Set(this.rows.map((row) => readPath$
|
|
267789
|
+
const ids = [...new Set(this.rows.map((row) => readPath$a(row, ref.field)).filter((id) => typeof id === 'string' && id !== ''))].slice(0, 50);
|
|
267724
267790
|
found[ref.as] = {};
|
|
267725
267791
|
await Promise.all(ids.map(async (id) => {
|
|
267726
267792
|
try {
|
|
@@ -267739,7 +267805,7 @@ var script$49 = {
|
|
|
267739
267805
|
this.rows = this.rows.map((row) => {
|
|
267740
267806
|
const extra = {};
|
|
267741
267807
|
for (const ref of refs) {
|
|
267742
|
-
const record = found[ref.as]?.[readPath$
|
|
267808
|
+
const record = found[ref.as]?.[readPath$a(row, ref.field)];
|
|
267743
267809
|
if (record) {
|
|
267744
267810
|
extra[ref.as] = record;
|
|
267745
267811
|
}
|
|
@@ -267788,9 +267854,9 @@ var script$49 = {
|
|
|
267788
267854
|
}
|
|
267789
267855
|
const whole = text.match(/^\{([\w.@]+)\}$/);
|
|
267790
267856
|
if (whole) {
|
|
267791
|
-
return readPath$
|
|
267857
|
+
return readPath$a(row, whole[1]) ?? ''
|
|
267792
267858
|
}
|
|
267793
|
-
return text.replace(/\{([\w.@]+)\}/g, (_m, field) => String(readPath$
|
|
267859
|
+
return text.replace(/\{([\w.@]+)\}/g, (_m, field) => String(readPath$a(row, field) ?? ''))
|
|
267794
267860
|
},
|
|
267795
267861
|
|
|
267796
267862
|
/**
|
|
@@ -267803,7 +267869,7 @@ var script$49 = {
|
|
|
267803
267869
|
*/
|
|
267804
267870
|
setFieldDone(action, row) {
|
|
267805
267871
|
const object = this.tokenCtx.object || {};
|
|
267806
|
-
const current = readPath$
|
|
267872
|
+
const current = readPath$a(object, action.field);
|
|
267807
267873
|
const value = this.fillRow(action.value, row);
|
|
267808
267874
|
return Boolean(action.doneLabel) && value !== '' && current !== undefined && current !== null && String(current) === String(value)
|
|
267809
267875
|
},
|
|
@@ -267880,7 +267946,7 @@ var script$49 = {
|
|
|
267880
267946
|
return
|
|
267881
267947
|
}
|
|
267882
267948
|
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$
|
|
267949
|
+
const path = interpolateUrlTokens(action.endpoint, this.tokenCtx).replace(/\{([\w.@]+)\}/g, (_match, field) => encodeURIComponent(String(readPath$a(row, field) ?? '')));
|
|
267884
267950
|
const method = typeof action.method === 'string' ? action.method.toLowerCase() : 'post';
|
|
267885
267951
|
try {
|
|
267886
267952
|
await axios.request({ method, url: generateUrl(path) });
|
|
@@ -267926,7 +267992,7 @@ var script$49 = {
|
|
|
267926
267992
|
return
|
|
267927
267993
|
}
|
|
267928
267994
|
if (badge.kind === 'stale') {
|
|
267929
|
-
const days = ageInDays(readPath$
|
|
267995
|
+
const days = ageInDays(readPath$a(row, badge.field));
|
|
267930
267996
|
const after = Number(badge.afterDays);
|
|
267931
267997
|
if (days === null || !Number.isFinite(after) || days <= after) {
|
|
267932
267998
|
return
|
|
@@ -267998,7 +268064,7 @@ var script$49 = {
|
|
|
267998
268064
|
if (!pill || typeof pill !== 'object' || !pill.field) {
|
|
267999
268065
|
return null
|
|
268000
268066
|
}
|
|
268001
|
-
const raw = readPath$
|
|
268067
|
+
const raw = readPath$a(row, pill.field);
|
|
268002
268068
|
if (raw === null || raw === undefined || raw === '' || typeof raw === 'object') {
|
|
268003
268069
|
return null
|
|
268004
268070
|
}
|
|
@@ -268014,7 +268080,7 @@ var script$49 = {
|
|
|
268014
268080
|
const rule = Array.isArray(pill.variantWhen)
|
|
268015
268081
|
? pill.variantWhen.find((entry) => entry && entry.when && evaluateVisibleWhenLocal(entry.when, row || {}))
|
|
268016
268082
|
: null;
|
|
268017
|
-
const colour = pill.colorField ? readPath$
|
|
268083
|
+
const colour = pill.colorField ? readPath$a(row, pill.colorField) : null;
|
|
268018
268084
|
const fromRow = typeof colour === 'string' && colour !== '' ? variantForColor(colour) : null;
|
|
268019
268085
|
const variant = rule ? rule.variant : (found ? map[found] : (fromRow || pill.variant));
|
|
268020
268086
|
return {
|
|
@@ -268065,7 +268131,7 @@ var script$49 = {
|
|
|
268065
268131
|
return icon
|
|
268066
268132
|
}
|
|
268067
268133
|
if (icon && typeof icon === 'object') {
|
|
268068
|
-
const raw = icon.field ? readPath$
|
|
268134
|
+
const raw = icon.field ? readPath$a(row, icon.field) : undefined;
|
|
268069
268135
|
const map = icon.map && typeof icon.map === 'object' ? icon.map : {};
|
|
268070
268136
|
if (raw !== null && raw !== undefined && map[String(raw)]) {
|
|
268071
268137
|
return map[String(raw)]
|
|
@@ -323799,7 +323865,7 @@ function footerNoteForView(byView, view, footerNote) {
|
|
|
323799
323865
|
* @param {string} path The dot-path.
|
|
323800
323866
|
* @return {unknown} The value, or undefined.
|
|
323801
323867
|
*/
|
|
323802
|
-
function readPath$
|
|
323868
|
+
function readPath$3(row, path) {
|
|
323803
323869
|
return String(path).split('.').reduce((value, key) => (value && typeof value === 'object' ? value[key] : undefined), row)
|
|
323804
323870
|
}
|
|
323805
323871
|
|
|
@@ -323838,11 +323904,11 @@ async function labelsByField(source, get) {
|
|
|
323838
323904
|
}
|
|
323839
323905
|
const out = {};
|
|
323840
323906
|
for (const row of rows) {
|
|
323841
|
-
const key = readPath$
|
|
323907
|
+
const key = readPath$3(row, s.field);
|
|
323842
323908
|
if (key === undefined || key === null || !values.includes(String(key))) {
|
|
323843
323909
|
continue
|
|
323844
323910
|
}
|
|
323845
|
-
const label = (s.labelField ? readPath$
|
|
323911
|
+
const label = (s.labelField ? readPath$3(row, s.labelField) : undefined) ?? row?.title ?? row?.name;
|
|
323846
323912
|
if (label !== undefined && label !== null && String(label) !== '') {
|
|
323847
323913
|
out[String(key)] = String(label);
|
|
323848
323914
|
}
|
|
@@ -324178,7 +324244,7 @@ function mapListItems(rows, spec, { rowKey, located, translate = (text) => text,
|
|
|
324178
324244
|
if (!pill || typeof pill !== 'object') {
|
|
324179
324245
|
return null
|
|
324180
324246
|
}
|
|
324181
|
-
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$
|
|
324247
|
+
const raw = typeof pill.path === 'string' && pill.path !== '' ? readPath$a(row, pill.path) : undefined;
|
|
324182
324248
|
const formatter = typeof pill.formatter === 'string' && formatters ? formatters[pill.formatter] : null;
|
|
324183
324249
|
const formatted = typeof formatter === 'function' && (typeof raw === 'string' || typeof raw === 'number') && raw !== '' ? formatter(raw, row) : undefined;
|
|
324184
324250
|
const mapped = pill.map && (typeof raw === 'string' || typeof raw === 'number') && Object.hasOwn(pill.map, raw) ? pill.map[raw] : formatted;
|
|
@@ -326257,7 +326323,7 @@ function reverseSortKeys(keys) {
|
|
|
326257
326323
|
* @spec openspec/changes/sidebar-sort-source/specs/index-page/spec.md#requirement-a-sort-option-can-take-its-rows-from-an-endpoint
|
|
326258
326324
|
*/
|
|
326259
326325
|
function rowsFromSourceBody(body, source = {}) {
|
|
326260
|
-
const entries = Array.isArray(body) ? body : readPath$
|
|
326326
|
+
const entries = Array.isArray(body) ? body : readPath$a(body, source.rowsPath || 'results');
|
|
326261
326327
|
if (!Array.isArray(entries)) {
|
|
326262
326328
|
return []
|
|
326263
326329
|
}
|
|
@@ -326267,7 +326333,7 @@ function rowsFromSourceBody(body, source = {}) {
|
|
|
326267
326333
|
if (!entry || typeof entry !== 'object') {
|
|
326268
326334
|
continue
|
|
326269
326335
|
}
|
|
326270
|
-
const row = source.rowPath ? readPath$
|
|
326336
|
+
const row = source.rowPath ? readPath$a(entry, source.rowPath) : entry;
|
|
326271
326337
|
if (!row || typeof row !== 'object' || Array.isArray(row)) {
|
|
326272
326338
|
continue
|
|
326273
326339
|
}
|
|
@@ -326295,7 +326361,7 @@ function rowsFromSourceBody(body, source = {}) {
|
|
|
326295
326361
|
* @return {unknown} The value.
|
|
326296
326362
|
*/
|
|
326297
326363
|
function fieldOf(row, key) {
|
|
326298
|
-
const value = readPath$
|
|
326364
|
+
const value = readPath$a(row, key);
|
|
326299
326365
|
if (value !== undefined) {
|
|
326300
326366
|
return value
|
|
326301
326367
|
}
|
|
@@ -326415,7 +326481,7 @@ function annotateRows(rows, sourceRows, source = {}) {
|
|
|
326415
326481
|
}
|
|
326416
326482
|
const idPath = source.idPath || 'id';
|
|
326417
326483
|
const idOf = (row) => {
|
|
326418
|
-
const id = readPath$
|
|
326484
|
+
const id = readPath$a(row, idPath) ?? (row && row['@self'] ? row['@self'].id : undefined);
|
|
326419
326485
|
return id === undefined || id === null ? '' : String(id)
|
|
326420
326486
|
};
|
|
326421
326487
|
const byId = new Map();
|
|
@@ -328691,7 +328757,7 @@ function dueStateForRow(row, rule, now = new Date()) {
|
|
|
328691
328757
|
if (!rule || typeof rule.field !== 'string' || rule.field === '' || !row) {
|
|
328692
328758
|
return null
|
|
328693
328759
|
}
|
|
328694
|
-
return dueStateOf(readPath$
|
|
328760
|
+
return dueStateOf(readPath$a(row, rule.field), rule, now)
|
|
328695
328761
|
}
|
|
328696
328762
|
|
|
328697
328763
|
/**
|
|
@@ -329135,7 +329201,7 @@ var script$3p = {
|
|
|
329135
329201
|
},
|
|
329136
329202
|
|
|
329137
329203
|
methods: {
|
|
329138
|
-
readPath: readPath$
|
|
329204
|
+
readPath: readPath$a,
|
|
329139
329205
|
|
|
329140
329206
|
/**
|
|
329141
329207
|
* A card action was picked: tell the host, as a row action does.
|
|
@@ -329431,7 +329497,7 @@ var script$3p = {
|
|
|
329431
329497
|
* @spec openspec/changes/screens-board-reference-columns/specs/board-view/spec.md#requirement-a-card-field-can-show-through-a-formatter
|
|
329432
329498
|
*/
|
|
329433
329499
|
fieldText(card, field) {
|
|
329434
|
-
const raw = readPath$
|
|
329500
|
+
const raw = readPath$a(card, field);
|
|
329435
329501
|
const id = this.roles.formatters[field];
|
|
329436
329502
|
const fn = id && this.cnFormatters ? this.cnFormatters[id] : null;
|
|
329437
329503
|
if (typeof fn === 'function') {
|
|
@@ -329501,7 +329567,7 @@ var script$3p = {
|
|
|
329501
329567
|
if (!given || !given.resolve || !this.roles.pill || !this.pillLooks) {
|
|
329502
329568
|
return {}
|
|
329503
329569
|
}
|
|
329504
|
-
const raw = readPath$
|
|
329570
|
+
const raw = readPath$a(card, this.roles.pill);
|
|
329505
329571
|
const looks = this.pillLooks[this.roles.pill];
|
|
329506
329572
|
return pillLook(looks && raw !== null && raw !== undefined && typeof raw !== 'object' ? looks[String(raw)] : null)
|
|
329507
329573
|
},
|
|
@@ -329517,7 +329583,7 @@ var script$3p = {
|
|
|
329517
329583
|
if (this.roles.due === '') {
|
|
329518
329584
|
return ''
|
|
329519
329585
|
}
|
|
329520
|
-
const value = readPath$
|
|
329586
|
+
const value = readPath$a(card, this.roles.due);
|
|
329521
329587
|
const days = daysUntil(value, this.today);
|
|
329522
329588
|
if (days === null) {
|
|
329523
329589
|
return ''
|
|
@@ -329582,7 +329648,7 @@ var script$3p = {
|
|
|
329582
329648
|
return ''
|
|
329583
329649
|
}
|
|
329584
329650
|
const total = column.cards.reduce((sum, card) => {
|
|
329585
|
-
const n = Number(readPath$
|
|
329651
|
+
const n = Number(readPath$a(card, this.sumField));
|
|
329586
329652
|
return Number.isFinite(n) ? sum + n : sum
|
|
329587
329653
|
}, 0);
|
|
329588
329654
|
return formatMetricValue(total, this.sumFormat || { style: 'decimal', decimals: 0 }, {})
|
|
@@ -332281,7 +332347,7 @@ var script$3k = {
|
|
|
332281
332347
|
|
|
332282
332348
|
computed: {
|
|
332283
332349
|
title() {
|
|
332284
|
-
return String(readPath$
|
|
332350
|
+
return String(readPath$a(this.object, this.layout.title || 'title') ?? '')
|
|
332285
332351
|
},
|
|
332286
332352
|
|
|
332287
332353
|
badge() {
|
|
@@ -332293,7 +332359,7 @@ var script$3k = {
|
|
|
332293
332359
|
},
|
|
332294
332360
|
|
|
332295
332361
|
description() {
|
|
332296
|
-
return this.layout.description ? String(readPath$
|
|
332362
|
+
return this.layout.description ? String(readPath$a(this.object, this.layout.description) ?? '') : ''
|
|
332297
332363
|
},
|
|
332298
332364
|
|
|
332299
332365
|
chips() {
|
|
@@ -332301,7 +332367,7 @@ var script$3k = {
|
|
|
332301
332367
|
if (!def || !def.field) {
|
|
332302
332368
|
return []
|
|
332303
332369
|
}
|
|
332304
|
-
const items = readPath$
|
|
332370
|
+
const items = readPath$a(this.object, def.field);
|
|
332305
332371
|
if (!Array.isArray(items)) {
|
|
332306
332372
|
return []
|
|
332307
332373
|
}
|
|
@@ -332309,7 +332375,7 @@ var script$3k = {
|
|
|
332309
332375
|
.map((item, index) => {
|
|
332310
332376
|
const label = def.each && def.each.includes('{')
|
|
332311
332377
|
? fillTemplate(this.tr(def.each), item || {})
|
|
332312
|
-
: String(readPath$
|
|
332378
|
+
: String(readPath$a(item || {}, def.each || 'name') ?? '');
|
|
332313
332379
|
const tone = toneOf(def.tones, item);
|
|
332314
332380
|
const variant = tone ? tone.variant : def.variant;
|
|
332315
332381
|
return { key: def.field + '.' + index, label, variant: isBadgeVariant(variant) ? variant : 'default' }
|
|
@@ -332342,7 +332408,7 @@ var script$3k = {
|
|
|
332342
332408
|
},
|
|
332343
332409
|
|
|
332344
332410
|
tableRows() {
|
|
332345
|
-
const rows = this.table ? readPath$
|
|
332411
|
+
const rows = this.table ? readPath$a(this.object, this.table.field) : null;
|
|
332346
332412
|
return Array.isArray(rows) ? rows : []
|
|
332347
332413
|
},
|
|
332348
332414
|
|
|
@@ -332396,7 +332462,7 @@ var script$3k = {
|
|
|
332396
332462
|
|
|
332397
332463
|
methods: {
|
|
332398
332464
|
t: l10n.translate,
|
|
332399
|
-
readPath: readPath$
|
|
332465
|
+
readPath: readPath$a,
|
|
332400
332466
|
|
|
332401
332467
|
/**
|
|
332402
332468
|
* @param {string} text Text in the host's source language.
|
|
@@ -332428,7 +332494,7 @@ var script$3k = {
|
|
|
332428
332494
|
if (column.template) {
|
|
332429
332495
|
return fillTemplate(this.tr(column.template), entry || {})
|
|
332430
332496
|
}
|
|
332431
|
-
const value = column.key ? readPath$
|
|
332497
|
+
const value = column.key ? readPath$a(entry || {}, column.key) : '';
|
|
332432
332498
|
return value === null || value === undefined ? '' : String(value)
|
|
332433
332499
|
},
|
|
332434
332500
|
|
|
@@ -332480,7 +332546,7 @@ var script$3k = {
|
|
|
332480
332546
|
return this.percent(row.entry, column)
|
|
332481
332547
|
}
|
|
332482
332548
|
if (column.as === 'check' || column.as === 'yesNo') {
|
|
332483
|
-
return readPath$
|
|
332549
|
+
return readPath$a(row.entry || {}, column.key) ? 1 : 0
|
|
332484
332550
|
}
|
|
332485
332551
|
return this.displayValue(row, column)
|
|
332486
332552
|
},
|
|
@@ -332498,9 +332564,9 @@ var script$3k = {
|
|
|
332498
332564
|
case 'bar':
|
|
332499
332565
|
return this.percent(entry, column) + '%'
|
|
332500
332566
|
case 'check':
|
|
332501
|
-
return readPath$
|
|
332567
|
+
return readPath$a(entry || {}, column.key) ? this.tr(column.text || '') || l10n.translate('nextcloud-vue', 'Yes') : ''
|
|
332502
332568
|
case 'yesNo':
|
|
332503
|
-
return readPath$
|
|
332569
|
+
return readPath$a(entry || {}, column.key) ? l10n.translate('nextcloud-vue', 'Yes') : l10n.translate('nextcloud-vue', 'No')
|
|
332504
332570
|
case 'pill': {
|
|
332505
332571
|
const pill = this.pillOf(entry, column);
|
|
332506
332572
|
return pill ? pill.label : ''
|
|
@@ -332633,7 +332699,7 @@ var script$3k = {
|
|
|
332633
332699
|
* @return {number} The value as a whole percentage from 0 to 100.
|
|
332634
332700
|
*/
|
|
332635
332701
|
percent(entry, column) {
|
|
332636
|
-
const value = Number(readPath$
|
|
332702
|
+
const value = Number(readPath$a(entry || {}, column.key));
|
|
332637
332703
|
return Number.isFinite(value) ? Math.max(0, Math.min(100, Math.round(value))) : 0
|
|
332638
332704
|
},
|
|
332639
332705
|
|
|
@@ -333239,7 +333305,7 @@ async function listChildren(davRoot, relPath, depth) {
|
|
|
333239
333305
|
const nodes = [];
|
|
333240
333306
|
|
|
333241
333307
|
for (const res of responses) {
|
|
333242
|
-
const href = text(res, 'href');
|
|
333308
|
+
const href = text$1(res, 'href');
|
|
333243
333309
|
if (!href) {
|
|
333244
333310
|
continue
|
|
333245
333311
|
}
|
|
@@ -333276,7 +333342,7 @@ async function listChildren(davRoot, relPath, depth) {
|
|
|
333276
333342
|
* @param {string} local The local (namespace-less) tag name.
|
|
333277
333343
|
* @return {string} The text content, or ''.
|
|
333278
333344
|
*/
|
|
333279
|
-
function text(parent, local) {
|
|
333345
|
+
function text$1(parent, local) {
|
|
333280
333346
|
const el = parent.getElementsByTagNameNS('DAV:', local)[0];
|
|
333281
333347
|
return el ? el.textContent : ''
|
|
333282
333348
|
}
|
|
@@ -340225,7 +340291,7 @@ var script$38 = {
|
|
|
340225
340291
|
*/
|
|
340226
340292
|
subtitlePart(token) {
|
|
340227
340293
|
const [key, name] = token.split('|').map((part) => part.trim());
|
|
340228
|
-
const value = readPath$
|
|
340294
|
+
const value = readPath$a(this.object, key);
|
|
340229
340295
|
const format = name && this.cnFormatters ? this.cnFormatters[name] : null;
|
|
340230
340296
|
if (typeof format === 'function') {
|
|
340231
340297
|
const shown = format(value, this.object);
|
|
@@ -340241,7 +340307,7 @@ var script$38 = {
|
|
|
340241
340307
|
* @return {unknown} The value.
|
|
340242
340308
|
*/
|
|
340243
340309
|
cellValue(cell) {
|
|
340244
|
-
return readPath$
|
|
340310
|
+
return readPath$a(this.object, cell.key)
|
|
340245
340311
|
},
|
|
340246
340312
|
|
|
340247
340313
|
/**
|
|
@@ -343920,7 +343986,7 @@ function resolveActionHandler(action, ctx) {
|
|
|
343920
343986
|
}
|
|
343921
343987
|
return (row) => ctx.openModal(action.target, {
|
|
343922
343988
|
object: row,
|
|
343923
|
-
objectId: row && ctx.rowKey ? readPath$
|
|
343989
|
+
objectId: row && ctx.rowKey ? readPath$a(row, ctx.rowKey) : undefined,
|
|
343924
343990
|
...(action.props && typeof action.props === 'object' ? action.props : {}),
|
|
343925
343991
|
})
|
|
343926
343992
|
}
|
|
@@ -343929,7 +343995,7 @@ function resolveActionHandler(action, ctx) {
|
|
|
343929
343995
|
if (type === 'api-call') {
|
|
343930
343996
|
return async (row) => {
|
|
343931
343997
|
const { value: url } = resolveRowToken(action.url, row);
|
|
343932
|
-
const objectId = row && ctx.rowKey ? readPath$
|
|
343998
|
+
const objectId = row && ctx.rowKey ? readPath$a(row, ctx.rowKey) : undefined;
|
|
343933
343999
|
const result = await dispatchAction$1({ ...action, url, refresh: false }, {
|
|
343934
344000
|
translate: ctx.translate,
|
|
343935
344001
|
tokenCtx: { objectId, object: row },
|
|
@@ -346344,6 +346410,21 @@ var script$2Y = {
|
|
|
346344
346410
|
default: null,
|
|
346345
346411
|
},
|
|
346346
346412
|
|
|
346413
|
+
/**
|
|
346414
|
+
* Text added to the count line after a middle dot while a quick filter
|
|
346415
|
+
* or lens is selected (manifest `config.countSuffixByFilter`),
|
|
346416
|
+
* `{ <tab id or label>: text }`: a lens that sorts by waiting time
|
|
346417
|
+
* says "longest waiting first". A quick filter tab can also carry
|
|
346418
|
+
* its own `countSuffix`, which comes first. The text goes through the
|
|
346419
|
+
* host translate function. Null (the default) adds nothing.
|
|
346420
|
+
*
|
|
346421
|
+
* @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
|
|
346422
|
+
*/
|
|
346423
|
+
countSuffixByFilter: {
|
|
346424
|
+
type: Object,
|
|
346425
|
+
default: null,
|
|
346426
|
+
},
|
|
346427
|
+
|
|
346347
346428
|
/**
|
|
346348
346429
|
* The property keys the card's facts list shows, in order (manifest key
|
|
346349
346430
|
* `config.cardFields`). Without it the board look shows the first four
|
|
@@ -353262,7 +353343,8 @@ var script$2Y = {
|
|
|
353262
353343
|
* @return {string}
|
|
353263
353344
|
*/
|
|
353264
353345
|
headerDescription() {
|
|
353265
|
-
const
|
|
353346
|
+
const suffix = this.quickFilterCountSuffix;
|
|
353347
|
+
const base = suffix && this.headerDescriptionBase ? `${this.headerDescriptionBase} · ${suffix}` : this.headerDescriptionBase;
|
|
353266
353348
|
if (this.currentViewMode !== 'map' || !this.mapListEnabled) {
|
|
353267
353349
|
return base
|
|
353268
353350
|
}
|
|
@@ -353284,6 +353366,29 @@ var script$2Y = {
|
|
|
353284
353366
|
return active || this.quickFilterNarrows
|
|
353285
353367
|
},
|
|
353286
353368
|
|
|
353369
|
+
/**
|
|
353370
|
+
* The count line text of the selected quick filters or lenses: each
|
|
353371
|
+
* tab's `countSuffix`, else its entry in `countSuffixByFilter` (by
|
|
353372
|
+
* id, then by label), translated and joined by a middle dot.
|
|
353373
|
+
*
|
|
353374
|
+
* @return {string}
|
|
353375
|
+
* @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
|
|
353376
|
+
*/
|
|
353377
|
+
quickFilterCountSuffix() {
|
|
353378
|
+
const tabs = this.tabStripEntries || [];
|
|
353379
|
+
const byFilter = this.countSuffixByFilter && typeof this.countSuffixByFilter === 'object' ? this.countSuffixByFilter : {};
|
|
353380
|
+
const indices = this.quickFilterMultiple
|
|
353381
|
+
? (this.selectedQuickFilterIndices || [])
|
|
353382
|
+
: [this.activeQuickFilterIndex];
|
|
353383
|
+
return indices
|
|
353384
|
+
.map((index) => (typeof index === 'number' ? tabs[index] : null))
|
|
353385
|
+
.filter(Boolean)
|
|
353386
|
+
.map((tab) => [tab.countSuffix, byFilter[tab.id], byFilter[tab.label]].find((text) => typeof text === 'string' && text !== ''))
|
|
353387
|
+
.filter(Boolean)
|
|
353388
|
+
.map((text) => this.cnTranslate(text))
|
|
353389
|
+
.join(' · ')
|
|
353390
|
+
},
|
|
353391
|
+
|
|
353287
353392
|
/**
|
|
353288
353393
|
* Whether a selected quick filter tab carries a filter (an "All" tab
|
|
353289
353394
|
* does not).
|
|
@@ -364293,7 +364398,7 @@ var script$2M = {
|
|
|
364293
364398
|
return ''
|
|
364294
364399
|
}
|
|
364295
364400
|
const source = match[1] === 'object' ? this.tokenCtx.object : unwrap(this.cnDetailVisibilityRows);
|
|
364296
|
-
const value = source ? readPath$
|
|
364401
|
+
const value = source ? readPath$a(source, match[2]) : '';
|
|
364297
364402
|
return typeof value === 'string' ? value.trim() : ''
|
|
364298
364403
|
}
|
|
364299
364404
|
if (!from || typeof from !== 'object' || !from.register || !from.schema || !from.path) {
|
|
@@ -364311,7 +364416,7 @@ var script$2M = {
|
|
|
364311
364416
|
const [{ default: axios }, { generateUrl }] = await Promise.all([import('@nextcloud/axios'), import('@nextcloud/router')]);
|
|
364312
364417
|
const { data } = await axios.get(generateUrl('/apps/openregister/api/objects/{register}/{schema}', { register: from.register, schema: from.schema }), { params });
|
|
364313
364418
|
const first = data && Array.isArray(data.results) ? data.results[0] : null;
|
|
364314
|
-
const value = first ? readPath$
|
|
364419
|
+
const value = first ? readPath$a(first, from.path) : '';
|
|
364315
364420
|
return typeof value === 'string' ? value.trim() : ''
|
|
364316
364421
|
},
|
|
364317
364422
|
|
|
@@ -366350,7 +366455,7 @@ var script$2H = {
|
|
|
366350
366455
|
if (typeof path !== 'string' || path === '' || !this.objectData) {
|
|
366351
366456
|
return []
|
|
366352
366457
|
}
|
|
366353
|
-
const raw = readPath$
|
|
366458
|
+
const raw = readPath$a(this.objectData, path);
|
|
366354
366459
|
if (!Array.isArray(raw)) {
|
|
366355
366460
|
return []
|
|
366356
366461
|
}
|
|
@@ -366379,7 +366484,7 @@ var script$2H = {
|
|
|
366379
366484
|
if (!config || typeof config !== 'object' || typeof config.path !== 'string' || !this.objectData) {
|
|
366380
366485
|
return null
|
|
366381
366486
|
}
|
|
366382
|
-
const stored = readPath$
|
|
366487
|
+
const stored = readPath$a(this.objectData, config.path);
|
|
366383
366488
|
if (!stored || typeof stored !== 'object') {
|
|
366384
366489
|
return null
|
|
366385
366490
|
}
|
|
@@ -367907,7 +368012,7 @@ function newPartyRecord(create, values) {
|
|
|
367907
368012
|
continue
|
|
367908
368013
|
}
|
|
367909
368014
|
if (field.address && field.address.path) {
|
|
367910
|
-
const list = readPath$
|
|
368015
|
+
const list = readPath$a(record, field.address.path);
|
|
367911
368016
|
const entry = { kind: field.address.kind || 'correspondence', type: field.address.type || 'email', value };
|
|
367912
368017
|
writePath(record, field.address.path, [...(Array.isArray(list) ? list : []), entry]);
|
|
367913
368018
|
continue
|
|
@@ -367916,7 +368021,7 @@ function newPartyRecord(create, values) {
|
|
|
367916
368021
|
}
|
|
367917
368022
|
for (const [target, paths] of Object.entries(create?.compose && typeof create.compose === 'object' ? create.compose : {})) {
|
|
367918
368023
|
const joined = (Array.isArray(paths) ? paths : [])
|
|
367919
|
-
.map((path) => String(readPath$
|
|
368024
|
+
.map((path) => String(readPath$a(record, path) ?? '').trim())
|
|
367920
368025
|
.filter((part) => part !== '')
|
|
367921
368026
|
.join(' ');
|
|
367922
368027
|
if (joined !== '') {
|
|
@@ -368673,7 +368778,7 @@ var script$2E = {
|
|
|
368673
368778
|
}
|
|
368674
368779
|
const answers = await Promise.all(uuids.map((uuid) => this.read(this.urlOf(spec.endpoint, uuid))));
|
|
368675
368780
|
uuids.forEach((uuid, i) => {
|
|
368676
|
-
const answer = spec.path ? readPath$
|
|
368781
|
+
const answer = spec.path ? readPath$a(answers[i], spec.path) : answers[i];
|
|
368677
368782
|
if (answer && typeof answer === 'object') {
|
|
368678
368783
|
extra[`${index}|${uuid}`] = answer;
|
|
368679
368784
|
}
|
|
@@ -368689,7 +368794,7 @@ var script$2E = {
|
|
|
368689
368794
|
return
|
|
368690
368795
|
}
|
|
368691
368796
|
const data = await this.read(this.urlOf(spec.endpoint));
|
|
368692
|
-
const list = spec.path ? readPath$
|
|
368797
|
+
const list = spec.path ? readPath$a(data, spec.path) : data;
|
|
368693
368798
|
this.documents = Array.isArray(list) ? list : [];
|
|
368694
368799
|
},
|
|
368695
368800
|
|
|
@@ -373994,7 +374099,7 @@ var script$2w = {
|
|
|
373994
374099
|
this.loading = true;
|
|
373995
374100
|
try {
|
|
373996
374101
|
const { data } = await axios$1.get(this.url(this.statusUrl));
|
|
373997
|
-
this.exists = readPath$
|
|
374102
|
+
this.exists = readPath$a(data || {}, this.statusPath) === true;
|
|
373998
374103
|
} catch {
|
|
373999
374104
|
this.error = l10n.translate('nextcloud-vue', 'The address could not be read.');
|
|
374000
374105
|
} finally {
|
|
@@ -374015,9 +374120,9 @@ var script$2w = {
|
|
|
374015
374120
|
try {
|
|
374016
374121
|
const method = String(this.createMethod).toUpperCase() === 'PUT' ? 'put' : 'post';
|
|
374017
374122
|
const { data } = await axios$1[method](this.url(this.createUrl));
|
|
374018
|
-
this.address = String(readPath$
|
|
374123
|
+
this.address = String(readPath$a(data || {}, this.addressPath) ?? '');
|
|
374019
374124
|
this.links = this.extraLinks
|
|
374020
|
-
.map((link) => ({ href: this.linkHref(readPath$
|
|
374125
|
+
.map((link) => ({ href: this.linkHref(readPath$a(data || {}, link.path)), label: this.tr(link.label || '') }))
|
|
374021
374126
|
.filter((link) => link.href !== '' && link.label !== '');
|
|
374022
374127
|
this.exists = this.address !== '';
|
|
374023
374128
|
this.revoked = false;
|
|
@@ -375237,7 +375342,7 @@ var script$2s = {
|
|
|
375237
375342
|
this.uploadError = '';
|
|
375238
375343
|
try {
|
|
375239
375344
|
const response = await axios$1.post(prefixUrl(this.field.uploadUrl), form);
|
|
375240
|
-
const fromAnswer = this.field.uploadValuePath ? readPath$
|
|
375345
|
+
const fromAnswer = this.field.uploadValuePath ? readPath$a(response?.data, this.field.uploadValuePath) : '';
|
|
375241
375346
|
const next = fromAnswer || (this.field.previewUrl ? `${prefixUrl(this.field.previewUrl)}${this.field.previewUrl.includes('?') ? '&' : '?'}v=${Date.now()}` : '');
|
|
375242
375347
|
/**
|
|
375243
375348
|
* @event uploaded An image was uploaded. Payload: its new url.
|
|
@@ -375392,8 +375497,8 @@ var script$2s = {
|
|
|
375392
375497
|
const { data } = await axios$1.get(prefixUrl(url));
|
|
375393
375498
|
const list = Array.isArray(data?.results) ? data.results : [];
|
|
375394
375499
|
this.sourceOptions = list.filter((item) => item && typeof item === 'object').map((item) => {
|
|
375395
|
-
const value = source.valueField ? readPath$
|
|
375396
|
-
const label = source.labelField ? readPath$
|
|
375500
|
+
const value = source.valueField ? readPath$a(item, source.valueField) : (item.id ?? item.uuid ?? item['@self']?.id);
|
|
375501
|
+
const label = source.labelField ? readPath$a(item, source.labelField) : (item.name ?? item.title);
|
|
375397
375502
|
return { label: String(label || value || ''), value }
|
|
375398
375503
|
});
|
|
375399
375504
|
this.sourceTruncated = Number(data?.total) > list.length;
|
|
@@ -375425,14 +375530,14 @@ var script$2s = {
|
|
|
375425
375530
|
return
|
|
375426
375531
|
}
|
|
375427
375532
|
const data = await response.json();
|
|
375428
|
-
const list = this.field.optionsPath ? readPath$
|
|
375533
|
+
const list = this.field.optionsPath ? readPath$a(data, this.field.optionsPath) : (Array.isArray(data) ? data : data?.results);
|
|
375429
375534
|
this.fetchedOptions = (Array.isArray(list) ? list : []).map((item) => {
|
|
375430
375535
|
if (!item || typeof item !== 'object') {
|
|
375431
375536
|
return { label: String(item), value: item }
|
|
375432
375537
|
}
|
|
375433
|
-
const value = this.field.optionValue ? readPath$
|
|
375434
|
-
const label = this.field.optionLabel ? readPath$
|
|
375435
|
-
const detail = this.field.optionDetail ? readPath$
|
|
375538
|
+
const value = this.field.optionValue ? readPath$a(item, this.field.optionValue) : (item.value ?? item.id);
|
|
375539
|
+
const label = this.field.optionLabel ? readPath$a(item, this.field.optionLabel) : (item.label ?? item.title ?? item.name ?? value);
|
|
375540
|
+
const detail = this.field.optionDetail ? readPath$a(item, this.field.optionDetail) : '';
|
|
375436
375541
|
return { label: detail ? `${label ?? ''} (${detail})` : String(label ?? ''), value }
|
|
375437
375542
|
});
|
|
375438
375543
|
} catch {
|
|
@@ -375967,7 +376072,7 @@ function literalFirst(data, key) {
|
|
|
375967
376072
|
if (data && typeof data === 'object' && Object.hasOwn(data, key)) {
|
|
375968
376073
|
return data[key]
|
|
375969
376074
|
}
|
|
375970
|
-
return readPath$
|
|
376075
|
+
return readPath$a(data, key)
|
|
375971
376076
|
}
|
|
375972
376077
|
|
|
375973
376078
|
/**
|
|
@@ -377020,7 +377125,7 @@ var script$2r = {
|
|
|
377020
377125
|
const values = (this.valuesPath ? literalFirst(data, this.valuesPath) : data) || {};
|
|
377021
377126
|
const parts = pathParts(field);
|
|
377022
377127
|
if (parts) {
|
|
377023
|
-
return readPath$
|
|
377128
|
+
return readPath$a(storedObject(literalFirst(values, parts.root)).object, parts.rest)
|
|
377024
377129
|
}
|
|
377025
377130
|
return literalFirst(values, field.key)
|
|
377026
377131
|
},
|
|
@@ -393910,7 +394015,7 @@ function summaryLines(record, fields) {
|
|
|
393910
394015
|
if (typeof key !== 'string' || key === '') {
|
|
393911
394016
|
continue
|
|
393912
394017
|
}
|
|
393913
|
-
const value = readPath$
|
|
394018
|
+
const value = readPath$2(record, key);
|
|
393914
394019
|
if (value === undefined || value === null || value === '') {
|
|
393915
394020
|
continue
|
|
393916
394021
|
}
|
|
@@ -393930,7 +394035,7 @@ function summaryLines(record, fields) {
|
|
|
393930
394035
|
* @param {string} path The dotted path.
|
|
393931
394036
|
* @return {string|number|boolean|Array|object|undefined} The value, or undefined.
|
|
393932
394037
|
*/
|
|
393933
|
-
function readPath$
|
|
394038
|
+
function readPath$2(record, path) {
|
|
393934
394039
|
return path.split('.').reduce((node, part) => (node === null || node === undefined ? undefined : node[part]), record)
|
|
393935
394040
|
}
|
|
393936
394041
|
|
|
@@ -398811,13 +398916,13 @@ var script$1S = {
|
|
|
398811
398916
|
* @return {Array<{value: string, label: string, secondary: string}>}
|
|
398812
398917
|
*/
|
|
398813
398918
|
checkItems(field) {
|
|
398814
|
-
const listed = Array.isArray(field.options) ? field.options : readPath$
|
|
398919
|
+
const listed = Array.isArray(field.options) ? field.options : readPath$a(this.record || {}, field.itemsPath || '');
|
|
398815
398920
|
return (Array.isArray(listed) ? listed : []).map((item) => {
|
|
398816
398921
|
if (item === null || typeof item !== 'object') {
|
|
398817
398922
|
return { value: String(item), label: String(item), secondary: '' }
|
|
398818
398923
|
}
|
|
398819
398924
|
return {
|
|
398820
|
-
value: String(readPath$
|
|
398925
|
+
value: String(readPath$a(item, field.optionValue || 'value') ?? item.id ?? ''),
|
|
398821
398926
|
label: fillTemplate(field.optionLabel || '{label}', item),
|
|
398822
398927
|
secondary: field.optionSecondary ? fillTemplate(field.optionSecondary, item) : '',
|
|
398823
398928
|
}
|
|
@@ -398953,7 +399058,7 @@ var script$1S = {
|
|
|
398953
399058
|
}
|
|
398954
399059
|
try {
|
|
398955
399060
|
const data = await this.read(def.source);
|
|
398956
|
-
const list = def.itemsPath ? readPath$
|
|
399061
|
+
const list = def.itemsPath ? readPath$a(data, def.itemsPath) : data;
|
|
398957
399062
|
this.items = Array.isArray(list) ? list.filter((item) => item && item.id !== undefined) : [];
|
|
398958
399063
|
} catch {
|
|
398959
399064
|
this.items = [];
|
|
@@ -399026,9 +399131,9 @@ var script$1S = {
|
|
|
399026
399131
|
}
|
|
399027
399132
|
try {
|
|
399028
399133
|
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$
|
|
399134
|
+
const entry = def.listPath ? this.matchIn(readPath$a(data, def.listPath), def.match) : data;
|
|
399135
|
+
this.allowed = readPath$a(entry, def.allowedPath || 'allowed') === true;
|
|
399136
|
+
this.refusal = this.allowed || !def.reasonPath ? '' : String(readPath$a(entry, def.reasonPath) || '');
|
|
399032
399137
|
} catch {
|
|
399033
399138
|
this.allowed = false;
|
|
399034
399139
|
}
|
|
@@ -399069,7 +399174,7 @@ var script$1S = {
|
|
|
399069
399174
|
const method = String(request.method || 'POST').toLowerCase();
|
|
399070
399175
|
const answer = await axios$1[['post', 'put', 'patch', 'delete'].includes(method) ? method : 'post'](/^https?:\/\//i.test(url) ? url : router.generateUrl(url), body);
|
|
399071
399176
|
if (request.answerPath) {
|
|
399072
|
-
const said = readPath$
|
|
399177
|
+
const said = readPath$a(answer?.data, request.answerPath);
|
|
399073
399178
|
this.answerText = said === null || said === undefined ? '' : String(said);
|
|
399074
399179
|
}
|
|
399075
399180
|
} else if (this.confirmConfig.action && typeof this.cnDispatchAction === 'function') {
|
|
@@ -399101,7 +399206,7 @@ var script$1S = {
|
|
|
399101
399206
|
const values = { ...this.values };
|
|
399102
399207
|
for (const field of this.fields) {
|
|
399103
399208
|
if (field.valuePath && !['secret', 'checks'].includes(field.type) && !(field.field in values)) {
|
|
399104
|
-
const value = readPath$
|
|
399209
|
+
const value = readPath$a(this.record, field.valuePath);
|
|
399105
399210
|
if (value !== null && value !== undefined) {
|
|
399106
399211
|
values[field.field] = String(value);
|
|
399107
399212
|
}
|
|
@@ -399117,7 +399222,7 @@ var script$1S = {
|
|
|
399117
399222
|
* @return {boolean}
|
|
399118
399223
|
*/
|
|
399119
399224
|
secretStored(field) {
|
|
399120
|
-
return field.type === 'secret' && Boolean(field.storedPath && this.record && readPath$
|
|
399225
|
+
return field.type === 'secret' && Boolean(field.storedPath && this.record && readPath$a(this.record, field.storedPath))
|
|
399121
399226
|
},
|
|
399122
399227
|
|
|
399123
399228
|
/** Close the dialog, unless the action is running. */
|
|
@@ -399938,7 +400043,7 @@ var script$1R = {
|
|
|
399938
400043
|
/** @return {string} Who has the record now, read from it. */
|
|
399939
400044
|
current() {
|
|
399940
400045
|
const path = this.assigneeConfig.currentPath;
|
|
399941
|
-
const value = path && this.record ? readPath$
|
|
400046
|
+
const value = path && this.record ? readPath$a(this.record, path) : '';
|
|
399942
400047
|
return value === undefined || value === null ? '' : String(value)
|
|
399943
400048
|
},
|
|
399944
400049
|
|
|
@@ -406836,6 +406941,90 @@ function hasGridRow(item = {}) {
|
|
|
406836
406941
|
return item.gridY !== undefined && Boolean(item.gridHeight)
|
|
406837
406942
|
}
|
|
406838
406943
|
|
|
406944
|
+
/**
|
|
406945
|
+
* SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
406946
|
+
* SPDX-License-Identifier: EUPL-1.2
|
|
406947
|
+
*
|
|
406948
|
+
* parentCrumb: the breadcrumb entry for the record a sub-record belongs to.
|
|
406949
|
+
*
|
|
406950
|
+
* A crumb that carries `parent` names a `visibilityContext` entry of the
|
|
406951
|
+
* detail page. The page reads that record beside the loaded one; this
|
|
406952
|
+
* helper turns it into a crumb with the parent's label and a link to its
|
|
406953
|
+
* page.
|
|
406954
|
+
*
|
|
406955
|
+
* @module utils/parentCrumb
|
|
406956
|
+
*/
|
|
406957
|
+
|
|
406958
|
+
/**
|
|
406959
|
+
* Read a dotted path from an object.
|
|
406960
|
+
*
|
|
406961
|
+
* @param {object|null} obj The object to read.
|
|
406962
|
+
* @param {string} path A dotted path, e.g. `identifier` or `@self.name`.
|
|
406963
|
+
* @return {unknown} The value, or undefined.
|
|
406964
|
+
*/
|
|
406965
|
+
function readPath$1(obj, path) {
|
|
406966
|
+
return path.split('.').reduce((o, part) => (o === null || o === undefined ? undefined : o[part]), obj)
|
|
406967
|
+
}
|
|
406968
|
+
|
|
406969
|
+
/**
|
|
406970
|
+
* A non-empty string for a value, or ''.
|
|
406971
|
+
*
|
|
406972
|
+
* @param {unknown} value Any value.
|
|
406973
|
+
* @return {string} The text.
|
|
406974
|
+
*/
|
|
406975
|
+
function text(value) {
|
|
406976
|
+
if (typeof value === 'number') {
|
|
406977
|
+
return String(value)
|
|
406978
|
+
}
|
|
406979
|
+
return typeof value === 'string' ? value.trim() : ''
|
|
406980
|
+
}
|
|
406981
|
+
|
|
406982
|
+
/**
|
|
406983
|
+
* The crumb for a record's parent.
|
|
406984
|
+
*
|
|
406985
|
+
* The crumb is dropped (null) when the record holds no reference to a
|
|
406986
|
+
* parent. Its label is the parent's `labelField` value, else the parent's
|
|
406987
|
+
* name or title, else the crumb's own `label` (translated); without any of
|
|
406988
|
+
* those it is dropped too. The link goes to `route` with the parent's id in
|
|
406989
|
+
* `param` (default `id`), or to `href` with `{id}` filled in.
|
|
406990
|
+
*
|
|
406991
|
+
* @param {object} crumb `{ parent, labelField?, label?, route?, params?, param?, href?, icon? }`.
|
|
406992
|
+
* @param {Array<{key: string, id: string}>} refs The page's context references.
|
|
406993
|
+
* @param {object} rows The context records read so far, by name.
|
|
406994
|
+
* @param {(key: string) => string} translate The host translate function.
|
|
406995
|
+
* @return {{label: string, to?: object, href?: string, icon?: string}|null} The crumb, or null.
|
|
406996
|
+
* @spec openspec/changes/detail-parent-crumb/specs/detail-page/spec.md#requirement-a-sub-record-trail-can-show-its-parent-record
|
|
406997
|
+
*/
|
|
406998
|
+
function parentCrumb(crumb, refs, rows, translate) {
|
|
406999
|
+
const ref = (refs || []).find((r) => r.key === crumb.parent);
|
|
407000
|
+
if (!ref || !ref.id) {
|
|
407001
|
+
return null
|
|
407002
|
+
}
|
|
407003
|
+
const row = rows && rows[crumb.parent] && typeof rows[crumb.parent] === 'object' ? rows[crumb.parent] : null;
|
|
407004
|
+
let label = '';
|
|
407005
|
+
if (row) {
|
|
407006
|
+
label = (typeof crumb.labelField === 'string' && crumb.labelField !== '' ? text(readPath$1(row, crumb.labelField)) : '')
|
|
407007
|
+
|| text(readPath$1(row, '@self.name')) || text(row.name) || text(row.title);
|
|
407008
|
+
}
|
|
407009
|
+
if (label === '' && typeof crumb.label === 'string' && crumb.label !== '') {
|
|
407010
|
+
label = translate(crumb.label);
|
|
407011
|
+
}
|
|
407012
|
+
if (label === '') {
|
|
407013
|
+
return null
|
|
407014
|
+
}
|
|
407015
|
+
const entry = { label };
|
|
407016
|
+
if (typeof crumb.icon === 'string' && crumb.icon !== '') {
|
|
407017
|
+
entry.icon = crumb.icon;
|
|
407018
|
+
}
|
|
407019
|
+
if (crumb.route) {
|
|
407020
|
+
const param = typeof crumb.param === 'string' && crumb.param !== '' ? crumb.param : 'id';
|
|
407021
|
+
entry.to = { name: crumb.route, params: { ...(crumb.params || {}), [param]: ref.id } };
|
|
407022
|
+
} else if (typeof crumb.href === 'string' && crumb.href !== '') {
|
|
407023
|
+
entry.href = crumb.href.split('{id}').join(encodeURIComponent(ref.id));
|
|
407024
|
+
}
|
|
407025
|
+
return entry
|
|
407026
|
+
}
|
|
407027
|
+
|
|
406839
407028
|
// SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
406840
407029
|
// SPDX-License-Identifier: EUPL-1.2
|
|
406841
407030
|
|
|
@@ -407849,6 +408038,24 @@ var script$1D = {
|
|
|
407849
408038
|
default: false,
|
|
407850
408039
|
},
|
|
407851
408040
|
|
|
408041
|
+
/**
|
|
408042
|
+
* A condition on the record, in the `visibleWhen` grammar (manifest
|
|
408043
|
+
* `config.readOnlyWhen`): while it holds, the page treats the record
|
|
408044
|
+
* as one it may not update, as with `can.update` false. The Edit
|
|
408045
|
+
* button, the header actions with role `edit` or `update` and the
|
|
408046
|
+
* inline editors are off. `{ field: "mergedInto", op: "notEmpty" }`
|
|
408047
|
+
* keeps a record merged into another from being edited. It is decided
|
|
408048
|
+
* on the page (no `endpoint` or `source`) and may read the
|
|
408049
|
+
* `visibilityContext` records as `@context.<name>.<path>`. Null
|
|
408050
|
+
* (the default) changes nothing.
|
|
408051
|
+
*
|
|
408052
|
+
* @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
|
|
408053
|
+
*/
|
|
408054
|
+
readOnlyWhen: {
|
|
408055
|
+
type: Object,
|
|
408056
|
+
default: null,
|
|
408057
|
+
},
|
|
408058
|
+
|
|
407852
408059
|
/**
|
|
407853
408060
|
* Hide valueless fields on the auto-rendered data widget, instead of
|
|
407854
408061
|
* showing them with an em dash. See `CnObjectDataWidget`'s `hide-empty`.
|
|
@@ -408434,8 +408641,12 @@ var script$1D = {
|
|
|
408434
408641
|
* @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
408642
|
* A list of such crumbs draws a deeper trail ("Settings / Case types /"
|
|
408436
408643
|
* and then the record); `currentField` and `separator` may sit on any
|
|
408437
|
-
* of them.
|
|
408644
|
+
* of them. A crumb with `parent` (a `visibilityContext` name) instead
|
|
408645
|
+
* of `label` is the record's parent: its `labelField` value (else its
|
|
408646
|
+
* name), linked by `route` + `param` (default `id`) or `href` with
|
|
408647
|
+
* `{id}`; it drops out when the record has no parent.
|
|
408438
408648
|
*
|
|
408649
|
+
* @spec openspec/changes/detail-parent-crumb/specs/detail-page/spec.md#requirement-a-sub-record-trail-can-show-its-parent-record
|
|
408439
408650
|
* @spec openspec/changes/detail-breadcrumb-trail/specs/detail-page/spec.md#requirement-a-record-page-breadcrumb-can-name-more-than-one-level
|
|
408440
408651
|
* @type {{label: string, route?: string, params?: object, href?: string, icon?: string, currentField?: string, separator?: string}|Array<object>|null}
|
|
408441
408652
|
*/
|
|
@@ -410987,13 +411198,30 @@ var script$1D = {
|
|
|
410987
411198
|
},
|
|
410988
411199
|
|
|
410989
411200
|
/**
|
|
410990
|
-
* Whether the record refuses this reader's updates (`can.update === false`)
|
|
411201
|
+
* Whether the record refuses this reader's updates (`can.update === false`),
|
|
411202
|
+
* or the page's `readOnlyWhen` holds for it.
|
|
410991
411203
|
*
|
|
410992
411204
|
* @return {boolean}
|
|
410993
411205
|
* @spec openspec/changes/detail-page-record-rights/specs/detail-page-record-rights/spec.md#requirement-edit-controls-follow-the-records-update-right
|
|
410994
411206
|
*/
|
|
410995
411207
|
recordUpdateDenied() {
|
|
410996
|
-
return Boolean(this.recordCan && this.recordCan.update === false)
|
|
411208
|
+
return Boolean(this.recordCan && this.recordCan.update === false) || this.readOnlyByCondition
|
|
411209
|
+
},
|
|
411210
|
+
|
|
411211
|
+
/**
|
|
411212
|
+
* Whether the page's `readOnlyWhen` holds for the record (and its
|
|
411213
|
+
* `visibilityContext` records). False without the option, and while
|
|
411214
|
+
* the record or those records are still on their way.
|
|
411215
|
+
*
|
|
411216
|
+
* @return {boolean}
|
|
411217
|
+
* @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
|
|
411218
|
+
*/
|
|
411219
|
+
readOnlyByCondition() {
|
|
411220
|
+
const when = this.readOnlyWhen;
|
|
411221
|
+
if (!when || typeof when !== 'object' || !this.widgetVisibilityData || this.visibilityRowsPending) {
|
|
411222
|
+
return false
|
|
411223
|
+
}
|
|
411224
|
+
return detailWidgetVisible({ visibleWhen: when }, this.widgetVisibilityData)
|
|
410997
411225
|
},
|
|
410998
411226
|
|
|
410999
411227
|
/**
|
|
@@ -411058,7 +411286,7 @@ var script$1D = {
|
|
|
411058
411286
|
*/
|
|
411059
411287
|
declaredCrumbs() {
|
|
411060
411288
|
const list = Array.isArray(this.breadcrumb) ? this.breadcrumb : (this.breadcrumb ? [this.breadcrumb] : []);
|
|
411061
|
-
return list.filter((crumb) => crumb && typeof crumb.label === 'string' && crumb.label !== ''
|
|
411289
|
+
return list.filter((crumb) => crumb && ((typeof crumb.label === 'string' && crumb.label !== '') || (typeof crumb.parent === 'string' && crumb.parent !== ''))
|
|
411062
411290
|
&& (!crumb.visibleWhen || detailWidgetVisible({ visibleWhen: crumb.visibleWhen }, this.widgetVisibilityData)))
|
|
411063
411291
|
},
|
|
411064
411292
|
|
|
@@ -411066,11 +411294,14 @@ var script$1D = {
|
|
|
411066
411294
|
* The breadcrumb trail: the declared crumbs (each a router target from
|
|
411067
411295
|
* `route` + `params`, or an `href`), then the record's display name
|
|
411068
411296
|
* as the current crumb. Empty without a declared crumb. A crumb
|
|
411069
|
-
* carries `icon` only when the manifest declares one.
|
|
411297
|
+
* carries `icon` only when the manifest declares one. A crumb with
|
|
411298
|
+
* `parent` is the record's parent (see `parentCrumb`) and drops out
|
|
411299
|
+
* when the record has none.
|
|
411070
411300
|
*
|
|
411071
411301
|
* @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-detail-page-drops-its-eyebrow-and-shows-a-breadcrumb
|
|
411072
411302
|
* @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-declared-breadcrumb-label-shows-as-text
|
|
411073
411303
|
* @spec openspec/changes/detail-breadcrumb-trail/specs/detail-page/spec.md#requirement-a-record-page-breadcrumb-can-name-more-than-one-level
|
|
411304
|
+
* @spec openspec/changes/detail-parent-crumb/specs/detail-page/spec.md#requirement-a-sub-record-trail-can-show-its-parent-record
|
|
411074
411305
|
* @return {Array<{label: string, to?: object, href?: string, icon?: string}>}
|
|
411075
411306
|
*/
|
|
411076
411307
|
breadcrumbCrumbs() {
|
|
@@ -411078,6 +411309,9 @@ var script$1D = {
|
|
|
411078
411309
|
return []
|
|
411079
411310
|
}
|
|
411080
411311
|
const crumbs = this.declaredCrumbs.map((crumb) => {
|
|
411312
|
+
if (typeof crumb.parent === 'string' && crumb.parent !== '') {
|
|
411313
|
+
return parentCrumb(crumb, this.visibilityRefs, this.visibilityRows, this.effectiveTranslate)
|
|
411314
|
+
}
|
|
411081
411315
|
const entry = { label: this.effectiveTranslate(crumb.label) };
|
|
411082
411316
|
if (typeof crumb.icon === 'string' && crumb.icon !== '') {
|
|
411083
411317
|
entry.icon = crumb.icon;
|
|
@@ -411088,7 +411322,10 @@ var script$1D = {
|
|
|
411088
411322
|
entry.href = crumb.href;
|
|
411089
411323
|
}
|
|
411090
411324
|
return entry
|
|
411091
|
-
});
|
|
411325
|
+
}).filter((crumb) => crumb !== null);
|
|
411326
|
+
if (crumbs.length === 0) {
|
|
411327
|
+
return []
|
|
411328
|
+
}
|
|
411092
411329
|
return [...crumbs, { label: this.breadcrumbCurrentLabel }]
|
|
411093
411330
|
},
|
|
411094
411331
|
|
|
@@ -434348,8 +434585,8 @@ var script$15 = {
|
|
|
434348
434585
|
});
|
|
434349
434586
|
const rows = Array.isArray(data && data.results) ? data.results : (Array.isArray(data) ? data : []);
|
|
434350
434587
|
return rows.filter((row) => row && typeof row === 'object').map((row) => ({
|
|
434351
|
-
value: readPath$
|
|
434352
|
-
label: String(readPath$
|
|
434588
|
+
value: readPath$a(row, from.valueField || 'id'),
|
|
434589
|
+
label: String(readPath$a(row, from.labelField || 'title') ?? readPath$a(row, 'name') ?? readPath$a(row, 'id') ?? ''),
|
|
434353
434590
|
row,
|
|
434354
434591
|
}))
|
|
434355
434592
|
} catch {
|
|
@@ -434412,12 +434649,12 @@ var script$15 = {
|
|
|
434412
434649
|
}
|
|
434413
434650
|
for (const [target, rule] of Object.entries(this.config.derive || {})) {
|
|
434414
434651
|
const option = rule && this.selected[rule.from];
|
|
434415
|
-
let list = option && option.row ? readPath$
|
|
434652
|
+
let list = option && option.row ? readPath$a(option.row, rule.path) : null;
|
|
434416
434653
|
if (Array.isArray(list) && list.length > 0) {
|
|
434417
434654
|
if (rule.sortBy) {
|
|
434418
|
-
list = [...list].sort((a, b) => (Number(readPath$
|
|
434655
|
+
list = [...list].sort((a, b) => (Number(readPath$a(a, rule.sortBy)) || 0) - (Number(readPath$a(b, rule.sortBy)) || 0));
|
|
434419
434656
|
}
|
|
434420
|
-
const value = readPath$
|
|
434657
|
+
const value = readPath$a(list[0], rule.field);
|
|
434421
434658
|
if (value !== undefined && value !== null) {
|
|
434422
434659
|
body[target] = value;
|
|
434423
434660
|
}
|
|
@@ -434827,7 +435064,7 @@ var script$14 = {
|
|
|
434827
435064
|
? this.config.subtitle.map((part) => this.fill(part, item))
|
|
434828
435065
|
: [this.fill(this.config.subtitle, item)];
|
|
434829
435066
|
if (due && typeof due === 'object' && due.field) {
|
|
434830
|
-
const resolved = resolveDue(readPath$
|
|
435067
|
+
const resolved = resolveDue(readPath$a(item, due.field), due, (text) => this.cnTranslate(text));
|
|
434831
435068
|
const dueText = resolved ? resolved.text : '';
|
|
434832
435069
|
return due.withSubtitle ? [...parts, dueText].filter(Boolean).join(' · ') : dueText
|
|
434833
435070
|
}
|
|
@@ -434887,7 +435124,7 @@ var script$14 = {
|
|
|
434887
435124
|
const items = lists.flat();
|
|
434888
435125
|
const sortBy = this.config.sortBy;
|
|
434889
435126
|
this.items = sortBy
|
|
434890
|
-
? items.sort((a, b) => (Date.parse(readPath$
|
|
435127
|
+
? items.sort((a, b) => (Date.parse(readPath$a(b, sortBy)) || 0) - (Date.parse(readPath$a(a, sortBy)) || 0))
|
|
434891
435128
|
: items;
|
|
434892
435129
|
} catch {
|
|
434893
435130
|
if (ticket === this.loadTicket) {
|
|
@@ -434917,7 +435154,7 @@ var script$14 = {
|
|
|
434917
435154
|
? { url: `/apps/openregister/api/objects/${source.register}/${source.schema}`, params: { _limit: this.limit, ...params, ...search } }
|
|
434918
435155
|
: { url: source.url, responsePath: source.responsePath, params: { ...params, ...search } };
|
|
434919
435156
|
const data = await fetchEndpointSource(request, {}, { fresh: true });
|
|
434920
|
-
const list = readPath$
|
|
435157
|
+
const list = readPath$a(data, this.config.itemsPath || (source.register ? 'results' : '')) ?? data;
|
|
434921
435158
|
const kind = this.text(source.kind);
|
|
434922
435159
|
return (Array.isArray(list) ? list : [])
|
|
434923
435160
|
.filter((item) => item && typeof item === 'object')
|
|
@@ -434943,7 +435180,7 @@ var script$14 = {
|
|
|
434943
435180
|
*/
|
|
434944
435181
|
actionsFor(row) {
|
|
434945
435182
|
const item = this.itemsById.get(row.id) || {};
|
|
434946
|
-
return this.rowActions.filter((action) => !action.copy || !['', null, undefined].includes(readPath$
|
|
435183
|
+
return this.rowActions.filter((action) => !action.copy || !['', null, undefined].includes(readPath$a(item, action.copy)))
|
|
434947
435184
|
},
|
|
434948
435185
|
|
|
434949
435186
|
/**
|
|
@@ -434973,7 +435210,7 @@ var script$14 = {
|
|
|
434973
435210
|
}
|
|
434974
435211
|
if (action.copy) {
|
|
434975
435212
|
try {
|
|
434976
|
-
await navigator.clipboard.writeText(String(readPath$
|
|
435213
|
+
await navigator.clipboard.writeText(String(readPath$a(item, action.copy)));
|
|
434977
435214
|
this.copied = true;
|
|
434978
435215
|
setTimeout(() => {
|
|
434979
435216
|
this.copied = false;
|
|
@@ -439464,7 +439701,7 @@ var script$T = {
|
|
|
439464
439701
|
|
|
439465
439702
|
/** @return {string} The open document's grounds. */
|
|
439466
439703
|
grounds() {
|
|
439467
|
-
const list = this.config.groundsPath ? readPath$
|
|
439704
|
+
const list = this.config.groundsPath ? readPath$a(this.current, this.config.groundsPath) : null;
|
|
439468
439705
|
return Array.isArray(list) ? list.join(', ') : ''
|
|
439469
439706
|
},
|
|
439470
439707
|
|
|
@@ -448412,7 +448649,7 @@ var script$E = {
|
|
|
448412
448649
|
});
|
|
448413
448650
|
const body = await response.json();
|
|
448414
448651
|
if (body.outcome === 'ok') {
|
|
448415
|
-
showSuccess(l10n.t('nextcloud-vue', 'Published to the
|
|
448652
|
+
showSuccess(l10n.t('nextcloud-vue', 'Published to the marketplace.'));
|
|
448416
448653
|
this.$emit('published', body.slug);
|
|
448417
448654
|
return
|
|
448418
448655
|
}
|
|
@@ -448433,14 +448670,14 @@ var script$E = {
|
|
|
448433
448670
|
*/
|
|
448434
448671
|
outcomeMessage(body, status) {
|
|
448435
448672
|
if (status === 403) {
|
|
448436
|
-
return l10n.t('nextcloud-vue', 'You may not publish to this
|
|
448673
|
+
return l10n.t('nextcloud-vue', 'You may not publish to this marketplace.')
|
|
448437
448674
|
}
|
|
448438
448675
|
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
|
|
448676
|
+
not_configured: l10n.t('nextcloud-vue', 'No marketplace registry is configured. An administrator connects one under Administration settings.'),
|
|
448677
|
+
store_unreachable: l10n.t('nextcloud-vue', 'The marketplace registry did not answer. Try again later.'),
|
|
448678
|
+
store_rejected: l10n.t('nextcloud-vue', 'The marketplace registry refused the item.'),
|
|
448442
448679
|
too_large: l10n.t('nextcloud-vue', 'The item is too large to publish.'),
|
|
448443
|
-
rate_limited: l10n.t('nextcloud-vue', 'The
|
|
448680
|
+
rate_limited: l10n.t('nextcloud-vue', 'The marketplace registry is busy. Try again in a minute.'),
|
|
448444
448681
|
};
|
|
448445
448682
|
return messages[body?.outcome] || body?.message || l10n.t('nextcloud-vue', 'The item could not be published.')
|
|
448446
448683
|
},
|
|
@@ -448467,7 +448704,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
448467
448704
|
const _component_CnDialog = vue$1.resolveComponent("CnDialog");
|
|
448468
448705
|
|
|
448469
448706
|
return (vue$1.openBlock(), vue$1.createBlock(_component_CnDialog, {
|
|
448470
|
-
name: $options.t('nextcloud-vue', 'Publish to the
|
|
448707
|
+
name: $options.t('nextcloud-vue', 'Publish to the marketplace'),
|
|
448471
448708
|
subtitle: $options.t('nextcloud-vue', 'Share a template built from your own configuration with the registry.'),
|
|
448472
448709
|
"data-testid": "store-publish-dialog",
|
|
448473
448710
|
onClosing: _cache[7] || (_cache[7] = $event => (_ctx.$emit('close')))
|
|
@@ -448562,7 +448799,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
448562
448799
|
}
|
|
448563
448800
|
|
|
448564
448801
|
script$E.render = render$D;
|
|
448565
|
-
script$E.__scopeId = "data-v-
|
|
448802
|
+
script$E.__scopeId = "data-v-daaf434a";
|
|
448566
448803
|
const __sfc_main$E = script$E;
|
|
448567
448804
|
|
|
448568
448805
|
/**
|
|
@@ -448806,7 +449043,7 @@ var script$D = {
|
|
|
448806
449043
|
* @return {string} The heading to render.
|
|
448807
449044
|
*/
|
|
448808
449045
|
resolvedTitle() {
|
|
448809
|
-
return this.title || this.page?.title || l10n.t('nextcloud-vue', '
|
|
449046
|
+
return this.title || this.page?.title || l10n.t('nextcloud-vue', 'Marketplace')
|
|
448810
449047
|
},
|
|
448811
449048
|
|
|
448812
449049
|
/**
|
|
@@ -449105,7 +449342,7 @@ var script$D = {
|
|
|
449105
449342
|
notConfiguredMessage() {
|
|
449106
449343
|
const base = l10n.t(
|
|
449107
449344
|
'nextcloud-vue',
|
|
449108
|
-
'No
|
|
449345
|
+
'No marketplace registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.',
|
|
449109
449346
|
);
|
|
449110
449347
|
|
|
449111
449348
|
return this.builtIn.length > 0
|
|
@@ -449119,7 +449356,7 @@ var script$D = {
|
|
|
449119
449356
|
* @return {string} The unreachable note.
|
|
449120
449357
|
*/
|
|
449121
449358
|
unreachableMessage() {
|
|
449122
|
-
const base = l10n.t('nextcloud-vue', 'The
|
|
449359
|
+
const base = l10n.t('nextcloud-vue', 'The marketplace registry did not answer.');
|
|
449123
449360
|
|
|
449124
449361
|
return this.builtIn.length > 0
|
|
449125
449362
|
? `${base} ${l10n.t('nextcloud-vue', 'The items below ship with this app.')}`
|
|
@@ -449663,8 +449900,8 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449663
449900
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.query) = $event)),
|
|
449664
449901
|
type: "search",
|
|
449665
449902
|
class: "cn-store-page__lens-search-input",
|
|
449666
|
-
placeholder: $options.t('nextcloud-vue', 'Search the
|
|
449667
|
-
"aria-label": $options.t('nextcloud-vue', 'Search the
|
|
449903
|
+
placeholder: $options.t('nextcloud-vue', 'Search the marketplace'),
|
|
449904
|
+
"aria-label": $options.t('nextcloud-vue', 'Search the marketplace'),
|
|
449668
449905
|
disabled: $options.offline,
|
|
449669
449906
|
"data-testid": "store-search",
|
|
449670
449907
|
onInput: _cache[1] || (_cache[1] = (...args) => ($options.onSearchInput && $options.onSearchInput(...args)))
|
|
@@ -449680,7 +449917,7 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449680
449917
|
_cache[2] || (_cache[2] = $event => (($data.query) = $event)),
|
|
449681
449918
|
$options.onSearchInput
|
|
449682
449919
|
],
|
|
449683
|
-
label: $options.t('nextcloud-vue', 'Search the
|
|
449920
|
+
label: $options.t('nextcloud-vue', 'Search the marketplace'),
|
|
449684
449921
|
disabled: $options.offline,
|
|
449685
449922
|
"data-testid": "store-search"
|
|
449686
449923
|
}, null, 8 /* PROPS */, ["modelValue", "label", "disabled", "onUpdate:modelValue"]),
|
|
@@ -449885,9 +450122,9 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449885
450122
|
($options.isBoardLook && !$data.loading && !$options.offline && !$options.unreachable)
|
|
449886
450123
|
? (vue$1.openBlock(), vue$1.createElementBlock("aside", _hoisted_33$4, [
|
|
449887
450124
|
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
|
|
450125
|
+
vue$1.createElementVNode("h2", _hoisted_35$4, vue$1.toDisplayString($options.t('nextcloud-vue', 'Installed from this marketplace')), 1 /* TEXT */),
|
|
449889
450126
|
($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
|
|
450127
|
+
? (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
450128
|
: (vue$1.openBlock(), vue$1.createElementBlock("ul", _hoisted_37$3, [
|
|
449892
450129
|
(vue$1.openBlock(true), vue$1.createElementBlock(vue$1.Fragment, null, vue$1.renderList($options.installedCards, (card) => {
|
|
449893
450130
|
return (vue$1.openBlock(), vue$1.createElementBlock("li", {
|
|
@@ -449953,7 +450190,7 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
449953
450190
|
}
|
|
449954
450191
|
|
|
449955
450192
|
script$D.render = render$C;
|
|
449956
|
-
script$D.__scopeId = "data-v-
|
|
450193
|
+
script$D.__scopeId = "data-v-45414193";
|
|
449957
450194
|
const __sfc_main$D = script$D;
|
|
449958
450195
|
|
|
449959
450196
|
var CnStorePage = /*#__PURE__*/Object.freeze({
|
|
@@ -474240,7 +474477,7 @@ var script$5 = {
|
|
|
474240
474477
|
const raw = this.loadedItems !== null ? this.loadedItems : this.items;
|
|
474241
474478
|
const map = { ...DEFAULT_FIELDS, ...(this.fields || {}) };
|
|
474242
474479
|
return (Array.isArray(raw) ? raw : []).map((row, index) => {
|
|
474243
|
-
const read = (key) => readPath$
|
|
474480
|
+
const read = (key) => readPath$a(row, map[key]);
|
|
474244
474481
|
const met = read('met');
|
|
474245
474482
|
return {
|
|
474246
474483
|
id: String(read('id') ?? index),
|
|
@@ -474365,7 +474602,7 @@ var script$5 = {
|
|
|
474365
474602
|
this.loadError = '';
|
|
474366
474603
|
try {
|
|
474367
474604
|
const { data } = await axios$1.get(router.generateUrl(this.source));
|
|
474368
|
-
const rows = Array.isArray(data) ? data : readPath$
|
|
474605
|
+
const rows = Array.isArray(data) ? data : readPath$a(data, this.itemsPath);
|
|
474369
474606
|
this.loadedItems = Array.isArray(rows) ? rows : [];
|
|
474370
474607
|
/** @event loaded The source answered. Payload: the whole answer. */
|
|
474371
474608
|
this.$emit('loaded', data);
|