notebook 7.3.0b2__py3-none-any.whl → 7.3.1__py3-none-any.whl

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.

Potentially problematic release.


This version of notebook might be problematic. Click here for more details.

Files changed (113) hide show
  1. notebook/_version.py +1 -1
  2. notebook/static/{1650.1bd28ce67416c8f16b0a.js → 1650.f2b92d4d553bfe8a53c0.js} +4 -4
  3. notebook/static/{1650.1bd28ce67416c8f16b0a.js.map → 1650.f2b92d4d553bfe8a53c0.js.map} +1 -1
  4. notebook/static/{1684.559efe17ab89dde47ae7.js → 1684.3af5b8529a15848c1264.js} +5 -5
  5. notebook/static/{1684.559efe17ab89dde47ae7.js.map → 1684.3af5b8529a15848c1264.js.map} +1 -1
  6. notebook/static/{4864.64c377dd0f7d413c6094.js → 1871.29951b77779d94d726d1.js} +5 -1230
  7. notebook/static/1871.29951b77779d94d726d1.js.map +1 -0
  8. notebook/static/{7636.1c12a1c4f50368561c79.js → 2692.aa472750b0685d9dc0b2.js} +2 -2
  9. notebook/static/{7636.1c12a1c4f50368561c79.js.map → 2692.aa472750b0685d9dc0b2.js.map} +1 -1
  10. notebook/static/2816.03541f3103bf4c09e591.js +2454 -0
  11. notebook/static/2816.03541f3103bf4c09e591.js.map +1 -0
  12. notebook/static/{3146.6c0713ef79dfaa20bfb1.js → 3146.97ceb65ac870fdcdfbe8.js} +3 -3
  13. notebook/static/{3146.6c0713ef79dfaa20bfb1.js.map → 3146.97ceb65ac870fdcdfbe8.js.map} +1 -1
  14. notebook/static/{3768.aff185a034d18009623a.js → 3768.6343619807e7c2a9d714.js} +19 -19
  15. notebook/static/{7302.21256befc2511fe4d32f.js.map → 3768.6343619807e7c2a9d714.js.map} +1 -1
  16. notebook/static/417.29f636ec8be265b7e480.js +35732 -0
  17. notebook/static/417.29f636ec8be265b7e480.js.map +1 -0
  18. notebook/static/{5018.ee5d379ed404ab1c5431.js → 4201.20132290f384a6b6393d.js} +2 -2
  19. notebook/static/{5018.ee5d379ed404ab1c5431.js.map → 4201.20132290f384a6b6393d.js.map} +1 -1
  20. notebook/static/{4382.8e6c28124e4454aef279.js → 4382.6fab9cdf40a3339ed3d4.js} +3 -3
  21. notebook/static/{4382.8e6c28124e4454aef279.js.map → 4382.6fab9cdf40a3339ed3d4.js.map} +1 -1
  22. notebook/static/{4630.7e63eb06a239c9d5284e.js → 4630.3883ae147294cfade724.js} +3 -3
  23. notebook/static/{4630.7e63eb06a239c9d5284e.js.map → 4630.3883ae147294cfade724.js.map} +1 -1
  24. notebook/static/{4645.a7f11a7ccd983d2b97d3.js → 4645.859c9a8078e07bd9720f.js} +5 -5
  25. notebook/static/{4645.a7f11a7ccd983d2b97d3.js.map → 4645.859c9a8078e07bd9720f.js.map} +1 -1
  26. notebook/static/{4837.f5f3df5f5cff466be27b.js → 4837.36bee8533ee93068ee88.js} +3 -3
  27. notebook/static/{4837.f5f3df5f5cff466be27b.js.map → 4837.36bee8533ee93068ee88.js.map} +1 -1
  28. notebook/static/{5135.5fea9ea2df659f5eb5ae.js → 5135.ec51053c912f00c60e74.js} +11 -11
  29. notebook/static/{5135.5fea9ea2df659f5eb5ae.js.map → 5135.ec51053c912f00c60e74.js.map} +1 -1
  30. notebook/static/{5573.480c617153be4745c1ce.js → 5573.a4598929db84c5f78ee2.js} +17 -17
  31. notebook/static/{5573.480c617153be4745c1ce.js.map → 5573.a4598929db84c5f78ee2.js.map} +1 -1
  32. notebook/static/{5601.718852b05fe43a575c45.js → 5601.ee83a00a07b41941d934.js} +5 -5
  33. notebook/static/{5601.718852b05fe43a575c45.js.map → 5601.ee83a00a07b41941d934.js.map} +1 -1
  34. notebook/static/{6345.007af86b68aa28034080.js → 6345.c4a72953c198541b9a7f.js} +5 -5
  35. notebook/static/{6345.007af86b68aa28034080.js.map → 6345.c4a72953c198541b9a7f.js.map} +1 -1
  36. notebook/static/{7302.21256befc2511fe4d32f.js → 7302.a2513413e33b84efedea.js} +19 -19
  37. notebook/static/{3768.aff185a034d18009623a.js.map → 7302.a2513413e33b84efedea.js.map} +1 -1
  38. notebook/static/{7906.cee077e7e80731ddf8a7.js → 7906.a9556ca8e2504977987c.js} +3 -3
  39. notebook/static/{7906.cee077e7e80731ddf8a7.js.map → 7906.a9556ca8e2504977987c.js.map} +1 -1
  40. notebook/static/{8579.64e229a3c2210a14fcf7.js → 8579.3dec3a2251606938dba4.js} +13 -13
  41. notebook/static/{8579.64e229a3c2210a14fcf7.js.map → 8579.3dec3a2251606938dba4.js.map} +1 -1
  42. notebook/static/{3488.405b2a619b7b87fc6f6b.js → 8608.2c46e2e83b7543bfc32e.js} +2 -2
  43. notebook/static/{3488.405b2a619b7b87fc6f6b.js.map → 8608.2c46e2e83b7543bfc32e.js.map} +1 -1
  44. notebook/static/{8781.9e8a12a243dae2c0f2d4.js → 8781.adc12eca88ec3b76d38b.js} +57 -57
  45. notebook/static/{8781.9e8a12a243dae2c0f2d4.js.map → 8781.adc12eca88ec3b76d38b.js.map} +1 -1
  46. notebook/static/{8875.648b97219ad96ef9ba4c.js → 8875.117e3e9f3836340e549b.js} +4 -4
  47. notebook/static/{8875.648b97219ad96ef9ba4c.js.map → 8875.117e3e9f3836340e549b.js.map} +1 -1
  48. notebook/static/{9068.bf907c642d9541e6894b.js → 9068.f5036cc4dc9f0a25d015.js} +3 -3
  49. notebook/static/{9068.bf907c642d9541e6894b.js.map → 9068.f5036cc4dc9f0a25d015.js.map} +1 -1
  50. notebook/static/{9380.71f02ce91dd216d66b15.js → 9380.297bbac8b3a9ab278381.js} +5 -5
  51. notebook/static/{9380.71f02ce91dd216d66b15.js.map → 9380.297bbac8b3a9ab278381.js.map} +1 -1
  52. notebook/static/main.2d9be431d24701c6dc8c.js +1174 -0
  53. notebook/static/main.2d9be431d24701c6dc8c.js.map +1 -0
  54. notebook/static/{notebook_core.d9335e513324cb89fdda.js → notebook_core.11ed4ec3cbd911d6d615.js} +1353 -1087
  55. notebook/static/{notebook_core.d9335e513324cb89fdda.js.map → notebook_core.11ed4ec3cbd911d6d615.js.map} +1 -1
  56. notebook/static/third-party-licenses.json +101 -101
  57. notebook/templates/consoles.html +1 -1
  58. notebook/templates/edit.html +1 -1
  59. notebook/templates/error.html +1 -1
  60. notebook/templates/notebooks.html +1 -1
  61. notebook/templates/terminals.html +1 -1
  62. notebook/templates/tree.html +1 -1
  63. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
  64. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
  65. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  66. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
  67. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
  68. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
  69. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
  70. notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6775a82fd4797c8a757e.js → notebook-7.3.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.7f0a96c20070714b04c8.js +1 -1
  71. notebook-7.3.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.accb8657e1346f0444ce.js +1 -0
  72. notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/29.a4a23d51c410a7dd82e6.js → notebook-7.3.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/983.1840301bae62c7e769b5.js +1 -1
  73. notebook-7.3.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.3922a57136e4fe7d7670.js +1 -0
  74. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  75. {notebook-7.3.0b2.dist-info → notebook-7.3.1.dist-info}/METADATA +3 -4
  76. {notebook-7.3.0b2.dist-info → notebook-7.3.1.dist-info}/RECORD +100 -104
  77. {notebook-7.3.0b2.dist-info → notebook-7.3.1.dist-info}/WHEEL +1 -1
  78. notebook/static/2424.6f13f59f4bc472c3d07d.js +0 -1278
  79. notebook/static/2424.6f13f59f4bc472c3d07d.js.map +0 -1
  80. notebook/static/4864.64c377dd0f7d413c6094.js.map +0 -1
  81. notebook/static/5430.98e90178da18bdd99116.js +0 -2145
  82. notebook/static/5430.98e90178da18bdd99116.js.map +0 -1
  83. notebook/static/8635.76a56708236264507087.js +0 -11476
  84. notebook/static/8635.76a56708236264507087.js.map +0 -1
  85. notebook/static/9672.b55f9504fd5af290b047.js +0 -774
  86. notebook/static/9672.b55f9504fd5af290b047.js.map +0 -1
  87. notebook/static/main.dcc101ae087bd679a592.js +0 -1164
  88. notebook/static/main.dcc101ae087bd679a592.js.map +0 -1
  89. notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.628090148fd2c1d8e659.js +0 -1
  90. notebook-7.3.0b2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.d4c6147036cdc583f6e3.js +0 -1
  91. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  92. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  93. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  94. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  95. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  96. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  97. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  98. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  99. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  100. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  101. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  102. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  103. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +0 -0
  104. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  105. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  106. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  107. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
  108. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  109. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  110. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  111. {notebook-7.3.0b2.data → notebook-7.3.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  112. {notebook-7.3.0b2.dist-info → notebook-7.3.1.dist-info}/entry_points.txt +0 -0
  113. {notebook-7.3.0b2.dist-info → notebook-7.3.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,1278 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([[2424],{
3
-
4
- /***/ 63956:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
-
7
-
8
- // EXPORTS
9
- __webpack_require__.d(__webpack_exports__, {
10
- k: () => (/* binding */ TreeItem)
11
- });
12
-
13
- // EXTERNAL MODULE: ../node_modules/@jupyter/web-components/dist/esm/jupyter-design-system.js + 1 modules
14
- var jupyter_design_system = __webpack_require__(68866);
15
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/tree-item/tree-item.js
16
- var tree_item = __webpack_require__(80189);
17
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/template.js + 3 modules
18
- var template = __webpack_require__(25269);
19
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/children.js
20
- var children = __webpack_require__(58545);
21
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/node-observation.js
22
- var node_observation = __webpack_require__(41681);
23
- ;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-element/dist/esm/interfaces.js
24
- /**
25
- * Determines whether or not an object is a function.
26
- * @public
27
- */
28
- const isFunction = (object) => typeof object === "function";
29
-
30
- ;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/when.js
31
-
32
- const noTemplate = () => null;
33
- function normalizeBinding(value) {
34
- return value === undefined ? noTemplate : isFunction(value) ? value : () => value;
35
- }
36
- /**
37
- * A directive that enables basic conditional rendering in a template.
38
- * @param binding - The condition to test for rendering.
39
- * @param templateOrTemplateBinding - The template or a binding that gets
40
- * the template to render when the condition is true.
41
- * @param elseTemplateOrTemplateBinding - Optional template or binding that that
42
- * gets the template to render when the conditional is false.
43
- * @public
44
- */
45
- function when(binding, templateOrTemplateBinding, elseTemplateOrTemplateBinding) {
46
- const dataBinding = isFunction(binding) ? binding : () => binding;
47
- const templateBinding = normalizeBinding(templateOrTemplateBinding);
48
- const elseBinding = normalizeBinding(elseTemplateOrTemplateBinding);
49
- return (source, context) => dataBinding(source, context)
50
- ? templateBinding(source, context)
51
- : elseBinding(source, context);
52
- }
53
-
54
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/ref.js
55
- var ref = __webpack_require__(62564);
56
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/slotted.js
57
- var slotted = __webpack_require__(17832);
58
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/patterns/start-end.js
59
- var start_end = __webpack_require__(52865);
60
- ;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/tree-item/tree-item.template.js
61
-
62
-
63
- /**
64
- * The template for the {@link @microsoft/fast-foundation#(TreeItem:class)} component.
65
- * @public
66
- */
67
- const treeItemTemplate = (context, definition) => (0,template/* html */.d) `
68
- <template
69
- role="treeitem"
70
- slot="${x => (x.isNestedItem() ? "item" : void 0)}"
71
- tabindex="-1"
72
- class="${x => (x.expanded ? "expanded" : "")} ${x => x.selected ? "selected" : ""} ${x => (x.nested ? "nested" : "")}
73
- ${x => (x.disabled ? "disabled" : "")}"
74
- aria-expanded="${x => x.childItems && x.childItemLength() > 0 ? x.expanded : void 0}"
75
- aria-selected="${x => x.selected}"
76
- aria-disabled="${x => x.disabled}"
77
- @focusin="${(x, c) => x.handleFocus(c.event)}"
78
- @focusout="${(x, c) => x.handleBlur(c.event)}"
79
- ${(0,children/* children */.p)({
80
- property: "childItems",
81
- filter: (0,node_observation/* elements */.R)(),
82
- })}
83
- >
84
- <div class="positioning-region" part="positioning-region">
85
- <div class="content-region" part="content-region">
86
- ${when(x => x.childItems && x.childItemLength() > 0, (0,template/* html */.d) `
87
- <div
88
- aria-hidden="true"
89
- class="expand-collapse-button"
90
- part="expand-collapse-button"
91
- @click="${(x, c) => x.handleExpandCollapseButtonClick(c.event)}"
92
- ${(0,ref/* ref */.i)("expandCollapseButton")}
93
- >
94
- <slot name="expand-collapse-glyph">
95
- ${definition.expandCollapseGlyph || ""}
96
- </slot>
97
- </div>
98
- `)}
99
- ${(0,start_end/* startSlotTemplate */.m9)(context, definition)}
100
- <slot></slot>
101
- ${(0,start_end/* endSlotTemplate */.LC)(context, definition)}
102
- </div>
103
- </div>
104
- ${when(x => x.childItems &&
105
- x.childItemLength() > 0 &&
106
- (x.expanded || x.renderCollapsedChildren), (0,template/* html */.d) `
107
- <div role="group" class="items" part="items">
108
- <slot name="item" ${(0,slotted/* slotted */.Q)("items")}></slot>
109
- </div>
110
- `)}
111
- </template>
112
- `;
113
-
114
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/styles/css.js
115
- var css = __webpack_require__(12634);
116
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/design-token/design-token.js + 2 modules
117
- var design_token = __webpack_require__(27002);
118
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/display.js
119
- var display = __webpack_require__(21601);
120
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/focus.js
121
- var style_focus = __webpack_require__(58201);
122
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/disabled.js
123
- var disabled = __webpack_require__(61424);
124
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/match-media-stylesheet-behavior.js
125
- var match_media_stylesheet_behavior = __webpack_require__(98242);
126
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/system-colors.js
127
- var system_colors = __webpack_require__(30550);
128
- // EXTERNAL MODULE: ../node_modules/@jupyter/web-components/dist/esm/design-tokens.js + 30 modules
129
- var design_tokens = __webpack_require__(87206);
130
- // EXTERNAL MODULE: ../node_modules/@jupyter/web-components/dist/esm/styles/size.js
131
- var size = __webpack_require__(13370);
132
- ;// CONCATENATED MODULE: ../node_modules/@jupyter/web-components/dist/esm/styles/direction.js
133
- // Copyright (c) Jupyter Development Team.
134
- // Copyright (c) Microsoft Corporation.
135
- // Distributed under the terms of the Modified BSD License.
136
-
137
- /**
138
- * Behavior to conditionally apply LTR and RTL stylesheets. To determine which to apply,
139
- * the behavior will use the nearest DesignSystemProvider's 'direction' design system value.
140
- *
141
- * @public
142
- * @example
143
- * ```ts
144
- * import { css } from "@microsoft/fast-element";
145
- * import { DirectionalStyleSheetBehavior } from "@microsoft/fast-foundation";
146
- *
147
- * css`
148
- * // ...
149
- * `.withBehaviors(new DirectionalStyleSheetBehavior(
150
- * css`:host { content: "ltr"}`),
151
- * css`:host { content: "rtl"}`),
152
- * )
153
- * ```
154
- */
155
- class DirectionalStyleSheetBehavior {
156
- constructor(ltr, rtl) {
157
- this.cache = new WeakMap();
158
- this.ltr = ltr;
159
- this.rtl = rtl;
160
- }
161
- /**
162
- * @internal
163
- */
164
- bind(source) {
165
- this.attach(source);
166
- }
167
- /**
168
- * @internal
169
- */
170
- unbind(source) {
171
- const cache = this.cache.get(source);
172
- if (cache) {
173
- design_tokens/* direction */.o7.unsubscribe(cache);
174
- }
175
- }
176
- attach(source) {
177
- const subscriber = this.cache.get(source) ||
178
- new DirectionalStyleSheetBehaviorSubscription(this.ltr, this.rtl, source);
179
- const value = design_tokens/* direction */.o7.getValueFor(source);
180
- design_tokens/* direction */.o7.subscribe(subscriber);
181
- subscriber.attach(value);
182
- this.cache.set(source, subscriber);
183
- }
184
- }
185
- /**
186
- * Subscription for {@link DirectionalStyleSheetBehavior}
187
- */
188
- class DirectionalStyleSheetBehaviorSubscription {
189
- constructor(ltr, rtl, source) {
190
- this.ltr = ltr;
191
- this.rtl = rtl;
192
- this.source = source;
193
- this.attached = null;
194
- }
195
- handleChange({ target, token }) {
196
- this.attach(token.getValueFor(target));
197
- }
198
- attach(direction) {
199
- if (this.attached !== this[direction]) {
200
- if (this.attached !== null) {
201
- this.source.$fastController.removeStyles(this.attached);
202
- }
203
- this.attached = this[direction];
204
- if (this.attached !== null) {
205
- this.source.$fastController.addStyles(this.attached);
206
- }
207
- }
208
- }
209
- }
210
-
211
- ;// CONCATENATED MODULE: ../node_modules/@jupyter/web-components/dist/esm/tree-item/tree-item.styles.js
212
- // Copyright (c) Jupyter Development Team.
213
- // Copyright (c) Microsoft Corporation.
214
- // Distributed under the terms of the Modified BSD License.
215
-
216
-
217
-
218
-
219
-
220
- /**
221
- * Tree item expand collapse button size CSS Partial
222
- * @public
223
- */
224
- const expandCollapseButtonSize = (0,css/* cssPartial */.j) `(((${design_tokens/* baseHeightMultiplier */.nf} + ${design_tokens/* density */.hV}) * 0.5 + 2) * ${design_tokens/* designUnit */._5})`;
225
- const ltr = (0,css/* css */.i) `
226
- .expand-collapse-glyph {
227
- transform: rotate(0deg);
228
- }
229
- :host(.nested) .expand-collapse-button {
230
- left: var(
231
- --expand-collapse-button-nested-width,
232
- calc(
233
- (
234
- ${expandCollapseButtonSize} +
235
- ((${design_tokens/* baseHeightMultiplier */.nf} + ${design_tokens/* density */.hV}) * 1.25)
236
- ) * -1px
237
- )
238
- );
239
- }
240
- :host([selected])::after {
241
- left: calc(${design_tokens/* focusStrokeWidth */.vx} * 1px);
242
- }
243
- :host([expanded]) > .positioning-region .expand-collapse-glyph {
244
- transform: rotate(90deg);
245
- }
246
- `;
247
- const rtl = (0,css/* css */.i) `
248
- .expand-collapse-glyph {
249
- transform: rotate(180deg);
250
- }
251
- :host(.nested) .expand-collapse-button {
252
- right: var(
253
- --expand-collapse-button-nested-width,
254
- calc(
255
- (
256
- ${expandCollapseButtonSize} +
257
- ((${design_tokens/* baseHeightMultiplier */.nf} + ${design_tokens/* density */.hV}) * 1.25)
258
- ) * -1px
259
- )
260
- );
261
- }
262
- :host([selected])::after {
263
- right: calc(${design_tokens/* focusStrokeWidth */.vx} * 1px);
264
- }
265
- :host([expanded]) > .positioning-region .expand-collapse-glyph {
266
- transform: rotate(90deg);
267
- }
268
- `;
269
- const expandCollapseHoverBehavior = design_token.DesignToken.create('tree-item-expand-collapse-hover').withDefault((target) => {
270
- const recipe = design_tokens/* neutralFillStealthRecipe */.DF.getValueFor(target);
271
- return recipe.evaluate(target, recipe.evaluate(target).hover).hover;
272
- });
273
- const selectedExpandCollapseHoverBehavior = design_token.DesignToken.create('tree-item-expand-collapse-selected-hover').withDefault((target) => {
274
- const baseRecipe = design_tokens/* neutralFillRecipe */.At.getValueFor(target);
275
- const buttonRecipe = design_tokens/* neutralFillStealthRecipe */.DF.getValueFor(target);
276
- return buttonRecipe.evaluate(target, baseRecipe.evaluate(target).rest).hover;
277
- });
278
- /**
279
- * Styles for Tree Item
280
- * @public
281
- */
282
- const treeItemStyles = (context, definition) => (0,css/* css */.i) `
283
- /**
284
- * This animation exists because when tree item children are conditionally loaded
285
- * there is a visual bug where the DOM exists but styles have not yet been applied (essentially FOUC).
286
- * This subtle animation provides a ever so slight timing adjustment for loading that solves the issue.
287
- */
288
- @keyframes treeItemLoading {
289
- 0% {
290
- opacity: 0;
291
- }
292
- 100% {
293
- opacity: 1;
294
- }
295
- }
296
-
297
- ${(0,display/* display */.j)('block')} :host {
298
- contain: content;
299
- position: relative;
300
- outline: none;
301
- color: ${design_tokens/* neutralForegroundRest */.hY};
302
- background: ${design_tokens/* neutralFillStealthRest */.jq};
303
- cursor: pointer;
304
- font-family: ${design_tokens/* bodyFont */.SV};
305
- --tree-item-nested-width: 0;
306
- }
307
-
308
- :host(:focus) > .positioning-region {
309
- outline: none;
310
- }
311
-
312
- :host(:focus) .content-region {
313
- outline: none;
314
- }
315
-
316
- :host(:${style_focus/* focusVisible */.b}) .positioning-region {
317
- border-color: ${design_tokens/* accentFillFocus */.D8};
318
- box-shadow: 0 0 0 calc((${design_tokens/* focusStrokeWidth */.vx} - ${design_tokens/* strokeWidth */.H}) * 1px)
319
- ${design_tokens/* accentFillFocus */.D8} inset;
320
- color: ${design_tokens/* neutralForegroundRest */.hY};
321
- }
322
-
323
- .positioning-region {
324
- display: flex;
325
- position: relative;
326
- box-sizing: border-box;
327
- background: ${design_tokens/* neutralFillStealthRest */.jq};
328
- border: transparent calc(${design_tokens/* strokeWidth */.H} * 1px) solid;
329
- border-radius: calc(${design_tokens/* controlCornerRadius */.UW} * 1px);
330
- height: calc((${size/* heightNumber */.i} + 1) * 1px);
331
- }
332
-
333
- .positioning-region::before {
334
- content: '';
335
- display: block;
336
- width: var(--tree-item-nested-width);
337
- flex-shrink: 0;
338
- }
339
-
340
- :host(:not([disabled])) .positioning-region:hover {
341
- background: ${design_tokens/* neutralFillStealthHover */.Qp};
342
- }
343
-
344
- :host(:not([disabled])) .positioning-region:active {
345
- background: ${design_tokens/* neutralFillStealthActive */.sG};
346
- }
347
-
348
- .content-region {
349
- display: inline-flex;
350
- align-items: center;
351
- white-space: nowrap;
352
- width: 100%;
353
- min-width: 0;
354
- height: calc(${size/* heightNumber */.i} * 1px);
355
- margin-inline-start: calc(${design_tokens/* designUnit */._5} * 2px + 8px);
356
- font-size: ${design_tokens/* typeRampBaseFontSize */.cS};
357
- line-height: ${design_tokens/* typeRampBaseLineHeight */.RU};
358
- font-weight: 400;
359
- }
360
-
361
- .items {
362
- /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */
363
- font-size: calc(1em + (${design_tokens/* designUnit */._5} + 16) * 1px);
364
- }
365
-
366
- .expand-collapse-button {
367
- background: none;
368
- border: none;
369
- outline: none;
370
- /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */
371
- width: calc(${expandCollapseButtonSize} * 1px);
372
- height: calc(${expandCollapseButtonSize} * 1px);
373
- padding: 0;
374
- display: flex;
375
- justify-content: center;
376
- align-items: center;
377
- cursor: pointer;
378
- margin-left: 6px;
379
- margin-right: 6px;
380
- }
381
-
382
- .expand-collapse-glyph {
383
- /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */
384
- width: calc((16 + ${design_tokens/* density */.hV}) * 1px);
385
- height: calc((16 + ${design_tokens/* density */.hV}) * 1px);
386
- transition: transform 0.1s linear;
387
-
388
- pointer-events: none;
389
- fill: currentcolor;
390
- }
391
-
392
- .start,
393
- .end {
394
- display: flex;
395
- fill: currentcolor;
396
- }
397
-
398
- ::slotted(svg) {
399
- /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */
400
- width: 16px;
401
- height: 16px;
402
-
403
- /* Something like that would do if the typography is adaptive
404
- font-size: inherit;
405
- width: ${design_tokens/* typeRampPlus1FontSize */.Pw};
406
- height: ${design_tokens/* typeRampPlus1FontSize */.Pw};
407
- */
408
- }
409
-
410
- .start {
411
- /* TODO: horizontalSpacing https://github.com/microsoft/fast/issues/2766 */
412
- margin-inline-end: calc(${design_tokens/* designUnit */._5} * 2px + 2px);
413
- }
414
-
415
- .end {
416
- /* TODO: horizontalSpacing https://github.com/microsoft/fast/issues/2766 */
417
- margin-inline-start: calc(${design_tokens/* designUnit */._5} * 2px + 2px);
418
- }
419
-
420
- :host([expanded]) > .items {
421
- animation: treeItemLoading ease-in 10ms;
422
- animation-iteration-count: 1;
423
- animation-fill-mode: forwards;
424
- }
425
-
426
- :host([disabled]) .content-region {
427
- opacity: ${design_tokens/* disabledOpacity */.VF};
428
- cursor: ${disabled/* disabledCursor */.H};
429
- }
430
-
431
- :host(.nested) .content-region {
432
- position: relative;
433
- /* Add left margin to collapse button size */
434
- margin-inline-start: calc(
435
- (
436
- ${expandCollapseButtonSize} +
437
- ((${design_tokens/* baseHeightMultiplier */.nf} + ${design_tokens/* density */.hV}) * 1.25)
438
- ) * 1px
439
- );
440
- }
441
-
442
- :host(.nested) .expand-collapse-button {
443
- position: absolute;
444
- }
445
-
446
- :host(.nested:not([disabled])) .expand-collapse-button:hover {
447
- background: ${expandCollapseHoverBehavior};
448
- }
449
-
450
- :host([selected]) .positioning-region {
451
- background: ${design_tokens/* neutralFillRest */.wF};
452
- }
453
-
454
- :host([selected]:not([disabled])) .positioning-region:hover {
455
- background: ${design_tokens/* neutralFillHover */.Xi};
456
- }
457
-
458
- :host([selected]:not([disabled])) .positioning-region:active {
459
- background: ${design_tokens/* neutralFillActive */.Gy};
460
- }
461
-
462
- :host([selected]:not([disabled])) .expand-collapse-button:hover {
463
- background: ${selectedExpandCollapseHoverBehavior};
464
- }
465
-
466
- :host([selected])::after {
467
- /* The background needs to be calculated based on the selected background state
468
- for this control. We currently have no way of changing that, so setting to
469
- accent-foreground-rest for the time being */
470
- background: ${design_tokens/* accentForegroundRest */.go};
471
- border-radius: calc(${design_tokens/* controlCornerRadius */.UW} * 1px);
472
- content: '';
473
- display: block;
474
- position: absolute;
475
- top: calc((${size/* heightNumber */.i} / 4) * 1px);
476
- width: 3px;
477
- height: calc((${size/* heightNumber */.i} / 2) * 1px);
478
- }
479
-
480
- ::slotted(${context.tagFor(tree_item/* TreeItem */.k)}) {
481
- --tree-item-nested-width: 1em;
482
- --expand-collapse-button-nested-width: calc(
483
- (
484
- ${expandCollapseButtonSize} +
485
- ((${design_tokens/* baseHeightMultiplier */.nf} + ${design_tokens/* density */.hV}) * 1.25)
486
- ) * -1px
487
- );
488
- }
489
- `.withBehaviors(new DirectionalStyleSheetBehavior(ltr, rtl), (0,match_media_stylesheet_behavior/* forcedColorsStylesheetBehavior */.vF)((0,css/* css */.i) `
490
- :host {
491
- forced-color-adjust: none;
492
- border-color: transparent;
493
- background: ${system_colors/* SystemColors */.H.Field};
494
- color: ${system_colors/* SystemColors */.H.FieldText};
495
- }
496
- :host .content-region .expand-collapse-glyph {
497
- fill: ${system_colors/* SystemColors */.H.FieldText};
498
- }
499
- :host .positioning-region:hover,
500
- :host([selected]) .positioning-region {
501
- background: ${system_colors/* SystemColors */.H.Highlight};
502
- }
503
- :host .positioning-region:hover .content-region,
504
- :host([selected]) .positioning-region .content-region {
505
- color: ${system_colors/* SystemColors */.H.HighlightText};
506
- }
507
- :host .positioning-region:hover .content-region .expand-collapse-glyph,
508
- :host .positioning-region:hover .content-region .start,
509
- :host .positioning-region:hover .content-region .end,
510
- :host([selected]) .content-region .expand-collapse-glyph,
511
- :host([selected]) .content-region .start,
512
- :host([selected]) .content-region .end {
513
- fill: ${system_colors/* SystemColors */.H.HighlightText};
514
- }
515
- :host([selected])::after {
516
- background: ${system_colors/* SystemColors */.H.Field};
517
- }
518
- :host(:${style_focus/* focusVisible */.b}) .positioning-region {
519
- border-color: ${system_colors/* SystemColors */.H.FieldText};
520
- box-shadow: 0 0 0 2px inset ${system_colors/* SystemColors */.H.Field};
521
- color: ${system_colors/* SystemColors */.H.FieldText};
522
- }
523
- :host([disabled]) .content-region,
524
- :host([disabled]) .positioning-region:hover .content-region {
525
- opacity: 1;
526
- color: ${system_colors/* SystemColors */.H.GrayText};
527
- }
528
- :host([disabled]) .content-region .expand-collapse-glyph,
529
- :host([disabled]) .content-region .start,
530
- :host([disabled]) .content-region .end,
531
- :host([disabled])
532
- .positioning-region:hover
533
- .content-region
534
- .expand-collapse-glyph,
535
- :host([disabled]) .positioning-region:hover .content-region .start,
536
- :host([disabled]) .positioning-region:hover .content-region .end {
537
- fill: ${system_colors/* SystemColors */.H.GrayText};
538
- }
539
- :host([disabled]) .positioning-region:hover {
540
- background: ${system_colors/* SystemColors */.H.Field};
541
- }
542
- .expand-collapse-glyph,
543
- .start,
544
- .end {
545
- fill: ${system_colors/* SystemColors */.H.FieldText};
546
- }
547
- :host(.nested) .expand-collapse-button:hover {
548
- background: ${system_colors/* SystemColors */.H.Field};
549
- }
550
- :host(.nested) .expand-collapse-button:hover .expand-collapse-glyph {
551
- fill: ${system_colors/* SystemColors */.H.FieldText};
552
- }
553
- `));
554
-
555
- ;// CONCATENATED MODULE: ../node_modules/@jupyter/web-components/dist/esm/tree-item/index.js
556
- // Copyright (c) Jupyter Development Team.
557
- // Copyright (c) Microsoft Corporation.
558
- // Distributed under the terms of the Modified BSD License.
559
-
560
-
561
- /**
562
- * Tree item class
563
- *
564
- * @public
565
- * @tagname jp-tree-item
566
- */
567
- class JupyterTreeItem extends tree_item/* TreeItem */.k {
568
- }
569
- /**
570
- * A function that returns a {@link @microsoft/fast-foundation#TreeItem} registration for configuring the component with a DesignSystem.
571
- * Implements {@link @microsoft/fast-foundation#treeItemTemplate}
572
- *
573
- *
574
- * @public
575
- * @remarks
576
- * Generates HTML Element: `<jp-tree-item>`
577
- *
578
- */
579
- const jpTreeItem = JupyterTreeItem.compose({
580
- baseName: 'tree-item',
581
- baseClass: tree_item/* TreeItem */.k,
582
- template: treeItemTemplate,
583
- styles: treeItemStyles,
584
- expandCollapseGlyph: /* html */ `
585
- <svg
586
- viewBox="0 0 16 16"
587
- xmlns="http://www.w3.org/2000/svg"
588
- class="expand-collapse-glyph"
589
- >
590
- <path
591
- d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"
592
- />
593
- </svg>
594
- `
595
- });
596
-
597
-
598
- // EXTERNAL MODULE: consume shared module (default) react@~18.2.0 (singleton) (fallback: ../node_modules/react/index.js)
599
- var index_js_ = __webpack_require__(78156);
600
- var index_js_default = /*#__PURE__*/__webpack_require__.n(index_js_);
601
- // EXTERNAL MODULE: ../node_modules/@jupyter/react-components/lib/react-utils.js
602
- var react_utils = __webpack_require__(4444);
603
- ;// CONCATENATED MODULE: ../node_modules/@jupyter/react-components/lib/TreeItem.js
604
-
605
-
606
-
607
- (0,jupyter_design_system/* provideJupyterDesignSystem */.W)().register(jpTreeItem());
608
-
609
- const TreeItem = (0,index_js_.forwardRef)((props, forwardedRef) => {
610
- const ref = (0,index_js_.useRef)(null);
611
- const { className, expanded, selected, disabled, ...filteredProps } = props;
612
-
613
- /** Event listeners - run once */
614
- (0,react_utils/* useEventListener */.O)(ref, 'expanded-change', props.onExpand);
615
- (0,react_utils/* useEventListener */.O)(ref, 'selected-change', props.onSelect);
616
-
617
- /** Properties - run whenever a property has changed */
618
- (0,react_utils/* useProperties */.h)(ref, 'expanded', props.expanded);
619
- (0,react_utils/* useProperties */.h)(ref, 'selected', props.selected);
620
- (0,react_utils/* useProperties */.h)(ref, 'disabled', props.disabled);
621
-
622
- /** Methods - uses `useImperativeHandle` hook to pass ref to component */
623
- (0,index_js_.useImperativeHandle)(forwardedRef, () => ref.current, [ref.current]);
624
-
625
- // Add web component internal classes on top of `className`
626
- let allClasses = className ?? '';
627
- if (ref.current?.nested) {
628
- allClasses += ' nested';
629
- }
630
-
631
- return index_js_default().createElement(
632
- 'jp-tree-item',
633
- {
634
- ref,
635
- ...filteredProps,
636
- class: allClasses.trim(),
637
- exportparts: props.exportparts,
638
- for: props.htmlFor,
639
- part: props.part,
640
- tabindex: props.tabIndex,
641
- style: { ...props.style }
642
- },
643
- props.children
644
- );
645
- });
646
-
647
-
648
- /***/ }),
649
-
650
- /***/ 55947:
651
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
652
-
653
-
654
- // EXPORTS
655
- __webpack_require__.d(__webpack_exports__, {
656
- L: () => (/* binding */ TreeView_TreeView)
657
- });
658
-
659
- // EXTERNAL MODULE: ../node_modules/@jupyter/web-components/dist/esm/jupyter-design-system.js + 1 modules
660
- var jupyter_design_system = __webpack_require__(68866);
661
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/node_modules/tslib/tslib.es6.js
662
- var tslib_es6 = __webpack_require__(95185);
663
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/dom.js
664
- var dom = __webpack_require__(91211);
665
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/components/attributes.js
666
- var attributes = __webpack_require__(98332);
667
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/observation/observable.js
668
- var observable = __webpack_require__(92221);
669
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/key-codes.js
670
- var key_codes = __webpack_require__(27081);
671
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/dom.js + 1 modules
672
- var dist_dom = __webpack_require__(99415);
673
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/tree-item/tree-item.js
674
- var tree_item = __webpack_require__(80189);
675
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/foundation-element/foundation-element.js
676
- var foundation_element = __webpack_require__(50755);
677
- ;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/tree-view/tree-view.js
678
-
679
-
680
-
681
-
682
-
683
- /**
684
- * A Tree view Custom HTML Element.
685
- * Implements the {@link https://w3c.github.io/aria-practices/#TreeView | ARIA TreeView }.
686
- *
687
- * @slot - The default slot for tree items
688
- *
689
- * @public
690
- */
691
- class TreeView extends foundation_element/* FoundationElement */.I {
692
- constructor() {
693
- super(...arguments);
694
- /**
695
- * The tree item that is designated to be in the tab queue.
696
- *
697
- * @internal
698
- */
699
- this.currentFocused = null;
700
- /**
701
- * Handle focus events
702
- *
703
- * @internal
704
- */
705
- this.handleFocus = (e) => {
706
- if (this.slottedTreeItems.length < 1) {
707
- // no child items, nothing to do
708
- return;
709
- }
710
- if (e.target === this) {
711
- if (this.currentFocused === null) {
712
- this.currentFocused = this.getValidFocusableItem();
713
- }
714
- if (this.currentFocused !== null) {
715
- tree_item/* TreeItem */.k.focusItem(this.currentFocused);
716
- }
717
- return;
718
- }
719
- if (this.contains(e.target)) {
720
- this.setAttribute("tabindex", "-1");
721
- this.currentFocused = e.target;
722
- }
723
- };
724
- /**
725
- * Handle blur events
726
- *
727
- * @internal
728
- */
729
- this.handleBlur = (e) => {
730
- if (e.target instanceof HTMLElement &&
731
- (e.relatedTarget === null || !this.contains(e.relatedTarget))) {
732
- this.setAttribute("tabindex", "0");
733
- }
734
- };
735
- /**
736
- * KeyDown handler
737
- *
738
- * @internal
739
- */
740
- this.handleKeyDown = (e) => {
741
- if (e.defaultPrevented) {
742
- return;
743
- }
744
- if (this.slottedTreeItems.length < 1) {
745
- return true;
746
- }
747
- const treeItems = this.getVisibleNodes();
748
- switch (e.key) {
749
- case key_codes/* keyHome */.tU:
750
- if (treeItems.length) {
751
- tree_item/* TreeItem */.k.focusItem(treeItems[0]);
752
- }
753
- return;
754
- case key_codes/* keyEnd */.Kh:
755
- if (treeItems.length) {
756
- tree_item/* TreeItem */.k.focusItem(treeItems[treeItems.length - 1]);
757
- }
758
- return;
759
- case key_codes/* keyArrowLeft */.BE:
760
- if (e.target && this.isFocusableElement(e.target)) {
761
- const item = e.target;
762
- if (item instanceof tree_item/* TreeItem */.k &&
763
- item.childItemLength() > 0 &&
764
- item.expanded) {
765
- item.expanded = false;
766
- }
767
- else if (item instanceof tree_item/* TreeItem */.k &&
768
- item.parentElement instanceof tree_item/* TreeItem */.k) {
769
- tree_item/* TreeItem */.k.focusItem(item.parentElement);
770
- }
771
- }
772
- return false;
773
- case key_codes/* keyArrowRight */.mr:
774
- if (e.target && this.isFocusableElement(e.target)) {
775
- const item = e.target;
776
- if (item instanceof tree_item/* TreeItem */.k &&
777
- item.childItemLength() > 0 &&
778
- !item.expanded) {
779
- item.expanded = true;
780
- }
781
- else if (item instanceof tree_item/* TreeItem */.k && item.childItemLength() > 0) {
782
- this.focusNextNode(1, e.target);
783
- }
784
- }
785
- return;
786
- case key_codes/* keyArrowDown */.iF:
787
- if (e.target && this.isFocusableElement(e.target)) {
788
- this.focusNextNode(1, e.target);
789
- }
790
- return;
791
- case key_codes/* keyArrowUp */.SB:
792
- if (e.target && this.isFocusableElement(e.target)) {
793
- this.focusNextNode(-1, e.target);
794
- }
795
- return;
796
- case key_codes/* keyEnter */.kL:
797
- // In single-select trees where selection does not follow focus (see note below),
798
- // the default action is typically to select the focused node.
799
- this.handleClick(e);
800
- return;
801
- }
802
- // don't prevent default if we took no action
803
- return true;
804
- };
805
- /**
806
- * Handles the selected-changed events bubbling up
807
- * from child tree items
808
- *
809
- * @internal
810
- */
811
- this.handleSelectedChange = (e) => {
812
- if (e.defaultPrevented) {
813
- return;
814
- }
815
- if (!(e.target instanceof Element) || !(0,tree_item/* isTreeItemElement */.t)(e.target)) {
816
- return true;
817
- }
818
- const item = e.target;
819
- if (item.selected) {
820
- if (this.currentSelected && this.currentSelected !== item) {
821
- this.currentSelected.selected = false;
822
- }
823
- // new selected item
824
- this.currentSelected = item;
825
- }
826
- else if (!item.selected && this.currentSelected === item) {
827
- // selected item deselected
828
- this.currentSelected = null;
829
- }
830
- return;
831
- };
832
- /**
833
- * Updates the tree view when slottedTreeItems changes
834
- */
835
- this.setItems = () => {
836
- // force single selection
837
- // defaults to first one found
838
- const selectedItem = this.treeView.querySelector("[aria-selected='true']");
839
- this.currentSelected = selectedItem;
840
- // invalidate the current focused item if it is no longer valid
841
- if (this.currentFocused === null || !this.contains(this.currentFocused)) {
842
- this.currentFocused = this.getValidFocusableItem();
843
- }
844
- // toggle properties on child elements
845
- this.nested = this.checkForNestedItems();
846
- const treeItems = this.getVisibleNodes();
847
- treeItems.forEach(node => {
848
- if ((0,tree_item/* isTreeItemElement */.t)(node)) {
849
- node.nested = this.nested;
850
- }
851
- });
852
- };
853
- /**
854
- * check if the item is focusable
855
- */
856
- this.isFocusableElement = (el) => {
857
- return (0,tree_item/* isTreeItemElement */.t)(el);
858
- };
859
- this.isSelectedElement = (el) => {
860
- return el.selected;
861
- };
862
- }
863
- slottedTreeItemsChanged() {
864
- if (this.$fastController.isConnected) {
865
- // update for slotted children change
866
- this.setItems();
867
- }
868
- }
869
- connectedCallback() {
870
- super.connectedCallback();
871
- this.setAttribute("tabindex", "0");
872
- dom/* DOM */.SO.queueUpdate(() => {
873
- this.setItems();
874
- });
875
- }
876
- /**
877
- * Handles click events bubbling up
878
- *
879
- * @internal
880
- */
881
- handleClick(e) {
882
- if (e.defaultPrevented) {
883
- // handled, do nothing
884
- return;
885
- }
886
- if (!(e.target instanceof Element) || !(0,tree_item/* isTreeItemElement */.t)(e.target)) {
887
- // not a tree item, ignore
888
- return true;
889
- }
890
- const item = e.target;
891
- if (!item.disabled) {
892
- item.selected = !item.selected;
893
- }
894
- return;
895
- }
896
- /**
897
- * Move focus to a tree item based on its offset from the provided item
898
- */
899
- focusNextNode(delta, item) {
900
- const visibleNodes = this.getVisibleNodes();
901
- if (!visibleNodes) {
902
- return;
903
- }
904
- const focusItem = visibleNodes[visibleNodes.indexOf(item) + delta];
905
- if ((0,dist_dom/* isHTMLElement */.Re)(focusItem)) {
906
- tree_item/* TreeItem */.k.focusItem(focusItem);
907
- }
908
- }
909
- /**
910
- * checks if there are any nested tree items
911
- */
912
- getValidFocusableItem() {
913
- const treeItems = this.getVisibleNodes();
914
- // default to selected element if there is one
915
- let focusIndex = treeItems.findIndex(this.isSelectedElement);
916
- if (focusIndex === -1) {
917
- // otherwise first focusable tree item
918
- focusIndex = treeItems.findIndex(this.isFocusableElement);
919
- }
920
- if (focusIndex !== -1) {
921
- return treeItems[focusIndex];
922
- }
923
- return null;
924
- }
925
- /**
926
- * checks if there are any nested tree items
927
- */
928
- checkForNestedItems() {
929
- return this.slottedTreeItems.some((node) => {
930
- return (0,tree_item/* isTreeItemElement */.t)(node) && node.querySelector("[role='treeitem']");
931
- });
932
- }
933
- getVisibleNodes() {
934
- return (0,dist_dom/* getDisplayedNodes */.UM)(this, "[role='treeitem']") || [];
935
- }
936
- }
937
- (0,tslib_es6/* __decorate */.gn)([
938
- (0,attributes/* attr */.Lj)({ attribute: "render-collapsed-nodes" })
939
- ], TreeView.prototype, "renderCollapsedNodes", void 0);
940
- (0,tslib_es6/* __decorate */.gn)([
941
- observable/* observable */.LO
942
- ], TreeView.prototype, "currentSelected", void 0);
943
- (0,tslib_es6/* __decorate */.gn)([
944
- observable/* observable */.LO
945
- ], TreeView.prototype, "slottedTreeItems", void 0);
946
-
947
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/template.js + 3 modules
948
- var template = __webpack_require__(25269);
949
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/ref.js
950
- var ref = __webpack_require__(62564);
951
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/slotted.js
952
- var slotted = __webpack_require__(17832);
953
- ;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/tree-view/tree-view.template.js
954
-
955
- /**
956
- * The template for the {@link @microsoft/fast-foundation#TreeView} component.
957
- * @public
958
- */
959
- const treeViewTemplate = (context, definition) => (0,template/* html */.d) `
960
- <template
961
- role="tree"
962
- ${(0,ref/* ref */.i)("treeView")}
963
- @keydown="${(x, c) => x.handleKeyDown(c.event)}"
964
- @focusin="${(x, c) => x.handleFocus(c.event)}"
965
- @focusout="${(x, c) => x.handleBlur(c.event)}"
966
- @click="${(x, c) => x.handleClick(c.event)}"
967
- @selected-change="${(x, c) => x.handleSelectedChange(c.event)}"
968
- >
969
- <slot ${(0,slotted/* slotted */.Q)("slottedTreeItems")}></slot>
970
- </template>
971
- `;
972
-
973
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/styles/css.js
974
- var css = __webpack_require__(12634);
975
- // EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/display.js
976
- var display = __webpack_require__(21601);
977
- ;// CONCATENATED MODULE: ../node_modules/@jupyter/web-components/dist/esm/tree-view/tree-view.styles.js
978
- // Copyright (c) Jupyter Development Team.
979
- // Copyright (c) Microsoft Corporation.
980
- // Distributed under the terms of the Modified BSD License.
981
-
982
-
983
- /**
984
- * Styles for Tree View
985
- * @public
986
- */
987
- const treeViewStyles = (context, definition) => (0,css/* css */.i) `
988
- ${(0,display/* display */.j)('flex')} :host {
989
- flex-direction: column;
990
- align-items: stretch;
991
- min-width: fit-content;
992
- font-size: 0;
993
- }
994
-
995
- :host:focus-visible {
996
- outline: none;
997
- }
998
- `;
999
-
1000
- ;// CONCATENATED MODULE: ../node_modules/@jupyter/web-components/dist/esm/tree-view/index.js
1001
- // Copyright (c) Jupyter Development Team.
1002
- // Copyright (c) Microsoft Corporation.
1003
- // Distributed under the terms of the Modified BSD License.
1004
-
1005
-
1006
- /**
1007
- * Tree view class
1008
- *
1009
- * @public
1010
- * @tagname jp-tree-view
1011
- */
1012
- class JupyterTreeView extends TreeView {
1013
- /**
1014
- * Handles click events bubbling up
1015
- *
1016
- * @internal
1017
- */
1018
- handleClick(e) {
1019
- if (e.defaultPrevented) {
1020
- // handled, do nothing
1021
- return;
1022
- }
1023
- if (!(e.target instanceof Element)) {
1024
- // not a tree item, ignore
1025
- return true;
1026
- }
1027
- let item = e.target;
1028
- while (item && !(0,tree_item/* isTreeItemElement */.t)(item)) {
1029
- item = item.parentElement;
1030
- // Escape if we get out of the tree view component
1031
- if (item === this) {
1032
- item = null;
1033
- }
1034
- }
1035
- if (item && !item.disabled) {
1036
- // Force selection - it is not possible to unselect
1037
- item.selected = true;
1038
- }
1039
- return;
1040
- }
1041
- }
1042
- /**
1043
- * A function that returns a {@link @microsoft/fast-foundation#TreeView} registration for configuring the component with a DesignSystem.
1044
- * Implements {@link @microsoft/fast-foundation#treeViewTemplate}
1045
- *
1046
- *
1047
- * @public
1048
- * @remarks
1049
- * Generates HTML Element: `<jp-tree-view>`
1050
- *
1051
- */
1052
- const jpTreeView = JupyterTreeView.compose({
1053
- baseName: 'tree-view',
1054
- baseClass: TreeView,
1055
- template: treeViewTemplate,
1056
- styles: treeViewStyles
1057
- });
1058
-
1059
-
1060
- // EXTERNAL MODULE: consume shared module (default) react@~18.2.0 (singleton) (fallback: ../node_modules/react/index.js)
1061
- var index_js_ = __webpack_require__(78156);
1062
- var index_js_default = /*#__PURE__*/__webpack_require__.n(index_js_);
1063
- // EXTERNAL MODULE: ../node_modules/@jupyter/react-components/lib/react-utils.js
1064
- var react_utils = __webpack_require__(4444);
1065
- ;// CONCATENATED MODULE: ../node_modules/@jupyter/react-components/lib/TreeView.js
1066
-
1067
-
1068
-
1069
-
1070
- (0,jupyter_design_system/* provideJupyterDesignSystem */.W)().register(jpTreeView());
1071
-
1072
- const TreeView_TreeView = (0,index_js_.forwardRef)((props, forwardedRef) => {
1073
- const ref = (0,index_js_.useRef)(null);
1074
- const { className, renderCollapsedNodes, currentSelected, ...filteredProps } =
1075
- props;
1076
-
1077
- (0,index_js_.useLayoutEffect)(() => {
1078
- // Fix using private API to force refresh of nested flag on
1079
- // first level of tree items.
1080
- ref.current?.setItems();
1081
- }, [ref.current]);
1082
-
1083
- /** Properties - run whenever a property has changed */
1084
- (0,react_utils/* useProperties */.h)(ref, 'currentSelected', props.currentSelected);
1085
-
1086
- /** Methods - uses `useImperativeHandle` hook to pass ref to component */
1087
- (0,index_js_.useImperativeHandle)(forwardedRef, () => ref.current, [ref.current]);
1088
-
1089
- return index_js_default().createElement(
1090
- 'jp-tree-view',
1091
- {
1092
- ref,
1093
- ...filteredProps,
1094
- class: props.className,
1095
- exportparts: props.exportparts,
1096
- for: props.htmlFor,
1097
- part: props.part,
1098
- tabindex: props.tabIndex,
1099
- 'render-collapsed-nodes': props.renderCollapsedNodes ? '' : undefined,
1100
- style: { ...props.style }
1101
- },
1102
- props.children
1103
- );
1104
- });
1105
-
1106
-
1107
- /***/ }),
1108
-
1109
- /***/ 80189:
1110
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1111
-
1112
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1113
- /* harmony export */ k: () => (/* binding */ TreeItem),
1114
- /* harmony export */ t: () => (/* binding */ isTreeItemElement)
1115
- /* harmony export */ });
1116
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95185);
1117
- /* harmony import */ var _microsoft_fast_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98332);
1118
- /* harmony import */ var _microsoft_fast_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92221);
1119
- /* harmony import */ var _microsoft_fast_web_utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99415);
1120
- /* harmony import */ var _patterns_start_end_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(52865);
1121
- /* harmony import */ var _utilities_apply_mixins_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89155);
1122
- /* harmony import */ var _foundation_element_foundation_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50755);
1123
-
1124
-
1125
-
1126
-
1127
-
1128
-
1129
- /**
1130
- * check if the item is a tree item
1131
- * @public
1132
- * @remarks
1133
- * determines if element is an HTMLElement and if it has the role treeitem
1134
- */
1135
- function isTreeItemElement(el) {
1136
- return (0,_microsoft_fast_web_utilities__WEBPACK_IMPORTED_MODULE_0__/* .isHTMLElement */ .Re)(el) && el.getAttribute("role") === "treeitem";
1137
- }
1138
- /**
1139
- * A Tree item Custom HTML Element.
1140
- *
1141
- * @slot start - Content which can be provided before the tree item content
1142
- * @slot end - Content which can be provided after the tree item content
1143
- * @slot - The default slot for tree item text content
1144
- * @slot item - The slot for tree items (fast tree items manage this assignment themselves)
1145
- * @slot expand-collapse-button - The expand/collapse button
1146
- * @csspart positioning-region - The element used to position the tree item content with exception of any child nodes
1147
- * @csspart content-region - The element containing the expand/collapse, start, and end slots
1148
- * @csspart items - The element wrapping any child items
1149
- * @csspart expand-collapse-button - The expand/collapse button
1150
- * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
1151
- * @fires selected-change - Fires a custom 'selected-change' event when the selected state changes
1152
- *
1153
- * @public
1154
- */
1155
- class TreeItem extends _foundation_element_foundation_element_js__WEBPACK_IMPORTED_MODULE_1__/* .FoundationElement */ .I {
1156
- constructor() {
1157
- super(...arguments);
1158
- /**
1159
- * When true, the control will be appear expanded by user interaction.
1160
- * @public
1161
- * @remarks
1162
- * HTML Attribute: expanded
1163
- */
1164
- this.expanded = false;
1165
- /**
1166
- * Whether the item is focusable
1167
- *
1168
- * @internal
1169
- */
1170
- this.focusable = false;
1171
- /**
1172
- * Whether the tree is nested
1173
- *
1174
- * @public
1175
- */
1176
- this.isNestedItem = () => {
1177
- return isTreeItemElement(this.parentElement);
1178
- };
1179
- /**
1180
- * Handle expand button click
1181
- *
1182
- * @internal
1183
- */
1184
- this.handleExpandCollapseButtonClick = (e) => {
1185
- if (!this.disabled && !e.defaultPrevented) {
1186
- this.expanded = !this.expanded;
1187
- }
1188
- };
1189
- /**
1190
- * Handle focus events
1191
- *
1192
- * @internal
1193
- */
1194
- this.handleFocus = (e) => {
1195
- this.setAttribute("tabindex", "0");
1196
- };
1197
- /**
1198
- * Handle blur events
1199
- *
1200
- * @internal
1201
- */
1202
- this.handleBlur = (e) => {
1203
- this.setAttribute("tabindex", "-1");
1204
- };
1205
- }
1206
- expandedChanged() {
1207
- if (this.$fastController.isConnected) {
1208
- this.$emit("expanded-change", this);
1209
- }
1210
- }
1211
- selectedChanged() {
1212
- if (this.$fastController.isConnected) {
1213
- this.$emit("selected-change", this);
1214
- }
1215
- }
1216
- itemsChanged(oldValue, newValue) {
1217
- if (this.$fastController.isConnected) {
1218
- this.items.forEach((node) => {
1219
- if (isTreeItemElement(node)) {
1220
- // TODO: maybe not require it to be a TreeItem?
1221
- node.nested = true;
1222
- }
1223
- });
1224
- }
1225
- }
1226
- /**
1227
- * Places document focus on a tree item
1228
- *
1229
- * @public
1230
- * @param el - the element to focus
1231
- */
1232
- static focusItem(el) {
1233
- el.focusable = true;
1234
- el.focus();
1235
- }
1236
- /**
1237
- * Gets number of children
1238
- *
1239
- * @internal
1240
- */
1241
- childItemLength() {
1242
- const treeChildren = this.childItems.filter((item) => {
1243
- return isTreeItemElement(item);
1244
- });
1245
- return treeChildren ? treeChildren.length : 0;
1246
- }
1247
- }
1248
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1249
- (0,_microsoft_fast_element__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .Lj)({ mode: "boolean" })
1250
- ], TreeItem.prototype, "expanded", void 0);
1251
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1252
- (0,_microsoft_fast_element__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .Lj)({ mode: "boolean" })
1253
- ], TreeItem.prototype, "selected", void 0);
1254
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1255
- (0,_microsoft_fast_element__WEBPACK_IMPORTED_MODULE_3__/* .attr */ .Lj)({ mode: "boolean" })
1256
- ], TreeItem.prototype, "disabled", void 0);
1257
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1258
- _microsoft_fast_element__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .LO
1259
- ], TreeItem.prototype, "focusable", void 0);
1260
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1261
- _microsoft_fast_element__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .LO
1262
- ], TreeItem.prototype, "childItems", void 0);
1263
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1264
- _microsoft_fast_element__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .LO
1265
- ], TreeItem.prototype, "items", void 0);
1266
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1267
- _microsoft_fast_element__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .LO
1268
- ], TreeItem.prototype, "nested", void 0);
1269
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
1270
- _microsoft_fast_element__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .LO
1271
- ], TreeItem.prototype, "renderCollapsedChildren", void 0);
1272
- (0,_utilities_apply_mixins_js__WEBPACK_IMPORTED_MODULE_5__/* .applyMixins */ .e)(TreeItem, _patterns_start_end_js__WEBPACK_IMPORTED_MODULE_6__/* .StartEnd */ .hW);
1273
-
1274
-
1275
- /***/ })
1276
-
1277
- }]);
1278
- //# sourceMappingURL=2424.6f13f59f4bc472c3d07d.js.map?v=6f13f59f4bc472c3d07d