├── .babelrc
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .npmignore
├── .prettierrc
├── .pylintrc
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── _validate_init.py
├── advanced_usage.py
├── dash_devextreme
├── CheckBox.py
├── DataGrid.py
├── PieChart.py
├── PivotGrid.py
├── Popover.py
├── Popup.py
├── SelectBox.py
├── Switch.py
├── TabPanel.py
├── Tabs.py
├── TextBox.py
├── Tooltip.py
├── TreeList.py
├── __init__.py
├── _imports_.py
├── dash_devextreme.dev.js
├── dash_devextreme.min.js
├── metadata.json
├── package.json
└── version.py
├── extract-meta.js
├── index.html
├── package.json
├── requirements.txt
├── review_checklist.md
├── setup.py
├── src
├── demo
│ ├── App.js
│ └── index.js
└── lib
│ ├── components
│ ├── CheckBox.react.js
│ ├── DataGrid.react.js
│ ├── PieChart.react.js
│ ├── PivotGrid.react.js
│ ├── Popover.react.js
│ ├── Popup.react.js
│ ├── SelectBox.react.js
│ ├── Switch.react.js
│ ├── TabPanel.react.js
│ ├── Tabs.react.js
│ ├── TextBox.react.js
│ ├── Tooltip.react.js
│ └── TreeList.react.js
│ └── index.js
├── test
├── __init__.py
├── requirements.txt
└── test_usage.py
├── usage.py
├── webpack.config.js
└── webpack.serve.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["env", "react"]
3 | }
4 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | *.css
2 | registerServiceWorker.js
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["eslint:recommended", "prettier"],
3 | "parser": "babel-eslint",
4 | "parserOptions": {
5 | "ecmaVersion": 6,
6 | "sourceType": "module",
7 | "ecmaFeatures": {
8 | "arrowFunctions": true,
9 | "blockBindings": true,
10 | "classes": true,
11 | "defaultParams": true,
12 | "destructuring": true,
13 | "forOf": true,
14 | "generators": true,
15 | "modules": true,
16 | "templateStrings": true,
17 | "jsx": true
18 | }
19 | },
20 | "env": {
21 | "browser": true,
22 | "es6": true,
23 | "jasmine": true,
24 | "jest": true,
25 | "node": true
26 | },
27 | "globals": {
28 | "jest": true
29 | },
30 | "plugins": [
31 | "react",
32 | "import"
33 | ],
34 | "rules": {
35 | "accessor-pairs": ["error"],
36 | "block-scoped-var": ["error"],
37 | "consistent-return": ["error"],
38 | "curly": ["error", "all"],
39 | "default-case": ["error"],
40 | "dot-location": ["off"],
41 | "dot-notation": ["error"],
42 | "eqeqeq": ["error"],
43 | "guard-for-in": ["off"],
44 | "import/named": ["off"],
45 | "import/no-duplicates": ["error"],
46 | "import/no-named-as-default": ["error"],
47 | "new-cap": ["error"],
48 | "no-alert": [1],
49 | "no-caller": ["error"],
50 | "no-case-declarations": ["error"],
51 | "no-console": ["off"],
52 | "no-div-regex": ["error"],
53 | "no-dupe-keys": ["error"],
54 | "no-else-return": ["error"],
55 | "no-empty-pattern": ["error"],
56 | "no-eq-null": ["error"],
57 | "no-eval": ["error"],
58 | "no-extend-native": ["error"],
59 | "no-extra-bind": ["error"],
60 | "no-extra-boolean-cast": ["error"],
61 | "no-inline-comments": ["error"],
62 | "no-implicit-coercion": ["error"],
63 | "no-implied-eval": ["error"],
64 | "no-inner-declarations": ["off"],
65 | "no-invalid-this": ["error"],
66 | "no-iterator": ["error"],
67 | "no-labels": ["error"],
68 | "no-lone-blocks": ["error"],
69 | "no-loop-func": ["error"],
70 | "no-multi-str": ["error"],
71 | "no-native-reassign": ["error"],
72 | "no-new": ["error"],
73 | "no-new-func": ["error"],
74 | "no-new-wrappers": ["error"],
75 | "no-param-reassign": ["error"],
76 | "no-process-env": ["warn"],
77 | "no-proto": ["error"],
78 | "no-redeclare": ["error"],
79 | "no-return-assign": ["error"],
80 | "no-script-url": ["error"],
81 | "no-self-compare": ["error"],
82 | "no-sequences": ["error"],
83 | "no-shadow": ["off"],
84 | "no-throw-literal": ["error"],
85 | "no-undefined": ["error"],
86 | "no-unused-expressions": ["error"],
87 | "no-use-before-define": ["error", "nofunc"],
88 | "no-useless-call": ["error"],
89 | "no-useless-concat": ["error"],
90 | "no-with": ["error"],
91 | "prefer-const": ["error"],
92 | "radix": ["error"],
93 | "react/jsx-no-duplicate-props": ["error"],
94 | "react/jsx-no-undef": ["error"],
95 | "react/jsx-uses-react": ["error"],
96 | "react/jsx-uses-vars": ["error"],
97 | "react/no-did-update-set-state": ["error"],
98 | "react/no-direct-mutation-state": ["error"],
99 | "react/no-is-mounted": ["error"],
100 | "react/no-unknown-property": ["error"],
101 | "react/prefer-es6-class": ["error", "always"],
102 | "react/prop-types": "error",
103 | "valid-jsdoc": ["off"],
104 | "yoda": ["error"],
105 | "spaced-comment": ["error", "always", {
106 | "block": {
107 | exceptions: ["*"]
108 | }
109 | }],
110 | "no-unused-vars": ["error", {
111 | "args": "after-used",
112 | "argsIgnorePattern": "^_",
113 | "caughtErrorsIgnorePattern": "^e$"
114 | }],
115 | "no-magic-numbers": ["error", {
116 | "ignoreArrayIndexes": true,
117 | "ignore": [-1, 0, 1, 2, 3, 100, 10, 0.5]
118 | }],
119 | "no-underscore-dangle": ["off"]
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### VisualStudioCode template
3 | .vscode/*
4 | !.vscode/settings.json
5 | !.vscode/tasks.json
6 | !.vscode/launch.json
7 | !.vscode/extensions.json
8 | ### JetBrains template
9 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
10 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
11 |
12 | # User-specific stuff
13 | .idea/
14 |
15 | # CMake
16 | cmake-build-*/
17 |
18 | # File-based project format
19 | *.iws
20 |
21 | # IntelliJ
22 | out/
23 |
24 | # mpeltonen/sbt-idea plugin
25 | .idea_modules/
26 |
27 | # JIRA plugin
28 | atlassian-ide-plugin.xml
29 |
30 | # Crashlytics plugin (for Android Studio and IntelliJ)
31 | com_crashlytics_export_strings.xml
32 | crashlytics.properties
33 | crashlytics-build.properties
34 | fabric.properties
35 |
36 | ### Node template
37 | # Logs
38 | logs
39 | *.log
40 | npm-debug.log*
41 | yarn-debug.log*
42 | yarn-error.log*
43 |
44 | # Runtime data
45 | pids
46 | *.pid
47 | *.seed
48 | *.pid.lock
49 |
50 | # Directory for instrumented libs generated by jscoverage/JSCover
51 | lib-cov
52 |
53 | # Coverage directory used by tools like istanbul
54 | coverage
55 |
56 | # nyc test coverage
57 | .nyc_output
58 |
59 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
60 | .grunt
61 |
62 | # Bower dependency directory (https://bower.io/)
63 | bower_components
64 |
65 | # node-waf configuration
66 | .lock-wscript
67 |
68 | # Compiled binary addons (https://nodejs.org/api/addons.html)
69 | build/Release
70 |
71 | # Dependency directories
72 | node_modules/
73 | jspm_packages/
74 |
75 | # TypeScript v1 declaration files
76 | typings/
77 |
78 | # Optional npm cache directory
79 | .npm
80 |
81 | # Optional eslint cache
82 | .eslintcache
83 |
84 | # Optional REPL history
85 | .node_repl_history
86 |
87 | # Output of 'npm pack'
88 | *.tgz
89 |
90 | # Yarn Integrity file
91 | .yarn-integrity
92 |
93 | # dotenv environment variables file
94 | .env
95 |
96 | # parcel-bundler cache (https://parceljs.org/)
97 | .cache
98 |
99 | # next.js build output
100 | .next
101 |
102 | # nuxt.js build output
103 | .nuxt
104 |
105 | # vuepress build output
106 | .vuepress/dist
107 |
108 | # Serverless directories
109 | .serverless
110 | ### Python template
111 | # Byte-compiled / optimized / DLL files
112 | __pycache__/
113 | *.py[cod]
114 | *$py.class
115 |
116 | # C extensions
117 | *.so
118 |
119 | # Distribution / packaging
120 | .Python
121 | build/
122 | develop-eggs/
123 | dist/
124 | downloads/
125 | eggs/
126 | .eggs/
127 | lib64/
128 | parts/
129 | sdist/
130 | var/
131 | wheels/
132 | *.egg-info/
133 | .installed.cfg
134 | *.egg
135 | MANIFEST
136 |
137 | # PyInstaller
138 | # Usually these files are written by a python script from a template
139 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
140 | *.manifest
141 | *.spec
142 |
143 | # Installer logs
144 | pip-log.txt
145 | pip-delete-this-directory.txt
146 |
147 | # Unit test / coverage reports
148 | htmlcov/
149 | .tox/
150 | .coverage
151 | .coverage.*
152 | nosetests.xml
153 | coverage.xml
154 | *.cover
155 | .hypothesis/
156 | .pytest_cache/
157 |
158 | # Translations
159 | *.mo
160 | *.pot
161 |
162 | # Django stuff:
163 | local_settings.py
164 | db.sqlite3
165 |
166 | # Flask stuff:
167 | instance/
168 | .webassets-cache
169 |
170 | # Scrapy stuff:
171 | .scrapy
172 |
173 | # Sphinx documentation
174 | docs/_build/
175 |
176 | # PyBuilder
177 | target/
178 |
179 | # Jupyter Notebook
180 | .ipynb_checkpoints
181 |
182 | # pyenv
183 | .python-version
184 |
185 | # celery beat schedule file
186 | celerybeat-schedule
187 |
188 | # SageMath parsed files
189 | *.sage.py
190 |
191 | # Environments
192 | .venv
193 | env/
194 | venv/
195 | ENV/
196 | env.bak/
197 | venv.bak/
198 |
199 | # Spyder project settings
200 | .spyderproject
201 | .spyproject
202 |
203 | # Rope project settings
204 | .ropeproject
205 |
206 | # mkdocs documentation
207 | /site
208 |
209 | # mypy
210 | .mypy_cache/
211 | ### SublimeText template
212 | # Cache files for Sublime Text
213 | *.tmlanguage.cache
214 | *.tmPreferences.cache
215 | *.stTheme.cache
216 |
217 | # Workspace files are user-specific
218 | *.sublime-workspace
219 |
220 | # Project files should be checked into the repository, unless a significant
221 | # proportion of contributors will probably not be using Sublime Text
222 | # *.sublime-project
223 |
224 | # SFTP configuration file
225 | sftp-config.json
226 |
227 | # Package control specific files
228 | Package Control.last-run
229 | Package Control.ca-list
230 | Package Control.ca-bundle
231 | Package Control.system-ca-bundle
232 | Package Control.cache/
233 | Package Control.ca-certs/
234 | Package Control.merged-ca-bundle
235 | Package Control.user-ca-bundle
236 | oscrypto-ca-bundle.crt
237 | bh_unicode_properties.cache
238 |
239 | # Sublime-github package stores a github token in this file
240 | # https://packagecontrol.io/packages/sublime-github
241 | GitHub.sublime-settings
242 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | /node_modules
3 | .idea/
4 |
5 | # testing
6 | /coverage
7 |
8 | # misc
9 | .DS_Store
10 | .env.local
11 | .env.development.local
12 | .env.test.local
13 | .env.production.local
14 |
15 | npm-debug.log*
16 | yarn-debug.log*
17 | yarn-error.log*
18 |
19 | # Development folders and files
20 | public
21 | src
22 | scripts
23 | config
24 | .travis.yml
25 | CHANGELOG.md
26 | README.md
27 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 4,
3 | "singleQuote": true,
4 | "bracketSpacing": false,
5 | "trailingComma": "es5"
6 | }
7 |
--------------------------------------------------------------------------------
/.pylintrc:
--------------------------------------------------------------------------------
1 | [MASTER]
2 |
3 | # A comma-separated list of package or module names from where C extensions may
4 | # be loaded. Extensions are loading into the active Python interpreter and may
5 | # run arbitrary code
6 | extension-pkg-whitelist=
7 |
8 | # Add files or directories to the blacklist. They should be base names, not
9 | # paths.
10 | ignore=CVS
11 |
12 | # Add files or directories matching the regex patterns to the blacklist. The
13 | # regex matches against base names, not paths.
14 | ignore-patterns=
15 |
16 | # Python code to execute, usually for sys.path manipulation such as
17 | # pygtk.require().
18 | #init-hook=
19 |
20 | # Use multiple processes to speed up Pylint.
21 | jobs=1
22 |
23 | # List of plugins (as comma separated values of python modules names) to load,
24 | # usually to register additional checkers.
25 | load-plugins=
26 |
27 | # Pickle collected data for later comparisons.
28 | persistent=yes
29 |
30 | # Specify a configuration file.
31 | #rcfile=
32 |
33 | # When enabled, pylint would attempt to guess common misconfiguration and emit
34 | # user-friendly hints instead of false-positive error messages
35 | suggestion-mode=yes
36 |
37 | # Allow loading of arbitrary C extensions. Extensions are imported into the
38 | # active Python interpreter and may run arbitrary code.
39 | unsafe-load-any-extension=no
40 |
41 |
42 | [MESSAGES CONTROL]
43 |
44 | # Only show warnings with the listed confidence levels. Leave empty to show
45 | # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
46 | confidence=
47 |
48 | # Disable the message, report, category or checker with the given id(s). You
49 | # can either give multiple identifiers separated by comma (,) or put this
50 | # option multiple times (only on the command line, not in the configuration
51 | # file where it should appear only once).You can also use "--disable=all" to
52 | # disable everything first and then reenable specific checks. For example, if
53 | # you want to run only the similarities checker, you can use "--disable=all
54 | # --enable=similarities". If you want to run only the classes checker, but have
55 | # no Warning level messages displayed, use"--disable=all --enable=classes
56 | # --disable=W"
57 | disable=print-statement,
58 | parameter-unpacking,
59 | unpacking-in-except,
60 | old-raise-syntax,
61 | backtick,
62 | long-suffix,
63 | old-ne-operator,
64 | old-octal-literal,
65 | import-star-module-level,
66 | non-ascii-bytes-literal,
67 | raw-checker-failed,
68 | bad-inline-option,
69 | locally-disabled,
70 | locally-enabled,
71 | file-ignored,
72 | suppressed-message,
73 | useless-suppression,
74 | deprecated-pragma,
75 | apply-builtin,
76 | basestring-builtin,
77 | buffer-builtin,
78 | cmp-builtin,
79 | coerce-builtin,
80 | execfile-builtin,
81 | file-builtin,
82 | long-builtin,
83 | raw_input-builtin,
84 | reduce-builtin,
85 | standarderror-builtin,
86 | unicode-builtin,
87 | xrange-builtin,
88 | coerce-method,
89 | delslice-method,
90 | getslice-method,
91 | setslice-method,
92 | no-absolute-import,
93 | old-division,
94 | dict-iter-method,
95 | dict-view-method,
96 | next-method-called,
97 | metaclass-assignment,
98 | indexing-exception,
99 | raising-string,
100 | reload-builtin,
101 | oct-method,
102 | hex-method,
103 | nonzero-method,
104 | cmp-method,
105 | input-builtin,
106 | round-builtin,
107 | intern-builtin,
108 | unichr-builtin,
109 | map-builtin-not-iterating,
110 | zip-builtin-not-iterating,
111 | range-builtin-not-iterating,
112 | filter-builtin-not-iterating,
113 | using-cmp-argument,
114 | eq-without-hash,
115 | div-method,
116 | idiv-method,
117 | rdiv-method,
118 | exception-message-attribute,
119 | invalid-str-codec,
120 | sys-max-int,
121 | bad-python3-import,
122 | deprecated-string-function,
123 | deprecated-str-translate-call,
124 | deprecated-itertools-function,
125 | deprecated-types-field,
126 | next-method-defined,
127 | dict-items-not-iterating,
128 | dict-keys-not-iterating,
129 | dict-values-not-iterating,
130 | no-member,
131 | missing-docstring,
132 | invalid-name,
133 | redefined-builtin,
134 | wrong-import-order,
135 | too-many-arguments,
136 | too-many-locals,
137 | consider-using-enumerate,
138 | len-as-condition,
139 | too-many-branches,
140 | too-many-statements,
141 | blacklisted-name,
142 | line-too-long,
143 | bare-except,
144 | duplicate-code,
145 | too-many-function-args,
146 | attribute-defined-outside-init,
147 | broad-except
148 |
149 | # Enable the message, report, category or checker with the given id(s). You can
150 | # either give multiple identifier separated by comma (,) or put this option
151 | # multiple time (only on the command line, not in the configuration file where
152 | # it should appear only once). See also the "--disable" option for examples.
153 | enable=c-extension-no-member
154 |
155 |
156 | [REPORTS]
157 |
158 | # Python expression which should return a note less than 10 (10 is the highest
159 | # note). You have access to the variables errors warning, statement which
160 | # respectively contain the number of errors / warnings messages and the total
161 | # number of statements analyzed. This is used by the global evaluation report
162 | # (RP0004).
163 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
164 |
165 | # Template used to display messages. This is a python new-style format string
166 | # used to format the message information. See doc for all details
167 | #msg-template=
168 |
169 | # Set the output format. Available formats are text, parseable, colorized, json
170 | # and msvs (visual studio).You can also give a reporter class, eg
171 | # mypackage.mymodule.MyReporterClass.
172 | output-format=text
173 |
174 | # Tells whether to display a full report or only the messages
175 | reports=no
176 |
177 | # Activate the evaluation score.
178 | score=yes
179 |
180 |
181 | [REFACTORING]
182 |
183 | # Maximum number of nested blocks for function / method body
184 | max-nested-blocks=5
185 |
186 | # Complete name of functions that never returns. When checking for
187 | # inconsistent-return-statements if a never returning function is called then
188 | # it will be considered as an explicit return statement and no message will be
189 | # printed.
190 | never-returning-functions=optparse.Values,sys.exit
191 |
192 |
193 | [BASIC]
194 |
195 | # Naming style matching correct argument names
196 | argument-naming-style=snake_case
197 |
198 | # Regular expression matching correct argument names. Overrides argument-
199 | # naming-style
200 | #argument-rgx=
201 |
202 | # Naming style matching correct attribute names
203 | attr-naming-style=snake_case
204 |
205 | # Regular expression matching correct attribute names. Overrides attr-naming-
206 | # style
207 | #attr-rgx=
208 |
209 | # Bad variable names which should always be refused, separated by a comma
210 | bad-names=foo,
211 | bar,
212 | baz,
213 | toto,
214 | tutu,
215 | tata
216 |
217 | # Naming style matching correct class attribute names
218 | class-attribute-naming-style=any
219 |
220 | # Regular expression matching correct class attribute names. Overrides class-
221 | # attribute-naming-style
222 | #class-attribute-rgx=
223 |
224 | # Naming style matching correct class names
225 | class-naming-style=PascalCase
226 |
227 | # Regular expression matching correct class names. Overrides class-naming-style
228 | #class-rgx=
229 |
230 | # Naming style matching correct constant names
231 | const-naming-style=UPPER_CASE
232 |
233 | # Regular expression matching correct constant names. Overrides const-naming-
234 | # style
235 | #const-rgx=
236 |
237 | # Minimum line length for functions/classes that require docstrings, shorter
238 | # ones are exempt.
239 | docstring-min-length=-1
240 |
241 | # Naming style matching correct function names
242 | function-naming-style=snake_case
243 |
244 | # Regular expression matching correct function names. Overrides function-
245 | # naming-style
246 | #function-rgx=
247 |
248 | # Good variable names which should always be accepted, separated by a comma
249 | good-names=i,
250 | j,
251 | k,
252 | ex,
253 | Run,
254 | _
255 |
256 | # Include a hint for the correct naming format with invalid-name
257 | include-naming-hint=no
258 |
259 | # Naming style matching correct inline iteration names
260 | inlinevar-naming-style=any
261 |
262 | # Regular expression matching correct inline iteration names. Overrides
263 | # inlinevar-naming-style
264 | #inlinevar-rgx=
265 |
266 | # Naming style matching correct method names
267 | method-naming-style=snake_case
268 |
269 | # Regular expression matching correct method names. Overrides method-naming-
270 | # style
271 | #method-rgx=
272 |
273 | # Naming style matching correct module names
274 | module-naming-style=snake_case
275 |
276 | # Regular expression matching correct module names. Overrides module-naming-
277 | # style
278 | #module-rgx=
279 |
280 | # Colon-delimited sets of names that determine each other's naming style when
281 | # the name regexes allow several styles.
282 | name-group=
283 |
284 | # Regular expression which should only match function or class names that do
285 | # not require a docstring.
286 | no-docstring-rgx=^_
287 |
288 | # List of decorators that produce properties, such as abc.abstractproperty. Add
289 | # to this list to register other decorators that produce valid properties.
290 | property-classes=abc.abstractproperty
291 |
292 | # Naming style matching correct variable names
293 | variable-naming-style=snake_case
294 |
295 | # Regular expression matching correct variable names. Overrides variable-
296 | # naming-style
297 | #variable-rgx=
298 |
299 |
300 | [FORMAT]
301 |
302 | # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
303 | expected-line-ending-format=
304 |
305 | # Regexp for a line that is allowed to be longer than the limit.
306 | ignore-long-lines=^\s*(# )??$
307 |
308 | # Number of spaces of indent required inside a hanging or continued line.
309 | indent-after-paren=4
310 |
311 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
312 | # tab).
313 | indent-string=' '
314 |
315 | # Maximum number of characters on a single line.
316 | max-line-length=100
317 |
318 | # Maximum number of lines in a module
319 | max-module-lines=1000
320 |
321 | # List of optional constructs for which whitespace checking is disabled. `dict-
322 | # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
323 | # `trailing-comma` allows a space between comma and closing bracket: (a, ).
324 | # `empty-line` allows space-only lines.
325 | no-space-check=trailing-comma,
326 | dict-separator
327 |
328 | # Allow the body of a class to be on the same line as the declaration if body
329 | # contains single statement.
330 | single-line-class-stmt=no
331 |
332 | # Allow the body of an if to be on the same line as the test if there is no
333 | # else.
334 | single-line-if-stmt=no
335 |
336 |
337 | [LOGGING]
338 |
339 | # Logging modules to check that the string format arguments are in logging
340 | # function parameter format
341 | logging-modules=logging
342 |
343 |
344 | [MISCELLANEOUS]
345 |
346 | # List of note tags to take in consideration, separated by a comma.
347 | notes=FIXME,
348 | XXX,
349 |
350 |
351 | [SIMILARITIES]
352 |
353 | # Ignore comments when computing similarities.
354 | ignore-comments=yes
355 |
356 | # Ignore docstrings when computing similarities.
357 | ignore-docstrings=yes
358 |
359 | # Ignore imports when computing similarities.
360 | ignore-imports=no
361 |
362 | # Minimum lines number of a similarity.
363 | min-similarity-lines=4
364 |
365 |
366 | [SPELLING]
367 |
368 | # Limits count of emitted suggestions for spelling mistakes
369 | max-spelling-suggestions=4
370 |
371 | # Spelling dictionary name. Available dictionaries: none. To make it working
372 | # install python-enchant package.
373 | spelling-dict=
374 |
375 | # List of comma separated words that should not be checked.
376 | spelling-ignore-words=
377 |
378 | # A path to a file that contains private dictionary; one word per line.
379 | spelling-private-dict-file=
380 |
381 | # Tells whether to store unknown words to indicated private dictionary in
382 | # --spelling-private-dict-file option instead of raising a message.
383 | spelling-store-unknown-words=no
384 |
385 |
386 | [TYPECHECK]
387 |
388 | # List of decorators that produce context managers, such as
389 | # contextlib.contextmanager. Add to this list to register other decorators that
390 | # produce valid context managers.
391 | contextmanager-decorators=contextlib.contextmanager
392 |
393 | # List of members which are set dynamically and missed by pylint inference
394 | # system, and so shouldn't trigger E1101 when accessed. Python regular
395 | # expressions are accepted.
396 | generated-members=
397 |
398 | # Tells whether missing members accessed in mixin class should be ignored. A
399 | # mixin class is detected if its name ends with "mixin" (case insensitive).
400 | ignore-mixin-members=yes
401 |
402 | # This flag controls whether pylint should warn about no-member and similar
403 | # checks whenever an opaque object is returned when inferring. The inference
404 | # can return multiple potential results while evaluating a Python object, but
405 | # some branches might not be evaluated, which results in partial inference. In
406 | # that case, it might be useful to still emit no-member and other checks for
407 | # the rest of the inferred objects.
408 | ignore-on-opaque-inference=yes
409 |
410 | # List of class names for which member attributes should not be checked (useful
411 | # for classes with dynamically set attributes). This supports the use of
412 | # qualified names.
413 | ignored-classes=optparse.Values,thread._local,_thread._local
414 |
415 | # List of module names for which member attributes should not be checked
416 | # (useful for modules/projects where namespaces are manipulated during runtime
417 | # and thus existing member attributes cannot be deduced by static analysis. It
418 | # supports qualified module names, as well as Unix pattern matching.
419 | ignored-modules=
420 |
421 | # Show a hint with possible names when a member name was not found. The aspect
422 | # of finding the hint is based on edit distance.
423 | missing-member-hint=yes
424 |
425 | # The minimum edit distance a name should have in order to be considered a
426 | # similar match for a missing member name.
427 | missing-member-hint-distance=1
428 |
429 | # The total number of similar names that should be taken in consideration when
430 | # showing a hint for a missing member.
431 | missing-member-max-choices=1
432 |
433 |
434 | [VARIABLES]
435 |
436 | # List of additional names supposed to be defined in builtins. Remember that
437 | # you should avoid to define new builtins when possible.
438 | additional-builtins=
439 |
440 | # Tells whether unused global variables should be treated as a violation.
441 | allow-global-unused-variables=yes
442 |
443 | # List of strings which can identify a callback function by name. A callback
444 | # name must start or end with one of those strings.
445 | callbacks=cb_,
446 | _cb
447 |
448 | # A regular expression matching the name of dummy variables (i.e. expectedly
449 | # not used).
450 | dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
451 |
452 | # Argument names that match this expression will be ignored. Default to name
453 | # with leading underscore
454 | ignored-argument-names=_.*|^ignored_|^unused_
455 |
456 | # Tells whether we should check for unused import in __init__ files.
457 | init-import=no
458 |
459 | # List of qualified module names which can have objects that can redefine
460 | # builtins.
461 | redefining-builtins-modules=six.moves,past.builtins,future.builtins
462 |
463 |
464 | [CLASSES]
465 |
466 | # List of method names used to declare (i.e. assign) instance attributes.
467 | defining-attr-methods=__init__,
468 | __new__,
469 | setUp
470 |
471 | # List of member names, which should be excluded from the protected access
472 | # warning.
473 | exclude-protected=_asdict,
474 | _fields,
475 | _replace,
476 | _source,
477 | _make
478 |
479 | # List of valid names for the first argument in a class method.
480 | valid-classmethod-first-arg=cls
481 |
482 | # List of valid names for the first argument in a metaclass class method.
483 | valid-metaclass-classmethod-first-arg=mcs
484 |
485 |
486 | [DESIGN]
487 |
488 | # Maximum number of arguments for function / method
489 | max-args=5
490 |
491 | # Maximum number of attributes for a class (see R0902).
492 | max-attributes=7
493 |
494 | # Maximum number of boolean expressions in a if statement
495 | max-bool-expr=5
496 |
497 | # Maximum number of branch for function / method body
498 | max-branches=12
499 |
500 | # Maximum number of locals for function / method body
501 | max-locals=15
502 |
503 | # Maximum number of parents for a class (see R0901).
504 | max-parents=7
505 |
506 | # Maximum number of public methods for a class (see R0904).
507 | max-public-methods=20
508 |
509 | # Maximum number of return / yield for function / method body
510 | max-returns=6
511 |
512 | # Maximum number of statements in function / method body
513 | max-statements=50
514 |
515 | # Minimum number of public methods for a class (see R0903).
516 | min-public-methods=2
517 |
518 |
519 | [IMPORTS]
520 |
521 | # Allow wildcard imports from modules that define __all__.
522 | allow-wildcard-with-all=no
523 |
524 | # Analyse import fallback blocks. This can be used to support both Python 2 and
525 | # 3 compatible code, which means that the block might have code that exists
526 | # only in one or another interpreter, leading to false positives when analysed.
527 | analyse-fallback-blocks=no
528 |
529 | # Deprecated modules which should not be used, separated by a comma
530 | deprecated-modules=optparse,tkinter.tix
531 |
532 | # Create a graph of external dependencies in the given file (report RP0402 must
533 | # not be disabled)
534 | ext-import-graph=
535 |
536 | # Create a graph of every (i.e. internal and external) dependencies in the
537 | # given file (report RP0402 must not be disabled)
538 | import-graph=
539 |
540 | # Create a graph of internal dependencies in the given file (report RP0402 must
541 | # not be disabled)
542 | int-import-graph=
543 |
544 | # Force import order to recognize a module as part of the standard
545 | # compatibility libraries.
546 | known-standard-library=
547 |
548 | # Force import order to recognize a module as part of a third party library.
549 | known-third-party=enchant
550 |
551 |
552 | [EXCEPTIONS]
553 |
554 | # Exceptions that will emit a warning when being caught. Defaults to
555 | # "Exception"
556 | overgeneral-exceptions=Exception
557 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log for dash-devextreme
2 | All notable changes to this project will be documented in this file.
3 | This project adheres to [Semantic Versioning](http://semver.org/).
4 |
5 | ## Unreleased
6 |
7 | ### Added
8 | - Feature x
9 |
10 | ### Fixed
11 | - Bug y
12 |
13 | ## 0.0.1 - 2018-06-05
14 | - Initial release
15 |
16 | [Unreleased]: https://github.com/pikhovkin/dash-devextreme/v0.0.1...HEAD
17 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # CONTRIBUTING
2 |
3 | This project was generated by the [dash-component-boilerplate](https://github.com/plotly/dash-component-boilerplate) it contains the minimal set of code required to create your own custom Dash component.
4 |
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pikhovkin/dash-devextreme/f2529646b95adf80629a7350ba161d6840ed8251/LICENSE
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include dash_devextreme/dash_devextreme.min.js
2 | include dash_devextreme/dash_devextreme.dev.js
3 | include dash_devextreme/metadata.json
4 | include dash_devextreme/package.json
5 | include README.md
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # dash-devextreme
2 |
3 | [](https://pypi.org/project/dash-devextreme/)
4 | 
5 | [](https://www.npmjs.com/package/dash-devextreme)
6 | [](./LICENSE)
7 |
8 | Wrapper of [DevExtreme][] components for Plotly [Dash][]
9 |
10 |
11 | ### Installation
12 |
13 | ```bash
14 | $ pip install dash_devextreme
15 | ```
16 |
17 | ### Usage
18 |
19 | ```python
20 | import dash
21 | import dash_devextreme as ddx
22 | import dash_html_components as html
23 |
24 |
25 | data = [
26 | {'id': 1, 'name': 'Sales', 'text': 'abc'},
27 | {'id': 2, 'parent_id': 1, 'name': 'Sales 1', 'text': 'abc'},
28 | {'id': 3, 'parent_id': 1, 'name': 'Sales 2', 'text': 'abc'},
29 | {'id': 4, 'name': 'Developers', 'text': 'abc'},
30 | {'id': 5, 'parent_id': 4, 'name': 'Dev 1', 'text': 'abc'},
31 | ]
32 |
33 | app = dash.Dash('')
34 | app.scripts.config.serve_locally = True
35 |
36 | app.layout = html.Div(children=[
37 | ddx.TreeList(
38 | dataSource=data,
39 | columns=[
40 | {'dataField': 'name', 'width': 290},
41 | {'dataField': 'text'},
42 | ],
43 | keyExpr='id',
44 | parentIdExpr='parent_id',
45 | width='100%'
46 | )
47 | ])
48 |
49 |
50 | if __name__ == '__main__':
51 | app.run_server(debug=True)
52 | ```
53 |
54 | ### Dash
55 |
56 | Go to this link to learn about [Dash][].
57 |
58 | See the [dash-component-boilerplate][] repo for more information.
59 |
60 | ### License
61 |
62 | MIT
63 |
64 | [DevExtreme]: https://js.devexpress.com/
65 | [Dash]: https://github.com/plotly/dash
66 | [dash-component-boilerplate]: https://github.com/plotly/dash-component-boilerplate
67 |
--------------------------------------------------------------------------------
/_validate_init.py:
--------------------------------------------------------------------------------
1 | """
2 | DO NOT MODIFY
3 | This file is used to validate your publish settings.
4 | """
5 | from __future__ import print_function
6 |
7 | import os
8 | import sys
9 | import importlib
10 |
11 |
12 | components_package = 'dash_devextreme'
13 |
14 | components_lib = importlib.import_module(components_package)
15 |
16 | missing_dist_msg = 'Warning {} was not found in `{}.__init__.{}`!!!'
17 | missing_manifest_msg = '''
18 | Warning {} was not found in `MANIFEST.in`!
19 | It will not be included in the build!
20 | '''
21 |
22 | with open('MANIFEST.in', 'r') as f:
23 | manifest = f.read()
24 |
25 |
26 | def check_dist(dist, filename):
27 | # Support the dev bundle.
28 | if filename.endswith('dev.js'):
29 | return True
30 |
31 | return any(
32 | filename in x
33 | for d in dist
34 | for x in (
35 | [d.get('relative_package_path')]
36 | if not isinstance(d.get('relative_package_path'), list)
37 | else d.get('relative_package_path')
38 | )
39 | )
40 |
41 |
42 | def check_manifest(filename):
43 | return filename in manifest
44 |
45 |
46 | def check_file(dist, filename):
47 | if not check_dist(dist, filename):
48 | print(
49 | missing_dist_msg.format(filename, components_package, '_js_dist'),
50 | file=sys.stderr
51 | )
52 | if not check_manifest(filename):
53 | print(missing_manifest_msg.format(filename),
54 | file=sys.stderr)
55 |
56 |
57 | for cur, _, files in os.walk(components_package):
58 | for f in files:
59 |
60 | if f.endswith('js'):
61 | # noinspection PyProtectedMember
62 | check_file(components_lib._js_dist, f)
63 | elif f.endswith('css'):
64 | # noinspection PyProtectedMember
65 | check_file(components_lib._css_dist, f)
66 | elif not f.endswith('py'):
67 | check_manifest(f)
68 |
--------------------------------------------------------------------------------
/advanced_usage.py:
--------------------------------------------------------------------------------
1 | import dash
2 | from dash.dependencies import Input, Output
3 | import dash_html_components as html
4 |
5 | import dash_devextreme as ddx
6 |
7 |
8 | data = [
9 | dict(id=1, parent_id=None, dept='Sales', director='Anna'),
10 | dict(id=2, parent_id=1, dept='Sales 1', director='Bella'),
11 | dict(id=3, parent_id=1, dept='Sales 2', director='Ganna'),
12 | dict(id=4, parent_id=None, dept='Developers', director='Donna'),
13 | dict(id=5, parent_id=4, dept='Developers N', director='Elly'),
14 | ]
15 | columns = [
16 | dict(caption='Department', dataField='dept', cellTemplate='dept_tree'),
17 | dict(caption='Director', dataField='director'),
18 | ]
19 | columns_table = [
20 | dict(caption='Department', dataField='dept', cellTemplate='dept_table'),
21 | dict(caption='Director', dataField='director'),
22 | ]
23 |
24 | pieDataSource = [
25 | {'language': 'English', 'percent': 55.5},
26 | {'language': 'Chinese', 'percent': 4.0},
27 | {'language': 'Spanish', 'percent': 4.3},
28 | {'language': 'Japanese', 'percent': 4.9},
29 | {'language': 'Portuguese', 'percent': 2.3},
30 | {'language': 'German', 'percent': 5.6},
31 | {'language': 'French', 'percent': 3.8},
32 | {'language': 'Russian', 'percent': 6.3},
33 | {'language': 'Italian', 'percent': 1.6},
34 | {'language': 'Polish', 'percent': 1.8}
35 | ]
36 |
37 | pieExportImportDataSource = [
38 | {'Country': 'Brazil', 'Export': 243, 'Import': 233},
39 | {'Country': 'Russia', 'Export': 529, 'Import': 335},
40 | {'Country': 'India','Export': 293,'Import': 489},
41 | {'Country': 'China', 'Export': 2049, 'Import': 1818},
42 | {'Country': 'Japan', 'Export': 799, 'Import': 886},
43 | {'Country': 'USA', 'Export': 1547, 'Import': 2335},
44 | {'Country': 'Canada', 'Export': 455, 'Import': 475},
45 | {'Country': 'France', 'Export': 569, 'Import': 674},
46 | {'Country': 'England', 'Export': 468, 'Import': 680},
47 | {'Country': 'Germany', 'Export': 1407, 'Import': 1167}
48 | ]
49 |
50 | _default_index = '''
51 |
52 |
53 | {%metas%}
54 | {%title%}
55 | {%favicon%}
56 | {%css%}
57 |
58 |
59 |
60 |
61 | {%app_entry%}
62 |
108 |
109 | '''
110 |
111 |
112 | app = dash.Dash(__name__, index_string=_default_index)
113 | app.scripts.config.serve_locally = True
114 | app.css.config.serve_locally = True
115 |
116 | app.layout = html.Div([
117 | ddx.TextBox(
118 | id='input',
119 | value='my-value',
120 | valueChangeEvent='input'
121 | ),
122 | html.Div(id='output'),
123 | ddx.TreeList(dataSource=data, columns=columns, keyExpr='id', parentIdExpr='parent_id'),
124 | ddx.DataGrid(dataSource=data, columns=columns_table),
125 | ddx.TabPanel(items=data, itemTitleTemplate='tp_title', itemTemplate='tp_panel'),
126 | ddx.PieChart(
127 | type='pie',
128 | palette='Soft Pastel',
129 | title='Top Internet Languages',
130 | dataSource=pieDataSource,
131 | legend=dict(horizontalAlignment='center', verticalAlignment='bottom'),
132 | # export=dict(enabled=True),
133 | series=dict(
134 | smallValuesGrouping=dict(mode='topN', topCount=3),
135 | argumentField='language',
136 | valueField='percent',
137 | label=dict(
138 | visible=True,
139 | format='fixedPoint',
140 | customizeText='pie_chart',
141 | connector=dict(visible=True, width=1)
142 | )
143 | )
144 | ),
145 | ddx.PieChart(
146 | type='doughnut',
147 | palette='ocean',
148 | title=dict(
149 | text='Imports/Exports of Goods and Services',
150 | subtitle=dict(
151 | text='(billion US$, 2012)'
152 | )
153 | ),
154 | dataSource=pieExportImportDataSource,
155 | legend=dict(visible=True),
156 | commonSeriesSettings=dict(
157 | label=dict(visible=False)
158 | ),
159 | # export=dict(enabled=True),
160 | series=[
161 | dict(
162 | name='Export',
163 | smallValuesGrouping=dict(mode='topN', topCount=3),
164 | argumentField='Country',
165 | valueField='Export',
166 | label=dict(
167 | visible=True,
168 | format='fixedPoint',
169 | customizeText='doughnut_chart',
170 | connector=dict(visible=True, width=1)
171 | )
172 | ),
173 | dict(
174 | name='Import',
175 | smallValuesGrouping=dict(mode='topN', topCount=3),
176 | argumentField='Country',
177 | valueField='Import',
178 | label=dict(
179 | visible=True,
180 | format='fixedPoint',
181 | customizeText='doughnut_chart',
182 | connector=dict(visible=True, width=1)
183 | )
184 | )
185 | ]
186 | )
187 | ])
188 |
189 | @app.callback(Output('output', 'children'), [Input('input', 'value')])
190 | def display_output(value):
191 | return 'You have entered {}'.format(value)
192 |
193 |
194 | if __name__ == '__main__':
195 | app.run_server(debug=True)
196 |
--------------------------------------------------------------------------------
/dash_devextreme/CheckBox.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class CheckBox(Component):
7 | """A CheckBox component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
12 | - accessKey (string; optional)
13 | - activeStateEnabled (boolean; optional)
14 | - disabled (boolean; optional)
15 | - elementAttr (dict; optional)
16 | - focusStateEnabled (boolean; optional)
17 | - height (number | string; optional)
18 | - hint (string; optional)
19 | - hoverStateEnabled (boolean; optional)
20 | - isValid (boolean; optional)
21 | - name (string; optional)
22 | - readOnly (boolean; optional)
23 | - rtlEnabled (boolean; optional)
24 | - tabIndex (number; optional)
25 | - text (string; optional)
26 | - validationError (dict; optional)
27 | - validationMessageMode (a value equal to: 'always', 'auto'; optional)
28 | - value (boolean; optional)
29 | - visible (boolean; optional)
30 | - width (number | string; optional)
31 |
32 | Available events: 'change'"""
33 | @_explicitize_args
34 | def __init__(self, id=Component.UNDEFINED, accessKey=Component.UNDEFINED, activeStateEnabled=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, height=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, isValid=Component.UNDEFINED, name=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onValueChanged=Component.UNDEFINED, readOnly=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, tabIndex=Component.UNDEFINED, text=Component.UNDEFINED, validationError=Component.UNDEFINED, validationMessageMode=Component.UNDEFINED, value=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
35 | self._prop_names = ['id', 'accessKey', 'activeStateEnabled', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'isValid', 'name', 'readOnly', 'rtlEnabled', 'tabIndex', 'text', 'validationError', 'validationMessageMode', 'value', 'visible', 'width']
36 | self._type = 'CheckBox'
37 | self._namespace = 'dash_devextreme'
38 | self._valid_wildcard_attributes = []
39 | self.available_events = ['change']
40 | self.available_properties = ['id', 'accessKey', 'activeStateEnabled', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'isValid', 'name', 'readOnly', 'rtlEnabled', 'tabIndex', 'text', 'validationError', 'validationMessageMode', 'value', 'visible', 'width']
41 | self.available_wildcard_properties = []
42 |
43 | _explicit_args = kwargs.pop('_explicit_args')
44 | _locals = locals()
45 | _locals.update(kwargs) # For wildcard attrs
46 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
47 |
48 | for k in []:
49 | if k not in args:
50 | raise TypeError(
51 | 'Required argument `' + k + '` was not specified.')
52 | super(CheckBox, self).__init__(**args)
53 |
54 | def __repr__(self):
55 | if(any(getattr(self, c, None) is not None
56 | for c in self._prop_names
57 | if c is not self._prop_names[0])
58 | or any(getattr(self, c, None) is not None
59 | for c in self.__dict__.keys()
60 | if any(c.startswith(wc_attr)
61 | for wc_attr in self._valid_wildcard_attributes))):
62 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
63 | for c in self._prop_names
64 | if getattr(self, c, None) is not None])
65 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
66 | for c in self.__dict__.keys()
67 | if any([c.startswith(wc_attr)
68 | for wc_attr in
69 | self._valid_wildcard_attributes])])
70 | return ('CheckBox(' + props_string +
71 | (', ' + wilds_string if wilds_string != '' else '') + ')')
72 | else:
73 | return (
74 | 'CheckBox(' +
75 | repr(getattr(self, self._prop_names[0], None)) + ')')
76 |
--------------------------------------------------------------------------------
/dash_devextreme/DataGrid.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class DataGrid(Component):
7 | """A DataGrid component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional)
12 | - accessKey (string; optional)
13 | - activeStateEnabled (boolean; optional)
14 | - allowColumnReordering (boolean; optional)
15 | - allowColumnResizing (boolean; optional)
16 | - cacheEnabled (boolean; optional)
17 | - cellHintEnabled (boolean; optional)
18 | - columnAutoWidth (boolean; optional)
19 | - columnChooser (dict; optional)
20 | - columnFixing (dict; optional)
21 | - columnHidingEnabled (boolean; optional)
22 | - columnMinWidth (number; optional)
23 | - columnResizingMode (a value equal to: 'nextColumn', 'widget'; optional)
24 | - columns (list; optional)
25 | - columnWidth (number; optional)
26 | - dataSource (dict | list; optional)
27 | - dateSerializationFormat (string; optional)
28 | - disabled (boolean; optional)
29 | - editing (dict; optional)
30 | - elementAttr (dict; optional)
31 | - errorRowEnabled (boolean; optional)
32 | - export (dict; optional)
33 | - filterBuilder (dict; optional)
34 | - filterBuilderPopup (dict; optional)
35 | - filterPanel (dict; optional)
36 | - filterRow (dict; optional)
37 | - filterSyncEnabled (boolean; optional)
38 | - filterValue (dict; optional)
39 | - focusedColumnIndex (number; optional)
40 | - focusedRowEnabled (boolean; optional)
41 | - focusedRowIndex (number; optional)
42 | - focusedRowKey (boolean | number | string | dict | list; optional)
43 | - focusStateEnabled (boolean; optional)
44 | - grouping (dict; optional)
45 | - groupPanel (dict; optional)
46 | - headerFilter (dict; optional)
47 | - height (number | string; optional)
48 | - highlightChanges (boolean; optional)
49 | - hint (string; optional)
50 | - hoverStateEnabled (boolean; optional)
51 | - keyExpr (string | list; optional)
52 | - loadPanel (dict; optional)
53 | - masterDetail (dict; optional)
54 | - noDataText (string; optional)
55 | - onCellClick (string; optional)
56 | - onRowClick (string; optional)
57 | - pager (dict; optional)
58 | - paging (dict; optional)
59 | - remoteOperations (boolean | dict; optional)
60 | - renderAsync (boolean; optional)
61 | - repaintChangesOnly (boolean; optional)
62 | - rowAlternationEnabled (boolean; optional)
63 | - rowTemplate (string; optional)
64 | - rtlEnabled (boolean; optional)
65 | - scrolling (dict; optional)
66 | - searchPanel (dict; optional)
67 | - selectedRowKeys (list; optional)
68 | - selection (dict; optional)
69 | - selectionFilter (list; optional)
70 | - showBorders (boolean; optional)
71 | - showColumnHeaders (boolean; optional)
72 | - showColumnLines (boolean; optional)
73 | - showRowLines (boolean; optional)
74 | - sortByGroupSummaryInfo (list; optional)
75 | - sorting (dict; optional)
76 | - stateStoring (dict; optional)
77 | - summary (dict; optional)
78 | - tabIndex (number; optional)
79 | - twoWayBindingEnabled (boolean; optional)
80 | - visible (boolean; optional)
81 | - width (number | string; optional)
82 | - wordWrapEnabled (boolean; optional)
83 |
84 | Available events: """
85 | @_explicitize_args
86 | def __init__(self, id=Component.UNDEFINED, accessKey=Component.UNDEFINED, activeStateEnabled=Component.UNDEFINED, allowColumnReordering=Component.UNDEFINED, allowColumnResizing=Component.UNDEFINED, cacheEnabled=Component.UNDEFINED, cellHintEnabled=Component.UNDEFINED, columnAutoWidth=Component.UNDEFINED, columnChooser=Component.UNDEFINED, columnFixing=Component.UNDEFINED, columnHidingEnabled=Component.UNDEFINED, columnMinWidth=Component.UNDEFINED, columnResizingMode=Component.UNDEFINED, columns=Component.UNDEFINED, columnWidth=Component.UNDEFINED, customizeColumns=Component.UNDEFINED, customizeExportData=Component.UNDEFINED, dataSource=Component.UNDEFINED, dateSerializationFormat=Component.UNDEFINED, disabled=Component.UNDEFINED, editing=Component.UNDEFINED, elementAttr=Component.UNDEFINED, errorRowEnabled=Component.UNDEFINED, export=Component.UNDEFINED, filterBuilder=Component.UNDEFINED, filterBuilderPopup=Component.UNDEFINED, filterPanel=Component.UNDEFINED, filterRow=Component.UNDEFINED, filterSyncEnabled=Component.UNDEFINED, filterValue=Component.UNDEFINED, focusedColumnIndex=Component.UNDEFINED, focusedRowEnabled=Component.UNDEFINED, focusedRowIndex=Component.UNDEFINED, focusedRowKey=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, grouping=Component.UNDEFINED, groupPanel=Component.UNDEFINED, headerFilter=Component.UNDEFINED, height=Component.UNDEFINED, highlightChanges=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, keyExpr=Component.UNDEFINED, loadPanel=Component.UNDEFINED, masterDetail=Component.UNDEFINED, noDataText=Component.UNDEFINED, onAdaptiveDetailRowPreparing=Component.UNDEFINED, onCellClick=Component.UNDEFINED, onCellHoverChanged=Component.UNDEFINED, onCellPrepared=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onContextMenuPreparing=Component.UNDEFINED, onDataErrorOccurred=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onEditingStart=Component.UNDEFINED, onEditorPrepared=Component.UNDEFINED, onEditorPreparing=Component.UNDEFINED, onExported=Component.UNDEFINED, onExporting=Component.UNDEFINED, onFileSaving=Component.UNDEFINED, onFocusedCellChanged=Component.UNDEFINED, onFocusedCellChanging=Component.UNDEFINED, onFocusedRowChanged=Component.UNDEFINED, onFocusedRowChanging=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onInitNewRow=Component.UNDEFINED, onKeyDown=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onRowClick=Component.UNDEFINED, onRowCollapsed=Component.UNDEFINED, onRowCollapsing=Component.UNDEFINED, onRowExpanded=Component.UNDEFINED, onRowExpanding=Component.UNDEFINED, onRowInserted=Component.UNDEFINED, onRowInserting=Component.UNDEFINED, onRowPrepared=Component.UNDEFINED, onRowRemoved=Component.UNDEFINED, onRowRemoving=Component.UNDEFINED, onRowUpdated=Component.UNDEFINED, onRowUpdating=Component.UNDEFINED, onRowValidating=Component.UNDEFINED, onSelectionChanged=Component.UNDEFINED, onToolbarPreparing=Component.UNDEFINED, pager=Component.UNDEFINED, paging=Component.UNDEFINED, remoteOperations=Component.UNDEFINED, renderAsync=Component.UNDEFINED, repaintChangesOnly=Component.UNDEFINED, rowAlternationEnabled=Component.UNDEFINED, rowTemplate=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, scrolling=Component.UNDEFINED, searchPanel=Component.UNDEFINED, selectedRowKeys=Component.UNDEFINED, selection=Component.UNDEFINED, selectionFilter=Component.UNDEFINED, showBorders=Component.UNDEFINED, showColumnHeaders=Component.UNDEFINED, showColumnLines=Component.UNDEFINED, showRowLines=Component.UNDEFINED, sortByGroupSummaryInfo=Component.UNDEFINED, sorting=Component.UNDEFINED, stateStoring=Component.UNDEFINED, summary=Component.UNDEFINED, tabIndex=Component.UNDEFINED, twoWayBindingEnabled=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, wordWrapEnabled=Component.UNDEFINED, **kwargs):
87 | self._prop_names = ['id', 'accessKey', 'activeStateEnabled', 'allowColumnReordering', 'allowColumnResizing', 'cacheEnabled', 'cellHintEnabled', 'columnAutoWidth', 'columnChooser', 'columnFixing', 'columnHidingEnabled', 'columnMinWidth', 'columnResizingMode', 'columns', 'columnWidth', 'dataSource', 'dateSerializationFormat', 'disabled', 'editing', 'elementAttr', 'errorRowEnabled', 'export', 'filterBuilder', 'filterBuilderPopup', 'filterPanel', 'filterRow', 'filterSyncEnabled', 'filterValue', 'focusedColumnIndex', 'focusedRowEnabled', 'focusedRowIndex', 'focusedRowKey', 'focusStateEnabled', 'grouping', 'groupPanel', 'headerFilter', 'height', 'highlightChanges', 'hint', 'hoverStateEnabled', 'keyExpr', 'loadPanel', 'masterDetail', 'noDataText', 'onCellClick', 'onRowClick', 'pager', 'paging', 'remoteOperations', 'renderAsync', 'repaintChangesOnly', 'rowAlternationEnabled', 'rowTemplate', 'rtlEnabled', 'scrolling', 'searchPanel', 'selectedRowKeys', 'selection', 'selectionFilter', 'showBorders', 'showColumnHeaders', 'showColumnLines', 'showRowLines', 'sortByGroupSummaryInfo', 'sorting', 'stateStoring', 'summary', 'tabIndex', 'twoWayBindingEnabled', 'visible', 'width', 'wordWrapEnabled']
88 | self._type = 'DataGrid'
89 | self._namespace = 'dash_devextreme'
90 | self._valid_wildcard_attributes = []
91 | self.available_events = []
92 | self.available_properties = ['id', 'accessKey', 'activeStateEnabled', 'allowColumnReordering', 'allowColumnResizing', 'cacheEnabled', 'cellHintEnabled', 'columnAutoWidth', 'columnChooser', 'columnFixing', 'columnHidingEnabled', 'columnMinWidth', 'columnResizingMode', 'columns', 'columnWidth', 'dataSource', 'dateSerializationFormat', 'disabled', 'editing', 'elementAttr', 'errorRowEnabled', 'export', 'filterBuilder', 'filterBuilderPopup', 'filterPanel', 'filterRow', 'filterSyncEnabled', 'filterValue', 'focusedColumnIndex', 'focusedRowEnabled', 'focusedRowIndex', 'focusedRowKey', 'focusStateEnabled', 'grouping', 'groupPanel', 'headerFilter', 'height', 'highlightChanges', 'hint', 'hoverStateEnabled', 'keyExpr', 'loadPanel', 'masterDetail', 'noDataText', 'onCellClick', 'onRowClick', 'pager', 'paging', 'remoteOperations', 'renderAsync', 'repaintChangesOnly', 'rowAlternationEnabled', 'rowTemplate', 'rtlEnabled', 'scrolling', 'searchPanel', 'selectedRowKeys', 'selection', 'selectionFilter', 'showBorders', 'showColumnHeaders', 'showColumnLines', 'showRowLines', 'sortByGroupSummaryInfo', 'sorting', 'stateStoring', 'summary', 'tabIndex', 'twoWayBindingEnabled', 'visible', 'width', 'wordWrapEnabled']
93 | self.available_wildcard_properties = []
94 |
95 | _explicit_args = kwargs.pop('_explicit_args')
96 | _locals = locals()
97 | _locals.update(kwargs) # For wildcard attrs
98 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
99 |
100 | for k in []:
101 | if k not in args:
102 | raise TypeError(
103 | 'Required argument `' + k + '` was not specified.')
104 | super(DataGrid, self).__init__(**args)
105 |
106 | def __repr__(self):
107 | if(any(getattr(self, c, None) is not None
108 | for c in self._prop_names
109 | if c is not self._prop_names[0])
110 | or any(getattr(self, c, None) is not None
111 | for c in self.__dict__.keys()
112 | if any(c.startswith(wc_attr)
113 | for wc_attr in self._valid_wildcard_attributes))):
114 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
115 | for c in self._prop_names
116 | if getattr(self, c, None) is not None])
117 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
118 | for c in self.__dict__.keys()
119 | if any([c.startswith(wc_attr)
120 | for wc_attr in
121 | self._valid_wildcard_attributes])])
122 | return ('DataGrid(' + props_string +
123 | (', ' + wilds_string if wilds_string != '' else '') + ')')
124 | else:
125 | return (
126 | 'DataGrid(' +
127 | repr(getattr(self, self._prop_names[0], None)) + ')')
128 |
--------------------------------------------------------------------------------
/dash_devextreme/PieChart.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class PieChart(Component):
7 | """A PieChart component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
12 | - adaptiveLayout (dict; optional)
13 | - animation (dict | boolean; optional)
14 | - commonSeriesSettings (dict; optional)
15 | - dataSource (list | dict | string; optional)
16 | - diameter (number; optional)
17 | - disabled (boolean; optional)
18 | - elementAttr (dict; optional)
19 | - export (dict; optional)
20 | - innerRadius (number; optional)
21 | - legend (dict; optional)
22 | - loadingIndicator (dict; optional)
23 | - margin (dict; optional)
24 | - minDiameter (number; optional)
25 | - onLegendClick (string; optional)
26 | - onPointClick (string; optional)
27 | - palette (list | a value equal to: 'Bright', 'Harmony Light', 'Ocean', 'Pastel', 'Soft', 'Soft Pastel', 'Vintage', 'Violet', 'Carmine', 'Dark Moon', 'Dark Violet', 'Green Mist', 'Soft Blue', 'Material', 'Office'; optional)
28 | - paletteExtensionMode (a value equal to: 'alternate', 'blend', 'extrapolate'; optional)
29 | - pathModified (boolean; optional)
30 | - pointSelectionMode (a value equal to: 'multiple', 'single'; optional)
31 | - redrawOnResize (boolean; optional)
32 | - resolveLabelOverlapping (a value equal to: 'hide', 'none', 'shift'; optional)
33 | - rtlEnabled (boolean; optional)
34 | - segmentsDirection (a value equal to: 'anticlockwise', 'clockwise'; optional)
35 | - series (dict | list; optional)
36 | - seriesTemplate (dict; optional)
37 | - size (dict; optional)
38 | - sizeGroup (string; optional)
39 | - startAngle (number; optional)
40 | - theme (a value equal to: 'generic.dark', 'generic.light', 'generic.contrast', 'ios7.default', 'generic.carmine', 'generic.darkmoon', 'generic.darkviolet', 'generic.greenmist', 'generic.softblue', 'material.blue.light', 'material.lime.light', 'material.orange.light', 'material.purple.light', 'material.teal.light'; optional)
41 | - title (dict | string; optional)
42 | - tooltip (dict; optional)
43 | - type (a value equal to: 'donut', 'doughnut', 'pie'; optional)
44 |
45 | Available events: """
46 | @_explicitize_args
47 | def __init__(self, id=Component.UNDEFINED, adaptiveLayout=Component.UNDEFINED, animation=Component.UNDEFINED, commonSeriesSettings=Component.UNDEFINED, customizeLabel=Component.UNDEFINED, customizePoint=Component.UNDEFINED, dataSource=Component.UNDEFINED, diameter=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, export=Component.UNDEFINED, innerRadius=Component.UNDEFINED, legend=Component.UNDEFINED, loadingIndicator=Component.UNDEFINED, margin=Component.UNDEFINED, minDiameter=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onDone=Component.UNDEFINED, onDrawn=Component.UNDEFINED, onExported=Component.UNDEFINED, onExporting=Component.UNDEFINED, onFileSaving=Component.UNDEFINED, onIncidentOccurred=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onLegendClick=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onPointClick=Component.UNDEFINED, onPointHoverChanged=Component.UNDEFINED, onPointSelectionChanged=Component.UNDEFINED, onTooltipHidden=Component.UNDEFINED, onTooltipShown=Component.UNDEFINED, palette=Component.UNDEFINED, paletteExtensionMode=Component.UNDEFINED, pathModified=Component.UNDEFINED, pointSelectionMode=Component.UNDEFINED, redrawOnResize=Component.UNDEFINED, resolveLabelOverlapping=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, segmentsDirection=Component.UNDEFINED, series=Component.UNDEFINED, seriesTemplate=Component.UNDEFINED, size=Component.UNDEFINED, sizeGroup=Component.UNDEFINED, startAngle=Component.UNDEFINED, theme=Component.UNDEFINED, title=Component.UNDEFINED, tooltip=Component.UNDEFINED, type=Component.UNDEFINED, **kwargs):
48 | self._prop_names = ['id', 'adaptiveLayout', 'animation', 'commonSeriesSettings', 'dataSource', 'diameter', 'disabled', 'elementAttr', 'export', 'innerRadius', 'legend', 'loadingIndicator', 'margin', 'minDiameter', 'onLegendClick', 'onPointClick', 'palette', 'paletteExtensionMode', 'pathModified', 'pointSelectionMode', 'redrawOnResize', 'resolveLabelOverlapping', 'rtlEnabled', 'segmentsDirection', 'series', 'seriesTemplate', 'size', 'sizeGroup', 'startAngle', 'theme', 'title', 'tooltip', 'type']
49 | self._type = 'PieChart'
50 | self._namespace = 'dash_devextreme'
51 | self._valid_wildcard_attributes = []
52 | self.available_events = []
53 | self.available_properties = ['id', 'adaptiveLayout', 'animation', 'commonSeriesSettings', 'dataSource', 'diameter', 'disabled', 'elementAttr', 'export', 'innerRadius', 'legend', 'loadingIndicator', 'margin', 'minDiameter', 'onLegendClick', 'onPointClick', 'palette', 'paletteExtensionMode', 'pathModified', 'pointSelectionMode', 'redrawOnResize', 'resolveLabelOverlapping', 'rtlEnabled', 'segmentsDirection', 'series', 'seriesTemplate', 'size', 'sizeGroup', 'startAngle', 'theme', 'title', 'tooltip', 'type']
54 | self.available_wildcard_properties = []
55 |
56 | _explicit_args = kwargs.pop('_explicit_args')
57 | _locals = locals()
58 | _locals.update(kwargs) # For wildcard attrs
59 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
60 |
61 | for k in []:
62 | if k not in args:
63 | raise TypeError(
64 | 'Required argument `' + k + '` was not specified.')
65 | super(PieChart, self).__init__(**args)
66 |
67 | def __repr__(self):
68 | if(any(getattr(self, c, None) is not None
69 | for c in self._prop_names
70 | if c is not self._prop_names[0])
71 | or any(getattr(self, c, None) is not None
72 | for c in self.__dict__.keys()
73 | if any(c.startswith(wc_attr)
74 | for wc_attr in self._valid_wildcard_attributes))):
75 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
76 | for c in self._prop_names
77 | if getattr(self, c, None) is not None])
78 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
79 | for c in self.__dict__.keys()
80 | if any([c.startswith(wc_attr)
81 | for wc_attr in
82 | self._valid_wildcard_attributes])])
83 | return ('PieChart(' + props_string +
84 | (', ' + wilds_string if wilds_string != '' else '') + ')')
85 | else:
86 | return (
87 | 'PieChart(' +
88 | repr(getattr(self, self._prop_names[0], None)) + ')')
89 |
--------------------------------------------------------------------------------
/dash_devextreme/PivotGrid.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class PivotGrid(Component):
7 | """A PivotGrid component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional)
12 | - dataSource (dict; optional)
13 |
14 | Available events: """
15 | @_explicitize_args
16 | def __init__(self, id=Component.UNDEFINED, dataSource=Component.UNDEFINED, **kwargs):
17 | self._prop_names = ['id', 'dataSource']
18 | self._type = 'PivotGrid'
19 | self._namespace = 'dash_devextreme'
20 | self._valid_wildcard_attributes = []
21 | self.available_events = []
22 | self.available_properties = ['id', 'dataSource']
23 | self.available_wildcard_properties = []
24 |
25 | _explicit_args = kwargs.pop('_explicit_args')
26 | _locals = locals()
27 | _locals.update(kwargs) # For wildcard attrs
28 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
29 |
30 | for k in []:
31 | if k not in args:
32 | raise TypeError(
33 | 'Required argument `' + k + '` was not specified.')
34 | super(PivotGrid, self).__init__(**args)
35 |
36 | def __repr__(self):
37 | if(any(getattr(self, c, None) is not None
38 | for c in self._prop_names
39 | if c is not self._prop_names[0])
40 | or any(getattr(self, c, None) is not None
41 | for c in self.__dict__.keys()
42 | if any(c.startswith(wc_attr)
43 | for wc_attr in self._valid_wildcard_attributes))):
44 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
45 | for c in self._prop_names
46 | if getattr(self, c, None) is not None])
47 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
48 | for c in self.__dict__.keys()
49 | if any([c.startswith(wc_attr)
50 | for wc_attr in
51 | self._valid_wildcard_attributes])])
52 | return ('PivotGrid(' + props_string +
53 | (', ' + wilds_string if wilds_string != '' else '') + ')')
54 | else:
55 | return (
56 | 'PivotGrid(' +
57 | repr(getattr(self, self._prop_names[0], None)) + ')')
58 |
--------------------------------------------------------------------------------
/dash_devextreme/Popover.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class Popover(Component):
7 | """A Popover component.
8 |
9 |
10 | Keyword arguments:
11 | - children (a list of or a singular dash component, string or number; optional)
12 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
13 | - animation (dict; optional)
14 | - closeOnBackButton (boolean; optional)
15 | - closeOnOutsideClick (boolean; optional)
16 | - container (string; optional)
17 | - deferRendering (boolean; optional)
18 | - disabled (boolean; optional)
19 | - elementAttr (dict; optional)
20 | - height (number | string; optional)
21 | - hideEvent (dict | string; optional)
22 | - hint (string; optional)
23 | - hoverStateEnabled (boolean; optional)
24 | - maxHeight (number | string; optional)
25 | - maxWidth (number | string; optional)
26 | - minHeight (number | string; optional)
27 | - minWidth (number | string; optional)
28 | - position (a value equal to: 'bottom', 'left', 'right', 'top' | dict; optional)
29 | - rtlEnabled (boolean; optional)
30 | - shading (boolean; optional)
31 | - shadingColor (string; optional)
32 | - showCloseButton (boolean; optional)
33 | - showEvent (dict | string; optional)
34 | - showTitle (boolean; optional)
35 | - target (string; optional)
36 | - title (string; optional)
37 | - titleTemplate (string; optional)
38 | - toolbarItems (list; optional)
39 | - visible (boolean; optional)
40 | - width (number | string; optional)
41 |
42 | Available events: """
43 | @_explicitize_args
44 | def __init__(self, children=None, id=Component.UNDEFINED, animation=Component.UNDEFINED, closeOnBackButton=Component.UNDEFINED, closeOnOutsideClick=Component.UNDEFINED, container=Component.UNDEFINED, deferRendering=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, height=Component.UNDEFINED, hideEvent=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, maxHeight=Component.UNDEFINED, maxWidth=Component.UNDEFINED, minHeight=Component.UNDEFINED, minWidth=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onHidden=Component.UNDEFINED, onHiding=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onShowing=Component.UNDEFINED, onShown=Component.UNDEFINED, position=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, shading=Component.UNDEFINED, shadingColor=Component.UNDEFINED, showCloseButton=Component.UNDEFINED, showEvent=Component.UNDEFINED, showTitle=Component.UNDEFINED, target=Component.UNDEFINED, title=Component.UNDEFINED, titleTemplate=Component.UNDEFINED, toolbarItems=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
45 | self._prop_names = ['children', 'id', 'animation', 'closeOnBackButton', 'closeOnOutsideClick', 'container', 'deferRendering', 'disabled', 'elementAttr', 'height', 'hideEvent', 'hint', 'hoverStateEnabled', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'rtlEnabled', 'shading', 'shadingColor', 'showCloseButton', 'showEvent', 'showTitle', 'target', 'title', 'titleTemplate', 'toolbarItems', 'visible', 'width']
46 | self._type = 'Popover'
47 | self._namespace = 'dash_devextreme'
48 | self._valid_wildcard_attributes = []
49 | self.available_events = []
50 | self.available_properties = ['children', 'id', 'animation', 'closeOnBackButton', 'closeOnOutsideClick', 'container', 'deferRendering', 'disabled', 'elementAttr', 'height', 'hideEvent', 'hint', 'hoverStateEnabled', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'rtlEnabled', 'shading', 'shadingColor', 'showCloseButton', 'showEvent', 'showTitle', 'target', 'title', 'titleTemplate', 'toolbarItems', 'visible', 'width']
51 | self.available_wildcard_properties = []
52 |
53 | _explicit_args = kwargs.pop('_explicit_args')
54 | _locals = locals()
55 | _locals.update(kwargs) # For wildcard attrs
56 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
57 |
58 | for k in []:
59 | if k not in args:
60 | raise TypeError(
61 | 'Required argument `' + k + '` was not specified.')
62 | super(Popover, self).__init__(children=children, **args)
63 |
64 | def __repr__(self):
65 | if(any(getattr(self, c, None) is not None
66 | for c in self._prop_names
67 | if c is not self._prop_names[0])
68 | or any(getattr(self, c, None) is not None
69 | for c in self.__dict__.keys()
70 | if any(c.startswith(wc_attr)
71 | for wc_attr in self._valid_wildcard_attributes))):
72 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
73 | for c in self._prop_names
74 | if getattr(self, c, None) is not None])
75 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
76 | for c in self.__dict__.keys()
77 | if any([c.startswith(wc_attr)
78 | for wc_attr in
79 | self._valid_wildcard_attributes])])
80 | return ('Popover(' + props_string +
81 | (', ' + wilds_string if wilds_string != '' else '') + ')')
82 | else:
83 | return (
84 | 'Popover(' +
85 | repr(getattr(self, self._prop_names[0], None)) + ')')
86 |
--------------------------------------------------------------------------------
/dash_devextreme/Popup.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class Popup(Component):
7 | """A Popup component.
8 |
9 |
10 | Keyword arguments:
11 | - children (a list of or a singular dash component, string or number; optional)
12 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
13 | - showTitle (boolean; optional)
14 | - title (string; optional)
15 | - visible (boolean; optional)
16 | - dragEnabled (boolean; optional)
17 | - closeOnOutsideClick (boolean; optional)
18 | - closeOnBackButton (boolean; optional)
19 |
20 | Available events: """
21 | @_explicitize_args
22 | def __init__(self, children=None, id=Component.UNDEFINED, showTitle=Component.UNDEFINED, title=Component.UNDEFINED, visible=Component.UNDEFINED, dragEnabled=Component.UNDEFINED, closeOnOutsideClick=Component.UNDEFINED, closeOnBackButton=Component.UNDEFINED, **kwargs):
23 | self._prop_names = ['children', 'id', 'showTitle', 'title', 'visible', 'dragEnabled', 'closeOnOutsideClick', 'closeOnBackButton']
24 | self._type = 'Popup'
25 | self._namespace = 'dash_devextreme'
26 | self._valid_wildcard_attributes = []
27 | self.available_events = []
28 | self.available_properties = ['children', 'id', 'showTitle', 'title', 'visible', 'dragEnabled', 'closeOnOutsideClick', 'closeOnBackButton']
29 | self.available_wildcard_properties = []
30 |
31 | _explicit_args = kwargs.pop('_explicit_args')
32 | _locals = locals()
33 | _locals.update(kwargs) # For wildcard attrs
34 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
35 |
36 | for k in []:
37 | if k not in args:
38 | raise TypeError(
39 | 'Required argument `' + k + '` was not specified.')
40 | super(Popup, self).__init__(children=children, **args)
41 |
42 | def __repr__(self):
43 | if(any(getattr(self, c, None) is not None
44 | for c in self._prop_names
45 | if c is not self._prop_names[0])
46 | or any(getattr(self, c, None) is not None
47 | for c in self.__dict__.keys()
48 | if any(c.startswith(wc_attr)
49 | for wc_attr in self._valid_wildcard_attributes))):
50 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
51 | for c in self._prop_names
52 | if getattr(self, c, None) is not None])
53 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
54 | for c in self.__dict__.keys()
55 | if any([c.startswith(wc_attr)
56 | for wc_attr in
57 | self._valid_wildcard_attributes])])
58 | return ('Popup(' + props_string +
59 | (', ' + wilds_string if wilds_string != '' else '') + ')')
60 | else:
61 | return (
62 | 'Popup(' +
63 | repr(getattr(self, self._prop_names[0], None)) + ')')
64 |
--------------------------------------------------------------------------------
/dash_devextreme/SelectBox.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class SelectBox(Component):
7 | """A SelectBox component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional)
12 | - acceptCustomValue (boolean; optional)
13 | - accessKey (string; optional)
14 | - activeStateEnabled (boolean; optional)
15 | - dataSource (string | list; optional)
16 | - deferRendering (boolean; optional)
17 | - disabled (boolean; optional)
18 | - displayExpr (string; optional)
19 | - dropDownButtonTemplate (string; optional)
20 | - elementAttr (dict; optional)
21 | - fieldTemplate (string; optional)
22 | - focusStateEnabled (boolean; optional)
23 | - grouped (boolean; optional)
24 | - groupTemplate (string; optional)
25 | - height (number | string; optional)
26 | - hint (string; optional)
27 | - hoverStateEnabled (boolean; optional)
28 | - inputAttr (dict; optional)
29 | - isValid (boolean; optional)
30 | - dxItems (list; optional)
31 | - itemTemplate (string; optional)
32 | - maxLength (string | number; optional)
33 | - minSearchLength (number; optional)
34 | - name (string; optional)
35 | - noDataText (string; optional)
36 | - opened (boolean; optional)
37 | - openOnFieldClick (boolean; optional)
38 | - placeholder (string; optional)
39 | - readOnly (boolean; optional)
40 | - rtlEnabled (boolean; optional)
41 | - searchEnabled (boolean; optional)
42 | - searchExpr (string | list; optional)
43 | - searchMode (a value equal to: 'contains', 'startswith'; optional)
44 | - searchTimeout (number; optional)
45 | - showClearButton (boolean; optional)
46 | - showDataBeforeSearch (boolean; optional)
47 | - showDropDownButton (boolean; optional)
48 | - showSelectionControls (boolean; optional)
49 | - spellcheck (boolean; optional)
50 | - stylingMode (a value equal to: 'outlined', 'underlined', 'filled'; optional)
51 | - tabIndex (number; optional)
52 | - validationError (dict; optional)
53 | - validationMessageMode (a value equal to: 'always', 'auto'; optional)
54 | - value (boolean | number | string | dict | list; optional)
55 | - valueChangeEvent (string; optional)
56 | - valueExpr (string; optional)
57 | - visible (boolean; optional)
58 | - width (number | string; optional)
59 |
60 | Available events: 'change'"""
61 | @_explicitize_args
62 | def __init__(self, id=Component.UNDEFINED, acceptCustomValue=Component.UNDEFINED, accessKey=Component.UNDEFINED, activeStateEnabled=Component.UNDEFINED, dataSource=Component.UNDEFINED, deferRendering=Component.UNDEFINED, disabled=Component.UNDEFINED, displayExpr=Component.UNDEFINED, dropDownButtonTemplate=Component.UNDEFINED, elementAttr=Component.UNDEFINED, fieldTemplate=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, grouped=Component.UNDEFINED, groupTemplate=Component.UNDEFINED, height=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, inputAttr=Component.UNDEFINED, isValid=Component.UNDEFINED, dxItems=Component.UNDEFINED, itemTemplate=Component.UNDEFINED, maxLength=Component.UNDEFINED, minSearchLength=Component.UNDEFINED, name=Component.UNDEFINED, noDataText=Component.UNDEFINED, onChange=Component.UNDEFINED, onClosed=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onCopy=Component.UNDEFINED, onCustomItemCreating=Component.UNDEFINED, onCut=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onEnterKey=Component.UNDEFINED, onFocusIn=Component.UNDEFINED, onFocusOut=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onInput=Component.UNDEFINED, onItemClick=Component.UNDEFINED, onKeyDown=Component.UNDEFINED, onKeyPress=Component.UNDEFINED, onKeyUp=Component.UNDEFINED, onOpened=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onPaste=Component.UNDEFINED, onSelectionChanged=Component.UNDEFINED, onValueChanged=Component.UNDEFINED, opened=Component.UNDEFINED, openOnFieldClick=Component.UNDEFINED, placeholder=Component.UNDEFINED, readOnly=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, searchEnabled=Component.UNDEFINED, searchExpr=Component.UNDEFINED, searchMode=Component.UNDEFINED, searchTimeout=Component.UNDEFINED, showClearButton=Component.UNDEFINED, showDataBeforeSearch=Component.UNDEFINED, showDropDownButton=Component.UNDEFINED, showSelectionControls=Component.UNDEFINED, spellcheck=Component.UNDEFINED, stylingMode=Component.UNDEFINED, tabIndex=Component.UNDEFINED, validationError=Component.UNDEFINED, validationMessageMode=Component.UNDEFINED, value=Component.UNDEFINED, valueChangeEvent=Component.UNDEFINED, valueExpr=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
63 | self._prop_names = ['id', 'acceptCustomValue', 'accessKey', 'activeStateEnabled', 'dataSource', 'deferRendering', 'disabled', 'displayExpr', 'dropDownButtonTemplate', 'elementAttr', 'fieldTemplate', 'focusStateEnabled', 'grouped', 'groupTemplate', 'height', 'hint', 'hoverStateEnabled', 'inputAttr', 'isValid', 'dxItems', 'itemTemplate', 'maxLength', 'minSearchLength', 'name', 'noDataText', 'opened', 'openOnFieldClick', 'placeholder', 'readOnly', 'rtlEnabled', 'searchEnabled', 'searchExpr', 'searchMode', 'searchTimeout', 'showClearButton', 'showDataBeforeSearch', 'showDropDownButton', 'showSelectionControls', 'spellcheck', 'stylingMode', 'tabIndex', 'validationError', 'validationMessageMode', 'value', 'valueChangeEvent', 'valueExpr', 'visible', 'width']
64 | self._type = 'SelectBox'
65 | self._namespace = 'dash_devextreme'
66 | self._valid_wildcard_attributes = []
67 | self.available_events = ['change']
68 | self.available_properties = ['id', 'acceptCustomValue', 'accessKey', 'activeStateEnabled', 'dataSource', 'deferRendering', 'disabled', 'displayExpr', 'dropDownButtonTemplate', 'elementAttr', 'fieldTemplate', 'focusStateEnabled', 'grouped', 'groupTemplate', 'height', 'hint', 'hoverStateEnabled', 'inputAttr', 'isValid', 'dxItems', 'itemTemplate', 'maxLength', 'minSearchLength', 'name', 'noDataText', 'opened', 'openOnFieldClick', 'placeholder', 'readOnly', 'rtlEnabled', 'searchEnabled', 'searchExpr', 'searchMode', 'searchTimeout', 'showClearButton', 'showDataBeforeSearch', 'showDropDownButton', 'showSelectionControls', 'spellcheck', 'stylingMode', 'tabIndex', 'validationError', 'validationMessageMode', 'value', 'valueChangeEvent', 'valueExpr', 'visible', 'width']
69 | self.available_wildcard_properties = []
70 |
71 | _explicit_args = kwargs.pop('_explicit_args')
72 | _locals = locals()
73 | _locals.update(kwargs) # For wildcard attrs
74 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
75 |
76 | for k in []:
77 | if k not in args:
78 | raise TypeError(
79 | 'Required argument `' + k + '` was not specified.')
80 | super(SelectBox, self).__init__(**args)
81 |
82 | def __repr__(self):
83 | if(any(getattr(self, c, None) is not None
84 | for c in self._prop_names
85 | if c is not self._prop_names[0])
86 | or any(getattr(self, c, None) is not None
87 | for c in self.__dict__.keys()
88 | if any(c.startswith(wc_attr)
89 | for wc_attr in self._valid_wildcard_attributes))):
90 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
91 | for c in self._prop_names
92 | if getattr(self, c, None) is not None])
93 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
94 | for c in self.__dict__.keys()
95 | if any([c.startswith(wc_attr)
96 | for wc_attr in
97 | self._valid_wildcard_attributes])])
98 | return ('SelectBox(' + props_string +
99 | (', ' + wilds_string if wilds_string != '' else '') + ')')
100 | else:
101 | return (
102 | 'SelectBox(' +
103 | repr(getattr(self, self._prop_names[0], None)) + ')')
104 |
--------------------------------------------------------------------------------
/dash_devextreme/Switch.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class Switch(Component):
7 | """A Switch component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
12 | - accessKey (string; optional)
13 | - activeStateEnabled (boolean; optional)
14 | - disabled (boolean; optional)
15 | - elementAttr (dict; optional)
16 | - focusStateEnabled (boolean; optional)
17 | - height (number | string; optional)
18 | - hint (string; optional)
19 | - hoverStateEnabled (boolean; optional)
20 | - isValid (boolean; optional)
21 | - name (string; optional)
22 | - readOnly (boolean; optional)
23 | - rtlEnabled (boolean; optional)
24 | - switchedOffText (string; optional)
25 | - switchedOnText (string; optional)
26 | - tabIndex (number; optional)
27 | - validationError (dict; optional)
28 | - validationMessageMode (a value equal to: 'always', 'auto'; optional)
29 | - value (boolean; optional)
30 | - visible (boolean; optional)
31 | - width (number | string; optional)
32 |
33 | Available events: 'change'"""
34 | @_explicitize_args
35 | def __init__(self, id=Component.UNDEFINED, accessKey=Component.UNDEFINED, activeStateEnabled=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, height=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, isValid=Component.UNDEFINED, name=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onValueChanged=Component.UNDEFINED, readOnly=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, switchedOffText=Component.UNDEFINED, switchedOnText=Component.UNDEFINED, tabIndex=Component.UNDEFINED, validationError=Component.UNDEFINED, validationMessageMode=Component.UNDEFINED, value=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
36 | self._prop_names = ['id', 'accessKey', 'activeStateEnabled', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'isValid', 'name', 'readOnly', 'rtlEnabled', 'switchedOffText', 'switchedOnText', 'tabIndex', 'validationError', 'validationMessageMode', 'value', 'visible', 'width']
37 | self._type = 'Switch'
38 | self._namespace = 'dash_devextreme'
39 | self._valid_wildcard_attributes = []
40 | self.available_events = ['change']
41 | self.available_properties = ['id', 'accessKey', 'activeStateEnabled', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'isValid', 'name', 'readOnly', 'rtlEnabled', 'switchedOffText', 'switchedOnText', 'tabIndex', 'validationError', 'validationMessageMode', 'value', 'visible', 'width']
42 | self.available_wildcard_properties = []
43 |
44 | _explicit_args = kwargs.pop('_explicit_args')
45 | _locals = locals()
46 | _locals.update(kwargs) # For wildcard attrs
47 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
48 |
49 | for k in []:
50 | if k not in args:
51 | raise TypeError(
52 | 'Required argument `' + k + '` was not specified.')
53 | super(Switch, self).__init__(**args)
54 |
55 | def __repr__(self):
56 | if(any(getattr(self, c, None) is not None
57 | for c in self._prop_names
58 | if c is not self._prop_names[0])
59 | or any(getattr(self, c, None) is not None
60 | for c in self.__dict__.keys()
61 | if any(c.startswith(wc_attr)
62 | for wc_attr in self._valid_wildcard_attributes))):
63 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
64 | for c in self._prop_names
65 | if getattr(self, c, None) is not None])
66 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
67 | for c in self.__dict__.keys()
68 | if any([c.startswith(wc_attr)
69 | for wc_attr in
70 | self._valid_wildcard_attributes])])
71 | return ('Switch(' + props_string +
72 | (', ' + wilds_string if wilds_string != '' else '') + ')')
73 | else:
74 | return (
75 | 'Switch(' +
76 | repr(getattr(self, self._prop_names[0], None)) + ')')
77 |
--------------------------------------------------------------------------------
/dash_devextreme/TabPanel.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class TabPanel(Component):
7 | """A TabPanel component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
12 | - accessKey (string; optional)
13 | - activeStateEnabled (boolean; optional)
14 | - animationEnabled (boolean; optional)
15 | - dataSource (string | list | list | dict; optional)
16 | - deferRendering (boolean; optional)
17 | - disabled (boolean; optional)
18 | - elementAttr (dict; optional)
19 | - focusStateEnabled (boolean; optional)
20 | - height (number | string; optional)
21 | - hint (string; optional)
22 | - hoverStateEnabled (boolean; optional)
23 | - itemHoldTimeout (number; optional)
24 | - items (list | list; optional)
25 | - itemTemplate (string | dict; optional)
26 | - itemTitleTemplate (string | dict; optional)
27 | - loop (boolean; optional)
28 | - noDataText (string; optional)
29 | - onItemClick (string; optional)
30 | - onTitleClick (string; optional)
31 | - repaintChangesOnly (boolean; optional)
32 | - rtlEnabled (boolean; optional)
33 | - scrollByContent (boolean; optional)
34 | - scrollingEnabled (boolean; optional)
35 | - selectedIndex (number; optional)
36 | - selectedItem (dict; optional)
37 | - showNavButtons (boolean; optional)
38 | - swipeEnabled (boolean; optional)
39 | - tabIndex (number; optional)
40 | - visible (boolean; optional)
41 | - width (number | string; optional)
42 |
43 | Available events: """
44 | @_explicitize_args
45 | def __init__(self, id=Component.UNDEFINED, accessKey=Component.UNDEFINED, activeStateEnabled=Component.UNDEFINED, animationEnabled=Component.UNDEFINED, dataSource=Component.UNDEFINED, deferRendering=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, height=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, itemHoldTimeout=Component.UNDEFINED, items=Component.UNDEFINED, itemComponent=Component.UNDEFINED, itemTemplate=Component.UNDEFINED, itemTitleRender=Component.UNDEFINED, itemTitleTemplate=Component.UNDEFINED, loop=Component.UNDEFINED, noDataText=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onItemClick=Component.UNDEFINED, onItemContextMenu=Component.UNDEFINED, onItemHold=Component.UNDEFINED, onItemRendered=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onSelectionChanged=Component.UNDEFINED, onTitleClick=Component.UNDEFINED, onTitleHold=Component.UNDEFINED, onTitleRendered=Component.UNDEFINED, repaintChangesOnly=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, scrollByContent=Component.UNDEFINED, scrollingEnabled=Component.UNDEFINED, selectedIndex=Component.UNDEFINED, selectedItem=Component.UNDEFINED, showNavButtons=Component.UNDEFINED, swipeEnabled=Component.UNDEFINED, tabIndex=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
46 | self._prop_names = ['id', 'accessKey', 'activeStateEnabled', 'animationEnabled', 'dataSource', 'deferRendering', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'itemHoldTimeout', 'items', 'itemTemplate', 'itemTitleTemplate', 'loop', 'noDataText', 'onItemClick', 'onTitleClick', 'repaintChangesOnly', 'rtlEnabled', 'scrollByContent', 'scrollingEnabled', 'selectedIndex', 'selectedItem', 'showNavButtons', 'swipeEnabled', 'tabIndex', 'visible', 'width']
47 | self._type = 'TabPanel'
48 | self._namespace = 'dash_devextreme'
49 | self._valid_wildcard_attributes = []
50 | self.available_events = []
51 | self.available_properties = ['id', 'accessKey', 'activeStateEnabled', 'animationEnabled', 'dataSource', 'deferRendering', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'itemHoldTimeout', 'items', 'itemTemplate', 'itemTitleTemplate', 'loop', 'noDataText', 'onItemClick', 'onTitleClick', 'repaintChangesOnly', 'rtlEnabled', 'scrollByContent', 'scrollingEnabled', 'selectedIndex', 'selectedItem', 'showNavButtons', 'swipeEnabled', 'tabIndex', 'visible', 'width']
52 | self.available_wildcard_properties = []
53 |
54 | _explicit_args = kwargs.pop('_explicit_args')
55 | _locals = locals()
56 | _locals.update(kwargs) # For wildcard attrs
57 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
58 |
59 | for k in []:
60 | if k not in args:
61 | raise TypeError(
62 | 'Required argument `' + k + '` was not specified.')
63 | super(TabPanel, self).__init__(**args)
64 |
65 | def __repr__(self):
66 | if(any(getattr(self, c, None) is not None
67 | for c in self._prop_names
68 | if c is not self._prop_names[0])
69 | or any(getattr(self, c, None) is not None
70 | for c in self.__dict__.keys()
71 | if any(c.startswith(wc_attr)
72 | for wc_attr in self._valid_wildcard_attributes))):
73 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
74 | for c in self._prop_names
75 | if getattr(self, c, None) is not None])
76 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
77 | for c in self.__dict__.keys()
78 | if any([c.startswith(wc_attr)
79 | for wc_attr in
80 | self._valid_wildcard_attributes])])
81 | return ('TabPanel(' + props_string +
82 | (', ' + wilds_string if wilds_string != '' else '') + ')')
83 | else:
84 | return (
85 | 'TabPanel(' +
86 | repr(getattr(self, self._prop_names[0], None)) + ')')
87 |
--------------------------------------------------------------------------------
/dash_devextreme/Tabs.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class Tabs(Component):
7 | """A Tabs component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
12 | - accessKey (string; optional)
13 | - dataSource (string | list | list | dict; optional)
14 | - disabled (boolean; optional)
15 | - elementAttr (dict; optional)
16 | - focusStateEnabled (boolean; optional)
17 | - height (number | string; optional)
18 | - hint (string; optional)
19 | - hoverStateEnabled (boolean; optional)
20 | - itemHoldTimeout (number; optional)
21 | - items (list | list; optional)
22 | - itemTemplate (string | dict; optional)
23 | - keyExpr (string; optional)
24 | - noDataText (string; optional)
25 | - onItemClick (string; optional)
26 | - repaintChangesOnly (boolean; optional)
27 | - rtlEnabled (boolean; optional)
28 | - scrollByContent (boolean; optional)
29 | - scrollingEnabled (boolean; optional)
30 | - selectedIndex (number; optional)
31 | - selectedItem (dict; optional)
32 | - selectedItemKeys (number; optional)
33 | - selectedItems (list; optional)
34 | - selectionMode (a value equal to: 'multiple', 'single'; optional)
35 | - showNavButtons (boolean; optional)
36 | - tabIndex (number; optional)
37 | - visible (boolean; optional)
38 | - width (number | string; optional)
39 |
40 | Available events: """
41 | @_explicitize_args
42 | def __init__(self, id=Component.UNDEFINED, accessKey=Component.UNDEFINED, dataSource=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, height=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, itemHoldTimeout=Component.UNDEFINED, items=Component.UNDEFINED, itemTemplate=Component.UNDEFINED, keyExpr=Component.UNDEFINED, noDataText=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onItemClick=Component.UNDEFINED, onItemContextMenu=Component.UNDEFINED, onItemHold=Component.UNDEFINED, onItemRendered=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onSelectionChanged=Component.UNDEFINED, repaintChangesOnly=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, scrollByContent=Component.UNDEFINED, scrollingEnabled=Component.UNDEFINED, selectedIndex=Component.UNDEFINED, selectedItem=Component.UNDEFINED, selectedItemKeys=Component.UNDEFINED, selectedItems=Component.UNDEFINED, selectionMode=Component.UNDEFINED, showNavButtons=Component.UNDEFINED, tabIndex=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
43 | self._prop_names = ['id', 'accessKey', 'dataSource', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'itemHoldTimeout', 'items', 'itemTemplate', 'keyExpr', 'noDataText', 'onItemClick', 'repaintChangesOnly', 'rtlEnabled', 'scrollByContent', 'scrollingEnabled', 'selectedIndex', 'selectedItem', 'selectedItemKeys', 'selectedItems', 'selectionMode', 'showNavButtons', 'tabIndex', 'visible', 'width']
44 | self._type = 'Tabs'
45 | self._namespace = 'dash_devextreme'
46 | self._valid_wildcard_attributes = []
47 | self.available_events = []
48 | self.available_properties = ['id', 'accessKey', 'dataSource', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'itemHoldTimeout', 'items', 'itemTemplate', 'keyExpr', 'noDataText', 'onItemClick', 'repaintChangesOnly', 'rtlEnabled', 'scrollByContent', 'scrollingEnabled', 'selectedIndex', 'selectedItem', 'selectedItemKeys', 'selectedItems', 'selectionMode', 'showNavButtons', 'tabIndex', 'visible', 'width']
49 | self.available_wildcard_properties = []
50 |
51 | _explicit_args = kwargs.pop('_explicit_args')
52 | _locals = locals()
53 | _locals.update(kwargs) # For wildcard attrs
54 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
55 |
56 | for k in []:
57 | if k not in args:
58 | raise TypeError(
59 | 'Required argument `' + k + '` was not specified.')
60 | super(Tabs, self).__init__(**args)
61 |
62 | def __repr__(self):
63 | if(any(getattr(self, c, None) is not None
64 | for c in self._prop_names
65 | if c is not self._prop_names[0])
66 | or any(getattr(self, c, None) is not None
67 | for c in self.__dict__.keys()
68 | if any(c.startswith(wc_attr)
69 | for wc_attr in self._valid_wildcard_attributes))):
70 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
71 | for c in self._prop_names
72 | if getattr(self, c, None) is not None])
73 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
74 | for c in self.__dict__.keys()
75 | if any([c.startswith(wc_attr)
76 | for wc_attr in
77 | self._valid_wildcard_attributes])])
78 | return ('Tabs(' + props_string +
79 | (', ' + wilds_string if wilds_string != '' else '') + ')')
80 | else:
81 | return (
82 | 'Tabs(' +
83 | repr(getattr(self, self._prop_names[0], None)) + ')')
84 |
--------------------------------------------------------------------------------
/dash_devextreme/TextBox.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class TextBox(Component):
7 | """A TextBox component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
12 | - accessKey (string; optional)
13 | - activeStateEnabled (boolean; optional)
14 | - disabled (boolean; optional)
15 | - elementAttr (dict; optional)
16 | - focusStateEnabled (boolean; optional)
17 | - height (number | string; optional)
18 | - hint (string; optional)
19 | - hoverStateEnabled (boolean; optional)
20 | - inputAttr (dict; optional)
21 | - isValid (boolean; optional)
22 | - mask (string; optional)
23 | - maskChar (string; optional)
24 | - maskInvalidMessage (string; optional)
25 | - maskRules (dict; optional)
26 | - maxLength (string | number; optional)
27 | - mode (a value equal to: 'email', 'password', 'search', 'tel', 'text', 'url'; optional)
28 | - name (string; optional)
29 | - placeholder (string; optional)
30 | - readOnly (boolean; optional)
31 | - rtlEnabled (boolean; optional)
32 | - showClearButton (boolean; optional)
33 | - showMaskMode (a value equal to: 'always', 'onFocus'; optional)
34 | - spellcheck (boolean; optional)
35 | - stylingMode (a value equal to: 'outlined', 'underlined', 'filled'; optional)
36 | - tabIndex (number; optional)
37 | - useMaskedValue (boolean; optional)
38 | - validationError (dict; optional)
39 | - validationMessageMode (a value equal to: 'always', 'auto'; optional)
40 | - value (string; optional)
41 | - valueChangeEvent (string; optional)
42 | - visible (boolean; optional)
43 | - width (number | string; optional)
44 |
45 | Available events: 'change'"""
46 | @_explicitize_args
47 | def __init__(self, id=Component.UNDEFINED, accessKey=Component.UNDEFINED, activeStateEnabled=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, height=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, inputAttr=Component.UNDEFINED, isValid=Component.UNDEFINED, mask=Component.UNDEFINED, maskChar=Component.UNDEFINED, maskInvalidMessage=Component.UNDEFINED, maskRules=Component.UNDEFINED, maxLength=Component.UNDEFINED, mode=Component.UNDEFINED, name=Component.UNDEFINED, onChange=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onCopy=Component.UNDEFINED, onCut=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onEnterKey=Component.UNDEFINED, onFocusIn=Component.UNDEFINED, onFocusOut=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onInput=Component.UNDEFINED, onKeyDown=Component.UNDEFINED, onKeyPress=Component.UNDEFINED, onKeyUp=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onPaste=Component.UNDEFINED, onValueChanged=Component.UNDEFINED, placeholder=Component.UNDEFINED, readOnly=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, showClearButton=Component.UNDEFINED, showMaskMode=Component.UNDEFINED, spellcheck=Component.UNDEFINED, stylingMode=Component.UNDEFINED, tabIndex=Component.UNDEFINED, useMaskedValue=Component.UNDEFINED, validationError=Component.UNDEFINED, validationMessageMode=Component.UNDEFINED, value=Component.UNDEFINED, valueChangeEvent=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
48 | self._prop_names = ['id', 'accessKey', 'activeStateEnabled', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'inputAttr', 'isValid', 'mask', 'maskChar', 'maskInvalidMessage', 'maskRules', 'maxLength', 'mode', 'name', 'placeholder', 'readOnly', 'rtlEnabled', 'showClearButton', 'showMaskMode', 'spellcheck', 'stylingMode', 'tabIndex', 'useMaskedValue', 'validationError', 'validationMessageMode', 'value', 'valueChangeEvent', 'visible', 'width']
49 | self._type = 'TextBox'
50 | self._namespace = 'dash_devextreme'
51 | self._valid_wildcard_attributes = []
52 | self.available_events = ['change']
53 | self.available_properties = ['id', 'accessKey', 'activeStateEnabled', 'disabled', 'elementAttr', 'focusStateEnabled', 'height', 'hint', 'hoverStateEnabled', 'inputAttr', 'isValid', 'mask', 'maskChar', 'maskInvalidMessage', 'maskRules', 'maxLength', 'mode', 'name', 'placeholder', 'readOnly', 'rtlEnabled', 'showClearButton', 'showMaskMode', 'spellcheck', 'stylingMode', 'tabIndex', 'useMaskedValue', 'validationError', 'validationMessageMode', 'value', 'valueChangeEvent', 'visible', 'width']
54 | self.available_wildcard_properties = []
55 |
56 | _explicit_args = kwargs.pop('_explicit_args')
57 | _locals = locals()
58 | _locals.update(kwargs) # For wildcard attrs
59 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
60 |
61 | for k in []:
62 | if k not in args:
63 | raise TypeError(
64 | 'Required argument `' + k + '` was not specified.')
65 | super(TextBox, self).__init__(**args)
66 |
67 | def __repr__(self):
68 | if(any(getattr(self, c, None) is not None
69 | for c in self._prop_names
70 | if c is not self._prop_names[0])
71 | or any(getattr(self, c, None) is not None
72 | for c in self.__dict__.keys()
73 | if any(c.startswith(wc_attr)
74 | for wc_attr in self._valid_wildcard_attributes))):
75 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
76 | for c in self._prop_names
77 | if getattr(self, c, None) is not None])
78 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
79 | for c in self.__dict__.keys()
80 | if any([c.startswith(wc_attr)
81 | for wc_attr in
82 | self._valid_wildcard_attributes])])
83 | return ('TextBox(' + props_string +
84 | (', ' + wilds_string if wilds_string != '' else '') + ')')
85 | else:
86 | return (
87 | 'TextBox(' +
88 | repr(getattr(self, self._prop_names[0], None)) + ')')
89 |
--------------------------------------------------------------------------------
/dash_devextreme/Tooltip.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class Tooltip(Component):
7 | """A Tooltip component.
8 |
9 |
10 | Keyword arguments:
11 | - children (a list of or a singular dash component, string or number; optional)
12 | - id (string; optional): The ID used to identify this compnent in Dash callbacks
13 | - animation (dict; optional)
14 | - closeOnBackButton (boolean; optional)
15 | - closeOnOutsideClick (boolean; optional)
16 | - container (string; optional)
17 | - deferRendering (boolean; optional)
18 | - disabled (boolean; optional)
19 | - elementAttr (dict; optional)
20 | - height (number | string; optional)
21 | - hideEvent (dict | string; optional)
22 | - hint (string; optional)
23 | - hoverStateEnabled (boolean; optional)
24 | - maxHeight (number | string; optional)
25 | - maxWidth (number | string; optional)
26 | - minHeight (number | string; optional)
27 | - minWidth (number | string; optional)
28 | - position (a value equal to: 'bottom', 'left', 'right', 'top' | dict; optional)
29 | - rtlEnabled (boolean; optional)
30 | - shading (boolean; optional)
31 | - shadingColor (string; optional)
32 | - showEvent (dict | string; optional)
33 | - target (string; optional)
34 | - visible (boolean; optional)
35 | - width (number | string; optional)
36 |
37 | Available events: """
38 | @_explicitize_args
39 | def __init__(self, children=None, id=Component.UNDEFINED, animation=Component.UNDEFINED, closeOnBackButton=Component.UNDEFINED, closeOnOutsideClick=Component.UNDEFINED, container=Component.UNDEFINED, deferRendering=Component.UNDEFINED, disabled=Component.UNDEFINED, elementAttr=Component.UNDEFINED, height=Component.UNDEFINED, hideEvent=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, maxHeight=Component.UNDEFINED, maxWidth=Component.UNDEFINED, minHeight=Component.UNDEFINED, minWidth=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onHidden=Component.UNDEFINED, onHiding=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onShowing=Component.UNDEFINED, onShown=Component.UNDEFINED, position=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, shading=Component.UNDEFINED, shadingColor=Component.UNDEFINED, showEvent=Component.UNDEFINED, target=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, **kwargs):
40 | self._prop_names = ['children', 'id', 'animation', 'closeOnBackButton', 'closeOnOutsideClick', 'container', 'deferRendering', 'disabled', 'elementAttr', 'height', 'hideEvent', 'hint', 'hoverStateEnabled', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'rtlEnabled', 'shading', 'shadingColor', 'showEvent', 'target', 'visible', 'width']
41 | self._type = 'Tooltip'
42 | self._namespace = 'dash_devextreme'
43 | self._valid_wildcard_attributes = []
44 | self.available_events = []
45 | self.available_properties = ['children', 'id', 'animation', 'closeOnBackButton', 'closeOnOutsideClick', 'container', 'deferRendering', 'disabled', 'elementAttr', 'height', 'hideEvent', 'hint', 'hoverStateEnabled', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'position', 'rtlEnabled', 'shading', 'shadingColor', 'showEvent', 'target', 'visible', 'width']
46 | self.available_wildcard_properties = []
47 |
48 | _explicit_args = kwargs.pop('_explicit_args')
49 | _locals = locals()
50 | _locals.update(kwargs) # For wildcard attrs
51 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
52 |
53 | for k in []:
54 | if k not in args:
55 | raise TypeError(
56 | 'Required argument `' + k + '` was not specified.')
57 | super(Tooltip, self).__init__(children=children, **args)
58 |
59 | def __repr__(self):
60 | if(any(getattr(self, c, None) is not None
61 | for c in self._prop_names
62 | if c is not self._prop_names[0])
63 | or any(getattr(self, c, None) is not None
64 | for c in self.__dict__.keys()
65 | if any(c.startswith(wc_attr)
66 | for wc_attr in self._valid_wildcard_attributes))):
67 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
68 | for c in self._prop_names
69 | if getattr(self, c, None) is not None])
70 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
71 | for c in self.__dict__.keys()
72 | if any([c.startswith(wc_attr)
73 | for wc_attr in
74 | self._valid_wildcard_attributes])])
75 | return ('Tooltip(' + props_string +
76 | (', ' + wilds_string if wilds_string != '' else '') + ')')
77 | else:
78 | return (
79 | 'Tooltip(' +
80 | repr(getattr(self, self._prop_names[0], None)) + ')')
81 |
--------------------------------------------------------------------------------
/dash_devextreme/TreeList.py:
--------------------------------------------------------------------------------
1 | # AUTO GENERATED FILE - DO NOT EDIT
2 |
3 | from dash.development.base_component import Component, _explicitize_args
4 |
5 |
6 | class TreeList(Component):
7 | """A TreeList component.
8 |
9 |
10 | Keyword arguments:
11 | - id (string; optional)
12 | - accessKey (string; optional)
13 | - activeStateEnabled (boolean; optional)
14 | - allowColumnReordering (boolean; optional)
15 | - allowColumnResizing (boolean; optional)
16 | - autoExpandAll (boolean; optional)
17 | - cacheEnabled (boolean; optional)
18 | - cellHintEnabled (boolean; optional)
19 | - columnAutoWidth (boolean; optional)
20 | - columnChooser (dict; optional)
21 | - columnFixing (dict; optional)
22 | - columnHidingEnabled (boolean; optional)
23 | - columnMinWidth (number; optional)
24 | - columnResizingMode (a value equal to: 'nextColumn', 'widget'; optional)
25 | - columns (list; optional)
26 | - columnWidth (number; optional)
27 | - dataSource (string | list; optional)
28 | - dataStructure (a value equal to: 'plain', 'tree'; optional)
29 | - dateSerializationFormat (string; optional)
30 | - disabled (boolean; optional)
31 | - editing (dict; optional)
32 | - elementAttr (dict; optional)
33 | - errorRowEnabled (boolean; optional)
34 | - expandedRowKeys (list | list; optional)
35 | - expandNodesOnFiltering (boolean; optional)
36 | - filterBuilder (dict; optional)
37 | - filterBuilderPopup (dict; optional)
38 | - filterPanel (dict; optional)
39 | - filterRow (dict; optional)
40 | - filterSyncEnabled (boolean; optional)
41 | - filterValue (dict; optional)
42 | - focusedColumnIndex (number; optional)
43 | - focusedRowEnabled (boolean; optional)
44 | - focusedRowIndex (number; optional)
45 | - focusedRowKey (boolean | number | string | dict | list; optional)
46 | - focusStateEnabled (boolean; optional)
47 | - hasItemsExpr (string; optional)
48 | - headerFilter (dict; optional)
49 | - height (string | number; optional)
50 | - highlightChanges (boolean; optional)
51 | - hint (string; optional)
52 | - hoverStateEnabled (boolean; optional)
53 | - itemsExpr (string; optional)
54 | - keyExpr (string; optional)
55 | - loadPanel (dict; optional)
56 | - noDataText (string; optional)
57 | - onCellClick (string; optional)
58 | - onRowClick (string; optional)
59 | - pager (dict; optional)
60 | - paging (dict; optional)
61 | - parentIdExpr (string; optional)
62 | - remoteOperations (dict; optional)
63 | - renderAsync (boolean; optional)
64 | - repaintChangesOnly (boolean; optional)
65 | - rootValue (dict; optional)
66 | - rowAlternationEnabled (boolean; optional)
67 | - rtlEnabled (boolean; optional)
68 | - scrolling (dict; optional)
69 | - searchPanel (dict; optional)
70 | - selectedRowKeys (list; optional)
71 | - selection (dict; optional)
72 | - showBorders (boolean; optional)
73 | - showColumnHeaders (boolean; optional)
74 | - showColumnLines (boolean; optional)
75 | - showRowLines (boolean; optional)
76 | - sorting (dict; optional)
77 | - stateStoring (dict; optional)
78 | - tabIndex (number; optional)
79 | - twoWayBindingEnabled (boolean; optional)
80 | - visible (boolean; optional)
81 | - width (string | number; optional)
82 | - wordWrapEnabled (boolean; optional)
83 |
84 | Available events: """
85 | @_explicitize_args
86 | def __init__(self, id=Component.UNDEFINED, accessKey=Component.UNDEFINED, activeStateEnabled=Component.UNDEFINED, allowColumnReordering=Component.UNDEFINED, allowColumnResizing=Component.UNDEFINED, autoExpandAll=Component.UNDEFINED, cacheEnabled=Component.UNDEFINED, cellHintEnabled=Component.UNDEFINED, columnAutoWidth=Component.UNDEFINED, columnChooser=Component.UNDEFINED, columnFixing=Component.UNDEFINED, columnHidingEnabled=Component.UNDEFINED, columnMinWidth=Component.UNDEFINED, columnResizingMode=Component.UNDEFINED, columns=Component.UNDEFINED, columnWidth=Component.UNDEFINED, customizeColumns=Component.UNDEFINED, dataSource=Component.UNDEFINED, dataStructure=Component.UNDEFINED, dateSerializationFormat=Component.UNDEFINED, disabled=Component.UNDEFINED, editing=Component.UNDEFINED, elementAttr=Component.UNDEFINED, errorRowEnabled=Component.UNDEFINED, expandedRowKeys=Component.UNDEFINED, expandNodesOnFiltering=Component.UNDEFINED, filterBuilder=Component.UNDEFINED, filterBuilderPopup=Component.UNDEFINED, filterPanel=Component.UNDEFINED, filterRow=Component.UNDEFINED, filterSyncEnabled=Component.UNDEFINED, filterValue=Component.UNDEFINED, focusedColumnIndex=Component.UNDEFINED, focusedRowEnabled=Component.UNDEFINED, focusedRowIndex=Component.UNDEFINED, focusedRowKey=Component.UNDEFINED, focusStateEnabled=Component.UNDEFINED, hasItemsExpr=Component.UNDEFINED, headerFilter=Component.UNDEFINED, height=Component.UNDEFINED, highlightChanges=Component.UNDEFINED, hint=Component.UNDEFINED, hoverStateEnabled=Component.UNDEFINED, itemsExpr=Component.UNDEFINED, keyExpr=Component.UNDEFINED, loadPanel=Component.UNDEFINED, noDataText=Component.UNDEFINED, onAdaptiveDetailRowPreparing=Component.UNDEFINED, onCellClick=Component.UNDEFINED, onCellHoverChanged=Component.UNDEFINED, onCellPrepared=Component.UNDEFINED, onContentReady=Component.UNDEFINED, onContextMenuPreparing=Component.UNDEFINED, onDataErrorOccurred=Component.UNDEFINED, onDisposing=Component.UNDEFINED, onEditingStart=Component.UNDEFINED, onEditorPrepared=Component.UNDEFINED, onEditorPreparing=Component.UNDEFINED, onFocusedCellChanged=Component.UNDEFINED, onFocusedCellChanging=Component.UNDEFINED, onFocusedRowChanged=Component.UNDEFINED, onFocusedRowChanging=Component.UNDEFINED, onInitialized=Component.UNDEFINED, onInitNewRow=Component.UNDEFINED, onKeyDown=Component.UNDEFINED, onNodesInitialized=Component.UNDEFINED, onOptionChanged=Component.UNDEFINED, onRowClick=Component.UNDEFINED, onRowCollapsed=Component.UNDEFINED, onRowCollapsing=Component.UNDEFINED, onRowExpanded=Component.UNDEFINED, onRowExpanding=Component.UNDEFINED, onRowInserted=Component.UNDEFINED, onRowInserting=Component.UNDEFINED, onRowPrepared=Component.UNDEFINED, onRowRemoved=Component.UNDEFINED, onRowRemoving=Component.UNDEFINED, onRowUpdated=Component.UNDEFINED, onRowUpdating=Component.UNDEFINED, onRowValidating=Component.UNDEFINED, onSelectionChanged=Component.UNDEFINED, onToolbarPreparing=Component.UNDEFINED, pager=Component.UNDEFINED, paging=Component.UNDEFINED, parentIdExpr=Component.UNDEFINED, remoteOperations=Component.UNDEFINED, renderAsync=Component.UNDEFINED, repaintChangesOnly=Component.UNDEFINED, rootValue=Component.UNDEFINED, rowAlternationEnabled=Component.UNDEFINED, rtlEnabled=Component.UNDEFINED, scrolling=Component.UNDEFINED, searchPanel=Component.UNDEFINED, selectedRowKeys=Component.UNDEFINED, selection=Component.UNDEFINED, showBorders=Component.UNDEFINED, showColumnHeaders=Component.UNDEFINED, showColumnLines=Component.UNDEFINED, showRowLines=Component.UNDEFINED, sorting=Component.UNDEFINED, stateStoring=Component.UNDEFINED, tabIndex=Component.UNDEFINED, twoWayBindingEnabled=Component.UNDEFINED, visible=Component.UNDEFINED, width=Component.UNDEFINED, wordWrapEnabled=Component.UNDEFINED, **kwargs):
87 | self._prop_names = ['id', 'accessKey', 'activeStateEnabled', 'allowColumnReordering', 'allowColumnResizing', 'autoExpandAll', 'cacheEnabled', 'cellHintEnabled', 'columnAutoWidth', 'columnChooser', 'columnFixing', 'columnHidingEnabled', 'columnMinWidth', 'columnResizingMode', 'columns', 'columnWidth', 'dataSource', 'dataStructure', 'dateSerializationFormat', 'disabled', 'editing', 'elementAttr', 'errorRowEnabled', 'expandedRowKeys', 'expandNodesOnFiltering', 'filterBuilder', 'filterBuilderPopup', 'filterPanel', 'filterRow', 'filterSyncEnabled', 'filterValue', 'focusedColumnIndex', 'focusedRowEnabled', 'focusedRowIndex', 'focusedRowKey', 'focusStateEnabled', 'hasItemsExpr', 'headerFilter', 'height', 'highlightChanges', 'hint', 'hoverStateEnabled', 'itemsExpr', 'keyExpr', 'loadPanel', 'noDataText', 'onCellClick', 'onRowClick', 'pager', 'paging', 'parentIdExpr', 'remoteOperations', 'renderAsync', 'repaintChangesOnly', 'rootValue', 'rowAlternationEnabled', 'rtlEnabled', 'scrolling', 'searchPanel', 'selectedRowKeys', 'selection', 'showBorders', 'showColumnHeaders', 'showColumnLines', 'showRowLines', 'sorting', 'stateStoring', 'tabIndex', 'twoWayBindingEnabled', 'visible', 'width', 'wordWrapEnabled']
88 | self._type = 'TreeList'
89 | self._namespace = 'dash_devextreme'
90 | self._valid_wildcard_attributes = []
91 | self.available_events = []
92 | self.available_properties = ['id', 'accessKey', 'activeStateEnabled', 'allowColumnReordering', 'allowColumnResizing', 'autoExpandAll', 'cacheEnabled', 'cellHintEnabled', 'columnAutoWidth', 'columnChooser', 'columnFixing', 'columnHidingEnabled', 'columnMinWidth', 'columnResizingMode', 'columns', 'columnWidth', 'dataSource', 'dataStructure', 'dateSerializationFormat', 'disabled', 'editing', 'elementAttr', 'errorRowEnabled', 'expandedRowKeys', 'expandNodesOnFiltering', 'filterBuilder', 'filterBuilderPopup', 'filterPanel', 'filterRow', 'filterSyncEnabled', 'filterValue', 'focusedColumnIndex', 'focusedRowEnabled', 'focusedRowIndex', 'focusedRowKey', 'focusStateEnabled', 'hasItemsExpr', 'headerFilter', 'height', 'highlightChanges', 'hint', 'hoverStateEnabled', 'itemsExpr', 'keyExpr', 'loadPanel', 'noDataText', 'onCellClick', 'onRowClick', 'pager', 'paging', 'parentIdExpr', 'remoteOperations', 'renderAsync', 'repaintChangesOnly', 'rootValue', 'rowAlternationEnabled', 'rtlEnabled', 'scrolling', 'searchPanel', 'selectedRowKeys', 'selection', 'showBorders', 'showColumnHeaders', 'showColumnLines', 'showRowLines', 'sorting', 'stateStoring', 'tabIndex', 'twoWayBindingEnabled', 'visible', 'width', 'wordWrapEnabled']
93 | self.available_wildcard_properties = []
94 |
95 | _explicit_args = kwargs.pop('_explicit_args')
96 | _locals = locals()
97 | _locals.update(kwargs) # For wildcard attrs
98 | args = {k: _locals[k] for k in _explicit_args if k != 'children'}
99 |
100 | for k in []:
101 | if k not in args:
102 | raise TypeError(
103 | 'Required argument `' + k + '` was not specified.')
104 | super(TreeList, self).__init__(**args)
105 |
106 | def __repr__(self):
107 | if(any(getattr(self, c, None) is not None
108 | for c in self._prop_names
109 | if c is not self._prop_names[0])
110 | or any(getattr(self, c, None) is not None
111 | for c in self.__dict__.keys()
112 | if any(c.startswith(wc_attr)
113 | for wc_attr in self._valid_wildcard_attributes))):
114 | props_string = ', '.join([c+'='+repr(getattr(self, c, None))
115 | for c in self._prop_names
116 | if getattr(self, c, None) is not None])
117 | wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
118 | for c in self.__dict__.keys()
119 | if any([c.startswith(wc_attr)
120 | for wc_attr in
121 | self._valid_wildcard_attributes])])
122 | return ('TreeList(' + props_string +
123 | (', ' + wilds_string if wilds_string != '' else '') + ')')
124 | else:
125 | return (
126 | 'TreeList(' +
127 | repr(getattr(self, self._prop_names[0], None)) + ')')
128 |
--------------------------------------------------------------------------------
/dash_devextreme/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import print_function as _
2 |
3 | import os as _os
4 | import sys as _sys
5 | import json
6 |
7 | import dash as _dash
8 |
9 | # noinspection PyUnresolvedReferences
10 | from ._imports_ import *
11 | from ._imports_ import __all__
12 |
13 | if not hasattr(_dash, 'development'):
14 | print('Dash was not successfully imported. '
15 | 'Make sure you don\'t have a file '
16 | 'named \n"dash.py" in your current directory.', file=_sys.stderr)
17 | _sys.exit(1)
18 |
19 | _basepath = _os.path.dirname(__file__)
20 | _filepath = _os.path.abspath(_os.path.join(_basepath, 'package.json'))
21 | with open(_filepath) as f:
22 | package = json.load(f)
23 |
24 | package_name = package['name'].replace(' ', '_').replace('-', '_')
25 | __version__ = package['version']
26 |
27 | _current_path = _os.path.dirname(_os.path.abspath(__file__))
28 |
29 | _this_module = _sys.modules[__name__]
30 |
31 |
32 | _js_dist = [
33 | {
34 | 'relative_package_path': 'dash_devextreme.min.js',
35 | 'dev_package_path': 'dash_devextreme.dev.js',
36 |
37 | 'namespace': package_name
38 | }
39 | ]
40 |
41 | _css_dist = []
42 |
43 |
44 | for _component in __all__:
45 | setattr(locals()[_component], '_js_dist', _js_dist)
46 | setattr(locals()[_component], '_css_dist', _css_dist)
47 |
--------------------------------------------------------------------------------
/dash_devextreme/_imports_.py:
--------------------------------------------------------------------------------
1 | from .CheckBox import CheckBox
2 | from .DataGrid import DataGrid
3 | from .PieChart import PieChart
4 | from .PivotGrid import PivotGrid
5 | from .Popover import Popover
6 | from .Popup import Popup
7 | from .SelectBox import SelectBox
8 | from .Switch import Switch
9 | from .TabPanel import TabPanel
10 | from .Tabs import Tabs
11 | from .TextBox import TextBox
12 | from .Tooltip import Tooltip
13 | from .TreeList import TreeList
14 |
15 | __all__ = [
16 | "CheckBox",
17 | "DataGrid",
18 | "PieChart",
19 | "PivotGrid",
20 | "Popover",
21 | "Popup",
22 | "SelectBox",
23 | "Switch",
24 | "TabPanel",
25 | "Tabs",
26 | "TextBox",
27 | "Tooltip",
28 | "TreeList"
29 | ]
--------------------------------------------------------------------------------
/dash_devextreme/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dash-devextreme",
3 | "version": "0.11.4",
4 | "description": "Wrapper of DevExtreme components for Plotly Dash",
5 | "main": "build/index.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/pikhovkin/dash-devextreme.git"
9 | },
10 | "license": "MIT",
11 | "bugs": {
12 | "url": "https://github.com/pikhovkin/dash-devextreme/issues"
13 | },
14 | "homepage": "https://github.com/pikhovkin/dash-devextreme",
15 | "keywords": [
16 | "dash",
17 | "plotly",
18 | "plotly-dash",
19 | "devextreme"
20 | ],
21 | "author": "Sergei Pikhovkin s@pikhovkin.ru",
22 | "scripts": {
23 | "start": "webpack-serve ./webpack.serve.config.js --open",
24 | "validate-init": "python _validate_init.py",
25 | "prepublish": "npm run validate-init",
26 | "build:js-dev": "webpack --mode development",
27 | "build:js": "webpack --mode production",
28 | "build:py": "node ./extract-meta.js src/lib/components > dash_devextreme/metadata.json && copyfiles package.json dash_devextreme && venv/bin/python -c \"import dash; dash.development.component_loader.generate_classes('dash_devextreme', 'dash_devextreme/metadata.json')\"",
29 | "build:all": "npm run build:js && npm run build:js-dev && npm run build:py",
30 | "publish-all": "npm publish && python setup.py sdist upload",
31 | "publish-pypi": "npm run prepublish && python setup.py sdist upload"
32 | },
33 | "dependencies": {
34 | "devextreme": "^18.2.3",
35 | "devextreme-react": "^18.2.3",
36 | "ramda": "^0.26.1",
37 | "react": "16.3.0",
38 | "react-dom": "16.3.3"
39 | },
40 | "devDependencies": {
41 | "babel-core": "^6.26.3",
42 | "babel-eslint": "^8.2.3",
43 | "babel-loader": "^7.1.4",
44 | "babel-preset-env": "^1.7.0",
45 | "babel-preset-react": "^6.24.1",
46 | "copyfiles": "^2.0.0",
47 | "css-loader": "^2.1.1",
48 | "eslint": "^4.19.1",
49 | "eslint-config-prettier": "^2.9.0",
50 | "eslint-plugin-import": "^2.12.0",
51 | "eslint-plugin-react": "^7.9.1",
52 | "npm": "^6.13.7",
53 | "react-docgen": "^2.20.1",
54 | "style-loader": "^0.21.0",
55 | "webpack": "^4.29.0",
56 | "webpack-cli": "^3.2.1",
57 | "webpack-serve": "^3.0.0"
58 | },
59 | "peerDependencies": {
60 | "react": ">=0.14",
61 | "react-dom": ">=0.14"
62 | },
63 | "engines": {
64 | "node": ">=8.11.0",
65 | "npm": ">=6.1.0"
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/dash_devextreme/version.py:
--------------------------------------------------------------------------------
1 | __version__ = '0.0.1'
2 |
--------------------------------------------------------------------------------
/extract-meta.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const fs = require('fs');
4 | const path = require('path');
5 | const reactDocs = require('react-docgen');
6 |
7 | const componentPaths = process.argv.slice(2);
8 | if (!componentPaths.length) {
9 | help();
10 | process.exit(1);
11 | }
12 |
13 | const metadata = Object.create(null);
14 | componentPaths.forEach(componentPath =>
15 | collectMetadataRecursively(componentPath)
16 | );
17 | writeOut(metadata);
18 |
19 | function help() {
20 | console.error('usage: ');
21 | console.error(
22 | 'extract-meta path/to/component(s) ' +
23 | ' [path/to/more/component(s), ...] > metadata.json'
24 | );
25 | }
26 |
27 | function writeError(msg, filePath) {
28 | if (filePath) {
29 | process.stderr.write(`Error with path ${filePath}`);
30 | }
31 |
32 | process.stderr.write(msg + '\n');
33 | if (msg instanceof Error) {
34 | process.stderr.write(msg.stack + '\n');
35 | }
36 | }
37 |
38 | function checkWarn(name, value) {
39 | if (value.length < 1) {
40 | process.stderr.write(`\nDescription for ${name} is missing!\n`)
41 | }
42 | }
43 |
44 | function docstringWarning(doc) {
45 | checkWarn(doc.displayName, doc.description);
46 |
47 | Object.entries(doc.props).forEach(
48 | ([name, p]) => checkWarn(`${doc.displayName}.${name}`, p.description)
49 | );
50 | }
51 |
52 |
53 | function parseFile(filepath) {
54 | const urlpath = filepath.split(path.sep).join('/');
55 | let src;
56 |
57 | if (!['.jsx', '.js'].includes(path.extname(filepath))) {
58 | return;
59 | }
60 |
61 | try {
62 | src = fs.readFileSync(filepath);
63 | const doc = metadata[urlpath] = reactDocs.parse(src);
64 | docstringWarning(doc);
65 | } catch (error) {
66 | writeError(error, filepath);
67 | }
68 | }
69 |
70 | function collectMetadataRecursively(componentPath) {
71 | if (fs.lstatSync(componentPath).isDirectory()) {
72 | let dirs;
73 | try {
74 | dirs = fs.readdirSync(componentPath);
75 | } catch (error) {
76 | writeError(error, componentPath);
77 | }
78 | dirs.forEach(filename => {
79 | const filepath = path.join(componentPath, filename);
80 | if (fs.lstatSync(filepath).isDirectory()) {
81 | collectMetadataRecursively(filepath);
82 | } else {
83 | parseFile(filepath);
84 | }
85 | });
86 | } else {
87 | parseFile(componentPath);
88 | }
89 | }
90 |
91 | function writeOut(result) {
92 | console.log(JSON.stringify(result, '\t', 2));
93 | }
94 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | my-dash-component
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dash-devextreme",
3 | "version": "0.11.4",
4 | "description": "Wrapper of DevExtreme components for Plotly Dash",
5 | "main": "build/index.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/pikhovkin/dash-devextreme.git"
9 | },
10 | "license": "MIT",
11 | "bugs": {
12 | "url": "https://github.com/pikhovkin/dash-devextreme/issues"
13 | },
14 | "homepage": "https://github.com/pikhovkin/dash-devextreme",
15 | "keywords": [
16 | "dash",
17 | "plotly",
18 | "plotly-dash",
19 | "devextreme"
20 | ],
21 | "author": "Sergei Pikhovkin s@pikhovkin.ru",
22 | "scripts": {
23 | "start": "webpack-serve ./webpack.serve.config.js --open",
24 | "validate-init": "python _validate_init.py",
25 | "prepublish": "npm run validate-init",
26 | "build:js-dev": "webpack --mode development",
27 | "build:js": "webpack --mode production",
28 | "build:py": "node ./extract-meta.js src/lib/components > dash_devextreme/metadata.json && copyfiles package.json dash_devextreme && venv/bin/python -c \"import dash; dash.development.component_loader.generate_classes('dash_devextreme', 'dash_devextreme/metadata.json')\"",
29 | "build:all": "npm run build:js && npm run build:js-dev && npm run build:py",
30 | "publish-all": "npm publish && python setup.py sdist upload",
31 | "publish-pypi": "npm run prepublish && python setup.py sdist upload"
32 | },
33 | "dependencies": {
34 | "devextreme": "^18.2.3",
35 | "devextreme-react": "^18.2.3",
36 | "ramda": "^0.26.1",
37 | "react": "16.3.0",
38 | "react-dom": "16.3.3"
39 | },
40 | "devDependencies": {
41 | "babel-core": "^6.26.3",
42 | "babel-eslint": "^8.2.3",
43 | "babel-loader": "^7.1.4",
44 | "babel-preset-env": "^1.7.0",
45 | "babel-preset-react": "^6.24.1",
46 | "copyfiles": "^2.0.0",
47 | "css-loader": "^2.1.1",
48 | "eslint": "^4.19.1",
49 | "eslint-config-prettier": "^2.9.0",
50 | "eslint-plugin-import": "^2.12.0",
51 | "eslint-plugin-react": "^7.9.1",
52 | "npm": "^6.13.7",
53 | "react-docgen": "^2.20.1",
54 | "style-loader": "^0.21.0",
55 | "webpack": "^4.29.0",
56 | "webpack-cli": "^3.2.1",
57 | "webpack-serve": "^3.0.0"
58 | },
59 | "peerDependencies": {
60 | "react": ">=0.14",
61 | "react-dom": ">=0.14"
62 | },
63 | "engines": {
64 | "node": ">=8.11.0",
65 | "npm": ">=6.1.0"
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | # dash is required to call `build:py`
2 | dash
3 | dash-html-components
--------------------------------------------------------------------------------
/review_checklist.md:
--------------------------------------------------------------------------------
1 | # Code Review Checklist
2 |
3 | ## Code quality & design
4 |
5 | - Is your code clear? If you had to go back to it in a month, would you be happy to? If someone else had to contribute to it, would they be able to?
6 |
7 | A few suggestions:
8 |
9 | - Make your variable names descriptive and use the same naming conventions throughout the code.
10 |
11 | - For more complex pieces of logic, consider putting a comment, and maybe an example.
12 |
13 | - In the comments, focus on describing _why_ the code does what it does, rather than describing _what_ it does. The reader can most likely read the code, but not necessarily understand why it was necessary.
14 |
15 | - Don't overdo it in the comments. The code should be clear enough to speak for itself. Stale comments that no longer reflect the intent of the code can hurt code comprehension.
16 |
17 | * Don't repeat yourself. Any time you see that the same piece of logic can be applied in multiple places, factor it out into a function, or variable, and reuse that code.
18 | * Scan your code for expensive operations (large computations, DOM queries, React re-renders). Have you done your possible to limit their impact? If not, it is going to slow your app down.
19 | * Can you think of cases where your current code will break? How are you handling errors? Should the user see them as notifications? Should your app try to auto-correct them for them?
20 |
21 | ## Component API
22 |
23 | - Have you tested your component on the Python side by creating an app in `usage.py` ?
24 |
25 | Do all of your component's props work when set from the back-end?
26 |
27 | Should all of them be settable from the back-end or are some only relevant to user interactions in the front-end?
28 |
29 | - Have you provided some basic documentation about your component? The Dash community uses [react docstrings](https://github.com/plotly/dash-docs/blob/master/tutorial/plugins.py#L45) to provide basic information about dash components. Take a look at this [Checklist component example](https://github.com/plotly/dash-core-components/blob/master/src/components/Checklist.react.js) and others from the dash-core-components repository.
30 |
31 | At a minimum, you should describe what your component does, and describe its props and the features they enable.
32 |
33 | Be careful to use the correct formatting for your docstrings for them to be properly recognized.
34 |
35 | ## Tests
36 |
37 | - The Dash team uses integration tests extensively, and we highly encourage you to write tests for the main functionality of your component. In the `tests` folder of the boilerplate, you can see a sample integration test. By launching it, you will run a sample Dash app in a browser. You can run the test with:
38 | ```
39 | python -m tests.test_render
40 | ```
41 | [Browse the Dash component code on GitHub for more examples of testing.](https://github.com/plotly/dash-core-components)
42 |
43 | ## Ready to publish? Final scan
44 |
45 | - Take a last look at the external resources that your component is using. Are all the external resources used [referenced in `MANIFEST.in`](https://github.com/plotly/dash-docs/blob/0b2fd8f892db720a7f3dc1c404b4cff464b5f8d4/tutorial/plugins.py#L55)?
46 |
47 | - [You're ready to publish!](https://github.com/plotly/dash-component-boilerplate/blob/master/%7B%7Bcookiecutter.project_shortname%7D%7D/README.md#create-a-production-build-and-publish)
48 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | from setuptools import setup
4 | import io
5 |
6 |
7 | with open(os.path.join('dash_devextreme', 'package.json')) as f:
8 | package = json.load(f)
9 |
10 | package_name = package["name"].replace(" ", "_").replace("-", "_")
11 |
12 | setup(
13 | name=package_name,
14 | version=package["version"],
15 | author=package['author'],
16 | packages=[package_name],
17 | include_package_data=True,
18 | license=package['license'],
19 | description=package['description'] if 'description' in package else package_name,
20 | long_description=io.open('README.md', encoding='utf-8').read(),
21 | long_description_content_type='text/markdown',
22 | install_requires=[],
23 | classifiers=[
24 | 'Environment :: Web Environment',
25 | 'License :: OSI Approved :: MIT License',
26 | 'Programming Language :: Python :: 2.7',
27 | 'Programming Language :: Python :: 3',
28 | ]
29 | )
30 |
--------------------------------------------------------------------------------
/src/demo/App.js:
--------------------------------------------------------------------------------
1 | /* eslint no-magic-numbers: 0 */
2 | import React, {Component} from 'react';
3 |
4 | import dash_devextreme from '../lib';
5 |
6 | class App extends Component {
7 |
8 | constructor() {
9 | super();
10 | this.state = {
11 | value: ''
12 | };
13 | this.setProps = this.setProps.bind(this);
14 | }
15 |
16 | setProps(newProps) {
17 | this.setState(newProps);
18 | }
19 |
20 | render() {
21 | return (
22 |
23 |
27 |
28 | )
29 | }
30 | }
31 |
32 | export default App;
33 |
--------------------------------------------------------------------------------
/src/demo/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(, document.getElementById('root'));
6 |
--------------------------------------------------------------------------------
/src/lib/components/CheckBox.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {CheckBox as DXCheckBox} from 'devextreme-react';
5 |
6 |
7 | export default class CheckBox extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.state = {
12 | value: props.value,
13 | visible: props.visible,
14 | isValid: props.isValid,
15 | disabled: props.disabled,
16 | };
17 |
18 | this.onValueChanged = this.onValueChanged.bind(this);
19 | }
20 |
21 | onValueChanged(e) {
22 | const {setProps, fireEvent} = this.props;
23 |
24 | this.setState({value: e.value});
25 | if (setProps) setProps({value: e.value});
26 | if (fireEvent) fireEvent('change');
27 | }
28 |
29 | render() {
30 | return (
31 |
38 | )
39 | }
40 | }
41 |
42 | CheckBox.propTypes = {
43 | /**
44 | * The ID used to identify this compnent in Dash callbacks
45 | */
46 | id: PropTypes.string,
47 |
48 | accessKey: PropTypes.string,
49 | activeStateEnabled: PropTypes.bool,
50 | disabled: PropTypes.bool,
51 | elementAttr: PropTypes.object,
52 | focusStateEnabled: PropTypes.bool,
53 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
54 | hint: PropTypes.string,
55 | hoverStateEnabled: PropTypes.bool,
56 | isValid: PropTypes.bool,
57 | name: PropTypes.string,
58 | onContentReady: PropTypes.func,
59 | onDisposing: PropTypes.func,
60 | onInitialized: PropTypes.func,
61 | onOptionChanged: PropTypes.func,
62 | onValueChanged: PropTypes.func,
63 | readOnly: PropTypes.bool,
64 | rtlEnabled: PropTypes.bool,
65 | tabIndex: PropTypes.number,
66 | text: PropTypes.string,
67 | validationError: PropTypes.object,
68 | validationMessageMode: PropTypes.oneOf(['always', 'auto']),
69 | value: PropTypes.bool,
70 | visible: PropTypes.bool,
71 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
72 |
73 | /**
74 | * Dash-assigned callback that gets fired when the checkbox item gets selected.
75 | */
76 | fireEvent: PropTypes.func,
77 |
78 | /**
79 | * Dash-assigned callback that gets fired when the value changes.
80 | */
81 | setProps: PropTypes.func,
82 |
83 | dashEvents: PropTypes.oneOf(['change']),
84 | };
85 |
86 | CheckBox.defaultProps = {
87 | accessKey: null,
88 | activeStateEnabled: true,
89 | disabled: false,
90 | elementAttr: {},
91 | focusStateEnabled: true,
92 | // height: undefined,
93 | // hint: undefined,
94 | hoverStateEnabled: true,
95 | isValid: true,
96 | name: '',
97 | onContentReady: null,
98 | onDisposing: null,
99 | onInitialized: null,
100 | onOptionChanged: null,
101 | onValueChanged: null,
102 | readOnly: false,
103 | rtlEnabled: false,
104 | tabIndex: 0,
105 | text: '',
106 | // validationError: undefined,
107 | validationMessageMode: 'auto',
108 | value: null,
109 | visible: true,
110 | width: ''
111 | };
112 |
--------------------------------------------------------------------------------
/src/lib/components/DataGrid.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import ReactDOM from 'react-dom';
3 | import PropTypes from 'prop-types';
4 |
5 | import {DataGrid as DXDataGrid} from 'devextreme-react';
6 |
7 |
8 | export default class DataGrid extends Component {
9 | constructor(props) {
10 | super(props);
11 |
12 | this.rowTemplate = this.rowTemplate.bind(this);
13 | this.cellTemplate = this.cellTemplate.bind(this);
14 | this.headerCellTemplate = this.headerCellTemplate.bind(this);
15 | this._processCellTemplate = this._processCellTemplate.bind(this);
16 | }
17 |
18 | rowTemplate(template_id) {
19 | var tmpl = window[template_id];
20 | return function(container, options) {
21 | const d = window.document.createElement('div');
22 | ReactDOM.render(tmpl(options), d);
23 | container.append(d.firstChild);
24 | }
25 | }
26 |
27 | cellTemplate(template_id) {
28 | var tmpl = window[template_id];
29 | return function(container, options) {
30 | ReactDOM.render(tmpl(options), container);
31 | }
32 | }
33 |
34 | headerCellTemplate(template_id) {
35 | var tmpl = window[template_id];
36 | return function(container, options) {
37 | ReactDOM.render(tmpl(options), container);
38 | }
39 | }
40 |
41 | _processCellTemplate(columns) {
42 | for(const c in columns){
43 | if (columns[c].cellTemplate && typeof columns[c].cellTemplate === 'string') {
44 | columns[c].cellTemplate = this.cellTemplate(columns[c].cellTemplate);
45 | }
46 | if (columns[c].headerCellTemplate && typeof columns[c].headerCellTemplate === 'string') {
47 | columns[c].headerCellTemplate = this.headerCellTemplate(columns[c].headerCellTemplate);
48 | }
49 | if (columns[c].columns && typeof columns[c].columns === 'object') {
50 | this._processCellTemplate(columns[c].columns);
51 | }
52 | }
53 | }
54 |
55 | render() {
56 | const {columns, setProps} = this.props;
57 | let {rowTemplate} = this.props;
58 |
59 | this._processCellTemplate(columns);
60 |
61 | if (rowTemplate && typeof rowTemplate === 'string'){
62 | rowTemplate = this.rowTemplate(rowTemplate);
63 | }
64 |
65 | return (
66 | {
70 | if (setProps) {
71 | setProps({
72 | cell: {
73 | area: e.area,
74 | cell: {
75 | columnPath: e.cell.columnPath,
76 | dataIndex: e.cell.dataIndex,
77 | expanded: e.cell.expanded,
78 | path: e.cell.path,
79 | rowPath: e.cell.rowPath,
80 | text: e.cell.text,
81 | value: e.cell.value
82 | },
83 | rowIndex: e.rowIndex,
84 | columnIndex: e.columnIndex,
85 | columnFields: e.columnFields,
86 | rowFields: e.rowFields,
87 | dataFields: e.dataFields
88 | }
89 | });
90 | }
91 | }}
92 | />
93 | );
94 | }
95 | }
96 |
97 | DataGrid.propTypes = {
98 | id: PropTypes.string,
99 |
100 | accessKey: PropTypes.string,
101 | activeStateEnabled: PropTypes.bool,
102 | allowColumnReordering: PropTypes.bool,
103 | allowColumnResizing: PropTypes.bool,
104 | cacheEnabled: PropTypes.bool,
105 | cellHintEnabled: PropTypes.bool,
106 | columnAutoWidth: PropTypes.bool,
107 | columnChooser: PropTypes.object,
108 | columnFixing: PropTypes.object,
109 | columnHidingEnabled: PropTypes.bool,
110 | columnMinWidth: PropTypes.number,
111 | columnResizingMode: PropTypes.oneOf(['nextColumn', 'widget']),
112 | columns: PropTypes.arrayOf(PropTypes.object),
113 | columnWidth: PropTypes.number,
114 | customizeColumns: PropTypes.func,
115 | customizeExportData: PropTypes.func,
116 | dataSource: PropTypes.oneOfType([PropTypes.object, PropTypes.arrayOf(PropTypes.object)]),
117 | dateSerializationFormat: PropTypes.string,
118 | disabled: PropTypes.bool,
119 | editing: PropTypes.object,
120 | elementAttr: PropTypes.object,
121 | errorRowEnabled: PropTypes.bool,
122 | export: PropTypes.object,
123 | filterBuilder: PropTypes.object,
124 | filterBuilderPopup: PropTypes.object,
125 | filterPanel: PropTypes.object,
126 | filterRow: PropTypes.object,
127 | filterSyncEnabled: PropTypes.bool,
128 | filterValue: PropTypes.object,
129 | focusedColumnIndex: PropTypes.number,
130 | focusedRowEnabled: PropTypes.bool,
131 | focusedRowIndex: PropTypes.number,
132 | focusedRowKey: PropTypes.any,
133 | focusStateEnabled: PropTypes.bool,
134 | grouping: PropTypes.object,
135 | groupPanel: PropTypes.object,
136 | headerFilter: PropTypes.object,
137 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
138 | highlightChanges: PropTypes.bool,
139 | hint: PropTypes.string,
140 | hoverStateEnabled: PropTypes.bool,
141 | keyExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
142 | loadPanel: PropTypes.object,
143 | masterDetail: PropTypes.object,
144 | noDataText: PropTypes.string,
145 | onAdaptiveDetailRowPreparing: PropTypes.func,
146 | onCellClick: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
147 | onCellHoverChanged: PropTypes.func,
148 | onCellPrepared: PropTypes.func,
149 | onContentReady: PropTypes.func,
150 | onContextMenuPreparing: PropTypes.func,
151 | onDataErrorOccurred: PropTypes.func,
152 | onDisposing: PropTypes.func,
153 | onEditingStart: PropTypes.func,
154 | onEditorPrepared: PropTypes.func,
155 | onEditorPreparing: PropTypes.func,
156 | onExported: PropTypes.func,
157 | onExporting: PropTypes.func,
158 | onFileSaving: PropTypes.func,
159 | onFocusedCellChanged: PropTypes.func,
160 | onFocusedCellChanging: PropTypes.func,
161 | onFocusedRowChanged: PropTypes.func,
162 | onFocusedRowChanging: PropTypes.func,
163 | onInitialized: PropTypes.func,
164 | onInitNewRow: PropTypes.func,
165 | onKeyDown: PropTypes.func,
166 | onOptionChanged: PropTypes.func,
167 | onRowClick: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
168 | onRowCollapsed: PropTypes.func,
169 | onRowCollapsing: PropTypes.func,
170 | onRowExpanded: PropTypes.func,
171 | onRowExpanding: PropTypes.func,
172 | onRowInserted: PropTypes.func,
173 | onRowInserting: PropTypes.func,
174 | onRowPrepared: PropTypes.func,
175 | onRowRemoved: PropTypes.func,
176 | onRowRemoving: PropTypes.func,
177 | onRowUpdated: PropTypes.func,
178 | onRowUpdating: PropTypes.func,
179 | onRowValidating: PropTypes.func,
180 | onSelectionChanged: PropTypes.func,
181 | onToolbarPreparing: PropTypes.func,
182 | pager: PropTypes.object,
183 | paging: PropTypes.object,
184 | remoteOperations: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
185 | renderAsync: PropTypes.bool,
186 | repaintChangesOnly: PropTypes.bool,
187 | rowAlternationEnabled: PropTypes.bool,
188 | rowTemplate: PropTypes.string,
189 | rtlEnabled: PropTypes.bool,
190 | scrolling: PropTypes.object,
191 | searchPanel: PropTypes.object,
192 | selectedRowKeys: PropTypes.arrayOf(PropTypes.any),
193 | selection: PropTypes.object,
194 | selectionFilter: PropTypes.arrayOf(PropTypes.shape),
195 | showBorders: PropTypes.bool,
196 | showColumnHeaders: PropTypes.bool,
197 | showColumnLines: PropTypes.bool,
198 | showRowLines: PropTypes.bool,
199 | sortByGroupSummaryInfo: PropTypes.arrayOf(PropTypes.object),
200 | sorting: PropTypes.object,
201 | stateStoring: PropTypes.object,
202 | summary: PropTypes.object,
203 | tabIndex: PropTypes.number,
204 | twoWayBindingEnabled: PropTypes.bool,
205 | visible: PropTypes.bool,
206 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
207 | wordWrapEnabled: PropTypes.bool,
208 |
209 | // Dash supplied props
210 | setProps: PropTypes.func
211 | };
212 |
213 | DataGrid.defaultProps = {
214 | accessKey: null,
215 | activeStateEnabled: false,
216 | allowColumnReordering: false,
217 | allowColumnResizing: false,
218 | cacheEnabled: true,
219 | cellHintEnabled: true,
220 | columnAutoWidth: false,
221 | // columnChooser
222 | // columnFixing
223 | columnHidingEnabled: false,
224 | // columnMinWidth
225 | columnResizingMode: 'nextColumn',
226 | // columns
227 | // columnWidth
228 | // customizeColumns
229 | // customizeExportData
230 | dataSource: null,
231 | // dateSerializationFormat
232 | disabled: false,
233 | // editing
234 | elementAttr: {},
235 | errorRowEnabled: true,
236 | // export
237 | filterBuilder: {},
238 | filterBuilderPopup: {},
239 | filterPanel: {},
240 | // filterRow
241 | // filterSyncEnabled
242 | filterValue: null,
243 | focusedColumnIndex: -1,
244 | focusedRowEnabled: false,
245 | focusedRowIndex: -1,
246 | // focusedRowKey
247 | focusStateEnabled: false,
248 | // grouping
249 | // groupPanel
250 | // headerFilter
251 | // height
252 | highlightChanges: false,
253 | // hint
254 | hoverStateEnabled: false,
255 | // keyExpr
256 | // loadPanel
257 | // masterDetail
258 | noDataText: 'No data',
259 | onAdaptiveDetailRowPreparing: null,
260 | onCellClick: null,
261 | onCellHoverChanged: null,
262 | onCellPrepared: null,
263 | onContentReady: null,
264 | onContextMenuPreparing: null,
265 | onDataErrorOccurred: null,
266 | onDisposing: null,
267 | onEditingStart: null,
268 | onEditorPrepared: null,
269 | onEditorPreparing: null,
270 | onExported: null,
271 | onExporting: null,
272 | onFileSaving: null,
273 | onFocusedCellChanged: null,
274 | onFocusedCellChanging: null,
275 | onFocusedRowChanged: null,
276 | onFocusedRowChanging: null,
277 | onInitialized: null,
278 | onInitNewRow: null,
279 | onKeyDown: null,
280 | onOptionChanged: null,
281 | onRowClick: null,
282 | onRowCollapsed: null,
283 | onRowCollapsing: null,
284 | onRowExpanded: null,
285 | onRowExpanding: null,
286 | onRowInserted: null,
287 | onRowInserting: null,
288 | onRowPrepared: null,
289 | onRowRemoved: null,
290 | onRowRemoving: null,
291 | onRowUpdated: null,
292 | onRowUpdating: null,
293 | onRowValidating: null,
294 | onSelectionChanged: null,
295 | onToolbarPreparing: null,
296 | // pager
297 | // paging
298 | // remoteOperations
299 | renderAsync: false,
300 | repaintChangesOnly: false,
301 | rowAlternationEnabled: false,
302 | // rowTemplate
303 | rtlEnabled: false,
304 | // scrolling
305 | // searchPanel
306 | // selectedRowKeys
307 | // selection
308 | selectionFilter: [],
309 | showBorders: false,
310 | showColumnHeaders: true,
311 | showColumnLines: true, // false (Material)
312 | showRowLines: false, // true (iOS, Material)
313 | // sortByGroupSummaryInfo
314 | // sorting
315 | // stateStoring
316 | // summary
317 | tabIndex: 0,
318 | twoWayBindingEnabled: true,
319 | visible: true,
320 | // width
321 | wordWrapEnabled: false,
322 | };
323 |
--------------------------------------------------------------------------------
/src/lib/components/PieChart.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {PieChart as DXPieChart} from 'devextreme-react/pie-chart';
5 |
6 |
7 | export default class PieChart extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.customizeText = this.customizeText.bind(this);
12 | }
13 |
14 | customizeText(series) {
15 | if (typeof series === 'object' && series.label && series.label.customizeText) {
16 | if (window[series.label.customizeText]) {
17 | series.label.customizeText = window[series.label.customizeText];
18 | }
19 | }
20 | }
21 |
22 | render() {
23 | const {series} = this.props;
24 | if (series) {
25 | if (Array.isArray(series)) {
26 | for(let i=0; i < series.length; i++) {
27 | this.customizeText(series[i]);
28 | }
29 | } else {
30 | this.customizeText(series);
31 | }
32 | }
33 |
34 | return (
35 |
36 | )
37 | }
38 | }
39 |
40 | PieChart.propTypes = {
41 | /**
42 | * The ID used to identify this compnent in Dash callbacks
43 | */
44 | id: PropTypes.string,
45 |
46 | adaptiveLayout: PropTypes.object,
47 | animation: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]),
48 | commonSeriesSettings: PropTypes.object,
49 | customizeLabel: PropTypes.func,
50 | customizePoint: PropTypes.func,
51 | dataSource: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.any), PropTypes.object, PropTypes.string]),
52 | diameter: PropTypes.number,
53 | disabled: PropTypes.bool,
54 | elementAttr: PropTypes.object,
55 | export: PropTypes.object,
56 | innerRadius: PropTypes.number,
57 | legend: PropTypes.object,
58 | loadingIndicator: PropTypes.object,
59 | margin: PropTypes.object,
60 | minDiameter: PropTypes.number,
61 | onDisposing: PropTypes.func,
62 | onDone: PropTypes.func,
63 | onDrawn: PropTypes.func,
64 | onExported: PropTypes.func,
65 | onExporting: PropTypes.func,
66 | onFileSaving: PropTypes.func,
67 | onIncidentOccurred: PropTypes.func,
68 | onInitialized: PropTypes.func,
69 | onLegendClick: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
70 | onOptionChanged: PropTypes.func,
71 | onPointClick: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
72 | onPointHoverChanged: PropTypes.func,
73 | onPointSelectionChanged: PropTypes.func,
74 | onTooltipHidden: PropTypes.func,
75 | onTooltipShown: PropTypes.func,
76 | palette: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.oneOf(['Bright', 'Harmony Light', 'Ocean', 'Pastel', 'Soft', 'Soft Pastel', 'Vintage', 'Violet', 'Carmine', 'Dark Moon', 'Dark Violet', 'Green Mist', 'Soft Blue', 'Material', 'Office'])]),
77 | paletteExtensionMode: PropTypes.oneOf(['alternate', 'blend', 'extrapolate']),
78 | pathModified: PropTypes.bool,
79 | pointSelectionMode: PropTypes.oneOf(['multiple', 'single' ]),
80 | redrawOnResize: PropTypes.bool,
81 | resolveLabelOverlapping: PropTypes.oneOf(['hide', 'none', 'shift']),
82 | rtlEnabled: PropTypes.bool,
83 | segmentsDirection: PropTypes.oneOf(['anticlockwise', 'clockwise']),
84 | series: PropTypes.oneOfType([PropTypes.object, PropTypes.arrayOf(PropTypes.object)]),
85 | seriesTemplate: PropTypes.object,
86 | size: PropTypes.object,
87 | sizeGroup: PropTypes.string,
88 | startAngle: PropTypes.number,
89 | theme: PropTypes.oneOf(['generic.dark', 'generic.light', 'generic.contrast', 'ios7.default', 'generic.carmine', 'generic.darkmoon', 'generic.darkviolet', 'generic.greenmist', 'generic.softblue', 'material.blue.light', 'material.lime.light', 'material.orange.light', 'material.purple.light', 'material.teal.light']),
90 | title: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
91 | tooltip: PropTypes.object,
92 | type: PropTypes.oneOf(['donut', 'doughnut', 'pie']),
93 |
94 | setProps: PropTypes.func
95 | };
96 |
97 | PieChart.defaultProps = {
98 | adaptiveLayout: {},
99 | animation: {},
100 | commonSeriesSettings: {},
101 | customizeLabel: null,
102 | customizePoint: null,
103 | dataSource: null,
104 | // diameter: undefined,
105 | disabled: false,
106 | elementAttr: {},
107 | export: {},
108 | innerRadius: 0.5,
109 | legend: {},
110 | loadingIndicator: {},
111 | margin: {},
112 | minDiameter: 0.5,
113 | onDisposing: null,
114 | onDone: null,
115 | onDrawn: null,
116 | onExported: null,
117 | onExporting: null,
118 | onFileSaving: null,
119 | onIncidentOccurred: null,
120 | onInitialized: null,
121 | onLegendClick: null,
122 | onOptionChanged: null,
123 | onPointClick: null,
124 | onPointHoverChanged: null,
125 | onPointSelectionChanged: null,
126 | onTooltipHidden: null,
127 | onTooltipShown: null,
128 | palette: 'Material',
129 | paletteExtensionMode: 'blend',
130 | pathModified: false,
131 | pointSelectionMode: 'single',
132 | redrawOnResize: true,
133 | resolveLabelOverlapping: 'none',
134 | rtlEnabled: false,
135 | segmentsDirection: 'clockwise',
136 | series: [],
137 | // seriesTemplate: undefined,
138 | size: {},
139 | // sizeGroup: undefined,
140 | startAngle: 0,
141 | theme: 'generic.light',
142 | title: {},
143 | tooltip: {},
144 | type: 'pie'
145 | };
146 |
--------------------------------------------------------------------------------
/src/lib/components/PivotGrid.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {PivotGrid as DXPivotGrid} from 'devextreme-react';
5 |
6 |
7 | export default class PivotGrid extends Component {
8 | render() {
9 | const {setProps} = this.props;
10 |
11 | return (
12 | {
16 | if (setProps) {
17 | setProps({
18 | cell: {
19 | area: e.area,
20 | cell: {
21 | columnPath: e.cell.columnPath,
22 | dataIndex: e.cell.dataIndex,
23 | expanded: e.cell.expanded,
24 | path: e.cell.path,
25 | rowPath: e.cell.rowPath,
26 | text: e.cell.text,
27 | value: e.cell.value
28 | },
29 | rowIndex: e.rowIndex,
30 | columnIndex: e.columnIndex,
31 | columnFields: e.columnFields,
32 | rowFields: e.rowFields,
33 | dataFields: e.dataFields
34 | }
35 | });
36 | }
37 | }}
38 | />
39 | );
40 | }
41 | }
42 |
43 | PivotGrid.propTypes = {
44 | // These props are "custom" - defined by me.
45 | id: PropTypes.string,
46 |
47 | dataSource: PropTypes.object,
48 |
49 | // Dash supplied props
50 | setProps: PropTypes.func
51 | };
52 |
--------------------------------------------------------------------------------
/src/lib/components/Popover.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {Popover as DXPopover} from 'devextreme-react';
5 |
6 |
7 | export default class Popover extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.state = {visible: this.props.visible, target: this.props.target};
12 |
13 | this.onInitialized = this.onInitialized.bind(this);
14 | this.onShowing = this.onShowing.bind(this);
15 | this.onHiding = this.onHiding.bind(this);
16 | }
17 |
18 | onInitialized(e) {
19 | this.setState({target: document.getElementById(this.props.target)});
20 | }
21 |
22 | onShowing(e) {
23 | this.setState({visible: true});
24 | }
25 |
26 | onHiding(e) {
27 | this.setState({visible: false});
28 | }
29 |
30 | render() {
31 | return (
32 |
39 | )
40 | }
41 | }
42 |
43 | Popover.propTypes = {
44 | /**
45 | * The ID used to identify this compnent in Dash callbacks
46 | */
47 | id: PropTypes.string,
48 |
49 | animation: PropTypes.object,
50 | children: PropTypes.node,
51 | closeOnBackButton: PropTypes.bool,
52 | closeOnOutsideClick: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
53 | container: PropTypes.string,
54 | // contentTemplate: PropTypes.string,
55 | deferRendering: PropTypes.bool,
56 | disabled: PropTypes.bool,
57 | elementAttr: PropTypes.object,
58 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
59 | hideEvent: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
60 | hint: PropTypes.string,
61 | hoverStateEnabled: PropTypes.bool,
62 | maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
63 | maxWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
64 | minHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
65 | minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
66 | onContentReady: PropTypes.func,
67 | onDisposing: PropTypes.func,
68 | onHidden: PropTypes.func,
69 | onHiding: PropTypes.func,
70 | onInitialized: PropTypes.func,
71 | onOptionChanged: PropTypes.func,
72 | onShowing: PropTypes.func,
73 | onShown: PropTypes.func,
74 | position: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'left', 'right', 'top']), PropTypes.object]),
75 | rtlEnabled: PropTypes.bool,
76 | shading: PropTypes.bool,
77 | shadingColor: PropTypes.string,
78 | showCloseButton: PropTypes.bool,
79 | showEvent: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
80 | showTitle: PropTypes.bool,
81 | target: PropTypes.string,
82 | title: PropTypes.string,
83 | titleTemplate: PropTypes.string,
84 | toolbarItems: PropTypes.arrayOf(PropTypes.object),
85 | visible: PropTypes.bool,
86 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
87 |
88 | setProps: PropTypes.func
89 | };
90 |
91 | Popover.defaultProps = {
92 | animation: {show: {type: 'fade', from: 0, to: 1}, hide: {type: 'fade', to: 0}},
93 | children: null,
94 | closeOnBackButton: true,
95 | closeOnOutsideClick: true,
96 | // container: undefined,
97 | // contentTemplate: 'content',
98 | deferRendering: true,
99 | disabled: false,
100 | elementAttr: {},
101 | height: 'auto',
102 | // hideEvent: undefined,
103 | // hint: undefined,
104 | hoverStateEnabled: false,
105 | maxHeight: null,
106 | maxWidth: null,
107 | minHeight: null,
108 | minWidth: null,
109 | onContentReady: null,
110 | onDisposing: null,
111 | onHidden: null,
112 | onHiding: null,
113 | onInitialized: null,
114 | onOptionChanged: null,
115 | onShowing: null,
116 | onShown: null,
117 | position: 'bottom',
118 | rtlEnabled: false,
119 | shading: false,
120 | shadingColor: '',
121 | showCloseButton: false, // true (desktop)
122 | // showEvent: undefined,
123 | showTitle: false,
124 | // target
125 | title: '',
126 | titleTemplate: 'title',
127 | // toolbarItems
128 | visible: false,
129 | width: 'auto'
130 | };
131 |
--------------------------------------------------------------------------------
/src/lib/components/Popup.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {Popup as DXPopup} from 'devextreme-react';
5 |
6 |
7 | export default class Popup extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.state = {visible: this.props.visible};
12 |
13 | this.closeOnOutsideClick = this.closeOnOutsideClick.bind(this);
14 | }
15 |
16 | closeOnOutsideClick(e) {
17 | e;
18 | this.setState({visible: false});
19 | return true;
20 | }
21 |
22 | render() {
23 | return
32 | }
33 | }
34 |
35 | Popup.propTypes = {
36 | /**
37 | * The ID used to identify this compnent in Dash callbacks
38 | */
39 | id: PropTypes.string,
40 | children: PropTypes.node,
41 | showTitle: PropTypes.bool,
42 | title: PropTypes.string,
43 | visible: PropTypes.bool,
44 | dragEnabled: PropTypes.bool,
45 | closeOnOutsideClick: PropTypes.bool,
46 | closeOnBackButton: PropTypes.bool,
47 |
48 | /**
49 | * Dash-assigned callback that should be called whenever any of the
50 | * properties change
51 | */
52 | setProps: PropTypes.func
53 | };
54 |
--------------------------------------------------------------------------------
/src/lib/components/SelectBox.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 | import * as R from 'ramda';
4 |
5 | import {SelectBox as DXSelectBox} from 'devextreme-react';
6 |
7 |
8 | export default class SelectBox extends Component {
9 | constructor(props) {
10 | super(props);
11 |
12 | this.state = {
13 | value: props.value,
14 | opened: props.opened
15 | };
16 |
17 | this.onValueChanged = this.onValueChanged.bind(this);
18 | this.onOpened = this.onOpened.bind(this);
19 | this.onFocusOut = this.onFocusOut.bind(this);
20 | }
21 |
22 | onValueChanged(e) {
23 | const {setProps, fireEvent} = this.props;
24 | if (setProps) {
25 | setProps({
26 | value: {value: e.value, previousValue: e.previousValue}
27 | });
28 | }
29 | this.setState({value: e.value, opened: false});
30 | if (fireEvent) fireEvent({event: 'change'});
31 | }
32 |
33 | onOpened(e) {
34 | this.setState({opened: true});
35 | }
36 |
37 | onFocusOut(e) {
38 | this.setState({opened: false});
39 | }
40 |
41 | render() {
42 | return (
43 |
52 | );
53 | }
54 | }
55 |
56 | SelectBox.propTypes = {
57 | id: PropTypes.string,
58 |
59 | acceptCustomValue: PropTypes.bool,
60 | accessKey: PropTypes.string,
61 | activeStateEnabled: PropTypes.bool,
62 | dataSource: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.any)]),
63 | deferRendering: PropTypes.bool,
64 | disabled: PropTypes.bool,
65 | displayExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
66 | dropDownButtonTemplate: PropTypes.string,
67 | elementAttr: PropTypes.object,
68 | fieldTemplate: PropTypes.string,
69 | focusStateEnabled: PropTypes.bool,
70 | grouped: PropTypes.bool,
71 | groupTemplate: PropTypes.string,
72 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
73 | hint: PropTypes.string,
74 | hoverStateEnabled: PropTypes.bool,
75 | inputAttr: PropTypes.object,
76 | isValid: PropTypes.bool,
77 | dxItems: PropTypes.arrayOf(PropTypes.any),
78 | itemTemplate: PropTypes.string,
79 | maxLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
80 | minSearchLength: PropTypes.number,
81 | name: PropTypes.string,
82 | noDataText: PropTypes.string,
83 | onChange: PropTypes.func,
84 | onClosed: PropTypes.func,
85 | onContentReady: PropTypes.func,
86 | onCopy: PropTypes.func,
87 | onCustomItemCreating: PropTypes.func,
88 | onCut: PropTypes.func,
89 | onDisposing: PropTypes.func,
90 | onEnterKey: PropTypes.func,
91 | onFocusIn: PropTypes.func,
92 | onFocusOut: PropTypes.func,
93 | onInitialized: PropTypes.func,
94 | onInput: PropTypes.func,
95 | onItemClick: PropTypes.func,
96 | onKeyDown: PropTypes.func,
97 | onKeyPress: PropTypes.func,
98 | onKeyUp: PropTypes.func,
99 | onOpened: PropTypes.func,
100 | onOptionChanged: PropTypes.func,
101 | onPaste: PropTypes.func,
102 | onSelectionChanged: PropTypes.func,
103 | onValueChanged: PropTypes.func,
104 | opened: PropTypes.bool,
105 | openOnFieldClick: PropTypes.bool,
106 | placeholder: PropTypes.string,
107 | readOnly: PropTypes.bool,
108 | rtlEnabled: PropTypes.bool,
109 | searchEnabled: PropTypes.bool,
110 | searchExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
111 | searchMode: PropTypes.oneOf(['contains', 'startswith']),
112 | searchTimeout: PropTypes.number,
113 | showClearButton: PropTypes.bool,
114 | showDataBeforeSearch: PropTypes.bool,
115 | showDropDownButton: PropTypes.bool,
116 | showSelectionControls: PropTypes.bool,
117 | spellcheck: PropTypes.bool,
118 | stylingMode: PropTypes.oneOf(['outlined', 'underlined', 'filled']),
119 | tabIndex: PropTypes.number,
120 | validationError: PropTypes.object,
121 | validationMessageMode: PropTypes.oneOf(['always', 'auto']),
122 | value: PropTypes.any,
123 | valueChangeEvent: PropTypes.string,
124 | valueExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
125 | visible: PropTypes.bool,
126 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
127 |
128 | /**
129 | * Dash-assigned callback that gets fired when the checkbox item gets selected.
130 | */
131 | fireEvent: PropTypes.func,
132 | /**
133 | * Dash-assigned callback that gets fired when the value changes.
134 | */
135 | setProps: PropTypes.func,
136 | dashEvents: PropTypes.oneOf(['change']),
137 | };
138 |
139 | SelectBox.defaultProps = {
140 | acceptCustomValue: false,
141 | accessKey: null,
142 | activeStateEnabled: true,
143 | dataSource: null,
144 | deferRendering: true,
145 | disabled: false,
146 | // displayExpr: undefined,
147 | dropDownButtonTemplate: 'dropDownButton',
148 | elementAttr: {},
149 | fieldTemplate: null,
150 | focusStateEnabled: true,
151 | grouped: false,
152 | groupTemplate: 'group',
153 | // height: undefined,
154 | // hint: undefined,
155 | hoverStateEnabled: true,
156 | inputAttr: {},
157 | isValid: true,
158 | dxItems: null,
159 | itemTemplate: 'item',
160 | maxLength: null,
161 | minSearchLength: 0,
162 | name: '',
163 | noDataText: 'No data to display',
164 | onChange: null,
165 | onClosed: null,
166 | onContentReady: null,
167 | onCopy: null,
168 | // onCustomItemCreating: function(e) { if(!e.customItem) { e.customItem = e.text; } },
169 | onCut: null,
170 | onDisposing: null,
171 | onEnterKey: null,
172 | onFocusIn: null,
173 | onFocusOut: null,
174 | onInitialized: null,
175 | onInput: null,
176 | onItemClick: null,
177 | onKeyDown: null,
178 | onKeyPress: null,
179 | onKeyUp: null,
180 | onOpened: null,
181 | onOptionChanged: null,
182 | onPaste: null,
183 | onSelectionChanged: null,
184 | onValueChanged: null,
185 | opened: false,
186 | openOnFieldClick: true,
187 | placeholder: 'Select',
188 | readOnly: false,
189 | rtlEnabled: false,
190 | searchEnabled: false,
191 | searchExpr: null,
192 | searchMode: 'contains',
193 | searchTimeout: 500,
194 | showClearButton: false,
195 | showDataBeforeSearch: false,
196 | showDropDownButton: true,
197 | showSelectionControls: false,
198 | spellcheck: false,
199 | stylingMode: 'outlined',
200 | tabIndex: 0,
201 | // validationError: undefined,
202 | validationMessageMode: 'auto',
203 | value: null,
204 | valueChangeEvent: 'change',
205 | valueExpr: 'this',
206 | visible: true,
207 | // width: undefined
208 | };
209 |
--------------------------------------------------------------------------------
/src/lib/components/Switch.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {Switch as DXSwitch} from 'devextreme-react';
5 |
6 |
7 | export default class Switch extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.state = {
12 | value: props.value,
13 | visible: props.visible,
14 | isValid: props.isValid,
15 | disabled: props.disabled,
16 | };
17 |
18 | this.onValueChanged = this.onValueChanged.bind(this);
19 | }
20 |
21 | onValueChanged(e) {
22 | const {setProps, fireEvent} = this.props;
23 |
24 | this.setState({value: e.value});
25 | if (setProps) setProps({value: e.value});
26 | if (fireEvent) fireEvent('change');
27 | }
28 |
29 | render() {
30 | return (
31 |
38 | )
39 | }
40 | }
41 |
42 | Switch.propTypes = {
43 | /**
44 | * The ID used to identify this compnent in Dash callbacks
45 | */
46 | id: PropTypes.string,
47 |
48 | accessKey: PropTypes.string,
49 | activeStateEnabled: PropTypes.bool,
50 | disabled: PropTypes.bool,
51 | elementAttr: PropTypes.object,
52 | focusStateEnabled: PropTypes.bool,
53 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
54 | hint: PropTypes.string,
55 | hoverStateEnabled: PropTypes.bool,
56 | isValid: PropTypes.bool,
57 | name: PropTypes.string,
58 | onContentReady: PropTypes.func,
59 | onDisposing: PropTypes.func,
60 | onInitialized: PropTypes.func,
61 | onOptionChanged: PropTypes.func,
62 | onValueChanged: PropTypes.func,
63 | readOnly: PropTypes.bool,
64 | rtlEnabled: PropTypes.bool,
65 | switchedOffText: PropTypes.string,
66 | switchedOnText: PropTypes.string,
67 | tabIndex: PropTypes.number,
68 | validationError: PropTypes.object,
69 | validationMessageMode: PropTypes.oneOf(['always', 'auto']),
70 | value: PropTypes.bool,
71 | visible: PropTypes.bool,
72 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
73 |
74 | /**
75 | * Dash-assigned callback that gets fired when the checkbox item gets selected.
76 | */
77 | fireEvent: PropTypes.func,
78 |
79 | /**
80 | * Dash-assigned callback that gets fired when the value changes.
81 | */
82 | setProps: PropTypes.func,
83 |
84 | dashEvents: PropTypes.oneOf(['change']),
85 | };
86 |
87 | Switch.defaultProps = {
88 | accessKey: null,
89 | activeStateEnabled: true,
90 | disabled: false,
91 | elementAttr: {},
92 | focusStateEnabled: true,
93 | // height: undefined,
94 | // hint: undefined,
95 | hoverStateEnabled: true,
96 | isValid: true,
97 | name: '',
98 | onContentReady: null,
99 | onDisposing: null,
100 | onInitialized: null,
101 | onOptionChanged: null,
102 | onValueChanged: null,
103 | readOnly: false,
104 | rtlEnabled: false,
105 | switchedOffText: 'OFF',
106 | switchedOnText: 'ON',
107 | tabIndex: 0,
108 | // validationError: undefined,
109 | validationMessageMode: 'auto',
110 | value: false,
111 | visible: true,
112 | // width: undefined
113 | };
114 |
--------------------------------------------------------------------------------
/src/lib/components/TabPanel.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import ReactDOM from "react-dom";
3 | import PropTypes from 'prop-types';
4 |
5 | import {TabPanel as DXTabPanel} from 'devextreme-react';
6 |
7 |
8 | export default class TabPanel extends Component {
9 | constructor(props) {
10 | super(props);
11 |
12 | this.state = {selectedIndex: this.props.selectedIndex};
13 |
14 | this.itemTitleTemplate = this.itemTitleTemplate.bind(this);
15 | this.itemTemplate = this.itemTemplate.bind(this);
16 | this.onOptionChanged = this.onOptionChanged.bind(this);
17 | }
18 |
19 | itemTitleTemplate(template_id) {
20 | var tmpl = window[template_id];
21 | return function(itemData, itemIndex, element) {
22 | const d = window.document.createElement('div');
23 | ReactDOM.render(tmpl(itemData), d);
24 | element.append(d.firstChild);
25 | }
26 | }
27 |
28 | itemTemplate(template_id) {
29 | var tmpl = window[template_id];
30 | return function(itemData, itemIndex, element) {
31 | const d = window.document.createElement('div');
32 | ReactDOM.render(tmpl(itemData), d);
33 | element.append(d.firstChild);
34 | }
35 | }
36 |
37 | onOptionChanged(e) {
38 | if(e.name === 'selectedIndex') {
39 | this.setState({selectedIndex: e.value});
40 | }
41 | }
42 |
43 | render() {
44 | let {itemTitleTemplate, itemTemplate} = this.props;
45 |
46 | if (itemTitleTemplate && typeof itemTitleTemplate === 'string'){
47 | itemTitleTemplate = this.itemTitleTemplate(itemTitleTemplate);
48 | }
49 |
50 | if (itemTemplate && typeof itemTemplate === 'string'){
51 | itemTemplate = this.itemTemplate(itemTemplate);
52 | }
53 |
54 | return (
55 |
61 | )
62 | }
63 | }
64 |
65 | TabPanel.propTypes = {
66 | /**
67 | * The ID used to identify this compnent in Dash callbacks
68 | */
69 | id: PropTypes.string,
70 |
71 | accessKey: PropTypes.string,
72 | activeStateEnabled: PropTypes.bool,
73 | animationEnabled: PropTypes.bool,
74 | dataSource: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.object), PropTypes.object]),
75 | deferRendering: PropTypes.bool,
76 | disabled: PropTypes.bool,
77 | elementAttr: PropTypes.object,
78 | focusStateEnabled: PropTypes.bool,
79 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
80 | hint: PropTypes.string,
81 | hoverStateEnabled: PropTypes.bool,
82 | itemHoldTimeout: PropTypes.number,
83 | items: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.object)]),
84 | itemComponent: PropTypes.func,
85 | itemTemplate: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object]),
86 | itemTitleRender: PropTypes.func,
87 | itemTitleTemplate: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object]),
88 | loop: PropTypes.bool,
89 | noDataText: PropTypes.string,
90 | onContentReady: PropTypes.func,
91 | onDisposing: PropTypes.func,
92 | onInitialized: PropTypes.func,
93 | onItemClick: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
94 | onItemContextMenu: PropTypes.func,
95 | onItemHold: PropTypes.func,
96 | onItemRendered: PropTypes.func,
97 | onOptionChanged: PropTypes.func,
98 | onSelectionChanged: PropTypes.func,
99 | onTitleClick: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
100 | onTitleHold: PropTypes.func,
101 | onTitleRendered: PropTypes.func,
102 | repaintChangesOnly: PropTypes.bool,
103 | rtlEnabled: PropTypes.bool,
104 | scrollByContent: PropTypes.bool,
105 | scrollingEnabled: PropTypes.bool,
106 | selectedIndex: PropTypes.number,
107 | selectedItem: PropTypes.object,
108 | showNavButtons: PropTypes.bool,
109 | swipeEnabled: PropTypes.bool,
110 | tabIndex: PropTypes.number,
111 | visible: PropTypes.bool,
112 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
113 |
114 | setProps: PropTypes.func
115 | };
116 |
117 | TabPanel.defaultProps = {
118 | accessKey: null,
119 | activeStateEnabled: false,
120 | animationEnabled: true,
121 | dataSource: null,
122 | deferRendering: true,
123 | disabled: false,
124 | elementAttr: {},
125 | focusStateEnabled: false,
126 | height: 'auto',
127 | // hint: undefined,
128 | hoverStateEnabled: true,
129 | itemHoldTimeout: 750,
130 | items: undefined,
131 | itemComponent: null,
132 | itemTemplate: 'item',
133 | itemTitleRender: null,
134 | itemTitleTemplate: 'title',
135 | loop: false,
136 | noDataText: 'No data to display',
137 | onContentReady: null,
138 | onDisposing: null,
139 | onInitialized: null,
140 | onItemClick: null,
141 | onItemContextMenu: null,
142 | onItemHold: null,
143 | onItemRendered: null,
144 | onOptionChanged: null,
145 | onSelectionChanged: null,
146 | onTitleClick: null,
147 | onTitleHold: null,
148 | onTitleRendered: null,
149 | repaintChangesOnly: false,
150 | rtlEnabled: false,
151 | scrollByContent: true,
152 | scrollingEnabled: true,
153 | selectedIndex: 0,
154 | selectedItem: null,
155 | showNavButtons: false,
156 | swipeEnabled: true,
157 | tabIndex: 0,
158 | visible: true,
159 | width: 'auto'
160 | };
161 |
--------------------------------------------------------------------------------
/src/lib/components/Tabs.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import ReactDOM from "react-dom";
3 | import PropTypes from 'prop-types';
4 |
5 | import {Tabs as DXTabs} from 'devextreme-react';
6 |
7 |
8 | export default class Tabs extends Component {
9 | constructor(props) {
10 | super(props);
11 |
12 | this.state = {selectedIndex: this.props.selectedIndex};
13 |
14 | this.itemTemplate = this.itemTemplate.bind(this);
15 | this.onOptionChanged = this.onOptionChanged.bind(this);
16 | }
17 |
18 | itemTemplate(template_id) {
19 | var tmpl = window[template_id];
20 | return function(itemData, itemIndex, element) {
21 | const d = window.document.createElement('div');
22 | ReactDOM.render(tmpl(itemData), d);
23 | element.append(d.firstChild);
24 | }
25 | }
26 |
27 | onOptionChanged(e) {
28 | if(e.name === 'selectedIndex') {
29 | this.setState({selectedIndex: e.value});
30 | }
31 | }
32 |
33 | render() {
34 | let {itemTemplate} = this.props;
35 |
36 | if (itemTemplate && typeof itemTemplate === 'string'){
37 | itemTemplate = this.itemTemplate(itemTemplate);
38 | }
39 |
40 | return (
41 |
46 | )
47 | }
48 | }
49 |
50 | Tabs.propTypes = {
51 | /**
52 | * The ID used to identify this compnent in Dash callbacks
53 | */
54 | id: PropTypes.string,
55 |
56 | accessKey: PropTypes.string,
57 | dataSource: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.object), PropTypes.object]),
58 | disabled: PropTypes.bool,
59 | elementAttr: PropTypes.object,
60 | focusStateEnabled: PropTypes.bool,
61 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
62 | hint: PropTypes.string,
63 | hoverStateEnabled: PropTypes.bool,
64 | itemHoldTimeout: PropTypes.number,
65 | items: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.object)]),
66 | itemTemplate: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object]),
67 | keyExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
68 | noDataText: PropTypes.string,
69 | onContentReady: PropTypes.func,
70 | onDisposing: PropTypes.func,
71 | onInitialized: PropTypes.func,
72 | onItemClick: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
73 | onItemContextMenu: PropTypes.func,
74 | onItemHold: PropTypes.func,
75 | onItemRendered: PropTypes.func,
76 | onOptionChanged: PropTypes.func,
77 | onSelectionChanged: PropTypes.func,
78 | repaintChangesOnly: PropTypes.bool,
79 | rtlEnabled: PropTypes.bool,
80 | scrollByContent: PropTypes.bool,
81 | scrollingEnabled: PropTypes.bool,
82 | selectedIndex: PropTypes.number,
83 | selectedItem: PropTypes.object,
84 | selectedItemKeys: PropTypes.number,
85 | selectedItems: PropTypes.arrayOf(PropTypes.any),
86 | selectionMode: PropTypes.oneOf(['multiple', 'single']),
87 | showNavButtons: PropTypes.bool,
88 | tabIndex: PropTypes.number,
89 | visible: PropTypes.bool,
90 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
91 |
92 | setProps: PropTypes.func
93 | };
94 |
95 | Tabs.defaultProps = {
96 | accessKey: null,
97 | dataSource: null,
98 | disabled: false,
99 | elementAttr: {},
100 | focusStateEnabled: true,
101 | height: 'auto',
102 | // hint: undefined,
103 | hoverStateEnabled: true,
104 | itemHoldTimeout: 750,
105 | items: null,
106 | itemTemplate: 'item',
107 | keyExpr: null,
108 | noDataText: 'No data to display',
109 | onContentReady: null,
110 | onDisposing: null,
111 | onInitialized: null,
112 | onItemClick: null,
113 | onItemContextMenu: null,
114 | onItemHold: null,
115 | onItemRendered: null,
116 | onOptionChanged: null,
117 | onSelectionChanged: null,
118 | repaintChangesOnly: false,
119 | rtlEnabled: false,
120 | scrollByContent: false,
121 | scrollingEnabled: true,
122 | selectedIndex: -1,
123 | selectedItem: null,
124 | selectedItemKeys: null,
125 | selectedItems: null,
126 | selectionMode: 'single',
127 | showNavButtons: true,
128 | tabIndex: 0,
129 | visible: true,
130 | width: 'auto'
131 | };
132 |
--------------------------------------------------------------------------------
/src/lib/components/TextBox.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {TextBox as DXTextBox} from 'devextreme-react';
5 |
6 |
7 | export default class TextBox extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.onValueChanged = this.onValueChanged.bind(this);
12 | }
13 |
14 | onValueChanged(e) {
15 | const {setProps} = this.props;
16 |
17 | if (setProps) setProps({value: e.value});
18 | }
19 |
20 | render() {
21 | return (
22 |
25 | );
26 | }
27 | }
28 |
29 | TextBox.propTypes = {
30 | /**
31 | * The ID used to identify this compnent in Dash callbacks
32 | */
33 | id: PropTypes.string,
34 |
35 | accessKey: PropTypes.string,
36 | activeStateEnabled: PropTypes.bool,
37 | disabled: PropTypes.bool,
38 | elementAttr: PropTypes.object,
39 | focusStateEnabled: PropTypes.bool,
40 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
41 | hint: PropTypes.string,
42 | hoverStateEnabled: PropTypes.bool,
43 | inputAttr: PropTypes.object,
44 | isValid: PropTypes.bool,
45 | mask: PropTypes.string,
46 | maskChar: PropTypes.string,
47 | maskInvalidMessage: PropTypes.string,
48 | maskRules: PropTypes.object,
49 | maxLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
50 | mode: PropTypes.oneOf(['email', 'password', 'search', 'tel', 'text', 'url']),
51 | name: PropTypes.string,
52 | onChange: PropTypes.func,
53 | onContentReady: PropTypes.func,
54 | onCopy: PropTypes.func,
55 | onCut: PropTypes.func,
56 | onDisposing: PropTypes.func,
57 | onEnterKey: PropTypes.func,
58 | onFocusIn: PropTypes.func,
59 | onFocusOut: PropTypes.func,
60 | onInitialized: PropTypes.func,
61 | onInput: PropTypes.func,
62 | onKeyDown: PropTypes.func,
63 | onKeyPress: PropTypes.func,
64 | onKeyUp: PropTypes.func,
65 | onOptionChanged: PropTypes.func,
66 | onPaste: PropTypes.func,
67 | onValueChanged: PropTypes.func,
68 | placeholder: PropTypes.string,
69 | readOnly: PropTypes.bool,
70 | rtlEnabled: PropTypes.bool,
71 | showClearButton: PropTypes.bool,
72 | showMaskMode: PropTypes.oneOf(['always', 'onFocus']),
73 | spellcheck: PropTypes.bool,
74 | stylingMode: PropTypes.oneOf(['outlined', 'underlined', 'filled']),
75 | tabIndex: PropTypes.number,
76 | useMaskedValue: PropTypes.bool,
77 | validationError: PropTypes.object,
78 | validationMessageMode: PropTypes.oneOf(['always', 'auto']),
79 | value: PropTypes.string,
80 | valueChangeEvent: PropTypes.string,
81 | visible: PropTypes.bool,
82 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
83 |
84 | /**
85 | * Dash-assigned callback that gets fired when the checkbox item gets selected.
86 | */
87 | fireEvent: PropTypes.func,
88 | /**
89 | * Dash-assigned callback that gets fired when the value changes.
90 | */
91 | setProps: PropTypes.func,
92 | dashEvents: PropTypes.oneOf(['change']),
93 | };
94 |
95 | TextBox.defaultProps = {
96 | accessKey: null,
97 | activeStateEnabled: false,
98 | disabled: false,
99 | elementAttr: {},
100 | focusStateEnabled: true,
101 | height: undefined,
102 | hint: undefined,
103 | hoverStateEnabled: true,
104 | inputAttr: {},
105 | isValid: true,
106 | mask: '',
107 | maskChar: '_',
108 | maskInvalidMessage: 'Value is invalid',
109 | maskRules: {},
110 | maxLength: null,
111 | mode: 'text',
112 | name: '',
113 | onChange: null,
114 | onContentReady: null,
115 | onCopy: null,
116 | onCut: null,
117 | onDisposing: null,
118 | onEnterKey: null,
119 | onFocusIn: null,
120 | onFocusOut: null,
121 | onInitialized: null,
122 | onInput: null,
123 | onKeyDown: null,
124 | onKeyPress: null,
125 | onKeyUp: null,
126 | onOptionChanged: null,
127 | onPaste: null,
128 | onValueChanged: null,
129 | placeholder: '',
130 | readOnly: false,
131 | rtlEnabled: false,
132 | showClearButton: false,
133 | showMaskMode: 'always',
134 | spellcheck: false,
135 | stylingMode: 'outlined',
136 | tabIndex: 0,
137 | useMaskedValue: false,
138 | validationError: undefined,
139 | validationMessageMode: 'auto',
140 | value: '',
141 | valueChangeEvent: 'change',
142 | visible: true,
143 | width: undefined
144 | };
145 |
--------------------------------------------------------------------------------
/src/lib/components/Tooltip.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import {Tooltip as DXTooltip} from 'devextreme-react';
5 |
6 |
7 | export default class Tooltip extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.state = {visible: this.props.visible, target: this.props.target};
12 |
13 | this.onInitialized = this.onInitialized.bind(this);
14 | this.onShowing = this.onShowing.bind(this);
15 | this.onHiding = this.onHiding.bind(this);
16 | }
17 |
18 | onInitialized(e) {
19 | this.setState({target: document.getElementById(this.props.target)});
20 | }
21 |
22 | onShowing(e) {
23 | this.setState({visible: true});
24 | }
25 |
26 | onHiding(e) {
27 | this.setState({visible: false});
28 | }
29 |
30 | render() {
31 | return (
32 |
40 | )
41 | }
42 | }
43 |
44 | Tooltip.propTypes = {
45 | /**
46 | * The ID used to identify this compnent in Dash callbacks
47 | */
48 | id: PropTypes.string,
49 |
50 | animation: PropTypes.object,
51 | children: PropTypes.node,
52 | closeOnBackButton: PropTypes.bool,
53 | closeOnOutsideClick: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
54 | container: PropTypes.string,
55 | // contentTemplate: PropTypes.string,
56 | deferRendering: PropTypes.bool,
57 | disabled: PropTypes.bool,
58 | elementAttr: PropTypes.object,
59 | height: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
60 | hideEvent: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
61 | hint: PropTypes.string,
62 | hoverStateEnabled: PropTypes.bool,
63 | maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
64 | maxWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
65 | minHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
66 | minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
67 | onContentReady: PropTypes.func,
68 | onDisposing: PropTypes.func,
69 | onHidden: PropTypes.func,
70 | onHiding: PropTypes.func,
71 | onInitialized: PropTypes.func,
72 | onOptionChanged: PropTypes.func,
73 | onShowing: PropTypes.func,
74 | onShown: PropTypes.func,
75 | position: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'left', 'right', 'top']), PropTypes.object]),
76 | rtlEnabled: PropTypes.bool,
77 | shading: PropTypes.bool,
78 | shadingColor: PropTypes.string,
79 | showEvent: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
80 | target: PropTypes.string,
81 | visible: PropTypes.bool,
82 | width: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
83 |
84 | setProps: PropTypes.func
85 | };
86 |
87 | Tooltip.defaultProps = {
88 | animation: {show: {type: 'fade', from: 0, to: 1}, hide: {type: 'fade', to: 0}},
89 | children: null,
90 | closeOnBackButton: true,
91 | closeOnOutsideClick: true,
92 | // container: undefined,
93 | // contentTemplate: 'content',
94 | deferRendering: true,
95 | disabled: false,
96 | elementAttr: {},
97 | height: 'auto',
98 | // hideEvent: undefined,
99 | // hint: undefined,
100 | hoverStateEnabled: false,
101 | maxHeight: null,
102 | maxWidth: null,
103 | minHeight: null,
104 | minWidth: null,
105 | onContentReady: null,
106 | onDisposing: null,
107 | onHidden: null,
108 | onHiding: null,
109 | onInitialized: null,
110 | onOptionChanged: null,
111 | onShowing: null,
112 | onShown: null,
113 | position: 'bottom',
114 | rtlEnabled: false,
115 | shading: false,
116 | shadingColor: '',
117 | // showEvent: undefined,
118 | // target
119 | visible: false,
120 | width: 'auto'
121 | };
122 |
--------------------------------------------------------------------------------
/src/lib/components/TreeList.react.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import ReactDOM from 'react-dom';
3 | import PropTypes from 'prop-types';
4 |
5 | import {TreeList as DXTreeList} from 'devextreme-react';
6 |
7 |
8 | export default class TreeList extends Component {
9 | constructor(props) {
10 | super(props);
11 |
12 | this.cellTemplate = this.cellTemplate.bind(this);
13 | this.headerCellTemplate = this.headerCellTemplate.bind(this);
14 | this._processCellTemplate = this._processCellTemplate.bind(this);
15 | }
16 |
17 | cellTemplate(template_id) {
18 | var tmpl = window[template_id];
19 | return function(container, options) {
20 | ReactDOM.render(tmpl(options), container);
21 | }
22 | }
23 |
24 | headerCellTemplate(template_id) {
25 | var tmpl = window[template_id];
26 | return function(container, options) {
27 | ReactDOM.render(tmpl(options), container);
28 | }
29 | }
30 |
31 | _processCellTemplate(columns) {
32 | for(const c in columns){
33 | if (columns[c].cellTemplate && typeof columns[c].cellTemplate === 'string') {
34 | columns[c].cellTemplate = this.cellTemplate(columns[c].cellTemplate);
35 | }
36 | if (columns[c].headerCellTemplate && typeof columns[c].headerCellTemplate === 'string') {
37 | columns[c].headerCellTemplate = this.headerCellTemplate(columns[c].headerCellTemplate);
38 | }
39 | if (columns[c].columns && typeof columns[c].columns === 'object') {
40 | this._processCellTemplate(columns[c].columns);
41 | }
42 | }
43 | }
44 |
45 | render() {
46 | const { columns } = this.props;
47 |
48 | this._processCellTemplate(columns);
49 |
50 | return ;
51 | }
52 | }
53 |
54 | TreeList.propTypes = {
55 | id: PropTypes.string,
56 |
57 | accessKey: PropTypes.string,
58 | activeStateEnabled: PropTypes.bool,
59 | allowColumnReordering: PropTypes.bool,
60 | allowColumnResizing: PropTypes.bool,
61 | autoExpandAll: PropTypes.bool,
62 | cacheEnabled: PropTypes.bool,
63 | cellHintEnabled: PropTypes.bool,
64 | columnAutoWidth: PropTypes.bool,
65 | columnChooser: PropTypes.object,
66 | columnFixing: PropTypes.object,
67 | columnHidingEnabled: PropTypes.bool,
68 | columnMinWidth: PropTypes.number,
69 | columnResizingMode: PropTypes.oneOf(['nextColumn', 'widget']),
70 | columns: PropTypes.arrayOf(PropTypes.shape),
71 | columnWidth: PropTypes.number,
72 | customizeColumns: PropTypes.func,
73 | dataSource: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.object)]),
74 | dataStructure: PropTypes.oneOf(['plain', 'tree']),
75 | dateSerializationFormat: PropTypes.string,
76 | disabled: PropTypes.bool,
77 | editing: PropTypes.object,
78 | elementAttr: PropTypes.object,
79 | errorRowEnabled: PropTypes.bool,
80 | expandedRowKeys: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]),
81 | expandNodesOnFiltering: PropTypes.bool,
82 | filterBuilder: PropTypes.object,
83 | filterBuilderPopup: PropTypes.object,
84 | filterPanel: PropTypes.object,
85 | filterRow: PropTypes.object,
86 | filterSyncEnabled: PropTypes.bool,
87 | filterValue: PropTypes.object,
88 | focusedColumnIndex: PropTypes.number,
89 | focusedRowEnabled: PropTypes.bool,
90 | focusedRowIndex: PropTypes.number,
91 | focusedRowKey: PropTypes.any,
92 | focusStateEnabled: PropTypes.bool,
93 | hasItemsExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
94 | headerFilter: PropTypes.object,
95 | height: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func]),
96 | highlightChanges: PropTypes.bool,
97 | hint: PropTypes.string,
98 | hoverStateEnabled: PropTypes.bool,
99 | itemsExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
100 | keyExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
101 | loadPanel: PropTypes.object,
102 | noDataText: PropTypes.string,
103 | onAdaptiveDetailRowPreparing: PropTypes.func,
104 | onCellClick: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
105 | onCellHoverChanged: PropTypes.func,
106 | onCellPrepared: PropTypes.func,
107 | onContentReady: PropTypes.func,
108 | onContextMenuPreparing: PropTypes.func,
109 | onDataErrorOccurred: PropTypes.func,
110 | onDisposing: PropTypes.func,
111 | onEditingStart: PropTypes.func,
112 | onEditorPrepared: PropTypes.func,
113 | onEditorPreparing: PropTypes.func,
114 | onFocusedCellChanged: PropTypes.func,
115 | onFocusedCellChanging: PropTypes.func,
116 | onFocusedRowChanged: PropTypes.func,
117 | onFocusedRowChanging: PropTypes.func,
118 | onInitialized: PropTypes.func,
119 | onInitNewRow: PropTypes.func,
120 | onKeyDown: PropTypes.func,
121 | onNodesInitialized: PropTypes.func,
122 | onOptionChanged: PropTypes.func,
123 | onRowClick: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
124 | onRowCollapsed: PropTypes.func,
125 | onRowCollapsing: PropTypes.func,
126 | onRowExpanded: PropTypes.func,
127 | onRowExpanding: PropTypes.func,
128 | onRowInserted: PropTypes.func,
129 | onRowInserting: PropTypes.func,
130 | onRowPrepared: PropTypes.func,
131 | onRowRemoved: PropTypes.func,
132 | onRowRemoving: PropTypes.func,
133 | onRowUpdated: PropTypes.func,
134 | onRowUpdating: PropTypes.func,
135 | onRowValidating: PropTypes.func,
136 | onSelectionChanged: PropTypes.func,
137 | onToolbarPreparing: PropTypes.func,
138 | pager: PropTypes.object,
139 | paging: PropTypes.object,
140 | parentIdExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
141 | remoteOperations: PropTypes.object,
142 | renderAsync: PropTypes.bool,
143 | repaintChangesOnly: PropTypes.bool,
144 | rootValue: PropTypes.object,
145 | rowAlternationEnabled: PropTypes.bool,
146 | rtlEnabled: PropTypes.bool,
147 | scrolling: PropTypes.object,
148 | searchPanel: PropTypes.object,
149 | selectedRowKeys: PropTypes.arrayOf(PropTypes.any),
150 | selection: PropTypes.object,
151 | showBorders: PropTypes.bool,
152 | showColumnHeaders: PropTypes.bool,
153 | showColumnLines: PropTypes.bool,
154 | showRowLines: PropTypes.bool,
155 | sorting: PropTypes.object,
156 | stateStoring: PropTypes.object,
157 | tabIndex: PropTypes.number,
158 | twoWayBindingEnabled: PropTypes.bool,
159 | visible: PropTypes.bool,
160 | width: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func]),
161 | wordWrapEnabled: PropTypes.bool,
162 |
163 | // Dash supplied props
164 | setProps: PropTypes.func
165 | };
166 |
167 | TreeList.defaultProps = {
168 | accessKey: null,
169 | activeStateEnabled: false,
170 | allowColumnReordering: false,
171 | allowColumnResizing: false,
172 | autoExpandAll: false,
173 | cacheEnabled: true,
174 | cellHintEnabled: true,
175 | columnAutoWidth: false,
176 | // columnChooser
177 | // columnFixing
178 | columnHidingEnabled: false,
179 | columnMinWidth: undefined,
180 | columnResizingMode: 'nextColumn',
181 | columns: undefined,
182 | columnWidth: undefined,
183 | // customizeColumns
184 | dataSource: null,
185 | dataStructure: 'plain',
186 | // dateSerializationFormat
187 | disabled: false,
188 | // editing
189 | elementAttr: {},
190 | errorRowEnabled: true,
191 | expandedRowKeys: [],
192 | expandNodesOnFiltering: true,
193 | filterBuilder: {},
194 | filterBuilderPopup: {},
195 | filterPanel: {},
196 | // filterRow
197 | // filterSyncEnabled
198 | filterValue: null,
199 | focusedColumnIndex: -1,
200 | focusedRowEnabled: false,
201 | focusedRowIndex: -1,
202 | focusedRowKey: undefined,
203 | focusStateEnabled: false,
204 | // hasItemsExpr
205 | // headerFilter
206 | height: undefined,
207 | highlightChanges: false,
208 | hint: undefined,
209 | hoverStateEnabled: false,
210 | itemsExpr: 'items',
211 | keyExpr: 'id',
212 | // loadPanel
213 | noDataText: 'No data',
214 | onAdaptiveDetailRowPreparing: null,
215 | onCellClick: null,
216 | onCellHoverChanged: null,
217 | onCellPrepared: null,
218 | onContentReady: null,
219 | onContextMenuPreparing: null,
220 | onDataErrorOccurred: null,
221 | onDisposing: null,
222 | onEditingStart: null,
223 | onEditorPrepared: null,
224 | onEditorPreparing: null,
225 | onFocusedCellChanged: null,
226 | onFocusedCellChanging: null,
227 | onFocusedRowChanged: null,
228 | onFocusedRowChanging: null,
229 | onInitialized: null,
230 | onInitNewRow: null,
231 | onKeyDown: null,
232 | onNodesInitialized: null,
233 | onOptionChanged: null,
234 | onRowClick: null,
235 | onRowCollapsed: null,
236 | onRowCollapsing: null,
237 | onRowExpanded: null,
238 | onRowExpanding: null,
239 | onRowInserted: null,
240 | onRowInserting: null,
241 | onRowPrepared: null,
242 | onRowRemoved: null,
243 | onRowRemoving: null,
244 | onRowUpdated: null,
245 | onRowUpdating: null,
246 | onRowValidating: null,
247 | onSelectionChanged: null,
248 | onToolbarPreparing: null,
249 | // pager
250 | // paging
251 | parentIdExpr: 'parentId',
252 | // remoteOperations
253 | renderAsync: false,
254 | repaintChangesOnly: false,
255 | rootValue: 0,
256 | rowAlternationEnabled: false,
257 | rtlEnabled: false,
258 | // scrolling
259 | // searchPanel
260 | // selectedRowKeys
261 | // selection
262 | showBorders: false,
263 | showColumnHeaders: true,
264 | showColumnLines: true, // false (Material)
265 | showRowLines: false, // true (iOS, Material)
266 | // sorting
267 | // stateStoring
268 | tabIndex: 0,
269 | twoWayBindingEnabled: true,
270 | visible: true,
271 | width: undefined,
272 | wordWrapEnabled: false
273 | };
274 |
--------------------------------------------------------------------------------
/src/lib/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable import/prefer-default-export */
2 | import CheckBox from './components/CheckBox.react';
3 | import DataGrid from './components/DataGrid.react';
4 | import PieChart from './components/PieChart.react';
5 | import PivotGrid from './components/PivotGrid.react';
6 | import Popover from './components/Popover.react';
7 | import Popup from './components/Popup.react';
8 | import SelectBox from './components/SelectBox.react';
9 | import Switch from './components/Switch.react';
10 | import TabPanel from './components/TabPanel.react';
11 | import Tabs from './components/Tabs.react';
12 | import TextBox from './components/TextBox.react';
13 | import Tooltip from './components/Tooltip.react';
14 | import TreeList from './components/TreeList.react';
15 |
16 | export {
17 | CheckBox,
18 | DataGrid,
19 | PieChart,
20 | PivotGrid,
21 | Popover,
22 | Popup,
23 | SelectBox,
24 | Switch,
25 | TabPanel,
26 | Tabs,
27 | TextBox,
28 | Tooltip,
29 | TreeList
30 | };
31 |
--------------------------------------------------------------------------------
/test/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pikhovkin/dash-devextreme/f2529646b95adf80629a7350ba161d6840ed8251/test/__init__.py
--------------------------------------------------------------------------------
/test/requirements.txt:
--------------------------------------------------------------------------------
1 | # Packages needed to run the tests.
2 | # Switch into a virtual environment
3 | # pip install -r requirements.txt
4 |
5 | chromedriver-binary
6 | dash
7 | dash-core-components
8 | dash-html-components
9 | dash-renderer
10 | selenium
11 | flake8
12 | pylint
13 | pytest-dash
14 |
--------------------------------------------------------------------------------
/test/test_usage.py:
--------------------------------------------------------------------------------
1 | # Basic test for the component rendering.
2 | def test_render_component(dash_app, selenium):
3 | # Start a dash app contained in `usage.py`
4 | # dash_app is a fixture by pytest-dash
5 | # It will load a py file containing a Dash instance named `app`
6 | # and start it in a thread.
7 | app = dash_app('usage.py')
8 |
9 | # Get the generated component with selenium
10 | my_component = selenium.find_element_by_id('input')
11 |
--------------------------------------------------------------------------------
/usage.py:
--------------------------------------------------------------------------------
1 | import dash
2 | from dash.dependencies import Input, Output
3 | import dash_html_components as html
4 |
5 | import dash_devextreme as ddx
6 |
7 |
8 | external_stylesheets=[
9 | 'https://cdn3.devexpress.com/jslib/18.2.3/css/dx.common.css',
10 | 'https://cdn3.devexpress.com/jslib/18.2.3/css/dx.light.css'
11 | ]
12 |
13 | dataSource = [
14 | {'language': 'English', 'percent': 55.5},
15 | {'language': 'Chinese', 'percent': 4.0},
16 | {'language': 'Spanish', 'percent': 4.3},
17 | {'language': 'Japanese', 'percent': 4.9},
18 | {'language': 'Portuguese', 'percent': 2.3},
19 | {'language': 'German', 'percent': 5.6},
20 | {'language': 'French', 'percent': 3.8},
21 | {'language': 'Russian', 'percent': 6.3},
22 | {'language': 'Italian', 'percent': 1.6},
23 | {'language': 'Polish', 'percent': 1.8}
24 | ]
25 |
26 | app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
27 | app.scripts.config.serve_locally = True
28 | app.css.config.serve_locally = True
29 |
30 | app.layout = html.Div([
31 | ddx.TextBox(
32 | id='input',
33 | value='my-value',
34 | valueChangeEvent='input',
35 | stylingMode='underlined'
36 | ),
37 | html.Div(id='output'),
38 | ddx.PieChart(
39 | type='doughnut',
40 | palette='Soft Pastel',
41 | title='Top Internet Languages',
42 | dataSource=dataSource,
43 | legend=dict(horizontalAlignment='center', verticalAlignment='bottom'),
44 | # export=dict(enabled=True),
45 | series=dict(
46 | smallValuesGrouping=dict(mode='topN', topCount=3),
47 | argumentField='language',
48 | valueField='percent',
49 | label=dict(
50 | visible=True,
51 | customizeText='valueText',
52 | format='fixedPoint',
53 | connector=dict(visible=True, width=1)
54 | )
55 | )
56 | ),
57 | html.Div(['Checked', ddx.CheckBox(id='CheckedOn', value=True)]),
58 | html.Div(['Unchecked', ddx.CheckBox(id='CheckedOff', value=False)]),
59 | # html.Div(['Indeterminate', ddx.CheckBox(value=None)]),
60 | html.Div(['Disabled', ddx.CheckBox(value=True, disabled=True)]),
61 | html.Div(ddx.CheckBox(text='Check', value=True, width=80)),
62 | html.Div(['Switched on', ddx.Switch(id='SwitchedOn', value=False)]),
63 | html.Div(['Switched off', ddx.Switch(value=False)]),
64 | # html.Div(['Value change handling', ddx.Switch(id='handlerSwitch', value=False)]),
65 | html.Div(['Disabled', ddx.Switch(id='disabledSwitch', value=False, disabled=True)]),
66 | ])
67 |
68 |
69 | @app.callback(Output('output', 'children'), [Input('input', 'value')])
70 | def display_output(value):
71 | return 'You have entered {}'.format(value)
72 |
73 |
74 | if __name__ == '__main__':
75 | app.run_server(debug=True)
76 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const packagejson = require('./package.json');
3 |
4 | const dashLibraryName = packagejson.name.replace(/-/g, '_');
5 |
6 | module.exports = (env, argv) => {
7 |
8 | let mode;
9 |
10 | const overrides = module.exports || {};
11 |
12 | // if user specified mode flag take that value
13 | if (argv && argv.mode) {
14 | mode = argv.mode;
15 | }
16 |
17 | // else if configuration object is already set (module.exports) use that value
18 | else if (overrides.mode) {
19 | mode = overrides.mode;
20 | }
21 |
22 | // else take webpack default (production)
23 | else {
24 | mode = 'production';
25 | }
26 |
27 | let filename = (overrides.output || {}).filename;
28 | if(!filename) {
29 | const modeSuffix = mode === 'development' ? 'dev' : 'min';
30 | filename = `${dashLibraryName}.${modeSuffix}.js`;
31 | }
32 |
33 | const entry = overrides.entry || {main: './src/lib/index.js'};
34 |
35 | const devtool = overrides.devtool || (
36 | mode === 'development' ? "eval-source-map" : 'none'
37 | );
38 |
39 | const externals = ('externals' in overrides) ? overrides.externals : ({
40 | react: 'React',
41 | 'react-dom': 'ReactDOM',
42 | 'plotly.js': 'Plotly',
43 | });
44 |
45 | return {
46 | mode,
47 | entry,
48 | output: {
49 | path: path.resolve(__dirname, dashLibraryName),
50 | filename,
51 | library: dashLibraryName,
52 | libraryTarget: 'window',
53 | },
54 | externals,
55 | module: {
56 | rules: [
57 | {
58 | test: /\.js$/,
59 | exclude: /node_modules/,
60 | use: {
61 | loader: 'babel-loader',
62 | },
63 | },
64 | {
65 | test: /\.css$/,
66 | use: [
67 | {
68 | loader: 'style-loader',
69 | },
70 | {
71 | loader: 'css-loader',
72 | },
73 | ],
74 | },
75 | ],
76 | },
77 | devtool
78 | }
79 | };
80 |
--------------------------------------------------------------------------------
/webpack.serve.config.js:
--------------------------------------------------------------------------------
1 | const config = require('./webpack.config.js');
2 |
3 | config.entry = {main: './src/demo/index.js'};
4 | config.output = {filename: 'output.js'};
5 | config.mode = 'development';
6 | config.externals = undefined; // eslint-disable-line
7 | config.devtool = 'inline-source-map';
8 | module.exports = config;
9 |
--------------------------------------------------------------------------------