terra_ui_components 0.0.101__py3-none-any.whl → 0.0.103__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 terra_ui_components might be problematic. Click here for more details.

@@ -16,12 +16,12 @@ class TerraBaseWidget(anywidget.AnyWidget):
16
16
  return f"""
17
17
  const terraStyles = document.createElement('link')
18
18
  terraStyles.rel = 'stylesheet'
19
- terraStyles.href = 'https://cdn.jsdelivr.net/npm/@nasa-terra/components@0.0.101/cdn/themes/horizon.css'
19
+ terraStyles.href = 'https://cdn.jsdelivr.net/npm/@nasa-terra/components@0.0.103/cdn/themes/horizon.css'
20
20
  //terraStyles.href = "https://localhost:4000/dist/themes/horizon.css"
21
21
  document.head.appendChild(terraStyles)
22
22
 
23
23
  const terraAutoloader = document.createElement('script')
24
- terraAutoloader.src = "https://cdn.jsdelivr.net/npm/@nasa-terra/components@0.0.101/cdn/terra-ui-components-autoloader.js"
24
+ terraAutoloader.src = "https://cdn.jsdelivr.net/npm/@nasa-terra/components@0.0.103/cdn/terra-ui-components-autoloader.js"
25
25
  //terraAutoloader.src = "https://localhost:4000/dist/terra-ui-components-autoloader.js"
26
26
  terraAutoloader.type = 'module'
27
27
  document.head.appendChild(terraAutoloader)
@@ -81,4 +81,4 @@ class TerraDataSubsetter(TerraBaseWidget):
81
81
  showCollectionSearch = traitlets.Unicode('').tag(sync=True)
82
82
  jobId = traitlets.Unicode('').tag(sync=True)
83
83
  bearerToken = traitlets.Unicode('').tag(sync=True)
84
- job = traitlets.Dict(trait=traitlets.Dict(), default_value={}).tag(sync=True)
84
+ job = traitlets.Any(default_value={}).tag(sync=True)
@@ -1,4 +1,5 @@
1
1
  import importlib.metadata
2
+ import traitlets
2
3
  from ..base import TerraBaseWidget
3
4
 
4
5
  try:
@@ -8,20 +9,21 @@ except importlib.metadata.PackageNotFoundError:
8
9
 
9
10
 
10
11
  class TerraLogin(TerraBaseWidget):
11
- _esm = (
12
- TerraBaseWidget.get_autoloader()
13
- + """
12
+ _esm = TerraBaseWidget.get_autoloader() + """
14
13
  function render({ model, el }) {
15
14
  // create an instance of the component
16
15
  let component = document.createElement('terra-login')
17
-
16
+
18
17
  /**
19
18
  * Set initial property values
20
19
  * NOTE: In reality, we won't need to have the ability to set EVERY property in a Jupyter Notebook, feel free to remove the ones that don't make sense
21
20
  *
22
21
  * model.get() pulls from the Jupyter notebooks state. We'll use the state to set the initial value for each property
23
22
  */
24
- component.attr = model.get('attr')
23
+ component.buttonLabel = model.get('buttonLabel')
24
+ component.loggedInMessage = model.get('loggedInMessage')
25
+ component.loggedOutMessage = model.get('loggedOutMessage')
26
+ component.loadingMessage = model.get('loadingMessage')
25
27
 
26
28
  /**
27
29
  * add the component to the cell
@@ -34,24 +36,32 @@ class TerraLogin(TerraBaseWidget):
34
36
  * Set up property change handlers
35
37
  * This way if someone in the Jupyter Notebook changes the property externally, we reflect the change
36
38
  * back to the component.
37
- *
39
+ *
38
40
  * If this isn't here, the component can't be changed after it's initial render
39
41
  */
40
- model.on('change:attr', () => {
41
- component.attr = model.get('attr')
42
+ model.on('change:buttonLabel', () => {
43
+ component.buttonLabel = model.get('buttonLabel')
42
44
  })
43
-
44
- /**
45
- * Add event listeners.
46
- * These are used to communicate back to the Jupyter notebook
47
- */
48
- component.addEventListener('terra-login', (e) => {
49
- // Placeholder for event handling, you'll need to provide your own functionality here
50
- model.set('terra-login_triggered', true)
51
- model.save_changes()
45
+ model.on('change:loggedInMessage', () => {
46
+ component.loggedInMessage = model.get('loggedInMessage')
47
+ })
48
+ model.on('change:loggedOutMessage', () => {
49
+ component.loggedOutMessage = model.get('loggedOutMessage')
50
+ })
51
+ model.on('change:loadingMessage', () => {
52
+ component.loadingMessage = model.get('loadingMessage')
52
53
  })
53
54
  }
54
55
 
55
56
  export default { render };
56
57
  """
57
- )
58
+
59
+ # Component properties
60
+ # While we have properties in the component, we also need to tell Python about them as well.
61
+ # Again, you don't technically need all these. If Jupyter Notebooks don't need access to them, you can remove them from here
62
+ buttonLabel = traitlets.Unicode('').tag(sync=True)
63
+ loggedInMessage = traitlets.Unicode(
64
+ 'You are logged in as {username}').tag(sync=True)
65
+ loggedOutMessage = traitlets.Unicode('').tag(sync=True)
66
+ loadingMessage = traitlets.Unicode(
67
+ 'Please wait while we check if you are logged in...').tag(sync=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: terra_ui_components
3
- Version: 0.0.101
3
+ Version: 0.0.103
4
4
  Summary: NASA Terra UI Components Library
5
5
  License-File: LICENSE.md
6
6
  Requires-Python: >=3.8
@@ -1,6 +1,6 @@
1
1
  terra_ui_components/README.md,sha256=lBRXP8aio8W0AqDiXL9hkgGlPKfPTELiXZflujVT6BY,198
2
2
  terra_ui_components/__init__.py,sha256=Af9Hf6jOQBv2IBFJX8ZUVTKmzpAKCcz0oT3XIF7yCN8,757
3
- terra_ui_components/base.py,sha256=H74F3rsQf0Z7s5XlWzeeN1NprCWoE0mih2odKO4ey_I,1226
3
+ terra_ui_components/base.py,sha256=6Ibaqda0xzPDOdMcMMUNnjubyI2fJLEIxfFiNw_QZg0,1226
4
4
  terra_ui_components/accordion/__init__.py,sha256=xruOtrVmmzFKacs2B_lKpEnDh2PbBq-HUKCdceRNboU,67
5
5
  terra_ui_components/accordion/accordion.py,sha256=3duUmiJ5DTMYfzMJmra8pt0CXXcOkcbY-aAb7-PVCIs,1789
6
6
  terra_ui_components/browse_variables/__init__.py,sha256=JfrTDLSbAecttohBx_OuEC1qT-LoqGO4egStvlJY1Os,86
@@ -8,7 +8,7 @@ terra_ui_components/browse_variables/browse_variables.py,sha256=x5DwenujlHrfzBLB
8
8
  terra_ui_components/data_rods/__init__.py,sha256=lr-Y19evMVuC88Slu7P2sOUvsSq-BA7WUC_u_iB0V3A,65
9
9
  terra_ui_components/data_rods/data_rods.py,sha256=Ot7TJQk6JgCkCoERle27RIq4lOgpfmHJNkqBgo8bbAA,1788
10
10
  terra_ui_components/data_subsetter/__init__.py,sha256=iBX8RRg_T5Qix4hWgfrHcnjkx3i11xWgYAlj2g6wfx8,80
11
- terra_ui_components/data_subsetter/data_subsetter.py,sha256=LoIBhFgflr3itsNnta8vnbkjhDIvaGoSdQWjOPLdyWE,3243
11
+ terra_ui_components/data_subsetter/data_subsetter.py,sha256=fIEcjNeT1d1v7yDGMZLfXALykKtX1jieavhuqtFaqxs,3218
12
12
  terra_ui_components/data_subsetter_history/__init__.py,sha256=Hsfg61galGvfe2JoNLDtcwJhhqjVz7CFFU6noiQeLJs,102
13
13
  terra_ui_components/data_subsetter_history/data_subsetter_history.py,sha256=giSXwIhCHSOOZh2VEfjLW-PWgVjDNfDN4Ep0qq2QtqY,1826
14
14
  terra_ui_components/date_picker/__init__.py,sha256=RcMn156ZbrDCYOvCR4VA6p5JsR0Uj2baNPqZ4OdO02o,71
@@ -18,7 +18,7 @@ terra_ui_components/date_range_slider/date_range_slider.py,sha256=kE3vMFV-CZ45n8
18
18
  terra_ui_components/dialog/__init__.py,sha256=6H2fOO3FawjPtowliaCxyneITsS4MXZy1YJYWgVKFCY,58
19
19
  terra_ui_components/dialog/dialog.py,sha256=GRKktKwUpkSAE7gl8-ivZ5O18iK9oHEb2m7vKjxJIR0,1780
20
20
  terra_ui_components/login/__init__.py,sha256=R9Rn-D770XK5bIsVdQ4EwiafuISYUxYpq15zxJeyk-A,55
21
- terra_ui_components/login/login.py,sha256=kptEtzINeQByhL3TtQLncHoU3rYDUbRuoveuMJcCvV8,1853
21
+ terra_ui_components/login/login.py,sha256=VkFUwoLKsoPq6yab5pF2Dir_NBh3oETQlnkFFCTAGyo,2682
22
22
  terra_ui_components/plot_toolbar/__init__.py,sha256=rlk9bxXuNo75bIfZu91dDJupiFVOUpPzuUrMJZ5318E,74
23
23
  terra_ui_components/plot_toolbar/plot_toolbar.py,sha256=VCKKZi3hD0qDAG6-exoU1hasWyG4r3A2yPo3TQ8PVoI,1797
24
24
  terra_ui_components/time_average_map/__init__.py,sha256=l3UBuLYIj-5-HQcugO8pRtTynkhLTD1ZlxM_Gf84t5o,84
@@ -27,7 +27,7 @@ terra_ui_components/time_series/__init__.py,sha256=uXQun39vOajxJjfOIPC4W-909Sb8Q
27
27
  terra_ui_components/time_series/time_series.py,sha256=M29nbYf-wmsxyu7WgeQu-pejF598zXuBd9MwAEIW704,3833
28
28
  terra_ui_components/variable_keyword_search/__init__.py,sha256=yjNToGluREKDD4UbkIOROSdlCC4jO6sgHA741OEwVdk,107
29
29
  terra_ui_components/variable_keyword_search/variable_keyword_search.py,sha256=D_jT-FAu0fubKsC0ttK_XF80ExehLnwLyvSLpVVik_o,3677
30
- terra_ui_components-0.0.101.dist-info/METADATA,sha256=jivZou25QkndNwFD-7rkyMDX4hrFWBmtqMx5NUTiy4o,3091
31
- terra_ui_components-0.0.101.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
32
- terra_ui_components-0.0.101.dist-info/licenses/LICENSE.md,sha256=rJ_6y_yHe29CU6SBs8DtutDAGaw1BqO1FBWzNvSgwFQ,1065
33
- terra_ui_components-0.0.101.dist-info/RECORD,,
30
+ terra_ui_components-0.0.103.dist-info/METADATA,sha256=BT5nYCtmrM8XOzdPwwk-lnhD3wgvz-_jqfUCsjCUQ1Y,3091
31
+ terra_ui_components-0.0.103.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
32
+ terra_ui_components-0.0.103.dist-info/licenses/LICENSE.md,sha256=rJ_6y_yHe29CU6SBs8DtutDAGaw1BqO1FBWzNvSgwFQ,1065
33
+ terra_ui_components-0.0.103.dist-info/RECORD,,