@pictogrammers/components 0.3.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/@types/css.d.ts +4 -0
- package/@types/html.d.ts +4 -0
- package/README.md +49 -0
- package/dist/main.js +3819 -0
- package/dist/pgAnnoy.js +116 -0
- package/dist/pgAvatar.js +136 -0
- package/dist/pgButton.js +116 -0
- package/dist/pgButtonGroup.js +116 -0
- package/dist/pgButtonLink.js +116 -0
- package/dist/pgButtonToggle.js +146 -0
- package/dist/pgCard.js +116 -0
- package/dist/pgCardUser.js +196 -0
- package/dist/pgColor.js +136 -0
- package/dist/pgDatabase.js +236 -0
- package/dist/pgDropdown.js +686 -0
- package/dist/pgGrid.js +126 -0
- package/dist/pgHeader.js +116 -0
- package/dist/pgIcon.js +116 -0
- package/dist/pgInputCheck.js +116 -0
- package/dist/pgInputCheckList.js +126 -0
- package/dist/pgInputFileLocal.js +116 -0
- package/dist/pgInputHexRgb.js +126 -0
- package/dist/pgInputRange.js +116 -0
- package/dist/pgInputSelect.js +116 -0
- package/dist/pgInputText.js +116 -0
- package/dist/pgInputTextIcon.js +176 -0
- package/dist/pgInputUserSelect.js +116 -0
- package/dist/pgListTag.js +136 -0
- package/dist/pgMarkdown.js +346 -0
- package/dist/pgMenuIcon.js +206 -0
- package/dist/pgModalAlert.js +126 -0
- package/dist/pgModification.js +396 -0
- package/dist/pgNav.js +116 -0
- package/dist/pgOverlay.js +96 -0
- package/dist/pgPicker.js +116 -0
- package/dist/pgPreview.js +116 -0
- package/dist/pgScroll.js +266 -0
- package/dist/pgSearch.js +146 -0
- package/dist/pgTab.js +116 -0
- package/dist/pgTabs.js +136 -0
- package/dist/pgToast.js +136 -0
- package/dist/pgToasts.js +136 -0
- package/dist/pgTooltip.js +126 -0
- package/index.html +302 -0
- package/package.json +25 -0
- package/pg/annoy/README.md +18 -0
- package/pg/annoy/__examples__/basic/basic.html +8 -0
- package/pg/annoy/__examples__/basic/basic.ts +11 -0
- package/pg/annoy/annoy.css +238 -0
- package/pg/annoy/annoy.html +59 -0
- package/pg/annoy/annoy.ts +48 -0
- package/pg/annoy/index.ts +3 -0
- package/pg/avatar/README.md +23 -0
- package/pg/avatar/__examples__/basic/basic.html +6 -0
- package/pg/avatar/__examples__/basic/basic.ts +41 -0
- package/pg/avatar/__examples__/basic/constants.ts +1 -0
- package/pg/avatar/avatar.css +45 -0
- package/pg/avatar/avatar.html +8 -0
- package/pg/avatar/avatar.spec.ts +51 -0
- package/pg/avatar/avatar.ts +37 -0
- package/pg/avatar/index.ts +3 -0
- package/pg/button/README.md +51 -0
- package/pg/button/__examples__/basic/basic.html +11 -0
- package/pg/button/__examples__/basic/basic.ts +11 -0
- package/pg/button/__examples__/states/states.html +8 -0
- package/pg/button/__examples__/states/states.ts +20 -0
- package/pg/button/button.css +91 -0
- package/pg/button/button.html +3 -0
- package/pg/button/button.ts +45 -0
- package/pg/button/index.ts +3 -0
- package/pg/buttonGroup/README.md +28 -0
- package/pg/buttonGroup/__examples__/basic/basic.html +12 -0
- package/pg/buttonGroup/__examples__/basic/basic.ts +11 -0
- package/pg/buttonGroup/buttonGroup.css +4 -0
- package/pg/buttonGroup/buttonGroup.html +1 -0
- package/pg/buttonGroup/buttonGroup.spec.ts +30 -0
- package/pg/buttonGroup/buttonGroup.ts +50 -0
- package/pg/buttonGroup/index.ts +3 -0
- package/pg/buttonLink/README.md +51 -0
- package/pg/buttonLink/__examples__/basic/basic.html +17 -0
- package/pg/buttonLink/__examples__/basic/basic.ts +11 -0
- package/pg/buttonLink/buttonLink.css +91 -0
- package/pg/buttonLink/buttonLink.html +3 -0
- package/pg/buttonLink/buttonLink.ts +46 -0
- package/pg/buttonLink/index.ts +3 -0
- package/pg/buttonToggle/README.md +54 -0
- package/pg/buttonToggle/__examples__/basic/basic.html +10 -0
- package/pg/buttonToggle/__examples__/basic/basic.ts +23 -0
- package/pg/buttonToggle/buttonToggle.css +8 -0
- package/pg/buttonToggle/buttonToggle.html +4 -0
- package/pg/buttonToggle/buttonToggle.ts +44 -0
- package/pg/buttonToggle/index.ts +3 -0
- package/pg/card/README.md +21 -0
- package/pg/card/__examples__/basic/basic.html +5 -0
- package/pg/card/__examples__/basic/basic.ts +11 -0
- package/pg/card/card.css +11 -0
- package/pg/card/card.html +3 -0
- package/pg/card/card.spec.ts +30 -0
- package/pg/card/card.ts +13 -0
- package/pg/card/index.ts +3 -0
- package/pg/cardUser/README.md +22 -0
- package/pg/cardUser/__examples__/basic/basic.html +3 -0
- package/pg/cardUser/__examples__/basic/basic.ts +30 -0
- package/pg/cardUser/__examples__/basic/constants.ts +1 -0
- package/pg/cardUser/cardUser.css +67 -0
- package/pg/cardUser/cardUser.html +23 -0
- package/pg/cardUser/cardUser.spec.ts +46 -0
- package/pg/cardUser/cardUser.ts +53 -0
- package/pg/cardUser/index.ts +3 -0
- package/pg/color/README.md +13 -0
- package/pg/color/__examples__/basic/basic.html +4 -0
- package/pg/color/__examples__/basic/basic.ts +20 -0
- package/pg/color/color.css +21 -0
- package/pg/color/color.html +1 -0
- package/pg/color/color.ts +97 -0
- package/pg/color/constants.ts +357 -0
- package/pg/color/index.ts +3 -0
- package/pg/color/utils.ts +27 -0
- package/pg/database/README.md +28 -0
- package/pg/database/__examples__/basic/basic.html +9 -0
- package/pg/database/__examples__/basic/basic.ts +37 -0
- package/pg/database/database.css +0 -0
- package/pg/database/database.html +0 -0
- package/pg/database/database.ts +42 -0
- package/pg/database/index.ts +3 -0
- package/pg/dropdown/README.md +13 -0
- package/pg/dropdown/__examples__/basic/basic.html +14 -0
- package/pg/dropdown/__examples__/basic/basic.ts +11 -0
- package/pg/dropdown/dropdown.css +46 -0
- package/pg/dropdown/dropdown.html +5 -0
- package/pg/dropdown/dropdown.ts +60 -0
- package/pg/dropdown/index.ts +3 -0
- package/pg/grid/README.md +97 -0
- package/pg/grid/__examples__/basic/basic.html +29 -0
- package/pg/grid/__examples__/basic/basic.ts +139 -0
- package/pg/grid/grid.css +68 -0
- package/pg/grid/grid.html +6 -0
- package/pg/grid/grid.spec.ts +66 -0
- package/pg/grid/grid.ts +417 -0
- package/pg/grid/index.ts +3 -0
- package/pg/header/README.md +23 -0
- package/pg/header/__examples__/basic/basic.html +8 -0
- package/pg/header/__examples__/basic/basic.ts +11 -0
- package/pg/header/header.css +42 -0
- package/pg/header/header.html +15 -0
- package/pg/header/header.ts +28 -0
- package/pg/header/index.ts +3 -0
- package/pg/icon/README.md +26 -0
- package/pg/icon/__examples__/basic/basic.html +16 -0
- package/pg/icon/__examples__/basic/basic.ts +34 -0
- package/pg/icon/__examples__/basic/constants.ts +2 -0
- package/pg/icon/icon.css +9 -0
- package/pg/icon/icon.html +3 -0
- package/pg/icon/icon.spec.ts +46 -0
- package/pg/icon/icon.ts +23 -0
- package/pg/icon/index.ts +3 -0
- package/pg/inputCheck/README.md +32 -0
- package/pg/inputCheck/__examples__/basic/basic.html +8 -0
- package/pg/inputCheck/__examples__/basic/basic.ts +23 -0
- package/pg/inputCheck/index.ts +3 -0
- package/pg/inputCheck/inputCheck.css +45 -0
- package/pg/inputCheck/inputCheck.html +6 -0
- package/pg/inputCheck/inputCheck.ts +42 -0
- package/pg/inputCheckList/README.md +35 -0
- package/pg/inputCheckList/__examples__/basic/basic.html +4 -0
- package/pg/inputCheckList/__examples__/basic/basic.ts +31 -0
- package/pg/inputCheckList/index.ts +3 -0
- package/pg/inputCheckList/inputCheckList.css +70 -0
- package/pg/inputCheckList/inputCheckList.html +1 -0
- package/pg/inputCheckList/inputCheckList.ts +103 -0
- package/pg/inputCheckList/templates/option.html +8 -0
- package/pg/inputFileLocal/README.md +30 -0
- package/pg/inputFileLocal/__examples__/basic/basic.html +4 -0
- package/pg/inputFileLocal/__examples__/basic/basic.ts +23 -0
- package/pg/inputFileLocal/index.ts +3 -0
- package/pg/inputFileLocal/inputFileLocal.css +80 -0
- package/pg/inputFileLocal/inputFileLocal.html +5 -0
- package/pg/inputFileLocal/inputFileLocal.ts +82 -0
- package/pg/inputHexRgb/README.md +15 -0
- package/pg/inputHexRgb/__examples__/basic/basic.html +4 -0
- package/pg/inputHexRgb/__examples__/basic/basic.ts +23 -0
- package/pg/inputHexRgb/index.ts +3 -0
- package/pg/inputHexRgb/inputHexRgb.css +96 -0
- package/pg/inputHexRgb/inputHexRgb.html +9 -0
- package/pg/inputHexRgb/inputHexRgb.ts +79 -0
- package/pg/inputHexRgb/utils.ts +27 -0
- package/pg/inputRange/README.md +18 -0
- package/pg/inputRange/__examples__/basic/basic.html +9 -0
- package/pg/inputRange/__examples__/basic/basic.ts +30 -0
- package/pg/inputRange/index.ts +3 -0
- package/pg/inputRange/inputRange.css +0 -0
- package/pg/inputRange/inputRange.html +1 -0
- package/pg/inputRange/inputRange.ts +53 -0
- package/pg/inputSelect/README.md +25 -0
- package/pg/inputSelect/__examples__/basic/basic.html +6 -0
- package/pg/inputSelect/__examples__/basic/basic.ts +30 -0
- package/pg/inputSelect/index.ts +3 -0
- package/pg/inputSelect/inputSelect.css +36 -0
- package/pg/inputSelect/inputSelect.html +4 -0
- package/pg/inputSelect/inputSelect.ts +57 -0
- package/pg/inputText/README.md +27 -0
- package/pg/inputText/__examples__/basic/basic.html +9 -0
- package/pg/inputText/__examples__/basic/basic.ts +30 -0
- package/pg/inputText/index.ts +3 -0
- package/pg/inputText/inputText.css +20 -0
- package/pg/inputText/inputText.html +1 -0
- package/pg/inputText/inputText.spec.ts +59 -0
- package/pg/inputText/inputText.ts +59 -0
- package/pg/inputTextIcon/README.md +26 -0
- package/pg/inputTextIcon/index.ts +3 -0
- package/pg/inputTextIcon/inputTextIcon.css +24 -0
- package/pg/inputTextIcon/inputTextIcon.html +4 -0
- package/pg/inputTextIcon/inputTextIcon.spec.ts +44 -0
- package/pg/inputTextIcon/inputTextIcon.ts +26 -0
- package/pg/inputUserSelect/README.md +31 -0
- package/pg/inputUserSelect/__examples__/basic/basic.html +4 -0
- package/pg/inputUserSelect/__examples__/basic/basic.ts +25 -0
- package/pg/inputUserSelect/__examples__/basic/constants.ts +33 -0
- package/pg/inputUserSelect/index.ts +3 -0
- package/pg/inputUserSelect/inputUserSelect.css +174 -0
- package/pg/inputUserSelect/inputUserSelect.html +18 -0
- package/pg/inputUserSelect/inputUserSelect.ts +266 -0
- package/pg/listTag/README.md +26 -0
- package/pg/listTag/__examples__/basic/basic.html +16 -0
- package/pg/listTag/__examples__/basic/basic.ts +53 -0
- package/pg/listTag/__examples__/basic/constants.ts +22 -0
- package/pg/listTag/index.ts +3 -0
- package/pg/listTag/listTag.css +9 -0
- package/pg/listTag/listTag.html +1 -0
- package/pg/listTag/listTag.ts +48 -0
- package/pg/listTag/partials/tag.html +3 -0
- package/pg/markdown/README.md +13 -0
- package/pg/markdown/__examples__/basic/basic.html +3 -0
- package/pg/markdown/__examples__/basic/basic.ts +51 -0
- package/pg/markdown/__examples__/basic/constants.ts +129 -0
- package/pg/markdown/index.ts +5 -0
- package/pg/markdown/markdown.css +760 -0
- package/pg/markdown/markdown.html +1 -0
- package/pg/markdown/markdown.md +123 -0
- package/pg/markdown/markdown.spec.ts +87 -0
- package/pg/markdown/markdown.ts +381 -0
- package/pg/markdown/markdownReplace.ts +7 -0
- package/pg/menuIcon/README.md +13 -0
- package/pg/menuIcon/__examples__/basic/basic.html +3 -0
- package/pg/menuIcon/__examples__/basic/basic.ts +15 -0
- package/pg/menuIcon/index.ts +3 -0
- package/pg/menuIcon/menuIcon.css +168 -0
- package/pg/menuIcon/menuIcon.html +64 -0
- package/pg/menuIcon/menuIcon.ts +271 -0
- package/pg/modalAlert/README.md +17 -0
- package/pg/modalAlert/__examples__/basic/basic.html +4 -0
- package/pg/modalAlert/__examples__/basic/basic.ts +27 -0
- package/pg/modalAlert/index.ts +3 -0
- package/pg/modalAlert/modalAlert.css +43 -0
- package/pg/modalAlert/modalAlert.html +22 -0
- package/pg/modalAlert/modalAlert.ts +45 -0
- package/pg/modification/README.md +34 -0
- package/pg/modification/__examples__/basic/basic.html +8 -0
- package/pg/modification/__examples__/basic/basic.ts +63 -0
- package/pg/modification/__examples__/basic/constants.ts +416 -0
- package/pg/modification/index.ts +3 -0
- package/pg/modification/modification.css +311 -0
- package/pg/modification/modification.html +1 -0
- package/pg/modification/modification.spec.ts +33 -0
- package/pg/modification/modification.ts +201 -0
- package/pg/modification/type/date.html +1 -0
- package/pg/modification/type/iconAliasCreated.html +13 -0
- package/pg/modification/type/iconAliasDeleted.html +13 -0
- package/pg/modification/type/iconAuthorModified.html +13 -0
- package/pg/modification/type/iconCreated.html +13 -0
- package/pg/modification/type/iconDeleted.html +13 -0
- package/pg/modification/type/iconDeprecated.html +13 -0
- package/pg/modification/type/iconDescriptionModified.html +10 -0
- package/pg/modification/type/iconModified.html +14 -0
- package/pg/modification/type/iconRenamed.html +13 -0
- package/pg/modification/type/iconTagCreated.html +13 -0
- package/pg/modification/type/iconTagDeleted.html +13 -0
- package/pg/modification/type/news.html +5 -0
- package/pg/nav/README.md +16 -0
- package/pg/nav/__examples__/basic/basic.html +5 -0
- package/pg/nav/__examples__/basic/basic.ts +11 -0
- package/pg/nav/index.ts +3 -0
- package/pg/nav/nav.css +14 -0
- package/pg/nav/nav.html +16 -0
- package/pg/nav/nav.ts +21 -0
- package/pg/overlay/README.md +37 -0
- package/pg/overlay/__examples__/basic/basic.css +3 -0
- package/pg/overlay/__examples__/basic/basic.html +3 -0
- package/pg/overlay/__examples__/basic/basic.ts +13 -0
- package/pg/overlay/index.ts +3 -0
- package/pg/overlay/overlay.ts +26 -0
- package/pg/picker/README.md +13 -0
- package/pg/picker/index.ts +3 -0
- package/pg/picker/picker.css +56 -0
- package/pg/picker/picker.html +8 -0
- package/pg/picker/picker.ts +66 -0
- package/pg/preview/README.md +19 -0
- package/pg/preview/__examples__/basic/basic.html +11 -0
- package/pg/preview/__examples__/basic/basic.ts +22 -0
- package/pg/preview/index.ts +3 -0
- package/pg/preview/preview.css +34 -0
- package/pg/preview/preview.html +5 -0
- package/pg/preview/preview.ts +38 -0
- package/pg/scroll/README.md +42 -0
- package/pg/scroll/__examples__/basic/basic.css +4 -0
- package/pg/scroll/__examples__/basic/basic.html +11 -0
- package/pg/scroll/__examples__/basic/basic.ts +88 -0
- package/pg/scroll/index.ts +3 -0
- package/pg/scroll/scroll.css +7 -0
- package/pg/scroll/scroll.html +3 -0
- package/pg/scroll/scroll.ts +158 -0
- package/pg/search/README.md +59 -0
- package/pg/search/__examples__/basic/basic.html +3 -0
- package/pg/search/__examples__/basic/basic.ts +29 -0
- package/pg/search/__examples__/basic/constants.ts +3 -0
- package/pg/search/index.ts +3 -0
- package/pg/search/search.css +188 -0
- package/pg/search/search.html +18 -0
- package/pg/search/search.ts +252 -0
- package/pg/search/utils.ts +12 -0
- package/pg/shared/README.md +28 -0
- package/pg/shared/copy.ts +25 -0
- package/pg/shared/database.ts +35 -0
- package/pg/shared/databaseService.ts +230 -0
- package/pg/shared/debounce.ts +12 -0
- package/pg/shared/enums/modificationType.ts +19 -0
- package/pg/shared/filter.ts +14 -0
- package/pg/shared/http.ts +83 -0
- package/pg/shared/iconFilter.spec.ts +61 -0
- package/pg/shared/iconFilter.ts +71 -0
- package/pg/shared/list.ts +34 -0
- package/pg/shared/models/alias.ts +40 -0
- package/pg/shared/models/font.ts +31 -0
- package/pg/shared/models/fontIcon.ts +25 -0
- package/pg/shared/models/fontVersion.ts +22 -0
- package/pg/shared/models/icon.ts +97 -0
- package/pg/shared/models/modification.ts +45 -0
- package/pg/shared/models/style.ts +12 -0
- package/pg/shared/models/tag.ts +37 -0
- package/pg/shared/models/user.ts +35 -0
- package/pg/shared/models/version.ts +20 -0
- package/pg/shared/removeDiacritics.ts +94 -0
- package/pg/shared/toast.ts +47 -0
- package/pg/shared/uuid.ts +6 -0
- package/pg/tab/README.md +18 -0
- package/pg/tab/index.ts +3 -0
- package/pg/tab/tab.css +13 -0
- package/pg/tab/tab.html +3 -0
- package/pg/tab/tab.ts +51 -0
- package/pg/tabs/README.md +31 -0
- package/pg/tabs/__examples__/basic/basic.html +13 -0
- package/pg/tabs/__examples__/basic/basic.ts +11 -0
- package/pg/tabs/index.ts +3 -0
- package/pg/tabs/partials/tab.html +3 -0
- package/pg/tabs/tabs.css +69 -0
- package/pg/tabs/tabs.html +4 -0
- package/pg/tabs/tabs.ts +102 -0
- package/pg/toast/README.md +13 -0
- package/pg/toast/index.ts +3 -0
- package/pg/toast/toast.css +112 -0
- package/pg/toast/toast.html +13 -0
- package/pg/toast/toast.ts +39 -0
- package/pg/toasts/README.md +37 -0
- package/pg/toasts/__examples__/basic/basic.html +11 -0
- package/pg/toasts/__examples__/basic/basic.ts +86 -0
- package/pg/toasts/index.ts +3 -0
- package/pg/toasts/toasts.css +8 -0
- package/pg/toasts/toasts.html +1 -0
- package/pg/toasts/toasts.ts +51 -0
- package/pg/tooltip/README.md +51 -0
- package/pg/tooltip/__examples__/basic/basic.css +38 -0
- package/pg/tooltip/__examples__/basic/basic.html +21 -0
- package/pg/tooltip/__examples__/basic/basic.ts +55 -0
- package/pg/tooltip/addTooltip.ts +31 -0
- package/pg/tooltip/index.ts +20 -0
- package/pg/tooltip/position.ts +15 -0
- package/pg/tooltip/tooltip.css +36 -0
- package/pg/tooltip/tooltip.html +4 -0
- package/pg/tooltip/tooltip.ts +170 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
color: #453C4F;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.invalid {
|
|
8
|
+
color: #721c24;
|
|
9
|
+
background-color: #f8d7da;
|
|
10
|
+
border-color: #f5c6cb;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
h2 {
|
|
14
|
+
font-weight: normal;
|
|
15
|
+
font-size: 1.25rem;
|
|
16
|
+
margin: 0.5rem 0 0.5rem 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Individual Templates */
|
|
20
|
+
|
|
21
|
+
[part="news"] {
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: 3.5rem 1fr;
|
|
24
|
+
grid-template-rows: 3.25rem auto;
|
|
25
|
+
padding: 0.25rem;
|
|
26
|
+
}
|
|
27
|
+
[part="news"] [part="avatar"] {
|
|
28
|
+
grid-column: 1;
|
|
29
|
+
}
|
|
30
|
+
[part="news"] [part="label"] {
|
|
31
|
+
grid-column: 1;
|
|
32
|
+
grid-row: 2;
|
|
33
|
+
text-align: center;
|
|
34
|
+
padding-right: 0.5rem;
|
|
35
|
+
}
|
|
36
|
+
[part="news"] [part="markdown"] {
|
|
37
|
+
grid-column: 2;
|
|
38
|
+
grid-row: 1 / span 2;
|
|
39
|
+
border: 1px solid #DDD;
|
|
40
|
+
padding: 0 1rem;
|
|
41
|
+
background: #fff;
|
|
42
|
+
border-radius: 0.25rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[part="iconCreated"],
|
|
46
|
+
[part="iconRenamed"],
|
|
47
|
+
[part="iconDeleted"],
|
|
48
|
+
[part="iconAliasCreated"],
|
|
49
|
+
[part="iconAliasDeleted"],
|
|
50
|
+
[part="iconTagCreated"],
|
|
51
|
+
[part="iconTagDeleted"],
|
|
52
|
+
[part="iconAuthorModified"],
|
|
53
|
+
[part="iconDeprecated"] {
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-columns: 3.5rem 3.5rem 1fr auto auto;
|
|
56
|
+
padding: 0.25rem;
|
|
57
|
+
}
|
|
58
|
+
[part="iconCreated"] [part="avatar"],
|
|
59
|
+
[part="iconModified"] [part="avatar"],
|
|
60
|
+
[part="iconRenamed"] [part="avatar"],
|
|
61
|
+
[part="iconDeleted"] [part="avatar"],
|
|
62
|
+
[part="iconAliasCreated"] [part="avatar"],
|
|
63
|
+
[part="iconAliasDeleted"] [part="avatar"],
|
|
64
|
+
[part="iconTagCreated"] [part="avatar"],
|
|
65
|
+
[part="iconTagDeleted"] [part="avatar"],
|
|
66
|
+
[part="iconAuthorModified"] [part="avatar"],
|
|
67
|
+
[part="iconDeprecated"] [part="avatar"] {
|
|
68
|
+
grid-column: 1;
|
|
69
|
+
}
|
|
70
|
+
[part="iconCreated"] [part="icon"],
|
|
71
|
+
[part="iconModified"] [part="iconDataBefore"],
|
|
72
|
+
[part="iconModified"] [part="iconDataAfter"],
|
|
73
|
+
[part="iconRenamed"] [part="icon"],
|
|
74
|
+
[part="iconDeleted"] [part="icon"],
|
|
75
|
+
[part="iconAliasCreated"] [part="icon"],
|
|
76
|
+
[part="iconAliasDeleted"] [part="icon"],
|
|
77
|
+
[part="iconTagCreated"] [part="icon"],
|
|
78
|
+
[part="iconTagDeleted"] [part="icon"],
|
|
79
|
+
[part="iconAuthorModified"] [part="icon"],
|
|
80
|
+
[part="iconDeprecated"] [part="icon"] {
|
|
81
|
+
grid-column: 2;
|
|
82
|
+
--pg-icon-width: 3rem;
|
|
83
|
+
--pg-icon-height: 3rem;
|
|
84
|
+
width: 3rem;
|
|
85
|
+
border: 1px solid #ddd;
|
|
86
|
+
background: #fff;
|
|
87
|
+
border-radius: 0.25rem;
|
|
88
|
+
align-self: flex-start;
|
|
89
|
+
}
|
|
90
|
+
[part="iconCreated"] [part="content"],
|
|
91
|
+
[part="iconModified"] [part="content"],
|
|
92
|
+
[part="iconRenamed"] [part="content"],
|
|
93
|
+
[part="iconDeleted"] [part="content"],
|
|
94
|
+
[part="iconAliasCreated"] [part="content"],
|
|
95
|
+
[part="iconAliasDeleted"] [part="content"],
|
|
96
|
+
[part="iconTagCreated"] [part="content"],
|
|
97
|
+
[part="iconTagDeleted"] [part="content"],
|
|
98
|
+
[part="iconAuthorModified"] [part="content"],
|
|
99
|
+
[part="iconDeprecated"] [part="content"] {
|
|
100
|
+
grid-column: 3;
|
|
101
|
+
align-content: center;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
}
|
|
105
|
+
[part="iconCreated"] [part="content"] code,
|
|
106
|
+
[part="iconModified"] [part="content"] code,
|
|
107
|
+
[part="iconRenamed"] [part="content"] code,
|
|
108
|
+
[part="iconDeleted"] [part="content"] code,
|
|
109
|
+
[part="iconAliasCreated"] [part="content"] code,
|
|
110
|
+
[part="iconAliasDeleted"] [part="content"] code,
|
|
111
|
+
[part="iconTagCreated"] [part="content"] code,
|
|
112
|
+
[part="iconTagDeleted"] [part="content"] code,
|
|
113
|
+
[part="iconAuthorModified"] [part="content"] code,
|
|
114
|
+
[part="iconDeprecated"] [part="content"] code {
|
|
115
|
+
display: inline-block;
|
|
116
|
+
background: rgba(0, 0, 0, 0.05);
|
|
117
|
+
padding: 0.125rem 0.25rem;
|
|
118
|
+
border-radius: 0.125rem;
|
|
119
|
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
|
|
120
|
+
border: 1px solid rgba(69, 60, 79, 0.2);
|
|
121
|
+
line-height: 1.125rem;
|
|
122
|
+
}
|
|
123
|
+
[part="iconCreated"] [part="issue"],
|
|
124
|
+
[part="iconModified"] [part="issue"],
|
|
125
|
+
[part="iconRenamed"] [part="issue"],
|
|
126
|
+
[part="iconDeleted"] [part="issue"],
|
|
127
|
+
[part="iconAliasCreated"] [part="issue"],
|
|
128
|
+
[part="iconAliasDeleted"] [part="issue"],
|
|
129
|
+
[part="iconTagCreated"] [part="issue"],
|
|
130
|
+
[part="iconTagDeleted"] [part="issue"],
|
|
131
|
+
[part="iconDescriptionModified"] [part="issue"],
|
|
132
|
+
[part="iconAuthorModified"] [part="issue"],
|
|
133
|
+
[part="iconDeprecated"] [part="issue"] {
|
|
134
|
+
grid-column: 4;
|
|
135
|
+
display: flex;
|
|
136
|
+
align-self: center;
|
|
137
|
+
text-decoration: none;
|
|
138
|
+
padding: 0.25rem 0.5rem;
|
|
139
|
+
border: 1px solid #453C4F;
|
|
140
|
+
color: #453C4F;
|
|
141
|
+
border-radius: 0.25rem;
|
|
142
|
+
}
|
|
143
|
+
[part="iconCreated"] [part="issue"]:hover,
|
|
144
|
+
[part="iconModified"] [part="issue"]:hover,
|
|
145
|
+
[part="iconRenamed"] [part="issue"]:hover,
|
|
146
|
+
[part="iconDeleted"] [part="issue"]:hover,
|
|
147
|
+
[part="iconAliasCreated"] [part="issue"]:hover,
|
|
148
|
+
[part="iconAliasDeleted"] [part="issue"]:hover,
|
|
149
|
+
[part="iconTagCreated"] [part="issue"]:hover,
|
|
150
|
+
[part="iconTagDeleted"] [part="issue"]:hover,
|
|
151
|
+
[part="iconDescriptionModified"] [part="issue"]:hover,
|
|
152
|
+
[part="iconAuthorModified"] [part="issue"]:hover,
|
|
153
|
+
[part="iconDeprecated"] [part="issue"]:hover {
|
|
154
|
+
background: #453C4F;
|
|
155
|
+
color: #fff;
|
|
156
|
+
}
|
|
157
|
+
.edit [part="iconCreated"] [part="edit"],
|
|
158
|
+
.edit [part="iconModified"] [part="edit"],
|
|
159
|
+
.edit [part="iconRenamed"] [part="edit"],
|
|
160
|
+
.edit [part="iconDeleted"] [part="edit"],
|
|
161
|
+
.edit [part="iconAliasCreated"] [part="edit"],
|
|
162
|
+
.edit [part="iconAliasDeleted"] [part="edit"],
|
|
163
|
+
.edit [part="iconTagCreated"] [part="edit"],
|
|
164
|
+
.edit [part="iconTagDeleted"] [part="edit"],
|
|
165
|
+
.edit [part="iconDescriptionModified"] [part="edit"],
|
|
166
|
+
.edit [part="iconAuthorModified"] [part="edit"],
|
|
167
|
+
.edit [part="iconDeprecated"] [part="edit"] {
|
|
168
|
+
display: flex;
|
|
169
|
+
}
|
|
170
|
+
[part="iconCreated"] [part="edit"],
|
|
171
|
+
[part="iconModified"] [part="edit"],
|
|
172
|
+
[part="iconRenamed"] [part="edit"],
|
|
173
|
+
[part="iconDeleted"] [part="edit"],
|
|
174
|
+
[part="iconAliasCreated"] [part="edit"],
|
|
175
|
+
[part="iconAliasDeleted"] [part="edit"],
|
|
176
|
+
[part="iconTagCreated"] [part="edit"],
|
|
177
|
+
[part="iconTagDeleted"] [part="edit"],
|
|
178
|
+
[part="iconDescriptionModified"] [part="edit"],
|
|
179
|
+
[part="iconAuthorModified"] [part="edit"],
|
|
180
|
+
[part="iconDeprecated"] [part="edit"] {
|
|
181
|
+
display: none;
|
|
182
|
+
grid-column: 5;
|
|
183
|
+
align-self: center;
|
|
184
|
+
padding: 0.25rem;
|
|
185
|
+
border: 0;
|
|
186
|
+
border-radius: 0.25rem;
|
|
187
|
+
margin-left: 0.5rem;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
}
|
|
190
|
+
[part="iconCreated"] [part="edit"]:hover,
|
|
191
|
+
[part="iconModified"] [part="edit"]:hover,
|
|
192
|
+
[part="iconRenamed"] [part="edit"]:hover,
|
|
193
|
+
[part="iconDeleted"] [part="edit"]:hover,
|
|
194
|
+
[part="iconAliasCreated"] [part="edit"]:hover,
|
|
195
|
+
[part="iconAliasDeleted"] [part="edit"]:hover,
|
|
196
|
+
[part="iconTagCreated"] [part="edit"]:hover,
|
|
197
|
+
[part="iconTagDeleted"] [part="edit"]:hover,
|
|
198
|
+
[part="iconDescriptionModified"] [part="edit"]:hover,
|
|
199
|
+
[part="iconAuthorModified"] [part="edit"]:hover,
|
|
200
|
+
[part="iconDeprecated"] [part="edit"]:hover {
|
|
201
|
+
background: #453C4F;
|
|
202
|
+
--pg-icon-color: #fff;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Individiual Tweaks */
|
|
206
|
+
[part="iconCreated"] [part="icon"] {
|
|
207
|
+
background: #d1e7dd;
|
|
208
|
+
border-color: #badbcc;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[part="iconRenamed"] [part="icon"] {
|
|
212
|
+
background-color: #fff3cd;
|
|
213
|
+
border-color: #ffecb5;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
[part="iconDeleted"] [part="icon"] {
|
|
217
|
+
background: #f5c6cb;
|
|
218
|
+
border-color: #d06e78;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[part="iconModified"] {
|
|
222
|
+
display: grid;
|
|
223
|
+
grid-template-columns: 3.5rem 3.5rem 3.5rem 1fr auto auto;
|
|
224
|
+
padding: 0.25rem;
|
|
225
|
+
}
|
|
226
|
+
[part="iconModified"] [part="iconDataBefore"] {
|
|
227
|
+
opacity: 0.4;
|
|
228
|
+
}
|
|
229
|
+
[part="iconModified"] [part="iconDataAfter"] {
|
|
230
|
+
grid-column: 3;
|
|
231
|
+
}
|
|
232
|
+
[part="iconModified"] [part="content"] {
|
|
233
|
+
grid-column: 4;
|
|
234
|
+
}
|
|
235
|
+
[part="iconModified"] [part="issue"] {
|
|
236
|
+
grid-column: 5;
|
|
237
|
+
}
|
|
238
|
+
[part="iconModified"] [part="edit"] {
|
|
239
|
+
grid-column: 6;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
[part="iconAliasCreated"] [part="icon"],
|
|
243
|
+
[part="iconAliasDeleted"] [part="icon"] {
|
|
244
|
+
background-color: #DDC6E7;
|
|
245
|
+
border-color: 1px solid #DBBDE5;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
[part="iconTagCreated"] [part="icon"],
|
|
249
|
+
[part="iconTagDeleted"] [part="icon"] {
|
|
250
|
+
background-color: #cff4fc;
|
|
251
|
+
border-color: #b6effb;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
[part="iconDescriptionModified"] {
|
|
255
|
+
display: grid;
|
|
256
|
+
grid-template-columns: 3.5rem 3.5rem 1fr 0.5rem 1fr auto;
|
|
257
|
+
grid-template-rows: auto auto;
|
|
258
|
+
padding: 0.25rem;
|
|
259
|
+
}
|
|
260
|
+
[part="iconDescriptionModified"] [part="avatar"] {
|
|
261
|
+
grid-column: 1;
|
|
262
|
+
grid-row: 1 / span 2;
|
|
263
|
+
}
|
|
264
|
+
[part="iconDescriptionModified"] [part="icon"] {
|
|
265
|
+
grid-column: 2;
|
|
266
|
+
grid-row: 1 / span 2;
|
|
267
|
+
--pg-icon-width: 3rem;
|
|
268
|
+
--pg-icon-height: 3rem;
|
|
269
|
+
width: 3rem;
|
|
270
|
+
border: 1px solid #ddd;
|
|
271
|
+
background: #fff;
|
|
272
|
+
border-radius: 0.25rem;
|
|
273
|
+
align-self: flex-start;
|
|
274
|
+
}
|
|
275
|
+
[part="iconDescriptionModified"] [part="iconDescriptionBefore"] {
|
|
276
|
+
grid-column: 3;
|
|
277
|
+
grid-row: 1 / span 2;
|
|
278
|
+
border: 1px solid #DDD;
|
|
279
|
+
padding: 0 1rem;
|
|
280
|
+
background: #fff;
|
|
281
|
+
border-radius: 0.25rem;
|
|
282
|
+
}
|
|
283
|
+
[part="iconDescriptionModified"] [part="iconDescriptionAfter"] {
|
|
284
|
+
grid-column: 5;
|
|
285
|
+
grid-row: 1 / span 2;
|
|
286
|
+
border: 1px solid #DDD;
|
|
287
|
+
padding: 0 1rem;
|
|
288
|
+
background: #fff;
|
|
289
|
+
border-radius: 0.25rem;
|
|
290
|
+
}
|
|
291
|
+
[part="iconDescriptionModified"] [part="issue"] {
|
|
292
|
+
grid-column: 6;
|
|
293
|
+
grid-row: 1;
|
|
294
|
+
margin-left: 0.5rem;
|
|
295
|
+
}
|
|
296
|
+
[part="iconDescriptionModified"] [part="edit"] {
|
|
297
|
+
grid-column: 6;
|
|
298
|
+
grid-row: 2;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
margin-top: 0.25rem;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.added,
|
|
304
|
+
.created {
|
|
305
|
+
border-bottom: 3px solid #badbcc;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.removed,
|
|
309
|
+
.deleted {
|
|
310
|
+
border-bottom: 3px solid #f5c6cb;
|
|
311
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div part="items"></div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { selectComponent, getAttributes } from '@pictogrammers/element';
|
|
2
|
+
|
|
3
|
+
import './modification';
|
|
4
|
+
import PgModification from './modification';
|
|
5
|
+
|
|
6
|
+
const PG_MODIFICATION = 'pg-modification';
|
|
7
|
+
|
|
8
|
+
describe('pg-modification', () => {
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
var c = document.createElement(PG_MODIFICATION);
|
|
12
|
+
document.body.appendChild(c);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
afterEach(() => {
|
|
16
|
+
while (document.body.firstChild) {
|
|
17
|
+
document.body.removeChild(document.body.firstChild);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should be registered', () => {
|
|
22
|
+
expect(customElements.get(PG_MODIFICATION)).toBeDefined();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('should only expose known props', () => {
|
|
26
|
+
const props = getAttributes(PG_MODIFICATION);
|
|
27
|
+
expect(props.length).toBe(3);
|
|
28
|
+
expect(props).toContain('modifications');
|
|
29
|
+
expect(props).toContain('edit');
|
|
30
|
+
expect(props).toContain('github');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
});
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { Component, Prop, Part, node } from '@pictogrammers/element';
|
|
2
|
+
|
|
3
|
+
import template from './modification.html';
|
|
4
|
+
import style from './modification.css';
|
|
5
|
+
|
|
6
|
+
import templateDate from './type/date.html';
|
|
7
|
+
import templateNews from './type/news.html';
|
|
8
|
+
import templateIconCreated from './type/iconCreated.html';
|
|
9
|
+
import templateIconModified from './type/iconModified.html';
|
|
10
|
+
import templateIconRenamed from './type/iconRenamed.html';
|
|
11
|
+
import templateIconDeleted from './type/iconDeleted.html';
|
|
12
|
+
import templateIconAliasCreated from './type/iconAliasCreated.html';
|
|
13
|
+
import templateIconAliasDeleted from './type/iconAliasDeleted.html';
|
|
14
|
+
import templateIconTagCreated from './type/iconTagCreated.html';
|
|
15
|
+
import templateIconTagDeleted from './type/iconTagDeleted.html';
|
|
16
|
+
import templateIconDescriptionModified from './type/iconDescriptionModified.html';
|
|
17
|
+
import templateIconAuthorModified from './type/iconAuthorModified.html';
|
|
18
|
+
import templateIconDeprecated from './type/iconDeprecated.html';
|
|
19
|
+
|
|
20
|
+
import { Modification } from '../shared/models/modification';
|
|
21
|
+
import { list, item } from '../shared/list';
|
|
22
|
+
import { ModificationType } from '../shared/enums/modificationType';
|
|
23
|
+
import { addTooltip, BOTTOM_END, BOTTOM_START } from '../tooltip';
|
|
24
|
+
import { User } from '../shared/models/user';
|
|
25
|
+
import { Icon } from '../shared/models/icon';
|
|
26
|
+
|
|
27
|
+
const noIcon = 'M0 0h24v24H0V0zm2 2v20h20V2H2z';
|
|
28
|
+
const editIcon = 'M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z';
|
|
29
|
+
|
|
30
|
+
const mapTemplates = {
|
|
31
|
+
[ModificationType.News]: templateNews,
|
|
32
|
+
[ModificationType.IconCreated]: templateIconCreated,
|
|
33
|
+
[ModificationType.IconModified]: templateIconModified,
|
|
34
|
+
[ModificationType.IconRenamed]: templateIconRenamed,
|
|
35
|
+
[ModificationType.IconDeleted]: templateIconDeleted,
|
|
36
|
+
[ModificationType.IconAliasCreated]: templateIconAliasCreated,
|
|
37
|
+
[ModificationType.IconAliasDeleted]: templateIconAliasDeleted,
|
|
38
|
+
[ModificationType.IconTagCreated]: templateIconTagCreated,
|
|
39
|
+
[ModificationType.IconTagDeleted]: templateIconTagDeleted,
|
|
40
|
+
[ModificationType.IconDescriptionModified]: templateIconDescriptionModified,
|
|
41
|
+
[ModificationType.IconAuthorModified]: templateIconAuthorModified,
|
|
42
|
+
[ModificationType.IconDeprecated]: templateIconDeprecated,
|
|
43
|
+
[ModificationType.Date]: templateDate
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const months = [
|
|
47
|
+
"January",
|
|
48
|
+
"February",
|
|
49
|
+
"March",
|
|
50
|
+
"April",
|
|
51
|
+
"May",
|
|
52
|
+
"June",
|
|
53
|
+
"July",
|
|
54
|
+
"August",
|
|
55
|
+
"September",
|
|
56
|
+
"October",
|
|
57
|
+
"November",
|
|
58
|
+
"December"
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
function dateToString(date: string) {
|
|
62
|
+
const d = new Date(date);
|
|
63
|
+
const month = months[d.getMonth()];
|
|
64
|
+
return `${month} ${d.getDate()}, ${d.getFullYear()}`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function dateToUUID(date: string) {
|
|
68
|
+
const d = new Date(date);
|
|
69
|
+
const month = months[d.getMonth()];
|
|
70
|
+
return `${d.getFullYear()}-${month}-${d.getDate()}`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function itemsInsertDates(modifications) {
|
|
74
|
+
const items: Modification[] = [];
|
|
75
|
+
let unique = '';
|
|
76
|
+
modifications.forEach((m, i) => {
|
|
77
|
+
const date = dateToString(m.date);
|
|
78
|
+
if (unique !== date) {
|
|
79
|
+
items.push(new Modification().from({
|
|
80
|
+
id: `date-${dateToUUID(m.date)}`,
|
|
81
|
+
modificationId: ModificationType.Date,
|
|
82
|
+
text: date,
|
|
83
|
+
user: new User(),
|
|
84
|
+
icon: new Icon()
|
|
85
|
+
} as any));
|
|
86
|
+
unique = date;
|
|
87
|
+
}
|
|
88
|
+
items.push(m);
|
|
89
|
+
});
|
|
90
|
+
return items;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@Component({
|
|
94
|
+
selector: 'pg-modification',
|
|
95
|
+
style,
|
|
96
|
+
template
|
|
97
|
+
})
|
|
98
|
+
export default class PgModification extends HTMLElement {
|
|
99
|
+
@Prop() modifications: Modification[] | null = null;
|
|
100
|
+
@Prop() edit: boolean = false;
|
|
101
|
+
// Ex: pictogrammers/repo
|
|
102
|
+
@Prop() github: string = '';
|
|
103
|
+
|
|
104
|
+
@Part() $items: HTMLDivElement;
|
|
105
|
+
|
|
106
|
+
render(changes) {
|
|
107
|
+
if (changes.modifications && this.modifications) {
|
|
108
|
+
list(
|
|
109
|
+
this.$items,
|
|
110
|
+
itemsInsertDates(this.modifications),
|
|
111
|
+
'id',
|
|
112
|
+
(modification: Modification) => {
|
|
113
|
+
if (modification.modificationId in mapTemplates) {
|
|
114
|
+
const n = node<HTMLDivElement>(mapTemplates[modification.modificationId], {
|
|
115
|
+
text: {
|
|
116
|
+
innerText: modification.text
|
|
117
|
+
},
|
|
118
|
+
markdown: {
|
|
119
|
+
text: modification.text
|
|
120
|
+
},
|
|
121
|
+
icon: {
|
|
122
|
+
path: modification.icon && modification.icon.data
|
|
123
|
+
},
|
|
124
|
+
iconName: {
|
|
125
|
+
innerText: modification.icon && modification.icon.name
|
|
126
|
+
},
|
|
127
|
+
iconNameBefore: {
|
|
128
|
+
innerText: modification.iconNameBefore
|
|
129
|
+
},
|
|
130
|
+
iconNameAfter: {
|
|
131
|
+
innerText: modification.iconNameAfter
|
|
132
|
+
},
|
|
133
|
+
iconDescriptionBefore: {
|
|
134
|
+
text: modification.iconDescriptionBefore
|
|
135
|
+
},
|
|
136
|
+
iconDescriptionAfter: {
|
|
137
|
+
text: modification.iconDescriptionAfter
|
|
138
|
+
},
|
|
139
|
+
iconDataBefore: {
|
|
140
|
+
path: modification.iconDataBefore
|
|
141
|
+
},
|
|
142
|
+
iconDataAfter: {
|
|
143
|
+
path: modification.iconDataAfter
|
|
144
|
+
},
|
|
145
|
+
avatar: {
|
|
146
|
+
user: modification.user as any
|
|
147
|
+
},
|
|
148
|
+
editIcon: {
|
|
149
|
+
path: editIcon
|
|
150
|
+
},
|
|
151
|
+
issue: {
|
|
152
|
+
style: modification.issue ? '' : 'display:none',
|
|
153
|
+
innerText: modification.issue ? `#${modification.issue}` : '',
|
|
154
|
+
href: `https://github.com/${this.github}/issues/${modification.issue}`
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
const issue = n.querySelector('[part="issue"]');
|
|
158
|
+
if (issue) {
|
|
159
|
+
addTooltip(issue, () => {
|
|
160
|
+
return `View on GitHub`;
|
|
161
|
+
}, BOTTOM_END);
|
|
162
|
+
}
|
|
163
|
+
const avatar = n.querySelector('[part="avatar"]');
|
|
164
|
+
if (avatar) {
|
|
165
|
+
addTooltip(avatar, () => {
|
|
166
|
+
return modification.user.name;
|
|
167
|
+
}, BOTTOM_START);
|
|
168
|
+
}
|
|
169
|
+
const edit = n.querySelector('[part="edit"]');
|
|
170
|
+
if (edit) {
|
|
171
|
+
edit.addEventListener('click', () => {
|
|
172
|
+
this.dispatchEvent(new CustomEvent('edit', {
|
|
173
|
+
detail: {
|
|
174
|
+
modification
|
|
175
|
+
}
|
|
176
|
+
}));
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
return n;
|
|
180
|
+
}
|
|
181
|
+
const invalid = document.createElement('div');
|
|
182
|
+
invalid.classList.add('invalid');
|
|
183
|
+
invalid.innerText = `Error: Unsupported modificationId with text: "${modification.text}"`;
|
|
184
|
+
return invalid;
|
|
185
|
+
},
|
|
186
|
+
(modifiction, $item) => {
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
if (changes.edit) {
|
|
192
|
+
this.$items.classList.toggle('edit', this.edit);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
addItem(modification: Modification) {
|
|
197
|
+
const div = document.createElement('div');
|
|
198
|
+
|
|
199
|
+
this.$items.appendChild(div);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<h2 part="text"></h1>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div part="iconAliasCreated">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<span part="content">
|
|
5
|
+
<span>
|
|
6
|
+
<span class="added">Added</span> alias <code part="text"></code> to <code part="iconName"></code>.
|
|
7
|
+
</span>
|
|
8
|
+
</span>
|
|
9
|
+
<a part="issue"></a>
|
|
10
|
+
<button part="edit">
|
|
11
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div part="iconAliasDeleted">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<span part="content">
|
|
5
|
+
<span>
|
|
6
|
+
<span class="removed">Removed</span> alias <code part="text"></code> from <code part="iconName"></code>.
|
|
7
|
+
</span>
|
|
8
|
+
</span>
|
|
9
|
+
<a part="issue"></a>
|
|
10
|
+
<button part="edit">
|
|
11
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div part="iconAuthorModified">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<span part="content">
|
|
5
|
+
<span>
|
|
6
|
+
Author modified.
|
|
7
|
+
</span>
|
|
8
|
+
</span>
|
|
9
|
+
<a part="issue"></a>
|
|
10
|
+
<button part="edit">
|
|
11
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div part="iconCreated">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<span part="content">
|
|
5
|
+
<span>
|
|
6
|
+
Icon <code part="iconName"></code> <span class="created">created</span>.
|
|
7
|
+
</span>
|
|
8
|
+
</span>
|
|
9
|
+
<a part="issue"></a>
|
|
10
|
+
<button part="edit">
|
|
11
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div part="iconDeleted">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<span part="content">
|
|
5
|
+
<span>
|
|
6
|
+
Icon <code part="iconName"></code> <span class="deleted">deleted</span>.
|
|
7
|
+
</span>
|
|
8
|
+
</span>
|
|
9
|
+
<a part="issue"></a>
|
|
10
|
+
<button part="edit">
|
|
11
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div part="iconDeprecated">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<span part="content">
|
|
5
|
+
<span>
|
|
6
|
+
Deprecated. Warning this icon will be removed in a future release.
|
|
7
|
+
</span>
|
|
8
|
+
</span>
|
|
9
|
+
<a part="issue"></a>
|
|
10
|
+
<button part="edit">
|
|
11
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div part="iconDescriptionModified">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<pg-markdown part="iconDescriptionBefore"></pg-markdown>
|
|
5
|
+
<pg-markdown part="iconDescriptionAfter"></pg-markdown>
|
|
6
|
+
<a part="issue"></a>
|
|
7
|
+
<button part="edit">
|
|
8
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
9
|
+
</button>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div part="iconModified">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="iconDataBefore"></pg-icon>
|
|
4
|
+
<pg-icon part="iconDataAfter"></pg-icon>
|
|
5
|
+
<span part="content">
|
|
6
|
+
<span>
|
|
7
|
+
Icon <code part="iconName"></code> modified.
|
|
8
|
+
</span>
|
|
9
|
+
</span>
|
|
10
|
+
<a part="issue"></a>
|
|
11
|
+
<button part="edit">
|
|
12
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
13
|
+
</button>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div part="iconRenamed">
|
|
2
|
+
<pg-avatar part="avatar"></pg-avatar>
|
|
3
|
+
<pg-icon part="icon"></pg-icon>
|
|
4
|
+
<span part="content">
|
|
5
|
+
<span>
|
|
6
|
+
Icon <code part="iconNameBefore"></code> renamed to <code part="iconNameAfter"></code>.
|
|
7
|
+
</span>
|
|
8
|
+
</span>
|
|
9
|
+
<a part="issue"></a>
|
|
10
|
+
<button part="edit">
|
|
11
|
+
<pg-icon part="editIcon"></pg-icon>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|