@octane-xplat/ui 0.5.0 → 0.6.0
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/README.md +3 -0
- package/dist/native/Absolute.native.tsrx.js +43 -0
- package/dist/native/Accordion.native.tsrx.js +75 -0
- package/dist/native/ActivityIndicator.native.tsrx.js +35 -0
- package/dist/native/Alert.native.tsrx.js +74 -0
- package/dist/native/Avatar.native.tsrx.js +76 -0
- package/dist/native/AvatarGroup.native.tsrx.js +84 -0
- package/dist/native/Badge.native.tsrx.js +29 -0
- package/dist/native/Banner.native.tsrx.js +80 -0
- package/dist/native/Breadcrumb.native.tsrx.js +66 -0
- package/dist/native/Button.native.tsrx.js +62 -0
- package/dist/native/CameraView.native.tsrx.js +165 -0
- package/dist/native/Card.native.tsrx.js +64 -0
- package/dist/native/Checkbox.native.tsrx.js +58 -0
- package/dist/native/CheckboxGroup.native.tsrx.js +70 -0
- package/dist/native/Chip.native.tsrx.js +83 -0
- package/dist/native/Collapsible.native.tsrx.js +74 -0
- package/dist/native/CommandPalette.native.tsrx.js +143 -0
- package/dist/native/ContextMenu.native.tsrx.js +140 -0
- package/dist/native/Drawer.native.tsrx.js +60 -0
- package/dist/native/DropdownMenu.native.tsrx.js +155 -0
- package/dist/native/Empty.native.tsrx.js +82 -0
- package/dist/native/FieldGroup.native.tsrx.js +39 -0
- package/dist/native/FormField.native.tsrx.js +53 -0
- package/dist/native/{ui8.js → Grid.native.tsrx.js} +19 -8
- package/dist/native/{ui59.js → Heading.native.tsrx.js} +2 -2
- package/dist/native/{ui58.js → Icon.native.tsrx.js} +4 -4
- package/dist/native/{ui29.js → Image.native.tsrx.js} +4 -4
- package/dist/native/InputNumber.native.tsrx.js +146 -0
- package/dist/native/InputRating.native.tsrx.js +74 -0
- package/dist/native/InputTags.native.tsrx.js +131 -0
- package/dist/native/Kbd.native.tsrx.js +29 -0
- package/dist/native/{ui50.js → KeyboardAvoiding.native.tsrx.js} +1 -1
- package/dist/native/{ui17.js → Link.native.tsrx.js} +1 -1
- package/dist/native/{ui55.js → Meter.native.tsrx.js} +2 -2
- package/dist/native/{ui22.js → NavLink.native.tsrx.js} +3 -3
- package/dist/native/NavigationMenu.native.tsrx.js +67 -0
- package/dist/native/{ui35.js → Overlay.native.tsrx.js} +3 -3
- package/dist/native/Pager.native.tsrx.js +282 -0
- package/dist/native/Pagination.native.tsrx.js +107 -0
- package/dist/native/PinInput.native.tsrx.js +94 -0
- package/dist/native/{ui38.js → Popover.native.tsrx.js} +5 -5
- package/dist/native/{ui16.js → Pressable.native.tsrx.js} +20 -14
- package/dist/native/ProgressGroup.native.tsrx.js +66 -0
- package/dist/native/RadioGroup.native.tsrx.js +85 -0
- package/dist/native/{ui15.js → RichText.native.tsrx.js} +15 -22
- package/dist/native/Row.native.tsrx.js +98 -0
- package/dist/native/{ui49.js → SafeArea.native.tsrx.js} +2 -2
- package/dist/native/{ui45.js → Screen.native.tsrx.js} +3 -3
- package/dist/native/{ui26.js → ScrollBox.native.tsrx.js} +1 -1
- package/dist/native/ScrollView.native.tsrx.js +233 -0
- package/dist/native/SearchInput.native.tsrx.js +151 -0
- package/dist/native/SegmentedControl.native.tsrx.js +75 -0
- package/dist/native/Select.native.tsrx.js +202 -0
- package/dist/native/Separator.native.tsrx.js +25 -0
- package/dist/native/{ui63.js → Sheet.native.tsrx.js} +15 -7
- package/dist/native/Skeleton.native.tsrx.js +28 -0
- package/dist/native/Slider.native.tsrx.js +98 -0
- package/dist/native/{ui13.js → Spacer.native.tsrx.js} +2 -2
- package/dist/native/{ui9.js → Stack.native.tsrx.js} +20 -9
- package/dist/native/Stepper.native.tsrx.js +75 -0
- package/dist/native/Switch.native.tsrx.js +33 -0
- package/dist/native/Table.native.tsrx.js +103 -0
- package/dist/native/Tabs.native.tsrx.js +163 -0
- package/dist/native/{ui14.js → Text.native.tsrx.js} +4 -3
- package/dist/native/{ui24.js → TextArea.native.tsrx.js} +17 -16
- package/dist/native/{ui23.js → TextInput.native.tsrx.js} +21 -16
- package/dist/native/Timeline.native.tsrx.js +112 -0
- package/dist/native/Tree.native.tsrx.js +140 -0
- package/dist/native/User.native.tsrx.js +95 -0
- package/dist/native/Video.native.tsrx.js +248 -0
- package/dist/native/View.native.tsrx.js +98 -0
- package/dist/native/WebView.native.tsrx.js +110 -0
- package/dist/native/aliases.native.tsrx.js +38 -0
- package/dist/native/android/BottomNavigationView.android.tsrx.js +171 -0
- package/dist/native/android/CircularProgressIndicator.android.tsrx.js +27 -0
- package/dist/native/{ui51.js → android/DrawerLayout.android.tsrx.js} +5 -7
- package/dist/native/android/MaterialDialog.android.tsrx.js +62 -0
- package/dist/native/android/MaterialSwitch.android.tsrx.js +28 -0
- package/dist/native/android/RecyclerView.android.tsrx.js +248 -0
- package/dist/native/android/SeekBar.android.tsrx.js +34 -0
- package/dist/native/android/index.js +9 -0
- package/dist/native/android/openModal.android.js +39 -0
- package/dist/native/camera-permission.native.js +47 -0
- package/dist/native/child-array.js +15 -0
- package/dist/native/icons.js +25 -0
- package/dist/native/{ui11.js → ios/LiquidGlass.ios.tsrx.js} +4 -4
- package/dist/native/{ui12.js → ios/LiquidGlassContainer.ios.tsrx.js} +4 -4
- package/dist/native/ios/SideDrawer.ios.tsrx.js +64 -0
- package/dist/native/{ui53.js → ios/UIActivityIndicatorView.ios.tsrx.js} +5 -5
- package/dist/native/{ui32.js → ios/UIModal.ios.tsrx.js} +10 -6
- package/dist/native/{ui56.js → ios/UISlider.ios.tsrx.js} +5 -5
- package/dist/native/{ui47.js → ios/UISwitch.ios.tsrx.js} +5 -5
- package/dist/native/ios/UITabBar.ios.tsrx.js +166 -0
- package/dist/native/ios/UITableView.ios.tsrx.js +270 -0
- package/dist/native/ios/index.js +11 -0
- package/dist/native/{ui33.js → ios/openModal.ios.js} +5 -4
- package/dist/native/modal-presenter.native.js +19 -0
- package/dist/native/native/index.js +4 -0
- package/dist/native/octane-client-build.json +1 -1
- package/dist/native/{ui6.js → pan.native.tsrx.js} +9 -69
- package/dist/native/platform.native.js +10 -0
- package/dist/native/refresh-metrics.js +9 -0
- package/dist/native/refresh.native.js +177 -0
- package/dist/native/{ui34.js → root-layout.native.js} +6 -1
- package/dist/native/{ui21.js → route.native.js} +96 -12
- package/dist/native/sheet-detents.native.js +102 -0
- package/dist/native/{ui64.js → sheet-service.native.js} +19 -9
- package/dist/native/sheet-snap.js +35 -0
- package/dist/native/text-write.native.js +27 -0
- package/dist/native/{ui42.js → theme/status-bar-scheme.native.js} +2 -2
- package/dist/{web/ui29.js → native/theme/theme-scheme.js} +2 -2
- package/dist/native/{ui40.js → toast-anchor.native.tsrx.js} +3 -3
- package/dist/native/translate.native.js +11 -0
- package/dist/native/ui.js +93 -55
- package/dist/native/use-back.native.tsrx.js +9 -0
- package/dist/native/{ui52.js → useMeasure.native.tsrx.js} +1 -1
- package/dist/native/video-chrome.native.tsrx.js +365 -0
- package/dist/web/Absolute.web.tsrx.js +47 -0
- package/dist/web/Accordion.web.tsrx.js +85 -0
- package/dist/web/{ui48.js → ActivityIndicator.web.tsrx.js} +1 -1
- package/dist/web/Alert.web.tsrx.js +79 -0
- package/dist/web/Avatar.web.tsrx.js +106 -0
- package/dist/web/AvatarGroup.web.tsrx.js +108 -0
- package/dist/web/Badge.web.tsrx.js +37 -0
- package/dist/web/Banner.web.tsrx.js +79 -0
- package/dist/web/Breadcrumb.web.tsrx.js +135 -0
- package/dist/web/Button.web.tsrx.js +45 -0
- package/dist/web/CameraView.web.tsrx.js +310 -0
- package/dist/web/Card.web.tsrx.js +73 -0
- package/dist/web/Checkbox.web.tsrx.js +89 -0
- package/dist/web/CheckboxGroup.web.tsrx.js +79 -0
- package/dist/web/Chip.web.tsrx.js +64 -0
- package/dist/web/Collapsible.web.tsrx.js +94 -0
- package/dist/web/CommandPalette.web.tsrx.js +125 -0
- package/dist/web/ContextMenu.web.tsrx.js +154 -0
- package/dist/web/{ui45.js → Drawer.web.tsrx.js} +13 -9
- package/dist/web/DropdownMenu.web.tsrx.js +162 -0
- package/dist/web/Empty.web.tsrx.js +89 -0
- package/dist/web/FieldGroup.web.tsrx.js +57 -0
- package/dist/web/FormField.web.tsrx.js +92 -0
- package/dist/web/Grid.web.tsrx.js +65 -0
- package/dist/web/{ui54.js → Heading.web.tsrx.js} +2 -2
- package/dist/web/{ui53.js → Icon.web.tsrx.js} +2 -2
- package/dist/web/{ui25.js → Image.web.tsrx.js} +2 -2
- package/dist/web/InputNumber.web.tsrx.js +99 -0
- package/dist/web/InputRating.web.tsrx.js +72 -0
- package/dist/web/InputTags.web.tsrx.js +122 -0
- package/dist/web/Kbd.web.tsrx.js +37 -0
- package/dist/web/{ui50.js → Meter.web.tsrx.js} +1 -1
- package/dist/web/{ui19.js → NavLink.web.tsrx.js} +1 -1
- package/dist/web/NavigationMenu.web.tsrx.js +118 -0
- package/dist/web/{ui31.js → Overlay.web.tsrx.js} +2 -2
- package/dist/web/Pager.web.tsrx.js +337 -0
- package/dist/web/Pagination.web.tsrx.js +80 -0
- package/dist/web/PinInput.web.tsrx.js +72 -0
- package/dist/web/{ui33.js → Popover.web.tsrx.js} +3 -3
- package/dist/web/{ui15.js → Pressable.web.tsrx.js} +68 -95
- package/dist/web/ProgressGroup.web.tsrx.js +109 -0
- package/dist/web/RadioGroup.web.tsrx.js +69 -0
- package/dist/web/{ui14.js → RichText.web.tsrx.js} +2 -2
- package/dist/web/Row.web.tsrx.js +250 -0
- package/dist/web/{ui43.js → SafeArea.web.tsrx.js} +1 -1
- package/dist/web/{ui39.js → Screen.web.tsrx.js} +1 -1
- package/dist/web/{ui24.js → ScrollBox.web.tsrx.js} +1 -1
- package/dist/web/ScrollView.web.tsrx.js +388 -0
- package/dist/web/SearchInput.web.tsrx.js +137 -0
- package/dist/web/SegmentedControl.web.tsrx.js +75 -0
- package/dist/web/Select.web.tsrx.js +149 -0
- package/dist/web/Separator.web.tsrx.js +42 -0
- package/dist/web/Sheet.web.tsrx.js +81 -0
- package/dist/web/Skeleton.web.tsrx.js +56 -0
- package/dist/web/Slider.web.tsrx.js +97 -0
- package/dist/web/{ui12.js → Spacer.web.tsrx.js} +1 -1
- package/dist/web/Stack.web.tsrx.js +47 -0
- package/dist/web/Stepper.web.tsrx.js +65 -0
- package/dist/web/Switch.web.tsrx.js +59 -0
- package/dist/web/Table.web.tsrx.js +161 -0
- package/dist/web/{ui40.js → Tabs.web.tsrx.js} +33 -16
- package/dist/web/{ui13.js → Text.web.tsrx.js} +18 -50
- package/dist/web/{ui21.js → TextArea.web.tsrx.js} +4 -4
- package/dist/web/{ui20.js → TextInput.web.tsrx.js} +8 -8
- package/dist/web/Timeline.web.tsrx.js +172 -0
- package/dist/web/Tree.web.tsrx.js +146 -0
- package/dist/web/User.web.tsrx.js +116 -0
- package/dist/web/Video.web.tsrx.js +400 -0
- package/dist/web/View.web.tsrx.js +250 -0
- package/dist/web/WebView.web.tsrx.js +235 -0
- package/dist/web/aliases.web.tsrx.js +24 -0
- package/dist/web/{ui36.js → anim.web.tsrx.js} +3 -35
- package/dist/web/child-array.js +15 -0
- package/dist/web/icons.js +25 -0
- package/dist/web/octane-client-build.json +1 -1
- package/dist/web/pan.web.tsrx.js +66 -0
- package/dist/web/platform.web.js +9 -0
- package/dist/web/refresh-metrics.js +9 -0
- package/dist/web/refresh.web.js +133 -0
- package/dist/web/{ui18.js → route.web.js} +14 -2
- package/dist/web/sheet-detents.web.js +103 -0
- package/dist/web/{ui60.js → sheet-service.web.js} +5 -1
- package/dist/web/sheet-snap.js +35 -0
- package/dist/{native/ui31.js → web/theme/theme-scheme.js} +2 -2
- package/dist/web/{ui35.js → toast-anchor.web.tsrx.js} +3 -3
- package/dist/web/transform.web.js +43 -0
- package/dist/web/translate.web.js +13 -0
- package/dist/web/ui.js +91 -53
- package/dist/web/use-back.web.tsrx.js +9 -0
- package/dist/web/video-chrome.web.tsrx.js +207 -0
- package/dist/web/{ui34.js → web/Hoverable.web.tsrx.js} +6 -6
- package/dist/web/web/Tooltip.web.tsrx.js +183 -0
- package/dist/web/web/index.js +3 -0
- package/package.json +30 -3
- package/src/theme/tokens.css +1380 -200
- package/types/android.d.ts +53 -0
- package/types/index.d.ts +32 -17
- package/types/index.native.d.ts +273 -0
- package/types/index.web.d.ts +272 -0
- package/types/ios.d.ts +59 -0
- package/types/native.d.ts +5 -0
- package/types/props.d.ts +930 -40
- package/types/web.d.ts +17 -0
- package/dist/native/ui10.js +0 -32
- package/dist/native/ui25.js +0 -141
- package/dist/native/ui27.js +0 -61
- package/dist/native/ui39.js +0 -103
- package/dist/native/ui4.js +0 -24
- package/dist/native/ui46.js +0 -267
- package/dist/native/ui57.js +0 -19
- package/dist/native/ui60.js +0 -14
- package/dist/native/ui7.js +0 -52
- package/dist/web/ui10.js +0 -46
- package/dist/web/ui11.js +0 -42
- package/dist/web/ui22.js +0 -108
- package/dist/web/ui23.js +0 -96
- package/dist/web/ui26.js +0 -45
- package/dist/web/ui3.js +0 -31
- package/dist/web/ui30.js +0 -34
- package/dist/web/ui41.js +0 -43
- package/dist/web/ui44.js +0 -42
- package/dist/web/ui5.js +0 -168
- package/dist/web/ui51.js +0 -47
- package/dist/web/ui52.js +0 -19
- package/dist/web/ui55.js +0 -17
- package/dist/web/ui59.js +0 -44
- package/dist/web/ui6.js +0 -94
- package/dist/web/ui7.js +0 -62
- package/dist/web/ui8.js +0 -46
- package/dist/web/ui9.js +0 -46
- /package/dist/native/{ui20.js → RouteHost.native.tsrx.js} +0 -0
- /package/dist/native/{ui41.js → anim.native.tsrx.js} +0 -0
- /package/dist/native/{ui2.js → cx.js} +0 -0
- /package/dist/native/{ui3.js → escape-props.native.js} +0 -0
- /package/dist/native/{ui5.js → layout-child.native.js} +0 -0
- /package/dist/native/{ui54.js → meter-math.js} +0 -0
- /package/dist/native/{ui36.js → platformProps.native.js} +0 -0
- /package/dist/native/{ui37.js → popover-position.js} +0 -0
- /package/dist/native/{ui19.js → route-table.js} +0 -0
- /package/dist/native/{ui48.js → safeAreaInsets.native.tsrx.js} +0 -0
- /package/dist/native/{ui18.js → stacks.native.js} +0 -0
- /package/dist/native/{ui61.js → store.js} +0 -0
- /package/dist/native/{ui43.js → styled.native.tsrx.js} +0 -0
- /package/dist/native/{ui28.js → svg.native.js} +0 -0
- /package/dist/native/{ui30.js → theme/colorScheme.native.js} +0 -0
- /package/dist/native/{ui62.js → use-store.native.tsrx.js} +0 -0
- /package/dist/native/{ui44.js → windows.native.js} +0 -0
- /package/dist/web/{ui16.js → Link.web.tsrx.js} +0 -0
- /package/dist/web/{ui28.js → cx.js} +0 -0
- /package/dist/web/{ui2.js → escape-props.web.js} +0 -0
- /package/dist/web/{ui4.js → layout-child.web.js} +0 -0
- /package/dist/web/{ui49.js → meter-math.js} +0 -0
- /package/dist/web/{ui47.js → platformProps.web.js} +0 -0
- /package/dist/web/{ui32.js → popover-position.js} +0 -0
- /package/dist/web/{ui17.js → route-table.js} +0 -0
- /package/dist/web/{ui42.js → safeAreaInsets.web.tsrx.js} +0 -0
- /package/dist/web/{ui56.js → stacks.web.js} +0 -0
- /package/dist/web/{ui57.js → store.js} +0 -0
- /package/dist/web/{ui37.js → styled.web.tsrx.js} +0 -0
- /package/dist/web/{ui27.js → theme/colorScheme.web.js} +0 -0
- /package/dist/web/{ui58.js → use-store.web.tsrx.js} +0 -0
- /package/dist/web/{ui46.js → useMeasure.web.tsrx.js} +0 -0
- /package/dist/web/{ui38.js → windows.web.js} +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { defineUniversalComponent, universalFor, universalPlan, universalValue } from "@nativescript-community/octane";
|
|
4
|
+
//#region src/Table.native.tsrx
|
|
5
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
6
|
+
"kind": "host",
|
|
7
|
+
"type": "flexboxlayout",
|
|
8
|
+
"props": { "className": "vx-table-cell vx-table-th" },
|
|
9
|
+
"bindings": [["style", 0]],
|
|
10
|
+
"children": [{
|
|
11
|
+
"kind": "host",
|
|
12
|
+
"type": "label",
|
|
13
|
+
"bindings": [["text", 1]]
|
|
14
|
+
}]
|
|
15
|
+
});
|
|
16
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
17
|
+
"kind": "host",
|
|
18
|
+
"type": "flexboxlayout",
|
|
19
|
+
"props": { "className": "vx-table-empty" },
|
|
20
|
+
"children": [{
|
|
21
|
+
"kind": "slot",
|
|
22
|
+
"slot": 0
|
|
23
|
+
}]
|
|
24
|
+
});
|
|
25
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
26
|
+
"kind": "host",
|
|
27
|
+
"type": "label",
|
|
28
|
+
"bindings": [["text", 0]]
|
|
29
|
+
});
|
|
30
|
+
var __octaneUniversalPlan3 = universalPlan("nativescript", {
|
|
31
|
+
"kind": "host",
|
|
32
|
+
"type": "flexboxlayout",
|
|
33
|
+
"props": { "className": "vx-table-cell" },
|
|
34
|
+
"bindings": [["style", 0]],
|
|
35
|
+
"children": [{
|
|
36
|
+
"kind": "slot",
|
|
37
|
+
"slot": 1
|
|
38
|
+
}]
|
|
39
|
+
});
|
|
40
|
+
var __octaneUniversalPlan4 = universalPlan("nativescript", {
|
|
41
|
+
"kind": "host",
|
|
42
|
+
"type": "flexboxlayout",
|
|
43
|
+
"bindings": [["className", 0], ["onTap", 1]],
|
|
44
|
+
"children": [{
|
|
45
|
+
"kind": "slot",
|
|
46
|
+
"slot": 2
|
|
47
|
+
}]
|
|
48
|
+
});
|
|
49
|
+
var __octaneUniversalPlan5 = universalPlan("nativescript", {
|
|
50
|
+
"kind": "slot",
|
|
51
|
+
"slot": 0
|
|
52
|
+
});
|
|
53
|
+
var __octaneUniversalPlan6 = universalPlan("nativescript", {
|
|
54
|
+
"kind": "host",
|
|
55
|
+
"type": "flexboxlayout",
|
|
56
|
+
"bindings": [
|
|
57
|
+
["ref", 0],
|
|
58
|
+
["id", 1],
|
|
59
|
+
["className", 2],
|
|
60
|
+
["style", 3]
|
|
61
|
+
],
|
|
62
|
+
"children": [{
|
|
63
|
+
"kind": "host",
|
|
64
|
+
"type": "flexboxlayout",
|
|
65
|
+
"props": { "className": "vx-table-head" },
|
|
66
|
+
"children": [{
|
|
67
|
+
"kind": "slot",
|
|
68
|
+
"slot": 4
|
|
69
|
+
}]
|
|
70
|
+
}, {
|
|
71
|
+
"kind": "slot",
|
|
72
|
+
"slot": 5
|
|
73
|
+
}]
|
|
74
|
+
});
|
|
75
|
+
var Table = defineUniversalComponent("nativescript", function Table(props) {
|
|
76
|
+
const cellStyle = (col) => ({
|
|
77
|
+
...col.width != null ? { width: col.width } : { flexGrow: 1 },
|
|
78
|
+
...col.align ? { textAlignment: col.align } : {}
|
|
79
|
+
});
|
|
80
|
+
return universalValue(__octaneUniversalPlan6, [
|
|
81
|
+
(v) => applyEscapeProps(v, props),
|
|
82
|
+
props.id,
|
|
83
|
+
cx("vx-table", props.className),
|
|
84
|
+
props.style,
|
|
85
|
+
universalFor(props.columns, (col, __octaneUniversalIndex) => col.key, (col, __octaneUniversalIndex) => {
|
|
86
|
+
return universalValue(__octaneUniversalPlan0, [cellStyle(col), col.label ?? col.key]);
|
|
87
|
+
}),
|
|
88
|
+
props.rows.length === 0 && props.empty != null ? universalValue(__octaneUniversalPlan1, [props.empty]) : universalValue(__octaneUniversalPlan5, [universalFor(props.rows.map((row, ri) => ({
|
|
89
|
+
row,
|
|
90
|
+
ri
|
|
91
|
+
})), (e, __octaneUniversalIndex$) => props.keyFor ? props.keyFor(e.row, e.ri) : String(e.ri), (e, __octaneUniversalIndex$) => {
|
|
92
|
+
return universalValue(__octaneUniversalPlan4, [
|
|
93
|
+
cx("vx-table-row", props.onRowPress && "vx-table-row--pressable"),
|
|
94
|
+
props.onRowPress ? () => props.onRowPress(e.row, e.ri) : void 0,
|
|
95
|
+
universalFor(props.columns, (col, __octaneUniversalIndex$$) => col.key, (col, __octaneUniversalIndex$$) => {
|
|
96
|
+
return universalValue(__octaneUniversalPlan3, [cellStyle(col), props.renderCell ? props.renderCell(e.row, col, e.ri) : universalValue(__octaneUniversalPlan2, [String(e.row[col.key] ?? "")])]);
|
|
97
|
+
})
|
|
98
|
+
]);
|
|
99
|
+
})])
|
|
100
|
+
]);
|
|
101
|
+
}, { "module": "@nativescript-community/octane" });
|
|
102
|
+
//#endregion
|
|
103
|
+
export { Table };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { Text } from "./Text.native.tsrx.js";
|
|
3
|
+
import { Pressable } from "./Pressable.native.tsrx.js";
|
|
4
|
+
import { Icon } from "./Icon.native.tsrx.js";
|
|
5
|
+
import { RouteHost } from "./RouteHost.native.tsrx.js";
|
|
6
|
+
import { layoutsForRoute, screenFor, useRoute } from "./route.native.js";
|
|
7
|
+
import { defineUniversalComponent, hookSlots, universalChildren, universalComponent, universalFor, universalIf, universalPlan, universalProps, universalValue, useState, withSlot } from "@nativescript-community/octane";
|
|
8
|
+
//#region src/Tabs.native.tsrx
|
|
9
|
+
var _hs$ = /* @__PURE__ */ hookSlots(2);
|
|
10
|
+
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
11
|
+
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
|
12
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
13
|
+
"kind": "slot",
|
|
14
|
+
"slot": 0
|
|
15
|
+
});
|
|
16
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
17
|
+
"kind": "range",
|
|
18
|
+
"children": [{
|
|
19
|
+
"kind": "slot",
|
|
20
|
+
"slot": 0
|
|
21
|
+
}, {
|
|
22
|
+
"kind": "slot",
|
|
23
|
+
"slot": 1
|
|
24
|
+
}]
|
|
25
|
+
});
|
|
26
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
27
|
+
"kind": "slot",
|
|
28
|
+
"slot": 0
|
|
29
|
+
});
|
|
30
|
+
var __octaneUniversalPlan3 = universalPlan("nativescript", {
|
|
31
|
+
"kind": "slot",
|
|
32
|
+
"slot": 0
|
|
33
|
+
});
|
|
34
|
+
var __octaneUniversalPlan4 = universalPlan("nativescript", {
|
|
35
|
+
"kind": "range",
|
|
36
|
+
"children": [{
|
|
37
|
+
"kind": "slot",
|
|
38
|
+
"slot": 0
|
|
39
|
+
}]
|
|
40
|
+
});
|
|
41
|
+
var __octaneUniversalPlan5 = universalPlan("nativescript", {
|
|
42
|
+
"kind": "host",
|
|
43
|
+
"type": "gridlayout",
|
|
44
|
+
"props": { "rows": "auto,*" },
|
|
45
|
+
"bindings": [
|
|
46
|
+
["id", 0],
|
|
47
|
+
["className", 1],
|
|
48
|
+
["style", 2]
|
|
49
|
+
],
|
|
50
|
+
"children": [{
|
|
51
|
+
"kind": "host",
|
|
52
|
+
"type": "gridlayout",
|
|
53
|
+
"props": {
|
|
54
|
+
"row": 0,
|
|
55
|
+
"className": "vx-tabbar"
|
|
56
|
+
},
|
|
57
|
+
"bindings": [["columns", 3]],
|
|
58
|
+
"children": [{
|
|
59
|
+
"kind": "slot",
|
|
60
|
+
"slot": 4
|
|
61
|
+
}]
|
|
62
|
+
}, {
|
|
63
|
+
"kind": "host",
|
|
64
|
+
"type": "gridlayout",
|
|
65
|
+
"props": { "row": 1 },
|
|
66
|
+
"bindings": [["className", 5]],
|
|
67
|
+
"children": [{
|
|
68
|
+
"kind": "slot",
|
|
69
|
+
"slot": 6
|
|
70
|
+
}]
|
|
71
|
+
}]
|
|
72
|
+
});
|
|
73
|
+
function screenParams(route) {
|
|
74
|
+
const params = {
|
|
75
|
+
...route.params,
|
|
76
|
+
...route.context ?? {},
|
|
77
|
+
_stack: route.stack,
|
|
78
|
+
_pushed: true
|
|
79
|
+
};
|
|
80
|
+
if (Object.prototype.hasOwnProperty.call(route, "loaderData")) params.data = route.loaderData;
|
|
81
|
+
if (Object.prototype.hasOwnProperty.call(route, "loaderError")) params.error = route.loaderError;
|
|
82
|
+
return params;
|
|
83
|
+
}
|
|
84
|
+
var Tabs = defineUniversalComponent("nativescript", function Tabs(props) {
|
|
85
|
+
const [internal, setInternal] = useState(0, _h$0);
|
|
86
|
+
const active = props.selectedIndex ?? internal;
|
|
87
|
+
const tab = props.tabs[active];
|
|
88
|
+
const route = withSlot(_h$1, useRoute, tab?.stack ?? "");
|
|
89
|
+
const Screen = route ? screenFor(route.name) : void 0;
|
|
90
|
+
const columns = props.tabs.map(() => "*").join(",");
|
|
91
|
+
return universalValue(__octaneUniversalPlan5, [
|
|
92
|
+
props.id,
|
|
93
|
+
cx(props.className),
|
|
94
|
+
props.style,
|
|
95
|
+
columns,
|
|
96
|
+
universalFor(props.tabs, (t, i) => t.title, (t, i) => {
|
|
97
|
+
return universalValue(__octaneUniversalPlan2, [universalComponent("nativescript", Pressable, universalProps([
|
|
98
|
+
[
|
|
99
|
+
"set",
|
|
100
|
+
"col",
|
|
101
|
+
i
|
|
102
|
+
],
|
|
103
|
+
[
|
|
104
|
+
"set",
|
|
105
|
+
"className",
|
|
106
|
+
cx("vx-tab", active === i ? "active" : "")
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
"set",
|
|
110
|
+
"onPress",
|
|
111
|
+
() => {
|
|
112
|
+
setInternal(i);
|
|
113
|
+
props.onSelectedIndexChanged?.(i);
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
], universalChildren("nativescript", () => {
|
|
117
|
+
return universalValue(__octaneUniversalPlan1, [universalIf(t.icon, () => {
|
|
118
|
+
return universalValue(__octaneUniversalPlan0, [universalComponent("nativescript", Icon, universalProps([
|
|
119
|
+
[
|
|
120
|
+
"set",
|
|
121
|
+
"name",
|
|
122
|
+
t.icon
|
|
123
|
+
],
|
|
124
|
+
[
|
|
125
|
+
"set",
|
|
126
|
+
"className",
|
|
127
|
+
"vx-tabicon"
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
"set",
|
|
131
|
+
"size",
|
|
132
|
+
18
|
|
133
|
+
]
|
|
134
|
+
]))]);
|
|
135
|
+
}), universalComponent("nativescript", Text, universalProps([], t.title))]);
|
|
136
|
+
})))]);
|
|
137
|
+
}),
|
|
138
|
+
cx("vx-tabpane", route?.presentation === "fade" ? "vx-route--fade" : ""),
|
|
139
|
+
universalIf(route && Screen, () => {
|
|
140
|
+
return universalValue(__octaneUniversalPlan3, [universalComponent("nativescript", RouteHost, universalProps([
|
|
141
|
+
[
|
|
142
|
+
"set",
|
|
143
|
+
"screen",
|
|
144
|
+
Screen
|
|
145
|
+
],
|
|
146
|
+
[
|
|
147
|
+
"set",
|
|
148
|
+
"layouts",
|
|
149
|
+
layoutsForRoute(route.name)
|
|
150
|
+
],
|
|
151
|
+
[
|
|
152
|
+
"set",
|
|
153
|
+
"params",
|
|
154
|
+
screenParams(route)
|
|
155
|
+
]
|
|
156
|
+
]))]);
|
|
157
|
+
}, () => {
|
|
158
|
+
return universalValue(__octaneUniversalPlan4, [tab?.render()]);
|
|
159
|
+
})
|
|
160
|
+
]);
|
|
161
|
+
}, { "module": "@nativescript-community/octane" });
|
|
162
|
+
//#endregion
|
|
163
|
+
export { Tabs };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cx } from "./
|
|
2
|
-
import { applyEscapeProps, nativeAccessibilityRole, nativeAccessibilityState } from "./
|
|
3
|
-
import { layoutChildProps } from "./
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps, nativeAccessibilityRole, nativeAccessibilityState } from "./escape-props.native.js";
|
|
3
|
+
import { layoutChildProps } from "./layout-child.native.js";
|
|
4
4
|
import { createContext, defineUniversalComponent, universalComponent, universalIf, universalPlan, universalProps, universalValue, useContext } from "@nativescript-community/octane";
|
|
5
5
|
//#region src/Text.native.tsrx
|
|
6
6
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
@@ -36,6 +36,7 @@ var Text = defineUniversalComponent("nativescript", function Text(props) {
|
|
|
36
36
|
const inText = useContext(InText);
|
|
37
37
|
const textStyle = {
|
|
38
38
|
...props.style,
|
|
39
|
+
...props.ellipsize || props.numberOfLines ? { flexShrink: 1 } : {},
|
|
39
40
|
...props.ellipsize ? {
|
|
40
41
|
whiteSpace: "nowrap",
|
|
41
42
|
textOverflow: "ellipsis"
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { cx } from "./
|
|
2
|
-
import { applyEscapeProps } from "./
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { writeText } from "./text-write.native.js";
|
|
3
4
|
import { defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
|
|
4
5
|
import { Utils } from "@nativescript/core";
|
|
5
6
|
//#region src/TextArea.native.tsrx
|
|
6
|
-
var _hs$ = /* @__PURE__ */ hookSlots(
|
|
7
|
+
var _hs$ = /* @__PURE__ */ hookSlots(3);
|
|
7
8
|
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
8
9
|
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
|
10
|
+
var _h$2 = /* @__PURE__ */ Symbol(_hs$ + 2);
|
|
9
11
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
10
12
|
"kind": "host",
|
|
11
13
|
"type": "textview",
|
|
@@ -14,16 +16,15 @@ var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
|
14
16
|
["ref", 1],
|
|
15
17
|
["className", 2],
|
|
16
18
|
["style", 3],
|
|
17
|
-
["
|
|
18
|
-
["
|
|
19
|
-
["
|
|
20
|
-
["
|
|
21
|
-
["
|
|
22
|
-
["
|
|
23
|
-
["
|
|
24
|
-
["
|
|
25
|
-
["
|
|
26
|
-
["onBlur", 13]
|
|
19
|
+
["hint", 4],
|
|
20
|
+
["keyboardType", 5],
|
|
21
|
+
["returnKeyType", 6],
|
|
22
|
+
["editable", 7],
|
|
23
|
+
["onLoaded", 8],
|
|
24
|
+
["onTextChange", 9],
|
|
25
|
+
["onReturnPress", 10],
|
|
26
|
+
["onFocus", 11],
|
|
27
|
+
["onBlur", 12]
|
|
27
28
|
]
|
|
28
29
|
});
|
|
29
30
|
var TextArea = defineUniversalComponent("nativescript", function TextArea(props) {
|
|
@@ -51,6 +52,7 @@ var TextArea = defineUniversalComponent("nativescript", function TextArea(props)
|
|
|
51
52
|
props.maxRows,
|
|
52
53
|
props.style
|
|
53
54
|
], _h$1);
|
|
55
|
+
useEffect(() => writeText(el.current, props.value), [props.value], _h$2);
|
|
54
56
|
return universalValue(__octaneUniversalPlan0, [
|
|
55
57
|
props.id,
|
|
56
58
|
(v) => {
|
|
@@ -63,13 +65,12 @@ var TextArea = defineUniversalComponent("nativescript", function TextArea(props)
|
|
|
63
65
|
native: v
|
|
64
66
|
});
|
|
65
67
|
},
|
|
66
|
-
cx(props.className),
|
|
68
|
+
cx("vx-textarea", props.className),
|
|
67
69
|
{
|
|
68
70
|
...props.style,
|
|
69
71
|
...props.placeholderTextColor ? { placeholderColor: props.placeholderTextColor } : {}
|
|
70
72
|
},
|
|
71
|
-
props.
|
|
72
|
-
props.placeholder ?? props.hint,
|
|
73
|
+
props.placeholder,
|
|
73
74
|
props.keyboardType === "default" ? void 0 : props.keyboardType,
|
|
74
75
|
props.returnKeyType,
|
|
75
76
|
props.editable ?? true,
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { cx } from "./
|
|
2
|
-
import { applyEscapeProps } from "./
|
|
3
|
-
import {
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { writeText } from "./text-write.native.js";
|
|
4
|
+
import { defineUniversalComponent, hookSlots, universalPlan, universalValue, useEffect, useRef } from "@nativescript-community/octane";
|
|
4
5
|
//#region src/TextInput.native.tsrx
|
|
6
|
+
var _hs$ = /* @__PURE__ */ hookSlots(2);
|
|
7
|
+
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
8
|
+
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
|
5
9
|
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
6
10
|
"kind": "host",
|
|
7
11
|
"type": "textfield",
|
|
@@ -10,21 +14,23 @@ var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
|
10
14
|
["id", 1],
|
|
11
15
|
["className", 2],
|
|
12
16
|
["style", 3],
|
|
13
|
-
["
|
|
14
|
-
["
|
|
15
|
-
["
|
|
16
|
-
["
|
|
17
|
-
["
|
|
18
|
-
["
|
|
19
|
-
["
|
|
20
|
-
["
|
|
21
|
-
["
|
|
22
|
-
["onBlur", 13]
|
|
17
|
+
["hint", 4],
|
|
18
|
+
["secure", 5],
|
|
19
|
+
["keyboardType", 6],
|
|
20
|
+
["returnKeyType", 7],
|
|
21
|
+
["editable", 8],
|
|
22
|
+
["onTextChange", 9],
|
|
23
|
+
["onReturnPress", 10],
|
|
24
|
+
["onFocus", 11],
|
|
25
|
+
["onBlur", 12]
|
|
23
26
|
]
|
|
24
27
|
});
|
|
25
28
|
var TextInput = defineUniversalComponent("nativescript", function TextInput(props) {
|
|
29
|
+
const el = useRef(null, _h$0);
|
|
30
|
+
useEffect(() => writeText(el.current, props.value), [props.value], _h$1);
|
|
26
31
|
return universalValue(__octaneUniversalPlan0, [
|
|
27
32
|
(v) => {
|
|
33
|
+
el.current = v;
|
|
28
34
|
if (!v) return;
|
|
29
35
|
applyEscapeProps(v, props);
|
|
30
36
|
props.bind?.({
|
|
@@ -34,13 +40,12 @@ var TextInput = defineUniversalComponent("nativescript", function TextInput(prop
|
|
|
34
40
|
});
|
|
35
41
|
},
|
|
36
42
|
props.id,
|
|
37
|
-
cx(props.className),
|
|
43
|
+
cx("vx-input", props.className),
|
|
38
44
|
{
|
|
39
45
|
...props.style,
|
|
40
46
|
...props.placeholderTextColor ? { placeholderColor: props.placeholderTextColor } : {}
|
|
41
47
|
},
|
|
42
|
-
props.
|
|
43
|
-
props.placeholder ?? props.hint,
|
|
48
|
+
props.placeholder,
|
|
44
49
|
props.secure,
|
|
45
50
|
props.keyboardType === "default" ? void 0 : props.keyboardType,
|
|
46
51
|
props.returnKeyType,
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { Icon } from "./Icon.native.tsrx.js";
|
|
4
|
+
import { defineUniversalComponent, universalComponent, universalFor, universalPlan, universalProps, universalValue } from "@nativescript-community/octane";
|
|
5
|
+
//#region src/Timeline.native.tsrx
|
|
6
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
7
|
+
"kind": "slot",
|
|
8
|
+
"slot": 0
|
|
9
|
+
});
|
|
10
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
11
|
+
"kind": "host",
|
|
12
|
+
"type": "flexboxlayout",
|
|
13
|
+
"props": { "className": "vx-timeline-line" }
|
|
14
|
+
});
|
|
15
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
16
|
+
"kind": "host",
|
|
17
|
+
"type": "label",
|
|
18
|
+
"props": { "className": "vx-timeline-time" },
|
|
19
|
+
"bindings": [["text", 0]]
|
|
20
|
+
});
|
|
21
|
+
var __octaneUniversalPlan3 = universalPlan("nativescript", {
|
|
22
|
+
"kind": "host",
|
|
23
|
+
"type": "label",
|
|
24
|
+
"props": { "className": "vx-timeline-title" },
|
|
25
|
+
"bindings": [["text", 0]]
|
|
26
|
+
});
|
|
27
|
+
var __octaneUniversalPlan4 = universalPlan("nativescript", {
|
|
28
|
+
"kind": "host",
|
|
29
|
+
"type": "label",
|
|
30
|
+
"props": { "className": "vx-timeline-desc" },
|
|
31
|
+
"bindings": [["text", 0]]
|
|
32
|
+
});
|
|
33
|
+
var __octaneUniversalPlan5 = universalPlan("nativescript", {
|
|
34
|
+
"kind": "host",
|
|
35
|
+
"type": "flexboxlayout",
|
|
36
|
+
"props": { "className": "vx-timeline-item" },
|
|
37
|
+
"children": [{
|
|
38
|
+
"kind": "host",
|
|
39
|
+
"type": "flexboxlayout",
|
|
40
|
+
"props": { "className": "vx-timeline-rail" },
|
|
41
|
+
"children": [{
|
|
42
|
+
"kind": "host",
|
|
43
|
+
"type": "flexboxlayout",
|
|
44
|
+
"props": { "className": "vx-timeline-dot" },
|
|
45
|
+
"children": [{
|
|
46
|
+
"kind": "slot",
|
|
47
|
+
"slot": 0
|
|
48
|
+
}]
|
|
49
|
+
}, {
|
|
50
|
+
"kind": "slot",
|
|
51
|
+
"slot": 1
|
|
52
|
+
}]
|
|
53
|
+
}, {
|
|
54
|
+
"kind": "host",
|
|
55
|
+
"type": "flexboxlayout",
|
|
56
|
+
"props": { "className": "vx-timeline-body" },
|
|
57
|
+
"children": [
|
|
58
|
+
{
|
|
59
|
+
"kind": "slot",
|
|
60
|
+
"slot": 2
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"kind": "slot",
|
|
64
|
+
"slot": 3
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"kind": "slot",
|
|
68
|
+
"slot": 4
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}]
|
|
72
|
+
});
|
|
73
|
+
var __octaneUniversalPlan6 = universalPlan("nativescript", {
|
|
74
|
+
"kind": "host",
|
|
75
|
+
"type": "flexboxlayout",
|
|
76
|
+
"bindings": [
|
|
77
|
+
["ref", 0],
|
|
78
|
+
["id", 1],
|
|
79
|
+
["className", 2],
|
|
80
|
+
["style", 3]
|
|
81
|
+
],
|
|
82
|
+
"children": [{
|
|
83
|
+
"kind": "slot",
|
|
84
|
+
"slot": 4
|
|
85
|
+
}]
|
|
86
|
+
});
|
|
87
|
+
var Timeline = defineUniversalComponent("nativescript", function Timeline(props) {
|
|
88
|
+
return universalValue(__octaneUniversalPlan6, [
|
|
89
|
+
(v) => applyEscapeProps(v, props),
|
|
90
|
+
props.id,
|
|
91
|
+
cx("vx-timeline", props.className),
|
|
92
|
+
props.style,
|
|
93
|
+
universalFor(props.items.map((item, i) => ({
|
|
94
|
+
item,
|
|
95
|
+
i
|
|
96
|
+
})), (e, __octaneUniversalIndex) => e.item.key, (e, __octaneUniversalIndex) => {
|
|
97
|
+
return universalValue(__octaneUniversalPlan5, [
|
|
98
|
+
e.item.icon ? universalValue(__octaneUniversalPlan0, [universalComponent("nativescript", Icon, universalProps([[
|
|
99
|
+
"set",
|
|
100
|
+
"name",
|
|
101
|
+
e.item.icon
|
|
102
|
+
]]))]) : null,
|
|
103
|
+
e.i < props.items.length - 1 ? universalValue(__octaneUniversalPlan1, []) : null,
|
|
104
|
+
e.item.time != null ? universalValue(__octaneUniversalPlan2, [e.item.time]) : null,
|
|
105
|
+
e.item.title != null ? universalValue(__octaneUniversalPlan3, [e.item.title]) : null,
|
|
106
|
+
e.item.description != null ? universalValue(__octaneUniversalPlan4, [e.item.description]) : null
|
|
107
|
+
]);
|
|
108
|
+
})
|
|
109
|
+
]);
|
|
110
|
+
}, { "module": "@nativescript-community/octane" });
|
|
111
|
+
//#endregion
|
|
112
|
+
export { Timeline };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { cx } from "./cx.js";
|
|
2
|
+
import { applyEscapeProps } from "./escape-props.native.js";
|
|
3
|
+
import { defineUniversalComponent, hookSlots, universalComponent, universalPlan, universalProps, universalValue, useState } from "@nativescript-community/octane";
|
|
4
|
+
//#region src/Tree.native.tsrx
|
|
5
|
+
var _h$0 = /* @__PURE__ */ Symbol(/* @__PURE__ */ hookSlots(1));
|
|
6
|
+
var __octaneUniversalPlan0 = universalPlan("nativescript", {
|
|
7
|
+
"kind": "slot",
|
|
8
|
+
"slot": 0
|
|
9
|
+
});
|
|
10
|
+
var __octaneUniversalPlan1 = universalPlan("nativescript", {
|
|
11
|
+
"kind": "host",
|
|
12
|
+
"type": "flexboxlayout",
|
|
13
|
+
"props": { "className": "vx-tree-node" },
|
|
14
|
+
"children": [{
|
|
15
|
+
"kind": "host",
|
|
16
|
+
"type": "flexboxlayout",
|
|
17
|
+
"bindings": [
|
|
18
|
+
["className", 0],
|
|
19
|
+
["style", 1],
|
|
20
|
+
["onTap", 2]
|
|
21
|
+
],
|
|
22
|
+
"children": [{
|
|
23
|
+
"kind": "host",
|
|
24
|
+
"type": "label",
|
|
25
|
+
"props": { "className": "vx-tree-caret" },
|
|
26
|
+
"bindings": [["text", 3]]
|
|
27
|
+
}, {
|
|
28
|
+
"kind": "host",
|
|
29
|
+
"type": "label",
|
|
30
|
+
"props": { "className": "vx-tree-label" },
|
|
31
|
+
"bindings": [["text", 4]]
|
|
32
|
+
}]
|
|
33
|
+
}, {
|
|
34
|
+
"kind": "slot",
|
|
35
|
+
"slot": 5
|
|
36
|
+
}]
|
|
37
|
+
});
|
|
38
|
+
var __octaneUniversalPlan2 = universalPlan("nativescript", {
|
|
39
|
+
"kind": "slot",
|
|
40
|
+
"slot": 0
|
|
41
|
+
});
|
|
42
|
+
var __octaneUniversalPlan3 = universalPlan("nativescript", {
|
|
43
|
+
"kind": "host",
|
|
44
|
+
"type": "flexboxlayout",
|
|
45
|
+
"bindings": [
|
|
46
|
+
["ref", 0],
|
|
47
|
+
["id", 1],
|
|
48
|
+
["className", 2],
|
|
49
|
+
["style", 3]
|
|
50
|
+
],
|
|
51
|
+
"children": [{
|
|
52
|
+
"kind": "slot",
|
|
53
|
+
"slot": 4
|
|
54
|
+
}]
|
|
55
|
+
});
|
|
56
|
+
var TreeRow = defineUniversalComponent("nativescript", function TreeRow(props) {
|
|
57
|
+
const node = props.node;
|
|
58
|
+
const kids = node.children ?? [];
|
|
59
|
+
const isOpen = props.open.has(node.key);
|
|
60
|
+
return universalValue(__octaneUniversalPlan1, [
|
|
61
|
+
cx("vx-tree-row", node.disabled && "vx-tree-row--disabled"),
|
|
62
|
+
{ paddingLeft: props.depth * 16 },
|
|
63
|
+
node.disabled ? void 0 : () => kids.length ? props.toggle(node) : props.onSelect?.(node),
|
|
64
|
+
kids.length ? isOpen ? "▾" : "▸" : "",
|
|
65
|
+
node.label ?? node.key,
|
|
66
|
+
isOpen && kids.map((kid) => universalValue(__octaneUniversalPlan0, [universalComponent("nativescript", TreeRow, universalProps([
|
|
67
|
+
[
|
|
68
|
+
"set",
|
|
69
|
+
"node",
|
|
70
|
+
kid
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
"set",
|
|
74
|
+
"depth",
|
|
75
|
+
props.depth + 1
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"set",
|
|
79
|
+
"open",
|
|
80
|
+
props.open
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"set",
|
|
84
|
+
"toggle",
|
|
85
|
+
props.toggle
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"set",
|
|
89
|
+
"onSelect",
|
|
90
|
+
props.onSelect
|
|
91
|
+
]
|
|
92
|
+
]))]))
|
|
93
|
+
]);
|
|
94
|
+
}, { "module": "@nativescript-community/octane" });
|
|
95
|
+
var Tree = defineUniversalComponent("nativescript", function Tree(props) {
|
|
96
|
+
const [open, setOpen] = useState(new Set(props.defaultExpanded ?? []), _h$0);
|
|
97
|
+
const toggle = (node) => {
|
|
98
|
+
const next = new Set(open);
|
|
99
|
+
const willOpen = !next.has(node.key);
|
|
100
|
+
if (willOpen) next.add(node.key);
|
|
101
|
+
else next.delete(node.key);
|
|
102
|
+
setOpen(next);
|
|
103
|
+
props.onToggle?.(node.key, willOpen);
|
|
104
|
+
};
|
|
105
|
+
return universalValue(__octaneUniversalPlan3, [
|
|
106
|
+
(v) => applyEscapeProps(v, props),
|
|
107
|
+
props.id,
|
|
108
|
+
cx("vx-tree", props.className),
|
|
109
|
+
props.style,
|
|
110
|
+
props.nodes.map((node) => universalValue(__octaneUniversalPlan2, [universalComponent("nativescript", TreeRow, universalProps([
|
|
111
|
+
[
|
|
112
|
+
"set",
|
|
113
|
+
"node",
|
|
114
|
+
node
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
"set",
|
|
118
|
+
"depth",
|
|
119
|
+
0
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
"set",
|
|
123
|
+
"open",
|
|
124
|
+
open
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
"set",
|
|
128
|
+
"toggle",
|
|
129
|
+
toggle
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
"set",
|
|
133
|
+
"onSelect",
|
|
134
|
+
props.onSelect
|
|
135
|
+
]
|
|
136
|
+
]))]))
|
|
137
|
+
]);
|
|
138
|
+
}, { "module": "@nativescript-community/octane" });
|
|
139
|
+
//#endregion
|
|
140
|
+
export { Tree };
|