@marktiderman/genesis-ui-native 2.6.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-KZEIF4YI.js → chunk-7HWS2JGX.js} +3 -3
- package/dist/{chunk-KZEIF4YI.js.map → chunk-7HWS2JGX.js.map} +1 -1
- package/dist/{chunk-3S5XVER4.js → chunk-C6Q5ZAVT.js} +4 -3
- package/dist/chunk-C6Q5ZAVT.js.map +1 -0
- package/dist/{chunk-VMSIKSU2.js → chunk-ON7WP4T6.js} +4 -4
- package/dist/{chunk-VMSIKSU2.js.map → chunk-ON7WP4T6.js.map} +1 -1
- package/dist/{chunk-56QLEHHV.js → chunk-PO3MK6IY.js} +3 -3
- package/dist/{chunk-56QLEHHV.js.map → chunk-PO3MK6IY.js.map} +1 -1
- package/dist/{chunk-6JBNSW4D.js → chunk-SXCG2REG.js} +3 -3
- package/dist/{chunk-6JBNSW4D.js.map → chunk-SXCG2REG.js.map} +1 -1
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.js +3 -3
- package/dist/data/index.d.ts +122 -22
- package/dist/data/index.js +447 -31
- package/dist/data/index.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/layouts/index.js +3 -3
- package/package.json +2 -2
- package/src/components/__tests__/button-a11y.test.tsx +17 -0
- package/src/components/button.tsx +8 -2
- package/src/data/resource-view/NativeResourceFormSheet.tsx +4 -1
- package/src/data/resource-view/NativeResourceView.tsx +11 -3
- package/src/data/resource-view/NativeResourceWorkspace.tsx +657 -0
- package/src/data/resource-view/__tests__/native-resource-view.test.tsx +122 -1
- package/src/data/resource-view/__tests__/native-resource-workspace.test.tsx +356 -0
- package/src/data/resource-view/display.tsx +8 -5
- package/src/data/resource-view/index.ts +11 -0
- package/src/data/resource-view/mapping.ts +16 -10
- package/src/data/resource-view/use-native-resource-view.ts +7 -5
- package/dist/chunk-3S5XVER4.js.map +0 -1
package/dist/data/index.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { NativeImage, NativeAvatar, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeSheet, NativeSheetScrollView, NativeInlineAlert, NativeSegmentedControl, NativeDatePicker, NativeTimePicker, NativeSearchBar, NativeSkeleton, NativeCardHeader, NativeCardTitle } from '../chunk-
|
|
1
|
+
import { NativeImage, NativeAvatar, NativeCard, NativeCardContent, NativeSeparator, NativeLabel, NativeSwitch, NativeCheckbox, NativeSelect, NativeSelectTrigger, NativeSelectContent, NativeSelectItem, NativeTextarea, NativeAlert, NativeAlertTitle, NativeAlertDescription, NativeSheet, NativeSheetScrollView, NativeInlineAlert, NativeSegmentedControl, NativeDatePicker, NativeTimePicker, NativeSearchBar, NativeSkeleton, NativeCardHeader, NativeCardTitle } from '../chunk-PO3MK6IY.js';
|
|
2
2
|
import '../chunk-7PCWEY6R.js';
|
|
3
|
-
import { showInboxActions, NavBarSaveButton } from '../chunk-
|
|
4
|
-
import { NativeListItem, NativeBadge, NativeText, NativeButton, NativeInput, useGenesisModules, NativeLoadingState, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl } from '../chunk-
|
|
3
|
+
import { showInboxActions, NavBarSaveButton, composeHeaderOptions } from '../chunk-SXCG2REG.js';
|
|
4
|
+
import { NativeListItem, NativeBadge, NativeText, NativeButton, NativeInput, useGenesisModules, NativeLoadingState, NativeSectionListHeader, NativeEmptyState, NativeRefreshControl, NativeIcon } from '../chunk-C6Q5ZAVT.js';
|
|
5
5
|
import { useThemeRoles } from '../chunk-Z3AQYVUA.js';
|
|
6
6
|
import '../chunk-OHZD7KRO.js';
|
|
7
7
|
import '../chunk-DGUM43GV.js';
|
|
8
|
-
import { Platform, View, Pressable, Text, Linking, ScrollView, Alert, SectionList, FlatList } from 'react-native';
|
|
8
|
+
import { Platform, View, Pressable, Text, Linking, ScrollView, Alert, SectionList, FlatList, ActionSheetIOS } from 'react-native';
|
|
9
9
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import { createContext, memo, useState, useCallback, useMemo, useEffect, useContext, useRef } from 'react';
|
|
12
12
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
13
|
-
import { titleCase, useResourceForm } from '@marktiderman/genesis-core';
|
|
13
|
+
import { titleCase, useResourceForm, resourceKeys, useDataProvider, useViewer as useViewer$1, encodeRecordKey, useCapabilities as useCapabilities$1, DataWriteError } from '@marktiderman/genesis-core';
|
|
14
14
|
import { Controller, useForm } from 'react-hook-form';
|
|
15
|
-
import { useResource, useInfiniteResource, useCapabilities, useOptionalViewerScope, useOne } from '@marktiderman/genesis-core/hooks';
|
|
15
|
+
import { useResource, useViewer, useInfiniteResource, useCapabilities, useOptionalViewerScope, useOne } from '@marktiderman/genesis-core/hooks';
|
|
16
16
|
import { personTimeZone, isTimeZone, wallClock } from '@marktiderman/genesis-core/dates';
|
|
17
17
|
import { isSafeUrl } from '@marktiderman/genesis-core/urls';
|
|
18
|
-
import { rowPicture } from '@marktiderman/genesis-core/resource-view';
|
|
18
|
+
import { valueText, rowPicture } from '@marktiderman/genesis-core/resource-view';
|
|
19
|
+
import { useQueryClient, useQuery } from '@tanstack/react-query';
|
|
20
|
+
import { readinessChip } from '@marktiderman/genesis-core/resource';
|
|
19
21
|
|
|
20
22
|
function NativeEmptyState2({
|
|
21
23
|
message = "No items found",
|
|
@@ -673,7 +675,7 @@ function NativeResourcePage({
|
|
|
673
675
|
setSearchLocal("");
|
|
674
676
|
setSelectedStatuses([]);
|
|
675
677
|
}, []);
|
|
676
|
-
const
|
|
678
|
+
const keyExtractor = useCallback(
|
|
677
679
|
(item) => String(item.id),
|
|
678
680
|
[]
|
|
679
681
|
);
|
|
@@ -744,7 +746,7 @@ function NativeResourcePage({
|
|
|
744
746
|
{
|
|
745
747
|
testID: "native-resource-page-list",
|
|
746
748
|
data: items,
|
|
747
|
-
keyExtractor
|
|
749
|
+
keyExtractor,
|
|
748
750
|
renderItem: renderFlatListItem,
|
|
749
751
|
ListHeaderComponent,
|
|
750
752
|
ListEmptyComponent,
|
|
@@ -759,7 +761,7 @@ function NativeResourcePage({
|
|
|
759
761
|
{
|
|
760
762
|
testID: "native-resource-page-list",
|
|
761
763
|
data: items,
|
|
762
|
-
keyExtractor
|
|
764
|
+
keyExtractor,
|
|
763
765
|
renderItem: renderFlatListItem,
|
|
764
766
|
ListHeaderComponent,
|
|
765
767
|
ListEmptyComponent,
|
|
@@ -945,7 +947,7 @@ var nativeDisplayRenderers = {
|
|
|
945
947
|
currency: text("currency"),
|
|
946
948
|
percent: text("percent"),
|
|
947
949
|
boolean: text("boolean"),
|
|
948
|
-
badge: (value, { column }) => /* @__PURE__ */ jsx(NativeBadge, { variant: badgeVariant(column.tones?.[String(value)]), children:
|
|
950
|
+
badge: (value, { column }) => /* @__PURE__ */ jsx(NativeBadge, { variant: badgeVariant(column.tones?.[String(value)]), children: valueText(column.labels, value) }),
|
|
949
951
|
date: text("date"),
|
|
950
952
|
datetime: text("datetime"),
|
|
951
953
|
// The linked row's id until relation labels arrive (batched per page, never per row).
|
|
@@ -989,14 +991,15 @@ function useDisplayCell() {
|
|
|
989
991
|
const renderers = useContext(DisplayRenderersContext);
|
|
990
992
|
const messages = useNativeResourceViewMessages();
|
|
991
993
|
const zones = useDisplayTimeZones();
|
|
994
|
+
const viewer = useViewer();
|
|
992
995
|
return useMemo(
|
|
993
996
|
() => (column, row) => {
|
|
994
|
-
if (column.when && !column.when(row)) return /* @__PURE__ */ jsx(NativeText, { preset: "body", children: messages.common.empty });
|
|
997
|
+
if (column.when && !column.when(row, viewer)) return /* @__PURE__ */ jsx(NativeText, { preset: "body", children: messages.common.empty });
|
|
995
998
|
const value = column.value(row);
|
|
996
999
|
if (isEmptyValue(value)) return /* @__PURE__ */ jsx(NativeText, { preset: "body", children: messages.common.empty });
|
|
997
1000
|
return renderers[column.display](value, { row, column, messages, zones });
|
|
998
1001
|
},
|
|
999
|
-
[renderers, messages, zones]
|
|
1002
|
+
[renderers, messages, zones, viewer]
|
|
1000
1003
|
);
|
|
1001
1004
|
}
|
|
1002
1005
|
function nativePicture(summary) {
|
|
@@ -1026,7 +1029,7 @@ function sectionsFor(view, rows, messages) {
|
|
|
1026
1029
|
const key = isEmptyValue(value) ? "\0" : String(value);
|
|
1027
1030
|
let group = groups.get(key);
|
|
1028
1031
|
if (!group) {
|
|
1029
|
-
const title = isEmptyValue(value) ? fill(messages.list.noGroup, { label: view.label(field).toLowerCase() }) : displayText(display, value, messages);
|
|
1032
|
+
const title = isEmptyValue(value) ? fill(messages.list.noGroup, { label: view.label(field).toLowerCase() }) : display === "badge" ? view.valueLabel(field, value) : displayText(display, value, messages);
|
|
1030
1033
|
group = { key, title, data: [] };
|
|
1031
1034
|
groups.set(key, group);
|
|
1032
1035
|
}
|
|
@@ -1034,15 +1037,15 @@ function sectionsFor(view, rows, messages) {
|
|
|
1034
1037
|
}
|
|
1035
1038
|
return [...groups.values()];
|
|
1036
1039
|
}
|
|
1037
|
-
function allowed(view, action, row, screen) {
|
|
1040
|
+
function allowed(view, action, row, screen, viewer) {
|
|
1038
1041
|
const own = screen?.(action, row);
|
|
1039
1042
|
if (own === false) return false;
|
|
1040
1043
|
if (typeof own === "string") return own;
|
|
1041
|
-
const guard = action === "create" ? view.can("create") : row ? view.can(action, row) : true;
|
|
1044
|
+
const guard = action === "create" ? view.can("create", viewer) : row ? view.can(action, row, viewer) : true;
|
|
1042
1045
|
return guard;
|
|
1043
1046
|
}
|
|
1044
1047
|
function swipeActionsFor(view, row, options) {
|
|
1045
|
-
const { messages, softDelete, editable, screen, onEdit, onDelete, onRefused } = options;
|
|
1048
|
+
const { messages, softDelete, editable, screen, viewer, onEdit, onDelete, onRefused } = options;
|
|
1046
1049
|
const actions = [];
|
|
1047
1050
|
const add = (id, label, icon, right, run, destructive = false) => {
|
|
1048
1051
|
if (right === false) return;
|
|
@@ -1056,12 +1059,12 @@ function swipeActionsFor(view, row, options) {
|
|
|
1056
1059
|
onPress: reason ? () => onRefused(label, reason) : run
|
|
1057
1060
|
});
|
|
1058
1061
|
};
|
|
1059
|
-
if (editable) add("edit", messages.common.edit, "edit", allowed(view, "update", row, screen), () => onEdit(row));
|
|
1062
|
+
if (editable) add("edit", messages.common.edit, "edit", allowed(view, "update", row, screen, viewer), () => onEdit(row));
|
|
1060
1063
|
add(
|
|
1061
1064
|
"delete",
|
|
1062
1065
|
softDelete ? messages.bin.action : messages.delete.action,
|
|
1063
1066
|
"trash",
|
|
1064
|
-
allowed(view, "delete", row, screen),
|
|
1067
|
+
allowed(view, "delete", row, screen, viewer),
|
|
1065
1068
|
() => onDelete(row),
|
|
1066
1069
|
true
|
|
1067
1070
|
);
|
|
@@ -1095,7 +1098,7 @@ function kindFor(display, options) {
|
|
|
1095
1098
|
function formFieldsFor(view, mode) {
|
|
1096
1099
|
const writable = new Set(view.writable(mode));
|
|
1097
1100
|
return view.form(mode).filter((f) => f.display !== "json" && !f.field.array).filter((f) => mode === "edit" || writable.has(f.field.name)).map((f) => {
|
|
1098
|
-
const options = f.
|
|
1101
|
+
const options = f.options?.map((o) => ({ value: o.value, label: o.label }));
|
|
1099
1102
|
const readOnly = !writable.has(f.field.name);
|
|
1100
1103
|
return {
|
|
1101
1104
|
key: f.field.name,
|
|
@@ -1112,7 +1115,6 @@ function formFieldsFor(view, mode) {
|
|
|
1112
1115
|
};
|
|
1113
1116
|
});
|
|
1114
1117
|
}
|
|
1115
|
-
var EMPTY_WORDS = { common: { empty: "", yes: "", no: "" } };
|
|
1116
1118
|
function shownFields(fields, values) {
|
|
1117
1119
|
return fields.filter((f) => !f.visible || f.visible(values));
|
|
1118
1120
|
}
|
|
@@ -1180,7 +1182,7 @@ function NativeResourceFormSheet({
|
|
|
1180
1182
|
fields,
|
|
1181
1183
|
initial,
|
|
1182
1184
|
loading = false,
|
|
1183
|
-
recordKey,
|
|
1185
|
+
recordKey: recordKey2,
|
|
1184
1186
|
onCancel,
|
|
1185
1187
|
onSave,
|
|
1186
1188
|
testID = "native-resource-form"
|
|
@@ -1199,7 +1201,7 @@ function NativeResourceFormSheet({
|
|
|
1199
1201
|
form.reset(start.current);
|
|
1200
1202
|
setRefusal(null);
|
|
1201
1203
|
}
|
|
1202
|
-
}, [open, loading,
|
|
1204
|
+
}, [open, loading, recordKey2, form]);
|
|
1203
1205
|
const values = form.watch();
|
|
1204
1206
|
const sections = useMemo(() => {
|
|
1205
1207
|
const out = [];
|
|
@@ -1279,7 +1281,9 @@ function FormField({
|
|
|
1279
1281
|
const zones = useDisplayTimeZones();
|
|
1280
1282
|
const error = f.formState.errors[field.key]?.message;
|
|
1281
1283
|
if (field.readOnly) {
|
|
1282
|
-
const
|
|
1284
|
+
const value = f.getValues(field.key);
|
|
1285
|
+
const choice = field.options?.find((o) => o.value === String(value));
|
|
1286
|
+
const shown = choice ? choice.label : displayText(field.display, value, messages, resolveZone(void 0, zones));
|
|
1283
1287
|
return /* @__PURE__ */ jsxs(View, { testID: id, style: { gap: 4 }, accessibilityLabel: `${field.label}, ${shown}`, children: [
|
|
1284
1288
|
/* @__PURE__ */ jsx(NativeLabel, { children: field.label }),
|
|
1285
1289
|
/* @__PURE__ */ jsx(NativeText, { testID: `${id}-value`, preset: "body", className: "text-muted-foreground", children: shown })
|
|
@@ -1431,9 +1435,10 @@ function useNativeResourceView(view, options = {}) {
|
|
|
1431
1435
|
[view, createDefaults]
|
|
1432
1436
|
);
|
|
1433
1437
|
const editable = useMemo(() => formFieldsFor(view, "edit").some((f) => !f.readOnly), [view]);
|
|
1438
|
+
const viewer = useViewer();
|
|
1434
1439
|
const canCreate = useMemo(
|
|
1435
|
-
() => formFieldsFor(view, "create").length ? allowed(view, "create", void 0, can) : false,
|
|
1436
|
-
[view, can]
|
|
1440
|
+
() => formFieldsFor(view, "create").length ? allowed(view, "create", void 0, can, viewer) : false,
|
|
1441
|
+
[view, can, viewer]
|
|
1437
1442
|
);
|
|
1438
1443
|
const writers = useRef(pessimistic);
|
|
1439
1444
|
writers.current = pessimistic;
|
|
@@ -1468,8 +1473,8 @@ function useNativeResourceView(view, options = {}) {
|
|
|
1468
1473
|
}, []);
|
|
1469
1474
|
const item = useCallback((row) => rowItem(view, row), [view]);
|
|
1470
1475
|
const actions = useCallback(
|
|
1471
|
-
(row, handlers) => swipeActionsFor(view, row, { messages, softDelete, editable, screen: can, ...handlers }),
|
|
1472
|
-
[view, messages, softDelete, editable, can]
|
|
1476
|
+
(row, handlers) => swipeActionsFor(view, row, { messages, softDelete, editable, screen: can, viewer, ...handlers }),
|
|
1477
|
+
[view, messages, softDelete, editable, can, viewer]
|
|
1473
1478
|
);
|
|
1474
1479
|
const sections = useMemo(() => sectionsFor(view, pages.rows, messages), [view, pages.rows, messages]);
|
|
1475
1480
|
const { query } = pages;
|
|
@@ -1513,7 +1518,13 @@ function useNativeResourceView(view, options = {}) {
|
|
|
1513
1518
|
var IOS_GROUP_MARGIN = 16;
|
|
1514
1519
|
var GROUP_RADIUS = Number.parseFloat(String(Platform.Version)) >= 26 ? 26 : 10;
|
|
1515
1520
|
var IOS = Platform.OS === "ios";
|
|
1516
|
-
var
|
|
1521
|
+
var recordKey = (view, row) => {
|
|
1522
|
+
try {
|
|
1523
|
+
return String(encodeRecordKey(view.contract, row));
|
|
1524
|
+
} catch {
|
|
1525
|
+
return String(row.id);
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1517
1528
|
function NativeResourceView(props) {
|
|
1518
1529
|
const scope = useOptionalViewerScope();
|
|
1519
1530
|
const viewer = scope?.timeZone;
|
|
@@ -1629,6 +1640,7 @@ function Screen(props) {
|
|
|
1629
1640
|
...options
|
|
1630
1641
|
} = props;
|
|
1631
1642
|
const state = useNativeResourceView(view, options);
|
|
1643
|
+
const keyExtractor = useCallback((row) => recordKey(view, row), [view]);
|
|
1632
1644
|
const messages = useNativeResourceViewMessages();
|
|
1633
1645
|
const colors = useThemeRoles();
|
|
1634
1646
|
const cell = useDisplayCell();
|
|
@@ -1825,7 +1837,7 @@ function Screen(props) {
|
|
|
1825
1837
|
fields: sheet?.mode === "edit" ? editFields : createFields,
|
|
1826
1838
|
initial: sheet?.mode === "edit" ? editRow.data ?? (editRow.isError ? sheet.row : void 0) : void 0,
|
|
1827
1839
|
loading: editLoading,
|
|
1828
|
-
recordKey: sheet?.row ?
|
|
1840
|
+
recordKey: sheet?.row ? recordKey(view, sheet.row) : "new",
|
|
1829
1841
|
onCancel: () => setSheet(null),
|
|
1830
1842
|
onSave: async (values, dirty) => {
|
|
1831
1843
|
const result = await state.save(sheet?.mode ?? "create", values, sheet?.row, dirty);
|
|
@@ -1837,7 +1849,411 @@ function Screen(props) {
|
|
|
1837
1849
|
)
|
|
1838
1850
|
] });
|
|
1839
1851
|
}
|
|
1852
|
+
var defaultNativeResourceWorkspaceMessages = {
|
|
1853
|
+
actions: "Actions",
|
|
1854
|
+
cancel: "Cancel",
|
|
1855
|
+
save: "Save",
|
|
1856
|
+
notChanged: "This {noun} was not changed.",
|
|
1857
|
+
failed: "That didn't work. Try again.",
|
|
1858
|
+
noRunner: "{name} isn't available here.",
|
|
1859
|
+
checks: "Checks",
|
|
1860
|
+
checkDone: "Done",
|
|
1861
|
+
checkTodo: "To do",
|
|
1862
|
+
allSections: "All sections",
|
|
1863
|
+
notANumber: "Enter a number.",
|
|
1864
|
+
ready: void 0,
|
|
1865
|
+
empty: void 0,
|
|
1866
|
+
pending: void 0,
|
|
1867
|
+
problems: void 0,
|
|
1868
|
+
warnings: void 0
|
|
1869
|
+
};
|
|
1870
|
+
var SEGMENTED_SECTIONS_MAX = 4;
|
|
1871
|
+
function useHeaderActions({ workspace, row, onAction, can, messages }) {
|
|
1872
|
+
const words = { ...defaultNativeResourceWorkspaceMessages, ...messages };
|
|
1873
|
+
const provider = useDataProvider();
|
|
1874
|
+
const queryClient = useQueryClient();
|
|
1875
|
+
const view = workspace.view;
|
|
1876
|
+
const capabilities = useCapabilities$1(view.resource, { enabled: !onAction && !!provider.capabilities });
|
|
1877
|
+
const described = useQuery({
|
|
1878
|
+
queryKey: ["__describe", view.resource],
|
|
1879
|
+
queryFn: () => provider.describe(view.resource),
|
|
1880
|
+
enabled: !onAction && !!provider.describe,
|
|
1881
|
+
staleTime: Infinity
|
|
1882
|
+
});
|
|
1883
|
+
const viewer = useViewer$1();
|
|
1884
|
+
const actions = workspace.headerFor(row, {
|
|
1885
|
+
viewer,
|
|
1886
|
+
runnable: Boolean(onAction) || Boolean(provider.runAction) && capabilities.data?.actions !== false,
|
|
1887
|
+
...!onAction && described.data?.actions ? { served: described.data.actions.map((a) => a.name) } : {},
|
|
1888
|
+
...can ? { can: (name) => can(name, row) } : {}
|
|
1889
|
+
}).actions;
|
|
1890
|
+
const running = useRef(false);
|
|
1891
|
+
const [pending, setPending] = useState(false);
|
|
1892
|
+
const run = async (a) => {
|
|
1893
|
+
if (running.current) return;
|
|
1894
|
+
running.current = true;
|
|
1895
|
+
setPending(true);
|
|
1896
|
+
try {
|
|
1897
|
+
if (onAction) await onAction(a.name, row);
|
|
1898
|
+
else if (provider.runAction) await provider.runAction(view.resource, { id: workspace.recordId(row), action: a.name });
|
|
1899
|
+
else throw new DataWriteError("error", fill(words.noRunner, { name: a.label }));
|
|
1900
|
+
await queryClient.invalidateQueries({ queryKey: [...resourceKeys(view.resource).all] });
|
|
1901
|
+
} catch (error) {
|
|
1902
|
+
Alert.alert(a.label, refusalMessage(error, words.failed));
|
|
1903
|
+
} finally {
|
|
1904
|
+
running.current = false;
|
|
1905
|
+
setPending(false);
|
|
1906
|
+
}
|
|
1907
|
+
};
|
|
1908
|
+
const press = (a) => {
|
|
1909
|
+
if (running.current) return;
|
|
1910
|
+
if (a.allowed !== true) return Alert.alert(a.label, a.allowed);
|
|
1911
|
+
if (!a.confirm) return void run(a);
|
|
1912
|
+
Alert.alert(a.confirm, a.description, [
|
|
1913
|
+
{ text: words.cancel, style: "cancel" },
|
|
1914
|
+
{ text: a.label, style: a.destructive ? "destructive" : "default", onPress: () => void run(a) }
|
|
1915
|
+
]);
|
|
1916
|
+
};
|
|
1917
|
+
return { actions, press, pending, words };
|
|
1918
|
+
}
|
|
1919
|
+
var A11Y_PREFIX = "action:";
|
|
1920
|
+
function NativeResourceWorkspaceMenu(props) {
|
|
1921
|
+
const { testID = "native-resource-workspace-menu" } = props;
|
|
1922
|
+
const { actions, press, pending, words } = useHeaderActions(props);
|
|
1923
|
+
const [open, setOpen] = useState(false);
|
|
1924
|
+
if (actions.length === 0) return null;
|
|
1925
|
+
const labelOf = (a) => a.allowed === true ? a.label : `${a.label} (${a.allowed})`;
|
|
1926
|
+
const show = () => {
|
|
1927
|
+
if (Platform.OS === "ios") {
|
|
1928
|
+
const destructive = actions.flatMap((a, i) => a.destructive ? [i] : []);
|
|
1929
|
+
ActionSheetIOS.showActionSheetWithOptions(
|
|
1930
|
+
{
|
|
1931
|
+
title: props.workspace.headerFor(props.row).title,
|
|
1932
|
+
options: [...actions.map(labelOf), words.cancel],
|
|
1933
|
+
cancelButtonIndex: actions.length,
|
|
1934
|
+
...destructive.length ? { destructiveButtonIndex: destructive } : {}
|
|
1935
|
+
},
|
|
1936
|
+
(index) => {
|
|
1937
|
+
const a = actions[index];
|
|
1938
|
+
if (a) press(a);
|
|
1939
|
+
}
|
|
1940
|
+
);
|
|
1941
|
+
} else {
|
|
1942
|
+
setOpen(true);
|
|
1943
|
+
}
|
|
1944
|
+
};
|
|
1945
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1946
|
+
/* @__PURE__ */ jsx(
|
|
1947
|
+
Pressable,
|
|
1948
|
+
{
|
|
1949
|
+
testID,
|
|
1950
|
+
accessibilityRole: "button",
|
|
1951
|
+
accessibilityLabel: words.actions,
|
|
1952
|
+
accessibilityState: { disabled: pending, busy: pending },
|
|
1953
|
+
disabled: pending,
|
|
1954
|
+
accessibilityActions: actions.map((a) => ({ name: `${A11Y_PREFIX}${a.name}`, label: a.allowed === true ? a.label : `${a.label}: ${a.allowed}` })),
|
|
1955
|
+
onAccessibilityAction: (event) => {
|
|
1956
|
+
const name = event.nativeEvent.actionName;
|
|
1957
|
+
const a = name.startsWith(A11Y_PREFIX) ? actions.find((x) => `${A11Y_PREFIX}${x.name}` === name) : void 0;
|
|
1958
|
+
if (a) press(a);
|
|
1959
|
+
},
|
|
1960
|
+
onPress: show,
|
|
1961
|
+
hitSlop: 8,
|
|
1962
|
+
className: "min-h-[44px] min-w-[44px] items-center justify-center",
|
|
1963
|
+
children: /* @__PURE__ */ jsx(NativeIcon, { name: "more", label: words.actions })
|
|
1964
|
+
}
|
|
1965
|
+
),
|
|
1966
|
+
/* @__PURE__ */ jsx(NativeSheet, { open, onOpenChange: setOpen, testID: `${testID}-sheet`, children: /* @__PURE__ */ jsxs(View, { style: { paddingVertical: 8 }, children: [
|
|
1967
|
+
actions.map((a) => /* @__PURE__ */ jsxs(
|
|
1968
|
+
Pressable,
|
|
1969
|
+
{
|
|
1970
|
+
testID: `${testID}-${a.name}`,
|
|
1971
|
+
accessibilityRole: "button",
|
|
1972
|
+
accessibilityLabel: a.allowed === true ? a.label : `${a.label}: ${a.allowed}`,
|
|
1973
|
+
onPress: () => {
|
|
1974
|
+
setOpen(false);
|
|
1975
|
+
press(a);
|
|
1976
|
+
},
|
|
1977
|
+
className: "min-h-[48px] justify-center px-4",
|
|
1978
|
+
children: [
|
|
1979
|
+
/* @__PURE__ */ jsx(NativeText, { preset: "body", className: a.destructive ? "text-destructive" : void 0, children: a.label }),
|
|
1980
|
+
a.allowed !== true ? /* @__PURE__ */ jsx(NativeText, { preset: "caption", className: "text-muted-foreground", children: a.allowed }) : null
|
|
1981
|
+
]
|
|
1982
|
+
},
|
|
1983
|
+
a.name
|
|
1984
|
+
)),
|
|
1985
|
+
/* @__PURE__ */ jsx(Pressable, { testID: `${testID}-cancel`, accessibilityRole: "button", onPress: () => setOpen(false), className: "min-h-[48px] justify-center px-4", children: /* @__PURE__ */ jsx(NativeText, { preset: "body", className: "text-muted-foreground", children: words.cancel }) })
|
|
1986
|
+
] }) })
|
|
1987
|
+
] });
|
|
1988
|
+
}
|
|
1989
|
+
function getNativeResourceWorkspaceStackOptions(props) {
|
|
1990
|
+
const { workspace, row, onAction, can, messages, ...header } = props;
|
|
1991
|
+
const menu = { workspace, row, ...onAction ? { onAction } : {}, ...can ? { can } : {}, ...messages ? { messages } : {} };
|
|
1992
|
+
return composeHeaderOptions({
|
|
1993
|
+
...header,
|
|
1994
|
+
headerTitle: workspace.headerFor(row).title,
|
|
1995
|
+
headerRight: header.headerRight ?? (workspace.headerActions.length ? () => /* @__PURE__ */ jsx(NativeResourceWorkspaceMenu, { ...menu }) : void 0)
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1998
|
+
function NativeResourceWorkspace(props) {
|
|
1999
|
+
const { workspace, row, section, onSectionChange, onOpenSection, onSaved, switcher, slots, lists, messages, testID = "native-resource-workspace" } = props;
|
|
2000
|
+
const words = { ...defaultNativeResourceWorkspaceMessages, ...messages };
|
|
2001
|
+
const colors = useThemeRoles();
|
|
2002
|
+
const queryClient = useQueryClient();
|
|
2003
|
+
const record = row;
|
|
2004
|
+
const sections = workspace.sections;
|
|
2005
|
+
const many = sections.length > SEGMENTED_SECTIONS_MAX;
|
|
2006
|
+
const [local, setLocal] = useState(void 0);
|
|
2007
|
+
const activeId = section ?? local ?? (many ? void 0 : sections[0]?.id);
|
|
2008
|
+
const active = activeId ? workspace.section(activeId) : void 0;
|
|
2009
|
+
const readiness = workspace.readinessFor(record);
|
|
2010
|
+
const summary = workspace.readinessSummary(record);
|
|
2011
|
+
const chip = summary ? readinessChip(summary, words) : null;
|
|
2012
|
+
const choose = (id) => {
|
|
2013
|
+
if (many && onOpenSection) return onOpenSection(id);
|
|
2014
|
+
setLocal(id);
|
|
2015
|
+
onSectionChange?.(id);
|
|
2016
|
+
};
|
|
2017
|
+
const top = /* @__PURE__ */ jsxs(View, { style: { paddingHorizontal: 16, paddingTop: 8, gap: 12 }, children: [
|
|
2018
|
+
switcher,
|
|
2019
|
+
chip ? /* @__PURE__ */ jsx(View, { style: { flexDirection: "row" }, children: /* @__PURE__ */ jsx(NativeBadge, { testID: `${testID}-readiness`, variant: badgeVariant(chip.tone), children: chip.label }) }) : null,
|
|
2020
|
+
readiness.some((r) => !r.ok) ? /* @__PURE__ */ jsx(Group, { testID: `${testID}-checks`, title: words.checks, children: readiness.map((r, i) => /* @__PURE__ */ jsx(Cell, { last: i === readiness.length - 1, children: /* @__PURE__ */ jsx(
|
|
2021
|
+
NativeListItem,
|
|
2022
|
+
{
|
|
2023
|
+
testID: `${testID}-check-${i}`,
|
|
2024
|
+
title: r.title,
|
|
2025
|
+
subtitle: r.ok ? void 0 : r.reason,
|
|
2026
|
+
className: "bg-transparent",
|
|
2027
|
+
trailing: /* @__PURE__ */ jsx(NativeBadge, { testID: `${testID}-check-${i}-chip`, variant: badgeVariant(r.tone), children: r.ok ? words.checkDone : words.checkTodo })
|
|
2028
|
+
}
|
|
2029
|
+
) }, r.key)) }) : null,
|
|
2030
|
+
!many ? /* @__PURE__ */ jsx(
|
|
2031
|
+
NativeSegmentedControl,
|
|
2032
|
+
{
|
|
2033
|
+
testID: `${testID}-sections`,
|
|
2034
|
+
options: sections.map((s) => ({ value: s.id, label: s.label })),
|
|
2035
|
+
value: activeId ?? "",
|
|
2036
|
+
onChange: choose
|
|
2037
|
+
}
|
|
2038
|
+
) : null
|
|
2039
|
+
] });
|
|
2040
|
+
let body = null;
|
|
2041
|
+
if (many && !active) {
|
|
2042
|
+
body = /* @__PURE__ */ jsx(ScrollView, { contentContainerStyle: { padding: 16 }, children: /* @__PURE__ */ jsx(Group, { testID: `${testID}-sections`, children: sections.map((s, i) => /* @__PURE__ */ jsx(Cell, { last: i === sections.length - 1, children: /* @__PURE__ */ jsx(NativeListItem, { testID: `${testID}-section-${s.id}`, title: s.label, showChevron: true, onPress: () => choose(s.id), className: "bg-transparent" }) }, s.id)) }) });
|
|
2043
|
+
}
|
|
2044
|
+
const back = many && local !== void 0 && section === void 0 ? /* @__PURE__ */ jsx(View, { style: { paddingHorizontal: 16, paddingTop: 8 }, children: /* @__PURE__ */ jsx(Group, { testID: `${testID}-back`, children: /* @__PURE__ */ jsx(Cell, { last: true, children: /* @__PURE__ */ jsx(
|
|
2045
|
+
NativeListItem,
|
|
2046
|
+
{
|
|
2047
|
+
testID: `${testID}-all-sections`,
|
|
2048
|
+
title: words.allSections,
|
|
2049
|
+
leading: /* @__PURE__ */ jsx(NativeIcon, { name: "chevron-left" }),
|
|
2050
|
+
onPress: () => setLocal(void 0),
|
|
2051
|
+
className: "bg-transparent"
|
|
2052
|
+
}
|
|
2053
|
+
) }) }) }) : null;
|
|
2054
|
+
if (active?.kind === "list") {
|
|
2055
|
+
body = /* @__PURE__ */ jsx(
|
|
2056
|
+
NativeResourceView,
|
|
2057
|
+
{
|
|
2058
|
+
view: active.view,
|
|
2059
|
+
testID: `${testID}-list`,
|
|
2060
|
+
...lists?.[active.id],
|
|
2061
|
+
title: false,
|
|
2062
|
+
filter: workspace.listFilter(active.id, record)
|
|
2063
|
+
},
|
|
2064
|
+
active.id
|
|
2065
|
+
);
|
|
2066
|
+
} else if (active?.kind === "settings") {
|
|
2067
|
+
body = /* @__PURE__ */ jsx(ScrollView, { contentContainerStyle: { padding: 16 }, keyboardShouldPersistTaps: "handled", children: /* @__PURE__ */ jsx(
|
|
2068
|
+
SettingsGroup,
|
|
2069
|
+
{
|
|
2070
|
+
workspace,
|
|
2071
|
+
sectionId: active.id,
|
|
2072
|
+
row: record,
|
|
2073
|
+
words,
|
|
2074
|
+
onSaved: (saved) => {
|
|
2075
|
+
void queryClient.invalidateQueries({ queryKey: [...resourceKeys(workspace.view.resource).all] });
|
|
2076
|
+
onSaved?.(saved);
|
|
2077
|
+
},
|
|
2078
|
+
testID: `${testID}-settings`
|
|
2079
|
+
},
|
|
2080
|
+
`${String(workspace.recordId(record))}:${active.id}`
|
|
2081
|
+
) });
|
|
2082
|
+
} else if (active) {
|
|
2083
|
+
body = slots?.[active.id] ?? null;
|
|
2084
|
+
}
|
|
2085
|
+
return /* @__PURE__ */ jsxs(View, { testID, style: { flex: 1, backgroundColor: colors.groupedBackground }, children: [
|
|
2086
|
+
top,
|
|
2087
|
+
back,
|
|
2088
|
+
/* @__PURE__ */ jsx(View, { style: { flex: 1 }, children: body })
|
|
2089
|
+
] });
|
|
2090
|
+
}
|
|
2091
|
+
function SettingsGroup({
|
|
2092
|
+
workspace,
|
|
2093
|
+
sectionId,
|
|
2094
|
+
row,
|
|
2095
|
+
words,
|
|
2096
|
+
onSaved,
|
|
2097
|
+
testID
|
|
2098
|
+
}) {
|
|
2099
|
+
const provider = useDataProvider();
|
|
2100
|
+
const view = workspace.view;
|
|
2101
|
+
const fields = useMemo(() => {
|
|
2102
|
+
const byKey = new Map(formFieldsFor(view, "edit").map((f) => [f.key, f]));
|
|
2103
|
+
return workspace.settingsFields(sectionId).map((f) => byKey.get(f.field.name)).filter((f) => !!f && !f.readOnly);
|
|
2104
|
+
}, [workspace, view, sectionId]);
|
|
2105
|
+
const viewer = useViewer$1();
|
|
2106
|
+
const locked = workspace.settingsLocked(row, viewer);
|
|
2107
|
+
const [draft, setDraft] = useState(() => Object.fromEntries(fields.map((f) => [f.key, row[f.key]])));
|
|
2108
|
+
const [invalid, setInvalid] = useState({});
|
|
2109
|
+
const [saving, setSaving] = useState(false);
|
|
2110
|
+
const [refusal, setRefusal] = useState(null);
|
|
2111
|
+
const shown = fields.filter((f) => !f.visible || f.visible(draft));
|
|
2112
|
+
const changed = {};
|
|
2113
|
+
for (const f of shown) if (draft[f.key] !== row[f.key]) changed[f.key] = draft[f.key];
|
|
2114
|
+
const dirty = Object.keys(changed).length > 0 && !shown.some((f) => invalid[f.key]);
|
|
2115
|
+
const set = (key, value, error) => {
|
|
2116
|
+
setRefusal(null);
|
|
2117
|
+
setInvalid(({ [key]: _old, ...rest }) => error ? { ...rest, [key]: error } : rest);
|
|
2118
|
+
setDraft((d) => ({ ...d, [key]: value }));
|
|
2119
|
+
};
|
|
2120
|
+
const save = async () => {
|
|
2121
|
+
setSaving(true);
|
|
2122
|
+
setRefusal(null);
|
|
2123
|
+
try {
|
|
2124
|
+
const result = await provider.update(view.resource, { id: workspace.recordId(row), data: workspace.settingsPatch(sectionId, changed) });
|
|
2125
|
+
if (!result || result.data === null || result.data === void 0) setRefusal(fill(words.notChanged, { noun: view.noun }));
|
|
2126
|
+
else onSaved(result.data);
|
|
2127
|
+
} catch (error) {
|
|
2128
|
+
setRefusal(refusalMessage(error, words.failed));
|
|
2129
|
+
} finally {
|
|
2130
|
+
setSaving(false);
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
return /* @__PURE__ */ jsxs(View, { style: { gap: 12 }, children: [
|
|
2134
|
+
refusal ? /* @__PURE__ */ jsx(NativeInlineAlert, { testID: `${testID}-refusal`, variant: "destructive", description: refusal }) : null,
|
|
2135
|
+
locked !== null ? /* @__PURE__ */ jsx(NativeInlineAlert, { testID: `${testID}-locked`, variant: "info", description: locked }) : null,
|
|
2136
|
+
/* @__PURE__ */ jsx(Group, { testID: `${testID}-group`, title: workspace.section(sectionId)?.label, children: shown.map((f, i) => /* @__PURE__ */ jsx(Cell, { last: i === shown.length - 1, children: /* @__PURE__ */ jsx(
|
|
2137
|
+
SettingRow,
|
|
2138
|
+
{
|
|
2139
|
+
field: f,
|
|
2140
|
+
nullable: Boolean(view.field(f.key)?.nullable),
|
|
2141
|
+
value: draft[f.key],
|
|
2142
|
+
error: invalid[f.key],
|
|
2143
|
+
disabled: locked !== null,
|
|
2144
|
+
words,
|
|
2145
|
+
onChange: (v, error) => set(f.key, v, error),
|
|
2146
|
+
testID: `${testID}-${f.key}`
|
|
2147
|
+
}
|
|
2148
|
+
) }, f.key)) }),
|
|
2149
|
+
locked === null ? /* @__PURE__ */ jsx(NativeButton, { testID: `${testID}-save`, disabled: !dirty || saving, loading: saving, onPress: () => void save(), children: words.save }) : null
|
|
2150
|
+
] });
|
|
2151
|
+
}
|
|
2152
|
+
function parseSettingNumber(text2) {
|
|
2153
|
+
const t = text2.trim();
|
|
2154
|
+
const normalised = /^-?\d+,\d+$/.test(t) ? t.replace(",", ".") : t;
|
|
2155
|
+
const n = normalised === "" ? Number.NaN : Number(normalised);
|
|
2156
|
+
return Number.isFinite(n) ? n : null;
|
|
2157
|
+
}
|
|
2158
|
+
function SettingRow({
|
|
2159
|
+
field: f,
|
|
2160
|
+
nullable,
|
|
2161
|
+
value,
|
|
2162
|
+
error,
|
|
2163
|
+
disabled,
|
|
2164
|
+
words,
|
|
2165
|
+
onChange,
|
|
2166
|
+
testID
|
|
2167
|
+
}) {
|
|
2168
|
+
const empty = nullable ? null : "";
|
|
2169
|
+
const [typed, setTyped] = useState(() => value == null ? "" : String(value));
|
|
2170
|
+
if (f.kind === "switch") {
|
|
2171
|
+
return /* @__PURE__ */ jsx(
|
|
2172
|
+
NativeListItem,
|
|
2173
|
+
{
|
|
2174
|
+
testID,
|
|
2175
|
+
title: f.label,
|
|
2176
|
+
className: "bg-transparent",
|
|
2177
|
+
disabled,
|
|
2178
|
+
trailing: /* @__PURE__ */ jsx(NativeSwitch, { testID: `${testID}-input`, "aria-label": f.label, checked: value === true, disabled, onCheckedChange: (v) => onChange(v) })
|
|
2179
|
+
}
|
|
2180
|
+
);
|
|
2181
|
+
}
|
|
2182
|
+
const text2 = value == null ? "" : String(value);
|
|
2183
|
+
let control;
|
|
2184
|
+
if (f.kind === "segmented") {
|
|
2185
|
+
control = /* @__PURE__ */ jsx(NativeSegmentedControl, { testID: `${testID}-input`, options: f.options ?? [], value: text2, disabled, onChange: (v) => onChange(v) });
|
|
2186
|
+
} else if (f.kind === "select") {
|
|
2187
|
+
control = /* @__PURE__ */ jsxs(NativeSelect, { value: text2, onValueChange: (v) => onChange(v), children: [
|
|
2188
|
+
/* @__PURE__ */ jsx(NativeSelectTrigger, { testID: `${testID}-input`, placeholder: f.label, disabled }),
|
|
2189
|
+
/* @__PURE__ */ jsx(NativeSelectContent, { children: (f.options ?? []).map((o) => /* @__PURE__ */ jsx(NativeSelectItem, { value: o.value, children: o.label }, o.value)) })
|
|
2190
|
+
] });
|
|
2191
|
+
} else if (f.kind === "textarea") {
|
|
2192
|
+
control = /* @__PURE__ */ jsx(
|
|
2193
|
+
NativeTextarea,
|
|
2194
|
+
{
|
|
2195
|
+
testID: `${testID}-input`,
|
|
2196
|
+
accessibilityLabel: f.label,
|
|
2197
|
+
editable: !disabled,
|
|
2198
|
+
value: text2,
|
|
2199
|
+
maxLength: f.max,
|
|
2200
|
+
onChangeText: (t) => onChange(t === "" ? empty : t)
|
|
2201
|
+
}
|
|
2202
|
+
);
|
|
2203
|
+
} else if (f.kind === "number") {
|
|
2204
|
+
control = /* @__PURE__ */ jsx(
|
|
2205
|
+
NativeInput,
|
|
2206
|
+
{
|
|
2207
|
+
testID: `${testID}-input`,
|
|
2208
|
+
accessibilityLabel: f.label,
|
|
2209
|
+
editable: !disabled,
|
|
2210
|
+
value: typed,
|
|
2211
|
+
keyboardType: "decimal-pad",
|
|
2212
|
+
error,
|
|
2213
|
+
onChangeText: (t) => {
|
|
2214
|
+
setTyped(t);
|
|
2215
|
+
if (t.trim() === "") return onChange(empty);
|
|
2216
|
+
const n = parseSettingNumber(t);
|
|
2217
|
+
return n === null ? onChange(t, words.notANumber) : onChange(n);
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
);
|
|
2221
|
+
} else {
|
|
2222
|
+
control = /* @__PURE__ */ jsx(
|
|
2223
|
+
NativeInput,
|
|
2224
|
+
{
|
|
2225
|
+
testID: `${testID}-input`,
|
|
2226
|
+
accessibilityLabel: f.label,
|
|
2227
|
+
editable: !disabled,
|
|
2228
|
+
value: text2,
|
|
2229
|
+
maxLength: f.max,
|
|
2230
|
+
autoCapitalize: f.kind === "text" ? "sentences" : "none",
|
|
2231
|
+
keyboardType: f.kind === "email" ? "email-address" : f.kind === "url" ? "url" : "default",
|
|
2232
|
+
onChangeText: (t) => onChange(t === "" ? empty : t)
|
|
2233
|
+
}
|
|
2234
|
+
);
|
|
2235
|
+
}
|
|
2236
|
+
return /* @__PURE__ */ jsxs(View, { testID, style: { paddingHorizontal: 16, paddingVertical: 10, gap: 6, opacity: disabled ? 0.6 : 1 }, children: [
|
|
2237
|
+
/* @__PURE__ */ jsx(NativeText, { preset: "body-sm", className: "font-medium", children: f.label }),
|
|
2238
|
+
control
|
|
2239
|
+
] });
|
|
2240
|
+
}
|
|
2241
|
+
function Group({ title, children, testID }) {
|
|
2242
|
+
const colors = useThemeRoles();
|
|
2243
|
+
const ios = Platform.OS === "ios";
|
|
2244
|
+
return /* @__PURE__ */ jsxs(View, { testID, style: { gap: 6 }, children: [
|
|
2245
|
+
title ? /* @__PURE__ */ jsx(NativeText, { preset: "caption", accessibilityRole: "header", className: ios ? "uppercase text-muted-foreground px-4" : "text-primary px-4", children: title }) : null,
|
|
2246
|
+
/* @__PURE__ */ jsx(View, { style: { backgroundColor: colors.surface, borderRadius: ios ? 10 : 0, overflow: "hidden" }, children })
|
|
2247
|
+
] });
|
|
2248
|
+
}
|
|
2249
|
+
function Cell({ last, children }) {
|
|
2250
|
+
const colors = useThemeRoles();
|
|
2251
|
+
return /* @__PURE__ */ jsxs(View, { children: [
|
|
2252
|
+
children,
|
|
2253
|
+
!last ? /* @__PURE__ */ jsx(View, { style: { height: 0.5, marginLeft: 16, backgroundColor: colors.separator } }) : null
|
|
2254
|
+
] });
|
|
2255
|
+
}
|
|
1840
2256
|
|
|
1841
|
-
export { DEFAULT_MAX_PAGES, DisplayRenderersProvider, DisplayTimeZonesProvider, NativeDataFilters, NativeDataPageShell, NativeDetailPanel, NativeEmptyState2 as NativeEmptyState, NativeResourceForm, NativeResourceFormFieldRenderer, NativeResourceFormSheet, NativeResourcePage, NativeResourceView, NativeResourceViewMessagesProvider, SEARCH_DEBOUNCE_MS, allowed, dateToDay, dayToDate, defaultNativeResourceViewMessages, displayText, formFieldsFor, formatDay, formatInstant, nativeDisplayRenderers, openableUrl, resolveZone, rowItem, screenValues, sectionsFor, serverSort, swipeActionsFor, useDisplayCell, useDisplayTimeZones, useNativeResourceView, useNativeResourceViewMessages, validateValues, writableValues };
|
|
2257
|
+
export { DEFAULT_MAX_PAGES, DisplayRenderersProvider, DisplayTimeZonesProvider, NativeDataFilters, NativeDataPageShell, NativeDetailPanel, NativeEmptyState2 as NativeEmptyState, NativeResourceForm, NativeResourceFormFieldRenderer, NativeResourceFormSheet, NativeResourcePage, NativeResourceView, NativeResourceViewMessagesProvider, NativeResourceWorkspace, NativeResourceWorkspaceMenu, SEARCH_DEBOUNCE_MS, SEGMENTED_SECTIONS_MAX, allowed, dateToDay, dayToDate, defaultNativeResourceViewMessages, defaultNativeResourceWorkspaceMessages, displayText, formFieldsFor, formatDay, formatInstant, getNativeResourceWorkspaceStackOptions, nativeDisplayRenderers, openableUrl, parseSettingNumber, resolveZone, rowItem, screenValues, sectionsFor, serverSort, swipeActionsFor, useDisplayCell, useDisplayTimeZones, useNativeResourceView, useNativeResourceViewMessages, validateValues, writableValues };
|
|
1842
2258
|
//# sourceMappingURL=index.js.map
|
|
1843
2259
|
//# sourceMappingURL=index.js.map
|