@patternfly/quickstarts 2.4.2 → 5.0.0-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -23
- package/dist/ConsoleInternal/components/markdown-view.d.ts +19 -19
- package/dist/ConsoleInternal/components/utils/camel-case-wrap.d.ts +6 -6
- package/dist/ConsoleInternal/components/utils/index.d.ts +3 -3
- package/dist/ConsoleInternal/components/utils/router.d.ts +9 -9
- package/dist/ConsoleInternal/components/utils/status-box.d.ts +20 -20
- package/dist/ConsoleInternal/module/k8s/types.d.ts +42 -42
- package/dist/ConsoleShared/index.d.ts +1 -1
- package/dist/ConsoleShared/src/components/index.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-extensions/MarkdownCopyClipboard.d.ts +13 -13
- package/dist/ConsoleShared/src/components/markdown-extensions/accordion-extension.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.d.ts +6 -6
- package/dist/ConsoleShared/src/components/markdown-extensions/admonition-extension.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-extensions/code-extension.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-extensions/const.d.ts +5 -5
- package/dist/ConsoleShared/src/components/markdown-extensions/index.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-extensions/utils.d.ts +1 -1
- package/dist/ConsoleShared/src/components/markdown-highlight-extension/MarkdownHighlightExtension.d.ts +7 -7
- package/dist/ConsoleShared/src/components/markdown-highlight-extension/highlight-consts.d.ts +4 -4
- package/dist/ConsoleShared/src/components/markdown-highlight-extension/index.d.ts +1 -1
- package/dist/ConsoleShared/src/components/modal/Modal.d.ts +9 -9
- package/dist/ConsoleShared/src/components/modal/index.d.ts +1 -1
- package/dist/ConsoleShared/src/components/popper/Portal.d.ts +8 -7
- package/dist/ConsoleShared/src/components/popper/SimplePopper.d.ts +6 -3
- package/dist/ConsoleShared/src/components/popper/index.d.ts +2 -2
- package/dist/ConsoleShared/src/components/spotlight/InteractiveSpotlight.d.ts +7 -7
- package/dist/ConsoleShared/src/components/spotlight/Spotlight.d.ts +7 -7
- package/dist/ConsoleShared/src/components/spotlight/StaticSpotlight.d.ts +7 -7
- package/dist/ConsoleShared/src/components/spotlight/index.d.ts +1 -1
- package/dist/ConsoleShared/src/components/status/GenericStatus.d.ts +12 -11
- package/dist/ConsoleShared/src/components/status/NotStartedIcon.d.ts +3 -2
- package/dist/ConsoleShared/src/components/status/PopoverStatus.d.ts +13 -12
- package/dist/ConsoleShared/src/components/status/Status.d.ts +11 -11
- package/dist/ConsoleShared/src/components/status/StatusIconAndText.d.ts +8 -8
- package/dist/ConsoleShared/src/components/status/icons.d.ts +9 -9
- package/dist/ConsoleShared/src/components/status/index.d.ts +1 -1
- package/dist/ConsoleShared/src/components/status/statuses.d.ts +5 -5
- package/dist/ConsoleShared/src/components/status/types.d.ts +9 -7
- package/dist/ConsoleShared/src/components/utils/FallbackImg.d.ts +9 -9
- package/dist/ConsoleShared/src/components/utils/index.d.ts +1 -1
- package/dist/ConsoleShared/src/constants/index.d.ts +1 -1
- package/dist/ConsoleShared/src/constants/ui.d.ts +1 -1
- package/dist/ConsoleShared/src/hooks/index.d.ts +6 -6
- package/dist/ConsoleShared/src/hooks/scroll.d.ts +8 -8
- package/dist/ConsoleShared/src/hooks/useBoundingClientRect.d.ts +3 -1
- package/dist/ConsoleShared/src/hooks/useEventListener.d.ts +1 -1
- package/dist/ConsoleShared/src/hooks/useForceRender.d.ts +4 -4
- package/dist/ConsoleShared/src/hooks/useResizeObserver.d.ts +1 -1
- package/dist/ConsoleShared/src/hooks/useScrollShadows.d.ts +7 -7
- package/dist/ConsoleShared/src/index.d.ts +4 -4
- package/dist/ConsoleShared/src/utils/index.d.ts +1 -1
- package/dist/ConsoleShared/src/utils/useCombineRefs.d.ts +2 -2
- package/dist/HelpTopicDrawer.d.ts +33 -32
- package/dist/HelpTopicPanelContent.d.ts +11 -11
- package/dist/QuickStartCatalogPage.d.ts +14 -14
- package/dist/QuickStartCloseModal.d.ts +8 -8
- package/dist/QuickStartController.d.ts +10 -10
- package/dist/QuickStartDrawer.d.ts +62 -62
- package/dist/QuickStartMarkdownView.d.ts +9 -9
- package/dist/QuickStartPanelContent.d.ts +15 -15
- package/dist/catalog/Catalog/QuickStartCatalogHeader.d.ts +6 -6
- package/dist/catalog/Catalog/QuickStartCatalogSection.d.ts +5 -5
- package/dist/catalog/Catalog/QuickStartCatalogToolbar.d.ts +5 -5
- package/dist/catalog/Catalog/index.d.ts +3 -3
- package/dist/catalog/QuickStartCatalog.d.ts +8 -8
- package/dist/catalog/QuickStartTile.d.ts +11 -11
- package/dist/catalog/QuickStartTileDescription.d.ts +8 -8
- package/dist/catalog/QuickStartTileFooter.d.ts +8 -8
- package/dist/catalog/QuickStartTileFooterExternal.d.ts +8 -8
- package/dist/catalog/QuickStartTileHeader.d.ts +12 -12
- package/dist/catalog/Toolbar/QuickStartCatalogFilter.d.ts +10 -10
- package/dist/catalog/Toolbar/QuickStartCatalogFilterItems.d.ts +31 -31
- package/dist/catalog/index.d.ts +9 -9
- package/dist/controller/QuickStartConclusion.d.ts +12 -12
- package/dist/controller/QuickStartContent.d.ts +14 -14
- package/dist/controller/QuickStartFooter.d.ts +14 -14
- package/dist/controller/QuickStartIntroduction.d.ts +12 -12
- package/dist/controller/QuickStartTaskHeader.d.ts +15 -15
- package/dist/controller/QuickStartTaskHeaderList.d.ts +10 -10
- package/dist/controller/QuickStartTaskReview.d.ts +10 -10
- package/dist/controller/QuickStartTasks.d.ts +12 -12
- package/dist/data/mocks/json/explore-pipeline-quickstart.d.ts +2 -2
- package/dist/data/mocks/json/explore-serverless-quickstart.d.ts +2 -2
- package/dist/data/mocks/json/monitor-sampleapp-quickstart.d.ts +2 -2
- package/dist/data/mocks/json/tour-icons.d.ts +2 -2
- package/dist/data/quick-start-test-data.d.ts +2 -2
- package/dist/data/test-utils.d.ts +8 -7
- package/dist/index.d.ts +16 -16
- package/dist/index.es.js +2346 -2391
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2346 -2390
- package/dist/index.js.map +1 -1
- package/dist/patternfly-docs/quick-starts/examples/Basic.jsx +1 -1
- package/dist/patternfly-docs/quick-starts/examples/HelpTopic.jsx +2 -4
- package/dist/patternfly-global.css +752 -1110
- package/dist/patternfly-nested.css +8784 -9605
- package/dist/quickstarts-base.css +188 -188
- package/dist/quickstarts-full.es.js +19627 -10887
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +216 -219
- package/dist/quickstarts-standalone.min.css +4 -4
- package/dist/quickstarts-vendor.css +71 -71
- package/dist/quickstarts.css +259 -259
- package/dist/quickstarts.min.css +1 -1
- package/dist/styles/patternfly-global-entry.d.ts +1 -1
- package/dist/styles/patternfly-nested-entry.d.ts +1 -1
- package/dist/styles/quickstarts-standalone-entry.d.ts +1 -1
- package/dist/styles/vendor-entry.d.ts +1 -1
- package/dist/utils/PluralResolver.d.ts +16 -10
- package/dist/utils/asciidoc-procedure-parser.d.ts +12 -12
- package/dist/utils/const.d.ts +6 -6
- package/dist/utils/help-topic-context.d.ts +23 -23
- package/dist/utils/help-topic-types.d.ts +13 -13
- package/dist/utils/quick-start-context.d.ts +81 -81
- package/dist/utils/quick-start-types.d.ts +60 -58
- package/dist/utils/quick-start-utils.d.ts +10 -10
- package/dist/utils/useLocalStorage.d.ts +1 -1
- package/package.json +17 -13
- package/src/ConsoleInternal/components/_icon-and-text.scss +2 -2
- package/src/ConsoleInternal/components/catalog/_catalog.scss +20 -20
- package/src/ConsoleInternal/components/markdown-view.tsx +23 -52
- package/src/ConsoleInternal/components/utils/_status-box.scss +1 -1
- package/src/ConsoleInternal/components/utils/camel-case-wrap.tsx +3 -3
- package/src/ConsoleInternal/components/utils/router.ts +0 -2
- package/src/ConsoleInternal/components/utils/status-box.tsx +8 -46
- package/src/ConsoleInternal/module/k8s/types.ts +6 -6
- package/src/ConsoleShared/src/components/layout/PageLayout.scss +10 -10
- package/src/ConsoleShared/src/components/markdown-extensions/MarkdownCopyClipboard.tsx +13 -11
- package/src/ConsoleShared/src/components/markdown-extensions/accordion-extension.tsx +3 -4
- package/src/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.tsx +7 -7
- package/src/ConsoleShared/src/components/markdown-extensions/admonition-extension.tsx +4 -4
- package/src/ConsoleShared/src/components/markdown-extensions/code-extension.tsx +1 -3
- package/src/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.tsx +5 -5
- package/src/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.tsx +8 -8
- package/src/ConsoleShared/src/components/markdown-extensions/showdown-extension.scss +5 -5
- package/src/ConsoleShared/src/components/markdown-extensions/utils.ts +1 -3
- package/src/ConsoleShared/src/components/markdown-highlight-extension/MarkdownHighlightExtension.tsx +7 -6
- package/src/ConsoleShared/src/components/popper/Portal.tsx +6 -4
- package/src/ConsoleShared/src/components/popper/SimplePopper.tsx +7 -5
- package/src/ConsoleShared/src/components/spotlight/InteractiveSpotlight.tsx +2 -2
- package/src/ConsoleShared/src/components/spotlight/Spotlight.tsx +2 -2
- package/src/ConsoleShared/src/components/spotlight/StaticSpotlight.tsx +3 -3
- package/src/ConsoleShared/src/components/spotlight/spotlight.scss +4 -4
- package/src/ConsoleShared/src/components/status/GenericStatus.tsx +1 -0
- package/src/ConsoleShared/src/components/status/PopoverStatus.tsx +20 -23
- package/src/ConsoleShared/src/components/status/Status.tsx +2 -2
- package/src/ConsoleShared/src/components/status/icons.tsx +17 -55
- package/src/ConsoleShared/src/components/status/statuses.tsx +1 -17
- package/src/ConsoleShared/src/components/status/types.ts +3 -2
- package/src/ConsoleShared/src/components/utils/FallbackImg.tsx +2 -2
- package/src/ConsoleShared/src/hooks/useResizeObserver.ts +5 -6
- package/src/ConsoleShared/src/utils/useCombineRefs.ts +2 -3
- package/src/HelpTopicDrawer.tsx +6 -14
- package/src/HelpTopicPanelContent.tsx +57 -49
- package/src/QuickStartCatalogPage.tsx +19 -14
- package/src/QuickStartCloseModal.tsx +2 -2
- package/src/QuickStartController.tsx +3 -5
- package/src/QuickStartDrawer.scss +1 -1
- package/src/QuickStartDrawer.tsx +2 -2
- package/src/QuickStartMarkdownView.tsx +4 -4
- package/src/QuickStartPanelContent.scss +8 -8
- package/src/QuickStartPanelContent.tsx +8 -9
- package/src/catalog/Catalog/QuickStartCatalogHeader.tsx +2 -2
- package/src/catalog/Catalog/QuickStartCatalogSection.tsx +2 -2
- package/src/catalog/Catalog/QuickStartCatalogToolbar.tsx +2 -2
- package/src/catalog/QuickStartCatalog.scss +1 -1
- package/src/catalog/QuickStartCatalog.tsx +2 -2
- package/src/catalog/QuickStartTile.tsx +20 -15
- package/src/catalog/QuickStartTileDescription.scss +4 -4
- package/src/catalog/QuickStartTileDescription.tsx +2 -2
- package/src/catalog/QuickStartTileFooter.tsx +2 -2
- package/src/catalog/QuickStartTileFooterExternal.tsx +2 -2
- package/src/catalog/QuickStartTileHeader.scss +5 -5
- package/src/catalog/QuickStartTileHeader.tsx +2 -2
- package/src/catalog/Toolbar/QuickStartCatalogFilter.scss +9 -9
- package/src/catalog/Toolbar/QuickStartCatalogFilter.tsx +1 -3
- package/src/catalog/Toolbar/QuickStartCatalogFilterItems.tsx +49 -30
- package/src/controller/QuickStartConclusion.tsx +3 -3
- package/src/controller/QuickStartContent.scss +2 -2
- package/src/controller/QuickStartContent.tsx +2 -2
- package/src/controller/QuickStartFooter.scss +3 -3
- package/src/controller/QuickStartFooter.tsx +6 -10
- package/src/controller/QuickStartIntroduction.scss +7 -7
- package/src/controller/QuickStartIntroduction.tsx +5 -7
- package/src/controller/QuickStartTaskHeader.scss +15 -15
- package/src/controller/QuickStartTaskHeader.tsx +14 -12
- package/src/controller/QuickStartTaskHeaderList.scss +1 -1
- package/src/controller/QuickStartTaskHeaderList.tsx +3 -5
- package/src/controller/QuickStartTaskReview.scss +7 -7
- package/src/controller/QuickStartTaskReview.tsx +2 -2
- package/src/controller/QuickStartTasks.scss +13 -13
- package/src/controller/QuickStartTasks.tsx +2 -2
- package/src/controller/__tests__/QuickStartTaskHeader.spec.tsx +4 -17
- package/src/styles/_base.scss +5 -5
- package/src/styles/_dark-custom-override.scss +28 -28
- package/src/styles/legacy-bootstrap/_variables.scss +7 -7
- package/src/styles/patternfly-global.scss +6 -6
- package/src/styles/patternfly-nested.scss +1 -1
- package/src/utils/PluralResolver.ts +29 -23
- package/src/utils/asciidoc-procedure-parser.ts +2 -4
- package/src/utils/help-topic-context.tsx +3 -5
- package/src/utils/help-topic-types.ts +4 -4
- package/src/utils/quick-start-context.tsx +8 -12
- package/src/utils/quick-start-types.ts +15 -14
- package/src/utils/quick-start-utils.ts +2 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/quickstarts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-prerelease.0",
|
|
4
4
|
"description": "PatternFly quick starts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -51,18 +51,22 @@
|
|
|
51
51
|
"showdown": ">=1.8.6"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@patternfly/react-catalog-view-extension": "^
|
|
54
|
+
"@patternfly/react-catalog-view-extension": "^5.0.0-prerelease.1",
|
|
55
55
|
"dompurify": "^2.2.6",
|
|
56
56
|
"history": "^5.0.0",
|
|
57
57
|
"showdown": "1.8.6"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@patternfly/documentation-framework": "^
|
|
61
|
-
"@patternfly/patternfly": "^
|
|
62
|
-
"@patternfly/react-core": "^
|
|
63
|
-
"@patternfly/react-icons": "
|
|
64
|
-
"@patternfly/react-styles": "
|
|
65
|
-
"@patternfly/react-tokens": "
|
|
60
|
+
"@patternfly/documentation-framework": "^2.0.0-alpha.73",
|
|
61
|
+
"@patternfly/patternfly": "^5.0.0-prerelease.10",
|
|
62
|
+
"@patternfly/react-core": "^5.0.0-prerelease.13",
|
|
63
|
+
"@patternfly/react-icons": "^5.0.0-prerelease.7",
|
|
64
|
+
"@patternfly/react-styles": "^5.0.0-prerelease.5",
|
|
65
|
+
"@patternfly/react-tokens": "^5.0.0-prerelease.5",
|
|
66
|
+
"@patternfly/react-table": "^5.0.0-prerelease.13",
|
|
67
|
+
"@patternfly/react-code-editor": "^5.0.0-prerelease.13",
|
|
68
|
+
"react-monaco-editor": "0.51.0",
|
|
69
|
+
"monaco-editor": "0.34.1",
|
|
66
70
|
"@rollup/plugin-commonjs": "^17.0.0",
|
|
67
71
|
"@rollup/plugin-json": "^4.1.0",
|
|
68
72
|
"@rollup/plugin-node-resolve": "^11.1.0",
|
|
@@ -72,8 +76,8 @@
|
|
|
72
76
|
"@types/enzyme-adapter-react-16": "^1.0.6",
|
|
73
77
|
"@types/history": "^4.7.8",
|
|
74
78
|
"@types/node": "^14.14.35",
|
|
75
|
-
"@types/react": "^
|
|
76
|
-
"@types/react-dom": "^
|
|
79
|
+
"@types/react": "^18.2.6",
|
|
80
|
+
"@types/react-dom": "^18.2.4",
|
|
77
81
|
"clean-css-cli": "^4.3.0",
|
|
78
82
|
"concat-files": "^0.1.1",
|
|
79
83
|
"dart-sass": "^1.25.0",
|
|
@@ -81,12 +85,12 @@
|
|
|
81
85
|
"enzyme-adapter-react-16": "^1.15.5",
|
|
82
86
|
"enzyme-to-json": "^3.6.1",
|
|
83
87
|
"node-sass-glob-importer": "^5.3.2",
|
|
84
|
-
"prettier": "^2.
|
|
88
|
+
"prettier": "^2.8.8",
|
|
85
89
|
"purgecss": "^4.0.0",
|
|
86
|
-
"react": "^
|
|
90
|
+
"react": "^18.2.0",
|
|
87
91
|
"react-axe": "^3.5.4",
|
|
88
92
|
"react-docgen-typescript-loader": "^3.7.2",
|
|
89
|
-
"react-dom": "^
|
|
93
|
+
"react-dom": "^18.2.0",
|
|
90
94
|
"regenerator-runtime": "^0.13.7",
|
|
91
95
|
"rimraf": "^3.0.2",
|
|
92
96
|
"rollup": "^2.37.0",
|
|
@@ -7,7 +7,7 @@ $pfext-m-catalog-tile-width: 260px;
|
|
|
7
7
|
|
|
8
8
|
$catalog-capability-level-icon-left: -20px;
|
|
9
9
|
$catalog-capability-level-icon-top: 4px;
|
|
10
|
-
$catalog-capability-level-inactive-color: var(--pf-global--Color--400);
|
|
10
|
+
$catalog-capability-level-inactive-color: var(--pf-v5-global--Color--400);
|
|
11
11
|
$catalog-item-icon-size-lg: 40px;
|
|
12
12
|
$catalog-item-icon-size-sm: 24px;
|
|
13
13
|
$pfext-modal-ignore-warning-icon-width: 30px;
|
|
@@ -32,7 +32,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
32
32
|
.pfext-catalog-tile-view {
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-wrap: wrap;
|
|
35
|
-
--pf-l-gallery--GridTemplateColumns: repeat(auto-fill, 260px) !important;
|
|
35
|
+
--pf-v5-l-gallery--GridTemplateColumns: repeat(auto-fill, 260px) !important;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.pfext-catalog__body {
|
|
@@ -51,7 +51,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&__kind-label {
|
|
54
|
-
font-weight: var(--pf-global--FontWeight--bold);
|
|
54
|
+
font-weight: var(--pf-v5-global--FontWeight--bold);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
&__name {
|
|
@@ -103,7 +103,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
103
103
|
|
|
104
104
|
.pfext-catalog-page {
|
|
105
105
|
background: $color-pf-white;
|
|
106
|
-
border: 1px solid var(--pf-global--BorderColor--300);
|
|
106
|
+
border: 1px solid var(--pf-v5-global--BorderColor--300);
|
|
107
107
|
display: flex;
|
|
108
108
|
flex: 1;
|
|
109
109
|
padding-top: math.div($grid-gutter-width, 2);
|
|
@@ -115,7 +115,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
115
115
|
|
|
116
116
|
&__btn-group__group-by {
|
|
117
117
|
display: inline;
|
|
118
|
-
margin-left: var(--pf-global--spacer--md);
|
|
118
|
+
margin-left: var(--pf-v5-global--spacer--md);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
&__content {
|
|
@@ -146,11 +146,11 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
&__grouped-items {
|
|
149
|
-
margin-bottom: var(--pf-global--spacer--md);
|
|
149
|
+
margin-bottom: var(--pf-v5-global--spacer--md);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
&__group-title {
|
|
153
|
-
margin-bottom: var(--pf-global--spacer--sm);
|
|
153
|
+
margin-bottom: var(--pf-v5-global--spacer--sm);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
&__header {
|
|
@@ -163,7 +163,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
&__hint {
|
|
166
|
-
margin: 0 0 var(--pf-global--spacer--md) 0;
|
|
166
|
+
margin: 0 0 var(--pf-v5-global--spacer--md) 0;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
&__input {
|
|
@@ -174,11 +174,11 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
174
174
|
|
|
175
175
|
&__sort {
|
|
176
176
|
display: inline;
|
|
177
|
-
margin-left: var(--pf-global--spacer--md);
|
|
177
|
+
margin-left: var(--pf-v5-global--spacer--md);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
&__num-items {
|
|
181
|
-
font-weight: var(--pf-global--FontWeight--bold);
|
|
181
|
+
font-weight: var(--pf-v5-global--FontWeight--bold);
|
|
182
182
|
padding: 0 0 20px;
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -207,9 +207,9 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
207
207
|
bottom: 0;
|
|
208
208
|
padding: 0 !important;
|
|
209
209
|
right: 0;
|
|
210
|
-
top: 4.75rem; // --pf-c-page__header--MinHeight
|
|
210
|
+
top: 4.75rem; // --pf-v5-c-page__header--MinHeight
|
|
211
211
|
|
|
212
|
-
.pf-c-modal-box__body {
|
|
212
|
+
.pf-v5-c-modal-box__body {
|
|
213
213
|
// Required to position scroll shadows correctly on Chrome
|
|
214
214
|
display: flex;
|
|
215
215
|
flex-direction: column;
|
|
@@ -230,7 +230,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
230
230
|
&__overlay-action {
|
|
231
231
|
align-items: baseline;
|
|
232
232
|
display: inline-flex !important;
|
|
233
|
-
margin: var(--pf-global--spacer--sm) var(--pf-global--spacer--sm) 0 0;
|
|
233
|
+
margin: var(--pf-v5-global--spacer--sm) var(--pf-v5-global--spacer--sm) 0 0;
|
|
234
234
|
overflow-x: hidden;
|
|
235
235
|
}
|
|
236
236
|
|
|
@@ -248,19 +248,19 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
248
248
|
&__overlay-actions {
|
|
249
249
|
display: flex;
|
|
250
250
|
flex-wrap: wrap;
|
|
251
|
-
margin-bottom: var(--pf-global--spacer--md);
|
|
251
|
+
margin-bottom: var(--pf-v5-global--spacer--md);
|
|
252
252
|
white-space: normal;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
&__overlay-header {
|
|
256
|
-
margin-bottom: var(--pf-global--spacer--md);
|
|
256
|
+
margin-bottom: var(--pf-v5-global--spacer--md);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
&__overlay-body {
|
|
260
260
|
margin: 0;
|
|
261
|
-
padding-left: var(--pf-global--spacer--lg);
|
|
262
|
-
padding-right: var(--pf-global--spacer--lg);
|
|
263
|
-
padding-top: var(--pf-global--spacer--md);
|
|
261
|
+
padding-left: var(--pf-v5-global--spacer--lg);
|
|
262
|
+
padding-right: var(--pf-v5-global--spacer--lg);
|
|
263
|
+
padding-top: var(--pf-v5-global--spacer--md);
|
|
264
264
|
@media (min-width: $screen-sm-min) {
|
|
265
265
|
display: flex;
|
|
266
266
|
}
|
|
@@ -303,13 +303,13 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
@media screen and (min-width: $screen-sm) {
|
|
306
|
-
.pf-c-modal-box.pfext-catalog-page__overlay {
|
|
306
|
+
.pf-v5-c-modal-box.pfext-catalog-page__overlay {
|
|
307
307
|
width: 600px;
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
@media screen and (min-width: $screen-md) {
|
|
312
|
-
.pf-c-modal-box.pfext-catalog-page__overlay {
|
|
312
|
+
.pf-v5-c-modal-box.pfext-catalog-page__overlay {
|
|
313
313
|
width: 900px;
|
|
314
314
|
}
|
|
315
315
|
}
|
|
@@ -10,11 +10,11 @@ const DOMPurify = require('dompurify');
|
|
|
10
10
|
|
|
11
11
|
// const tableTags = ['table', 'thead', 'tbody', 'tr', 'th', 'td'];
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
interface ShowdownExtension {
|
|
14
14
|
type: string;
|
|
15
15
|
regex?: RegExp;
|
|
16
16
|
replace?: (...args: any[]) => string;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
export const markdownConvert = (markdown, extensions?: ShowdownExtension[]) => {
|
|
20
20
|
const converter = new Converter({
|
|
@@ -28,7 +28,7 @@ export const markdownConvert = (markdown, extensions?: ShowdownExtension[]) => {
|
|
|
28
28
|
converter.addExtension(extensions);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
DOMPurify.addHook('beforeSanitizeElements', function(node) {
|
|
31
|
+
DOMPurify.addHook('beforeSanitizeElements', function (node) {
|
|
32
32
|
// nodeType 1 = element type
|
|
33
33
|
|
|
34
34
|
// transform anchor tags
|
|
@@ -42,13 +42,13 @@ export const markdownConvert = (markdown, extensions?: ShowdownExtension[]) => {
|
|
|
42
42
|
node.nodeType === 1 &&
|
|
43
43
|
(node.nodeName.toLowerCase() === 'ul' || node.nodeName.toLowerCase() === 'ol')
|
|
44
44
|
) {
|
|
45
|
-
node.setAttribute('class', 'pf-c-list');
|
|
45
|
+
node.setAttribute('class', 'pf-v5-c-list');
|
|
46
46
|
return node;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
// Add a hook to make all links open a new window
|
|
51
|
-
DOMPurify.addHook('afterSanitizeAttributes', function(node) {
|
|
51
|
+
DOMPurify.addHook('afterSanitizeAttributes', function (node) {
|
|
52
52
|
// set all elements owning target to target=_blank
|
|
53
53
|
if ('target' in node) {
|
|
54
54
|
node.setAttribute('target', '_blank');
|
|
@@ -67,47 +67,18 @@ export const markdownConvert = (markdown, extensions?: ShowdownExtension[]) => {
|
|
|
67
67
|
html: true,
|
|
68
68
|
svg: true,
|
|
69
69
|
},
|
|
70
|
-
// ALLOWED_TAGS: [
|
|
71
|
-
// 'b',
|
|
72
|
-
// 'i',
|
|
73
|
-
// 'strike',
|
|
74
|
-
// 's',
|
|
75
|
-
// 'del',
|
|
76
|
-
// 'em',
|
|
77
|
-
// 'strong',
|
|
78
|
-
// 'a',
|
|
79
|
-
// 'p',
|
|
80
|
-
// 'h1',
|
|
81
|
-
// 'h2',
|
|
82
|
-
// 'h3',
|
|
83
|
-
// 'h4',
|
|
84
|
-
// 'ul',
|
|
85
|
-
// 'ol',
|
|
86
|
-
// 'li',
|
|
87
|
-
// 'code',
|
|
88
|
-
// 'pre',
|
|
89
|
-
// 'button',
|
|
90
|
-
// ...tableTags,
|
|
91
|
-
// 'div',
|
|
92
|
-
// 'img',
|
|
93
|
-
// 'span',
|
|
94
|
-
// 'svg',
|
|
95
|
-
// ],
|
|
96
|
-
// ALLOWED_ATTR: ['href', 'target', 'rel', 'class', 'src', 'alt', 'id'],
|
|
97
|
-
// ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto|didact):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i,
|
|
98
70
|
});
|
|
99
71
|
};
|
|
100
72
|
|
|
101
|
-
|
|
73
|
+
interface SyncMarkdownProps {
|
|
102
74
|
content?: string;
|
|
103
75
|
emptyMsg?: string;
|
|
104
76
|
exactHeight?: boolean;
|
|
105
|
-
/* truncateContent?: boolean; */
|
|
106
77
|
extensions?: ShowdownExtension[];
|
|
107
|
-
renderExtension?: (contentDocument:
|
|
78
|
+
renderExtension?: (contentDocument: Document, rootSelector: string) => React.ReactNode;
|
|
108
79
|
inline?: boolean;
|
|
109
80
|
className?: string;
|
|
110
|
-
}
|
|
81
|
+
}
|
|
111
82
|
|
|
112
83
|
type InnerSyncMarkdownProps = Pick<SyncMarkdownProps, 'renderExtension' | 'exactHeight'> & {
|
|
113
84
|
markup: string;
|
|
@@ -116,7 +87,6 @@ type InnerSyncMarkdownProps = Pick<SyncMarkdownProps, 'renderExtension' | 'exact
|
|
|
116
87
|
};
|
|
117
88
|
|
|
118
89
|
export const SyncMarkdownView: React.FC<SyncMarkdownProps> = ({
|
|
119
|
-
// truncateContent,
|
|
120
90
|
content,
|
|
121
91
|
emptyMsg,
|
|
122
92
|
extensions,
|
|
@@ -126,9 +96,10 @@ export const SyncMarkdownView: React.FC<SyncMarkdownProps> = ({
|
|
|
126
96
|
className,
|
|
127
97
|
}) => {
|
|
128
98
|
const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
|
|
129
|
-
const markup = React.useMemo(
|
|
130
|
-
|
|
131
|
-
|
|
99
|
+
const markup = React.useMemo(
|
|
100
|
+
() => markdownConvert(content || emptyMsg || getResource('Not available'), extensions),
|
|
101
|
+
[content, emptyMsg, extensions, getResource],
|
|
102
|
+
);
|
|
132
103
|
const innerProps: InnerSyncMarkdownProps = {
|
|
133
104
|
renderExtension: extensions?.length > 0 ? renderExtension : undefined,
|
|
134
105
|
exactHeight,
|
|
@@ -139,21 +110,21 @@ export const SyncMarkdownView: React.FC<SyncMarkdownProps> = ({
|
|
|
139
110
|
return inline ? <InlineMarkdownView {...innerProps} /> : <IFrameMarkdownView {...innerProps} />;
|
|
140
111
|
};
|
|
141
112
|
|
|
142
|
-
const uniqueId = (function() {
|
|
113
|
+
const uniqueId = (function () {
|
|
143
114
|
let num = 0;
|
|
144
|
-
return function(prefix) {
|
|
115
|
+
return function (prefix) {
|
|
145
116
|
const prefixStr = String(prefix) || '';
|
|
146
117
|
num += 1;
|
|
147
118
|
return prefixStr + num;
|
|
148
119
|
};
|
|
149
120
|
})();
|
|
150
121
|
|
|
151
|
-
|
|
152
|
-
renderExtension: (contentDocument:
|
|
122
|
+
interface RenderExtensionProps {
|
|
123
|
+
renderExtension: (contentDocument: Document, rootSelector: string) => React.ReactNode;
|
|
153
124
|
selector: string;
|
|
154
125
|
markup: string;
|
|
155
|
-
docContext?:
|
|
156
|
-
}
|
|
126
|
+
docContext?: Document;
|
|
127
|
+
}
|
|
157
128
|
|
|
158
129
|
const RenderExtension: React.FC<RenderExtensionProps> = ({
|
|
159
130
|
renderExtension,
|
|
@@ -213,7 +184,7 @@ const IFrameMarkdownView: React.FC<InnerSyncMarkdownProps> = ({
|
|
|
213
184
|
}) => {
|
|
214
185
|
const [frame, setFrame] = React.useState<HTMLIFrameElement>();
|
|
215
186
|
const [loaded, setLoaded] = React.useState(false);
|
|
216
|
-
const updateTimeoutHandle = React.useRef<
|
|
187
|
+
const updateTimeoutHandle = React.useRef<NodeJS.Timeout>();
|
|
217
188
|
|
|
218
189
|
const updateDimensions = React.useCallback(() => {
|
|
219
190
|
if (!frame?.contentWindow?.document.body.firstChild) {
|
|
@@ -222,14 +193,14 @@ const IFrameMarkdownView: React.FC<InnerSyncMarkdownProps> = ({
|
|
|
222
193
|
frame.style.height = `${frame.contentWindow.document.body.firstElementChild.scrollHeight}px`;
|
|
223
194
|
|
|
224
195
|
// Let the new height take effect, then reset again once we recompute
|
|
225
|
-
// @ts-ignore
|
|
226
196
|
updateTimeoutHandle.current = setTimeout(() => {
|
|
227
197
|
if (exactHeight) {
|
|
228
198
|
frame.style.height = `${frame.contentWindow.document.body.firstElementChild.scrollHeight}px`;
|
|
229
199
|
} else {
|
|
230
200
|
// Increase by 15px for the case where a horizontal scrollbar might appear
|
|
231
|
-
frame.style.height = `${
|
|
232
|
-
15
|
|
201
|
+
frame.style.height = `${
|
|
202
|
+
frame.contentWindow.document.body.firstElementChild.scrollHeight + 15
|
|
203
|
+
}px`;
|
|
233
204
|
}
|
|
234
205
|
});
|
|
235
206
|
}, [frame, exactHeight]);
|
|
@@ -263,7 +234,7 @@ const IFrameMarkdownView: React.FC<InnerSyncMarkdownProps> = ({
|
|
|
263
234
|
body {
|
|
264
235
|
background-color: transparent !important;
|
|
265
236
|
color: ${isEmpty ? '#999' : '#333'};
|
|
266
|
-
font-family: var(--pf-global--FontFamily--sans-serif);
|
|
237
|
+
font-family: var(--pf-v5-global--FontFamily--sans-serif);
|
|
267
238
|
min-width: auto !important;
|
|
268
239
|
}
|
|
269
240
|
table {
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
const MEMO = {};
|
|
4
4
|
|
|
5
|
-
export const CamelCaseWrap: React.
|
|
5
|
+
export const CamelCaseWrap: React.FC<CamelCaseWrapProps> = ({ value, dataTest }) => {
|
|
6
6
|
if (!value) {
|
|
7
7
|
return '-';
|
|
8
8
|
}
|
|
@@ -27,7 +27,7 @@ export const CamelCaseWrap: React.SFC<CamelCaseWrapProps> = ({ value, dataTest }
|
|
|
27
27
|
return rendered;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export
|
|
30
|
+
export interface CamelCaseWrapProps {
|
|
31
31
|
value: string;
|
|
32
32
|
dataTest?: string;
|
|
33
|
-
}
|
|
33
|
+
}
|
|
@@ -23,7 +23,6 @@ export const removeQueryArgument = (k: string) => {
|
|
|
23
23
|
if (params.has(k)) {
|
|
24
24
|
params.delete(k);
|
|
25
25
|
const url = new URL(window.location.href);
|
|
26
|
-
// @ts-ignore
|
|
27
26
|
history.replace(`${url.pathname}?${params.toString()}${url.hash}`);
|
|
28
27
|
}
|
|
29
28
|
};
|
|
@@ -36,7 +35,6 @@ export const setQueryArgument = (k: string, v: string) => {
|
|
|
36
35
|
if (params.get(k) !== v) {
|
|
37
36
|
params.set(k, v);
|
|
38
37
|
const url = new URL(window.location.href);
|
|
39
|
-
// @ts-ignore
|
|
40
38
|
history.replace(`${url.pathname}?${params.toString()}${url.hash}`);
|
|
41
39
|
}
|
|
42
40
|
};
|
|
@@ -37,58 +37,20 @@ export const EmptyBox: React.FC<EmptyBoxProps> = ({ label }) => {
|
|
|
37
37
|
};
|
|
38
38
|
EmptyBox.displayName = 'EmptyBox';
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
interface BoxProps {
|
|
41
41
|
children: React.ReactNode;
|
|
42
42
|
className?: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
type LoadErrorProps = {
|
|
46
|
-
label: string;
|
|
47
|
-
className?: string;
|
|
48
|
-
message?: string;
|
|
49
|
-
canRetry?: boolean;
|
|
50
|
-
};
|
|
43
|
+
}
|
|
51
44
|
|
|
52
|
-
|
|
45
|
+
interface LoadingProps {
|
|
53
46
|
className?: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
type LoadingBoxProps = {
|
|
57
|
-
className?: string;
|
|
58
|
-
message?: string;
|
|
59
|
-
};
|
|
47
|
+
}
|
|
60
48
|
|
|
61
|
-
|
|
62
|
-
label?: string;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
type MsgBoxProps = {
|
|
66
|
-
title?: string;
|
|
67
|
-
detail?: React.ReactNode;
|
|
49
|
+
interface LoadingBoxProps {
|
|
68
50
|
className?: string;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
type AccessDeniedProps = {
|
|
72
51
|
message?: string;
|
|
73
|
-
}
|
|
52
|
+
}
|
|
74
53
|
|
|
75
|
-
|
|
76
|
-
NoDataEmptyMsg?: React.ComponentType;
|
|
77
|
-
EmptyMsg?: React.ComponentType;
|
|
54
|
+
interface EmptyBoxProps {
|
|
78
55
|
label?: string;
|
|
79
|
-
|
|
80
|
-
data?: any;
|
|
81
|
-
children?: React.ReactNode;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
type StatusBoxProps = {
|
|
85
|
-
label?: string;
|
|
86
|
-
loadError?: any;
|
|
87
|
-
loaded?: boolean;
|
|
88
|
-
data?: any;
|
|
89
|
-
unfilteredData?: any;
|
|
90
|
-
skeleton?: React.ReactNode;
|
|
91
|
-
NoDataEmptyMsg?: React.ComponentType;
|
|
92
|
-
EmptyMsg?: React.ComponentType;
|
|
93
|
-
children?: React.ReactNode;
|
|
94
|
-
};
|
|
56
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface AccessReviewResourceAttributes {
|
|
2
2
|
group?: string;
|
|
3
3
|
resource?: string;
|
|
4
4
|
subresource?: string;
|
|
5
5
|
verb?: K8sVerb;
|
|
6
6
|
name?: string;
|
|
7
7
|
namespace?: string;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
|
|
10
10
|
export type K8sVerb =
|
|
11
11
|
| 'create'
|
|
@@ -17,16 +17,16 @@ export type K8sVerb =
|
|
|
17
17
|
| 'deletecollection'
|
|
18
18
|
| 'watch';
|
|
19
19
|
|
|
20
|
-
export
|
|
20
|
+
export interface OwnerReference {
|
|
21
21
|
name: string;
|
|
22
22
|
kind: string;
|
|
23
23
|
uid: string;
|
|
24
24
|
apiVersion: string;
|
|
25
25
|
controller?: boolean;
|
|
26
26
|
blockOwnerDeletion?: boolean;
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
|
|
29
|
-
export
|
|
29
|
+
export interface ObjectMetadata {
|
|
30
30
|
name: string;
|
|
31
31
|
annotations?: { [key: string]: string };
|
|
32
32
|
clusterName?: string;
|
|
@@ -50,4 +50,4 @@ export type ObjectMetadata = {
|
|
|
50
50
|
locale?: string;
|
|
51
51
|
// anything else to custom define
|
|
52
52
|
[key: string]: any;
|
|
53
|
-
}
|
|
53
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
.pfext-page-layout {
|
|
2
2
|
&__content {
|
|
3
|
-
padding: var(--pf-global--spacer--lg);
|
|
3
|
+
padding: var(--pf-v5-global--spacer--lg);
|
|
4
4
|
flex: 1;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
&__header {
|
|
8
8
|
padding-top: 1px;
|
|
9
|
-
background-color: var(--pf-global--BackgroundColor--light-100);
|
|
9
|
+
background-color: var(--pf-v5-global--BackgroundColor--light-100);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
&__hint {
|
|
13
|
-
padding-left: var(--pf-global--spacer--lg);
|
|
14
|
-
padding-right: var(--pf-global--spacer--lg);
|
|
15
|
-
padding-bottom: var(--pf-global--spacer--md);
|
|
13
|
+
padding-left: var(--pf-v5-global--spacer--lg);
|
|
14
|
+
padding-right: var(--pf-v5-global--spacer--lg);
|
|
15
|
+
padding-bottom: var(--pf-v5-global--spacer--md);
|
|
16
16
|
font-size: 14px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&__title {
|
|
20
|
-
padding-left: var(--pf-global--spacer--lg);
|
|
21
|
-
padding-right: var(--pf-global--spacer--lg);
|
|
22
|
-
font-size: var(--pf-global--FontSize--2xl);
|
|
20
|
+
padding-left: var(--pf-v5-global--spacer--lg);
|
|
21
|
+
padding-right: var(--pf-v5-global--spacer--lg);
|
|
22
|
+
font-size: var(--pf-v5-global--FontSize--2xl);
|
|
23
23
|
margin-top: 23px;
|
|
24
24
|
margin-bottom: 11.5px;
|
|
25
|
-
font-family: var(--pf-global--FontFamily--heading--sans-serif);
|
|
26
|
-
font-weight: var(--pf-global--FontWeight--normal);
|
|
25
|
+
font-family: var(--pf-v5-global--FontFamily--heading--sans-serif);
|
|
26
|
+
font-weight: var(--pf-v5-global--FontWeight--normal);
|
|
27
27
|
line-height: 1.1;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -4,11 +4,11 @@ import { QuickStartContext, QuickStartContextValues } from '@quickstarts/utils/q
|
|
|
4
4
|
import { useEventListener } from '../../hooks';
|
|
5
5
|
import { MARKDOWN_COPY_BUTTON_ID, MARKDOWN_SNIPPET_ID } from './const';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface CopyClipboardProps {
|
|
8
8
|
element: HTMLElement;
|
|
9
9
|
rootSelector: string;
|
|
10
|
-
docContext:
|
|
11
|
-
}
|
|
10
|
+
docContext: Document;
|
|
11
|
+
}
|
|
12
12
|
|
|
13
13
|
export const CopyClipboard: React.FC<CopyClipboardProps> = ({
|
|
14
14
|
element,
|
|
@@ -19,9 +19,11 @@ export const CopyClipboard: React.FC<CopyClipboardProps> = ({
|
|
|
19
19
|
const [showSuccessContent, setShowSuccessContent] = React.useState<boolean>(false);
|
|
20
20
|
const textToCopy = React.useMemo(() => {
|
|
21
21
|
const copyTextId = element.getAttribute(MARKDOWN_COPY_BUTTON_ID);
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
return (
|
|
23
|
+
docContext.querySelector(
|
|
24
|
+
`${rootSelector} [${MARKDOWN_SNIPPET_ID}="${copyTextId}"]`,
|
|
25
|
+
) as HTMLElement
|
|
26
|
+
)?.innerText;
|
|
25
27
|
}, [element, docContext, rootSelector]);
|
|
26
28
|
|
|
27
29
|
useEventListener(
|
|
@@ -49,24 +51,24 @@ export const CopyClipboard: React.FC<CopyClipboardProps> = ({
|
|
|
49
51
|
<Tooltip
|
|
50
52
|
key="after-copy"
|
|
51
53
|
isVisible
|
|
52
|
-
|
|
54
|
+
triggerRef={() => element as HTMLElement}
|
|
53
55
|
content={getResource('Successfully copied to clipboard!')}
|
|
54
56
|
className="pfext-quick-start__base"
|
|
55
57
|
/>
|
|
56
58
|
) : (
|
|
57
59
|
<Tooltip
|
|
58
60
|
key="before-copy"
|
|
59
|
-
|
|
61
|
+
triggerRef={() => element as HTMLElement}
|
|
60
62
|
content={getResource('Copy to clipboard')}
|
|
61
63
|
className="pfext-quick-start__base"
|
|
62
64
|
/>
|
|
63
65
|
);
|
|
64
66
|
};
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
docContext:
|
|
68
|
+
interface MarkdownCopyClipboardProps {
|
|
69
|
+
docContext: Document;
|
|
68
70
|
rootSelector: string;
|
|
69
|
-
}
|
|
71
|
+
}
|
|
70
72
|
|
|
71
73
|
const MarkdownCopyClipboard: React.FC<MarkdownCopyClipboardProps> = ({
|
|
72
74
|
docContext,
|
|
@@ -10,8 +10,8 @@ import { removeTemplateWhitespace } from './utils';
|
|
|
10
10
|
import { ACCORDION_MARKDOWN_BUTTON_ID, ACCORDION_MARKDOWN_CONTENT_ID } from './const';
|
|
11
11
|
import './showdown-extension.scss';
|
|
12
12
|
|
|
13
|
-
const useAccordionShowdownExtension = () =>
|
|
14
|
-
|
|
13
|
+
const useAccordionShowdownExtension = () =>
|
|
14
|
+
React.useMemo(
|
|
15
15
|
() => ({
|
|
16
16
|
type: 'lang',
|
|
17
17
|
regex: /\[(.+)]{{(accordion) ("(.*?)")}}/g,
|
|
@@ -21,7 +21,7 @@ const useAccordionShowdownExtension = () => {
|
|
|
21
21
|
_command: string,
|
|
22
22
|
accordionHeading: string,
|
|
23
23
|
): string => {
|
|
24
|
-
const accordionId =
|
|
24
|
+
const accordionId = String(accordionHeading).replace(/\s/g, '-');
|
|
25
25
|
|
|
26
26
|
return removeTemplateWhitespace(
|
|
27
27
|
renderToStaticMarkup(
|
|
@@ -47,6 +47,5 @@ const useAccordionShowdownExtension = () => {
|
|
|
47
47
|
}),
|
|
48
48
|
[],
|
|
49
49
|
);
|
|
50
|
-
};
|
|
51
50
|
|
|
52
51
|
export default useAccordionShowdownExtension;
|