This is page 87 of 143. Use http://codebase.md/xmlui-org/xmlui/xmlui/tools/vscode/resources/xmlui-markup-syntax-highlighting.png?lines=false&page={x} to view the full context.
# Directory Structure
```
├── .changeset
│ ├── config.json
│ └── cyan-tools-design.md
├── .eslintrc.cjs
├── .github
│ ├── build-checklist.png
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows
│ ├── deploy-blog-optimized.yml
│ ├── deploy-blog-swa.yml
│ ├── deploy-blog.yml
│ ├── deploy-docs-optimized.yml
│ ├── deploy-docs-swa.yml
│ ├── deploy-docs.yml
│ ├── prepare-versions.yml
│ ├── release-packages.yml
│ ├── run-all-tests.yml
│ └── run-smoke-tests.yml
├── .gitignore
├── .prettierrc.js
├── .vscode
│ ├── launch.json
│ └── settings.json
├── blog
│ ├── .gitignore
│ ├── .gitkeep
│ ├── CHANGELOG.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── blog
│ │ │ ├── images
│ │ │ │ ├── an-advanced-codefence.gif
│ │ │ │ ├── an-advanced-codefence.mp4
│ │ │ │ ├── blog-page-component.png
│ │ │ │ ├── blog-scrabble.png
│ │ │ │ ├── codefence-runner.png
│ │ │ │ ├── integrated-blog-search.png
│ │ │ │ ├── lorem-ipsum.png
│ │ │ │ ├── playground-checkbox-source.png
│ │ │ │ ├── playground.png
│ │ │ │ ├── use-xmlui-mcp-to-find-a-howto.png
│ │ │ │ └── xmlui-demo-gallery.png
│ │ │ ├── introducing-xmlui.md
│ │ │ ├── lorem-ipsum.md
│ │ │ ├── newest-post.md
│ │ │ ├── older-post.md
│ │ │ ├── xmlui-playground.md
│ │ │ └── xmlui-powered-blog.md
│ │ ├── mockServiceWorker.js
│ │ ├── resources
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ └── for-download
│ │ │ │ └── xmlui
│ │ │ │ └── xmlui-standalone.umd.js
│ │ │ ├── github.svg
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ ├── rss.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ ├── staticwebapp.config.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ └── PageNotFound.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── blog-theme.ts
│ └── tsconfig.json
├── CONTRIBUTING.md
├── docs
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── ComponentRefLinks.txt
│ ├── content
│ │ ├── _meta.json
│ │ ├── components
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── APICall.md
│ │ │ ├── App.md
│ │ │ ├── AppHeader.md
│ │ │ ├── AppState.md
│ │ │ ├── AutoComplete.md
│ │ │ ├── Avatar.md
│ │ │ ├── Backdrop.md
│ │ │ ├── Badge.md
│ │ │ ├── BarChart.md
│ │ │ ├── Bookmark.md
│ │ │ ├── Breakout.md
│ │ │ ├── Button.md
│ │ │ ├── Card.md
│ │ │ ├── Carousel.md
│ │ │ ├── ChangeListener.md
│ │ │ ├── Checkbox.md
│ │ │ ├── CHStack.md
│ │ │ ├── ColorPicker.md
│ │ │ ├── Column.md
│ │ │ ├── ContentSeparator.md
│ │ │ ├── CVStack.md
│ │ │ ├── DataSource.md
│ │ │ ├── DateInput.md
│ │ │ ├── DatePicker.md
│ │ │ ├── DonutChart.md
│ │ │ ├── DropdownMenu.md
│ │ │ ├── EmojiSelector.md
│ │ │ ├── ExpandableItem.md
│ │ │ ├── FileInput.md
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FlowLayout.md
│ │ │ ├── Footer.md
│ │ │ ├── Form.md
│ │ │ ├── FormItem.md
│ │ │ ├── FormSection.md
│ │ │ ├── Fragment.md
│ │ │ ├── H1.md
│ │ │ ├── H2.md
│ │ │ ├── H3.md
│ │ │ ├── H4.md
│ │ │ ├── H5.md
│ │ │ ├── H6.md
│ │ │ ├── Heading.md
│ │ │ ├── HSplitter.md
│ │ │ ├── HStack.md
│ │ │ ├── Icon.md
│ │ │ ├── IFrame.md
│ │ │ ├── Image.md
│ │ │ ├── Items.md
│ │ │ ├── LabelList.md
│ │ │ ├── Legend.md
│ │ │ ├── LineChart.md
│ │ │ ├── Link.md
│ │ │ ├── List.md
│ │ │ ├── Logo.md
│ │ │ ├── Markdown.md
│ │ │ ├── MenuItem.md
│ │ │ ├── MenuSeparator.md
│ │ │ ├── ModalDialog.md
│ │ │ ├── NavGroup.md
│ │ │ ├── NavLink.md
│ │ │ ├── NavPanel.md
│ │ │ ├── NoResult.md
│ │ │ ├── NumberBox.md
│ │ │ ├── Option.md
│ │ │ ├── Page.md
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── Pages.md
│ │ │ ├── Pagination.md
│ │ │ ├── PasswordInput.md
│ │ │ ├── PieChart.md
│ │ │ ├── ProgressBar.md
│ │ │ ├── Queue.md
│ │ │ ├── RadioGroup.md
│ │ │ ├── RealTimeAdapter.md
│ │ │ ├── Redirect.md
│ │ │ ├── Select.md
│ │ │ ├── Slider.md
│ │ │ ├── Slot.md
│ │ │ ├── SpaceFiller.md
│ │ │ ├── Spinner.md
│ │ │ ├── Splitter.md
│ │ │ ├── Stack.md
│ │ │ ├── StickyBox.md
│ │ │ ├── SubMenuItem.md
│ │ │ ├── Switch.md
│ │ │ ├── TabItem.md
│ │ │ ├── Table.md
│ │ │ ├── TableOfContents.md
│ │ │ ├── Tabs.md
│ │ │ ├── Text.md
│ │ │ ├── TextArea.md
│ │ │ ├── TextBox.md
│ │ │ ├── Theme.md
│ │ │ ├── TimeInput.md
│ │ │ ├── Timer.md
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneSwitch.md
│ │ │ ├── Tooltip.md
│ │ │ ├── Tree.md
│ │ │ ├── VSplitter.md
│ │ │ ├── VStack.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ ├── xmlui-spreadsheet
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Spreadsheet.md
│ │ │ └── xmlui-website-blocks
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Carousel.md
│ │ │ ├── HelloMd.md
│ │ │ ├── HeroSection.md
│ │ │ └── ScrollToTop.md
│ │ └── extensions
│ │ ├── _meta.json
│ │ ├── xmlui-animations
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Animation.md
│ │ │ ├── FadeAnimation.md
│ │ │ ├── FadeInAnimation.md
│ │ │ ├── FadeOutAnimation.md
│ │ │ ├── ScaleAnimation.md
│ │ │ └── SlideInAnimation.md
│ │ └── xmlui-website-blocks
│ │ ├── _meta.json
│ │ ├── _overview.md
│ │ ├── Carousel.md
│ │ ├── FancyButton.md
│ │ ├── HeroSection.md
│ │ └── ScrollToTop.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── feed.rss
│ │ ├── mockServiceWorker.js
│ │ ├── pages
│ │ │ ├── _meta.json
│ │ │ ├── app-structure.md
│ │ │ ├── build-editor-component.md
│ │ │ ├── build-hello-world-component.md
│ │ │ ├── components-intro.md
│ │ │ ├── context-variables.md
│ │ │ ├── forms.md
│ │ │ ├── globals.md
│ │ │ ├── glossary.md
│ │ │ ├── helper-tags.md
│ │ │ ├── hosted-deployment.md
│ │ │ ├── howto
│ │ │ │ ├── assign-a-complex-json-literal-to-a-component-variable.md
│ │ │ │ ├── chain-a-refetch.md
│ │ │ │ ├── control-cache-invalidation.md
│ │ │ │ ├── debounce-user-input-for-api-calls.md
│ │ │ │ ├── debounce-with-changelistener.md
│ │ │ │ ├── debug-a-component.md
│ │ │ │ ├── delay-a-datasource-until-another-datasource-is-ready.md
│ │ │ │ ├── delegate-a-method.md
│ │ │ │ ├── do-custom-form-validation.md
│ │ │ │ ├── expose-a-method-from-a-component.md
│ │ │ │ ├── filter-and-transform-data-from-an-api.md
│ │ │ │ ├── group-items-in-list-by-a-property.md
│ │ │ │ ├── handle-background-operations.md
│ │ │ │ ├── hide-an-element-until-its-datasource-is-ready.md
│ │ │ │ ├── make-a-set-of-equal-width-cards.md
│ │ │ │ ├── make-a-table-responsive.md
│ │ │ │ ├── make-navpanel-width-responsive.md
│ │ │ │ ├── modify-a-value-reported-in-a-column.md
│ │ │ │ ├── paginate-a-list.md
│ │ │ │ ├── pass-data-to-a-modal-dialog.md
│ │ │ │ ├── react-to-button-click-not-keystrokes.md
│ │ │ │ ├── set-the-initial-value-of-a-select-from-fetched-data.md
│ │ │ │ ├── share-a-modaldialog-across-components.md
│ │ │ │ ├── sync-selections-between-table-and-list-views.md
│ │ │ │ ├── update-ui-optimistically.md
│ │ │ │ ├── use-built-in-form-validation.md
│ │ │ │ └── use-the-same-modaldialog-to-add-or-edit.md
│ │ │ ├── howto.md
│ │ │ ├── intro.md
│ │ │ ├── layout.md
│ │ │ ├── markup.md
│ │ │ ├── mcp.md
│ │ │ ├── modal-dialogs.md
│ │ │ ├── news-and-reviews.md
│ │ │ ├── reactive-intro.md
│ │ │ ├── refactoring.md
│ │ │ ├── routing-and-links.md
│ │ │ ├── samples
│ │ │ │ ├── color-palette.xmlui
│ │ │ │ ├── color-values.xmlui
│ │ │ │ ├── shadow-sizes.xmlui
│ │ │ │ ├── spacing-sizes.xmlui
│ │ │ │ ├── swatch.xmlui
│ │ │ │ ├── theme-gallery-brief.xmlui
│ │ │ │ └── theme-gallery.xmlui
│ │ │ ├── scoping.md
│ │ │ ├── scripting.md
│ │ │ ├── styles-and-themes
│ │ │ │ ├── common-units.md
│ │ │ │ ├── layout-props.md
│ │ │ │ ├── theme-variable-defaults.md
│ │ │ │ ├── theme-variables.md
│ │ │ │ └── themes.md
│ │ │ ├── template-properties.md
│ │ │ ├── test.md
│ │ │ ├── tutorial-01.md
│ │ │ ├── tutorial-02.md
│ │ │ ├── tutorial-03.md
│ │ │ ├── tutorial-04.md
│ │ │ ├── tutorial-05.md
│ │ │ ├── tutorial-06.md
│ │ │ ├── tutorial-07.md
│ │ │ ├── tutorial-08.md
│ │ │ ├── tutorial-09.md
│ │ │ ├── tutorial-10.md
│ │ │ ├── tutorial-11.md
│ │ │ ├── tutorial-12.md
│ │ │ ├── universal-properties.md
│ │ │ ├── user-defined-components.md
│ │ │ ├── vscode.md
│ │ │ ├── working-with-markdown.md
│ │ │ ├── working-with-text.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-charts
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── DonutChart.md
│ │ │ │ ├── LabelList.md
│ │ │ │ ├── Legend.md
│ │ │ │ ├── LineChart.md
│ │ │ │ └── PieChart.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ └── xmlui-spreadsheet
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ └── Spreadsheet.md
│ │ ├── resources
│ │ │ ├── devdocs
│ │ │ │ ├── debug-proxy-object-2.png
│ │ │ │ ├── debug-proxy-object.png
│ │ │ │ ├── table_editor_01.png
│ │ │ │ ├── table_editor_02.png
│ │ │ │ ├── table_editor_03.png
│ │ │ │ ├── table_editor_04.png
│ │ │ │ ├── table_editor_05.png
│ │ │ │ ├── table_editor_06.png
│ │ │ │ ├── table_editor_07.png
│ │ │ │ ├── table_editor_08.png
│ │ │ │ ├── table_editor_09.png
│ │ │ │ ├── table_editor_10.png
│ │ │ │ ├── table_editor_11.png
│ │ │ │ ├── table-editor-01.png
│ │ │ │ ├── table-editor-02.png
│ │ │ │ ├── table-editor-03.png
│ │ │ │ ├── table-editor-04.png
│ │ │ │ ├── table-editor-06.png
│ │ │ │ ├── table-editor-07.png
│ │ │ │ ├── table-editor-08.png
│ │ │ │ ├── table-editor-09.png
│ │ │ │ └── xmlui-rendering-of-tiptap-markdown.png
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ ├── clients.json
│ │ │ │ ├── daily-revenue.json
│ │ │ │ ├── dashboard-stats.json
│ │ │ │ ├── demo.xmlui
│ │ │ │ ├── demo.xmlui.xs
│ │ │ │ ├── downloads
│ │ │ │ │ └── downloads.json
│ │ │ │ ├── for-download
│ │ │ │ │ ├── index-with-api.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── mockApi.js
│ │ │ │ │ ├── start-darwin.sh
│ │ │ │ │ ├── start-linux.sh
│ │ │ │ │ ├── start.bat
│ │ │ │ │ └── xmlui
│ │ │ │ │ └── xmlui-standalone.umd.js
│ │ │ │ ├── getting-started
│ │ │ │ │ ├── cl-tutorial-final.zip
│ │ │ │ │ ├── cl-tutorial.zip
│ │ │ │ │ ├── cl-tutorial2.zip
│ │ │ │ │ ├── cl-tutorial3.zip
│ │ │ │ │ ├── cl-tutorial4.zip
│ │ │ │ │ ├── cl-tutorial5.zip
│ │ │ │ │ ├── cl-tutorial6.zip
│ │ │ │ │ ├── getting-started.zip
│ │ │ │ │ ├── hello-xmlui.zip
│ │ │ │ │ ├── xmlui-empty.zip
│ │ │ │ │ └── xmlui-starter.zip
│ │ │ │ ├── howto
│ │ │ │ │ └── component-icons
│ │ │ │ │ └── up-arrow.svg
│ │ │ │ ├── invoices.json
│ │ │ │ ├── monthly-status.json
│ │ │ │ ├── news-and-reviews.json
│ │ │ │ ├── products.json
│ │ │ │ ├── releases.json
│ │ │ │ ├── tutorials
│ │ │ │ │ ├── datasource
│ │ │ │ │ │ └── api.ts
│ │ │ │ │ └── p2do
│ │ │ │ │ ├── api.ts
│ │ │ │ │ └── todo-logo.svg
│ │ │ │ └── xmlui.json
│ │ │ ├── github.svg
│ │ │ ├── images
│ │ │ │ ├── apiaction-tutorial
│ │ │ │ │ ├── add-success.png
│ │ │ │ │ ├── apiaction-param.png
│ │ │ │ │ ├── change-completed.png
│ │ │ │ │ ├── change-in-progress.png
│ │ │ │ │ ├── confirm-delete.png
│ │ │ │ │ ├── data-error.png
│ │ │ │ │ ├── data-progress.png
│ │ │ │ │ ├── data-success.png
│ │ │ │ │ ├── display-1.png
│ │ │ │ │ ├── item-deleted.png
│ │ │ │ │ ├── item-updated.png
│ │ │ │ │ ├── missing-api-key.png
│ │ │ │ │ ├── new-item-added.png
│ │ │ │ │ └── test-message.png
│ │ │ │ ├── chat-api
│ │ │ │ │ └── domain-model.svg
│ │ │ │ ├── components
│ │ │ │ │ ├── image
│ │ │ │ │ │ └── breakfast.jpg
│ │ │ │ │ ├── markdown
│ │ │ │ │ │ └── colors.png
│ │ │ │ │ └── modal
│ │ │ │ │ ├── deep_link_dialog_1.jpg
│ │ │ │ │ └── deep_link_dialog_2.jpg
│ │ │ │ ├── create-apps
│ │ │ │ │ ├── collapsed-vertical.png
│ │ │ │ │ ├── using-forms-warning-dialog.png
│ │ │ │ │ └── using-forms.png
│ │ │ │ ├── datasource-tutorial
│ │ │ │ │ ├── data-with-header.png
│ │ │ │ │ ├── filtered-data.png
│ │ │ │ │ ├── filtered-items.png
│ │ │ │ │ ├── initial-page-items.png
│ │ │ │ │ ├── list-items.png
│ │ │ │ │ ├── next-page-items.png
│ │ │ │ │ ├── no-data.png
│ │ │ │ │ ├── pagination-1.jpg
│ │ │ │ │ ├── pagination-1.png
│ │ │ │ │ ├── polling-1.png
│ │ │ │ │ ├── refetch-data.png
│ │ │ │ │ ├── slow-loading.png
│ │ │ │ │ ├── test-message.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── unconventional-data.png
│ │ │ │ │ └── unfiltered-items.png
│ │ │ │ ├── flower.jpg
│ │ │ │ ├── get-started
│ │ │ │ │ ├── add-new-contact.png
│ │ │ │ │ ├── app-modified.png
│ │ │ │ │ ├── app-start.png
│ │ │ │ │ ├── app-with-boxes.png
│ │ │ │ │ ├── app-with-toast.png
│ │ │ │ │ ├── boilerplate-structure.png
│ │ │ │ │ ├── cl-initial.png
│ │ │ │ │ ├── cl-start.png
│ │ │ │ │ ├── contact-counts.png
│ │ │ │ │ ├── contact-dialog-title.png
│ │ │ │ │ ├── contact-dialog.png
│ │ │ │ │ ├── contact-menus.png
│ │ │ │ │ ├── contact-predicates.png
│ │ │ │ │ ├── context-menu.png
│ │ │ │ │ ├── dashboard-numbers.png
│ │ │ │ │ ├── default-contact-list.png
│ │ │ │ │ ├── delete-contact.png
│ │ │ │ │ ├── delete-task.png
│ │ │ │ │ ├── detailed-template.png
│ │ │ │ │ ├── edit-contact-details.png
│ │ │ │ │ ├── edited-contact-saved.png
│ │ │ │ │ ├── empty-sections.png
│ │ │ │ │ ├── filter-completed.png
│ │ │ │ │ ├── fullwidth-desktop.png
│ │ │ │ │ ├── fullwidth-mobile.png
│ │ │ │ │ ├── initial-table.png
│ │ │ │ │ ├── items-and-badges.png
│ │ │ │ │ ├── loading-message.png
│ │ │ │ │ ├── new-contact-button.png
│ │ │ │ │ ├── new-contact-saved.png
│ │ │ │ │ ├── no-empty-sections.png
│ │ │ │ │ ├── personal-todo-initial.png
│ │ │ │ │ ├── piechart.png
│ │ │ │ │ ├── review-today.png
│ │ │ │ │ ├── rudimentary-dashboard.png
│ │ │ │ │ ├── section-collapsed.png
│ │ │ │ │ ├── sectioned-items.png
│ │ │ │ │ ├── sections-ordered.png
│ │ │ │ │ ├── spacex-list-with-links.png
│ │ │ │ │ ├── spacex-list.png
│ │ │ │ │ ├── start-personal-todo-1.png
│ │ │ │ │ ├── submit-new-contact.png
│ │ │ │ │ ├── submit-new-task.png
│ │ │ │ │ ├── syntax-highlighting.png
│ │ │ │ │ ├── table-with-badge.png
│ │ │ │ │ ├── template-with-card.png
│ │ │ │ │ ├── test-emulated-api.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── todo-logo.png
│ │ │ │ │ └── xmlui-tools.png
│ │ │ │ ├── HelloApp.png
│ │ │ │ ├── HelloApp2.png
│ │ │ │ ├── logos
│ │ │ │ │ ├── xmlui1.svg
│ │ │ │ │ ├── xmlui2.svg
│ │ │ │ │ ├── xmlui3.svg
│ │ │ │ │ ├── xmlui4.svg
│ │ │ │ │ ├── xmlui5.svg
│ │ │ │ │ ├── xmlui6.svg
│ │ │ │ │ └── xmlui7.svg
│ │ │ │ ├── pdf
│ │ │ │ │ └── dummy-pdf.jpg
│ │ │ │ ├── rendering-engine
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ ├── Component.svg
│ │ │ │ │ ├── CompoundComponent.svg
│ │ │ │ │ ├── RootComponent.svg
│ │ │ │ │ └── tree-with-containers.svg
│ │ │ │ ├── reviewers-guide
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ └── incbutton-in-action.png
│ │ │ │ ├── tools
│ │ │ │ │ └── boilerplate-structure.png
│ │ │ │ ├── try.svg
│ │ │ │ ├── tutorial
│ │ │ │ │ ├── app-chat-history.png
│ │ │ │ │ ├── app-content-placeholder.png
│ │ │ │ │ ├── app-header-and-content.png
│ │ │ │ │ ├── app-links-channel-selected.png
│ │ │ │ │ ├── app-links-click.png
│ │ │ │ │ ├── app-navigation.png
│ │ │ │ │ ├── finished-ex01.png
│ │ │ │ │ ├── finished-ex02.png
│ │ │ │ │ ├── hello.png
│ │ │ │ │ ├── splash-screen-advanced.png
│ │ │ │ │ ├── splash-screen-after-click.png
│ │ │ │ │ ├── splash-screen-centered.png
│ │ │ │ │ ├── splash-screen-events.png
│ │ │ │ │ ├── splash-screen-expression.png
│ │ │ │ │ ├── splash-screen-reuse-after.png
│ │ │ │ │ ├── splash-screen-reuse-before.png
│ │ │ │ │ └── splash-screen.png
│ │ │ │ └── tutorial-01.png
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ ├── Boxes.xmlui
│ │ │ ├── Breadcrumb.xmlui
│ │ │ ├── ChangeLog.xmlui
│ │ │ ├── ColorPalette.xmlui
│ │ │ ├── DocumentLinks.xmlui
│ │ │ ├── DocumentPage.xmlui
│ │ │ ├── DocumentPageNoTOC.xmlui
│ │ │ ├── Icons.xmlui
│ │ │ ├── IncButton.xmlui
│ │ │ ├── IncButton2.xmlui
│ │ │ ├── NameValue.xmlui
│ │ │ ├── PageNotFound.xmlui
│ │ │ ├── PaletteItem.xmlui
│ │ │ ├── Palettes.xmlui
│ │ │ ├── SectionHeader.xmlui
│ │ │ ├── TBD.xmlui
│ │ │ ├── Test.xmlui
│ │ │ ├── ThemesIntro.xmlui
│ │ │ ├── ThousandThemes.xmlui
│ │ │ ├── TubeStops.xmlui
│ │ │ ├── TubeStops.xmlui.xs
│ │ │ └── TwoColumnCode.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ ├── docs-theme.ts
│ │ ├── earthtone.ts
│ │ ├── xmlui-gray-on-default.ts
│ │ ├── xmlui-green-on-default.ts
│ │ └── xmlui-orange-on-default.ts
│ └── tsconfig.json
├── LICENSE
├── package-lock.json
├── package.json
├── packages
│ ├── tsconfig.json
│ ├── xmlui-animations
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── Animation.tsx
│ │ ├── AnimationNative.tsx
│ │ ├── FadeAnimation.tsx
│ │ ├── FadeInAnimation.tsx
│ │ ├── FadeOutAnimation.tsx
│ │ ├── index.tsx
│ │ ├── ScaleAnimation.tsx
│ │ └── SlideInAnimation.tsx
│ ├── xmlui-devtools
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── devtools
│ │ │ │ ├── DevTools.tsx
│ │ │ │ ├── DevToolsNative.module.scss
│ │ │ │ ├── DevToolsNative.tsx
│ │ │ │ ├── ModalDialog.module.scss
│ │ │ │ ├── ModalDialog.tsx
│ │ │ │ ├── ModalVisibilityContext.tsx
│ │ │ │ ├── Tooltip.module.scss
│ │ │ │ ├── Tooltip.tsx
│ │ │ │ └── utils.ts
│ │ │ ├── editor
│ │ │ │ └── Editor.tsx
│ │ │ └── index.tsx
│ │ └── vite.config-overrides.ts
│ ├── xmlui-hello-world
│ │ ├── .gitignore
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── HelloWorld.module.scss
│ │ ├── HelloWorld.tsx
│ │ ├── HelloWorldNative.tsx
│ │ └── index.tsx
│ ├── xmlui-os-frames
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── IPhoneFrame.module.scss
│ │ ├── IPhoneFrame.tsx
│ │ ├── MacOSAppFrame.module.scss
│ │ ├── MacOSAppFrame.tsx
│ │ ├── WindowsAppFrame.module.scss
│ │ └── WindowsAppFrame.tsx
│ ├── xmlui-pdf
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ ├── components
│ │ │ │ └── Pdf.xmlui
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── LazyPdfNative.tsx
│ │ ├── Pdf.module.scss
│ │ └── Pdf.tsx
│ ├── xmlui-playground
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── hooks
│ │ │ ├── usePlayground.ts
│ │ │ └── useToast.ts
│ │ ├── index.tsx
│ │ ├── playground
│ │ │ ├── Box.module.scss
│ │ │ ├── Box.tsx
│ │ │ ├── CodeSelector.module.scss
│ │ │ ├── CodeSelector.tsx
│ │ │ ├── ConfirmationDialog.module.scss
│ │ │ ├── ConfirmationDialog.tsx
│ │ │ ├── Editor.tsx
│ │ │ ├── Header.module.scss
│ │ │ ├── Header.tsx
│ │ │ ├── Playground.tsx
│ │ │ ├── PlaygroundContent.module.scss
│ │ │ ├── PlaygroundContent.tsx
│ │ │ ├── PlaygroundNative.module.scss
│ │ │ ├── PlaygroundNative.tsx
│ │ │ ├── Preview.tsx
│ │ │ ├── StandalonePlayground.tsx
│ │ │ ├── StandalonePlaygroundNative.module.scss
│ │ │ ├── StandalonePlaygroundNative.tsx
│ │ │ ├── ThemeSwitcher.module.scss
│ │ │ ├── ThemeSwitcher.tsx
│ │ │ └── utils.ts
│ │ ├── providers
│ │ │ ├── Toast.module.scss
│ │ │ └── ToastProvider.tsx
│ │ ├── state
│ │ │ └── store.ts
│ │ ├── themes
│ │ │ └── theme.ts
│ │ └── utils
│ │ └── helpers.ts
│ ├── xmlui-search
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Search.module.scss
│ │ └── Search.tsx
│ ├── xmlui-spreadsheet
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Spreadsheet.tsx
│ │ └── SpreadsheetNative.tsx
│ └── xmlui-website-blocks
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── demo
│ │ ├── components
│ │ │ ├── HeroBackgroundBreakoutPage.xmlui
│ │ │ ├── HeroBackgroundsPage.xmlui
│ │ │ ├── HeroContentsPage.xmlui
│ │ │ ├── HeroTextAlignPage.xmlui
│ │ │ ├── HeroTextPage.xmlui
│ │ │ └── HeroTonesPage.xmlui
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── default.ts
│ ├── index.html
│ ├── index.ts
│ ├── meta
│ │ └── componentsMetadata.ts
│ ├── package.json
│ ├── public
│ │ └── resources
│ │ ├── building.jpg
│ │ └── xmlui-logo.svg
│ └── src
│ ├── Carousel
│ │ ├── Carousel.module.scss
│ │ ├── Carousel.tsx
│ │ ├── CarouselContext.tsx
│ │ └── CarouselNative.tsx
│ ├── FancyButton
│ │ ├── FancyButton.module.scss
│ │ ├── FancyButton.tsx
│ │ └── FancyButton.xmlui
│ ├── Hello
│ │ ├── Hello.tsx
│ │ ├── Hello.xmlui
│ │ └── Hello.xmlui.xs
│ ├── HeroSection
│ │ ├── HeroSection.module.scss
│ │ ├── HeroSection.spec.ts
│ │ ├── HeroSection.tsx
│ │ └── HeroSectionNative.tsx
│ ├── index.tsx
│ ├── ScrollToTop
│ │ ├── ScrollToTop.module.scss
│ │ ├── ScrollToTop.tsx
│ │ └── ScrollToTopNative.tsx
│ └── vite-env.d.ts
├── playwright.config.ts
├── README.md
├── tools
│ ├── codefence
│ │ └── xmlui-code-fence-docs.md
│ ├── create-app
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── create-app.ts
│ │ ├── helpers
│ │ │ ├── copy.ts
│ │ │ ├── get-pkg-manager.ts
│ │ │ ├── git.ts
│ │ │ ├── install.ts
│ │ │ ├── is-folder-empty.ts
│ │ │ ├── is-writeable.ts
│ │ │ ├── make-dir.ts
│ │ │ └── validate-pkg.ts
│ │ ├── index.ts
│ │ ├── package.json
│ │ ├── templates
│ │ │ ├── default
│ │ │ │ └── ts
│ │ │ │ ├── gitignore
│ │ │ │ ├── index.html
│ │ │ │ ├── index.ts
│ │ │ │ ├── public
│ │ │ │ │ ├── mockServiceWorker.js
│ │ │ │ │ ├── resources
│ │ │ │ │ │ ├── favicon.ico
│ │ │ │ │ │ └── xmlui-logo.svg
│ │ │ │ │ └── serve.json
│ │ │ │ └── src
│ │ │ │ ├── components
│ │ │ │ │ ├── ApiAware.xmlui
│ │ │ │ │ ├── Home.xmlui
│ │ │ │ │ ├── IncButton.xmlui
│ │ │ │ │ └── PagePanel.xmlui
│ │ │ │ ├── config.ts
│ │ │ │ └── Main.xmlui
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── create-xmlui-hello-world
│ │ ├── index.js
│ │ └── package.json
│ └── vscode
│ ├── .gitignore
│ ├── .vscode
│ │ ├── launch.json
│ │ └── tasks.json
│ ├── .vscodeignore
│ ├── build.sh
│ ├── CHANGELOG.md
│ ├── esbuild.js
│ ├── eslint.config.mjs
│ ├── formatter-docs.md
│ ├── generate-test-sample.sh
│ ├── LICENSE.md
│ ├── package-lock.json
│ ├── package.json
│ ├── README.md
│ ├── resources
│ │ ├── xmlui-logo.png
│ │ └── xmlui-markup-syntax-highlighting.png
│ ├── src
│ │ ├── extension.ts
│ │ └── server.ts
│ ├── syntaxes
│ │ └── xmlui.tmLanguage.json
│ ├── test-samples
│ │ └── sample.xmlui
│ ├── tsconfig.json
│ └── tsconfig.tsbuildinfo
├── turbo.json
└── xmlui
├── .gitignore
├── bin
│ ├── bootstrap.cjs
│ ├── bootstrap.js
│ ├── build-lib.ts
│ ├── build.ts
│ ├── index.ts
│ ├── preview.ts
│ ├── start.ts
│ ├── vite-xmlui-plugin.ts
│ └── viteConfig.ts
├── CHANGELOG.md
├── conventions
│ ├── component-qa-checklist.md
│ ├── copilot-conventions.md
│ ├── create-xmlui-components.md
│ ├── mermaid.md
│ ├── testing-conventions.md
│ └── xmlui-in-a-nutshell.md
├── dev-docs
│ ├── accessibility.md
│ ├── build-system.md
│ ├── build-xmlui.md
│ ├── component-behaviors.md
│ ├── component-metadata.md
│ ├── components-with-options.md
│ ├── containers.md
│ ├── data-operations.md
│ ├── glossary.md
│ ├── index.md
│ ├── next
│ │ ├── component-dev-guide.md
│ │ ├── configuration-management-enhancement-summary.md
│ │ ├── documentation-scripts-refactoring-complete-summary.md
│ │ ├── documentation-scripts-refactoring-plan.md
│ │ ├── duplicate-pattern-extraction-summary.md
│ │ ├── error-handling-standardization-summary.md
│ │ ├── generating-component-reference.md
│ │ ├── index.md
│ │ ├── logging-consistency-implementation-summary.md
│ │ ├── project-build.md
│ │ ├── project-structure.md
│ │ ├── theme-context.md
│ │ ├── tiptap-design-considerations.md
│ │ ├── working-with-code.md
│ │ ├── xmlui-runtime-architecture
│ │ └── xmlui-wcag-accessibility-report.md
│ ├── react-fundamentals.md
│ ├── release-method.md
│ ├── standalone-app.md
│ ├── theme-variables-refactoring.md
│ ├── ud-components.md
│ └── xmlui-repo.md
├── package.json
├── scripts
│ ├── coverage-only.js
│ ├── e2e-test-summary.js
│ ├── extract-component-metadata.js
│ ├── generate-docs
│ │ ├── build-downloads-map.mjs
│ │ ├── build-pages-map.mjs
│ │ ├── components-config.json
│ │ ├── configuration-management.mjs
│ │ ├── constants.mjs
│ │ ├── create-theme-files.mjs
│ │ ├── DocsGenerator.mjs
│ │ ├── error-handling.mjs
│ │ ├── extensions-config.json
│ │ ├── folders.mjs
│ │ ├── generate-summary-files.mjs
│ │ ├── get-docs.mjs
│ │ ├── input-handler.mjs
│ │ ├── logger.mjs
│ │ ├── logging-standards.mjs
│ │ ├── MetadataProcessor.mjs
│ │ ├── pattern-utilities.mjs
│ │ └── utils.mjs
│ ├── generate-metadata-markdown.js
│ ├── get-langserver-metadata.js
│ ├── inline-links.mjs
│ └── README-e2e-summary.md
├── src
│ ├── abstractions
│ │ ├── _conventions.md
│ │ ├── ActionDefs.ts
│ │ ├── AppContextDefs.ts
│ │ ├── ComponentDefs.ts
│ │ ├── ContainerDefs.ts
│ │ ├── ExtensionDefs.ts
│ │ ├── FunctionDefs.ts
│ │ ├── RendererDefs.ts
│ │ ├── scripting
│ │ │ ├── BlockScope.ts
│ │ │ ├── Compilation.ts
│ │ │ ├── LogicalThread.ts
│ │ │ ├── LoopScope.ts
│ │ │ ├── modules.ts
│ │ │ ├── ScriptParserError.ts
│ │ │ ├── Token.ts
│ │ │ ├── TryScope.ts
│ │ │ └── TryScopeExp.ts
│ │ └── ThemingDefs.ts
│ ├── components
│ │ ├── _conventions.md
│ │ ├── abstractions.ts
│ │ ├── Accordion
│ │ │ ├── Accordion.md
│ │ │ ├── Accordion.module.scss
│ │ │ ├── Accordion.spec.ts
│ │ │ ├── Accordion.tsx
│ │ │ ├── AccordionContext.tsx
│ │ │ ├── AccordionItem.tsx
│ │ │ ├── AccordionItemNative.tsx
│ │ │ └── AccordionNative.tsx
│ │ ├── Animation
│ │ │ └── AnimationNative.tsx
│ │ ├── APICall
│ │ │ ├── APICall.md
│ │ │ ├── APICall.spec.ts
│ │ │ ├── APICall.tsx
│ │ │ └── APICallNative.tsx
│ │ ├── App
│ │ │ ├── App.md
│ │ │ ├── App.module.scss
│ │ │ ├── App.spec.ts
│ │ │ ├── App.tsx
│ │ │ ├── AppLayoutContext.ts
│ │ │ ├── AppNative.tsx
│ │ │ ├── AppStateContext.ts
│ │ │ ├── doc-resources
│ │ │ │ ├── condensed-sticky.xmlui
│ │ │ │ ├── condensed.xmlui
│ │ │ │ ├── horizontal-sticky.xmlui
│ │ │ │ ├── horizontal.xmlui
│ │ │ │ ├── vertical-full-header.xmlui
│ │ │ │ ├── vertical-sticky.xmlui
│ │ │ │ └── vertical.xmlui
│ │ │ ├── IndexerContext.ts
│ │ │ ├── LinkInfoContext.ts
│ │ │ ├── SearchContext.tsx
│ │ │ ├── Sheet.module.scss
│ │ │ └── Sheet.tsx
│ │ ├── AppHeader
│ │ │ ├── AppHeader.md
│ │ │ ├── AppHeader.module.scss
│ │ │ ├── AppHeader.spec.ts
│ │ │ ├── AppHeader.tsx
│ │ │ └── AppHeaderNative.tsx
│ │ ├── AppState
│ │ │ ├── AppState.md
│ │ │ ├── AppState.spec.ts
│ │ │ ├── AppState.tsx
│ │ │ └── AppStateNative.tsx
│ │ ├── AutoComplete
│ │ │ ├── AutoComplete.md
│ │ │ ├── AutoComplete.module.scss
│ │ │ ├── AutoComplete.spec.ts
│ │ │ ├── AutoComplete.tsx
│ │ │ ├── AutoCompleteContext.tsx
│ │ │ └── AutoCompleteNative.tsx
│ │ ├── Avatar
│ │ │ ├── Avatar.md
│ │ │ ├── Avatar.module.scss
│ │ │ ├── Avatar.spec.ts
│ │ │ ├── Avatar.tsx
│ │ │ └── AvatarNative.tsx
│ │ ├── Backdrop
│ │ │ ├── Backdrop.md
│ │ │ ├── Backdrop.module.scss
│ │ │ ├── Backdrop.spec.ts
│ │ │ ├── Backdrop.tsx
│ │ │ └── BackdropNative.tsx
│ │ ├── Badge
│ │ │ ├── Badge.md
│ │ │ ├── Badge.module.scss
│ │ │ ├── Badge.spec.ts
│ │ │ ├── Badge.tsx
│ │ │ └── BadgeNative.tsx
│ │ ├── Bookmark
│ │ │ ├── Bookmark.md
│ │ │ ├── Bookmark.module.scss
│ │ │ ├── Bookmark.spec.ts
│ │ │ ├── Bookmark.tsx
│ │ │ └── BookmarkNative.tsx
│ │ ├── Breakout
│ │ │ ├── Breakout.module.scss
│ │ │ ├── Breakout.spec.ts
│ │ │ ├── Breakout.tsx
│ │ │ └── BreakoutNative.tsx
│ │ ├── Button
│ │ │ ├── Button-style.spec.ts
│ │ │ ├── Button.md
│ │ │ ├── Button.module.scss
│ │ │ ├── Button.spec.ts
│ │ │ ├── Button.tsx
│ │ │ └── ButtonNative.tsx
│ │ ├── Card
│ │ │ ├── Card.md
│ │ │ ├── Card.module.scss
│ │ │ ├── Card.spec.ts
│ │ │ ├── Card.tsx
│ │ │ └── CardNative.tsx
│ │ ├── Carousel
│ │ │ ├── Carousel.md
│ │ │ ├── Carousel.module.scss
│ │ │ ├── Carousel.spec.ts
│ │ │ ├── Carousel.tsx
│ │ │ ├── CarouselContext.tsx
│ │ │ ├── CarouselItem.tsx
│ │ │ ├── CarouselItemNative.tsx
│ │ │ └── CarouselNative.tsx
│ │ ├── ChangeListener
│ │ │ ├── ChangeListener.md
│ │ │ ├── ChangeListener.spec.ts
│ │ │ ├── ChangeListener.tsx
│ │ │ └── ChangeListenerNative.tsx
│ │ ├── chart-color-schemes.ts
│ │ ├── Charts
│ │ │ ├── AreaChart
│ │ │ │ ├── AreaChart.md
│ │ │ │ ├── AreaChart.spec.ts
│ │ │ │ ├── AreaChart.tsx
│ │ │ │ └── AreaChartNative.tsx
│ │ │ ├── BarChart
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── BarChart.module.scss
│ │ │ │ ├── BarChart.spec.ts
│ │ │ │ ├── BarChart.tsx
│ │ │ │ └── BarChartNative.tsx
│ │ │ ├── DonutChart
│ │ │ │ ├── DonutChart.spec.ts
│ │ │ │ └── DonutChart.tsx
│ │ │ ├── LabelList
│ │ │ │ ├── LabelList.module.scss
│ │ │ │ ├── LabelList.spec.ts
│ │ │ │ ├── LabelList.tsx
│ │ │ │ └── LabelListNative.tsx
│ │ │ ├── Legend
│ │ │ │ ├── Legend.spec.ts
│ │ │ │ ├── Legend.tsx
│ │ │ │ └── LegendNative.tsx
│ │ │ ├── LineChart
│ │ │ │ ├── LineChart.md
│ │ │ │ ├── LineChart.module.scss
│ │ │ │ ├── LineChart.spec.ts
│ │ │ │ ├── LineChart.tsx
│ │ │ │ └── LineChartNative.tsx
│ │ │ ├── PieChart
│ │ │ │ ├── PieChart.md
│ │ │ │ ├── PieChart.spec.ts
│ │ │ │ ├── PieChart.tsx
│ │ │ │ ├── PieChartNative.module.scss
│ │ │ │ └── PieChartNative.tsx
│ │ │ ├── RadarChart
│ │ │ │ ├── RadarChart.md
│ │ │ │ ├── RadarChart.spec.ts
│ │ │ │ ├── RadarChart.tsx
│ │ │ │ └── RadarChartNative.tsx
│ │ │ ├── Tooltip
│ │ │ │ ├── TooltipContent.module.scss
│ │ │ │ ├── TooltipContent.spec.ts
│ │ │ │ └── TooltipContent.tsx
│ │ │ └── utils
│ │ │ ├── abstractions.ts
│ │ │ └── ChartProvider.tsx
│ │ ├── Checkbox
│ │ │ ├── Checkbox.md
│ │ │ ├── Checkbox.spec.ts
│ │ │ └── Checkbox.tsx
│ │ ├── CodeBlock
│ │ │ ├── CodeBlock.module.scss
│ │ │ ├── CodeBlock.spec.ts
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── CodeBlockNative.tsx
│ │ │ └── highlight-code.ts
│ │ ├── collectedComponentMetadata.ts
│ │ ├── ColorPicker
│ │ │ ├── ColorPicker.md
│ │ │ ├── ColorPicker.module.scss
│ │ │ ├── ColorPicker.spec.ts
│ │ │ ├── ColorPicker.tsx
│ │ │ └── ColorPickerNative.tsx
│ │ ├── Column
│ │ │ ├── Column.md
│ │ │ ├── Column.tsx
│ │ │ ├── ColumnNative.tsx
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ └── TableContext.tsx
│ │ ├── component-utils.ts
│ │ ├── ComponentProvider.tsx
│ │ ├── ComponentRegistryContext.tsx
│ │ ├── container-helpers.tsx
│ │ ├── ContentSeparator
│ │ │ ├── ContentSeparator.md
│ │ │ ├── ContentSeparator.module.scss
│ │ │ ├── ContentSeparator.spec.ts
│ │ │ ├── ContentSeparator.tsx
│ │ │ └── ContentSeparatorNative.tsx
│ │ ├── DataSource
│ │ │ ├── DataSource.md
│ │ │ └── DataSource.tsx
│ │ ├── DateInput
│ │ │ ├── DateInput.md
│ │ │ ├── DateInput.module.scss
│ │ │ ├── DateInput.spec.ts
│ │ │ ├── DateInput.tsx
│ │ │ └── DateInputNative.tsx
│ │ ├── DatePicker
│ │ │ ├── DatePicker.md
│ │ │ ├── DatePicker.module.scss
│ │ │ ├── DatePicker.spec.ts
│ │ │ ├── DatePicker.tsx
│ │ │ └── DatePickerNative.tsx
│ │ ├── DropdownMenu
│ │ │ ├── DropdownMenu.md
│ │ │ ├── DropdownMenu.module.scss
│ │ │ ├── DropdownMenu.spec.ts
│ │ │ ├── DropdownMenu.tsx
│ │ │ ├── DropdownMenuNative.tsx
│ │ │ ├── MenuItem.md
│ │ │ └── SubMenuItem.md
│ │ ├── EmojiSelector
│ │ │ ├── EmojiSelector.md
│ │ │ ├── EmojiSelector.spec.ts
│ │ │ ├── EmojiSelector.tsx
│ │ │ └── EmojiSelectorNative.tsx
│ │ ├── ExpandableItem
│ │ │ ├── ExpandableItem.module.scss
│ │ │ ├── ExpandableItem.spec.ts
│ │ │ ├── ExpandableItem.tsx
│ │ │ └── ExpandableItemNative.tsx
│ │ ├── FileInput
│ │ │ ├── FileInput.md
│ │ │ ├── FileInput.module.scss
│ │ │ ├── FileInput.spec.ts
│ │ │ ├── FileInput.tsx
│ │ │ └── FileInputNative.tsx
│ │ ├── FileUploadDropZone
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FileUploadDropZone.module.scss
│ │ │ ├── FileUploadDropZone.spec.ts
│ │ │ ├── FileUploadDropZone.tsx
│ │ │ └── FileUploadDropZoneNative.tsx
│ │ ├── FlowLayout
│ │ │ ├── FlowLayout.md
│ │ │ ├── FlowLayout.module.scss
│ │ │ ├── FlowLayout.spec.ts
│ │ │ ├── FlowLayout.spec.ts-snapshots
│ │ │ │ └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
│ │ │ ├── FlowLayout.tsx
│ │ │ └── FlowLayoutNative.tsx
│ │ ├── Footer
│ │ │ ├── Footer.md
│ │ │ ├── Footer.module.scss
│ │ │ ├── Footer.spec.ts
│ │ │ ├── Footer.tsx
│ │ │ └── FooterNative.tsx
│ │ ├── Form
│ │ │ ├── Form.md
│ │ │ ├── Form.module.scss
│ │ │ ├── Form.spec.ts
│ │ │ ├── Form.tsx
│ │ │ ├── formActions.ts
│ │ │ ├── FormContext.ts
│ │ │ └── FormNative.tsx
│ │ ├── FormItem
│ │ │ ├── FormItem.md
│ │ │ ├── FormItem.module.scss
│ │ │ ├── FormItem.spec.ts
│ │ │ ├── FormItem.tsx
│ │ │ ├── FormItemNative.tsx
│ │ │ ├── HelperText.module.scss
│ │ │ ├── HelperText.tsx
│ │ │ ├── ItemWithLabel.tsx
│ │ │ └── Validations.ts
│ │ ├── FormSection
│ │ │ ├── FormSection.md
│ │ │ ├── FormSection.ts
│ │ │ └── FormSection.xmlui
│ │ ├── Fragment
│ │ │ ├── Fragment.spec.ts
│ │ │ └── Fragment.tsx
│ │ ├── Heading
│ │ │ ├── abstractions.ts
│ │ │ ├── H1.md
│ │ │ ├── H1.spec.ts
│ │ │ ├── H2.md
│ │ │ ├── H2.spec.ts
│ │ │ ├── H3.md
│ │ │ ├── H3.spec.ts
│ │ │ ├── H4.md
│ │ │ ├── H4.spec.ts
│ │ │ ├── H5.md
│ │ │ ├── H5.spec.ts
│ │ │ ├── H6.md
│ │ │ ├── H6.spec.ts
│ │ │ ├── Heading.md
│ │ │ ├── Heading.module.scss
│ │ │ ├── Heading.spec.ts
│ │ │ ├── Heading.tsx
│ │ │ └── HeadingNative.tsx
│ │ ├── HoverCard
│ │ │ ├── HoverCard.tsx
│ │ │ └── HovercardNative.tsx
│ │ ├── HtmlTags
│ │ │ ├── HtmlTags.module.scss
│ │ │ ├── HtmlTags.spec.ts
│ │ │ └── HtmlTags.tsx
│ │ ├── Icon
│ │ │ ├── AdmonitionDanger.tsx
│ │ │ ├── AdmonitionInfo.tsx
│ │ │ ├── AdmonitionNote.tsx
│ │ │ ├── AdmonitionTip.tsx
│ │ │ ├── AdmonitionWarning.tsx
│ │ │ ├── ApiIcon.tsx
│ │ │ ├── ArrowDropDown.module.scss
│ │ │ ├── ArrowDropDown.tsx
│ │ │ ├── ArrowDropUp.module.scss
│ │ │ ├── ArrowDropUp.tsx
│ │ │ ├── ArrowLeft.module.scss
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowRight.module.scss
│ │ │ ├── ArrowRight.tsx
│ │ │ ├── Attach.tsx
│ │ │ ├── Binding.module.scss
│ │ │ ├── Binding.tsx
│ │ │ ├── BoardIcon.tsx
│ │ │ ├── BoxIcon.tsx
│ │ │ ├── CheckIcon.tsx
│ │ │ ├── ChevronDownIcon.tsx
│ │ │ ├── ChevronLeft.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUpIcon.tsx
│ │ │ ├── CodeFileIcon.tsx
│ │ │ ├── CodeSandbox.tsx
│ │ │ ├── CompactListIcon.tsx
│ │ │ ├── ContentCopyIcon.tsx
│ │ │ ├── DarkToLightIcon.tsx
│ │ │ ├── DatabaseIcon.module.scss
│ │ │ ├── DatabaseIcon.tsx
│ │ │ ├── DocFileIcon.tsx
│ │ │ ├── DocIcon.tsx
│ │ │ ├── DotMenuHorizontalIcon.tsx
│ │ │ ├── DotMenuIcon.tsx
│ │ │ ├── EmailIcon.tsx
│ │ │ ├── EmptyFolderIcon.tsx
│ │ │ ├── ErrorIcon.tsx
│ │ │ ├── ExpressionIcon.tsx
│ │ │ ├── FillPlusCricleIcon.tsx
│ │ │ ├── FilterIcon.tsx
│ │ │ ├── FolderIcon.tsx
│ │ │ ├── GlobeIcon.tsx
│ │ │ ├── HomeIcon.tsx
│ │ │ ├── HyperLinkIcon.tsx
│ │ │ ├── Icon.md
│ │ │ ├── Icon.module.scss
│ │ │ ├── Icon.spec.ts
│ │ │ ├── Icon.tsx
│ │ │ ├── IconNative.tsx
│ │ │ ├── ImageFileIcon.tsx
│ │ │ ├── Inspect.tsx
│ │ │ ├── LightToDark.tsx
│ │ │ ├── LinkIcon.tsx
│ │ │ ├── ListIcon.tsx
│ │ │ ├── LooseListIcon.tsx
│ │ │ ├── MoonIcon.tsx
│ │ │ ├── MoreOptionsIcon.tsx
│ │ │ ├── NoSortIcon.tsx
│ │ │ ├── PDFIcon.tsx
│ │ │ ├── PenIcon.tsx
│ │ │ ├── PhoneIcon.tsx
│ │ │ ├── PhotoIcon.tsx
│ │ │ ├── PlusIcon.tsx
│ │ │ ├── SearchIcon.tsx
│ │ │ ├── ShareIcon.tsx
│ │ │ ├── SortAscendingIcon.tsx
│ │ │ ├── SortDescendingIcon.tsx
│ │ │ ├── StarsIcon.tsx
│ │ │ ├── SunIcon.tsx
│ │ │ ├── svg
│ │ │ │ ├── admonition_danger.svg
│ │ │ │ ├── admonition_info.svg
│ │ │ │ ├── admonition_note.svg
│ │ │ │ ├── admonition_tip.svg
│ │ │ │ ├── admonition_warning.svg
│ │ │ │ ├── api.svg
│ │ │ │ ├── arrow-dropdown.svg
│ │ │ │ ├── arrow-left.svg
│ │ │ │ ├── arrow-right.svg
│ │ │ │ ├── arrow-up.svg
│ │ │ │ ├── attach.svg
│ │ │ │ ├── binding.svg
│ │ │ │ ├── box.svg
│ │ │ │ ├── bulb.svg
│ │ │ │ ├── code-file.svg
│ │ │ │ ├── code-sandbox.svg
│ │ │ │ ├── dark_to_light.svg
│ │ │ │ ├── database.svg
│ │ │ │ ├── doc.svg
│ │ │ │ ├── empty-folder.svg
│ │ │ │ ├── expression.svg
│ │ │ │ ├── eye-closed.svg
│ │ │ │ ├── eye-dark.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── file-text.svg
│ │ │ │ ├── filter.svg
│ │ │ │ ├── folder.svg
│ │ │ │ ├── img.svg
│ │ │ │ ├── inspect.svg
│ │ │ │ ├── light_to_dark.svg
│ │ │ │ ├── moon.svg
│ │ │ │ ├── pdf.svg
│ │ │ │ ├── photo.svg
│ │ │ │ ├── share.svg
│ │ │ │ ├── stars.svg
│ │ │ │ ├── sun.svg
│ │ │ │ ├── trending-down.svg
│ │ │ │ ├── trending-level.svg
│ │ │ │ ├── trending-up.svg
│ │ │ │ ├── txt.svg
│ │ │ │ ├── unknown-file.svg
│ │ │ │ ├── unlink.svg
│ │ │ │ └── xls.svg
│ │ │ ├── TableDeleteColumnIcon.tsx
│ │ │ ├── TableDeleteRowIcon.tsx
│ │ │ ├── TableInsertColumnIcon.tsx
│ │ │ ├── TableInsertRowIcon.tsx
│ │ │ ├── TrashIcon.tsx
│ │ │ ├── TrendingDownIcon.tsx
│ │ │ ├── TrendingLevelIcon.tsx
│ │ │ ├── TrendingUpIcon.tsx
│ │ │ ├── TxtIcon.tsx
│ │ │ ├── UnknownFileIcon.tsx
│ │ │ ├── UnlinkIcon.tsx
│ │ │ ├── UserIcon.tsx
│ │ │ ├── WarningIcon.tsx
│ │ │ └── XlsIcon.tsx
│ │ ├── IconProvider.tsx
│ │ ├── IconRegistryContext.tsx
│ │ ├── IFrame
│ │ │ ├── IFrame.md
│ │ │ ├── IFrame.module.scss
│ │ │ ├── IFrame.spec.ts
│ │ │ ├── IFrame.tsx
│ │ │ └── IFrameNative.tsx
│ │ ├── Image
│ │ │ ├── Image.md
│ │ │ ├── Image.module.scss
│ │ │ ├── Image.spec.ts
│ │ │ ├── Image.tsx
│ │ │ └── ImageNative.tsx
│ │ ├── Input
│ │ │ ├── index.ts
│ │ │ ├── InputAdornment.module.scss
│ │ │ ├── InputAdornment.tsx
│ │ │ ├── InputDivider.module.scss
│ │ │ ├── InputDivider.tsx
│ │ │ ├── InputLabel.module.scss
│ │ │ ├── InputLabel.tsx
│ │ │ ├── PartialInput.module.scss
│ │ │ └── PartialInput.tsx
│ │ ├── InspectButton
│ │ │ ├── InspectButton.module.scss
│ │ │ └── InspectButton.tsx
│ │ ├── Items
│ │ │ ├── Items.md
│ │ │ ├── Items.spec.ts
│ │ │ ├── Items.tsx
│ │ │ └── ItemsNative.tsx
│ │ ├── Link
│ │ │ ├── Link.md
│ │ │ ├── Link.module.scss
│ │ │ ├── Link.spec.ts
│ │ │ ├── Link.tsx
│ │ │ └── LinkNative.tsx
│ │ ├── List
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── List.md
│ │ │ ├── List.module.scss
│ │ │ ├── List.spec.ts
│ │ │ ├── List.tsx
│ │ │ └── ListNative.tsx
│ │ ├── Logo
│ │ │ ├── doc-resources
│ │ │ │ └── xmlui-logo.svg
│ │ │ ├── Logo.md
│ │ │ ├── Logo.tsx
│ │ │ └── LogoNative.tsx
│ │ ├── Markdown
│ │ │ ├── CodeText.module.scss
│ │ │ ├── CodeText.tsx
│ │ │ ├── Markdown.md
│ │ │ ├── Markdown.module.scss
│ │ │ ├── Markdown.spec.ts
│ │ │ ├── Markdown.tsx
│ │ │ ├── MarkdownNative.tsx
│ │ │ ├── parse-binding-expr.ts
│ │ │ └── utils.ts
│ │ ├── metadata-helpers.ts
│ │ ├── ModalDialog
│ │ │ ├── ConfirmationModalContextProvider.tsx
│ │ │ ├── Dialog.module.scss
│ │ │ ├── Dialog.tsx
│ │ │ ├── ModalDialog.md
│ │ │ ├── ModalDialog.module.scss
│ │ │ ├── ModalDialog.spec.ts
│ │ │ ├── ModalDialog.tsx
│ │ │ ├── ModalDialogNative.tsx
│ │ │ └── ModalVisibilityContext.tsx
│ │ ├── NavGroup
│ │ │ ├── NavGroup.md
│ │ │ ├── NavGroup.module.scss
│ │ │ ├── NavGroup.spec.ts
│ │ │ ├── NavGroup.tsx
│ │ │ ├── NavGroupContext.ts
│ │ │ └── NavGroupNative.tsx
│ │ ├── NavLink
│ │ │ ├── NavLink.md
│ │ │ ├── NavLink.module.scss
│ │ │ ├── NavLink.spec.ts
│ │ │ ├── NavLink.tsx
│ │ │ └── NavLinkNative.tsx
│ │ ├── NavPanel
│ │ │ ├── NavPanel.md
│ │ │ ├── NavPanel.module.scss
│ │ │ ├── NavPanel.spec.ts
│ │ │ ├── NavPanel.tsx
│ │ │ └── NavPanelNative.tsx
│ │ ├── NestedApp
│ │ │ ├── AppWithCodeView.module.scss
│ │ │ ├── AppWithCodeView.tsx
│ │ │ ├── AppWithCodeViewNative.tsx
│ │ │ ├── defaultProps.tsx
│ │ │ ├── logo.svg
│ │ │ ├── NestedApp.module.scss
│ │ │ ├── NestedApp.tsx
│ │ │ ├── NestedAppNative.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── utils.ts
│ │ ├── NoResult
│ │ │ ├── NoResult.md
│ │ │ ├── NoResult.module.scss
│ │ │ ├── NoResult.spec.ts
│ │ │ ├── NoResult.tsx
│ │ │ └── NoResultNative.tsx
│ │ ├── NumberBox
│ │ │ ├── numberbox-abstractions.ts
│ │ │ ├── NumberBox.md
│ │ │ ├── NumberBox.module.scss
│ │ │ ├── NumberBox.spec.ts
│ │ │ ├── NumberBox.tsx
│ │ │ └── NumberBoxNative.tsx
│ │ ├── Option
│ │ │ ├── Option.md
│ │ │ ├── Option.spec.ts
│ │ │ ├── Option.tsx
│ │ │ ├── OptionNative.tsx
│ │ │ └── OptionTypeProvider.tsx
│ │ ├── PageMetaTitle
│ │ │ ├── PageMetaTilteNative.tsx
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── PageMetaTitle.spec.ts
│ │ │ └── PageMetaTitle.tsx
│ │ ├── Pages
│ │ │ ├── Page.md
│ │ │ ├── Pages.md
│ │ │ ├── Pages.module.scss
│ │ │ ├── Pages.tsx
│ │ │ └── PagesNative.tsx
│ │ ├── Pagination
│ │ │ ├── Pagination.md
│ │ │ ├── Pagination.module.scss
│ │ │ ├── Pagination.spec.ts
│ │ │ ├── Pagination.tsx
│ │ │ └── PaginationNative.tsx
│ │ ├── PositionedContainer
│ │ │ ├── PositionedContainer.module.scss
│ │ │ ├── PositionedContainer.tsx
│ │ │ └── PositionedContainerNative.tsx
│ │ ├── ProfileMenu
│ │ │ ├── ProfileMenu.module.scss
│ │ │ └── ProfileMenu.tsx
│ │ ├── ProgressBar
│ │ │ ├── ProgressBar.md
│ │ │ ├── ProgressBar.module.scss
│ │ │ ├── ProgressBar.spec.ts
│ │ │ ├── ProgressBar.tsx
│ │ │ └── ProgressBarNative.tsx
│ │ ├── Queue
│ │ │ ├── Queue.md
│ │ │ ├── Queue.spec.ts
│ │ │ ├── Queue.tsx
│ │ │ ├── queueActions.ts
│ │ │ └── QueueNative.tsx
│ │ ├── RadioGroup
│ │ │ ├── RadioGroup.md
│ │ │ ├── RadioGroup.module.scss
│ │ │ ├── RadioGroup.spec.ts
│ │ │ ├── RadioGroup.tsx
│ │ │ ├── RadioGroupNative.tsx
│ │ │ ├── RadioItem.tsx
│ │ │ └── RadioItemNative.tsx
│ │ ├── RealTimeAdapter
│ │ │ ├── RealTimeAdapter.tsx
│ │ │ └── RealTimeAdapterNative.tsx
│ │ ├── Redirect
│ │ │ ├── Redirect.md
│ │ │ ├── Redirect.spec.ts
│ │ │ └── Redirect.tsx
│ │ ├── ResponsiveBar
│ │ │ ├── README.md
│ │ │ ├── ResponsiveBar.md
│ │ │ ├── ResponsiveBar.module.scss
│ │ │ ├── ResponsiveBar.spec.ts
│ │ │ ├── ResponsiveBar.tsx
│ │ │ └── ResponsiveBarNative.tsx
│ │ ├── Select
│ │ │ ├── HiddenOption.tsx
│ │ │ ├── OptionContext.ts
│ │ │ ├── Select.md
│ │ │ ├── Select.module.scss
│ │ │ ├── Select.spec.ts
│ │ │ ├── Select.tsx
│ │ │ ├── SelectContext.tsx
│ │ │ └── SelectNative.tsx
│ │ ├── SelectionStore
│ │ │ ├── SelectionStore.md
│ │ │ ├── SelectionStore.tsx
│ │ │ └── SelectionStoreNative.tsx
│ │ ├── Slider
│ │ │ ├── Slider.md
│ │ │ ├── Slider.module.scss
│ │ │ ├── Slider.spec.ts
│ │ │ ├── Slider.tsx
│ │ │ └── SliderNative.tsx
│ │ ├── Slot
│ │ │ ├── Slot.md
│ │ │ ├── Slot.spec.ts
│ │ │ └── Slot.ts
│ │ ├── SlotItem.tsx
│ │ ├── SpaceFiller
│ │ │ ├── SpaceFiller.md
│ │ │ ├── SpaceFiller.module.scss
│ │ │ ├── SpaceFiller.spec.ts
│ │ │ ├── SpaceFiller.tsx
│ │ │ └── SpaceFillerNative.tsx
│ │ ├── Spinner
│ │ │ ├── Spinner.md
│ │ │ ├── Spinner.module.scss
│ │ │ ├── Spinner.spec.ts
│ │ │ ├── Spinner.tsx
│ │ │ └── SpinnerNative.tsx
│ │ ├── Splitter
│ │ │ ├── HSplitter.md
│ │ │ ├── HSplitter.spec.ts
│ │ │ ├── Splitter.md
│ │ │ ├── Splitter.module.scss
│ │ │ ├── Splitter.spec.ts
│ │ │ ├── Splitter.tsx
│ │ │ ├── SplitterNative.tsx
│ │ │ ├── utils.ts
│ │ │ ├── VSplitter.md
│ │ │ └── VSplitter.spec.ts
│ │ ├── Stack
│ │ │ ├── CHStack.md
│ │ │ ├── CHStack.spec.ts
│ │ │ ├── CVStack.md
│ │ │ ├── CVStack.spec.ts
│ │ │ ├── HStack.md
│ │ │ ├── HStack.spec.ts
│ │ │ ├── Stack.md
│ │ │ ├── Stack.module.scss
│ │ │ ├── Stack.spec.ts
│ │ │ ├── Stack.tsx
│ │ │ ├── StackNative.tsx
│ │ │ ├── VStack.md
│ │ │ └── VStack.spec.ts
│ │ ├── StickyBox
│ │ │ ├── StickyBox.md
│ │ │ ├── StickyBox.module.scss
│ │ │ ├── StickyBox.tsx
│ │ │ └── StickyBoxNative.tsx
│ │ ├── Switch
│ │ │ ├── Switch.md
│ │ │ ├── Switch.spec.ts
│ │ │ └── Switch.tsx
│ │ ├── Table
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── react-table-config.d.ts
│ │ │ ├── Table.md
│ │ │ ├── Table.module.scss
│ │ │ ├── Table.spec.ts
│ │ │ ├── Table.tsx
│ │ │ ├── TableNative.tsx
│ │ │ └── useRowSelection.tsx
│ │ ├── TableOfContents
│ │ │ ├── TableOfContents.module.scss
│ │ │ ├── TableOfContents.spec.ts
│ │ │ ├── TableOfContents.tsx
│ │ │ └── TableOfContentsNative.tsx
│ │ ├── Tabs
│ │ │ ├── TabContext.tsx
│ │ │ ├── TabItem.md
│ │ │ ├── TabItem.tsx
│ │ │ ├── TabItemNative.tsx
│ │ │ ├── Tabs.md
│ │ │ ├── Tabs.module.scss
│ │ │ ├── Tabs.spec.ts
│ │ │ ├── Tabs.tsx
│ │ │ └── TabsNative.tsx
│ │ ├── Text
│ │ │ ├── Text.md
│ │ │ ├── Text.module.scss
│ │ │ ├── Text.spec.ts
│ │ │ ├── Text.tsx
│ │ │ └── TextNative.tsx
│ │ ├── TextArea
│ │ │ ├── TextArea.md
│ │ │ ├── TextArea.module.scss
│ │ │ ├── TextArea.spec.ts
│ │ │ ├── TextArea.tsx
│ │ │ ├── TextAreaNative.tsx
│ │ │ ├── TextAreaResizable.tsx
│ │ │ └── useComposedRef.ts
│ │ ├── TextBox
│ │ │ ├── TextBox.md
│ │ │ ├── TextBox.module.scss
│ │ │ ├── TextBox.spec.ts
│ │ │ ├── TextBox.tsx
│ │ │ └── TextBoxNative.tsx
│ │ ├── Theme
│ │ │ ├── NotificationToast.tsx
│ │ │ ├── Theme.md
│ │ │ ├── Theme.module.scss
│ │ │ ├── Theme.spec.ts
│ │ │ ├── Theme.tsx
│ │ │ └── ThemeNative.tsx
│ │ ├── TimeInput
│ │ │ ├── TimeInput.md
│ │ │ ├── TimeInput.module.scss
│ │ │ ├── TimeInput.spec.ts
│ │ │ ├── TimeInput.tsx
│ │ │ ├── TimeInputNative.tsx
│ │ │ └── utils.ts
│ │ ├── Timer
│ │ │ ├── Timer.md
│ │ │ ├── Timer.spec.ts
│ │ │ ├── Timer.tsx
│ │ │ └── TimerNative.tsx
│ │ ├── Toggle
│ │ │ ├── Toggle.module.scss
│ │ │ └── Toggle.tsx
│ │ ├── ToneChangerButton
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneChangerButton.spec.ts
│ │ │ └── ToneChangerButton.tsx
│ │ ├── ToneSwitch
│ │ │ ├── ToneSwitch.md
│ │ │ ├── ToneSwitch.module.scss
│ │ │ ├── ToneSwitch.spec.ts
│ │ │ ├── ToneSwitch.tsx
│ │ │ └── ToneSwitchNative.tsx
│ │ ├── Tooltip
│ │ │ ├── Tooltip.md
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.spec.ts
│ │ │ ├── Tooltip.tsx
│ │ │ └── TooltipNative.tsx
│ │ ├── Tree
│ │ │ ├── testData.ts
│ │ │ ├── Tree-dynamic.spec.ts
│ │ │ ├── Tree-icons.spec.ts
│ │ │ ├── Tree.md
│ │ │ ├── Tree.spec.ts
│ │ │ ├── TreeComponent.module.scss
│ │ │ ├── TreeComponent.tsx
│ │ │ └── TreeNative.tsx
│ │ ├── TreeDisplay
│ │ │ ├── TreeDisplay.md
│ │ │ ├── TreeDisplay.module.scss
│ │ │ ├── TreeDisplay.tsx
│ │ │ └── TreeDisplayNative.tsx
│ │ ├── ValidationSummary
│ │ │ ├── ValidationSummary.module.scss
│ │ │ └── ValidationSummary.tsx
│ │ └── VisuallyHidden.tsx
│ ├── components-core
│ │ ├── abstractions
│ │ │ ├── ComponentRenderer.ts
│ │ │ ├── LoaderRenderer.ts
│ │ │ ├── standalone.ts
│ │ │ └── treeAbstractions.ts
│ │ ├── action
│ │ │ ├── actions.ts
│ │ │ ├── APICall.tsx
│ │ │ ├── FileDownloadAction.tsx
│ │ │ ├── FileUploadAction.tsx
│ │ │ ├── NavigateAction.tsx
│ │ │ └── TimedAction.tsx
│ │ ├── ApiBoundComponent.tsx
│ │ ├── appContext
│ │ │ ├── date-functions.ts
│ │ │ ├── math-function.ts
│ │ │ └── misc-utils.ts
│ │ ├── AppContext.tsx
│ │ ├── behaviors
│ │ │ ├── Behavior.tsx
│ │ │ └── CoreBehaviors.tsx
│ │ ├── component-hooks.ts
│ │ ├── ComponentDecorator.tsx
│ │ ├── ComponentViewer.tsx
│ │ ├── CompoundComponent.tsx
│ │ ├── constants.ts
│ │ ├── DebugViewProvider.tsx
│ │ ├── descriptorHelper.ts
│ │ ├── devtools
│ │ │ ├── InspectorDialog.module.scss
│ │ │ ├── InspectorDialog.tsx
│ │ │ └── InspectorDialogVisibilityContext.tsx
│ │ ├── EngineError.ts
│ │ ├── event-handlers.ts
│ │ ├── InspectorButton.module.scss
│ │ ├── InspectorContext.tsx
│ │ ├── interception
│ │ │ ├── abstractions.ts
│ │ │ ├── ApiInterceptor.ts
│ │ │ ├── ApiInterceptorProvider.tsx
│ │ │ ├── apiInterceptorWorker.ts
│ │ │ ├── Backend.ts
│ │ │ ├── Errors.ts
│ │ │ ├── IndexedDb.ts
│ │ │ ├── initMock.ts
│ │ │ ├── InMemoryDb.ts
│ │ │ ├── ReadonlyCollection.ts
│ │ │ └── useApiInterceptorContext.tsx
│ │ ├── loader
│ │ │ ├── ApiLoader.tsx
│ │ │ ├── DataLoader.tsx
│ │ │ ├── ExternalDataLoader.tsx
│ │ │ ├── Loader.tsx
│ │ │ ├── MockLoaderRenderer.tsx
│ │ │ └── PageableLoader.tsx
│ │ ├── LoaderComponent.tsx
│ │ ├── markup-check.ts
│ │ ├── parts.ts
│ │ ├── renderers.ts
│ │ ├── rendering
│ │ │ ├── AppContent.tsx
│ │ │ ├── AppRoot.tsx
│ │ │ ├── AppWrapper.tsx
│ │ │ ├── buildProxy.ts
│ │ │ ├── collectFnVarDeps.ts
│ │ │ ├── ComponentAdapter.tsx
│ │ │ ├── ComponentWrapper.tsx
│ │ │ ├── Container.tsx
│ │ │ ├── containers.ts
│ │ │ ├── ContainerWrapper.tsx
│ │ │ ├── ErrorBoundary.module.scss
│ │ │ ├── ErrorBoundary.tsx
│ │ │ ├── InvalidComponent.module.scss
│ │ │ ├── InvalidComponent.tsx
│ │ │ ├── nodeUtils.ts
│ │ │ ├── reducer.ts
│ │ │ ├── renderChild.tsx
│ │ │ ├── StandaloneComponent.tsx
│ │ │ ├── StateContainer.tsx
│ │ │ ├── UnknownComponent.module.scss
│ │ │ ├── UnknownComponent.tsx
│ │ │ └── valueExtractor.ts
│ │ ├── reportEngineError.ts
│ │ ├── RestApiProxy.ts
│ │ ├── script-runner
│ │ │ ├── asyncProxy.ts
│ │ │ ├── AttributeValueParser.ts
│ │ │ ├── bannedFunctions.ts
│ │ │ ├── BindingTreeEvaluationContext.ts
│ │ │ ├── eval-tree-async.ts
│ │ │ ├── eval-tree-common.ts
│ │ │ ├── eval-tree-sync.ts
│ │ │ ├── ParameterParser.ts
│ │ │ ├── process-statement-async.ts
│ │ │ ├── process-statement-common.ts
│ │ │ ├── process-statement-sync.ts
│ │ │ ├── ScriptingSourceTree.ts
│ │ │ ├── simplify-expression.ts
│ │ │ ├── statement-queue.ts
│ │ │ └── visitors.ts
│ │ ├── StandaloneApp.tsx
│ │ ├── StandaloneExtensionManager.ts
│ │ ├── TableOfContentsContext.tsx
│ │ ├── theming
│ │ │ ├── _themes.scss
│ │ │ ├── component-layout-resolver.ts
│ │ │ ├── extendThemeUtils.ts
│ │ │ ├── hvar.ts
│ │ │ ├── layout-resolver.ts
│ │ │ ├── parse-layout-props.ts
│ │ │ ├── StyleContext.tsx
│ │ │ ├── StyleRegistry.ts
│ │ │ ├── ThemeContext.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── themes
│ │ │ │ ├── base-utils.ts
│ │ │ │ ├── palette.ts
│ │ │ │ ├── root.ts
│ │ │ │ ├── solid.ts
│ │ │ │ ├── theme-colors.ts
│ │ │ │ └── xmlui.ts
│ │ │ ├── themeVars.module.scss
│ │ │ ├── themeVars.ts
│ │ │ ├── transformThemeVars.ts
│ │ │ └── utils.ts
│ │ ├── utils
│ │ │ ├── actionUtils.ts
│ │ │ ├── audio-utils.ts
│ │ │ ├── base64-utils.ts
│ │ │ ├── compound-utils.ts
│ │ │ ├── css-utils.ts
│ │ │ ├── DataLoaderQueryKeyGenerator.ts
│ │ │ ├── date-utils.ts
│ │ │ ├── extractParam.ts
│ │ │ ├── hooks.tsx
│ │ │ ├── LruCache.ts
│ │ │ ├── mergeProps.ts
│ │ │ ├── misc.ts
│ │ │ ├── request-params.ts
│ │ │ ├── statementUtils.ts
│ │ │ └── treeUtils.ts
│ │ └── xmlui-parser.ts
│ ├── index-standalone.ts
│ ├── index.scss
│ ├── index.ts
│ ├── language-server
│ │ ├── server-common.ts
│ │ ├── server-web-worker.ts
│ │ ├── server.ts
│ │ ├── services
│ │ │ ├── common
│ │ │ │ ├── docs-generation.ts
│ │ │ │ ├── lsp-utils.ts
│ │ │ │ ├── metadata-utils.ts
│ │ │ │ └── syntax-node-utilities.ts
│ │ │ ├── completion.ts
│ │ │ ├── diagnostic.ts
│ │ │ ├── format.ts
│ │ │ └── hover.ts
│ │ └── xmlui-metadata-generated.js
│ ├── logging
│ │ ├── LoggerContext.tsx
│ │ ├── LoggerInitializer.tsx
│ │ ├── LoggerService.ts
│ │ └── xmlui.ts
│ ├── logo.svg
│ ├── parsers
│ │ ├── common
│ │ │ ├── GenericToken.ts
│ │ │ ├── InputStream.ts
│ │ │ └── utils.ts
│ │ ├── scripting
│ │ │ ├── code-behind-collect.ts
│ │ │ ├── Lexer.ts
│ │ │ ├── modules.ts
│ │ │ ├── Parser.ts
│ │ │ ├── ParserError.ts
│ │ │ ├── ScriptingNodeTypes.ts
│ │ │ ├── TokenTrait.ts
│ │ │ ├── TokenType.ts
│ │ │ └── tree-visitor.ts
│ │ ├── style-parser
│ │ │ ├── errors.ts
│ │ │ ├── source-tree.ts
│ │ │ ├── StyleInputStream.ts
│ │ │ ├── StyleLexer.ts
│ │ │ ├── StyleParser.ts
│ │ │ └── tokens.ts
│ │ └── xmlui-parser
│ │ ├── CharacterCodes.ts
│ │ ├── diagnostics.ts
│ │ ├── fileExtensions.ts
│ │ ├── index.ts
│ │ ├── lint.ts
│ │ ├── parser.ts
│ │ ├── ParserError.ts
│ │ ├── scanner.ts
│ │ ├── syntax-kind.ts
│ │ ├── syntax-node.ts
│ │ ├── transform.ts
│ │ ├── utils.ts
│ │ ├── xmlui-serializer.ts
│ │ └── xmlui-tree.ts
│ ├── react-app-env.d.ts
│ ├── syntax
│ │ ├── monaco
│ │ │ ├── grammar.monacoLanguage.ts
│ │ │ ├── index.ts
│ │ │ ├── xmlui-dark.ts
│ │ │ ├── xmlui-light.ts
│ │ │ └── xmluiscript.monacoLanguage.ts
│ │ └── textMate
│ │ ├── index.ts
│ │ ├── xmlui-dark.json
│ │ ├── xmlui-light.json
│ │ ├── xmlui.json
│ │ └── xmlui.tmLanguage.json
│ ├── testing
│ │ ├── assertions.ts
│ │ ├── component-test-helpers.ts
│ │ ├── ComponentDrivers.ts
│ │ ├── drivers
│ │ │ ├── DateInputDriver.ts
│ │ │ ├── index.ts
│ │ │ ├── ModalDialogDriver.ts
│ │ │ ├── NumberBoxDriver.ts
│ │ │ ├── TextBoxDriver.ts
│ │ │ ├── TimeInputDriver.ts
│ │ │ ├── TimerDriver.ts
│ │ │ └── TreeDriver.ts
│ │ ├── fixtures.ts
│ │ ├── index.ts
│ │ ├── infrastructure
│ │ │ ├── index.html
│ │ │ ├── main.tsx
│ │ │ ├── public
│ │ │ │ ├── mockServiceWorker.js
│ │ │ │ ├── resources
│ │ │ │ │ ├── bell.svg
│ │ │ │ │ ├── box.svg
│ │ │ │ │ ├── doc.svg
│ │ │ │ │ ├── eye.svg
│ │ │ │ │ ├── flower-640x480.jpg
│ │ │ │ │ ├── sun.svg
│ │ │ │ │ ├── test-image-100x100.jpg
│ │ │ │ │ └── txt.svg
│ │ │ │ └── serve.json
│ │ │ └── TestBed.tsx
│ │ └── themed-app-test-helpers.ts
│ └── vite-env.d.ts
├── tests
│ ├── components
│ │ ├── CodeBlock
│ │ │ └── hightlight-code.test.ts
│ │ ├── playground-pattern.test.ts
│ │ └── Tree
│ │ └── Tree-states.test.ts
│ ├── components-core
│ │ ├── abstractions
│ │ │ └── treeAbstractions.test.ts
│ │ ├── container
│ │ │ └── buildProxy.test.ts
│ │ ├── interception
│ │ │ ├── orderBy.test.ts
│ │ │ ├── ReadOnlyCollection.test.ts
│ │ │ └── request-param-converter.test.ts
│ │ ├── scripts-runner
│ │ │ ├── AttributeValueParser.test.ts
│ │ │ ├── eval-tree-arrow-async.test.ts
│ │ │ ├── eval-tree-arrow.test.ts
│ │ │ ├── eval-tree-func-decl-async.test.ts
│ │ │ ├── eval-tree-func-decl.test.ts
│ │ │ ├── eval-tree-pre-post.test.ts
│ │ │ ├── eval-tree-regression.test.ts
│ │ │ ├── eval-tree.test.ts
│ │ │ ├── function-proxy.test.ts
│ │ │ ├── parser-regression.test.ts
│ │ │ ├── process-event.test.ts
│ │ │ ├── process-function.test.ts
│ │ │ ├── process-implicit-context.test.ts
│ │ │ ├── process-statement-asgn.test.ts
│ │ │ ├── process-statement-destruct.test.ts
│ │ │ ├── process-statement-regs.test.ts
│ │ │ ├── process-statement-sync.test.ts
│ │ │ ├── process-statement.test.ts
│ │ │ ├── process-switch-sync.test.ts
│ │ │ ├── process-switch.test.ts
│ │ │ ├── process-try-sync.test.ts
│ │ │ ├── process-try.test.ts
│ │ │ └── test-helpers.ts
│ │ ├── test-metadata-handler.ts
│ │ ├── theming
│ │ │ ├── border-segments.test.ts
│ │ │ ├── component-layout.resolver.test.ts
│ │ │ ├── layout-property-parser.test.ts
│ │ │ ├── layout-resolver.test.ts
│ │ │ ├── layout-resolver2.test.ts
│ │ │ ├── layout-vp-override.test.ts
│ │ │ └── padding-segments.test.ts
│ │ └── utils
│ │ ├── date-utils.test.ts
│ │ ├── format-human-elapsed-time.test.ts
│ │ └── LruCache.test.ts
│ ├── language-server
│ │ ├── completion.test.ts
│ │ ├── format.test.ts
│ │ ├── hover.test.ts
│ │ └── mockData.ts
│ └── parsers
│ ├── common
│ │ └── input-stream.test.ts
│ ├── markdown
│ │ └── parse-binding-expression.test.ts
│ ├── parameter-parser.test.ts
│ ├── paremeter-parser.test.ts
│ ├── scripting
│ │ ├── eval-tree-arrow.test.ts
│ │ ├── eval-tree-pre-post.test.ts
│ │ ├── eval-tree.test.ts
│ │ ├── function-proxy.test.ts
│ │ ├── lexer-literals.test.ts
│ │ ├── lexer-misc.test.ts
│ │ ├── module-parse.test.ts
│ │ ├── parser-arrow.test.ts
│ │ ├── parser-assignments.test.ts
│ │ ├── parser-binary.test.ts
│ │ ├── parser-destructuring.test.ts
│ │ ├── parser-errors.test.ts
│ │ ├── parser-expressions.test.ts
│ │ ├── parser-function.test.ts
│ │ ├── parser-literals.test.ts
│ │ ├── parser-primary.test.ts
│ │ ├── parser-regex.test.ts
│ │ ├── parser-statements.test.ts
│ │ ├── parser-unary.test.ts
│ │ ├── process-event.test.ts
│ │ ├── process-implicit-context.test.ts
│ │ ├── process-statement-asgn.test.ts
│ │ ├── process-statement-destruct.test.ts
│ │ ├── process-statement-regs.test.ts
│ │ ├── process-statement-sync.test.ts
│ │ ├── process-statement.test.ts
│ │ ├── process-switch-sync.test.ts
│ │ ├── process-switch.test.ts
│ │ ├── process-try-sync.test.ts
│ │ ├── process-try.test.ts
│ │ ├── simplify-expression.test.ts
│ │ ├── statement-hooks.test.ts
│ │ └── test-helpers.ts
│ ├── style-parser
│ │ ├── generateHvarChain.test.ts
│ │ ├── parseHVar.test.ts
│ │ ├── parser.test.ts
│ │ └── tokens.test.ts
│ └── xmlui
│ ├── lint.test.ts
│ ├── parser.test.ts
│ ├── scanner.test.ts
│ ├── transform.attr.test.ts
│ ├── transform.circular.test.ts
│ ├── transform.element.test.ts
│ ├── transform.errors.test.ts
│ ├── transform.escape.test.ts
│ ├── transform.regression.test.ts
│ ├── transform.script.test.ts
│ ├── transform.test.ts
│ └── xmlui.ts
├── tests-e2e
│ ├── api-bound-component-regression.spec.ts
│ ├── api-call-as-extracted-component.spec.ts
│ ├── assign-to-object-or-array-regression.spec.ts
│ ├── binding-regression.spec.ts
│ ├── children-as-template-context-vars.spec.ts
│ ├── compound-component.spec.ts
│ ├── context-vars-regression.spec.ts
│ ├── data-bindings.spec.ts
│ ├── datasource-and-api-usage-in-var.spec.ts
│ ├── datasource-direct-binding.spec.ts
│ ├── datasource-onLoaded-regression.spec.ts
│ ├── modify-array-item-regression.spec.ts
│ ├── namespaces.spec.ts
│ ├── push-to-array-regression.spec.ts
│ ├── screen-breakpoints.spec.ts
│ ├── scripting.spec.ts
│ ├── state-scope-in-pages.spec.ts
│ └── state-var-scopes.spec.ts
├── tsconfig.json
├── tsdown.config.ts
├── vite.config.ts
└── vitest.config.ts
```
# Files
--------------------------------------------------------------------------------
/xmlui/src/components/Table/Table.md:
--------------------------------------------------------------------------------
```markdown
%-DESC-START
**Key features:**
- **Data integration**: Load data from APIs via [DataSource](/components/DataSource) or use static arrays
- **Virtualization**: Only renders visible rows for smooth performance with large datasets
- **Row selection**: Support single or multi-row selection for bulk operations
- **Pagination**: Built-in pagination controls for managing large datasets
Use `Column` to define headers, data binding, sorting behavior, and custom cell content.
In the following sections the examples use data with the structure outlined below:
| Id | Name | Quantity | Unit | Category |
| :--- | :------ | :------- | :----- | :--------- |
| 0 | Apples | 5 | pieces | fruits |
| 1 | Bananas | 6 | pieces | fruits |
| 2 | Carrots | 100 | grams | vegetables |
| 3 | Spinach | 1 | bunch | vegetables |
| 4 | Milk | 10 | liter | diary |
| 5 | Cheese | 200 | grams | diary |
The data is provided as JSON. In the source code samples, the `data={[...]}` declaration represents the data above.
All samples use table columns with the following definition unless noted otherwise
(The `...` declaration nested into `<Table>` represents this column definition):
```xmlui copy
<Table data='{[...]}'>
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
```
> **Note**: See [`Column`](../components/Column) to learn more about table columns.
%-DESC-END
%-PROP-START data
```xmlui copy /data='{[...]}'/
<App>
<Table data='{[...]}'>
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: data"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'>
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
You can also provide the `Table` with data directly from an API via this property.
Here, the component displays rocket information coming from the official SpaceX API.
```xmlui-pg copy display name="Example: data API Call"
<App>
<Table data='https://api.spacexdata.com/v3/rockets'>
<Column header="Image" size="140px">
<Image height="100px" fit="cover" src="{$item.flickr_images[0]}"/>
</Column>
<Column canSort="true" bindTo="country"/>
<Column canSort="true" bindTo="company"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START enableMultiRowSelection
This boolean property indicates whether you can select multiple rows in the table.
This property only has an effect when the `rowsSelectable` property is set.
Setting it to `false` limits selection to a single row.
By default, the value of this property is `true`.
```xmlui copy /enableMultiRowSelection="false"/
<App>
<Table data='{[...]}'
rowsSelectable="true"
enableMultiRowSelection="false">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: enableMultiRowSelection"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
rowsSelectable="true"
enableMultiRowSelection="false">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START headerHeight
It accepts common [size values](/styles-and-themes/common-units#size-values).
```xmlui copy /headerHeight="60px"/
<App>
<Table data='{[...]}' headerHeight="60px">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: headerHeight"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
headerHeight="60px">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START hideHeader
Set the header visibility using this property. Set it to `true` to hide the header.
The default value is `false`.
```xmlui copy /hideHeader="true"/
<App>
<Table data='{[...]}' hideHeader="true">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: hideHeader" height="300px"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
hideHeader="true">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START isPaginated
```xmlui copy /isPaginated="true"/
<App>
<Table data='{[...]}' isPaginated="true" pageSizeOptions="{[3, 6, 12]}">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: isPaginated"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
isPaginated="true" pageSizeOptions="{[3, 6, 12]}">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START loading
This boolean property indicates if the component is fetching (or processing) data.
This property is useful when data is loaded conditionally or receiving it takes some time.
```xmlui-pg copy display name="Example: loading"
<App>
<Table loading="true">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START noDataTemplate
```xmlui-pg copy {3-5} display name="Example: noDataTemplate"
<App>
<Table>
<property name="noDataTemplate">
<Text value="No data loaded" variant="strong" />
</property>
<Column bindTo="name"/>
<Column bindTo="quantity"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START pageSizeOptions
Page sizes are only accepted in an array, even if the array contains one item.
Note that this property only works if the [`isPaginated`](#ispaginated) property is set to `true`.
```xmlui copy /pageSizeOptions="{[3, 6, 12]}"/
<App>
<Table data='{[...]}' isPaginated="true" pageSizeOptions="{[3, 6, 12]}">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: pageSizeOptions"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
isPaginated="true" pageSizeOptions="{[3, 6, 12]}">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START rowDisabledPredicate
The following example disables all table rows where the item's quantity exceeds 6:
```xmlui copy {3}
<App>
<Table data='{[...]}'
rowDisabledPredicate="{(item) => item.quantity > 6}">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
>[!INFO]
> Disabled items are rendered with a different color.
```xmlui-pg name="Example: rowDisabledPredicate"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
rowDisabledPredicate="{(item) => item.quantity > 6}">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START rowsSelectable
The default value is `false`.
```xmlui copy /rowsSelectable="true"/
<App>
<Table data='{[...]}' rowsSelectable="true">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: rowsSelectable"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
rowsSelectable="true">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START checkboxTolerance
The default value is `false`.
```xmlui copy /checkboxTolerance="comfortable"/
<App>
<Table data='{[...]}'
rowsSelectable="true"
checkboxTolerance="comfortable"
>
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: checkboxTolerance"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
rowsSelectable="true"
checkboxTolerance="comfortable">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START singleSelectOnRowClick
The following sample turns on this property. Try how it works when you click on a row or directly to the selection checkbox.
```xmlui copy /singleSelectOnRowClick="true"/
<App>
<Table
data='{[...]}'
rowsSelectable="true"
singleSelectOnRowClick="true">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: singleSelectOnRowClick"
<App>
<SelectionStore>
<Table
data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
rowsSelectable="true"
singleSelectOnRowClick="true">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</SelectionStore>
</App>
```
%-PROP-END
%-PROP-START sortBy
```xmlui copy /sortBy="quantity"/
<App>
<Table data='{[...]}' sortBy="quantity">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: sortBy"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
sortBy="quantity">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START sortDirection
```xmlui copy /sortDirection="descending"/
<App>
<Table data='{[...]}' sortBy="quantity" sortDirection="descending">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
```xmlui-pg name="Example: sortDirection"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
sortBy="quantity" sortDirection="descending">
<Column bindTo="name"/>
<Column bindTo="quantity"/>
<Column bindTo="unit"/>
</Table>
</App>
```
%-PROP-END
%-PROP-START iconSortAsc
Allows the customization of the icon displayed in a Table column header when sorting is enabled,
sorting is done according to the column, and the column is sorted in ascending order.
```xmlui copy /iconSortAsc="chevronup"/
<App>
<Table data='{[...]}' sortBy="quantity" iconSortAsc="chevronup">
<Column bindTo="name" canSort="true" />
<Column bindTo="quantity" canSort="true" />
<Column bindTo="unit" canSort="true" />
</Table>
</App>
```
```xmlui-pg copy name="Example: iconSortAsc"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
sortBy="quantity" iconSortAsc="chevronup">
<Column bindTo="name" canSort="true" />
<Column bindTo="quantity" canSort="true" />
<Column bindTo="unit" canSort="true" />
</Table>
</App>
```
%-PROP-END
%-PROP-START iconSortDesc
Allows the customization of the icon displayed in a Table column header when sorting is enabled,
sorting is done according to the column, and the column is sorted in descending order.
```xmlui copy /iconSortDesc="chevrondown"/
<App>
<Table data='{[...]}' sortBy="quantity" iconSortDesc="chevrondown">
<Column bindTo="name" canSort="true" />
<Column bindTo="quantity" canSort="true" />
<Column bindTo="unit" canSort="true" />
</Table>
</App>
```
Select a column header and set it to descending ordering.
```xmlui-pg name="Example: iconSortDesc"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
sortBy="quantity" iconSortDesc="chevrondown">
<Column bindTo="name" canSort="true" />
<Column bindTo="quantity" canSort="true" />
<Column bindTo="unit" canSort="true" />
</Table>
</App>
```
%-PROP-END
%-PROP-START iconNoSort
Allows the customization of the icon displayed in a Table column header when when sorting is enabled
and sorting is not done according to the column. Use the "-" (dash) value to sign that you do not want to display an icon when a table column is not sorted.
```xmlui copy /iconNoSort="close"/
<App>
<Table data='{[...]}' sortBy="quantity" iconNoSort="close">
<Column bindTo="name" canSort="true" />
<Column bindTo="quantity" canSort="true" />
<Column bindTo="unit" canSort="true" />
</Table>
</App>
```
```xmlui-pg name="Example: iconNoSort"
<App>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
sortBy="quantity" iconNoSort="close">
<Column bindTo="name" canSort="true" />
<Column bindTo="quantity" canSort="true" />
<Column bindTo="unit" canSort="true" />
</Table>
</App>
```
%-PROP-END
%-EVENT-START sortingDidChange
Note the [`canSort`](/components/Column#cansort-default-true) properties on the `Column` components which enable custom ordering.
```xmlui copy {4}
<App var.sortedBy="">
<Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/>
<Table data='{[...]}'
onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " >
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
Click on any of the column headers to trigger a new sorting:
```xmlui-pg name="Example: sortingDidChange"
<App var.sortedBy="">
<Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " >
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
%-EVENT-END
%-EVENT-START willSort
The following example uses the `willSort` event to refuse sorting by name:
```xmlui copy {4}
<App var.sortedBy="">
<Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/>
<Table data='{[...]}'
onWillSort="(by, dir) => by !== 'name'"
onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " >
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
Click on any of the column headers to trigger the event.
Though sorting is enabled in the `TableColumnnDef` component of the "name" column via `canSort`,
clicking that column header still does not sort because `willSort` prevents it:
```xmlui-pg name="Example: willSort"
<App var.sortedBy="">
<Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
onWillSort="(by, dir) => by !== 'name'"
onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " >
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
%-EVENT-END
%-EVENT-START selectionDidChange
Of course, if multiple-row selection is not allowed (`enableMultipleRowSelection` is false), this array will contain zero or one item.
```xmlui copy {4}
<App var.selection="">
<Text>Current selection (row IDs): [{selection}]</Text>
<Table data='{[...]}'
rowsSelectable="true"
enableMultiRowSelection="true"
onSelectionDidChange="(newSel) => selection = newSel.map(item => item.id).join()" >
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
Click on any of the column headers to trigger a new sorting:
```xmlui-pg name="Example: selectionDidChange"
<App var.selection="">
<Text>Current selection (row IDs): [{selection}]</Text>
<Table data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
rowsSelectable="true"
enableMultiRowSelection="true"
onSelectionDidChange="(newSel) => selection = newSel.map(item => item.id).join()" >
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
%-EVENT-END
%-API-START clearSelection
```xmlui copy /clearSelection()/ /selectId(1)/ /selectId([2, 4])/ /selectAll()/
<App>
<HStack>
<Button label="Select all" onClick="table.selectAll()" />
<Button label="Clear all" onClick="table.clearSelection()" />
<Button label="Select 1" onClick="table.selectId(1)" />
<Button label="Select 2, 4" onClick="table.selectId([2, 4])" />
</HStack>
<Table id="table" data='{[...]}'
rowsSelectable="true"
enableMultiRowSelection="true">
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
```xmlui-pg name="Example: clearSelection"
<App>
<HStack>
<Button label="Select all" onClick="table.selectAll()" />
<Button label="Clear all" onClick="table.clearSelection()" />
<Button label="Select 1" onClick="table.selectId(1)" />
<Button label="Select 2, 4" onClick="table.selectId([2, 4])" />
</HStack>
<Table id="table" data='{[
{
id: 0,
name: "Apples",
quantity: 5,
unit: "pieces",
category: "fruits",
key: 5,
},
{
id: 1,
name: "Bananas",
quantity: 6,
unit: "pieces",
category: "fruits",
key: 4,
},
{
id: 2,
name: "Carrots",
quantity: 100,
unit: "grams",
category: "vegetables",
key: 3,
},
{
id: 3,
name: "Spinach",
quantity: 1,
unit: "bunch",
category: "vegetables",
key: 2,
},
{
id: 4,
name: "Milk",
quantity: 10,
unit: "liter",
category: "dairy",
key: 1,
},
{
id: 5,
name: "Cheese",
quantity: 200,
unit: "grams",
category: "dairy",
key: 0,
},
]}'
rowsSelectable="true"
enableMultiRowSelection="true">
<Column bindTo="name" canSort="true"/>
<Column bindTo="quantity" canSort="true"/>
<Column bindTo="unit" canSort="true"/>
</Table>
</App>
```
%-API-END
%-API-START getSelectedIds
(See the [example](#clearselection) at the `clearSelection` method)
%-API-END
%-API-START getSelectedItems
(See the [example](#clearselection) at the `clearSelection` method)
%-API-END
%-API-START selectAll
(See the [example](#clearselection) at the `clearSelection` method)
%-API-END
%-API-START selectId
(See the [example](#clearselection) at the `clearSelection` method)
%-API-END
%-PROP-START idKey
```xmlui copy /idKey="key"/
<App>
<Table
idKey="key"
rowsSelectable="true"
data="{[
{ 'key': 0, 'name': 'John' },
{ 'key': 1, 'name': 'Jane' },
{ 'key': 2, 'name': 'Bill' },
]}"
>
<Column bindTo="name"/>
</Table>
</App>
```
%-PROP-END
```
--------------------------------------------------------------------------------
/xmlui/src/components-core/script-runner/process-statement-async.ts:
--------------------------------------------------------------------------------
```typescript
import type { LoopScope } from "../../abstractions/scripting/LoopScope";
import type { BlockScope } from "../../abstractions/scripting/BlockScope";
import type { LogicalThread } from "../../abstractions/scripting/LogicalThread";
import {
T_ARROW_EXPRESSION_STATEMENT,
T_ASSIGNMENT_EXPRESSION,
T_BLOCK_STATEMENT,
T_BREAK_STATEMENT,
T_CONST_STATEMENT,
T_CONTINUE_STATEMENT,
T_DO_WHILE_STATEMENT,
T_EMPTY_STATEMENT,
T_EXPRESSION_STATEMENT,
T_FOR_IN_STATEMENT,
T_FOR_OF_STATEMENT,
T_FOR_STATEMENT,
T_FUNCTION_DECLARATION,
T_IDENTIFIER,
T_IF_STATEMENT,
T_LET_STATEMENT,
T_LITERAL,
T_RETURN_STATEMENT,
T_SWITCH_STATEMENT,
T_THROW_STATEMENT,
T_TRY_STATEMENT,
T_VAR_STATEMENT,
T_WHILE_STATEMENT,
type ArrayDestructure,
type AssignmentExpression,
type Identifier,
type Literal,
type ObjectDestructure,
type Statement,
type VarDeclaration,
} from "./ScriptingSourceTree";
import { StatementExecutionError, ThrowStatementError } from "../EngineError";
import { reportEngineError } from "../reportEngineError";
import type {
QueueInfo,
StatementQueueItem,
ProcessOutcome,
StatementRunTimeInfo,
StatementWithInfo} from "./statement-queue";
import {
StatementQueue,
mapStatementsToQueueItems,
mapToItem
} from "./statement-queue";
import { evalBindingAsync, executeArrowExpression } from "./eval-tree-async";
import type { BindingTreeEvaluationContext } from "./BindingTreeEvaluationContext";
import {
ensureMainThread,
innermostBlockScope,
innermostLoopScope,
createLoopScope,
provideLoopBody,
releaseLoopScope,
provideTryBody,
createTryScope,
innermostTryScope,
provideFinallyBody,
provideCatchBody,
provideFinallyErrorBody,
hoistFunctionDeclarations,
closing,
toStatementItems,
guard,
} from "./process-statement-common";
import { createXmlUiTreeNodeId } from "../../parsers/scripting/Parser";
// --- Helper function to process the entire queue asynchronously
export async function processStatementQueueAsync(
statements: Statement[],
evalContext: BindingTreeEvaluationContext,
thread?: LogicalThread,
): Promise<QueueInfo> {
if (!thread) {
// --- Create the main thread for the queue
thread = ensureMainThread(evalContext);
}
// --- Hoist function declarations to the top scope
hoistFunctionDeclarations(thread, statements);
// --- Fill the queue with items
const queue = new StatementQueue();
queue.push(mapStatementsToQueueItems(toStatementItems(statements)));
// --- Prepare queue diagnostics information
const diagInfo: QueueInfo = {
processedStatements: 0,
maxQueueLength: queue.length,
unshiftedItems: 0,
clearToLabels: 0,
maxBlocks: 0,
maxLoops: 0,
};
// --- Consume the queue
let startTime = new Date().getTime();
while (queue.length > 0 && !evalContext.cancellationToken?.cancelled) {
// --- Allow time to break from infinite loops
if (evalContext.timeout && new Date().getTime() - startTime > evalContext.timeout) {
throw new Error("Script execution timeout");
}
// --- Process the first item
const queueItem = queue.dequeue();
thread.breakLabelValue = queue.length > 0 ? queue.peek()!.label : -1;
let outcome: ProcessOutcome | undefined;
try {
// --- Sign that the statement is about to start
await evalContext?.onStatementStarted?.(evalContext, queueItem!.statement);
// --- Execute the statement
outcome = await processStatementAsync(
queueItem!.statement,
queueItem?.execInfo ?? {},
evalContext,
thread,
);
} catch (err) {
if (thread.tryBlocks && thread.tryBlocks.length > 0) {
// --- We have a try block to handle this error
const tryScope = thread.tryBlocks[thread.tryBlocks.length - 1];
// --- Sign the error to raise. Next time the guarded try block will execute the catch block, if there is any
tryScope.errorToThrow = err;
tryScope.errorSource = tryScope.processingPhase;
tryScope.processingPhase = "error";
// --- Let's skip the remaining parts of the current block (try/catch/finally)
outcome = {
clearToLabel: tryScope.tryLabel,
};
} else {
if (err instanceof ThrowStatementError) {
reportEngineError(err);
} else {
// TODO: Provide source code information
reportEngineError(
new StatementExecutionError(err as any /* queueItem!.statement?.source */),
err,
);
}
}
}
// --- Modify the queue's content according to the outcome
if (outcome) {
if (outcome.toUnshift) {
queue.unshift(outcome.toUnshift);
diagInfo.unshiftedItems += outcome.toUnshift.length;
}
if (outcome.clearToLabel !== undefined) {
queue.clearToLabel(outcome.clearToLabel);
diagInfo.clearToLabels++;
}
}
// --- Sign that the statement has been completed
await evalContext?.onStatementCompleted?.(evalContext, queueItem!.statement);
// --- Provide diagnostics
if (queue.length > diagInfo.maxQueueLength) {
diagInfo.maxQueueLength = queue.length;
}
if (thread.blocks && thread.blocks!.length > diagInfo.maxBlocks) {
diagInfo.maxBlocks = thread.blocks!.length;
}
if (thread.loops && thread.loops.length > diagInfo.maxLoops) {
diagInfo.maxLoops = thread.loops.length;
}
diagInfo.processedStatements++;
}
// --- Done.
return diagInfo;
}
/**
* Process the specified statement asynchronously
* @param statement Statement to process
* @param execInfo Execution information
* @param evalContext Evaluation context used for processing
* @param thread Logical thread to use for statement processing
* @param onStatementCompleted
* @returns Items to put back into the queue of statements
*/
async function processStatementAsync(
statement: Statement,
execInfo: StatementRunTimeInfo,
evalContext: BindingTreeEvaluationContext,
thread: LogicalThread,
): Promise<ProcessOutcome> {
// --- These items should be put in the statement queue after return
let toUnshift: StatementQueueItem[] = [];
let clearToLabel: number | undefined;
// --- Process the statement according to its type
switch (statement.type) {
case T_FUNCTION_DECLARATION:
// --- Function declarations are already hoisted, nothing to do
break;
case T_VAR_STATEMENT:
if (thread !== evalContext.mainThread) {
throw new Error("'var' declarations are not allowed within functions");
}
break;
case T_EMPTY_STATEMENT:
// --- Nothing to do
break;
case T_BLOCK_STATEMENT:
// --- No statement, nothing to process
if (statement.stmts.length === 0) break;
// --- Create a new block scope
thread.blocks ??= [];
thread.blocks.push({ vars: {} });
// --- Hoist function declarations to the innermost block scope
hoistFunctionDeclarations(thread, statement.stmts);
// --- Queue the block scope's body...
toUnshift = mapStatementsToQueueItems([
...toStatementItems(statement.stmts),
// --- ...and an empty statement to remove the block scope
closing(),
]);
break;
case T_EXPRESSION_STATEMENT:
// --- Just evaluate it
const statementValue = await evalBindingAsync(
statement.expr,
evalContext,
thread,
);
if (thread.blocks && thread.blocks.length !== 0) {
thread.blocks[thread.blocks.length - 1].returnValue = statementValue;
}
break;
case T_ARROW_EXPRESSION_STATEMENT:
// --- Compile the arrow expression
const arrowFuncValue = await executeArrowExpression(
statement.expr,
evalContext,
thread,
...(evalContext.eventArgs ?? []),
);
if (thread.blocks && thread.blocks.length !== 0) {
thread.blocks[thread.blocks.length - 1].returnValue = arrowFuncValue;
}
break;
case T_LET_STATEMENT: {
// --- Create a new variable in the innermost scope
const block = innermostBlockScope(thread);
if (!block) {
throw new Error("Missing block scope");
}
await processDeclarationsAsync(block, evalContext, thread, statement.decls);
break;
}
case T_CONST_STATEMENT: {
// --- Create a new variable in the innermost scope
const block = innermostBlockScope(thread);
if (!block) {
throw new Error("Missing block scope");
}
await processDeclarationsAsync(block, evalContext, thread, statement.decls, true);
break;
}
case T_IF_STATEMENT:
// --- Evaluate the condition
const condition = !!(await evalBindingAsync(statement.cond, evalContext, thread));
if (condition) {
toUnshift = mapToItem(statement.thenB);
} else if (statement.elseB) {
toUnshift = mapToItem(statement.elseB);
}
break;
case T_RETURN_STATEMENT: {
// --- Check if return is valid here
let blockScope = innermostBlockScope(thread);
if (blockScope === undefined) {
throw new Error("Return requires a block scope");
}
// --- Store the return value
thread.returnValue = statement.expr
? await evalBindingAsync(statement.expr, evalContext, thread)
: undefined;
// --- Check for try blocks
if ((thread.tryBlocks ?? []).length > 0) {
// --- Mark the loop's try scope to exit with "return"
const returnTryScope = thread.tryBlocks![0];
returnTryScope.exitType = "return";
// --- Remove the try/catch/finally block's scope
if (returnTryScope.processingPhase !== "postFinally") {
thread.blocks!.pop();
}
// --- Clear the last part of the try/catch/finally block
const tryScope = innermostTryScope(thread);
clearToLabel = tryScope.tryLabel;
} else {
// --- Delete the remaining part of the queue
clearToLabel = -1;
}
break;
}
case T_WHILE_STATEMENT: {
// --- Create or get the loop's scope (guard is falsy for the first execution)
let loopScope = execInfo.guard ? innermostLoopScope(thread) : createLoopScope(thread);
// --- Evaluate the loop condition
const condition = !!(await evalBindingAsync(statement.cond, evalContext, thread));
if (condition) {
toUnshift = provideLoopBody(loopScope!, statement, thread.breakLabelValue);
} else {
// --- When the condition is not met, we're done.
releaseLoopScope(thread);
}
break;
}
case T_DO_WHILE_STATEMENT: {
if (!execInfo.guard) {
// --- First loop execution (do-while is a post-test loop)
toUnshift = provideLoopBody(createLoopScope(thread), statement, thread.breakLabelValue);
break;
}
// --- Evaluate the loop condition
const condition = !!(await evalBindingAsync(statement.cond, evalContext, thread));
if (condition) {
toUnshift = provideLoopBody(innermostLoopScope(thread), statement, thread.breakLabelValue);
} else {
// --- When the condition is not met, we're done.
releaseLoopScope(thread);
}
break;
}
case T_CONTINUE_STATEMENT: {
// --- Search for the innermost non-switch loop scope, release the switch scopes
if (!thread.loops || thread.loops.length === 0) {
throw new Error("Missing loop scope");
}
let loopScope: LoopScope | undefined;
while (thread.loops.length > 0) {
loopScope = innermostLoopScope(thread);
if (!loopScope.isSwitch) {
break;
}
thread.loops.pop();
}
if (!loopScope) {
throw new Error("Missing loop scope");
}
if (
loopScope.tryBlockDepth >= 0 &&
loopScope.tryBlockDepth < (thread.tryBlocks ?? []).length
) {
// --- Mark the loop's try scope to exit with "continue"
for (let i = loopScope.tryBlockDepth; i < thread.tryBlocks!.length; i++) {
thread.tryBlocks![loopScope.tryBlockDepth]!.exitType = "continue";
}
// --- Clear the last part of the try/catch/finally block
const tryScope = innermostTryScope(thread);
clearToLabel = tryScope.tryLabel;
} else {
clearToLabel = loopScope.continueLabel;
releaseLoopScope(thread, false);
}
break;
}
case T_BREAK_STATEMENT: {
const loopScope = innermostLoopScope(thread);
if (loopScope === undefined) {
throw new Error("Missing loop scope");
}
if (!!loopScope.isSwitch) {
// --- Break is in a switch case
clearToLabel = loopScope.breakLabel;
break;
}
// --- Break is in a loop construct
if (
loopScope.tryBlockDepth >= 0 &&
loopScope.tryBlockDepth < (thread.tryBlocks ?? []).length
) {
// --- Mark the loop's try scope to exit with "break"
for (let i = loopScope.tryBlockDepth; i < thread.tryBlocks!.length; i++) {
thread.tryBlocks![loopScope.tryBlockDepth]!.exitType = "break";
}
// --- Clear the last part of the try/catch/finally block
const tryScope = innermostTryScope(thread);
clearToLabel = tryScope.tryLabel;
} else {
clearToLabel = loopScope.breakLabel;
releaseLoopScope(thread);
}
break;
}
case T_FOR_STATEMENT:
if (!execInfo.guard) {
// --- Init the loop with a new scope
createLoopScope(thread, 1);
// --- Create a new block for the loop variables
thread.blocks ??= [];
thread.blocks.push({
vars: {},
});
const guardStatement = guard(statement);
if (statement.init) {
// --- Unshift the initialization part and the guarded for-loop
toUnshift = mapStatementsToQueueItems([{ statement: statement.init }, guardStatement]);
} else {
// --- No init, unshift only the guard statement
toUnshift = mapStatementsToQueueItems([guardStatement]);
}
} else {
// --- Initialization already done. Evaluate the condition
if (!statement.cond || !!(await evalBindingAsync(statement.cond, evalContext, thread))) {
// --- Stay in the loop, inject the body, the update expression, and the loop guard
const loopScope = innermostLoopScope(thread);
if (statement.upd) {
const updateStmt: StatementWithInfo = {
statement: {
type: T_EXPRESSION_STATEMENT,
nodeId: createXmlUiTreeNodeId(),
expr: statement.upd,
},
};
toUnshift = mapStatementsToQueueItems([
{ statement: statement.body },
updateStmt,
{ statement, execInfo },
]);
} else {
toUnshift = mapStatementsToQueueItems([
{ statement: statement.body },
{ statement, execInfo },
]);
}
// --- The next queue label is for "break"
loopScope.breakLabel = thread.breakLabelValue ?? -1;
// --- The guard action's label is for "continue"
loopScope.continueLabel = toUnshift[1].label;
} else {
// --- The condition is not met, we're done. Remove the loop's scope from the evaluation context
releaseLoopScope(thread);
}
}
break;
case T_FOR_IN_STATEMENT:
if (!execInfo.guard) {
// --- Get the object keys
const keyedObject = await evalBindingAsync(statement.expr, evalContext, thread);
if (keyedObject == undefined) {
// --- Nothing to do, no object to traverse
break;
}
// --- Init the loop with a new scope
createLoopScope(thread, 1);
// --- Create a new block for the loop variables
thread.blocks ??= [];
thread.blocks.push({ vars: {} });
toUnshift = mapStatementsToQueueItems([
{ statement, execInfo: { guard: true, keys: Object.keys(keyedObject), keyIndex: 0 } },
]);
} else {
// --- Just for the sake of extra safety
if (execInfo.keyIndex === undefined || execInfo.keys === undefined) {
throw new Error("Keys information expected in for..in loop");
}
// --- Any key left?
if (execInfo.keyIndex < execInfo.keys.length) {
// --- Set the binding variable to the next key
const propValue = execInfo.keys[execInfo.keyIndex++];
switch (statement.varB) {
case "none": {
const assigmentExpr: AssignmentExpression = {
type: T_ASSIGNMENT_EXPRESSION,
leftValue: {
type: T_IDENTIFIER,
name: statement.id.name,
} as Identifier,
op: "=",
expr: {
type: T_LITERAL,
value: propValue,
} as Literal,
} as AssignmentExpression;
await evalBindingAsync(assigmentExpr, evalContext, thread);
break;
}
case "const":
case "let":
{
// --- Create a new variable in the innermost scope
const block = innermostBlockScope(thread);
if (!block) {
throw new Error("Missing block scope");
}
block.vars[statement.id.name] = propValue;
if (statement.varB === "const") {
block.constVars ??= new Set<string>();
block.constVars.add(statement.id.name);
}
}
break;
}
// --- Inject the loop body
const loopScope = innermostLoopScope(thread);
toUnshift = mapStatementsToQueueItems([
{ statement: statement.body },
{ statement, execInfo },
]);
// --- The next queue label is for "break"
loopScope.breakLabel = thread.breakLabelValue ?? -1;
// --- The guard action's label is for "continue"
loopScope.continueLabel = toUnshift[1].label;
} else {
// --- The condition is not met, we're done. Remove the loop's scope from the evaluation context
releaseLoopScope(thread);
}
}
break;
case T_FOR_OF_STATEMENT:
if (!execInfo.guard) {
// --- Get the object keys
const iteratorObject = await evalBindingAsync(statement.expr, evalContext, thread);
if (iteratorObject == null || typeof iteratorObject[Symbol.iterator] !== "function") {
// --- The object is not an iterator
throw new Error("Object in for..of is not iterable");
}
// --- Init the loop with a new scope
createLoopScope(thread, 1);
// --- Create a new block for the loop variables
thread.blocks ??= [];
thread.blocks.push({ vars: {} });
toUnshift = mapStatementsToQueueItems([
{ statement, execInfo: { guard: true, iterator: iteratorObject[Symbol.iterator]() } },
]);
} else {
// --- Just for the sake of extra safety
if (execInfo.iterator === undefined) {
throw new Error("Iterator expected in for..of loop");
}
// --- Any iteration left?
const nextIteration = execInfo.iterator.next();
if (nextIteration.done) {
// --- The for..of loop is complete. Remove the loop's scope from the evaluation context
releaseLoopScope(thread);
break;
}
// --- Set the binding variable to the next key
const propValue = nextIteration.value;
switch (statement.varB) {
case "none": {
const assigmentExpr: AssignmentExpression = {
type: T_ASSIGNMENT_EXPRESSION,
leftValue: {
type: T_IDENTIFIER,
name: statement.id.name,
} as Identifier,
op: "=",
expr: {
type: T_LITERAL,
value: propValue,
} as Literal,
} as AssignmentExpression;
await evalBindingAsync(assigmentExpr, evalContext, thread);
break;
}
case "const":
case "let":
{
// --- Create a new variable in the innermost scope
const block = innermostBlockScope(thread);
if (!block) {
throw new Error("Missing block scope");
}
block.vars[statement.id.name] = propValue;
if (statement.varB === "const") {
block.constVars ??= new Set<string>();
block.constVars.add(statement.id.name);
}
}
break;
}
// --- Inject the loop body
const loopScope = innermostLoopScope(thread);
toUnshift = mapStatementsToQueueItems([
{ statement: statement.body },
{ statement, execInfo },
]);
// --- The next queue label is for "break"
loopScope.breakLabel = thread.breakLabelValue ?? -1;
// --- The guard action's label is for "continue"
loopScope.continueLabel = toUnshift[1].label;
}
break;
case T_THROW_STATEMENT: {
throw new ThrowStatementError(await evalBindingAsync(statement.expr, evalContext, thread));
}
case T_TRY_STATEMENT: {
if (!execInfo.guard) {
// --- Execute the try block
toUnshift = provideTryBody(thread, createTryScope(thread, statement));
break;
}
// --- Evaluate try
const tryScope = innermostTryScope(thread);
switch (tryScope.processingPhase) {
case "error":
// --- There was an error we may handle with catch
switch (tryScope.errorSource) {
case "try":
// --- Remove the "try" block's scope
thread.blocks!.pop();
// --- Go on with catch or finally
if (statement.catchB) {
if (tryScope.statement.catchV) {
const block = innermostBlockScope(thread)!;
block.vars[tryScope.statement.catchV.name] =
tryScope.errorToThrow instanceof ThrowStatementError
? tryScope.errorToThrow.errorObject
: tryScope.errorToThrow;
}
delete tryScope.errorToThrow;
tryScope.processingPhase = "catch";
toUnshift = provideCatchBody(thread, tryScope);
} else if (tryScope.statement.finallyB) {
// --- No catch, move on finally
tryScope.processingPhase = "finally";
toUnshift = provideFinallyBody(thread, tryScope);
}
break;
case "catch":
// --- Remove the "catch" block's scope
thread.blocks!.pop();
// --- Move to the finally block
tryScope.processingPhase = "finally";
toUnshift = provideFinallyBody(thread, tryScope);
break;
case "finally":
// --- Remove the "finally" block's scope
thread.blocks!.pop();
// --- Move to the post finally execution
tryScope.processingPhase = "postFinally";
toUnshift = provideFinallyErrorBody(tryScope);
break;
}
break;
case "try":
// --- We completed the try block successfully
tryScope.processingPhase = "finally";
if (statement.finallyB) {
toUnshift = provideFinallyBody(thread, tryScope);
}
break;
case "catch":
// --- We completed the catch block successfully, remove the handled error
tryScope.processingPhase = "finally";
if (statement.finallyB) {
toUnshift = provideFinallyBody(thread, tryScope);
}
break;
case "finally":
tryScope.processingPhase = "postFinally";
toUnshift = provideFinallyErrorBody(tryScope);
break;
case "postFinally":
// --- We completed the finally block successfully
const innermostTry = thread.tryBlocks!.pop()!;
// --- Is there any special exit type?
switch (innermostTry.exitType) {
case "break": {
const loopScope = innermostLoopScope(thread);
if (loopScope === undefined) {
throw new Error("Missing loop scope");
}
releaseLoopScope(thread);
clearToLabel = loopScope.breakLabel;
break;
}
case "continue": {
const loopScope = innermostLoopScope(thread);
if (loopScope === undefined) {
throw new Error("Missing loop scope");
}
clearToLabel = loopScope.continueLabel;
releaseLoopScope(thread, false);
break;
}
case "return":
clearToLabel = -1;
break;
}
// --- Should we raise an error?
if (innermostTry.errorToThrow) {
throw innermostTry.errorToThrow;
}
break;
}
break;
}
case T_SWITCH_STATEMENT: {
// --- Create or get the loop's scope (guard is falsy for the first execution)
if (execInfo.guard) {
// --- Complete the switch
releaseLoopScope(thread);
} else {
let loopScope = createLoopScope(thread);
loopScope.isSwitch = true;
thread.blocks!.push({ vars: {} });
// --- Evaluate the switch value
const switchValue = await evalBindingAsync(statement.expr, evalContext, thread);
// --- Find the matching label
let matchingIndex = -1;
for (let i = 0; i < statement.cases.length; i++) {
const currentCase = statement.cases[i];
// --- Check for default case
if (currentCase.caseE === undefined) {
matchingIndex = i;
break;
}
// --- Check for matching case
const caseValue = await evalBindingAsync(currentCase.caseE, evalContext, thread);
if (caseValue === switchValue) {
matchingIndex = i;
break;
}
}
// --- Merge all statements from the matching label
const statementFlow: Statement[] = [];
if (matchingIndex >= 0) {
for (let i = matchingIndex; i < statement.cases.length; i++) {
statementFlow.push(...statement.cases[i].stmts!);
}
}
// --- Queue the statement flow and the guard
toUnshift = mapStatementsToQueueItems([
...toStatementItems(statementFlow),
guard(statement),
]);
loopScope.breakLabel = toUnshift[toUnshift.length - 1].label;
}
break;
}
}
// --- The statement may remove the innermost scope
if (execInfo.removeBlockScope) {
if (thread.blocks && thread.blocks.length > 0) {
thread.blocks.pop();
}
}
// --- Done.
return { toUnshift, clearToLabel };
}
/**
* Funtion to process a visited ID
*/
type IdDeclarationVisitor = (id: string) => void;
// --- Process a variable declaration
export async function processDeclarationsAsync(
block: BlockScope,
evalContext: BindingTreeEvaluationContext,
thread: LogicalThread,
declarations: VarDeclaration[],
addConst = false,
useValue = false,
baseValue = undefined,
): Promise<void> {
for (let i = 0; i < declarations.length; i++) {
let value: any;
const decl = declarations[i];
if (useValue) {
value = baseValue;
} else if (decl.expr) {
value = await evalBindingAsync(decl.expr, evalContext, thread);
}
visitDeclaration(block, decl, value, addConst);
}
// --- Visit a variable
function visitDeclaration(
block: BlockScope,
decl: VarDeclaration,
baseValue: any,
addConst: boolean,
): void {
// --- Process each declaration
if (decl.id) {
visitIdDeclaration(block, decl.id, baseValue, addConst);
} else if (decl.aDestr) {
visitArrayDestruct(block, decl.aDestr, baseValue, addConst);
} else if (decl.oDestr) {
visitObjectDestruct(block, decl.oDestr, baseValue, addConst);
} else {
throw new Error("Unknown declaration specifier");
}
}
// --- Visits a single ID declaration
function visitIdDeclaration(
block: BlockScope,
id: string,
baseValue: any,
addConst: boolean,
): void {
if (block.vars[id]) {
throw new Error(`Variable ${id} is already declared in the current scope.`);
}
block.vars[id] = baseValue;
if (addConst) {
block.constVars ??= new Set<string>();
block.constVars.add(id);
}
}
// --- Visits an array destructure declaration
function visitArrayDestruct(
block: BlockScope,
arrayD: ArrayDestructure[],
baseValue: any,
addConst: boolean,
): void {
for (let i = 0; i < arrayD.length; i++) {
const arrDecl = arrayD[i];
const value = baseValue?.[i];
if (arrDecl.id) {
visitIdDeclaration(block, arrDecl.id, value, addConst);
} else if (arrDecl.aDestr) {
visitArrayDestruct(block, arrDecl.aDestr, value, addConst);
} else if (arrDecl.oDestr) {
visitObjectDestruct(block, arrDecl.oDestr, value, addConst);
}
}
}
// --- Visits an object destructure declaration
function visitObjectDestruct(
block: BlockScope,
objectD: ObjectDestructure[],
baseValue: any,
addConst: boolean,
): void {
for (let i = 0; i < objectD.length; i++) {
const objDecl = objectD[i];
const value = baseValue?.[objDecl.id!];
if (objDecl.aDestr) {
visitArrayDestruct(block, objDecl.aDestr, value, addConst);
} else if (objDecl.oDestr) {
visitObjectDestruct(block, objDecl.oDestr, value, addConst);
} else {
visitIdDeclaration(block, objDecl.alias ?? objDecl.id!, value, addConst);
}
}
}
}
```