This is page 113 of 186. Use http://codebase.md/xmlui-org/xmlui/%7Bnode.props.src?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .changeset
│ └── config.json
├── .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.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.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.module.scss
│ │ │ ├── Preview.tsx
│ │ │ ├── Select.module.scss
│ │ │ ├── StandalonePlayground.tsx
│ │ │ ├── StandalonePlaygroundNative.module.scss
│ │ │ ├── StandalonePlaygroundNative.tsx
│ │ │ ├── ThemeSwitcher.module.scss
│ │ │ ├── ThemeSwitcher.tsx
│ │ │ ├── ToneSwitcher.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.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/List/List.md:
--------------------------------------------------------------------------------
```markdown
1 | %-DESC-START
2 |
3 | **Key features:**
4 | - **Virtualization**: Renders only visible items for optimal performance with large datasets
5 | - **Advanced grouping**: Group data by any field with customizable headers and footers
6 | - **Built-in sorting**: Sort by any data field in ascending or descending order
7 | - **Visual formatting**: Pre-styled list appearance with borders, spacing, and layout
8 | - **Pagination support**: Handle large datasets with built-in pagination controls
9 | - **Empty state handling**: Customizable templates for when no data is available
10 |
11 | **List vs Items:**
12 | Use `List` for complex data presentation requiring performance optimization, grouping, sorting, or visual formatting. Use `Items` for simple data iteration without layout requirements.
13 |
14 | In the following examples all use the same list of data which looks like so:
15 |
16 | | Id | Name | Quantity | Unit | Category | Key |
17 | | :--- | :------ | :------- | :----- | :--------- | :--- |
18 | | 0 | Apples | 5 | pieces | fruits | 5 |
19 | | 1 | Bananas | 6 | pieces | fruits | 4 |
20 | | 2 | Carrots | 100 | grams | vegetables | 3 |
21 | | 3 | Spinach | 1 | bunch | vegetables | 2 |
22 | | 4 | Milk | 10 | liter | diary | 1 |
23 | | 5 | Cheese | 200 | grams | diary | 0 |
24 |
25 | The data is provided as JSON.
26 |
27 | %-DESC-END
28 |
29 | %-PROP-START data
30 |
31 | Note how the `List` infers the given data and provides a simple layout for it.
32 | To tweak what data and how it is displayed, see the [`itemTemplate` section](#itemtemplate).
33 |
34 | ```xmlui copy
35 | <App>
36 | <List data='{[...]}' />
37 | </App>
38 | ```
39 |
40 | ```xmlui-pg name="Example: data" height="400px"
41 | <App>
42 | <List data='{[
43 | {
44 | id: 0,
45 | name: "Apples",
46 | quantity: 5,
47 | unit: "pieces",
48 | category: "fruits",
49 | key: 5,
50 | },
51 | {
52 | id: 1,
53 | name: "Bananas",
54 | quantity: 6,
55 | unit: "pieces",
56 | category: "fruits",
57 | key: 4,
58 | },
59 | {
60 | id: 2,
61 | name: "Carrots",
62 | quantity: 100,
63 | unit: "grams",
64 | category: "vegetables",
65 | key: 3,
66 | },
67 | {
68 | id: 3,
69 | name: "Spinach",
70 | quantity: 1,
71 | unit: "bunch",
72 | category: "vegetables",
73 | key: 2,
74 | },
75 | {
76 | id: 4,
77 | name: "Milk",
78 | quantity: 10,
79 | unit: "liter",
80 | category: "dairy",
81 | key: 1,
82 | },
83 | {
84 | id: 5,
85 | name: "Cheese",
86 | quantity: 200,
87 | unit: "grams",
88 | category: "dairy",
89 | key: 0,
90 | },
91 | ]}' />
92 | </App>
93 | ```
94 |
95 | You can also provide the `List` with data directly from an API via this property.
96 |
97 | In the example below, the `List` also uses the `itemTemplate` property to access the data attributes as well.
98 | See the [itemTemplate section](#itemtemplate).
99 |
100 | ```xmlui-pg copy name="Example: data API Call" height="400px"
101 | <App>
102 | <List data='https://api.spacexdata.com/v3/rockets'>
103 | <property name="itemTemplate">
104 | <Card>
105 | <Image height="100px" fit="cover" src="{$item.flickr_images[0]}"/>
106 | <Text value="{$item.country}" />
107 | <Text value="{$item.company}" variant="strong" />
108 | </Card>
109 | </property>
110 | </List>
111 | </App>
112 | ```
113 |
114 | %-PROP-END
115 |
116 | %-PROP-START defaultGroups
117 |
118 | >[!INFO]
119 | > For the `defaultGroups` property to work, the data must be sectioned using the [`groupBy`](#groupBy) property, and either a [`groupHeaderTemplate`](#groupHeaderTemplate) or a [`groupFooterTemplate`](#groupFooterTemplate) needs to be provided.
120 |
121 | ```xmlui copy {4}
122 | <App>
123 | <List
124 | data='{[...]}'
125 | defaultGroups="{['dairy', 'meat', 'vegetables']}"
126 | groupBy="category" >
127 | <property name="groupHeaderTemplate">
128 | <VStack>
129 | <Text variant="subtitle" value="{$group.key}" />
130 | </VStack>
131 | </property>
132 | </List>
133 | </App>
134 | ```
135 |
136 | ```xmlui-pg name="Example: defaultGroups" height="400px"
137 | <App>
138 | <List
139 | data='{[
140 | {
141 | id: 0,
142 | name: "Apples",
143 | quantity: 5,
144 | unit: "pieces",
145 | category: "fruits",
146 | key: 5,
147 | },
148 | {
149 | id: 1,
150 | name: "Bananas",
151 | quantity: 6,
152 | unit: "pieces",
153 | category: "fruits",
154 | key: 4,
155 | },
156 | {
157 | id: 2,
158 | name: "Carrots",
159 | quantity: 100,
160 | unit: "grams",
161 | category: "vegetables",
162 | key: 3,
163 | },
164 | {
165 | id: 3,
166 | name: "Spinach",
167 | quantity: 1,
168 | unit: "bunch",
169 | category: "vegetables",
170 | key: 2,
171 | },
172 | {
173 | id: 4,
174 | name: "Milk",
175 | quantity: 10,
176 | unit: "liter",
177 | category: "dairy",
178 | key: 1,
179 | },
180 | {
181 | id: 5,
182 | name: "Cheese",
183 | quantity: 200,
184 | unit: "grams",
185 | category: "dairy",
186 | key: 0,
187 | },
188 | ]}'
189 | defaultGroups="{['dairy', 'meat', 'vegetables']}"
190 | groupBy="category">
191 | <property name="groupHeaderTemplate">
192 | <VStack>
193 | <Text variant="subtitle" value="{$group.key}" />
194 | </VStack>
195 | </property>
196 | </List>
197 | </App>
198 | ```
199 |
200 | %-PROP-END
201 |
202 | %-PROP-START emptyListTemplate
203 |
204 | ```xmlui-pg copy display name="Example: emptyListTemplate" height="140px"
205 | <App>
206 | <List>
207 | <property name="emptyListTemplate">
208 | <VStack horizontalAlignment="center">
209 | <Text variant="strong" value="Empty..." />
210 | </VStack>
211 | </property>
212 | </List>
213 | </App>
214 | ```
215 |
216 | %-PROP-END
217 |
218 | %-PROP-START idKey
219 |
220 | ```xmlui /idKey="key"/
221 | <App>
222 | <List idKey="key" data='{[...]}' />
223 | </App>
224 | ```
225 |
226 | ```xmlui-pg name="Example: idKey" height="400px"
227 | <App>
228 | <List idKey="key" data='{[
229 | {
230 | id: 0,
231 | name: "Apples",
232 | quantity: 5,
233 | unit: "pieces",
234 | category: "fruits",
235 | key: 5,
236 | },
237 | {
238 | id: 1,
239 | name: "Bananas",
240 | quantity: 6,
241 | unit: "pieces",
242 | category: "fruits",
243 | key: 4,
244 | },
245 | {
246 | id: 2,
247 | name: "Carrots",
248 | quantity: 100,
249 | unit: "grams",
250 | category: "vegetables",
251 | key: 3,
252 | },
253 | {
254 | id: 3,
255 | name: "Spinach",
256 | quantity: 1,
257 | unit: "bunch",
258 | category: "vegetables",
259 | key: 2,
260 | },
261 | {
262 | id: 4,
263 | name: "Milk",
264 | quantity: 10,
265 | unit: "liter",
266 | category: "dairy",
267 | key: 1,
268 | },
269 | {
270 | id: 5,
271 | name: "Cheese",
272 | quantity: 200,
273 | unit: "grams",
274 | category: "dairy",
275 | key: 0,
276 | },
277 | ]}' />
278 | </App>
279 | ```
280 |
281 | %-PROP-END
282 |
283 | %-PROP-START itemTemplate
284 |
285 | Note how in the example below the `$item` is used to access the `name`, `quantity` and `unit` attributes.
286 |
287 | ```xmlui copy {3-14}
288 | <App>
289 | <List data='{[...]}'>
290 | <property name="itemTemplate">
291 | <Card>
292 | <HStack verticalAlignment="center">
293 | <Icon name="info" />
294 | <Text value="{$item.name}" variant="strong" />
295 | </HStack>
296 | <HStack>
297 | <Text value="{$item.quantity}" />
298 | <Text value="{$item.unit}" variant="em" />
299 | </HStack>
300 | </Card>
301 | </property>
302 | </List>
303 | </App>
304 | ```
305 |
306 | ```xmlui-pg name="Example: itemTemplate" height="400px"
307 | <App>
308 | <List data='{[
309 | {
310 | id: 0,
311 | name: "Apples",
312 | quantity: 5,
313 | unit: "pieces",
314 | category: "fruits",
315 | key: 5,
316 | },
317 | {
318 | id: 1,
319 | name: "Bananas",
320 | quantity: 6,
321 | unit: "pieces",
322 | category: "fruits",
323 | key: 4,
324 | },
325 | {
326 | id: 2,
327 | name: "Carrots",
328 | quantity: 100,
329 | unit: "grams",
330 | category: "vegetables",
331 | key: 3,
332 | },
333 | {
334 | id: 3,
335 | name: "Spinach",
336 | quantity: 1,
337 | unit: "bunch",
338 | category: "vegetables",
339 | key: 2,
340 | },
341 | {
342 | id: 4,
343 | name: "Milk",
344 | quantity: 10,
345 | unit: "liter",
346 | category: "dairy",
347 | key: 1,
348 | },
349 | {
350 | id: 5,
351 | name: "Cheese",
352 | quantity: 200,
353 | unit: "grams",
354 | category: "dairy",
355 | key: 0,
356 | },
357 | ]}'>
358 | <property name="itemTemplate">
359 | <Card>
360 | <HStack verticalAlignment="center">
361 | <Icon name="info" />
362 | <Text value="{$item.name}" variant="strong" />
363 | </HStack>
364 | <HStack>
365 | <Text value="{$item.quantity}" />
366 | <Text value="{$item.unit}" variant="em" />
367 | </HStack>
368 | </Card>
369 | </property>
370 | </List>
371 | </App>
372 | ```
373 |
374 | %-PROP-END
375 |
376 | %-PROP-START limit
377 |
378 | ```xmlui /limit="4"/
379 | <App>
380 | <List limit="3" data='{[...]}' />
381 | </App>
382 | ```
383 |
384 | ```xmlui-pg name="Example: limit" height="400px"
385 | <App>
386 | <List limit="3" data='{[
387 | {
388 | id: 0,
389 | name: "Apples",
390 | quantity: 5,
391 | unit: "pieces",
392 | category: "fruits",
393 | key: 5,
394 | },
395 | {
396 | id: 1,
397 | name: "Bananas",
398 | quantity: 6,
399 | unit: "pieces",
400 | category: "fruits",
401 | key: 4,
402 | },
403 | {
404 | id: 2,
405 | name: "Carrots",
406 | quantity: 100,
407 | unit: "grams",
408 | category: "vegetables",
409 | key: 3,
410 | },
411 | {
412 | id: 3,
413 | name: "Spinach",
414 | quantity: 1,
415 | unit: "bunch",
416 | category: "vegetables",
417 | key: 2,
418 | },
419 | {
420 | id: 4,
421 | name: "Milk",
422 | quantity: 10,
423 | unit: "liter",
424 | category: "dairy",
425 | key: 1,
426 | },
427 | {
428 | id: 5,
429 | name: "Cheese",
430 | quantity: 200,
431 | unit: "grams",
432 | category: "dairy",
433 | key: 0,
434 | },
435 | ]}' />
436 | </App>
437 | ```
438 |
439 | %-PROP-END
440 |
441 | %-PROP-START loading
442 |
443 | ```xmlui-pg copy display name="Example: loading" height="120px"
444 | <App>
445 | <List loading="true" />
446 | </App>
447 | ```
448 |
449 | %-PROP-END
450 |
451 | %-PROP-START orderBy
452 |
453 | ```xmlui /orderBy="{{ field: 'quantity', direction: 'desc' }}"/
454 | <App>
455 | <List orderBy="{{ field: 'quantity', direction: 'desc' }}" data='{[...]}' />
456 | </App>
457 | ```
458 |
459 | ```xmlui-pg name="Example: orderBy" height="400px"
460 | <App>
461 | <List
462 | orderBy="{{ field: 'quantity', direction: 'desc' }}"
463 | data='{[
464 | {
465 | id: 0,
466 | name: "Apples",
467 | quantity: 5,
468 | unit: "pieces",
469 | category: "fruits",
470 | key: 5,
471 | },
472 | {
473 | id: 1,
474 | name: "Bananas",
475 | quantity: 6,
476 | unit: "pieces",
477 | category: "fruits",
478 | key: 4,
479 | },
480 | {
481 | id: 2,
482 | name: "Carrots",
483 | quantity: 100,
484 | unit: "grams",
485 | category: "vegetables",
486 | key: 3,
487 | },
488 | {
489 | id: 3,
490 | name: "Spinach",
491 | quantity: 1,
492 | unit: "bunch",
493 | category: "vegetables",
494 | key: 2,
495 | },
496 | {
497 | id: 4,
498 | name: "Milk",
499 | quantity: 10,
500 | unit: "liter",
501 | category: "dairy",
502 | key: 1,
503 | },
504 | {
505 | id: 5,
506 | name: "Cheese",
507 | quantity: 200,
508 | unit: "grams",
509 | category: "dairy",
510 | key: 0,
511 | },
512 | ]}' />
513 | </App>
514 | ```
515 |
516 | %-PROP-END
517 |
518 | %-PROP-START pageInfo
519 |
520 | It contains the following boolean attributes:
521 |
522 | | Attribute | Description |
523 | | :------------------- | :------------------------------------|
524 | | `hasPrevPage` | Does the list have a previous page |
525 | | `hasNextPage` | Does the list have a next page |
526 | | `isFetchingPrevPage` | _TBD_ |
527 | | `isFetchingNextPage` | _TBD_ |
528 |
529 | %-PROP-END
530 |
531 | %-PROP-START groupBy
532 |
533 | >[!INFO]
534 | > For the `groupBy` property to work, either a [`groupHeaderTemplate`](#groupHeaderTemplate)
535 | > or a [`groupFooterTemplate`](#groupFooterTemplate) needs to be provided.
536 |
537 | ```xmlui copy {3}
538 | <App>
539 | <List
540 | data='{[...]}'
541 | groupBy="category">
542 | <property name="groupHeaderTemplate">
543 | <VStack>
544 | <Text variant="subtitle" value="{$group.key}" />
545 | </VStack>
546 | </property>
547 | </List>
548 | </App>
549 | ```
550 |
551 | ```xmlui-pg name="Example: groupBy" height="400px"
552 | <App>
553 | <List
554 | data='{[
555 | {
556 | id: 0,
557 | name: "Apples",
558 | quantity: 5,
559 | unit: "pieces",
560 | category: "fruits",
561 | key: 5,
562 | },
563 | {
564 | id: 1,
565 | name: "Bananas",
566 | quantity: 6,
567 | unit: "pieces",
568 | category: "fruits",
569 | key: 4,
570 | },
571 | {
572 | id: 2,
573 | name: "Carrots",
574 | quantity: 100,
575 | unit: "grams",
576 | category: "vegetables",
577 | key: 3,
578 | },
579 | {
580 | id: 3,
581 | name: "Spinach",
582 | quantity: 1,
583 | unit: "bunch",
584 | category: "vegetables",
585 | key: 2,
586 | },
587 | {
588 | id: 4,
589 | name: "Milk",
590 | quantity: 10,
591 | unit: "liter",
592 | category: "dairy",
593 | key: 1,
594 | },
595 | {
596 | id: 5,
597 | name: "Cheese",
598 | quantity: 200,
599 | unit: "grams",
600 | category: "dairy",
601 | key: 0,
602 | },
603 | ]}'
604 | groupBy="category">
605 | <property name="groupHeaderTemplate">
606 | <VStack>
607 | <Text variant="subtitle" value="{$group.key}" />
608 | </VStack>
609 | </property>
610 | </List>
611 | </App>
612 | ```
613 |
614 | %-PROP-END
615 |
616 | %-PROP-START groupFooterTemplate
617 |
618 | The structure of `$group` in a `groupFooterTemplate` is the following:
619 |
620 | | Attribute | Description |
621 | | --------- | ------------------------------------------------------------------------------------------------------------- |
622 | | id | Unique identifier for the section. It is commonly generated from the attribute name provided via `groupBy`. |
623 | | items | The items filtered from the original data list that fall into this section. |
624 | | key | The attribute name to section by provided via `groupBy` |
625 |
626 | This example displays a separator line in the groups' footer:
627 |
628 | ```xmlui copy {8-12}
629 | <App>
630 | <List data='{[...]}' groupBy="category">
631 | <property name="groupHeaderTemplate">
632 | <VStack>
633 | <Text variant="subtitle" value="{$group.key}" />
634 | </VStack>
635 | </property>
636 | <property name="groupFooterTemplate">
637 | <VStack paddingVertical="$space-normal">
638 | <ContentSeparator/>
639 | </VStack>
640 | </property>
641 | </List>
642 | </App>
643 | ```
644 |
645 | ```xmlui-pg name="Example: groupFooterTemplate" height="400px"
646 | <App>
647 | <List data='{[
648 | {
649 | id: 0,
650 | name: "Apples",
651 | quantity: 5,
652 | unit: "pieces",
653 | category: "fruits",
654 | key: 5,
655 | },
656 | {
657 | id: 1,
658 | name: "Bananas",
659 | quantity: 6,
660 | unit: "pieces",
661 | category: "fruits",
662 | key: 4,
663 | },
664 | {
665 | id: 2,
666 | name: "Carrots",
667 | quantity: 100,
668 | unit: "grams",
669 | category: "vegetables",
670 | key: 3,
671 | },
672 | {
673 | id: 3,
674 | name: "Spinach",
675 | quantity: 1,
676 | unit: "bunch",
677 | category: "vegetables",
678 | key: 2,
679 | },
680 | {
681 | id: 4,
682 | name: "Milk",
683 | quantity: 10,
684 | unit: "liter",
685 | category: "dairy",
686 | key: 1,
687 | },
688 | {
689 | id: 5,
690 | name: "Cheese",
691 | quantity: 200,
692 | unit: "grams",
693 | category: "dairy",
694 | key: 0,
695 | },
696 | ]}'
697 | groupBy="category">
698 | <property name="groupHeaderTemplate">
699 | <VStack>
700 | <Text variant="subtitle" value="{$group.key}" />
701 | </VStack>
702 | </property>
703 | <property name="groupFooterTemplate">
704 | <VStack paddingVertical="$space-normal">
705 | <ContentSeparator/>
706 | </VStack>
707 | </property>
708 | </List>
709 | </App>
710 | ```
711 |
712 | %-PROP-END
713 |
714 | %-PROP-START groupHeaderTemplate
715 |
716 | The structure of `$group` in a `groupHeaderTemplate` is the following:
717 |
718 | | Attribute | Description |
719 | | --------- | ------------------------------------------------------------------------------------------------------------- |
720 | | id | Unique identifier for the section. It is commonly generated from the attribute name provided via `groupBy`. |
721 | | items | The items filtered from the original data list that fall into this section. |
722 | | key | The attribute name to section by provided via `groupBy` |
723 |
724 | ```xmlui copy {3-7}
725 | <App>
726 | <List data='{[...]}' groupBy="category">
727 | <property name="groupHeaderTemplate">
728 | <Stack padding="$space-2">
729 | <Text variant="subtitle" value="{$group.key}" />
730 | </Stack>
731 | </property>
732 | </List>
733 | </App>
734 | ```
735 |
736 | ```xmlui-pg copy name="Example: groupHeaderTemplate" height="400px"
737 | <App>
738 | <List data='{[
739 | {
740 | id: 0,
741 | name: "Apples",
742 | quantity: 5,
743 | unit: "pieces",
744 | category: "fruits",
745 | key: 5,
746 | },
747 | {
748 | id: 1,
749 | name: "Bananas",
750 | quantity: 6,
751 | unit: "pieces",
752 | category: "fruits",
753 | key: 4,
754 | },
755 | {
756 | id: 2,
757 | name: "Carrots",
758 | quantity: 100,
759 | unit: "grams",
760 | category: "vegetables",
761 | key: 3,
762 | },
763 | {
764 | id: 3,
765 | name: "Spinach",
766 | quantity: 1,
767 | unit: "bunch",
768 | category: "vegetables",
769 | key: 2,
770 | },
771 | {
772 | id: 4,
773 | name: "Milk",
774 | quantity: 10,
775 | unit: "liter",
776 | category: "dairy",
777 | key: 1,
778 | },
779 | {
780 | id: 5,
781 | name: "Cheese",
782 | quantity: 200,
783 | unit: "grams",
784 | category: "dairy",
785 | key: 0,
786 | },
787 | ]}'
788 | groupBy="category">
789 | <property name="groupHeaderTemplate">
790 | <Stack padding="$space-2">
791 | <Text variant="subtitle" value="{$group.key}" />
792 | </Stack>
793 | </property>
794 | </List>
795 | </App>
796 | ```
797 |
798 | %-PROP-END
799 |
800 | %-PROP-START selectedIndex
801 |
802 | ```xmlui /selectedIndex="5"/
803 | <App>
804 | <List selectedIndex="5" data='{[...]}' />
805 | </App>
806 | ```
807 |
808 | ```xmlui-pg name="Example: selectedIndex" height="400px"
809 | <App>
810 | <List selectedIndex="5" data='{[
811 | {
812 | id: 0,
813 | name: "Apples",
814 | quantity: 5,
815 | unit: "pieces",
816 | category: "fruits",
817 | key: 5,
818 | },
819 | {
820 | id: 1,
821 | name: "Bananas",
822 | quantity: 6,
823 | unit: "pieces",
824 | category: "fruits",
825 | key: 4,
826 | },
827 | {
828 | id: 2,
829 | name: "Carrots",
830 | quantity: 100,
831 | unit: "grams",
832 | category: "vegetables",
833 | key: 3,
834 | },
835 | {
836 | id: 3,
837 | name: "Spinach",
838 | quantity: 1,
839 | unit: "bunch",
840 | category: "vegetables",
841 | key: 2,
842 | },
843 | {
844 | id: 4,
845 | name: "Milk",
846 | quantity: 10,
847 | unit: "liter",
848 | category: "dairy",
849 | key: 1,
850 | },
851 | {
852 | id: 5,
853 | name: "Cheese",
854 | quantity: 200,
855 | unit: "grams",
856 | category: "dairy",
857 | key: 0,
858 | },
859 | ]}' />
860 | </App>
861 | ```
862 |
863 | %-PROP-END
864 |
865 | %-PROP-START scrollAnchor
866 |
867 | ```xmlui /scrollAnchor="bottom"/
868 | <App>
869 | <List scrollAnchor="bottom" data='{[...]}' height="300px" />
870 | </App>
871 | ```
872 |
873 | ```xmlui-pg name="Example: scrollAnchor" height="380px"
874 | <App>
875 | <List scrollAnchor="bottom" height="300px" data='{[
876 | {
877 | id: 0,
878 | name: "Apples",
879 | quantity: 5,
880 | unit: "pieces",
881 | category: "fruits",
882 | key: 5,
883 | },
884 | {
885 | id: 1,
886 | name: "Bananas",
887 | quantity: 6,
888 | unit: "pieces",
889 | category: "fruits",
890 | key: 4,
891 | },
892 | {
893 | id: 2,
894 | name: "Carrots",
895 | quantity: 100,
896 | unit: "grams",
897 | category: "vegetables",
898 | key: 3,
899 | },
900 | {
901 | id: 3,
902 | name: "Spinach",
903 | quantity: 1,
904 | unit: "bunch",
905 | category: "vegetables",
906 | key: 2,
907 | },
908 | {
909 | id: 4,
910 | name: "Milk",
911 | quantity: 10,
912 | unit: "liter",
913 | category: "dairy",
914 | key: 1,
915 | },
916 | {
917 | id: 5,
918 | name: "Cheese",
919 | quantity: 200,
920 | unit: "grams",
921 | category: "dairy",
922 | key: 0,
923 | },
924 | ]}' />
925 | </App>
926 | ```
927 |
928 | %-PROP-END
929 |
930 | %-PROP-START availableGroups
931 |
932 | ```xmlui {5}
933 | <App>
934 | <List
935 | data="{[...]}"
936 | groupBy="category"
937 | availableGroups="{['fruits', 'vegetables']}">
938 | <property name="groupHeaderTemplate">
939 | <Stack>
940 | <Text variant="subtitle" value="{$group.key}" />
941 | </Stack>
942 | </property>
943 | </List>
944 | </App>
945 | ```
946 |
947 | ```xmlui-pg name="Example: availableGroups" height="400px"
948 | <App>
949 | <List availableGroups="{['fruits', 'vegetables']}" groupBy="category"
950 | data='{[
951 | {
952 | id: 0,
953 | name: "Apples",
954 | quantity: 5,
955 | unit: "pieces",
956 | category: "fruits",
957 | key: 5,
958 | },
959 | {
960 | id: 1,
961 | name: "Bananas",
962 | quantity: 6,
963 | unit: "pieces",
964 | category: "fruits",
965 | key: 4,
966 | },
967 | {
968 | id: 2,
969 | name: "Carrots",
970 | quantity: 100,
971 | unit: "grams",
972 | category: "vegetables",
973 | key: 3,
974 | },
975 | {
976 | id: 3,
977 | name: "Spinach",
978 | quantity: 1,
979 | unit: "bunch",
980 | category: "vegetables",
981 | key: 2,
982 | },
983 | {
984 | id: 4,
985 | name: "Milk",
986 | quantity: 10,
987 | unit: "liter",
988 | category: "dairy",
989 | key: 1,
990 | },
991 | {
992 | id: 5,
993 | name: "Cheese",
994 | quantity: 200,
995 | unit: "grams",
996 | category: "dairy",
997 | key: 0,
998 | },
999 | ]}'>
1000 | <property name="groupHeaderTemplate">
1001 | <Stack>
1002 | <Text variant="subtitle" value="{$group.key}" />
1003 | </Stack>
1004 | </property>
1005 | </List>
1006 | </App>
1007 | ```
1008 |
1009 | %-PROP-END
1010 |
1011 | %-PROP-START borderCollapse
1012 |
1013 | Note how the `List` on the right has different borders:
1014 |
1015 | ```xmlui /borderCollapse/
1016 | <App>
1017 | <HStack>
1018 | <List data="{[...]}" groupBy="category" borderCollapse="false" width="$space-48">
1019 | <property name="groupHeaderTemplate">
1020 | <Stack>
1021 | <Text variant="subtitle" value="{$group.key}" />
1022 | </Stack>
1023 | </property>
1024 | </List>
1025 | <List data="{[...]}" groupBy="category" borderCollapse="true" width="$space-48">
1026 | <property name="groupHeaderTemplate">
1027 | <Stack>
1028 | <Text variant="subtitle" value="{$group.key}" />
1029 | </Stack>
1030 | </property>
1031 | </List>
1032 | </HStack>
1033 | </App>
1034 | ```
1035 |
1036 | ```xmlui-pg name="Example: borderCollapse" height="400px"
1037 | <App>
1038 | <HStack>
1039 | <List data='{[
1040 | {
1041 | id: 0,
1042 | name: "Apples",
1043 | quantity: 5,
1044 | unit: "pieces",
1045 | category: "fruits",
1046 | key: 5,
1047 | },
1048 | {
1049 | id: 1,
1050 | name: "Bananas",
1051 | quantity: 6,
1052 | unit: "pieces",
1053 | category: "fruits",
1054 | key: 4,
1055 | },
1056 | {
1057 | id: 2,
1058 | name: "Carrots",
1059 | quantity: 100,
1060 | unit: "grams",
1061 | category: "vegetables",
1062 | key: 3,
1063 | },
1064 | {
1065 | id: 3,
1066 | name: "Spinach",
1067 | quantity: 1,
1068 | unit: "bunch",
1069 | category: "vegetables",
1070 | key: 2,
1071 | },
1072 | {
1073 | id: 4,
1074 | name: "Milk",
1075 | quantity: 10,
1076 | unit: "liter",
1077 | category: "dairy",
1078 | key: 1,
1079 | },
1080 | {
1081 | id: 5,
1082 | name: "Cheese",
1083 | quantity: 200,
1084 | unit: "grams",
1085 | category: "dairy",
1086 | key: 0,
1087 | },
1088 | ]}'
1089 | groupBy="category" borderCollapse="false" width="$space-48">
1090 | <property name="groupHeaderTemplate">
1091 | <Stack>
1092 | <Text variant="subtitle" value="{$group.key}" />
1093 | </Stack>
1094 | </property>
1095 | </List>
1096 | <List data='{[
1097 | {
1098 | id: 0,
1099 | name: "Apples",
1100 | quantity: 5,
1101 | unit: "pieces",
1102 | category: "fruits",
1103 | key: 5,
1104 | },
1105 | {
1106 | id: 1,
1107 | name: "Bananas",
1108 | quantity: 6,
1109 | unit: "pieces",
1110 | category: "fruits",
1111 | key: 4,
1112 | },
1113 | {
1114 | id: 2,
1115 | name: "Carrots",
1116 | quantity: 100,
1117 | unit: "grams",
1118 | category: "vegetables",
1119 | key: 3,
1120 | },
1121 | {
1122 | id: 3,
1123 | name: "Spinach",
1124 | quantity: 1,
1125 | unit: "bunch",
1126 | category: "vegetables",
1127 | key: 2,
1128 | },
1129 | {
1130 | id: 4,
1131 | name: "Milk",
1132 | quantity: 10,
1133 | unit: "liter",
1134 | category: "dairy",
1135 | key: 1,
1136 | },
1137 | {
1138 | id: 5,
1139 | name: "Cheese",
1140 | quantity: 200,
1141 | unit: "grams",
1142 | category: "dairy",
1143 | key: 0,
1144 | },
1145 | ]}'
1146 | groupBy="category" borderCollapse="true" width="$space-48">
1147 | <property name="groupHeaderTemplate">
1148 | <Stack>
1149 | <Text variant="subtitle" value="{$group.key}" />
1150 | </Stack>
1151 | </property>
1152 | </List>
1153 | </HStack>
1154 | </App>
1155 | ```
1156 |
1157 | %-PROP-END
1158 |
1159 | %-PROP-START groupsInitiallyExpanded
1160 |
1161 | Note how the groups in the right `List` are expanded by default:
1162 |
1163 | ```xmlui /groupsInitiallyExpanded/
1164 | <App>
1165 | <HStack gap="$space-2">
1166 | <List data="{[...]}"
1167 | groupBy="category"
1168 | groupsInitiallyExpanded="false"
1169 | width="$space-48">
1170 | <property name="groupHeaderTemplate">
1171 | <Stack>
1172 | <Text variant="subtitle" value="{$group.key}" />
1173 | </Stack>
1174 | </property>
1175 | </List>
1176 | <List data="{[...]}"
1177 | groupBy="category"
1178 | groupsInitiallyExpanded="true"
1179 | width="$space-48">
1180 | <property name="groupHeaderTemplate">
1181 | <Stack>
1182 | <Text variant="subtitle" value="{$group.key}" />
1183 | </Stack>
1184 | </property>
1185 | </List>
1186 | </HStack>
1187 | </App>
1188 | ```
1189 |
1190 | ```xmlui-pg name="Example: groupsInitiallyExpanded" height="400px"
1191 | <App>
1192 | <HStack gap="$space-2">
1193 | <List data='{[
1194 | {
1195 | id: 0,
1196 | name: "Apples",
1197 | quantity: 5,
1198 | unit: "pieces",
1199 | category: "fruits",
1200 | key: 5,
1201 | },
1202 | {
1203 | id: 1,
1204 | name: "Bananas",
1205 | quantity: 6,
1206 | unit: "pieces",
1207 | category: "fruits",
1208 | key: 4,
1209 | },
1210 | {
1211 | id: 2,
1212 | name: "Carrots",
1213 | quantity: 100,
1214 | unit: "grams",
1215 | category: "vegetables",
1216 | key: 3,
1217 | },
1218 | {
1219 | id: 3,
1220 | name: "Spinach",
1221 | quantity: 1,
1222 | unit: "bunch",
1223 | category: "vegetables",
1224 | key: 2,
1225 | },
1226 | {
1227 | id: 4,
1228 | name: "Milk",
1229 | quantity: 10,
1230 | unit: "liter",
1231 | category: "dairy",
1232 | key: 1,
1233 | },
1234 | {
1235 | id: 5,
1236 | name: "Cheese",
1237 | quantity: 200,
1238 | unit: "grams",
1239 | category: "dairy",
1240 | key: 0,
1241 | },
1242 | ]}'
1243 | groupBy="category" groupsInitiallyExpanded="false" width="$space-48">
1244 | <property name="groupHeaderTemplate">
1245 | <Stack>
1246 | <Text variant="subtitle" value="{$group.key}" />
1247 | </Stack>
1248 | </property>
1249 | </List>
1250 | <List data='{[
1251 | {
1252 | id: 0,
1253 | name: "Apples",
1254 | quantity: 5,
1255 | unit: "pieces",
1256 | category: "fruits",
1257 | key: 5,
1258 | },
1259 | {
1260 | id: 1,
1261 | name: "Bananas",
1262 | quantity: 6,
1263 | unit: "pieces",
1264 | category: "fruits",
1265 | key: 4,
1266 | },
1267 | {
1268 | id: 2,
1269 | name: "Carrots",
1270 | quantity: 100,
1271 | unit: "grams",
1272 | category: "vegetables",
1273 | key: 3,
1274 | },
1275 | {
1276 | id: 3,
1277 | name: "Spinach",
1278 | quantity: 1,
1279 | unit: "bunch",
1280 | category: "vegetables",
1281 | key: 2,
1282 | },
1283 | {
1284 | id: 4,
1285 | name: "Milk",
1286 | quantity: 10,
1287 | unit: "liter",
1288 | category: "dairy",
1289 | key: 1,
1290 | },
1291 | {
1292 | id: 5,
1293 | name: "Cheese",
1294 | quantity: 200,
1295 | unit: "grams",
1296 | category: "dairy",
1297 | key: 0,
1298 | },
1299 | ]}'
1300 | groupBy="category" groupsInitiallyExpanded="true" width="$space-48">
1301 | <property name="groupHeaderTemplate">
1302 | <Stack>
1303 | <Text variant="subtitle" value="{$group.key}" />
1304 | </Stack>
1305 | </property>
1306 | </List>
1307 | </HStack>
1308 | </App>
1309 | ```
1310 |
1311 | %-PROP-END
1312 |
1313 | %-PROP-START hideEmptyGroups
1314 |
1315 | Note how the `meats` category is not displayed in the right `List`:
1316 |
1317 | ```xmlui {7, 19}
1318 | <App>
1319 | <HStack gap="$space-2">
1320 | <List
1321 | data="{[...]}"
1322 | defaultGroups="{['meats']}"
1323 | groupBy="category"
1324 | hideEmptyGroups="false"
1325 | width="$space-48">
1326 | <property name="groupHeaderTemplate">
1327 | <Stack>
1328 | <Text variant="subtitle" value="{$group.key}" />
1329 | </Stack>
1330 | </property>
1331 | </List>
1332 | <List
1333 | data="{[...]}"
1334 | defaultGroups="{['meats']}"
1335 | groupBy="category"
1336 | hideEmptyGroups="true"
1337 | width="$space-48">
1338 | <property name="groupHeaderTemplate">
1339 | <Stack>
1340 | <Text variant="subtitle" value="{$group.key}" />
1341 | </Stack>
1342 | </property>
1343 | </List>
1344 | </HStack>
1345 | </App>
1346 | ```
1347 |
1348 | ```xmlui-pg name="Example: hideEmptyGroups" height="400px"
1349 | <App>
1350 | <HStack gap="$space-2">
1351 | <List data='{[
1352 | {
1353 | id: 0,
1354 | name: "Apples",
1355 | quantity: 5,
1356 | unit: "pieces",
1357 | category: "fruits",
1358 | key: 5,
1359 | },
1360 | {
1361 | id: 1,
1362 | name: "Bananas",
1363 | quantity: 6,
1364 | unit: "pieces",
1365 | category: "fruits",
1366 | key: 4,
1367 | },
1368 | {
1369 | id: 2,
1370 | name: "Carrots",
1371 | quantity: 100,
1372 | unit: "grams",
1373 | category: "vegetables",
1374 | key: 3,
1375 | },
1376 | {
1377 | id: 3,
1378 | name: "Spinach",
1379 | quantity: 1,
1380 | unit: "bunch",
1381 | category: "vegetables",
1382 | key: 2,
1383 | },
1384 | {
1385 | id: 4,
1386 | name: "Milk",
1387 | quantity: 10,
1388 | unit: "liter",
1389 | category: "dairy",
1390 | key: 1,
1391 | },
1392 | {
1393 | id: 5,
1394 | name: "Cheese",
1395 | quantity: 200,
1396 | unit: "grams",
1397 | category: "dairy",
1398 | key: 0,
1399 | },
1400 | ]}'
1401 | defaultGroups="{['meats']}" groupBy="category" hideEmptyGroups="false" width="$space-48">
1402 | <property name="groupHeaderTemplate">
1403 | <Stack>
1404 | <Text variant="subtitle" value="{$group.key}" />
1405 | </Stack>
1406 | </property>
1407 | </List>
1408 | <List data='{[
1409 | {
1410 | id: 0,
1411 | name: "Apples",
1412 | quantity: 5,
1413 | unit: "pieces",
1414 | category: "fruits",
1415 | key: 5,
1416 | },
1417 | {
1418 | id: 1,
1419 | name: "Bananas",
1420 | quantity: 6,
1421 | unit: "pieces",
1422 | category: "fruits",
1423 | key: 4,
1424 | },
1425 | {
1426 | id: 2,
1427 | name: "Carrots",
1428 | quantity: 100,
1429 | unit: "grams",
1430 | category: "vegetables",
1431 | key: 3,
1432 | },
1433 | {
1434 | id: 3,
1435 | name: "Spinach",
1436 | quantity: 1,
1437 | unit: "bunch",
1438 | category: "vegetables",
1439 | key: 2,
1440 | },
1441 | {
1442 | id: 4,
1443 | name: "Milk",
1444 | quantity: 10,
1445 | unit: "liter",
1446 | category: "dairy",
1447 | key: 1,
1448 | },
1449 | {
1450 | id: 5,
1451 | name: "Cheese",
1452 | quantity: 200,
1453 | unit: "grams",
1454 | category: "dairy",
1455 | key: 0,
1456 | },
1457 | ]}'
1458 | defaultGroups="{['meats']}" groupBy="category" hideEmptyGroups="true" width="$space-48">
1459 | <property name="groupHeaderTemplate">
1460 | <Stack>
1461 | <Text variant="subtitle" value="{$group.key}" />
1462 | </Stack>
1463 | </property>
1464 | </List>
1465 | </HStack>
1466 | </App>
1467 | ```
1468 |
1469 | %-PROP-END
1470 |
1471 | %-STYLE-START
1472 |
1473 | `List` is a layout container; its purpose is to render nested child components.
1474 | `List` has no theme variables to change its visual appearance.
1475 |
1476 | %-STYLE-END
1477 |
1478 | %-API-START scrollToBottom
1479 |
1480 | The following example demonstrates `scrollToBottom` and all the other scroll methods:
1481 |
1482 | ```xmlui-pg copy display name="Example: data API Call" height="400px"
1483 | <App layout="condensed-sticky">
1484 | <AppHeader>
1485 | <HStack>
1486 | <Button onClick="myList.scrollToBottom()">Scroll to Bottom</Button>
1487 | <Button onClick="myList.scrollToTop()">Scroll to Top</Button>
1488 | <Button onClick="myList.scrollToIndex(25)">Scroll to #25</Button>
1489 | <Button onClick="myList.scrollToId('item-40')">Scroll to ID 'item-40'</Button>
1490 | </HStack>
1491 | </AppHeader>
1492 | <List
1493 | id="myList"
1494 | data="{
1495 | Array.from({ length: 100 })
1496 | .map((_, i) => ({id: 'item-' + i, value: 'Item #' + i}))
1497 | }">
1498 | <property name="itemTemplate">
1499 | <Card>
1500 | <Text value="{$item.value}" />
1501 | </Card>
1502 | </property>
1503 | </List>
1504 | </App>
1505 | ```
1506 |
1507 | %-API-END
1508 |
1509 | %-API-START scrollToTop
1510 |
1511 | See the [`scrollToBottom`](#scrolltobottom) example.
1512 |
1513 | %-API-END
1514 |
1515 | %-API-START scrollToIndex
1516 |
1517 | See the [`scrollToBottom`](#scrolltobottom) example.
1518 |
1519 | %-API-END
1520 |
1521 | %-API-START scrollToId
1522 |
1523 | See the [`scrollToBottom`](#scrolltobottom) example.
1524 |
1525 | %-API-END
```
--------------------------------------------------------------------------------
/xmlui/src/components-core/rendering/Container.tsx:
--------------------------------------------------------------------------------
```typescript
1 | import type { Dispatch, MutableRefObject, ReactNode, RefObject, SetStateAction } from "react";
2 | import React, {
3 | cloneElement,
4 | forwardRef,
5 | Fragment,
6 | isValidElement,
7 | memo,
8 | useCallback,
9 | useEffect,
10 | useRef,
11 | useTransition,
12 | } from "react";
13 | import { useLocation, useNavigate } from "@remix-run/react";
14 | import { cloneDeep, isArray } from "lodash-es";
15 | import { composeRefs } from "@radix-ui/react-compose-refs";
16 | import memoizeOne from "memoize-one";
17 |
18 | import type {
19 | LookupActionOptions,
20 | LookupAsyncFnInner,
21 | LookupSyncFnInner,
22 | } from "../../abstractions/ActionDefs";
23 | import type { ComponentDef, ParentRenderContext } from "../../abstractions/ComponentDefs";
24 | import type { ContainerState } from "../../abstractions/ContainerDefs";
25 | import type { LayoutContext, RenderChildFn } from "../../abstractions/RendererDefs";
26 | import type {
27 | ArrowExpression,
28 | ArrowExpressionStatement,
29 | Statement,
30 | } from "../script-runner/ScriptingSourceTree";
31 | import {
32 | T_ARROW_EXPRESSION,
33 | T_ARROW_EXPRESSION_STATEMENT,
34 | } from "../script-runner/ScriptingSourceTree";
35 | import type { ContainerDispatcher, MemoedVars } from "../abstractions/ComponentRenderer";
36 | import { ContainerActionKind } from "./containers";
37 | import { useAppContext } from "../AppContext";
38 | import { buildProxy } from "../rendering/buildProxy";
39 | import type { StatePartChangedFn } from "./ContainerWrapper";
40 | import type {
41 | ComponentCleanupFn,
42 | ContainerWrapperDef,
43 | RegisterComponentApiFnInner,
44 | } from "../rendering/ContainerWrapper";
45 | import type { BindingTreeEvaluationContext } from "../script-runner/BindingTreeEvaluationContext";
46 | import { processStatementQueueAsync } from "../script-runner/process-statement-async";
47 | import { processStatementQueue } from "../script-runner/process-statement-sync";
48 | import { extractParam, shouldKeep } from "../utils/extractParam";
49 | import { useIsomorphicLayoutEffect } from "../utils/hooks";
50 | import { capitalizeFirstLetter, delay, generatedId, useEvent } from "../utils/misc";
51 | import { parseHandlerCode, prepareHandlerStatements } from "../utils/statementUtils";
52 | import { renderChild } from "./renderChild";
53 | import { useTheme } from "../theming/ThemeContext";
54 | import { LoaderComponent } from "../LoaderComponent";
55 | import type { AppContextObject } from "../../abstractions/AppContextDefs";
56 | import { EMPTY_ARRAY } from "../constants";
57 | import type { ParsedEventValue } from "../../abstractions/scripting/Compilation";
58 | import { useApiInterceptorContext } from "../interception/useApiInterceptorContext";
59 | import { mergeProps } from "../utils/mergeProps";
60 |
61 | type Props = {
62 | node: ContainerWrapperDef;
63 | resolvedKey?: string;
64 | componentState: ContainerState;
65 | dispatch: ContainerDispatcher;
66 | setVersion: Dispatch<SetStateAction<number>>;
67 | version: number;
68 | statePartChanged: StatePartChangedFn;
69 | registerComponentApi: RegisterComponentApiFnInner;
70 | parentRegisterComponentApi: RegisterComponentApiFnInner;
71 | layoutContextRef: MutableRefObject<LayoutContext | undefined>;
72 | memoedVarsRef: MutableRefObject<MemoedVars>;
73 | isImplicit?: boolean;
74 | parentDispatch: ContainerDispatcher;
75 | parentRenderContext?: ParentRenderContext;
76 | uidInfoRef?: RefObject<Record<string, any>>;
77 | children?: ReactNode;
78 | };
79 |
80 | // React component to display a view container and implement its behavior
81 | export const Container = memo(
82 | forwardRef(function Container(
83 | {
84 | node,
85 | componentState,
86 | dispatch: containerDispatch,
87 | parentDispatch,
88 | resolvedKey,
89 | version,
90 | setVersion,
91 | statePartChanged,
92 | registerComponentApi: containerRegisterComponentApi,
93 | parentRegisterComponentApi,
94 | layoutContextRef,
95 | parentRenderContext,
96 | memoedVarsRef,
97 | isImplicit,
98 | uidInfoRef: parentUidInfoRef,
99 | children,
100 | ...rest
101 | }: Props,
102 | ref,
103 | ) {
104 | const { apiBoundContainer } = node;
105 | const dispatch = isImplicit ? parentDispatch : containerDispatch;
106 | const registerComponentApi = isImplicit
107 | ? parentRegisterComponentApi
108 | : containerRegisterComponentApi;
109 |
110 | const appContext = useAppContext();
111 | const { getThemeVar } = useTheme();
112 | const navigate = useNavigate();
113 | const location = useLocation();
114 |
115 | const fnsRef = useRef<Record<symbol, any>>({});
116 |
117 | const stateRef = useRef(componentState);
118 | //generally bad practise to write ref in render (https://react.dev/learn/referencing-values-with-refs#best-practices-for-refs), but:
119 | // this stateRef is only used in runCodeSync/async functions, which are memoized, so it's safe to use it here (as I know: illesg)
120 | // In case we sync up the stateRef with the componentState in the useEffect/useInsertionEffect/useLayoutEffect, the stateRef would lag behind the componentState
121 |
122 | stateRef.current = componentState;
123 |
124 | const parsedStatementsRef = useRef<Record<string, Array<Statement> | null>>({});
125 | const [_, startTransition] = useTransition();
126 | const mountedRef = useRef(true);
127 |
128 | // --- This ref holds a map of promises for each statement execution that cause any state change.
129 | const statementPromises = useRef<Map<string, any>>(new Map());
130 |
131 | // --- Ensure that re-rendering because of version change resolves all pending statement promises.
132 | useIsomorphicLayoutEffect(() => {
133 | for (const resolve of statementPromises.current.values()) {
134 | resolve();
135 | }
136 | }, [version]);
137 |
138 | // --- Ensure that component disposal resolves all pending statement promises.
139 | useEffect(() => {
140 | mountedRef.current = true;
141 | const leftPromises = statementPromises.current;
142 | return () => {
143 | mountedRef.current = false;
144 | for (const resolve of leftPromises.values()) {
145 | resolve();
146 | }
147 | };
148 | }, []);
149 |
150 | const { apiInstance } = useApiInterceptorContext();
151 |
152 | const runCodeAsync = useEvent(
153 | async (
154 | source: string | ParsedEventValue | ArrowExpression,
155 | componentUid: symbol,
156 | options: LookupActionOptions | undefined,
157 | ...eventArgs: any[]
158 | ) => {
159 | // --- Check if the event handler can sign its lifecycle state
160 | const canSignEventLifecycle = () => {
161 | return componentUid.description !== undefined && options?.eventName !== undefined;
162 | };
163 |
164 | let changes: Array<any> = [];
165 | const getComponentStateClone = () => {
166 | changes.length = 0;
167 | const poj = cloneDeep({ ...stateRef.current, ...(options?.context || {}) });
168 | poj["$this"] = stateRef.current[componentUid];
169 | return buildProxy(poj, (changeInfo) => {
170 | const idRoot = (changeInfo.pathArray as string[])?.[0];
171 | if (idRoot?.startsWith("$")) {
172 | throw new Error("Cannot update a read-only variable");
173 | }
174 | changes.push(changeInfo);
175 | });
176 | };
177 | const evalAppContext = {
178 | ...appContext,
179 | getThemeVar,
180 | };
181 | const evalContext: BindingTreeEvaluationContext = {
182 | appContext: evalAppContext,
183 | eventArgs,
184 | localContext: getComponentStateClone(),
185 | implicitContextGetter: () => {
186 | return {
187 | uid: componentUid,
188 | state: stateRef.current,
189 | getCurrentState: () => stateRef.current,
190 | dispatch,
191 | appContext: evalAppContext,
192 | apiInstance,
193 | navigate,
194 | location,
195 | lookupAction: (action, uid, actionOptions = {}) => {
196 | return lookupAction(action, uid, {
197 | ...actionOptions,
198 | ephemeral: true,
199 | });
200 | },
201 | };
202 | },
203 | options: {
204 | defaultToOptionalMemberAccess:
205 | typeof appContext.appGlobals?.defaultToOptionalMemberAccess === "boolean"
206 | ? appContext.appGlobals.defaultToOptionalMemberAccess
207 | : true,
208 | },
209 | };
210 |
211 | try {
212 | // --- Prepare the event handler to an arrow expression statement
213 | let statements: Statement[];
214 | if (typeof source === "string") {
215 | if (!parsedStatementsRef.current[source]) {
216 | parsedStatementsRef.current[source] = prepareHandlerStatements(
217 | parseHandlerCode(source),
218 | evalContext,
219 | );
220 | }
221 | statements = parsedStatementsRef.current[source];
222 | } else if (isParsedEventValue(source)) {
223 | const parseId = source.parseId.toString();
224 | if (!parsedStatementsRef.current[parseId]) {
225 | parsedStatementsRef.current[parseId] = prepareHandlerStatements(
226 | source.statements,
227 | evalContext,
228 | );
229 | }
230 | statements = parsedStatementsRef.current[parseId];
231 | } else {
232 | statements = [
233 | {
234 | type: T_ARROW_EXPRESSION_STATEMENT,
235 | expr: source, //TODO illesg (talk it through why we need to deep clone, it it's omitted, it gets slower every time we run it)
236 | } as ArrowExpressionStatement,
237 | ];
238 | }
239 |
240 | if (!statements?.length) {
241 | return;
242 | }
243 |
244 | if (canSignEventLifecycle()) {
245 | // --- Sign the event handler has been started
246 | dispatch({
247 | type: ContainerActionKind.EVENT_HANDLER_STARTED,
248 | payload: {
249 | uid: componentUid,
250 | eventName: options.eventName,
251 | },
252 | });
253 | }
254 | let mainThreadBlockingRuns = 0;
255 | evalContext.onStatementCompleted = async (evalContext) => {
256 | if (changes.length) {
257 | mainThreadBlockingRuns = 0;
258 | changes.forEach((change) => {
259 | statePartChanged(
260 | change.pathArray,
261 | cloneDeep(change.newValue),
262 | change.target,
263 | change.action,
264 | );
265 | });
266 | let resolve = null;
267 | const stateUpdatedPromise = new Promise((res) => {
268 | resolve = () => {
269 | res(null);
270 | };
271 | });
272 | const key = generatedId();
273 | statementPromises.current.set(key, resolve);
274 | // We use this to tell react that this update is not high-priority.
275 | // If we don't put it to a transition, the whole app would be blocked if we run a long,
276 | // update intensive queue (e.g. an infinite loop which
277 | // increments a counter, see playground example learning/01_Experiments/01_Event_Framework/app ).
278 | // Before this solution, we used a setTimeout(..., 0); hack, but some browsers (chrome especially)
279 | // do some funky stuff with the background tabs (e.g. all the setTimeouts are
280 | // maximized to run in 1 time / minute, doesn't matter if it's timeout is 0)
281 | // As of 2023. June 20, this solution works with backgrounded tabs, too.
282 | startTransition(() => {
283 | setVersion((prev) => prev + 1);
284 | });
285 |
286 | //TODO this could be a problem - if this container gets unmounted, we still have to wait for the update,
287 | // but in that case this update probably happened in the parent (e.g. a button's event handler removes the whole container
288 | // where the button lives, but it still has some statements to run).
289 | // with this solution the statement execution doesn't stop, and we fallback waiting with a setTimeout(0)
290 | if (mountedRef.current) {
291 | await stateUpdatedPromise;
292 | } else {
293 | await delay(0);
294 | }
295 | statementPromises.current.delete(key);
296 | changes = [];
297 | } else {
298 | //in this else branch normally we block the main thread (we don't wait for any state promise to be resolved),
299 | // so in a long-running (typically infinite loop) situation, where there aren't any changes in the state
300 | // we block the main thread indefinitely... this 'mainThreadBlockingRuns' var solution makes sure that
301 | // we pause in every 100 runs, and let the main thread breath a bit, so it's not frozen for the whole time
302 | // (we clear that counter above, too, where we use a startTransition call to de-prioritize this work)
303 | mainThreadBlockingRuns++;
304 | if (mainThreadBlockingRuns > 100) {
305 | mainThreadBlockingRuns = 0;
306 | await delay(0);
307 | }
308 | }
309 | evalContext.localContext = getComponentStateClone();
310 | };
311 |
312 | await processStatementQueueAsync(statements, evalContext);
313 |
314 | if (canSignEventLifecycle()) {
315 | // --- Sign the event handler has successfully completed
316 | dispatch({
317 | type: ContainerActionKind.EVENT_HANDLER_COMPLETED,
318 | payload: {
319 | uid: componentUid,
320 | eventName: options.eventName,
321 | },
322 | });
323 | }
324 |
325 | if (evalContext.mainThread?.blocks?.length) {
326 | return evalContext.mainThread.blocks[evalContext.mainThread.blocks.length - 1]
327 | .returnValue;
328 | }
329 | } catch (e) {
330 | //if we pass down an event handler to a component, we should sign the error once, not in every step of the component chain
331 | // (we use it in the compoundComponent, resolving it's event handlers)
332 | if (options?.signError !== false) {
333 | appContext.signError(e as Error);
334 | }
335 | if (canSignEventLifecycle()) {
336 | dispatch({
337 | type: ContainerActionKind.EVENT_HANDLER_ERROR,
338 | payload: {
339 | uid: componentUid,
340 | eventName: options.eventName,
341 | error: e,
342 | },
343 | });
344 | }
345 | throw e;
346 | }
347 | },
348 | );
349 |
350 | const runCodeSync = useCallback(
351 | (arrowExpression: ArrowExpression, ...eventArgs: any[]) => {
352 | const evalContext: BindingTreeEvaluationContext = {
353 | localContext: cloneDeep(stateRef.current),
354 | appContext,
355 | eventArgs,
356 | };
357 | try {
358 | const arrowStmt = {
359 | type: T_ARROW_EXPRESSION_STATEMENT,
360 | expr: arrowExpression,
361 | } as ArrowExpressionStatement;
362 |
363 | processStatementQueue([arrowStmt], evalContext);
364 |
365 | if (evalContext.mainThread?.blocks?.length) {
366 | return evalContext.mainThread.blocks[evalContext.mainThread.blocks.length - 1]
367 | .returnValue;
368 | }
369 | } catch (e) {
370 | console.error(e);
371 | throw e;
372 | }
373 | },
374 | [appContext],
375 | );
376 |
377 | const getOrCreateEventHandlerFn = useEvent(
378 | (
379 | src: string | ParsedEventValue | ArrowExpression,
380 | uid: symbol,
381 | options?: LookupActionOptions,
382 | ) => {
383 | if (Array.isArray(src)) {
384 | throw new Error("Multiple event handlers are not supported");
385 | }
386 |
387 | let fnCacheKey: string;
388 | let handler: (...eventArgs: any[]) => Promise<any>;
389 | if (typeof src === "string") {
390 | // --- We have a string event handler
391 | fnCacheKey = `${options?.eventName};${src}`;
392 | handler = (...eventArgs: any[]) => {
393 | return runCodeAsync(src, uid, options, ...cloneDeep(eventArgs));
394 | };
395 | } else if (isParsedEventValue(src)) {
396 | // --- We have the syntax tree to execute, no need to cache
397 | fnCacheKey = `${options?.eventName};${src.parseId}`;
398 | handler = (...eventArgs: any[]) => {
399 | return runCodeAsync(src, uid, options, ...cloneDeep(eventArgs));
400 | };
401 | } else if (isArrowExpression(src)) {
402 | // --- We have an arrow expression to execute
403 | fnCacheKey = `${options?.eventName};${src.statement.nodeId}`;
404 | handler = (...eventArgs: any[]) => {
405 | return runCodeAsync(src, uid, options, ...cloneDeep(eventArgs));
406 | };
407 | } else if ((src as any).type) {
408 | // --- We have an arrow expression to execute
409 | fnCacheKey = `${options?.eventName};${JSON.stringify(src)}`;
410 | handler = (...eventArgs: any[]) => {
411 | return runCodeAsync(src, uid, options, ...cloneDeep(eventArgs));
412 | };
413 | } else {
414 | // --- We have an unknown event handler
415 | throw new Error("Invalid event handler");
416 | }
417 |
418 | //if we have a context or ephemeral event handler, we don't cache it (otherwise we would have stale reference for the context)
419 | if (options?.ephemeral || options?.context) {
420 | return handler;
421 | }
422 | if (!fnsRef.current[uid]?.[fnCacheKey]) {
423 | fnsRef.current[uid] = fnsRef.current[uid] || {};
424 | fnsRef.current[uid][fnCacheKey] = handler;
425 | }
426 | return fnsRef.current[uid][fnCacheKey];
427 | },
428 | );
429 |
430 | const getOrCreateSyncCallbackFn = useCallback(
431 | (arrowExpression: ArrowExpression, uid: symbol) => {
432 | const fnCacheKey = `sync-callback-${arrowExpression.nodeId}`;
433 | if (!fnsRef.current[uid]?.[fnCacheKey]) {
434 | fnsRef.current[uid] = fnsRef.current[uid] || {};
435 | fnsRef.current[uid][fnCacheKey] = memoizeOne((arrowExpression) => {
436 | return (...eventArgs: any[]) => {
437 | return runCodeSync(arrowExpression, ...eventArgs);
438 | };
439 | });
440 | }
441 | return fnsRef.current[uid][fnCacheKey](arrowExpression);
442 | },
443 | [runCodeSync],
444 | );
445 |
446 | const lookupSyncCallback: LookupSyncFnInner = useCallback(
447 | (action, uid) => {
448 | if (!action) {
449 | return undefined;
450 | }
451 |
452 | if (typeof action === "function") {
453 | return action;
454 | }
455 |
456 | // const resolvedAction = extractParam(componentState, action, appContext, true);
457 | if (!action) {
458 | return undefined;
459 | }
460 |
461 | if (typeof action === "function") {
462 | return action;
463 | }
464 |
465 | if (!(action as any)._ARROW_EXPR_) {
466 | throw new Error("Only arrow expression allowed in sync callback");
467 | }
468 | return getOrCreateSyncCallbackFn(action, uid);
469 | },
470 | [getOrCreateSyncCallbackFn],
471 | );
472 |
473 | const lookupAction: LookupAsyncFnInner = useCallback(
474 | (
475 | action: string | undefined | ArrowExpression,
476 | uid: symbol,
477 | options?: LookupActionOptions,
478 | ) => {
479 | let safeAction = action;
480 | if (!action && uid.description && options?.eventName) {
481 | const handlerFnName = `${uid.description}_on${capitalizeFirstLetter(options?.eventName)}`;
482 | if (componentState[handlerFnName] && componentState[handlerFnName]._ARROW_EXPR_) {
483 | safeAction = componentState[handlerFnName] as ArrowExpression;
484 | }
485 | }
486 | if (!safeAction) {
487 | return undefined;
488 | }
489 | if (typeof safeAction === "function") {
490 | return safeAction;
491 | }
492 | return getOrCreateEventHandlerFn(safeAction, uid, options);
493 | },
494 | [componentState, getOrCreateEventHandlerFn],
495 | );
496 |
497 | const isApiRegisteredInnerRef = useRef(false);
498 | useEffect(() => {
499 | if (!node.api) {
500 | return;
501 | }
502 | if (!node.containerUid) {
503 | return;
504 | }
505 | if (isApiRegisteredInnerRef.current) {
506 | return;
507 | }
508 | isApiRegisteredInnerRef.current = true;
509 | const api: Record<string, any> = {};
510 | const self = Symbol("$self");
511 | Object.entries(node.api).forEach(([key, value]) => {
512 | api[key] = lookupAction(value as string, self);
513 | });
514 | if (!isImplicit) {
515 | registerComponentApi(self, api); //we register the api as $self for the compound components,
516 | }
517 | parentRegisterComponentApi(node.containerUid, api); // and register it for the parent component instance
518 | }, [
519 | lookupAction,
520 | node.api,
521 | node.containerUid,
522 | node.uid,
523 | isImplicit,
524 | parentRegisterComponentApi,
525 | registerComponentApi,
526 | ]);
527 |
528 | const cleanup = useEvent((uid) => {
529 | delete fnsRef.current[uid];
530 | });
531 |
532 | // --- The container wraps the `renderChild` function to provide that to the child components
533 | const stableRenderChild: RenderChildFn = useCallback(
534 | (childNode, lc, pRenderContext, uidInfoRef, ref, rest) => {
535 | // TODO: Check if this is a valid use case
536 | if (typeof childNode === "string") {
537 | throw Error("should be resolved for now");
538 | }
539 |
540 | // --- Make children an array if it's not
541 | const children = isArray(childNode) ? childNode : [childNode];
542 |
543 | if (!children || !children.length) {
544 | // --- No child, nothing to render
545 | return null;
546 | }
547 |
548 | // --- If there are multiple children, we need to add a `key` to each of them
549 | const wrapWithFragment = children.length > 1;
550 |
551 | // --- Render each child
552 | const renderedChildren = children.map((child, childIndex) => {
553 | if (!child) {
554 | // --- No child, nothing to render: Should not happen
555 | return undefined;
556 | }
557 |
558 | // --- Invoke the jolly-joker `renderChild` function to render the child. Note that
559 | // --- in the context, we pass the `stableRenderChild` function, so the child can
560 | // --- render its children recursively.
561 | const renderedChild = renderChild({
562 | node: child,
563 | state: componentState,
564 | dispatch,
565 | appContext,
566 | lookupAction,
567 | lookupSyncCallback,
568 | registerComponentApi,
569 | renderChild: stableRenderChild,
570 | statePartChanged: statePartChanged,
571 | layoutContext: lc,
572 | parentRenderContext: pRenderContext,
573 | memoedVarsRef,
574 | cleanup,
575 | uidInfoRef,
576 | });
577 |
578 | if (renderedChild === undefined) {
579 | // --- No displayable child, nothing to render
580 | return undefined;
581 | }
582 |
583 | // --- Let's process the rendered child
584 | let rendered = renderedChild;
585 | const key = `${childIndex}_${child.uid}`;
586 |
587 | if (wrapWithFragment) {
588 | // --- Add the `key` attribute to the child
589 | if (React.isValidElement(renderedChild)) {
590 | // --- React can display this element
591 | rendered = React.cloneElement(renderedChild, { key });
592 | } else {
593 | // --- A simple text node (or alike). We need to wrap it in a `Fragment`
594 | rendered = <Fragment key={key}>{renderedChild}</Fragment>;
595 | }
596 | }
597 |
598 | // --- Done.
599 | return rendered;
600 | });
601 |
602 | // --- At this point we have a React node for each child
603 | if (renderedChildren.length === 1) {
604 | // --- If we have a single (and valid React element) child, we compose its
605 | // --- `ref` with the parent's `ref`. This allows the parent to access the child's
606 | // --- DOM node. Otherwise, we use the child as is.
607 | return ref && renderedChildren[0] && isValidElement(renderedChildren[0])
608 | ? React.cloneElement(renderedChildren[0], {
609 | ref: composeRefs(ref, (renderedChildren[0] as any).ref),
610 | ...mergeProps(renderedChildren[0].props, rest)
611 | } as any)
612 | : renderedChildren[0];
613 | }
614 |
615 | // --- Done.
616 | return renderedChildren;
617 | },
618 | [
619 | componentState,
620 | dispatch,
621 | appContext,
622 | lookupAction,
623 | lookupSyncCallback,
624 | registerComponentApi,
625 | statePartChanged,
626 | memoedVarsRef,
627 | cleanup,
628 | ],
629 | );
630 |
631 | // --- Log the component state if you need it for debugging
632 | if ((node.props as any)?.debug) {
633 | console.log(`Container: ${resolvedKey}`, {
634 | componentState,
635 | node,
636 | });
637 | }
638 |
639 | // --- Use this object to store information about already rendered UIDs.
640 | // --- We do not allow any action, loader, or transform to use the same UID; however (as of now) children
641 | // --- may use the same UID.
642 | const uidInfo: Record<string, string> = {};
643 |
644 | const thisUidInfoRef = useRef({});
645 | const uidInfoRef = node.uses === undefined ? parentUidInfoRef : thisUidInfoRef;
646 |
647 | const renderedChildren = stableRenderChild(
648 | node.children,
649 | layoutContextRef?.current,
650 | parentRenderContext,
651 | uidInfoRef,
652 | ref,
653 | rest
654 | );
655 |
656 | const renderedLoaders = renderLoaders({
657 | uidInfo,
658 | uidInfoRef,
659 | loaders: node.loaders,
660 | componentState,
661 | memoedVarsRef,
662 | //if it's an api bound container, we always use this container, otherwise use the parent if it's an implicit one
663 | dispatch: apiBoundContainer ? containerDispatch : dispatch,
664 | registerComponentApi: apiBoundContainer
665 | ? containerRegisterComponentApi
666 | : registerComponentApi,
667 | appContext,
668 | lookupAction,
669 | lookupSyncCallback,
670 | cleanup,
671 | });
672 | //TODO illesg
673 | const containerContent = (
674 | <>
675 | {renderedLoaders}
676 | {!!children && isValidElement(renderedChildren)
677 | ? cloneElement(renderedChildren, null, children)
678 | : renderedChildren}
679 | </>
680 | );
681 | return (
682 | <Fragment
683 | key={
684 | node.uid
685 | ? `${resolvedKey}>${extractParam(componentState, node.uid, appContext, true)}`
686 | : undefined
687 | }
688 | >
689 | {containerContent}
690 | </Fragment>
691 | );
692 | }),
693 | );
694 |
695 | interface LoaderRenderContext {
696 | uidInfo: Record<string, string>;
697 | uidInfoRef: RefObject<Record<string, any>>;
698 | loaders?: ComponentDef[];
699 | componentState: ContainerState;
700 | dispatch: ContainerDispatcher;
701 | appContext: AppContextObject;
702 | registerComponentApi: RegisterComponentApiFnInner;
703 | lookupAction: LookupAsyncFnInner;
704 | lookupSyncCallback: LookupSyncFnInner;
705 | cleanup: ComponentCleanupFn;
706 | memoedVarsRef: MutableRefObject<MemoedVars>;
707 | }
708 |
709 | function renderLoaders({
710 | uidInfo,
711 | uidInfoRef,
712 | loaders = EMPTY_ARRAY,
713 | componentState,
714 | dispatch,
715 | appContext,
716 | registerComponentApi,
717 | lookupAction,
718 | lookupSyncCallback,
719 | cleanup,
720 | memoedVarsRef,
721 | }: LoaderRenderContext) {
722 | return loaders.map((loader: ComponentDef) => {
723 | // --- Check for the uniqueness of UIDs
724 | if (loader?.uid) {
725 | if (uidInfo[loader.uid]) {
726 | // --- We have a duplicated ID (another loader)
727 | throw new Error(
728 | `Another ${uidInfo[loader.uid]} definition in this container already uses the uid '${loader.uid}'`,
729 | );
730 | }
731 | uidInfo[loader.uid] = "loader";
732 | uidInfoRef.current[loader.uid] = {
733 | type: "loader",
734 | value: "loaderValue",
735 | uid: loader.uid,
736 | };
737 | }
738 |
739 | // --- Render the current loader
740 | const renderedLoader = renderLoader({
741 | loader,
742 | componentState,
743 | dispatch,
744 | appContext,
745 | registerComponentApi,
746 | lookupAction,
747 | lookupSyncCallback,
748 | memoedVarsRef,
749 | cleanup,
750 | });
751 |
752 | // --- Skip loaders with rendering errors
753 | if (renderedLoader === undefined) {
754 | return undefined;
755 | }
756 |
757 | // --- Take care to use a key property for the loader
758 | return <Fragment key={loader.uid}>{renderedLoader}</Fragment>;
759 | });
760 |
761 | function renderLoader({
762 | loader,
763 | componentState,
764 | dispatch,
765 | appContext,
766 | registerComponentApi,
767 | lookupAction,
768 | lookupSyncCallback,
769 | cleanup,
770 | memoedVarsRef,
771 | }: {
772 | loader: ComponentDef;
773 | componentState: ContainerState;
774 | dispatch: ContainerDispatcher;
775 | appContext: AppContextObject;
776 | registerComponentApi: RegisterComponentApiFnInner;
777 | lookupAction: LookupAsyncFnInner;
778 | lookupSyncCallback: LookupSyncFnInner;
779 | cleanup: ComponentCleanupFn;
780 | memoedVarsRef: MutableRefObject<MemoedVars>;
781 | }) {
782 | // --- For the sake of avoiding further issues
783 | if (!loader) {
784 | return null;
785 | }
786 |
787 | // --- Evaluate "when" to decide if the loader should be rendered
788 | // --- Render only visible components
789 | if (!shouldKeep(loader.when, componentState, appContext)) {
790 | return null;
791 | }
792 |
793 | // --- Use the loader type's renderer function
794 | return (
795 | <LoaderComponent
796 | onUnmount={cleanup}
797 | node={loader}
798 | state={componentState}
799 | dispatch={dispatch}
800 | registerComponentApi={registerComponentApi}
801 | lookupAction={lookupAction}
802 | lookupSyncCallback={lookupSyncCallback}
803 | memoedVarsRef={memoedVarsRef}
804 | appContext={appContext}
805 | />
806 | );
807 | }
808 | }
809 |
810 | function isParsedEventValue(
811 | value: string | ParsedEventValue | ArrowExpression,
812 | ): value is ParsedEventValue {
813 | return (value as ParsedEventValue).__PARSED === true;
814 | }
815 |
816 | function isArrowExpression(
817 | value: string | ParsedEventValue | ArrowExpression,
818 | ): value is ArrowExpression {
819 | return (value as ArrowExpression).type === T_ARROW_EXPRESSION;
820 | }
821 |
```