itables 2.9.0__tar.gz → 2.9.2__tar.gz
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.
- {itables-2.9.0 → itables-2.9.2}/PKG-INFO +1 -1
- {itables-2.9.0 → itables-2.9.2}/itables/datatables_format.py +40 -4
- {itables-2.9.0 → itables-2.9.2}/itables/javascript.py +93 -34
- {itables-2.9.0 → itables-2.9.2}/itables/options.py +38 -0
- {itables-2.9.0 → itables-2.9.2}/itables/typing.py +20 -2
- {itables-2.9.0 → itables-2.9.2}/itables/version.py +1 -1
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/itables_for_dash.min.js +1 -1
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/itables_for_dash.min.js.map +1 -1
- {itables-2.9.0 → itables-2.9.2}/pyproject.toml +5 -2
- {itables-2.9.0 → itables-2.9.2}/.gitignore +0 -0
- {itables-2.9.0 → itables-2.9.2}/LICENSE +0 -0
- {itables-2.9.0 → itables-2.9.2}/README.md +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/__init__.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/config.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/dash.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/downsample.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/html/datatables_template.html +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/html/datatables_template_offline.html +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/html/dt_bundle.css +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/html/dt_bundle.js +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/html/init_datatables.html +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/html/init_notebook_offline.html +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/interactive.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/itables_for_streamlit/index.css +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/itables_for_streamlit/index.js +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/logo/loading.svg +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/logo/logo-dark.svg +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/logo/logo.svg +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/logo/text-dark.svg +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/logo/text.svg +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/logo/wide.svg +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/logo/with_text.svg +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/py.typed +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/sample_dfs.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/sample_pandas_dfs.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/sample_polars_dfs.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/samples/countries.csv +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/samples/indicators.csv +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/samples/population.csv +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/shiny.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/show_config.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/streamlit.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/utils.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/widget/__init__.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/widget/static/widget.css +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables/widget/static/widget.js +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/ITable.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/__init__.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/_imports_.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/async-ITable.js +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/async-ITable.js.LICENSE.txt +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/async-ITable.js.map +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/metadata.json +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/package-info.json +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/properties.py +0 -0
- {itables-2.9.0 → itables-2.9.2}/itables_for_dash/py.typed +0 -0
|
@@ -51,6 +51,30 @@ def _format_pandas_series(
|
|
|
51
51
|
return formatted
|
|
52
52
|
|
|
53
53
|
|
|
54
|
+
def _polars_categories(x) -> "list[Any]":
|
|
55
|
+
"""Return the ordered categories of a Polars Categorical or Enum series"""
|
|
56
|
+
pl = sys.modules["polars"]
|
|
57
|
+
if x.dtype == pl.Enum:
|
|
58
|
+
return x.dtype.categories.to_list()
|
|
59
|
+
# Since Polars 1.32 the categories of a Categorical live in a process-global
|
|
60
|
+
# registry, so neither 'dtype' nor 'cat.get_categories()' can tell us which
|
|
61
|
+
# categories this particular column uses. We collect them from the values, and
|
|
62
|
+
# sort them, which is reproducible and consistent with how Polars itself sorts
|
|
63
|
+
# a Categorical column #607
|
|
64
|
+
return sorted(x.unique().drop_nulls().to_list())
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _narwhals_categories(x) -> "list[Any]":
|
|
68
|
+
"""Return the ordered categories of a Narwhals Categorical or Enum series"""
|
|
69
|
+
nw = sys.modules["narwhals"]
|
|
70
|
+
if isinstance(x.dtype, nw.Enum):
|
|
71
|
+
# Narwhals only exposes the categories of an Enum since v2
|
|
72
|
+
categories = getattr(x.dtype, "categories", None)
|
|
73
|
+
if categories is not None:
|
|
74
|
+
return list(categories)
|
|
75
|
+
return sorted(x.unique().drop_nulls().to_list())
|
|
76
|
+
|
|
77
|
+
|
|
54
78
|
def _format_polars_series(
|
|
55
79
|
x,
|
|
56
80
|
escape_html: bool,
|
|
@@ -83,9 +107,21 @@ def _format_polars_series(
|
|
|
83
107
|
formatted = x.to_list()
|
|
84
108
|
elif dtype == pl.Enum or dtype == pl.Categorical:
|
|
85
109
|
if add_rank_to_categories:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
110
|
+
if dtype == pl.Enum:
|
|
111
|
+
# The physical representation of an Enum is the index of the value
|
|
112
|
+
# in dtype.categories, i.e. in _polars_categories(x)
|
|
113
|
+
codes = x.to_physical().to_list()
|
|
114
|
+
# null gets rank 0 (sorts first), categories are 1-indexed
|
|
115
|
+
return [0 if c is None else c + 1 for c in codes]
|
|
116
|
+
# The physical representation of a Categorical is a global category id
|
|
117
|
+
# (#607), so we rank the values against the categories of that column
|
|
118
|
+
category_to_rank = {
|
|
119
|
+
cat: i + 1 for i, cat in enumerate(_polars_categories(x))
|
|
120
|
+
}
|
|
121
|
+
return [
|
|
122
|
+
0 if v is None else category_to_rank[v]
|
|
123
|
+
for v in x.cast(pl.String).to_list()
|
|
124
|
+
]
|
|
89
125
|
formatted = x.cast(pl.String).to_list()
|
|
90
126
|
else:
|
|
91
127
|
# Other types - use Polars' native formatting
|
|
@@ -158,7 +194,7 @@ def _format_narwhals_series(
|
|
|
158
194
|
|
|
159
195
|
# Categorical and Enum types
|
|
160
196
|
if isinstance(dtype, (nw.Categorical, nw.Enum)) and add_rank_to_categories:
|
|
161
|
-
categories = x
|
|
197
|
+
categories = _narwhals_categories(x)
|
|
162
198
|
category_to_rank = {cat: i + 1 for i, cat in enumerate(categories)}
|
|
163
199
|
# null gets rank 0 (sorts first), categories are 1-indexed
|
|
164
200
|
return [0 if v is None else category_to_rank.get(v, 0) for v in x.to_list()]
|
|
@@ -12,7 +12,12 @@ from typing import Any, Literal, Mapping, Optional, Sequence, Union, cast
|
|
|
12
12
|
|
|
13
13
|
import itables.options as opt
|
|
14
14
|
|
|
15
|
-
from .datatables_format import
|
|
15
|
+
from .datatables_format import (
|
|
16
|
+
_narwhals_categories,
|
|
17
|
+
_polars_categories,
|
|
18
|
+
datatables_rows,
|
|
19
|
+
escape_html_chars,
|
|
20
|
+
)
|
|
16
21
|
from .downsample import downsample
|
|
17
22
|
from .typing import (
|
|
18
23
|
DataFrameModuleName,
|
|
@@ -324,11 +329,13 @@ def _table_header(
|
|
|
324
329
|
thead = thead + f"<tr>{formatted_dtypes}</tr>"
|
|
325
330
|
|
|
326
331
|
header = "<thead>{}</thead>".format(
|
|
327
|
-
_flat_header(df, show_index)
|
|
332
|
+
_flat_header(df, show_index, escape_html)
|
|
333
|
+
if column_filters == "header"
|
|
334
|
+
else thead
|
|
328
335
|
)
|
|
329
336
|
|
|
330
337
|
if column_filters == "footer":
|
|
331
|
-
footer = "<tfoot>{}</tfoot>".format(_flat_header(df, show_index))
|
|
338
|
+
footer = "<tfoot>{}</tfoot>".format(_flat_header(df, show_index, escape_html))
|
|
332
339
|
elif footer:
|
|
333
340
|
footer = "<tfoot>{}</tfoot>".format(_tfoot_from_thead(thead))
|
|
334
341
|
else:
|
|
@@ -337,15 +344,19 @@ def _table_header(
|
|
|
337
344
|
return f"<table>{header}{footer}</table>"
|
|
338
345
|
|
|
339
346
|
|
|
340
|
-
def _flat_header(df, show_index):
|
|
347
|
+
def _flat_header(df, show_index, escape_html):
|
|
341
348
|
"""When column filters are shown, we need to remove any column multiindex"""
|
|
349
|
+
|
|
350
|
+
def escape(value):
|
|
351
|
+
return escape_html_chars(str(value)) if escape_html else value
|
|
352
|
+
|
|
342
353
|
header = ""
|
|
343
354
|
if show_index:
|
|
344
355
|
for index in df.index.names:
|
|
345
|
-
header += "<th>{}</th>".format(index)
|
|
356
|
+
header += "<th>{}</th>".format(escape(index))
|
|
346
357
|
|
|
347
358
|
for column in df.columns:
|
|
348
|
-
header += "<th>{}</th>".format(column)
|
|
359
|
+
header += "<th>{}</th>".format(escape(column))
|
|
349
360
|
|
|
350
361
|
return header
|
|
351
362
|
|
|
@@ -416,7 +427,7 @@ def to_html_datatable(
|
|
|
416
427
|
display_logo_when_loading = dt_args.pop("display_logo_when_loading", False)
|
|
417
428
|
|
|
418
429
|
check_itable_arguments(cast(dict[str, Any], dt_args), DTForITablesOptions)
|
|
419
|
-
fallback_html = _simple_html_table_from_dt_args(dt_args)
|
|
430
|
+
fallback_html = _simple_html_table_from_dt_args(dt_args, include_trust_hint=True)
|
|
420
431
|
return html_table_from_template(
|
|
421
432
|
table_id=table_id,
|
|
422
433
|
dt_url=dt_url,
|
|
@@ -430,11 +441,30 @@ def to_html_datatable(
|
|
|
430
441
|
_STATIC_PREVIEW_HELP_URL = "https://itables.org/fallbacks/static_preview.html"
|
|
431
442
|
|
|
432
443
|
|
|
433
|
-
def _static_preview_message() -> str:
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
444
|
+
def _static_preview_message(include_trust_hint: bool) -> str:
|
|
445
|
+
# Wrapped in <noscript>: browsers (and JupyterLab's own sanitizer for
|
|
446
|
+
# untrusted output) only parse/show this as real, visible content when
|
|
447
|
+
# scripting isn't actually active for this fragment - which is exactly
|
|
448
|
+
# the case we want the hint for (an untrusted notebook). Once trusted
|
|
449
|
+
# (script runs) or on GitHub (page-level scripting is on, even though
|
|
450
|
+
# our own <script> tag stays inert - see html_table_from_template()),
|
|
451
|
+
# a <noscript> block is parsed as inert, invisible text instead.
|
|
452
|
+
trust_hint = (
|
|
453
|
+
(
|
|
454
|
+
"<noscript>"
|
|
455
|
+
'<span title="JavaScript not allowed. '
|
|
456
|
+
'Please trust this notebook to get interactive tables.">'
|
|
457
|
+
"🔒</span>"
|
|
458
|
+
"</noscript>"
|
|
459
|
+
)
|
|
460
|
+
if include_trust_hint
|
|
461
|
+
else ""
|
|
462
|
+
)
|
|
463
|
+
info = (
|
|
464
|
+
f"<a href={_STATIC_PREVIEW_HELP_URL} "
|
|
465
|
+
f'title="ITables v{itables_version} static preview">ⓘ</a>'
|
|
437
466
|
)
|
|
467
|
+
return f"<sup>{trust_hint}{info}</sup>"
|
|
438
468
|
|
|
439
469
|
|
|
440
470
|
def _html_not_supported_message() -> str:
|
|
@@ -810,21 +840,32 @@ def _caption_as_row(
|
|
|
810
840
|
_FIRST_TH_RE = re.compile(r"<th\b([^>]*)>(.*?)</th>", re.DOTALL)
|
|
811
841
|
|
|
812
842
|
|
|
813
|
-
def _add_static_preview_marker(html: str) -> str:
|
|
814
|
-
"""Add the static-preview marker - a small
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
843
|
+
def _add_static_preview_marker(html: str, include_trust_hint: bool) -> str:
|
|
844
|
+
"""Add the static-preview marker - optionally a small "🔒" tooltip
|
|
845
|
+
explaining that JavaScript did not run (and hinting at trusting the
|
|
846
|
+
notebook, the fix when that's the cause), followed by a linked 'ⓘ' with
|
|
847
|
+
its own tooltip - to the first header cell, rather than a sentence of
|
|
848
|
+
always-visible text in the table's footer: it reads more naturally right
|
|
849
|
+
where a reader's eye starts - ahead of that cell's own text, so it's the
|
|
850
|
+
first thing read.
|
|
851
|
+
|
|
852
|
+
include_trust_hint is only set when this static preview is paired with a
|
|
853
|
+
hidden interactive table and a swap script (see
|
|
854
|
+
html_table_from_template()), so the "🔒" only shows up where it's
|
|
855
|
+
actually meaningful: it stays visible for as long as that script hasn't
|
|
856
|
+
run, e.g. on GitHub or in an untrusted notebook. A standalone
|
|
857
|
+
to_html_static_preview() call has no such script to wait for."""
|
|
819
858
|
|
|
820
859
|
def add_marker(m: "re.Match[str]") -> str:
|
|
821
860
|
attrs, content = m.group(1), m.group(2)
|
|
822
|
-
return f"<th{attrs}>{_static_preview_message()}{content}</th>"
|
|
861
|
+
return f"<th{attrs}>{_static_preview_message(include_trust_hint)}{content}</th>"
|
|
823
862
|
|
|
824
863
|
return _FIRST_TH_RE.sub(add_marker, html, count=1)
|
|
825
864
|
|
|
826
865
|
|
|
827
|
-
def _simple_html_table_from_dt_args(
|
|
866
|
+
def _simple_html_table_from_dt_args(
|
|
867
|
+
dt_args: DTForITablesOptions, include_trust_hint: bool = False
|
|
868
|
+
) -> str:
|
|
828
869
|
"""Build a plain HTML <table> (no DataTables, no JavaScript) that is
|
|
829
870
|
shown by default, ahead of the interactive table - see
|
|
830
871
|
to_html_datatable() and #575. This reuses table_html's <thead> as-is,
|
|
@@ -833,7 +874,8 @@ def _simple_html_table_from_dt_args(dt_args: DTForITablesOptions) -> str:
|
|
|
833
874
|
row (see _caption_as_row); the static-preview marker goes in the first
|
|
834
875
|
header cell. The table gets light cell delimiters via inline styles (not
|
|
835
876
|
a <style> tag, which may not survive a sanitizer), so it's readable even
|
|
836
|
-
with no surrounding stylesheet.
|
|
877
|
+
with no surrounding stylesheet. See _add_static_preview_marker() for
|
|
878
|
+
include_trust_hint."""
|
|
837
879
|
caption_html = _table_caption(cast(Optional[str], dt_args.get("caption")))
|
|
838
880
|
|
|
839
881
|
if "data_json" not in dt_args:
|
|
@@ -850,7 +892,7 @@ def _simple_html_table_from_dt_args(dt_args: DTForITablesOptions) -> str:
|
|
|
850
892
|
)
|
|
851
893
|
table_html = table_html.replace("<table", f'<table style="{_TABLE_STYLE}"', 1)
|
|
852
894
|
table_html = _add_cell_borders(table_html)
|
|
853
|
-
table_html = _add_static_preview_marker(table_html)
|
|
895
|
+
table_html = _add_static_preview_marker(table_html, include_trust_hint)
|
|
854
896
|
col_count = (
|
|
855
897
|
len(_header_labels_from_table_html(cast(str, dt_args.get("table_html"))))
|
|
856
898
|
or 1
|
|
@@ -881,7 +923,7 @@ def _simple_html_table_from_dt_args(dt_args: DTForITablesOptions) -> str:
|
|
|
881
923
|
"\n</tbody></table>"
|
|
882
924
|
)
|
|
883
925
|
table_html = _add_cell_borders(table_html)
|
|
884
|
-
table_html = _add_static_preview_marker(table_html)
|
|
926
|
+
table_html = _add_static_preview_marker(table_html, include_trust_hint)
|
|
885
927
|
col_count = (
|
|
886
928
|
len(_header_labels_from_table_html(cast(str, dt_args.get("table_html")))) or 1
|
|
887
929
|
)
|
|
@@ -945,6 +987,27 @@ def _evaluate_show_dtypes(
|
|
|
945
987
|
return False
|
|
946
988
|
|
|
947
989
|
|
|
990
|
+
def _check_column_defs(
|
|
991
|
+
columnDefs: Sequence[Mapping[str, Any]],
|
|
992
|
+
) -> Sequence[Mapping[str, Any]]:
|
|
993
|
+
"""Make sure that columnDefs is a sequence of column definitions.
|
|
994
|
+
|
|
995
|
+
Most DataTables options are simply passed on to DataTables, but columnDefs
|
|
996
|
+
is one that itables reads, and to which it adds its own column definitions,
|
|
997
|
+
so we can't do anything sensible with an invalid value (#601)."""
|
|
998
|
+
invalid = [col_def for col_def in columnDefs if not isinstance(col_def, Mapping)]
|
|
999
|
+
if invalid:
|
|
1000
|
+
msg = (
|
|
1001
|
+
"The 'columnDefs' option must be a sequence of column definitions "
|
|
1002
|
+
"(see https://datatables.net/reference/option/columnDefs), i.e. of dicts "
|
|
1003
|
+
f"like {{'targets': 0, 'className': 'dt-center'}}, but it contains {invalid[0]!r}."
|
|
1004
|
+
)
|
|
1005
|
+
if isinstance(invalid[0], (list, tuple)):
|
|
1006
|
+
msg += " Did you wrap the column definitions in an extra list or tuple?"
|
|
1007
|
+
raise TypeError(msg)
|
|
1008
|
+
return columnDefs
|
|
1009
|
+
|
|
1010
|
+
|
|
948
1011
|
def _remove_columns_with_render_in_columndefs(
|
|
949
1012
|
column_set: set[int],
|
|
950
1013
|
n_columns: int,
|
|
@@ -1039,7 +1102,7 @@ def get_categorical_columns_to_be_represented_through_their_rank(
|
|
|
1039
1102
|
pl = sys.modules["polars"]
|
|
1040
1103
|
|
|
1041
1104
|
categorical_columns = {
|
|
1042
|
-
i: df[col]
|
|
1105
|
+
i: _polars_categories(df[col])
|
|
1043
1106
|
for i, col in enumerate(df.columns)
|
|
1044
1107
|
if df[col].dtype in (pl.Categorical, pl.Enum)
|
|
1045
1108
|
}
|
|
@@ -1049,7 +1112,7 @@ def get_categorical_columns_to_be_represented_through_their_rank(
|
|
|
1049
1112
|
nw_df = nw.from_native(df, eager_only=True, allow_series=True)
|
|
1050
1113
|
|
|
1051
1114
|
categorical_columns = {
|
|
1052
|
-
i: nw_df[col]
|
|
1115
|
+
i: _narwhals_categories(nw_df[col])
|
|
1053
1116
|
for i, col in enumerate(nw_df.columns)
|
|
1054
1117
|
if isinstance(nw_df[col].dtype, (nw.Categorical, nw.Enum))
|
|
1055
1118
|
}
|
|
@@ -1216,7 +1279,7 @@ def get_itable_arguments(
|
|
|
1216
1279
|
# an extra empty column in the table data #141
|
|
1217
1280
|
column_count = _column_count_in_header(table_header)
|
|
1218
1281
|
dt_args["table_html"] = table_header
|
|
1219
|
-
columnDefs = dt_args.get("columnDefs") or []
|
|
1282
|
+
columnDefs = _check_column_defs(dt_args.get("columnDefs") or [])
|
|
1220
1283
|
float_columns_to_be_formatted_in_python: set[int] = (
|
|
1221
1284
|
get_float_columns_to_be_formatted_in_python(
|
|
1222
1285
|
df_module_name, df, format_floats_in_python, columnDefs
|
|
@@ -1499,15 +1562,11 @@ def set_default_options(
|
|
|
1499
1562
|
)
|
|
1500
1563
|
)
|
|
1501
1564
|
|
|
1502
|
-
#
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
if k not in DTForITablesOptions.__optional_keys__
|
|
1508
|
-
},
|
|
1509
|
-
ITableOptions,
|
|
1510
|
-
)
|
|
1565
|
+
# We check every option here, including the ones that will be passed on to
|
|
1566
|
+
# ITable in dt_for_itables and checked again there, because some of them
|
|
1567
|
+
# (e.g. columnDefs) are transformed in between - checking them here is what
|
|
1568
|
+
# lets us report the option as the user wrote it (#601)
|
|
1569
|
+
check_itable_arguments(cast(dict[str, Any], kwargs), ITableOptions)
|
|
1511
1570
|
|
|
1512
1571
|
|
|
1513
1572
|
def html_table_from_template(
|
|
@@ -5,7 +5,9 @@ These parameters are documented at
|
|
|
5
5
|
https://itables.org/options/options.html
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
import sys
|
|
8
9
|
from pathlib import Path
|
|
10
|
+
from types import ModuleType
|
|
9
11
|
from typing import Any, Literal, Mapping, Optional, Sequence, Union
|
|
10
12
|
|
|
11
13
|
import itables.config as config
|
|
@@ -161,6 +163,18 @@ searchCols: Optional[Sequence[Any]]
|
|
|
161
163
|
initComplete: Optional[typing.JavascriptFunction]
|
|
162
164
|
fnInfoCallback: Optional[typing.JavascriptFunction]
|
|
163
165
|
drawCallback: Optional[typing.JavascriptFunction]
|
|
166
|
+
createdRow: Optional[typing.JavascriptFunction]
|
|
167
|
+
footerCallback: Optional[typing.JavascriptFunction]
|
|
168
|
+
formatNumber: Optional[typing.JavascriptFunction]
|
|
169
|
+
headerCallback: Optional[typing.JavascriptFunction]
|
|
170
|
+
infoCallback: Optional[typing.JavascriptFunction]
|
|
171
|
+
preDrawCallback: Optional[typing.JavascriptFunction]
|
|
172
|
+
rowCallback: Optional[typing.JavascriptFunction]
|
|
173
|
+
stateLoadCallback: Optional[typing.JavascriptFunction]
|
|
174
|
+
stateLoadParams: Optional[typing.JavascriptFunction]
|
|
175
|
+
stateLoaded: Optional[typing.JavascriptFunction]
|
|
176
|
+
stateSaveCallback: Optional[typing.JavascriptFunction]
|
|
177
|
+
stateSaveParams: Optional[typing.JavascriptFunction]
|
|
164
178
|
stateSave: Optional[bool]
|
|
165
179
|
stateDuration: Optional[int]
|
|
166
180
|
deferRender: Optional[bool]
|
|
@@ -209,3 +223,27 @@ if warn_on_unexpected_option_type:
|
|
|
209
223
|
},
|
|
210
224
|
typing.ITableOptions,
|
|
211
225
|
)
|
|
226
|
+
|
|
227
|
+
_non_options = __non_options
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
class _ITableOptionsModule(ModuleType):
|
|
231
|
+
"""The class of the itables.options module.
|
|
232
|
+
|
|
233
|
+
Options set on this module are checked as they are assigned, so that
|
|
234
|
+
e.g. a typo in an option name, or an option with an unexpected type,
|
|
235
|
+
is reported at the assignment rather than (possibly) much later, when
|
|
236
|
+
a table is rendered ([#601](https://github.com/mwouts/itables/issues/601)).
|
|
237
|
+
"""
|
|
238
|
+
|
|
239
|
+
def __setattr__(self, name: str, value: Any) -> None:
|
|
240
|
+
super().__setattr__(name, value)
|
|
241
|
+
if name.startswith("_") or name in _non_options:
|
|
242
|
+
return
|
|
243
|
+
if getattr(self, "warn_on_undocumented_option", False):
|
|
244
|
+
typing.check_itable_argument_names({name}, typing.ITableOptions)
|
|
245
|
+
if getattr(self, "warn_on_unexpected_option_type", False):
|
|
246
|
+
typing.check_itable_argument_types({name: value}, typing.ITableOptions)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
sys.modules[__name__].__class__ = _ITableOptionsModule
|
|
@@ -150,6 +150,18 @@ class DataTableOptions(TypedDict):
|
|
|
150
150
|
initComplete: NotRequired[JavascriptFunction]
|
|
151
151
|
fnInfoCallback: NotRequired[JavascriptFunction]
|
|
152
152
|
drawCallback: NotRequired[JavascriptFunction]
|
|
153
|
+
createdRow: NotRequired[JavascriptFunction]
|
|
154
|
+
footerCallback: NotRequired[JavascriptFunction]
|
|
155
|
+
formatNumber: NotRequired[JavascriptFunction]
|
|
156
|
+
headerCallback: NotRequired[JavascriptFunction]
|
|
157
|
+
infoCallback: NotRequired[JavascriptFunction]
|
|
158
|
+
preDrawCallback: NotRequired[JavascriptFunction]
|
|
159
|
+
rowCallback: NotRequired[JavascriptFunction]
|
|
160
|
+
stateLoadCallback: NotRequired[JavascriptFunction]
|
|
161
|
+
stateLoadParams: NotRequired[JavascriptFunction]
|
|
162
|
+
stateLoaded: NotRequired[JavascriptFunction]
|
|
163
|
+
stateSaveCallback: NotRequired[JavascriptFunction]
|
|
164
|
+
stateSaveParams: NotRequired[JavascriptFunction]
|
|
153
165
|
stateSave: NotRequired[bool]
|
|
154
166
|
stateDuration: NotRequired[int]
|
|
155
167
|
deferRender: NotRequired[bool]
|
|
@@ -318,7 +330,7 @@ def check_itable_argument_types(kwargs: dict[str, Any], typed_dict: type) -> Non
|
|
|
318
330
|
match the types defined in the given TypedDict.
|
|
319
331
|
"""
|
|
320
332
|
try:
|
|
321
|
-
from typeguard import TypeCheckError, check_type
|
|
333
|
+
from typeguard import CollectionCheckStrategy, TypeCheckError, check_type
|
|
322
334
|
except ImportError as e:
|
|
323
335
|
raise ImportError(
|
|
324
336
|
"The `warn_on_unexpected_option_type` option requires the 'typeguard' package. "
|
|
@@ -332,7 +344,13 @@ def check_itable_argument_types(kwargs: dict[str, Any], typed_dict: type) -> Non
|
|
|
332
344
|
continue
|
|
333
345
|
|
|
334
346
|
try:
|
|
335
|
-
|
|
347
|
+
# the options are small, so we can afford to check every item of
|
|
348
|
+
# e.g. the columnDefs, rather than just the first one (#601)
|
|
349
|
+
check_type(
|
|
350
|
+
{key: value},
|
|
351
|
+
typed_dict,
|
|
352
|
+
collection_check_strategy=CollectionCheckStrategy.ALL_ITEMS,
|
|
353
|
+
)
|
|
336
354
|
except TypeCheckError as e:
|
|
337
355
|
type_repr = str(typed_dict.__annotations__[key]).replace("typing.", "")
|
|
338
356
|
warnings.warn(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e,r,t={188(e,r,t){t.d(r,{Ay:()=>u,Gs:()=>l,tu:()=>p});var n=t(609),o=t.n(n);const i=window.PropTypes;var a=t.n(i),s=React.lazy(function(){return t.e(741).then(t.bind(t,249))}),c=function(e){return o().createElement(o().Suspense,{fallback:null},o().createElement(s,e))};c.defaultProps={},c.propTypes={id:a().string.isRequired,caption:a().string,selected_rows:a().array.isRequired,style:a().object.isRequired,classes:a().string.isRequired,dt_args:a().object.isRequired,setProps:a().func};const u=c;var l=c.defaultProps,p=c.propTypes},609(e){e.exports=window.React}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((r,t)=>(o.f[t](e,r),r),[])),o.u=e=>"async-ITable.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="itables_for_dash:",o.l=(t,n,i,a)=>{if(e[t])e[t].push(n);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var p=u[l];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+i){s=p;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",r+i),s.src=t),e[t]=[n];var d=(r,n)=>{s.onerror=s.onload=null,clearTimeout(f);var o=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(n)),r)return r(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var r=o.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i,a=function(){var e=document.currentScript;if(!e){for(var r=document.getElementsByTagName("script"),t=[],n=0;n<r.length;n++)t.push(r[n]);e=(t=t.filter(function(e){return!e.async&&!e.text&&!e.textContent})).slice(-1)[0]}return e};if(Object.defineProperty(o,"p",{get:(i=a().src.split("/").slice(0,-1).join("/")+"/",function(){return i})}),"undefined"!=typeof jsonpScriptSrc){var s=jsonpScriptSrc;jsonpScriptSrc=function(e){var r,t=(r=a(),/\/_dash-component-suites\//.test(r.src)),n=s(e);if(!t)return n;var o=n.split("/"),i=o.slice(-1)[0].split(".");return i.splice(1,0,"
|
|
1
|
+
(()=>{"use strict";var e,r,t={188(e,r,t){t.d(r,{Ay:()=>u,Gs:()=>l,tu:()=>p});var n=t(609),o=t.n(n);const i=window.PropTypes;var a=t.n(i),s=React.lazy(function(){return t.e(741).then(t.bind(t,249))}),c=function(e){return o().createElement(o().Suspense,{fallback:null},o().createElement(s,e))};c.defaultProps={},c.propTypes={id:a().string.isRequired,caption:a().string,selected_rows:a().array.isRequired,style:a().object.isRequired,classes:a().string.isRequired,dt_args:a().object.isRequired,setProps:a().func};const u=c;var l=c.defaultProps,p=c.propTypes},609(e){e.exports=window.React}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((r,t)=>(o.f[t](e,r),r),[])),o.u=e=>"async-ITable.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="itables_for_dash:",o.l=(t,n,i,a)=>{if(e[t])e[t].push(n);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var p=u[l];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+i){s=p;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",r+i),s.src=t),e[t]=[n];var d=(r,n)=>{s.onerror=s.onload=null,clearTimeout(f);var o=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(n)),r)return r(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var r=o.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i,a=function(){var e=document.currentScript;if(!e){for(var r=document.getElementsByTagName("script"),t=[],n=0;n<r.length;n++)t.push(r[n]);e=(t=t.filter(function(e){return!e.async&&!e.text&&!e.textContent})).slice(-1)[0]}return e};if(Object.defineProperty(o,"p",{get:(i=a().src.split("/").slice(0,-1).join("/")+"/",function(){return i})}),"undefined"!=typeof jsonpScriptSrc){var s=jsonpScriptSrc;jsonpScriptSrc=function(e){var r,t=(r=a(),/\/_dash-component-suites\//.test(r.src)),n=s(e);if(!t)return n;var o=n.split("/"),i=o.slice(-1)[0].split(".");return i.splice(1,0,"v0_2_0m1795993349"),o.splice(-1,1,i.join(".")),o.join("/")}}(()=>{o.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={792:0};o.f.j=(r,t)=>{var n=o.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var i=new Promise((t,o)=>n=e[r]=[t,o]);t.push(n[2]=i);var a=o.p+o.u(r),s=new Error;o.l(a,t=>{if(o.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var i=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;s.message="Loading chunk "+r+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,n[1](s)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,i,[a,s,c]=t,u=0;if(a.some(r=>0!==e[r])){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);c&&c(o)}for(r&&r(t);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},t=self.webpackChunkitables_for_dash=self.webpackChunkitables_for_dash||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),o.nc=void 0;var c={};o.r(c),o.d(c,{ITable:()=>u.Ay});var u=o(188);window.itables_for_dash=c})();
|
|
2
2
|
//# sourceMappingURL=itables_for_dash.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"itables_for_dash.min.js","mappings":"uBAAAA,EACAC,0ECDA,MAAMC,EAA4BC,OAAA,uBCArBC,EAASC,MAAMC,KAAK,kBAAMC,EAAAC,EAAA,KAAAC,KAAAF,EAAAG,KAAAH,EAAA,KAAmE,GCOpGH,EAAS,SAACO,GACZ,OACIN,IAAAA,cAACA,IAAAA,SAAc,CAACO,SAAU,MACtBP,IAAAA,cAACQ,EAAkBF,GAG/B,EAEAP,EAAOU,aAAe,CAAC,EAEvBV,EAAOW,UAAY,CAIfC,GAAIC,IAAAA,OAAiBC,WAKrBC,QAASF,IAAAA,OAKTG,cAAeH,IAAAA,MAAgBC,WAK/BG,MAAOJ,IAAAA,OAAiBC,WAKxBI,QAASL,IAAAA,OAAiBC,WAK1BK,QAASN,IAAAA,OAAiBC,WAM1BM,SAAUP,IAAAA,MAGd,MAAAQ,EAAA,EACO,IAAMX,EAAeV,EAAOU,aACtBC,EAAYX,EAAOW,kBCzDhCW,EAAAC,QAA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AAqBD,IAC3BzB,EAAAmG,EAAA1E,GACAjE,EAAAkC,EAAA0F,EAAApF,IAAAoF,EAAApF,IACAoF,EAAApF,GAAA,KAEAoF,EAAApF,GAAA,GAKAuG,EAAArB,KAAA,6BAAAA,KAAA,iCACAqB,EAAA3D,QAAAoD,EAAArI,KAAA,SACA4I,EAAApF,KAAA6E,EAAArI,KAAA,KAAA4I,EAAApF,KAAAxD,KAAA4I,QCrFA/I,EAAAuE,QAAA/C","sources":["webpack:///webpack/runtime/load script","webpack:///external window \"PropTypes\"","webpack:///./src/lib/LazyLoader.js","webpack:///./src/lib/components/ITable.react.js","webpack:///external window \"React\"","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/compat","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/runtime/nonce"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"itables_for_dash:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"PropTypes\"];","export const ITable = React.lazy(() => import(/* webpackChunkName: \"ITable\" */ './fragments/ITable.react'));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { ITable as RealComponent } from '../LazyLoader';\n\n/**\n * ITable is a dash component for ITables\n */\nconst ITable = (props) => {\n return (\n <React.Suspense fallback={null}>\n <RealComponent {...props} />\n </React.Suspense>\n );\n};\n\nITable.defaultProps = {};\n\nITable.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks.\n */\n id: PropTypes.string.isRequired,\n\n /**\n * The table caption\n */\n caption: PropTypes.string,\n\n /**\n * The index of the selected rows (pass select=True to allow selection)\n */\n selected_rows: PropTypes.array.isRequired,\n\n /**\n * The table style\n */\n style: PropTypes.object.isRequired,\n\n /**\n * The table classes\n */\n classes: PropTypes.string.isRequired,\n\n /**\n * The arguments for DataTable e.g. select, buttons, layout etc.\n */\n dt_args: PropTypes.object.isRequired,\n\n /**\n * Dash-assigned callback that should be called to report property changes\n * to Dash, to make them available for callbacks.\n */\n setProps: PropTypes.func\n};\n\nexport default ITable;\nexport const defaultProps = ITable.defaultProps;\nexport const propTypes = ITable.propTypes;\n","module.exports = window[\"React\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"async-ITable\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var getCurrentScript = function() {\n var script = document.currentScript;\n if (!script) {\n /* Shim for IE11 and below */\n /* Do not take into account async scripts and inline scripts */\n\n var doc_scripts = document.getElementsByTagName('script');\n var scripts = [];\n\n for (var i = 0; i < doc_scripts.length; i++) {\n scripts.push(doc_scripts[i]);\n }\n\n scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n script = scripts.slice(-1)[0];\n }\n\n return script;\n};\n\nvar isLocalScript = function(script) {\n return /\\/_dash-component-suites\\//.test(script.src);\n};\n\nObject.defineProperty(__webpack_require__, 'p', {\n get: (function () {\n var script = getCurrentScript();\n\n var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n return function() {\n return url;\n };\n })()\n});\n\nif (typeof jsonpScriptSrc !== 'undefined') {\n var __jsonpScriptSrc__ = jsonpScriptSrc;\n jsonpScriptSrc = function(chunkId) {\n var script = getCurrentScript();\n var isLocal = isLocalScript(script);\n\n var src = __jsonpScriptSrc__(chunkId);\n\n if(!isLocal) {\n return src;\n }\n\n var srcFragments = src.split('/');\n var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n fileFragments.splice(1, 0, \"v0_2_0m1784501307\");\n srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n return srcFragments.join('/');\n };\n}\n","__webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkitables_for_dash\"] = self[\"webpackChunkitables_for_dash\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;"],"names":["inProgress","dataWebpackPrefix","external_PropTypes_namespaceObject","window","ITable","React","lazy","__webpack_require__","e","then","bind","props","fallback","RealComponent","defaultProps","propTypes","id","PropTypes","isRequired","caption","selected_rows","style","classes","dt_args","setProps","ITable_react","module","exports","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","m","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","f","chunkId","Promise","all","keys","reduce","promises","u","g","globalThis","this","Function","obj","prop","prototype","hasOwnProperty","call","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","i","length","s","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","timeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","type","target","head","appendChild","r","Symbol","toStringTag","value","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","getCurrentScript","doc_scripts","filter","async","text","textContent","slice","split","join","jsonpScriptSrc","__jsonpScriptSrc__","isLocal","srcFragments","fileFragments","splice","b","baseURI","self","href","installedChunks","j","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"itables_for_dash.min.js","mappings":"uBAAAA,EACAC,0ECDA,MAAMC,EAA4BC,OAAA,uBCArBC,EAASC,MAAMC,KAAK,kBAAMC,EAAAC,EAAA,KAAAC,KAAAF,EAAAG,KAAAH,EAAA,KAAmE,GCOpGH,EAAS,SAACO,GACZ,OACIN,IAAAA,cAACA,IAAAA,SAAc,CAACO,SAAU,MACtBP,IAAAA,cAACQ,EAAkBF,GAG/B,EAEAP,EAAOU,aAAe,CAAC,EAEvBV,EAAOW,UAAY,CAIfC,GAAIC,IAAAA,OAAiBC,WAKrBC,QAASF,IAAAA,OAKTG,cAA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AA0E,EAAAG,KAAArI,GAAA,IAAAmH,EAAAnH,IAAA,CACA,IAAAa,KAAAsH,EACA5I,EAAAkC,EAAA0G,EAAAtH,KACAtB,EAAA0B,EAAAJ,GAAAsH,EAAAtH,IAGAuH,GAAAA,EAAA7I,EACA,CAEA,IADAyI,GAAAA,EAAAC,GACMzE,EAAA0E,EAAAzE,OAAqBD,IAC3BzB,EAAAmG,EAAA1E,GACAjE,EAAAkC,EAAA0F,EAAApF,IAAAoF,EAAApF,IACAoF,EAAApF,GAAA,KAEAoF,EAAApF,GAAA,GAKAuG,EAAArB,KAAA,6BAAAA,KAAA,iCACAqB,EAAA3D,QAAAoD,EAAArI,KAAA,SACA4I,EAAApF,KAAA6E,EAAArI,KAAA,KAAA4I,EAAApF,KAAAxD,KAAA4I,QCrFA/I,EAAAuE,QAAA/C","sources":["webpack:///webpack/runtime/load script","webpack:///external window \"PropTypes\"","webpack:///./src/lib/LazyLoader.js","webpack:///./src/lib/components/ITable.react.js","webpack:///external window \"React\"","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/compat","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/runtime/nonce"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"itables_for_dash:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"PropTypes\"];","export const ITable = React.lazy(() => import(/* webpackChunkName: \"ITable\" */ './fragments/ITable.react'));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { ITable as RealComponent } from '../LazyLoader';\n\n/**\n * ITable is a dash component for ITables\n */\nconst ITable = (props) => {\n return (\n <React.Suspense fallback={null}>\n <RealComponent {...props} />\n </React.Suspense>\n );\n};\n\nITable.defaultProps = {};\n\nITable.propTypes = {\n /**\n * The ID used to identify this component in Dash callbacks.\n */\n id: PropTypes.string.isRequired,\n\n /**\n * The table caption\n */\n caption: PropTypes.string,\n\n /**\n * The index of the selected rows (pass select=True to allow selection)\n */\n selected_rows: PropTypes.array.isRequired,\n\n /**\n * The table style\n */\n style: PropTypes.object.isRequired,\n\n /**\n * The table classes\n */\n classes: PropTypes.string.isRequired,\n\n /**\n * The arguments for DataTable e.g. select, buttons, layout etc.\n */\n dt_args: PropTypes.object.isRequired,\n\n /**\n * Dash-assigned callback that should be called to report property changes\n * to Dash, to make them available for callbacks.\n */\n setProps: PropTypes.func\n};\n\nexport default ITable;\nexport const defaultProps = ITable.defaultProps;\nexport const propTypes = ITable.propTypes;\n","module.exports = window[\"React\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"async-ITable\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var getCurrentScript = function() {\n var script = document.currentScript;\n if (!script) {\n /* Shim for IE11 and below */\n /* Do not take into account async scripts and inline scripts */\n\n var doc_scripts = document.getElementsByTagName('script');\n var scripts = [];\n\n for (var i = 0; i < doc_scripts.length; i++) {\n scripts.push(doc_scripts[i]);\n }\n\n scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n script = scripts.slice(-1)[0];\n }\n\n return script;\n};\n\nvar isLocalScript = function(script) {\n return /\\/_dash-component-suites\\//.test(script.src);\n};\n\nObject.defineProperty(__webpack_require__, 'p', {\n get: (function () {\n var script = getCurrentScript();\n\n var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n return function() {\n return url;\n };\n })()\n});\n\nif (typeof jsonpScriptSrc !== 'undefined') {\n var __jsonpScriptSrc__ = jsonpScriptSrc;\n jsonpScriptSrc = function(chunkId) {\n var script = getCurrentScript();\n var isLocal = isLocalScript(script);\n\n var src = __jsonpScriptSrc__(chunkId);\n\n if(!isLocal) {\n return src;\n }\n\n var srcFragments = src.split('/');\n var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n fileFragments.splice(1, 0, \"v0_2_0m1795993349\");\n srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n return srcFragments.join('/');\n };\n}\n","__webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkitables_for_dash\"] = self[\"webpackChunkitables_for_dash\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;"],"names":["inProgress","dataWebpackPrefix","external_PropTypes_namespaceObject","window","ITable","React","lazy","__webpack_require__","e","then","bind","props","fallback","RealComponent","defaultProps","propTypes","id","PropTypes","isRequired","caption","selected_rows","style","classes","dt_args","setProps","ITable_react","module","exports","__webpack_module_cache__","moduleId","cachedModule","undefined","__webpack_modules__","m","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","f","chunkId","Promise","all","keys","reduce","promises","u","g","globalThis","this","Function","obj","prop","prototype","hasOwnProperty","call","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","i","length","s","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","timeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","type","target","head","appendChild","r","Symbol","toStringTag","value","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","getCurrentScript","doc_scripts","filter","async","text","textContent","slice","split","join","jsonpScriptSrc","__jsonpScriptSrc__","isLocal","srcFragments","fileFragments","splice","b","baseURI","self","href","installedChunks","j","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal"],"sourceRoot":""}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = [
|
|
2
|
+
requires = [
|
|
3
|
+
"hatchling<1.29",
|
|
4
|
+
"hatch-jupyter-builder>=0.5.0",
|
|
5
|
+
]
|
|
3
6
|
build-backend = "hatchling.build"
|
|
4
7
|
|
|
5
8
|
[project]
|
|
@@ -97,7 +100,7 @@ exclude_lines = [
|
|
|
97
100
|
|
|
98
101
|
[tool.hatch.build.hooks.jupyter-builder]
|
|
99
102
|
enable-by-default = true
|
|
100
|
-
dependencies = ["
|
|
103
|
+
dependencies = ["dash==4.4.0", "pyyaml"]
|
|
101
104
|
build-function = "hatch_jupyter_builder.npm_builder"
|
|
102
105
|
ensured-targets = [
|
|
103
106
|
"src/itables/html/dt_bundle.js",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|