@oxy.so/services 14.11.0 → 14.13.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/ios/OxyIdentityModule.swift +49 -1
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +16 -63
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileLinkForm.js +125 -0
- package/lib/commonjs/ui/screens/ProfileLinkForm.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileLinksEditor.js +85 -0
- package/lib/commonjs/ui/screens/ProfileLinksEditor.js.map +1 -0
- package/lib/commonjs/ui/screens/linkFormat.js +22 -10
- package/lib/commonjs/ui/screens/linkFormat.js.map +1 -1
- package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +17 -65
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileLinkForm.js +121 -0
- package/lib/module/ui/screens/ProfileLinkForm.js.map +1 -0
- package/lib/module/ui/screens/ProfileLinksEditor.js +81 -0
- package/lib/module/ui/screens/ProfileLinksEditor.js.map +1 -0
- package/lib/module/ui/screens/linkFormat.js +21 -9
- package/lib/module/ui/screens/linkFormat.js.map +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts +18 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts +14 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +14 -2
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts +5 -0
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts +18 -0
- package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts +14 -0
- package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/linkFormat.d.ts +14 -2
- package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts +5 -0
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/src/assets/fonts/icons/manifest.json +5 -4
- package/src/ui/icons/subsetGlyphMaps.ts +1 -0
- package/src/ui/screens/EditProfileFieldScreen.tsx +19 -85
- package/src/ui/screens/ProfileLinkForm.tsx +131 -0
- package/src/ui/screens/ProfileLinksEditor.tsx +98 -0
- package/src/ui/screens/__tests__/linkFormat.test.ts +51 -8
- package/src/ui/screens/linkFormat.ts +28 -9
- package/lib/commonjs/ui/screens/LinkListEditor.js +0 -105
- package/lib/commonjs/ui/screens/LinkListEditor.js.map +0 -1
- package/lib/module/ui/screens/LinkListEditor.js +0 -99
- package/lib/module/ui/screens/LinkListEditor.js.map +0 -1
- package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts +0 -25
- package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/LinkListEditor.d.ts +0 -25
- package/lib/typescript/module/ui/screens/LinkListEditor.d.ts.map +0 -1
- package/src/ui/screens/LinkListEditor.tsx +0 -113
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.LinkListEditor = LinkListEditor;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _button = require("@oxy.so/bloom/button");
|
|
10
|
-
var _textField = require("@oxy.so/bloom/text-field");
|
|
11
|
-
var _typography = require("@oxy.so/bloom/typography");
|
|
12
|
-
var _theme = require("@oxy.so/bloom/theme");
|
|
13
|
-
var _client = require("@oxy.so/contracts/client");
|
|
14
|
-
var _Ionicons = _interopRequireDefault(require("../icons/Ionicons.js"));
|
|
15
|
-
var _linkFormat = require("./linkFormat.js");
|
|
16
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
|
-
/**
|
|
20
|
-
* The profile's ordered link list. Each link has an editable title and can move
|
|
21
|
-
* up or down; order is the profile's display order, and the server stores it as
|
|
22
|
-
* the array's index. Reordering uses buttons rather than drag: a drag gesture
|
|
23
|
-
* would not reach a screen reader, and a button does.
|
|
24
|
-
*/
|
|
25
|
-
function LinkListEditor({
|
|
26
|
-
items,
|
|
27
|
-
onChange,
|
|
28
|
-
disabled,
|
|
29
|
-
labels
|
|
30
|
-
}) {
|
|
31
|
-
const bloomTheme = (0, _theme.useTheme)();
|
|
32
|
-
const setTitle = (0, _react.useCallback)((id, title) => {
|
|
33
|
-
onChange(items.map(item => item.id === id ? {
|
|
34
|
-
...item,
|
|
35
|
-
title: (0, _linkFormat.clampLinkTitle)(title)
|
|
36
|
-
} : item));
|
|
37
|
-
}, [items, onChange]);
|
|
38
|
-
const move = (0, _react.useCallback)((index, delta) => onChange((0, _linkFormat.moveLinkItem)(items, index, delta)), [items, onChange]);
|
|
39
|
-
const remove = (0, _react.useCallback)(id => onChange(items.filter(item => item.id !== id)), [items, onChange]);
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
41
|
-
className: "gap-space-12",
|
|
42
|
-
children: items.map((item, index) => {
|
|
43
|
-
const shownTitle = item.title || item.url;
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
45
|
-
className: "gap-space-8 pb-space-12 border-b border-border",
|
|
46
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_textField.TextField, {
|
|
47
|
-
disabled: disabled,
|
|
48
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldLabel, {
|
|
49
|
-
children: labels.title
|
|
50
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldInput, {
|
|
51
|
-
label: labels.title,
|
|
52
|
-
value: item.title,
|
|
53
|
-
onChangeText: value => setTitle(item.id, value),
|
|
54
|
-
maxLength: _client.PROFILE_LINK_TITLE_MAX,
|
|
55
|
-
autoCorrect: true
|
|
56
|
-
})]
|
|
57
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
58
|
-
className: "flex-row items-center gap-space-8",
|
|
59
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
60
|
-
className: "flex-1 text-muted-foreground",
|
|
61
|
-
numberOfLines: 1,
|
|
62
|
-
children: item.url
|
|
63
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
64
|
-
onPress: () => move(index, -1),
|
|
65
|
-
disabled: disabled || index === 0,
|
|
66
|
-
accessibilityLabel: labels.moveUp,
|
|
67
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
68
|
-
name: "chevron-up",
|
|
69
|
-
size: 18,
|
|
70
|
-
color: bloomTheme.colors.textSecondary
|
|
71
|
-
}),
|
|
72
|
-
iconOnly: true,
|
|
73
|
-
tone: "neutral",
|
|
74
|
-
appearance: "plain"
|
|
75
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
76
|
-
onPress: () => move(index, 1),
|
|
77
|
-
disabled: disabled || index === items.length - 1,
|
|
78
|
-
accessibilityLabel: labels.moveDown,
|
|
79
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
80
|
-
name: "chevron-down",
|
|
81
|
-
size: 18,
|
|
82
|
-
color: bloomTheme.colors.textSecondary
|
|
83
|
-
}),
|
|
84
|
-
iconOnly: true,
|
|
85
|
-
tone: "neutral",
|
|
86
|
-
appearance: "plain"
|
|
87
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
88
|
-
onPress: () => remove(item.id),
|
|
89
|
-
disabled: disabled,
|
|
90
|
-
accessibilityLabel: labels.removeNamed(shownTitle),
|
|
91
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
92
|
-
name: "trash-outline",
|
|
93
|
-
size: 18,
|
|
94
|
-
color: bloomTheme.colors.negative
|
|
95
|
-
}),
|
|
96
|
-
iconOnly: true,
|
|
97
|
-
tone: "danger",
|
|
98
|
-
appearance: "plain"
|
|
99
|
-
})]
|
|
100
|
-
})]
|
|
101
|
-
}, item.id);
|
|
102
|
-
})
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=LinkListEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_button","_textField","_typography","_theme","_client","_Ionicons","_interopRequireDefault","_linkFormat","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","LinkListEditor","items","onChange","disabled","labels","bloomTheme","useTheme","setTitle","useCallback","id","title","map","item","clampLinkTitle","move","index","delta","moveLinkItem","remove","filter","jsx","View","className","children","shownTitle","url","jsxs","TextField","TextFieldLabel","TextFieldInput","label","value","onChangeText","maxLength","PROFILE_LINK_TITLE_MAX","autoCorrect","Text","numberOfLines","Button","onPress","accessibilityLabel","moveUp","icon","name","size","color","colors","textSecondary","iconOnly","tone","appearance","length","moveDown","removeNamed","negative"],"sourceRoot":"../../../../src","sources":["ui/screens/LinkListEditor.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAA+E,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAQ,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAhB,uBAAA,YAAAA,CAAAY,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,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AwC,GAAA,EAAChD,OAAA,CAAAkE,MAAM;YACLC,OAAO,EAAEA,CAAA,KAAMrB,MAAM,CAACN,IAAI,CAACH,EAAE,CAAE;YAC/BN,QAAQ,EAAEA,QAAS;YACnBqC,kBAAkB,EAAEpC,MAAM,CAACiD,WAAW,CAAC7B,UAAU,CAAE;YACnDkB,IAAI,eACF,IAAA9D,WAAA,CAAAwC,GAAA,EAAC3C,SAAA,CAAAM,OAAQ;cAAC4D,IAAI,EAAC,eAAe;cAACC,IAAI,EAAE,EAAG;cAACC,KAAK,EAAExC,UAAU,CAACyC,MAAM,CAACQ;YAAS,CAAE,CAC9E;YACDN,QAAQ;YACRC,IAAI,EAAC,QAAQ;YACbC,UAAU,EAAC;UAAO,CACnB,CAAC;QAAA,CACE,CAAC;MAAA,GAhDEtC,IAAI,CAACH,EAiDV,CAAC;IAEX,CAAC;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React, { useCallback } from 'react';
|
|
4
|
-
import { View } from 'react-native';
|
|
5
|
-
import { Button } from '@oxy.so/bloom/button';
|
|
6
|
-
import { TextField, TextFieldInput, TextFieldLabel } from '@oxy.so/bloom/text-field';
|
|
7
|
-
import { Text } from '@oxy.so/bloom/typography';
|
|
8
|
-
import { useTheme } from '@oxy.so/bloom/theme';
|
|
9
|
-
import { PROFILE_LINK_TITLE_MAX } from '@oxy.so/contracts/client';
|
|
10
|
-
import Ionicons from "../icons/Ionicons.js";
|
|
11
|
-
import { clampLinkTitle, moveLinkItem } from "./linkFormat.js";
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
/**
|
|
14
|
-
* The profile's ordered link list. Each link has an editable title and can move
|
|
15
|
-
* up or down; order is the profile's display order, and the server stores it as
|
|
16
|
-
* the array's index. Reordering uses buttons rather than drag: a drag gesture
|
|
17
|
-
* would not reach a screen reader, and a button does.
|
|
18
|
-
*/
|
|
19
|
-
export function LinkListEditor({
|
|
20
|
-
items,
|
|
21
|
-
onChange,
|
|
22
|
-
disabled,
|
|
23
|
-
labels
|
|
24
|
-
}) {
|
|
25
|
-
const bloomTheme = useTheme();
|
|
26
|
-
const setTitle = useCallback((id, title) => {
|
|
27
|
-
onChange(items.map(item => item.id === id ? {
|
|
28
|
-
...item,
|
|
29
|
-
title: clampLinkTitle(title)
|
|
30
|
-
} : item));
|
|
31
|
-
}, [items, onChange]);
|
|
32
|
-
const move = useCallback((index, delta) => onChange(moveLinkItem(items, index, delta)), [items, onChange]);
|
|
33
|
-
const remove = useCallback(id => onChange(items.filter(item => item.id !== id)), [items, onChange]);
|
|
34
|
-
return /*#__PURE__*/_jsx(View, {
|
|
35
|
-
className: "gap-space-12",
|
|
36
|
-
children: items.map((item, index) => {
|
|
37
|
-
const shownTitle = item.title || item.url;
|
|
38
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
39
|
-
className: "gap-space-8 pb-space-12 border-b border-border",
|
|
40
|
-
children: [/*#__PURE__*/_jsxs(TextField, {
|
|
41
|
-
disabled: disabled,
|
|
42
|
-
children: [/*#__PURE__*/_jsx(TextFieldLabel, {
|
|
43
|
-
children: labels.title
|
|
44
|
-
}), /*#__PURE__*/_jsx(TextFieldInput, {
|
|
45
|
-
label: labels.title,
|
|
46
|
-
value: item.title,
|
|
47
|
-
onChangeText: value => setTitle(item.id, value),
|
|
48
|
-
maxLength: PROFILE_LINK_TITLE_MAX,
|
|
49
|
-
autoCorrect: true
|
|
50
|
-
})]
|
|
51
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
52
|
-
className: "flex-row items-center gap-space-8",
|
|
53
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
54
|
-
className: "flex-1 text-muted-foreground",
|
|
55
|
-
numberOfLines: 1,
|
|
56
|
-
children: item.url
|
|
57
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
58
|
-
onPress: () => move(index, -1),
|
|
59
|
-
disabled: disabled || index === 0,
|
|
60
|
-
accessibilityLabel: labels.moveUp,
|
|
61
|
-
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
62
|
-
name: "chevron-up",
|
|
63
|
-
size: 18,
|
|
64
|
-
color: bloomTheme.colors.textSecondary
|
|
65
|
-
}),
|
|
66
|
-
iconOnly: true,
|
|
67
|
-
tone: "neutral",
|
|
68
|
-
appearance: "plain"
|
|
69
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
70
|
-
onPress: () => move(index, 1),
|
|
71
|
-
disabled: disabled || index === items.length - 1,
|
|
72
|
-
accessibilityLabel: labels.moveDown,
|
|
73
|
-
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
74
|
-
name: "chevron-down",
|
|
75
|
-
size: 18,
|
|
76
|
-
color: bloomTheme.colors.textSecondary
|
|
77
|
-
}),
|
|
78
|
-
iconOnly: true,
|
|
79
|
-
tone: "neutral",
|
|
80
|
-
appearance: "plain"
|
|
81
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
82
|
-
onPress: () => remove(item.id),
|
|
83
|
-
disabled: disabled,
|
|
84
|
-
accessibilityLabel: labels.removeNamed(shownTitle),
|
|
85
|
-
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
86
|
-
name: "trash-outline",
|
|
87
|
-
size: 18,
|
|
88
|
-
color: bloomTheme.colors.negative
|
|
89
|
-
}),
|
|
90
|
-
iconOnly: true,
|
|
91
|
-
tone: "danger",
|
|
92
|
-
appearance: "plain"
|
|
93
|
-
})]
|
|
94
|
-
})]
|
|
95
|
-
}, item.id);
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=LinkListEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","View","Button","TextField","TextFieldInput","TextFieldLabel","Text","useTheme","PROFILE_LINK_TITLE_MAX","Ionicons","clampLinkTitle","moveLinkItem","jsx","_jsx","jsxs","_jsxs","LinkListEditor","items","onChange","disabled","labels","bloomTheme","setTitle","id","title","map","item","move","index","delta","remove","filter","className","children","shownTitle","url","label","value","onChangeText","maxLength","autoCorrect","numberOfLines","onPress","accessibilityLabel","moveUp","icon","name","size","color","colors","textSecondary","iconOnly","tone","appearance","length","moveDown","removeNamed","negative"],"sourceRoot":"../../../../src","sources":["ui/screens/LinkListEditor.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,SAAS,EAAEC,cAAc,EAAEC,cAAc,QAAQ,0BAA0B;AACpF,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,OAAOC,QAAQ,MAAM,sBAAmB;AACxC,SAASC,cAAc,EAAEC,YAAY,QAA2B,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiB/E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;AAA4B,CAAC,EAAE;EACzF,MAAMC,UAAU,GAAGd,QAAQ,CAAC,CAAC;EAE7B,MAAMe,QAAQ,GAAGtB,WAAW,CAC1B,CAACuB,EAAU,EAAEC,KAAa,KAAK;IAC7BN,QAAQ,CACND,KAAK,CAACQ,GAAG,CAAEC,IAAI,IAAMA,IAAI,CAACH,EAAE,KAAKA,EAAE,GAAG;MAAE,GAAGG,IAAI;MAAEF,KAAK,EAAEd,cAAc,CAACc,KAAK;IAAE,CAAC,GAAGE,IAAK,CACzF,CAAC;EACH,CAAC,EACD,CAACT,KAAK,EAAEC,QAAQ,CAClB,CAAC;EAED,MAAMS,IAAI,GAAG3B,WAAW,CACtB,CAAC4B,KAAa,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,QAAQ;YACRC,IAAI,EAAC,QAAQ;YACbC,UAAU,EAAC;UAAO,CACnB,CAAC;QAAA,CACE,CAAC;MAAA,GAhDE3B,IAAI,CAACH,EAiDV,CAAC;IAEX,CAAC;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type LinkListItem } from './linkFormat';
|
|
3
|
-
interface LinkListEditorProps {
|
|
4
|
-
items: LinkListItem[];
|
|
5
|
-
onChange: (items: LinkListItem[]) => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
/** Visible and accessible strings, resolved by the caller. */
|
|
8
|
-
labels: {
|
|
9
|
-
title: string;
|
|
10
|
-
moveUp: string;
|
|
11
|
-
moveDown: string;
|
|
12
|
-
remove: string;
|
|
13
|
-
/** `{{title}}` is replaced with the link's title. */
|
|
14
|
-
removeNamed: (title: string) => string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The profile's ordered link list. Each link has an editable title and can move
|
|
19
|
-
* up or down; order is the profile's display order, and the server stores it as
|
|
20
|
-
* the array's index. Reordering uses buttons rather than drag: a drag gesture
|
|
21
|
-
* would not reach a screen reader, and a button does.
|
|
22
|
-
*/
|
|
23
|
-
export declare function LinkListEditor({ items, onChange, disabled, labels }: LinkListEditorProps): React.JSX.Element;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=LinkListEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkListEditor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/LinkListEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,OAAO,EAAgC,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/E,UAAU,mBAAmB;IAC3B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,qDAAqD;QACrD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KACxC,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBAiFxF"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type LinkListItem } from './linkFormat.js';
|
|
3
|
-
interface LinkListEditorProps {
|
|
4
|
-
items: LinkListItem[];
|
|
5
|
-
onChange: (items: LinkListItem[]) => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
/** Visible and accessible strings, resolved by the caller. */
|
|
8
|
-
labels: {
|
|
9
|
-
title: string;
|
|
10
|
-
moveUp: string;
|
|
11
|
-
moveDown: string;
|
|
12
|
-
remove: string;
|
|
13
|
-
/** `{{title}}` is replaced with the link's title. */
|
|
14
|
-
removeNamed: (title: string) => string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The profile's ordered link list. Each link has an editable title and can move
|
|
19
|
-
* up or down; order is the profile's display order, and the server stores it as
|
|
20
|
-
* the array's index. Reordering uses buttons rather than drag: a drag gesture
|
|
21
|
-
* would not reach a screen reader, and a button does.
|
|
22
|
-
*/
|
|
23
|
-
export declare function LinkListEditor({ items, onChange, disabled, labels }: LinkListEditorProps): React.JSX.Element;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=LinkListEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkListEditor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/LinkListEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,OAAO,EAAgC,KAAK,YAAY,EAAE,MAAM,iBAAc,CAAC;AAE/E,UAAU,mBAAmB;IAC3B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,qDAAqD;QACrD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KACxC,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBAiFxF"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { Button } from '@oxy.so/bloom/button';
|
|
4
|
-
import { TextField, TextFieldInput, TextFieldLabel } from '@oxy.so/bloom/text-field';
|
|
5
|
-
import { Text } from '@oxy.so/bloom/typography';
|
|
6
|
-
import { useTheme } from '@oxy.so/bloom/theme';
|
|
7
|
-
import { PROFILE_LINK_TITLE_MAX } from '@oxy.so/contracts/client';
|
|
8
|
-
import Ionicons from '../icons/Ionicons';
|
|
9
|
-
import { clampLinkTitle, moveLinkItem, type LinkListItem } from './linkFormat';
|
|
10
|
-
|
|
11
|
-
interface LinkListEditorProps {
|
|
12
|
-
items: LinkListItem[];
|
|
13
|
-
onChange: (items: LinkListItem[]) => void;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
/** Visible and accessible strings, resolved by the caller. */
|
|
16
|
-
labels: {
|
|
17
|
-
title: string;
|
|
18
|
-
moveUp: string;
|
|
19
|
-
moveDown: string;
|
|
20
|
-
remove: string;
|
|
21
|
-
/** `{{title}}` is replaced with the link's title. */
|
|
22
|
-
removeNamed: (title: string) => string;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The profile's ordered link list. Each link has an editable title and can move
|
|
28
|
-
* up or down; order is the profile's display order, and the server stores it as
|
|
29
|
-
* the array's index. Reordering uses buttons rather than drag: a drag gesture
|
|
30
|
-
* would not reach a screen reader, and a button does.
|
|
31
|
-
*/
|
|
32
|
-
export function LinkListEditor({ items, onChange, disabled, labels }: LinkListEditorProps) {
|
|
33
|
-
const bloomTheme = useTheme();
|
|
34
|
-
|
|
35
|
-
const setTitle = useCallback(
|
|
36
|
-
(id: string, title: string) => {
|
|
37
|
-
onChange(
|
|
38
|
-
items.map((item) => (item.id === id ? { ...item, title: clampLinkTitle(title) } : item)),
|
|
39
|
-
);
|
|
40
|
-
},
|
|
41
|
-
[items, onChange],
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
const move = useCallback(
|
|
45
|
-
(index: number, delta: -1 | 1) => onChange(moveLinkItem(items, index, delta)),
|
|
46
|
-
[items, onChange],
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const remove = useCallback(
|
|
50
|
-
(id: string) => onChange(items.filter((item) => item.id !== id)),
|
|
51
|
-
[items, onChange],
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<View className="gap-space-12">
|
|
56
|
-
{items.map((item, index) => {
|
|
57
|
-
const shownTitle = item.title || item.url;
|
|
58
|
-
return (
|
|
59
|
-
<View key={item.id} className="gap-space-8 pb-space-12 border-b border-border">
|
|
60
|
-
<TextField disabled={disabled}>
|
|
61
|
-
<TextFieldLabel>{labels.title}</TextFieldLabel>
|
|
62
|
-
<TextFieldInput
|
|
63
|
-
label={labels.title}
|
|
64
|
-
value={item.title}
|
|
65
|
-
onChangeText={(value) => setTitle(item.id, value)}
|
|
66
|
-
maxLength={PROFILE_LINK_TITLE_MAX}
|
|
67
|
-
autoCorrect
|
|
68
|
-
/>
|
|
69
|
-
</TextField>
|
|
70
|
-
<View className="flex-row items-center gap-space-8">
|
|
71
|
-
<Text className="flex-1 text-muted-foreground" numberOfLines={1}>
|
|
72
|
-
{item.url}
|
|
73
|
-
</Text>
|
|
74
|
-
<Button
|
|
75
|
-
onPress={() => move(index, -1)}
|
|
76
|
-
disabled={disabled || index === 0}
|
|
77
|
-
accessibilityLabel={labels.moveUp}
|
|
78
|
-
icon={
|
|
79
|
-
<Ionicons name="chevron-up" size={18} color={bloomTheme.colors.textSecondary} />
|
|
80
|
-
}
|
|
81
|
-
iconOnly
|
|
82
|
-
tone="neutral"
|
|
83
|
-
appearance="plain"
|
|
84
|
-
/>
|
|
85
|
-
<Button
|
|
86
|
-
onPress={() => move(index, 1)}
|
|
87
|
-
disabled={disabled || index === items.length - 1}
|
|
88
|
-
accessibilityLabel={labels.moveDown}
|
|
89
|
-
icon={
|
|
90
|
-
<Ionicons name="chevron-down" size={18} color={bloomTheme.colors.textSecondary} />
|
|
91
|
-
}
|
|
92
|
-
iconOnly
|
|
93
|
-
tone="neutral"
|
|
94
|
-
appearance="plain"
|
|
95
|
-
/>
|
|
96
|
-
<Button
|
|
97
|
-
onPress={() => remove(item.id)}
|
|
98
|
-
disabled={disabled}
|
|
99
|
-
accessibilityLabel={labels.removeNamed(shownTitle)}
|
|
100
|
-
icon={
|
|
101
|
-
<Ionicons name="trash-outline" size={18} color={bloomTheme.colors.negative} />
|
|
102
|
-
}
|
|
103
|
-
iconOnly
|
|
104
|
-
tone="danger"
|
|
105
|
-
appearance="plain"
|
|
106
|
-
/>
|
|
107
|
-
</View>
|
|
108
|
-
</View>
|
|
109
|
-
);
|
|
110
|
-
})}
|
|
111
|
-
</View>
|
|
112
|
-
);
|
|
113
|
-
}
|