@api-client/ui 0.5.38 → 0.5.40
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/build/src/md/list/internals/ListItem.d.ts +24 -15
- package/build/src/md/list/internals/ListItem.d.ts.map +1 -1
- package/build/src/md/list/internals/ListItem.js +85 -59
- package/build/src/md/list/internals/ListItem.js.map +1 -1
- package/build/src/md/list/internals/ListItem.styles.js +11 -11
- package/build/src/md/list/internals/ListItem.styles.js.map +1 -1
- package/build/src/md/select/internals/Option.d.ts +4 -14
- package/build/src/md/select/internals/Option.d.ts.map +1 -1
- package/build/src/md/select/internals/Option.js +13 -28
- package/build/src/md/select/internals/Option.js.map +1 -1
- package/build/src/md/select/internals/Select.d.ts +1 -1
- package/build/src/md/select/internals/Select.d.ts.map +1 -1
- package/build/src/md/select/internals/Select.js +15 -5
- package/build/src/md/select/internals/Select.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/src/md/list/internals/ListItem.styles.ts +11 -11
- package/src/md/list/internals/ListItem.ts +68 -43
- package/src/md/select/internals/Option.ts +14 -26
- package/src/md/select/internals/Select.ts +15 -5
- package/.aiexclude +0 -3
- package/.cursor/rules/html-and-css-best-practices.mdc +0 -63
- package/.cursor/rules/lit-best-practices.mdc +0 -89
- package/.editorconfig +0 -29
- package/.github/CONTRIBUTING.md +0 -24
- package/.github/instructions/html-and-css-best-practices.instructions.md +0 -70
- package/.github/instructions/lit-best-practices.instructions.md +0 -90
- package/.github/release.yml +0 -14
- package/.github/stale.yml +0 -23
- package/.github/workflows/auto-release.yml +0 -182
- package/.github/workflows/release.yml +0 -82
- package/.prettierrc.js +0 -14
- package/.vscode/settings.json +0 -18
- package/RELEASE.md +0 -163
- package/RELEASE_SETUP.md +0 -235
- package/build/src/demo/DemoPage.d.ts +0 -81
- package/build/src/demo/DemoPage.d.ts.map +0 -1
- package/build/src/demo/DemoPage.js +0 -175
- package/build/src/demo/DemoPage.js.map +0 -1
- package/build/src/demo/DemoStyles.d.ts +0 -3
- package/build/src/demo/DemoStyles.d.ts.map +0 -1
- package/build/src/demo/DemoStyles.js +0 -60
- package/build/src/demo/DemoStyles.js.map +0 -1
- package/build/test/elements/navigation/Navigation.test.d.ts +0 -3
- package/build/test/elements/navigation/Navigation.test.d.ts.map +0 -1
- package/build/test/elements/navigation/Navigation.test.js +0 -113
- package/build/test/elements/navigation/Navigation.test.js.map +0 -1
- package/commitlint.config.cjs +0 -2
- package/demo/elements/authorization/AuthPlugin.js +0 -57
- package/demo/elements/authorization/AuthProxy.js +0 -215
- package/demo/elements/authorization/api-key.html +0 -27
- package/demo/elements/authorization/api-key.ts +0 -44
- package/demo/elements/authorization/basic.html +0 -27
- package/demo/elements/authorization/basic.ts +0 -43
- package/demo/elements/authorization/bearer.html +0 -27
- package/demo/elements/authorization/bearer.ts +0 -43
- package/demo/elements/authorization/env.js +0 -8
- package/demo/elements/authorization/index.html +0 -44
- package/demo/elements/authorization/ntlm.html +0 -27
- package/demo/elements/authorization/ntlm.ts +0 -43
- package/demo/elements/authorization/oauth-authorize.html +0 -75
- package/demo/elements/authorization/oauth-authorize.ts +0 -40
- package/demo/elements/authorization/oauth-error.html +0 -18
- package/demo/elements/authorization/oauth-error.ts +0 -10
- package/demo/elements/authorization/oauth-popup.html +0 -36
- package/demo/elements/authorization/oauth2.html +0 -27
- package/demo/elements/authorization/oauth2.ts +0 -100
- package/demo/elements/authorization/oidc.html +0 -27
- package/demo/elements/authorization/oidc.ts +0 -139
- package/demo/elements/authorization/private.crt +0 -31
- package/demo/elements/authorization/private.csr +0 -28
- package/demo/elements/authorization/private.key +0 -51
- package/demo/elements/authorization/private.pem +0 -31
- package/demo/elements/authorization/redirect.html +0 -20
- package/demo/elements/authorization/ssl-commands.sh +0 -30
- package/demo/elements/authorization/ssl.conf +0 -24
- package/demo/elements/autocomplete/index.html +0 -64
- package/demo/elements/autocomplete/index.ts +0 -171
- package/demo/elements/code-editor/CodeEditorDemo.ts +0 -173
- package/demo/elements/code-editor/index.html +0 -19
- package/demo/elements/context-menu/DemoIcons.ts +0 -21
- package/demo/elements/context-menu/basic.html +0 -25
- package/demo/elements/context-menu/basic.ts +0 -119
- package/demo/elements/context-menu/custom-data.html +0 -25
- package/demo/elements/context-menu/custom-data.ts +0 -62
- package/demo/elements/context-menu/demo.css +0 -28
- package/demo/elements/context-menu/enabled-state.html +0 -25
- package/demo/elements/context-menu/enabled-state.ts +0 -73
- package/demo/elements/context-menu/icons.html +0 -25
- package/demo/elements/context-menu/icons.ts +0 -64
- package/demo/elements/context-menu/index.html +0 -43
- package/demo/elements/context-menu/nested.html +0 -25
- package/demo/elements/context-menu/nestedt.ts +0 -152
- package/demo/elements/context-menu/no-execute.html +0 -25
- package/demo/elements/context-menu/no-execute.ts +0 -134
- package/demo/elements/context-menu/radio-menu.html +0 -25
- package/demo/elements/context-menu/radio-menu.ts +0 -83
- package/demo/elements/context-menu/separators.html +0 -25
- package/demo/elements/context-menu/separators.ts +0 -172
- package/demo/elements/currency/index.html +0 -91
- package/demo/elements/currency/index.ts +0 -352
- package/demo/elements/environment/environment-editor.html +0 -20
- package/demo/elements/environment/environment-editor.ts +0 -49
- package/demo/elements/environment/index.html +0 -33
- package/demo/elements/environment/server-editor.html +0 -20
- package/demo/elements/environment/server-editor.ts +0 -67
- package/demo/elements/environment/variables-editor.html +0 -20
- package/demo/elements/environment/variables-editor.ts +0 -94
- package/demo/elements/har/har-viewer.html +0 -20
- package/demo/elements/har/har-viewer.ts +0 -76
- package/demo/elements/har/har1.har +0 -3044
- package/demo/elements/har/har2.json +0 -439
- package/demo/elements/har/index.html +0 -26
- package/demo/elements/highlight/example.md +0 -27
- package/demo/elements/highlight/index.html +0 -31
- package/demo/elements/highlight/marked-highlight.html +0 -132
- package/demo/elements/highlight/marked-highlight.ts +0 -22
- package/demo/elements/highlight/prism-highlight.html +0 -62
- package/demo/elements/highlight/prism-highlight.ts +0 -17
- package/demo/elements/http/body-editor.html +0 -17
- package/demo/elements/http/body-editor.ts +0 -115
- package/demo/elements/http/headers.html +0 -17
- package/demo/elements/http/headers.ts +0 -59
- package/demo/elements/http/http-assertions.html +0 -20
- package/demo/elements/http/http-assertions.ts +0 -89
- package/demo/elements/http/http-flows.html +0 -23
- package/demo/elements/http/http-flows.ts +0 -89
- package/demo/elements/http/index.html +0 -45
- package/demo/elements/http/request-editor.html +0 -26
- package/demo/elements/http/request-editor.ts +0 -197
- package/demo/elements/http/request-log.html +0 -16
- package/demo/elements/http/request-log.ts +0 -136
- package/demo/elements/http/url-editing.html +0 -17
- package/demo/elements/http/url-editing.ts +0 -112
- package/demo/elements/icons/index.html +0 -81
- package/demo/elements/icons/index.ts +0 -52
- package/demo/elements/index.html +0 -72
- package/demo/elements/mention-textarea/index.html +0 -19
- package/demo/elements/mention-textarea/index.ts +0 -205
- package/demo/elements/navigation/navigation-item.html +0 -49
- package/demo/elements/navigation/navigation-item.ts +0 -131
- package/demo/elements/navigation/navigation.html +0 -20
- package/demo/elements/navigation/navigation.ts +0 -45
- package/demo/elements/project/index.html +0 -29
- package/demo/elements/project/project-run-report.html +0 -20
- package/demo/elements/project/project-run-report.ts +0 -132
- package/demo/elements/project/request-editor.html +0 -23
- package/demo/elements/project/request-editor.ts +0 -232
- package/demo/elements/user/user-avatar.html +0 -17
- package/demo/elements/user/user-avatar.ts +0 -60
- package/demo/env.js +0 -4
- package/demo/index.html +0 -34
- package/demo/layout/index.html +0 -94
- package/demo/layout/index.ts +0 -190
- package/demo/md/DemoStyles.ts +0 -61
- package/demo/md/UiDemoPage.ts +0 -6
- package/demo/md/buttons/button.html +0 -121
- package/demo/md/buttons/button.ts +0 -246
- package/demo/md/buttons/group.html +0 -36
- package/demo/md/buttons/group.ts +0 -171
- package/demo/md/checkbox/index.html +0 -39
- package/demo/md/checkbox/index.ts +0 -220
- package/demo/md/chip/chip.html +0 -70
- package/demo/md/chip/chip.ts +0 -219
- package/demo/md/chip/pawel6c9a.jpg +0 -0
- package/demo/md/collapse/CustomDetail.ts +0 -89
- package/demo/md/collapse/collapse.html +0 -21
- package/demo/md/collapse/collapse.ts +0 -78
- package/demo/md/date-picker/date-picker.ts +0 -336
- package/demo/md/date-picker/index.html +0 -171
- package/demo/md/dialog/confirm-dialog.html +0 -49
- package/demo/md/dialog/confirm-dialog.ts +0 -121
- package/demo/md/dialog/dialog.html +0 -25
- package/demo/md/dialog/dialog.ts +0 -468
- package/demo/md/dropdown-list/index.html +0 -31
- package/demo/md/dropdown-list/index.ts +0 -158
- package/demo/md/icon-button/index.html +0 -122
- package/demo/md/icon-button/index.ts +0 -132
- package/demo/md/index.html +0 -73
- package/demo/md/inputs/input.html +0 -73
- package/demo/md/inputs/input.ts +0 -278
- package/demo/md/inputs/radio.html +0 -39
- package/demo/md/inputs/radio.ts +0 -156
- package/demo/md/inputs/switch.html +0 -45
- package/demo/md/inputs/switch.ts +0 -144
- package/demo/md/list/list.html +0 -65
- package/demo/md/list/list.ts +0 -204
- package/demo/md/listbox/listbox.html +0 -31
- package/demo/md/listbox/listbox.ts +0 -27
- package/demo/md/menu/index.html +0 -19
- package/demo/md/menu/index.ts +0 -514
- package/demo/md/notification/snack.html +0 -21
- package/demo/md/notification/snack.ts +0 -70
- package/demo/md/progress/progress.html +0 -46
- package/demo/md/progress/progress.ts +0 -161
- package/demo/md/segmented-button/index.html +0 -21
- package/demo/md/segmented-button/index.ts +0 -55
- package/demo/md/select/index.html +0 -16
- package/demo/md/select/index.ts +0 -207
- package/demo/md/tabs/tabs.html +0 -40
- package/demo/md/tabs/tabs.ts +0 -214
- package/demo/oauth-popup.html +0 -36
- package/demo/page.css +0 -8
- package/demo/resources/calendar-month.png +0 -0
- package/demo/resources/favorite.png +0 -0
- package/demo/resources/fingerprint.png +0 -0
- package/demo/resources/home-work.png +0 -0
- package/demo/resources/mood.png +0 -0
- package/demo/resources/print.png +0 -0
- package/demo/resources/stars.png +0 -0
- package/demo/resources/theaters.png +0 -0
- package/demo/tsconfig.json +0 -4
- package/eslint.config.js +0 -97
- package/scripts/copy-assets.js +0 -21
- package/scripts/release.js +0 -66
- package/src/demo/DemoPage.ts +0 -169
- package/src/demo/DemoStyles.ts +0 -60
- package/test/README.md +0 -375
- package/test/contextual-menu/ContextMenu.test.ts +0 -760
- package/test/contextual-menu/ContextMenuElement.test.ts +0 -569
- package/test/core/activity.spec.ts +0 -413
- package/test/core/activity_manager.spec.ts +0 -544
- package/test/core/application.spec.ts +0 -218
- package/test/core/fragment.spec.ts +0 -565
- package/test/core/fragment_manager.spec.ts +0 -404
- package/test/core/live_data.spec.ts +0 -558
- package/test/core/renderer.spec.ts +0 -113
- package/test/dom-assertions.test.ts +0 -182
- package/test/elements/MonacoSetup.ts +0 -65
- package/test/elements/authorization/basic-method.test.ts +0 -177
- package/test/elements/authorization/bearer-method.test.ts +0 -143
- package/test/elements/authorization/ntlm-method.test.ts +0 -219
- package/test/elements/authorization/oauth2-client-credentials-method.test.ts +0 -334
- package/test/elements/authorization/oauth2-code-method.test.ts +0 -320
- package/test/elements/authorization/oauth2-custom-grant-method.test.ts +0 -255
- package/test/elements/authorization/oauth2-device-code-method.test.ts +0 -371
- package/test/elements/authorization/oauth2-implicit-method.test.ts +0 -407
- package/test/elements/authorization/oauth2-jwt-method.test.ts +0 -217
- package/test/elements/authorization/oauth2-password-method.test.ts +0 -275
- package/test/elements/authorization/openid-method.test.ts +0 -591
- package/test/elements/autocomplete/autocomplete-input.spec.ts +0 -646
- package/test/elements/code-editor/code-editor.accessibility.test.ts +0 -298
- package/test/elements/code-editor/code-editor.test.ts +0 -574
- package/test/elements/currency/CurrencyPicker.accessibility.test.ts +0 -328
- package/test/elements/currency/CurrencyPicker.core.test.ts +0 -318
- package/test/elements/currency/CurrencyPicker.integration.test.ts +0 -482
- package/test/elements/currency/CurrencyPicker.test.ts +0 -486
- package/test/elements/data-table/DataTable.browser.test.ts +0 -649
- package/test/elements/har/HarUtils.test.ts +0 -45
- package/test/elements/har/HarViewerElement.test.ts +0 -687
- package/test/elements/har/test-data/har1.har +0 -3044
- package/test/elements/highlight/MarkedHighlightElement.test.ts +0 -452
- package/test/elements/highlight/PrismHighlightElement.test.ts +0 -79
- package/test/elements/highlight/PrismHighlighter.test.ts +0 -94
- package/test/elements/highlight/remoteSanitization.md +0 -1
- package/test/elements/highlight/test.md +0 -3
- package/test/elements/highlight/test1.md +0 -3
- package/test/elements/highlight/test2.md +0 -1
- package/test/elements/http/BodyFormdataEditorElement.test.ts +0 -482
- package/test/elements/http/BodyMultipartEditorElement.test.ts +0 -658
- package/test/elements/http/BodyRawEditorElement.test.ts +0 -90
- package/test/elements/http/CertificateAdd.test.ts +0 -457
- package/test/elements/http/HttpAssertions.test.ts +0 -994
- package/test/elements/http/HttpFlows.test.ts +0 -502
- package/test/elements/http/UrlEncodeUtils.test.ts +0 -202
- package/test/elements/layout/SplitItem.test.ts +0 -440
- package/test/elements/layout/SplitLayoutManager.test.ts +0 -1501
- package/test/elements/layout/SplitPanel.test.ts +0 -1109
- package/test/elements/mention-textarea/MentionTextArea.basic.test.ts +0 -114
- package/test/elements/mention-textarea/MentionTextArea.test.ts +0 -613
- package/test/elements/navigation/Navigation.test.ts +0 -120
- package/test/env.ts +0 -15
- package/test/events/EventTypes.test.ts +0 -363
- package/test/events/EventsTestHelpers.ts +0 -16
- package/test/helpers/TestUtils.ts +0 -243
- package/test/helpers/UiMock.ts +0 -185
- package/test/lib/Dom.test.ts +0 -231
- package/test/md/button/UiButton.test.ts +0 -347
- package/test/md/button/UiIconButton.test.ts +0 -155
- package/test/md/chip/UiChip.test.ts +0 -219
- package/test/md/collapse/UiCollapse.test.ts +0 -250
- package/test/md/collapse/flex-layout.test.ts +0 -105
- package/test/md/date-time/DateTime.test.ts +0 -348
- package/test/md/dialog/UiConfirmDialog.test.ts +0 -131
- package/test/md/dialog/UiDialog.test.ts +0 -759
- package/test/md/menu/Menu.test.ts +0 -855
- package/test/md/menu/MenuIntegration.test.ts +0 -426
- package/test/md/menu/MenuItem.test.ts +0 -652
- package/test/md/menu/SubMenu.test.ts +0 -410
- package/test/md/progress/UiCircularProgressElement.test.ts +0 -481
- package/test/md/progress/UiProgressElement.test.ts +0 -117
- package/test/md/progress/UiRangeElement.test.ts +0 -156
- package/test/md/select/Select.test.ts +0 -925
- package/test/plugins/takeScreenshotPlugin.js +0 -35
- package/test/setup.test.ts +0 -217
- package/test/setup.ts +0 -117
- package/test/tsconfig.json +0 -7
- package/web-dev-server.config.js +0 -21
- package/web-test-runner.config.js +0 -90
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
-----BEGIN RSA PRIVATE KEY-----
|
|
2
|
-
MIIJKAIBAAKCAgEAuVTrHMDODwWIJ+dfKsOA3OAy2bAGZtNb4MZlvPFDuIHituxM
|
|
3
|
-
e7R6DzSWD6jDwaqWJqaT28FaO0CCxl957u9V802fgmML1BKcG37uCvWIUOZx+hDr
|
|
4
|
-
A7C5POyGfisfxMG2mBEWK53Ml/RKIR94aDtcbzw9AjRASfqS865gYOQaQYQ47J68
|
|
5
|
-
yzAm0gqqM1LufEugqFzABjVG8mg3H0Oda2fu68QLGBiC3V08Z++ioHWfRdNyPXZz
|
|
6
|
-
9oOab9kKKWIcZoa59wxQ6NfTV7wZ1nqOEKgGyu9jddXLDJWhP9a1NfqsG5NpvlwU
|
|
7
|
-
nKziTF/zBY06aDqnTnG7GA/pgMvnXIPPArffv0nxDelyVkXccJrIJ98HHNe/HoNT
|
|
8
|
-
GM5mnrvUqtgCSSm2eGHUnscm5CFiRXyskyk+ZEjWhlKJT0n6VYHTCvrmlnUS4tCx
|
|
9
|
-
Z36kIvSFD9zqeOQLHAknqjYJHiVhthOZdczAUnE46zPMixcUeWNTEp0068LEzQQV
|
|
10
|
-
yAYPiwXv9ga+4GYR5epKQVl27055rVFQVumsTUo7LSmX4xh1tdWtbAN2Po9x33MV
|
|
11
|
-
bL7efrcM7nyL2N402jyZx578Z2x7UrBOF4sdUA9YHfXX6UtEE1o7FIKfNHB3/CuU
|
|
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YDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4ICAQA5XA3i
|
|
20
|
-
reCKfNq82w5XNFTcraBze8dtw/hs/L4Str/AtRoxvn1xureewlnpqMn8OapgbNDb
|
|
21
|
-
yauqKVuO0jYNxIhF5nNVWpnH7wduijWacT+7BgoutbgldmMam7aglCTDgkimHYHV
|
|
22
|
-
YWYFeiG6uLtJyFAegAoQT4aBSXz80tmMt+1/wF72BT5sXzOHkuHL3FgloCsT1/8L
|
|
23
|
-
m5wmN3AP3+oZm5X14FNJiHRnzvVKLYcE7608TxOORRmg3wIWgxpb9nGtfB554Ywo
|
|
24
|
-
6G4Nz8q9oBOB7sFxdK4e/4E63gcWeQyCzpWK0d67+mhessuujDHToa8GFsDP61ka
|
|
25
|
-
APzOBynNN3fylN9vw0kJdgJZsVndItH5TrrmPQmr0jpFTiTuprLNEVsq2vvBnvPu
|
|
26
|
-
VZKpp9vPTH7LYVEkiKK+HczeFmPdgH6WQxjVN+hUPKVY5b/G2SRIHxRvXNzD6zLh
|
|
27
|
-
dlHovtJvT3DKt3HsgdRuBv+0p7JKE7JQ++NgA9OBpNhLXAWZyDFxc0IVO7SrbfY6
|
|
28
|
-
w6RP5hxvkDvoH6odw4t/Yb6pb7dBrhoGvfbzuoUra1Q/jxmAlk0mNo6MtS4ggzBn
|
|
29
|
-
up/uZrA1UdgA1MvODaXjJ0DJXLVFCC4R+opiLX8jTnN5FTlxXyXU5prgmKdETyl8
|
|
30
|
-
bZJoWR79OWcyLESFKWnxvz+oTlD/7qoj0cCAYA==
|
|
31
|
-
-----END CERTIFICATE-----
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="Description" content="Domain modeling initiative by MuleSoft, a Salesforce company.">
|
|
6
|
-
<title>Initializing</title>
|
|
7
|
-
<!-- <meta http-equiv="refresh" content="1;url=https://auth.advancedrestclient.com/oauth-popup.html#access_token=test-token"> -->
|
|
8
|
-
<meta http-equiv="refresh" content="1;url=/oauth-popup.html#access_token=test-token&refresh_token=abcd">
|
|
9
|
-
<link
|
|
10
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
|
11
|
-
rel="stylesheet"
|
|
12
|
-
/>
|
|
13
|
-
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
14
|
-
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
15
|
-
<link href="../../page.css" rel="stylesheet" type="text/css" />
|
|
16
|
-
</head>
|
|
17
|
-
<body>
|
|
18
|
-
<p>Redirecting</p>
|
|
19
|
-
</body>
|
|
20
|
-
</html>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Generate private key
|
|
2
|
-
openssl genrsa -out private.key 4096
|
|
3
|
-
|
|
4
|
-
# Generate a Certificate Signing Request
|
|
5
|
-
|
|
6
|
-
openssl req -new -sha256 \
|
|
7
|
-
-out private.csr \
|
|
8
|
-
-key private.key \
|
|
9
|
-
-config ssl.conf
|
|
10
|
-
|
|
11
|
-
# Generate the certificate
|
|
12
|
-
|
|
13
|
-
openssl x509 -req \
|
|
14
|
-
-days 3650 \
|
|
15
|
-
-in private.csr \
|
|
16
|
-
-signkey private.key \
|
|
17
|
-
-out private.crt \
|
|
18
|
-
-extensions req_ext \
|
|
19
|
-
-extfile ssl.conf
|
|
20
|
-
|
|
21
|
-
# Add the certificate to keychain and trust it:
|
|
22
|
-
|
|
23
|
-
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain private.crt
|
|
24
|
-
# https://support.kerioconnect.gfi.com/hc/en-us/articles/360015200119-Adding-Trusted-Root-Certificates-to-the-Server
|
|
25
|
-
|
|
26
|
-
# Create a pem file from crt
|
|
27
|
-
openssl x509 -in private.crt -out private.pem -outform PEM
|
|
28
|
-
|
|
29
|
-
# run the server
|
|
30
|
-
server-cmd --https --cert private.pem --key private.key
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[ req ]
|
|
2
|
-
default_bits = 4096
|
|
3
|
-
distinguished_name = req_distinguished_name
|
|
4
|
-
req_extensions = req_ext
|
|
5
|
-
|
|
6
|
-
[ req_distinguished_name ]
|
|
7
|
-
countryName = US
|
|
8
|
-
countryName_default = US
|
|
9
|
-
stateOrProvinceName = California
|
|
10
|
-
stateOrProvinceName_default = CA
|
|
11
|
-
localityName = San Francisco
|
|
12
|
-
localityName_default = San Francisco
|
|
13
|
-
organizationName = MuleSoft
|
|
14
|
-
organizationName_default = MuleSoft
|
|
15
|
-
organizationalUnitName = Engineering
|
|
16
|
-
commonName = localhost
|
|
17
|
-
commonName_max = 64
|
|
18
|
-
commonName_default = localhost
|
|
19
|
-
|
|
20
|
-
[ req_ext ]
|
|
21
|
-
subjectAltName = @alt_names
|
|
22
|
-
|
|
23
|
-
[alt_names]
|
|
24
|
-
DNS.1 = localhost
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
7
|
-
<title>Autocomplete</title>
|
|
8
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
-
<link
|
|
11
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
|
12
|
-
rel="stylesheet"
|
|
13
|
-
/>
|
|
14
|
-
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
15
|
-
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
16
|
-
<link href="../../page.css" rel="stylesheet" type="text/css" />
|
|
17
|
-
<style>
|
|
18
|
-
.share-input {
|
|
19
|
-
.input-container {
|
|
20
|
-
min-height: 3em;
|
|
21
|
-
border: none;
|
|
22
|
-
padding: 4px 12px;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-wrap: wrap;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
gap: 4px;
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
background-color: var(--md-sys-color-surface-container-lowest);
|
|
29
|
-
|
|
30
|
-
outline-color: var(--md-sys-color-primary);
|
|
31
|
-
outline-style: solid;
|
|
32
|
-
outline-width: 1px;
|
|
33
|
-
outline-offset: -1px;
|
|
34
|
-
transition:
|
|
35
|
-
outline-width 0.14s ease-in-out,
|
|
36
|
-
outline-offset 0.14s ease-in-out;
|
|
37
|
-
|
|
38
|
-
&:focus-within {
|
|
39
|
-
outline-width: 2px;
|
|
40
|
-
outline-offset: -2px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.native-input {
|
|
44
|
-
flex: 1;
|
|
45
|
-
outline: none;
|
|
46
|
-
border: none;
|
|
47
|
-
background: transparent;
|
|
48
|
-
color: var(--md-sys-color-on-surface);
|
|
49
|
-
font-size: 1rem;
|
|
50
|
-
font-family: var(--md-sys-typescale-body-large-font-family);
|
|
51
|
-
line-height: var(--md-sys-typescale-body-large-line-height);
|
|
52
|
-
padding: 0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
</style>
|
|
57
|
-
</head>
|
|
58
|
-
|
|
59
|
-
<body class="demo">
|
|
60
|
-
<div id="app"></div>
|
|
61
|
-
<script type="module" src="/.tmp/demo/elements/autocomplete/index.js"></script>
|
|
62
|
-
</body>
|
|
63
|
-
|
|
64
|
-
</html>
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { html, TemplateResult } from 'lit'
|
|
2
|
-
import { live } from 'lit/directives/live.js'
|
|
3
|
-
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
4
|
-
import reactive from '../../../src/decorators/reactive.js'
|
|
5
|
-
import type { IUser } from '@api-client/core/models/store/User.js'
|
|
6
|
-
import { User } from '@api-client/core/mocking/lib/User.js'
|
|
7
|
-
|
|
8
|
-
import '../../../src/elements/autocomplete/autocomplete-input.js'
|
|
9
|
-
import '../../../src/md/text-field/ui-outlined-text-field.js'
|
|
10
|
-
import '../../../src/md/listbox/ui-listbox.js'
|
|
11
|
-
import '../../../src/md/list/ui-list-item.js'
|
|
12
|
-
|
|
13
|
-
class ComponentDemoPage extends DemoPage {
|
|
14
|
-
override accessor componentName = 'Autocomplete input'
|
|
15
|
-
|
|
16
|
-
@reactive() accessor fixedValue = ''
|
|
17
|
-
@reactive() accessor dynamicValue = ''
|
|
18
|
-
@reactive() accessor dynamicCustomValue = ''
|
|
19
|
-
@reactive() accessor users: IUser[] = []
|
|
20
|
-
@reactive() accessor customUsers: IUser[] = []
|
|
21
|
-
|
|
22
|
-
userMock = new User()
|
|
23
|
-
|
|
24
|
-
handleFixedAutocomplete(event: CustomEvent<{ item: HTMLElement }>): void {
|
|
25
|
-
const item = event.detail.item
|
|
26
|
-
this.fixedValue = item.getAttribute('data-value') || item.textContent || ''
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
handleFixedInput(event: InputEvent): void {
|
|
30
|
-
const target = event.target as HTMLInputElement
|
|
31
|
-
this.fixedValue = target.value
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
handleDynamicAutocomplete(event: CustomEvent<{ item: HTMLElement }>): void {
|
|
35
|
-
const item = event.detail.item
|
|
36
|
-
this.dynamicValue = item.dataset.name || ''
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
handleDynamicInput(event: InputEvent): void {
|
|
40
|
-
const target = event.target as HTMLInputElement
|
|
41
|
-
this.dynamicValue = target.value
|
|
42
|
-
this.generateMockUsers(target.value, 'users')
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
generateMockUsers(startsWith: string, prop: 'users' | 'customUsers'): void {
|
|
46
|
-
const timeout = this.userMock.types.number({ min: 100, max: 1000 })
|
|
47
|
-
const results = this.userMock.types.number({ min: 0, max: 30 })
|
|
48
|
-
setTimeout(() => {
|
|
49
|
-
this[prop] = Array.from({ length: results }, () => {
|
|
50
|
-
const item = this.userMock.user()
|
|
51
|
-
item.name = item.name.startsWith(startsWith) ? item.name : `${startsWith}${item.name}`
|
|
52
|
-
return item
|
|
53
|
-
})
|
|
54
|
-
console.log('Generated users:', this[prop])
|
|
55
|
-
}, timeout)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
handleDynamicCustomInput(event: InputEvent): void {
|
|
59
|
-
const target = event.target as HTMLInputElement
|
|
60
|
-
this.dynamicCustomValue = target.value
|
|
61
|
-
this.generateMockUsers(target.value, 'customUsers')
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
handleDynamicCustomAutocomplete(event: CustomEvent<{ item: HTMLElement }>): void {
|
|
65
|
-
const item = event.detail.item
|
|
66
|
-
this.dynamicCustomValue = item.dataset.name || ''
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
override contentTemplate(): TemplateResult {
|
|
70
|
-
return html`
|
|
71
|
-
<a href="../">Back</a>
|
|
72
|
-
|
|
73
|
-
<section class="demo-section">
|
|
74
|
-
<h2 class="title-large">Fixed suggestions</h2>
|
|
75
|
-
|
|
76
|
-
<div class="demo-row">
|
|
77
|
-
<autocomplete-input @autocomplete="${this.handleFixedAutocomplete}">
|
|
78
|
-
<ui-outlined-text-field
|
|
79
|
-
slot="input"
|
|
80
|
-
label="Select a fruit"
|
|
81
|
-
name="fixed"
|
|
82
|
-
.value="${live(this.fixedValue)}"
|
|
83
|
-
@input="${this.handleFixedInput}"
|
|
84
|
-
></ui-outlined-text-field>
|
|
85
|
-
<ui-listbox slot="suggestions">
|
|
86
|
-
<ui-list-item data-value="apple" role="option">Apple</ui-list-item>
|
|
87
|
-
<ui-list-item data-value="banana" role="option">Banana</ui-list-item>
|
|
88
|
-
<ui-list-item data-value="cherry" role="option">Cherry</ui-list-item>
|
|
89
|
-
<ui-list-item data-value="date" role="option">Date</ui-list-item>
|
|
90
|
-
<ui-list-item data-value="elderberry" role="option">Elderberry</ui-list-item>
|
|
91
|
-
<ui-list-item data-value="fig" role="option">Fig</ui-list-item>
|
|
92
|
-
<ui-list-item data-value="grape" role="option">Grape</ui-list-item>
|
|
93
|
-
<ui-list-item data-value="honeydew" role="option">Honeydew</ui-list-item>
|
|
94
|
-
<ui-list-item data-value="kiwi" role="option">Kiwi</ui-list-item>
|
|
95
|
-
<ui-list-item data-value="lemon" role="option">Lemon</ui-list-item>
|
|
96
|
-
<ui-list-item data-value="mango" role="option">Mango</ui-list-item>
|
|
97
|
-
<ui-list-item data-value="nectarine" role="option">Nectarine</ui-list-item>
|
|
98
|
-
<ui-list-item data-value="orange" role="option">Orange</ui-list-item>
|
|
99
|
-
<ui-list-item data-value="papaya" role="option">Papaya</ui-list-item>
|
|
100
|
-
</ui-listbox>
|
|
101
|
-
</autocomplete-input>
|
|
102
|
-
</div>
|
|
103
|
-
</section>
|
|
104
|
-
|
|
105
|
-
<section class="demo-section">
|
|
106
|
-
<h2 class="title-large">Dynamic suggestions</h2>
|
|
107
|
-
|
|
108
|
-
<div class="demo-row">
|
|
109
|
-
<autocomplete-input @autocomplete="${this.handleDynamicAutocomplete}">
|
|
110
|
-
<ui-outlined-text-field
|
|
111
|
-
slot="input"
|
|
112
|
-
label="Choose a user"
|
|
113
|
-
name="dynamic"
|
|
114
|
-
.value="${live(this.dynamicValue)}"
|
|
115
|
-
@input="${this.handleDynamicInput}"
|
|
116
|
-
></ui-outlined-text-field>
|
|
117
|
-
<ui-listbox slot="suggestions"
|
|
118
|
-
>${this.users.map(
|
|
119
|
-
(user) =>
|
|
120
|
-
html`<ui-list-item
|
|
121
|
-
data-name="${user.name}"
|
|
122
|
-
data-email="${user.email[0].email}"
|
|
123
|
-
data-index="name email"
|
|
124
|
-
role="option"
|
|
125
|
-
>${user.name}<span slot="supporting-text">${user.email[0].email}</span></ui-list-item
|
|
126
|
-
>`
|
|
127
|
-
)}</ui-listbox
|
|
128
|
-
>
|
|
129
|
-
</autocomplete-input>
|
|
130
|
-
</div>
|
|
131
|
-
</section>
|
|
132
|
-
|
|
133
|
-
<section class="demo-section">
|
|
134
|
-
<h2 class="title-large">Custom Input</h2>
|
|
135
|
-
|
|
136
|
-
<div class="demo-row">
|
|
137
|
-
<autocomplete-input @autocomplete="${this.handleDynamicCustomAutocomplete}">
|
|
138
|
-
<div class="share-input" slot="anchor">
|
|
139
|
-
<div class="input-container">
|
|
140
|
-
<input
|
|
141
|
-
type="text"
|
|
142
|
-
slot="input"
|
|
143
|
-
autocomplete="off"
|
|
144
|
-
placeholder="Enter name or email"
|
|
145
|
-
name="dynamic-custom"
|
|
146
|
-
class="native-input"
|
|
147
|
-
.value="${live(this.dynamicCustomValue)}"
|
|
148
|
-
@input="${this.handleDynamicCustomInput}"
|
|
149
|
-
/>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
<ui-listbox slot="suggestions"
|
|
153
|
-
>${this.customUsers.map(
|
|
154
|
-
(user) =>
|
|
155
|
-
html`<ui-list-item
|
|
156
|
-
data-name="${user.name}"
|
|
157
|
-
data-email="${user.email[0].email}"
|
|
158
|
-
data-index="name email"
|
|
159
|
-
role="option"
|
|
160
|
-
>${user.name}<span slot="supporting-text">${user.email[0].email}</span></ui-list-item
|
|
161
|
-
>`
|
|
162
|
-
)}</ui-listbox
|
|
163
|
-
>
|
|
164
|
-
</autocomplete-input>
|
|
165
|
-
</div>
|
|
166
|
-
</section>
|
|
167
|
-
`
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
const instance = new ComponentDemoPage()
|
|
171
|
-
instance.render()
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit'
|
|
2
|
-
import type { FunctionSchema } from '@pawel-up/jexl/schemas/types.js'
|
|
3
|
-
import reactive from '../../../src/decorators/reactive.js'
|
|
4
|
-
import { DemoPage } from '../../../src/demo/DemoPage.js'
|
|
5
|
-
import type {
|
|
6
|
-
Suggestion,
|
|
7
|
-
FunctionInsertEvent,
|
|
8
|
-
SuggestionInsertEvent,
|
|
9
|
-
} from '../../../src/elements/code-editor/code-editor.js'
|
|
10
|
-
import '../../../src/elements/code-editor/code-editor.js'
|
|
11
|
-
import { stringLibrarySchema } from '@pawel-up/jexl/schemas/string.schema.js'
|
|
12
|
-
import { arrayLibrarySchema } from '@pawel-up/jexl/schemas/array.schema.js'
|
|
13
|
-
import { dateLibrarySchema } from '@pawel-up/jexl/schemas/date.schema.js'
|
|
14
|
-
import { mathLibrarySchema } from '@pawel-up/jexl/schemas/math.schema.js'
|
|
15
|
-
|
|
16
|
-
class CodeEditorDemo extends DemoPage {
|
|
17
|
-
override accessor componentName = 'Code Editor'
|
|
18
|
-
|
|
19
|
-
@reactive()
|
|
20
|
-
private accessor output = ''
|
|
21
|
-
|
|
22
|
-
@reactive()
|
|
23
|
-
private accessor editorValue = [
|
|
24
|
-
'// Start typing function names or {{ mentions }}',
|
|
25
|
-
'',
|
|
26
|
-
'"Hello {{John}}! Can you help with the " + upper() + " function?"',
|
|
27
|
-
].join('\n')
|
|
28
|
-
|
|
29
|
-
private suggestions: Suggestion[] = [
|
|
30
|
-
{
|
|
31
|
-
id: 'user-john',
|
|
32
|
-
label: 'John',
|
|
33
|
-
description: 'Software Engineer',
|
|
34
|
-
suffix: 'Engineering',
|
|
35
|
-
data: { role: 'developer', department: 'engineering' },
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: 'user-jane',
|
|
39
|
-
label: 'Jane',
|
|
40
|
-
description: 'Product Manager',
|
|
41
|
-
suffix: 'Product',
|
|
42
|
-
data: { role: 'manager', department: 'product' },
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
id: 'admin-system',
|
|
46
|
-
label: 'System',
|
|
47
|
-
description: 'System Administrator',
|
|
48
|
-
suffix: 'Admin',
|
|
49
|
-
data: { role: 'admin', department: 'infrastructure' },
|
|
50
|
-
},
|
|
51
|
-
]
|
|
52
|
-
|
|
53
|
-
functions: FunctionSchema[] = []
|
|
54
|
-
|
|
55
|
-
constructor() {
|
|
56
|
-
super()
|
|
57
|
-
|
|
58
|
-
// Initialize function schemas
|
|
59
|
-
this.functions = this.createFunctionSchema()
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Creates a schema for the code-editor functions.
|
|
64
|
-
* This method is responsible for defining the functions that can be used in the formula,
|
|
65
|
-
* given the current data type.
|
|
66
|
-
*/
|
|
67
|
-
createFunctionSchema(): FunctionSchema[] {
|
|
68
|
-
const result: FunctionSchema[] = []
|
|
69
|
-
|
|
70
|
-
for (const func of Object.values(stringLibrarySchema.functions)) {
|
|
71
|
-
result.push(func)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
for (const func of Object.values(arrayLibrarySchema.functions)) {
|
|
75
|
-
result.push(func)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
for (const func of Object.values(dateLibrarySchema.functions)) {
|
|
79
|
-
result.push(func)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
for (const func of Object.values(mathLibrarySchema.functions)) {
|
|
83
|
-
result.push(func)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return result
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private handleFunctionInsert(event: CustomEvent<FunctionInsertEvent>): void {
|
|
90
|
-
const { functionSchema, position } = event.detail
|
|
91
|
-
this.output = `Function inserted: ${functionSchema.name} at position ${position}`
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
private handleSuggestionInsert(event: CustomEvent<SuggestionInsertEvent>): void {
|
|
95
|
-
const { suggestion, position } = event.detail
|
|
96
|
-
this.output = `Suggestion inserted: ${suggestion.label} at position ${position}`
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
private handleInput(event: Event): void {
|
|
100
|
-
const target = event.target as HTMLElement & { value: string }
|
|
101
|
-
this.editorValue = target.value
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private handleFunctionDocumentation(event: CustomEvent<{ functionSchema: FunctionSchema }>): void {
|
|
105
|
-
const { functionSchema } = event.detail
|
|
106
|
-
this.output = `Function documentation requested for: ${functionSchema.name}`
|
|
107
|
-
console.log('Function documentation:', functionSchema)
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
private handleChange(event: Event): void {
|
|
111
|
-
const target = event.target as HTMLElement & { value: string }
|
|
112
|
-
this.output = `Editor content changed: ${target.value}`
|
|
113
|
-
console.log('Editor change:', target.value)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
contentTemplate() {
|
|
117
|
-
return html`
|
|
118
|
-
<a href="../">Back</a>
|
|
119
|
-
|
|
120
|
-
<section class="demo-section">
|
|
121
|
-
<h2 class="display-large">Basic Code Editor</h2>
|
|
122
|
-
<p>A CodeMirror 6 based editor with function autocomplete and suggestion pills.</p>
|
|
123
|
-
|
|
124
|
-
<code-editor
|
|
125
|
-
label="Code Editor"
|
|
126
|
-
supportingtext="Type function names or {{fnName}} to see autocomplete"
|
|
127
|
-
.value=${this.editorValue}
|
|
128
|
-
.functionSchemas=${this.functions}
|
|
129
|
-
.suggestions=${this.suggestions}
|
|
130
|
-
@functioninsert=${this.handleFunctionInsert}
|
|
131
|
-
@suggestioninsert=${this.handleSuggestionInsert}
|
|
132
|
-
@input=${this.handleInput}
|
|
133
|
-
@change=${this.handleChange}
|
|
134
|
-
showdocumentation
|
|
135
|
-
@docsrequest="${this.handleFunctionDocumentation}"
|
|
136
|
-
></code-editor>
|
|
137
|
-
|
|
138
|
-
${this.output ? html`<p><strong>Output:</strong> ${this.output}</p>` : ''}
|
|
139
|
-
</section>
|
|
140
|
-
|
|
141
|
-
<section class="demo-section">
|
|
142
|
-
<h2 class="display-large">Disabled State</h2>
|
|
143
|
-
<p>A disabled editor for read-only content.</p>
|
|
144
|
-
|
|
145
|
-
<code-editor
|
|
146
|
-
label="Disabled Editor"
|
|
147
|
-
supportingtext="This editor is disabled"
|
|
148
|
-
.value=${'// This editor is disabled\nconst readOnly = true'}
|
|
149
|
-
.functionSchemas=${this.functions}
|
|
150
|
-
.suggestions=${this.suggestions}
|
|
151
|
-
disabled
|
|
152
|
-
></code-editor>
|
|
153
|
-
</section>
|
|
154
|
-
|
|
155
|
-
<section class="demo-section">
|
|
156
|
-
<h2 class="display-large">Error State</h2>
|
|
157
|
-
<p>An editor in error state.</p>
|
|
158
|
-
|
|
159
|
-
<code-editor
|
|
160
|
-
label="Error Editor"
|
|
161
|
-
supportingtext="This editor has an error"
|
|
162
|
-
.value=${'// This editor has an error\nconst invalid = true'}
|
|
163
|
-
.functionSchemas=${this.functions}
|
|
164
|
-
.suggestions=${this.suggestions}
|
|
165
|
-
invalid
|
|
166
|
-
></code-editor>
|
|
167
|
-
</section>
|
|
168
|
-
`
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
const instance = new CodeEditorDemo()
|
|
173
|
-
instance.render()
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Code Editor Demo</title>
|
|
7
|
-
<link
|
|
8
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
|
9
|
-
rel="stylesheet"
|
|
10
|
-
/>
|
|
11
|
-
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
12
|
-
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
13
|
-
<link href="../../page.css" rel="stylesheet" type="text/css" />
|
|
14
|
-
</head>
|
|
15
|
-
<body data-gr-ext-disabled="next">
|
|
16
|
-
<div id="app"></div>
|
|
17
|
-
<script type="module" src="/.tmp/demo/elements/code-editor/CodeEditorDemo.js"></script>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { svg } from 'lit'
|
|
2
|
-
import { iconWrapper } from '../../../src/md/icons/Icons.js'
|
|
3
|
-
|
|
4
|
-
// fonts by Material Design: https://fonts.google.com/icons?selected=Material+Icons
|
|
5
|
-
|
|
6
|
-
export const copy = iconWrapper(
|
|
7
|
-
svg`<path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/>`
|
|
8
|
-
)
|
|
9
|
-
export const paste = iconWrapper(
|
|
10
|
-
svg`<path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 2h-4.18C14.4.84 13.3 0 12 0S9.6.84 9.18 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"/>`
|
|
11
|
-
)
|
|
12
|
-
export const flag = iconWrapper(
|
|
13
|
-
svg`<path d="M0 0h24v24H0V0z" fill="none"/><path d="M12.36 6l.4 2H18v6h-3.36l-.4-2H7V6h5.36M14 4H5v17h2v-7h5.6l.4 2h7V6h-5.6L14 4z"/>`
|
|
14
|
-
)
|
|
15
|
-
export const formatSize = iconWrapper(
|
|
16
|
-
svg`<path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 4v3h5v12h3V7h5V4H9zm-6 8h3v7h3v-7h3V9H3v3z"/>`
|
|
17
|
-
)
|
|
18
|
-
export const title = iconWrapper(svg`<path d="M0 0h24v24H0V0z" fill="none"/><path d="M5 4v3h5.5v12h3V7H19V4H5z"/>`)
|
|
19
|
-
export const fontDownload = iconWrapper(
|
|
20
|
-
svg`<path d="M0 0h24v24H0V0z" fill="none"/><path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"/>`
|
|
21
|
-
)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
7
|
-
<title>Basic context menu</title>
|
|
8
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
|
-
<link
|
|
11
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
|
12
|
-
rel="stylesheet"
|
|
13
|
-
/>
|
|
14
|
-
<link href="../../../src/styles/m3/tokens.css" rel="stylesheet" type="text/css" />
|
|
15
|
-
<link href="../../../src/styles/m3/theme.css" rel="stylesheet" type="text/css" />
|
|
16
|
-
<link href="../../page.css" rel="stylesheet" type="text/css" />
|
|
17
|
-
<link href="./demo.css" rel="stylesheet" type="text/css" />
|
|
18
|
-
</head>
|
|
19
|
-
|
|
20
|
-
<body class="demo">
|
|
21
|
-
<div id="app"></div>
|
|
22
|
-
<script type="module" src="/.tmp/demo/elements/context-menu/basic.js"></script>
|
|
23
|
-
</body>
|
|
24
|
-
|
|
25
|
-
</html>
|