@scm-manager/ui-components 2.25.1-20211003-143409 → 2.26.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/package.json +10 -8
- package/src/Autocomplete.tsx +6 -6
- package/src/BranchSelector.stories.tsx +1 -1
- package/src/Breadcrumb.tsx +4 -1
- package/src/CardColumn.stories.tsx +2 -2
- package/src/CardColumn.tsx +1 -2
- package/src/HelpIcon.tsx +3 -1
- package/src/Icon.stories.tsx +3 -3
- package/src/Notification.stories.tsx +1 -1
- package/src/Paginator.test.tsx +16 -16
- package/src/ProtectedRoute.tsx +3 -3
- package/src/Tag.tsx +1 -1
- package/src/__resources__/Diff.markdown.ts +19 -21
- package/src/__resources__/changesets.tsx +73 -109
- package/src/__resources__/repository.ts +8 -8
- package/src/__snapshots__/storyshots.test.ts.snap +71237 -71286
- package/src/buttons/Button.tsx +63 -74
- package/src/buttons/ButtonAddons.tsx +1 -1
- package/src/buttons/ButtonGroup.tsx +1 -1
- package/src/buttons/SubmitButton.tsx +1 -1
- package/src/buttons/index.stories.tsx +5 -6
- package/src/comparators.test.ts +6 -6
- package/src/comparators.ts +1 -1
- package/src/devBuild.ts +1 -1
- package/src/forms/AddKeyValueEntryToTableField.stories.tsx +1 -1
- package/src/forms/AutocompleteAddEntryToTableField.tsx +1 -1
- package/src/forms/Checkbox.stories.tsx +4 -4
- package/src/forms/DropDown.stories.tsx +4 -4
- package/src/forms/DropDown.tsx +1 -1
- package/src/forms/FileInput.stories.tsx +1 -1
- package/src/forms/FilterInput.tsx +1 -1
- package/src/forms/InputField.stories.tsx +1 -1
- package/src/forms/MemberNameTagGroup.tsx +3 -3
- package/src/forms/PasswordConfirmation.tsx +4 -4
- package/src/forms/Radio.stories.tsx +2 -2
- package/src/forms/Select.stories.tsx +4 -5
- package/src/forms/Textarea.stories.tsx +1 -1
- package/src/languages.ts +1 -1
- package/src/layout/Footer.stories.tsx +3 -3
- package/src/layout/SecondaryNavigationColumn.tsx +1 -1
- package/src/layout/Title.tsx +2 -2
- package/src/markdown/MarkdownCodeRenderer.tsx +1 -1
- package/src/markdown/MarkdownHeadingRenderer.tsx +2 -2
- package/src/markdown/MarkdownLinkRenderer.test.tsx +1 -1
- package/src/markdown/MarkdownLinkRenderer.tsx +1 -1
- package/src/markdown/MarkdownView.stories.tsx +4 -4
- package/src/markdown/MarkdownView.tsx +9 -9
- package/src/markdown/createComponentList.ts +1 -1
- package/src/markdown/createMdastPlugin.ts +1 -1
- package/src/markdown/markdownExtensions.ts +1 -1
- package/src/markdown/remarkChangesetShortLinkParser.ts +7 -7
- package/src/markdown/remarkToRehypeRendererAdapters.ts +10 -9
- package/src/modals/ConfirmAlert.stories.tsx +5 -5
- package/src/modals/ConfirmAlert.tsx +2 -2
- package/src/modals/CreateTagModal.tsx +4 -4
- package/src/modals/Modal.stories.tsx +1 -1
- package/src/navigation/MenuContext.tsx +2 -2
- package/src/navigation/NavAction.tsx +3 -3
- package/src/navigation/SecondaryNavigation.stories.tsx +4 -4
- package/src/navigation/SubNavigation.tsx +2 -2
- package/src/popover/Popover.stories.tsx +37 -35
- package/src/popover/usePopover.ts +10 -10
- package/src/repos/Diff.stories.tsx +1 -1
- package/src/repos/DiffExpander.test.ts +39 -41
- package/src/repos/DiffExpander.ts +10 -10
- package/src/repos/RepositoryEntry.stories.tsx +1 -1
- package/src/repos/RepositoryFlag.tsx +1 -1
- package/src/repos/Tokenize.worker.ts +3 -3
- package/src/repos/TokenizedDiffView.tsx +1 -1
- package/src/repos/annotate/Annotate.stories.tsx +29 -29
- package/src/repos/changesets/ChangesetAuthor.tsx +4 -4
- package/src/repos/changesets/ChangesetDescription.tsx +2 -2
- package/src/repos/changesets/ChangesetDiff.test.ts +18 -18
- package/src/repos/changesets/ChangesetId.tsx +1 -1
- package/src/repos/changesets/ChangesetList.tsx +1 -1
- package/src/repos/changesets/ChangesetTagsCollapsed.tsx +1 -1
- package/src/repos/changesets/Changesets.stories.tsx +185 -142
- package/src/repos/changesets/SignatureIcon.tsx +4 -4
- package/src/repos/changesets/changesets.ts +1 -1
- package/src/repos/diffs.test.ts +3 -3
- package/src/repos/refractorAdapter.ts +3 -3
- package/src/repositories.test.ts +18 -18
- package/src/storyshots.test.ts +3 -3
- package/src/syntax-highlighting.module.css +17 -16
- package/src/syntax-highlighting.ts +59 -54
- package/src/table/Table.stories.tsx +7 -7
- package/src/table/Table.tsx +1 -1
- package/src/table/TextColumn.tsx +1 -1
- package/src/textSplitAndReplace.test.ts +3 -3
- package/src/textSplitAndReplace.ts +2 -2
- package/src/toast/Toast.tsx +2 -2
- package/src/toast/index.stories.tsx +2 -2
- package/src/toast/themes.ts +6 -6
- package/src/useDateFormatter.ts +3 -3
- package/src/validation.test.ts +6 -6
- package/src/validation.ts +1 -4
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import {storiesOf} from "@storybook/react";
|
|
25
|
+
import { storiesOf } from "@storybook/react";
|
|
26
26
|
import * as React from "react";
|
|
27
27
|
import styled from "styled-components";
|
|
28
|
-
import {MemoryRouter} from "react-router-dom";
|
|
28
|
+
import { MemoryRouter } from "react-router-dom";
|
|
29
29
|
import repository from "../../__resources__/repository";
|
|
30
30
|
import ChangesetRow from "./ChangesetRow";
|
|
31
|
-
import {one, two, three, four, five} from "../../__resources__/changesets";
|
|
32
|
-
import {Binder, BinderContext} from "@scm-manager/ui-extensions";
|
|
31
|
+
import { one, two, three, four, five } from "../../__resources__/changesets";
|
|
32
|
+
import { Binder, BinderContext } from "@scm-manager/ui-extensions";
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
import hitchhiker from "../../__resources__/hitchhiker.png";
|
|
35
|
-
import {Person} from "../../avatar/Avatar";
|
|
36
|
-
import {Changeset} from "@scm-manager/ui-types";
|
|
37
|
-
import {Replacement} from "../../SplitAndReplace";
|
|
35
|
+
import { Person } from "../../avatar/Avatar";
|
|
36
|
+
import { Changeset } from "@scm-manager/ui-types";
|
|
37
|
+
import { Replacement } from "../../SplitAndReplace";
|
|
38
38
|
|
|
39
39
|
const Wrapper = styled.div`
|
|
40
40
|
margin: 25rem 4rem;
|
|
@@ -49,7 +49,7 @@ const withAvatarFactory = (factory: (person: Person) => string, changeset: Chang
|
|
|
49
49
|
binder.bind("avatar.factory", factory);
|
|
50
50
|
return (
|
|
51
51
|
<BinderContext.Provider value={binder}>
|
|
52
|
-
<ChangesetRow repository={repository} changeset={changeset}/>
|
|
52
|
+
<ChangesetRow repository={repository} changeset={changeset} />
|
|
53
53
|
</BinderContext.Provider>
|
|
54
54
|
);
|
|
55
55
|
};
|
|
@@ -59,10 +59,10 @@ const withReplacements = (
|
|
|
59
59
|
changeset: Changeset
|
|
60
60
|
) => {
|
|
61
61
|
const binder = new Binder("changeset stories");
|
|
62
|
-
replacements.forEach(replacement => binder.bind("changeset.description.tokens", replacement));
|
|
62
|
+
replacements.forEach((replacement) => binder.bind("changeset.description.tokens", replacement));
|
|
63
63
|
return (
|
|
64
64
|
<BinderContext.Provider value={binder}>
|
|
65
|
-
<ChangesetRow repository={repository} changeset={changeset}/>
|
|
65
|
+
<ChangesetRow repository={repository} changeset={changeset} />
|
|
66
66
|
</BinderContext.Provider>
|
|
67
67
|
);
|
|
68
68
|
};
|
|
@@ -71,13 +71,13 @@ function copy<T>(input: T): T {
|
|
|
71
71
|
return JSON.parse(JSON.stringify(input));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
storiesOf("Changesets", module)
|
|
75
|
-
.addDecorator(story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
|
|
76
|
-
.addDecorator(storyFn => <Wrapper className="box box-link-shadow">{storyFn()}</Wrapper>)
|
|
77
|
-
.add("Default", () => <ChangesetRow repository={repository} changeset={three}/>)
|
|
78
|
-
.add("With Committer", () => <ChangesetRow repository={repository} changeset={two}/>)
|
|
79
|
-
.add("With Committer and Co-Author", () => <ChangesetRow repository={repository} changeset={one}/>)
|
|
80
|
-
.add("With multiple Co-Authors", () => <ChangesetRow repository={repository} changeset={four}/>)
|
|
74
|
+
storiesOf("Repositories/Changesets", module)
|
|
75
|
+
.addDecorator((story) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
|
|
76
|
+
.addDecorator((storyFn) => <Wrapper className="box box-link-shadow">{storyFn()}</Wrapper>)
|
|
77
|
+
.add("Default", () => <ChangesetRow repository={repository} changeset={three} />)
|
|
78
|
+
.add("With Committer", () => <ChangesetRow repository={repository} changeset={two} />)
|
|
79
|
+
.add("With Committer and Co-Author", () => <ChangesetRow repository={repository} changeset={one} />)
|
|
80
|
+
.add("With multiple Co-Authors", () => <ChangesetRow repository={repository} changeset={four} />)
|
|
81
81
|
.add("With avatar", () => {
|
|
82
82
|
return withAvatarFactory(() => hitchhiker, three);
|
|
83
83
|
})
|
|
@@ -92,156 +92,199 @@ storiesOf("Changesets", module)
|
|
|
92
92
|
const mail = <a href={"mailto:hog@example.com"}>Arthur</a>;
|
|
93
93
|
return withReplacements(
|
|
94
94
|
[
|
|
95
|
-
() => [{textToReplace: "HOG-42", replacement: link}],
|
|
96
|
-
() => [{textToReplace: "arthur@guide.galaxy", replacement: mail}]
|
|
95
|
+
() => [{ textToReplace: "HOG-42", replacement: link }],
|
|
96
|
+
() => [{ textToReplace: "arthur@guide.galaxy", replacement: mail }],
|
|
97
97
|
],
|
|
98
98
|
five
|
|
99
99
|
);
|
|
100
100
|
})
|
|
101
101
|
.add("With unknown signature", () => {
|
|
102
102
|
const changeset = copy(three);
|
|
103
|
-
changeset.signatures = [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
changeset.signatures = [
|
|
104
|
+
{
|
|
105
|
+
keyId: "0x247E908C6FD35473",
|
|
106
|
+
type: "gpg",
|
|
107
|
+
status: "NOT_FOUND",
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
109
111
|
})
|
|
110
112
|
.add("With valid signature", () => {
|
|
111
113
|
const changeset = copy(three);
|
|
112
|
-
changeset.signatures = [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
changeset.signatures = [
|
|
115
|
+
{
|
|
116
|
+
keyId: "0x247E908C6FD35473",
|
|
117
|
+
type: "gpg",
|
|
118
|
+
status: "VERIFIED",
|
|
119
|
+
owner: "trillian",
|
|
120
|
+
contacts: [
|
|
121
|
+
{
|
|
122
|
+
name: "Tricia Marie McMilla",
|
|
123
|
+
mail: "trillian@hitchhiker.com",
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
123
129
|
})
|
|
124
130
|
.add("With unowned signature", () => {
|
|
125
131
|
const changeset = copy(three);
|
|
126
|
-
changeset.signatures = [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
changeset.signatures = [
|
|
133
|
+
{
|
|
134
|
+
keyId: "0x247E908C6FD35473",
|
|
135
|
+
type: "gpg",
|
|
136
|
+
status: "VERIFIED",
|
|
137
|
+
contacts: [
|
|
138
|
+
{
|
|
139
|
+
name: "Tricia Marie McMilla",
|
|
140
|
+
mail: "trillian@hitchhiker.com",
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
136
146
|
})
|
|
137
147
|
.add("With contactless signature", () => {
|
|
138
148
|
const changeset = copy(three);
|
|
139
|
-
changeset.signatures = [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
changeset.signatures = [
|
|
150
|
+
{
|
|
151
|
+
keyId: "0x247E908C6FD35473",
|
|
152
|
+
type: "gpg",
|
|
153
|
+
status: "VERIFIED",
|
|
154
|
+
owner: "trillian",
|
|
155
|
+
},
|
|
156
|
+
];
|
|
157
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
146
158
|
})
|
|
147
159
|
.add("With invalid signature", () => {
|
|
148
160
|
const changeset = copy(three);
|
|
149
|
-
changeset.signatures = [
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
changeset.signatures = [
|
|
162
|
+
{
|
|
163
|
+
keyId: "0x247E908C6FD35473",
|
|
164
|
+
type: "gpg",
|
|
165
|
+
status: "INVALID",
|
|
166
|
+
owner: "trillian",
|
|
167
|
+
contacts: [
|
|
168
|
+
{
|
|
169
|
+
name: "Tricia Marie McMilla",
|
|
170
|
+
mail: "trillian@hitchhiker.com",
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
];
|
|
175
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
160
176
|
})
|
|
161
177
|
.add("With multiple signatures and invalid status", () => {
|
|
162
178
|
const changeset = copy(three);
|
|
163
|
-
changeset.signatures = [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
179
|
+
changeset.signatures = [
|
|
180
|
+
{
|
|
181
|
+
keyId: "0x912389FJIQW8W223",
|
|
182
|
+
type: "gpg",
|
|
183
|
+
status: "INVALID",
|
|
184
|
+
owner: "trillian",
|
|
185
|
+
contacts: [
|
|
186
|
+
{
|
|
187
|
+
name: "Tricia Marie McMilla",
|
|
188
|
+
mail: "trillian@hitchhiker.com",
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
keyId: "0x247E908C6FD35473",
|
|
194
|
+
type: "gpg",
|
|
195
|
+
status: "VERIFIED",
|
|
196
|
+
owner: "trillian",
|
|
197
|
+
contacts: [
|
|
198
|
+
{
|
|
199
|
+
name: "Tricia Marie McMilla",
|
|
200
|
+
mail: "trillian@hitchhiker.com",
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
keyId: "0x9123891239VFIA33",
|
|
206
|
+
type: "gpg",
|
|
207
|
+
status: "NOT_FOUND",
|
|
208
|
+
owner: "trillian",
|
|
209
|
+
contacts: [
|
|
210
|
+
{
|
|
211
|
+
name: "Tricia Marie McMilla",
|
|
212
|
+
mail: "trillian@hitchhiker.com",
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
];
|
|
217
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
192
218
|
})
|
|
193
219
|
.add("With multiple signatures and valid status", () => {
|
|
194
220
|
const changeset = copy(three);
|
|
195
|
-
changeset.signatures = [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
changeset.signatures = [
|
|
222
|
+
{
|
|
223
|
+
keyId: "0x912389FJIQW8W223",
|
|
224
|
+
type: "gpg",
|
|
225
|
+
status: "NOT_FOUND",
|
|
226
|
+
owner: "trillian",
|
|
227
|
+
contacts: [
|
|
228
|
+
{
|
|
229
|
+
name: "Tricia Marie McMilla",
|
|
230
|
+
mail: "trillian@hitchhiker.com",
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
keyId: "0x247E908C6FD35473",
|
|
236
|
+
type: "gpg",
|
|
237
|
+
status: "VERIFIED",
|
|
238
|
+
owner: "trillian",
|
|
239
|
+
contacts: [
|
|
240
|
+
{
|
|
241
|
+
name: "Tricia Marie McMilla",
|
|
242
|
+
mail: "trillian@hitchhiker.com",
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
keyId: "0x9123891239VFIA33",
|
|
248
|
+
type: "gpg",
|
|
249
|
+
status: "NOT_FOUND",
|
|
250
|
+
owner: "trillian",
|
|
251
|
+
contacts: [
|
|
252
|
+
{
|
|
253
|
+
name: "Tricia Marie McMilla",
|
|
254
|
+
mail: "trillian@hitchhiker.com",
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
},
|
|
258
|
+
];
|
|
259
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
224
260
|
})
|
|
225
261
|
.add("With multiple signatures and not found status", () => {
|
|
226
262
|
const changeset = copy(three);
|
|
227
|
-
changeset.signatures = [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
263
|
+
changeset.signatures = [
|
|
264
|
+
{
|
|
265
|
+
keyId: "0x912389FJIQW8W223",
|
|
266
|
+
type: "gpg",
|
|
267
|
+
status: "NOT_FOUND",
|
|
268
|
+
owner: "trillian",
|
|
269
|
+
contacts: [
|
|
270
|
+
{
|
|
271
|
+
name: "Tricia Marie McMilla",
|
|
272
|
+
mail: "trillian@hitchhiker.com",
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
keyId: "0x9123891239VFIA33",
|
|
278
|
+
type: "gpg",
|
|
279
|
+
status: "NOT_FOUND",
|
|
280
|
+
owner: "trillian",
|
|
281
|
+
contacts: [
|
|
282
|
+
{
|
|
283
|
+
name: "Tricia Marie McMilla",
|
|
284
|
+
mail: "trillian@hitchhiker.com",
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
];
|
|
289
|
+
return <ChangesetRow repository={repository} changeset={changeset} />;
|
|
247
290
|
});
|
|
@@ -58,11 +58,11 @@ const SignatureIcon: FC<Props> = ({ signatures, className }) => {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const getColor = (signaturesToVerify: Signature[]) => {
|
|
61
|
-
const invalid = signaturesToVerify.some(sig => sig.status === "INVALID");
|
|
61
|
+
const invalid = signaturesToVerify.some((sig) => sig.status === "INVALID");
|
|
62
62
|
if (invalid) {
|
|
63
63
|
return "danger";
|
|
64
64
|
}
|
|
65
|
-
const verified = signaturesToVerify.some(sig => sig.status === "VERIFIED");
|
|
65
|
+
const verified = signaturesToVerify.some((sig) => sig.status === "VERIFIED");
|
|
66
66
|
if (verified) {
|
|
67
67
|
return "success";
|
|
68
68
|
}
|
|
@@ -109,7 +109,7 @@ const SignatureIcon: FC<Props> = ({ signatures, className }) => {
|
|
|
109
109
|
<>
|
|
110
110
|
<div>{t("changeset.keyContacts")}:</div>
|
|
111
111
|
{signature.contacts &&
|
|
112
|
-
signature.contacts.map(contact => (
|
|
112
|
+
signature.contacts.map((contact) => (
|
|
113
113
|
<div>
|
|
114
114
|
- {contact.name}
|
|
115
115
|
{contact.mail && ` <${contact.mail}>`}
|
|
@@ -121,7 +121,7 @@ const SignatureIcon: FC<Props> = ({ signatures, className }) => {
|
|
|
121
121
|
);
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
const signatureElements = signatures.map(signature => createSignatureBlock(signature));
|
|
124
|
+
const signatureElements = signatures.map((signature) => createSignatureBlock(signature));
|
|
125
125
|
|
|
126
126
|
return (
|
|
127
127
|
<>
|
package/src/repos/diffs.test.ts
CHANGED
|
@@ -33,7 +33,7 @@ describe("tests for diff util functions", () => {
|
|
|
33
33
|
oldPath,
|
|
34
34
|
newPath,
|
|
35
35
|
newEndingNewLine: true,
|
|
36
|
-
oldEndingNewLine: true
|
|
36
|
+
oldEndingNewLine: true,
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -52,7 +52,7 @@ describe("tests for diff util functions", () => {
|
|
|
52
52
|
const createHunk = (content: string): Hunk => {
|
|
53
53
|
return {
|
|
54
54
|
content,
|
|
55
|
-
changes: []
|
|
55
|
+
changes: [],
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -83,7 +83,7 @@ describe("tests for diff util functions", () => {
|
|
|
83
83
|
it("should create identifier", () => {
|
|
84
84
|
const identifier = createHunkIdentifierFromContext({
|
|
85
85
|
file: rm("/etc/passwd"),
|
|
86
|
-
hunk: createHunk("@@ -1,42 +1,39 @@")
|
|
86
|
+
hunk: createHunk("@@ -1,42 +1,39 @@"),
|
|
87
87
|
});
|
|
88
88
|
expect(identifier).toBe("delete_/etc/passwd_@@ -1,42 +1,39 @@");
|
|
89
89
|
});
|
|
@@ -46,7 +46,7 @@ const createAdapter = (theme: { [key: string]: string }): RefractorAdapter => {
|
|
|
46
46
|
import(
|
|
47
47
|
/* webpackChunkName: "tokenizer-refractor-[request]" */
|
|
48
48
|
`refractor/lang/${lang}`
|
|
49
|
-
).then(loadedLanguage => {
|
|
49
|
+
).then((loadedLanguage) => {
|
|
50
50
|
refractor.register(loadedLanguage.default);
|
|
51
51
|
callback();
|
|
52
52
|
});
|
|
@@ -58,7 +58,7 @@ const createAdapter = (theme: { [key: string]: string }): RefractorAdapter => {
|
|
|
58
58
|
const runHook = (name: string, env: RunHookEnv) => {
|
|
59
59
|
originalRunHook.apply(name, env);
|
|
60
60
|
if (env.classes) {
|
|
61
|
-
env.classes = env.classes.map(className => theme[className] || className);
|
|
61
|
+
env.classes = env.classes.map((className) => theme[className] || className);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
// @ts-ignore hooks are not in the type definition
|
|
@@ -67,7 +67,7 @@ const createAdapter = (theme: { [key: string]: string }): RefractorAdapter => {
|
|
|
67
67
|
return {
|
|
68
68
|
isLanguageRegistered,
|
|
69
69
|
loadLanguage,
|
|
70
|
-
...refractor
|
|
70
|
+
...refractor,
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
|
package/src/repositories.test.ts
CHANGED
|
@@ -35,10 +35,10 @@ describe("getProtocolLinkByType tests", () => {
|
|
|
35
35
|
protocol: [
|
|
36
36
|
{
|
|
37
37
|
name: "http",
|
|
38
|
-
href: "http://scm.scm-manager.org/repo/scm/core"
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
38
|
+
href: "http://scm.scm-manager.org/repo/scm/core",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const link = getProtocolLinkByType(repository, "http");
|
|
@@ -54,14 +54,14 @@ describe("getProtocolLinkByType tests", () => {
|
|
|
54
54
|
protocol: [
|
|
55
55
|
{
|
|
56
56
|
name: "http",
|
|
57
|
-
href: "http://scm.scm-manager.org/repo/scm/core"
|
|
57
|
+
href: "http://scm.scm-manager.org/repo/scm/core",
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
name: "ssh",
|
|
61
|
-
href: "git@scm.scm-manager.org:scm/core"
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
}
|
|
61
|
+
href: "git@scm.scm-manager.org:scm/core",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
const link = getProtocolLinkByType(repository, "http");
|
|
@@ -76,9 +76,9 @@ describe("getProtocolLinkByType tests", () => {
|
|
|
76
76
|
_links: {
|
|
77
77
|
protocol: {
|
|
78
78
|
name: "http",
|
|
79
|
-
href: "http://scm.scm-manager.org/repo/scm/core"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
79
|
+
href: "http://scm.scm-manager.org/repo/scm/core",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
const link = getProtocolLinkByType(repository, "http");
|
|
@@ -94,14 +94,14 @@ describe("getProtocolLinkByType tests", () => {
|
|
|
94
94
|
protocol: [
|
|
95
95
|
{
|
|
96
96
|
name: "http",
|
|
97
|
-
href: "http://scm.scm-manager.org/repo/scm/core"
|
|
97
|
+
href: "http://scm.scm-manager.org/repo/scm/core",
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
name: "ssh",
|
|
101
|
-
href: "git@scm.scm-manager.org:scm/core"
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
}
|
|
101
|
+
href: "git@scm.scm-manager.org:scm/core",
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
const link = getProtocolLinkByType(repository, "awesome");
|
|
@@ -113,7 +113,7 @@ describe("getProtocolLinkByType tests", () => {
|
|
|
113
113
|
namespace: "scm",
|
|
114
114
|
name: "core",
|
|
115
115
|
type: "git",
|
|
116
|
-
_links: {}
|
|
116
|
+
_links: {},
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
const link = getProtocolLinkByType(repository, "http");
|
package/src/storyshots.test.ts
CHANGED
|
@@ -30,7 +30,7 @@ const createNodeMock = (element: any) => {
|
|
|
30
30
|
if (element.type === "tr") {
|
|
31
31
|
return {
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
33
|
-
querySelector: (selector: string) => {}
|
|
33
|
+
querySelector: (selector: string) => {},
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
};
|
|
@@ -41,6 +41,6 @@ initStoryshots({
|
|
|
41
41
|
// @see https://github.com/storybookjs/storybook/pull/1090
|
|
42
42
|
test: snapshotWithOptions({
|
|
43
43
|
// @ts-ignore types seems not to match
|
|
44
|
-
createNodeMock
|
|
45
|
-
})
|
|
44
|
+
createNodeMock,
|
|
45
|
+
}),
|
|
46
46
|
});
|