This is page 113 of 182. Use http://codebase.md/xmlui-org/xmlui/mockApiDef.js?lines=true&page={x} to view the full context. # Directory Structure ``` ├── .changeset │ ├── config.json │ ├── cool-queens-look.md │ ├── hot-berries-argue.md │ ├── twelve-guests-care.md │ └── wise-towns-dance.md ├── .eslintrc.cjs ├── .github │ ├── build-checklist.png │ ├── ISSUE_TEMPLATE │ │ ├── bug_report.md │ │ └── feature_request.md │ └── workflows │ ├── 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 │ │ │ │ ├── blog-page-component.png │ │ │ │ ├── blog-scrabble.png │ │ │ │ ├── integrated-blog-search.png │ │ │ │ └── lorem-ipsum.png │ │ │ ├── lorem-ipsum.md │ │ │ ├── newest-post.md │ │ │ ├── older-post.md │ │ │ └── welcome-to-the-xmlui-blog.md │ │ ├── mockServiceWorker.js │ │ ├── netlify.toml │ │ ├── resources │ │ │ ├── favicon.ico │ │ │ ├── files │ │ │ │ └── for-download │ │ │ │ └── xmlui │ │ │ │ └── xmlui-standalone.umd.js │ │ │ ├── github.svg │ │ │ ├── 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 │ │ │ ├── Debug.xmlui │ │ │ └── PageNotFound.xmlui │ │ ├── config.ts │ │ ├── Main.xmlui │ │ ├── Main.xmlui.xs │ │ └── themes │ │ ├── docs-theme.ts │ │ ├── earthtone.ts │ │ ├── xmlui-gray-on-default.ts │ │ ├── xmlui-green-on-default.ts │ │ └── xmlui-orange-on-default.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 │ │ ├── HelloMd.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 │ │ │ │ ├── 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 │ ├── 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 │ │ └── tsconfig.json │ ├── 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 │ │ ├── tsconfig.json │ │ └── 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 │ │ └── tsconfig.json │ ├── 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 │ │ └── tsconfig.json │ ├── 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 │ │ └── tsconfig.json │ ├── 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 │ │ └── tsconfig.json │ ├── 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 │ │ └── tsconfig.json │ ├── xmlui-spreadsheet │ │ ├── .gitignore │ │ ├── demo │ │ │ └── Main.xmlui │ │ ├── index.html │ │ ├── index.ts │ │ ├── meta │ │ │ └── componentsMetadata.ts │ │ ├── package.json │ │ ├── src │ │ │ ├── index.tsx │ │ │ ├── Spreadsheet.tsx │ │ │ └── SpreadsheetNative.tsx │ │ └── tsconfig.json │ └── 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.tsx │ │ │ └── HeroSectionNative.tsx │ │ ├── index.tsx │ │ ├── ScrollToTop │ │ │ ├── ScrollToTop.module.scss │ │ │ ├── ScrollToTop.tsx │ │ │ └── ScrollToTopNative.tsx │ │ └── vite-env.d.ts │ └── tsconfig.json ├── 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.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 │ ├── containers.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 │ ├── state-management.md │ ├── ud-components.md │ └── xmlui-repo.md ├── package.json ├── playwright.config.ts ├── scripts │ ├── coverage-only.js │ ├── e2e-test-summary.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 │ ├── get-langserver-metadata.mjs │ ├── 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.spec.ts │ │ │ │ ├── LabelList.tsx │ │ │ │ ├── LabelListNative.module.scss │ │ │ │ └── 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 │ │ │ ├── MultiSelectOption.tsx │ │ │ ├── OptionContext.ts │ │ │ ├── Select.md │ │ │ ├── Select.module.scss │ │ │ ├── Select.spec.ts │ │ │ ├── Select.tsx │ │ │ ├── SelectContext.tsx │ │ │ ├── SelectNative.tsx │ │ │ ├── SelectOption.tsx │ │ │ └── SimpleSelect.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 │ │ │ ├── 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.mjs │ ├── 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 │ │ │ ├── ModalDialogDriver.ts │ │ │ ├── NumberBoxDriver.ts │ │ │ ├── TextBoxDriver.ts │ │ │ ├── TimeInputDriver.ts │ │ │ ├── TimerDriver.ts │ │ │ └── TreeDriver.ts │ │ ├── fixtures.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.bin.json ├── tsconfig.json ├── tsconfig.node.json ├── vite.config.ts └── vitest.config.ts ``` # Files -------------------------------------------------------------------------------- /xmlui/src/components/Table/Table.md: -------------------------------------------------------------------------------- ```markdown 1 | %-DESC-START 2 | 3 | **Key features:** 4 | - **Data integration**: Load data from APIs via [DataSource](/components/DataSource) or use static arrays 5 | - **Virtualization**: Only renders visible rows for smooth performance with large datasets 6 | - **Row selection**: Support single or multi-row selection for bulk operations 7 | - **Pagination**: Built-in pagination controls for managing large datasets 8 | 9 | Use `Column` to define headers, data binding, sorting behavior, and custom cell content. 10 | 11 | In the following sections the examples use data with the structure outlined below: 12 | 13 | | Id | Name | Quantity | Unit | Category | 14 | | :--- | :------ | :------- | :----- | :--------- | 15 | | 0 | Apples | 5 | pieces | fruits | 16 | | 1 | Bananas | 6 | pieces | fruits | 17 | | 2 | Carrots | 100 | grams | vegetables | 18 | | 3 | Spinach | 1 | bunch | vegetables | 19 | | 4 | Milk | 10 | liter | diary | 20 | | 5 | Cheese | 200 | grams | diary | 21 | 22 | The data is provided as JSON. In the source code samples, the `data={[...]}` declaration represents the data above. 23 | 24 | All samples use table columns with the following definition unless noted otherwise 25 | (The `...` declaration nested into `<Table>` represents this column definition): 26 | 27 | ```xmlui copy 28 | <Table data='{[...]}'> 29 | <Column bindTo="name"/> 30 | <Column bindTo="quantity"/> 31 | <Column bindTo="unit"/> 32 | </Table> 33 | ``` 34 | 35 | > **Note**: See [`Column`](../components/Column) to learn more about table columns. 36 | 37 | %-DESC-END 38 | 39 | %-PROP-START data 40 | 41 | ```xmlui copy /data='{[...]}'/ 42 | <App> 43 | <Table data='{[...]}'> 44 | <Column bindTo="name"/> 45 | <Column bindTo="quantity"/> 46 | <Column bindTo="unit"/> 47 | </Table> 48 | </App> 49 | ``` 50 | 51 | ```xmlui-pg name="Example: data" 52 | <App> 53 | <Table data='{[ 54 | { 55 | id: 0, 56 | name: "Apples", 57 | quantity: 5, 58 | unit: "pieces", 59 | category: "fruits", 60 | key: 5, 61 | }, 62 | { 63 | id: 1, 64 | name: "Bananas", 65 | quantity: 6, 66 | unit: "pieces", 67 | category: "fruits", 68 | key: 4, 69 | }, 70 | { 71 | id: 2, 72 | name: "Carrots", 73 | quantity: 100, 74 | unit: "grams", 75 | category: "vegetables", 76 | key: 3, 77 | }, 78 | { 79 | id: 3, 80 | name: "Spinach", 81 | quantity: 1, 82 | unit: "bunch", 83 | category: "vegetables", 84 | key: 2, 85 | }, 86 | { 87 | id: 4, 88 | name: "Milk", 89 | quantity: 10, 90 | unit: "liter", 91 | category: "dairy", 92 | key: 1, 93 | }, 94 | { 95 | id: 5, 96 | name: "Cheese", 97 | quantity: 200, 98 | unit: "grams", 99 | category: "dairy", 100 | key: 0, 101 | }, 102 | ]}'> 103 | <Column bindTo="name"/> 104 | <Column bindTo="quantity"/> 105 | <Column bindTo="unit"/> 106 | </Table> 107 | </App> 108 | ``` 109 | 110 | You can also provide the `Table` with data directly from an API via this property. 111 | Here, the component displays rocket information coming from the official SpaceX API. 112 | 113 | ```xmlui-pg copy display name="Example: data API Call" 114 | <App> 115 | <Table data='https://api.spacexdata.com/v3/rockets'> 116 | <Column header="Image" size="140px"> 117 | <Image height="100px" fit="cover" src="{$item.flickr_images[0]}"/> 118 | </Column> 119 | <Column canSort="true" bindTo="country"/> 120 | <Column canSort="true" bindTo="company"/> 121 | </Table> 122 | </App> 123 | ``` 124 | 125 | %-PROP-END 126 | 127 | %-PROP-START enableMultiRowSelection 128 | 129 | This boolean property indicates whether you can select multiple rows in the table. 130 | This property only has an effect when the `rowsSelectable` property is set. 131 | Setting it to `false` limits selection to a single row. 132 | 133 | By default, the value of this property is `true`. 134 | 135 | ```xmlui copy /enableMultiRowSelection="false"/ 136 | <App> 137 | <Table data='{[...]}' 138 | rowsSelectable="true" 139 | enableMultiRowSelection="false"> 140 | <Column bindTo="name"/> 141 | <Column bindTo="quantity"/> 142 | <Column bindTo="unit"/> 143 | </Table> 144 | </App> 145 | ``` 146 | 147 | ```xmlui-pg name="Example: enableMultiRowSelection" 148 | <App> 149 | <Table data='{[ 150 | { 151 | id: 0, 152 | name: "Apples", 153 | quantity: 5, 154 | unit: "pieces", 155 | category: "fruits", 156 | key: 5, 157 | }, 158 | { 159 | id: 1, 160 | name: "Bananas", 161 | quantity: 6, 162 | unit: "pieces", 163 | category: "fruits", 164 | key: 4, 165 | }, 166 | { 167 | id: 2, 168 | name: "Carrots", 169 | quantity: 100, 170 | unit: "grams", 171 | category: "vegetables", 172 | key: 3, 173 | }, 174 | { 175 | id: 3, 176 | name: "Spinach", 177 | quantity: 1, 178 | unit: "bunch", 179 | category: "vegetables", 180 | key: 2, 181 | }, 182 | { 183 | id: 4, 184 | name: "Milk", 185 | quantity: 10, 186 | unit: "liter", 187 | category: "dairy", 188 | key: 1, 189 | }, 190 | { 191 | id: 5, 192 | name: "Cheese", 193 | quantity: 200, 194 | unit: "grams", 195 | category: "dairy", 196 | key: 0, 197 | }, 198 | ]}' 199 | rowsSelectable="true" 200 | enableMultiRowSelection="false"> 201 | <Column bindTo="name"/> 202 | <Column bindTo="quantity"/> 203 | <Column bindTo="unit"/> 204 | </Table> 205 | </App> 206 | ``` 207 | 208 | %-PROP-END 209 | 210 | %-PROP-START headerHeight 211 | 212 | It accepts common [size values](/styles-and-themes/common-units#size-values). 213 | 214 | ```xmlui copy /headerHeight="60px"/ 215 | <App> 216 | <Table data='{[...]}' headerHeight="60px"> 217 | <Column bindTo="name"/> 218 | <Column bindTo="quantity"/> 219 | <Column bindTo="unit"/> 220 | </Table> 221 | </App> 222 | ``` 223 | 224 | ```xmlui-pg name="Example: headerHeight" 225 | <App> 226 | <Table data='{[ 227 | { 228 | id: 0, 229 | name: "Apples", 230 | quantity: 5, 231 | unit: "pieces", 232 | category: "fruits", 233 | key: 5, 234 | }, 235 | { 236 | id: 1, 237 | name: "Bananas", 238 | quantity: 6, 239 | unit: "pieces", 240 | category: "fruits", 241 | key: 4, 242 | }, 243 | { 244 | id: 2, 245 | name: "Carrots", 246 | quantity: 100, 247 | unit: "grams", 248 | category: "vegetables", 249 | key: 3, 250 | }, 251 | { 252 | id: 3, 253 | name: "Spinach", 254 | quantity: 1, 255 | unit: "bunch", 256 | category: "vegetables", 257 | key: 2, 258 | }, 259 | { 260 | id: 4, 261 | name: "Milk", 262 | quantity: 10, 263 | unit: "liter", 264 | category: "dairy", 265 | key: 1, 266 | }, 267 | { 268 | id: 5, 269 | name: "Cheese", 270 | quantity: 200, 271 | unit: "grams", 272 | category: "dairy", 273 | key: 0, 274 | }, 275 | ]}' 276 | headerHeight="60px"> 277 | <Column bindTo="name"/> 278 | <Column bindTo="quantity"/> 279 | <Column bindTo="unit"/> 280 | </Table> 281 | </App> 282 | ``` 283 | 284 | %-PROP-END 285 | 286 | %-PROP-START hideHeader 287 | 288 | Set the header visibility using this property. Set it to `true` to hide the header. 289 | The default value is `false`. 290 | 291 | ```xmlui copy /hideHeader="true"/ 292 | <App> 293 | <Table data='{[...]}' hideHeader="true"> 294 | <Column bindTo="name"/> 295 | <Column bindTo="quantity"/> 296 | <Column bindTo="unit"/> 297 | </Table> 298 | </App> 299 | ``` 300 | 301 | ```xmlui-pg name="Example: hideHeader" height="300px" 302 | <App> 303 | <Table data='{[ 304 | { 305 | id: 0, 306 | name: "Apples", 307 | quantity: 5, 308 | unit: "pieces", 309 | category: "fruits", 310 | key: 5, 311 | }, 312 | { 313 | id: 1, 314 | name: "Bananas", 315 | quantity: 6, 316 | unit: "pieces", 317 | category: "fruits", 318 | key: 4, 319 | }, 320 | { 321 | id: 2, 322 | name: "Carrots", 323 | quantity: 100, 324 | unit: "grams", 325 | category: "vegetables", 326 | key: 3, 327 | }, 328 | { 329 | id: 3, 330 | name: "Spinach", 331 | quantity: 1, 332 | unit: "bunch", 333 | category: "vegetables", 334 | key: 2, 335 | }, 336 | { 337 | id: 4, 338 | name: "Milk", 339 | quantity: 10, 340 | unit: "liter", 341 | category: "dairy", 342 | key: 1, 343 | }, 344 | { 345 | id: 5, 346 | name: "Cheese", 347 | quantity: 200, 348 | unit: "grams", 349 | category: "dairy", 350 | key: 0, 351 | }, 352 | ]}' 353 | hideHeader="true"> 354 | <Column bindTo="name"/> 355 | <Column bindTo="quantity"/> 356 | <Column bindTo="unit"/> 357 | </Table> 358 | </App> 359 | ``` 360 | 361 | %-PROP-END 362 | 363 | %-PROP-START isPaginated 364 | 365 | ```xmlui copy /isPaginated="true"/ 366 | <App> 367 | <Table data='{[...]}' isPaginated="true" pageSizeOptions="{[3, 6, 12]}"> 368 | <Column bindTo="name"/> 369 | <Column bindTo="quantity"/> 370 | <Column bindTo="unit"/> 371 | </Table> 372 | </App> 373 | ``` 374 | 375 | ```xmlui-pg name="Example: isPaginated" 376 | <App> 377 | <Table data='{[ 378 | { 379 | id: 0, 380 | name: "Apples", 381 | quantity: 5, 382 | unit: "pieces", 383 | category: "fruits", 384 | key: 5, 385 | }, 386 | { 387 | id: 1, 388 | name: "Bananas", 389 | quantity: 6, 390 | unit: "pieces", 391 | category: "fruits", 392 | key: 4, 393 | }, 394 | { 395 | id: 2, 396 | name: "Carrots", 397 | quantity: 100, 398 | unit: "grams", 399 | category: "vegetables", 400 | key: 3, 401 | }, 402 | { 403 | id: 3, 404 | name: "Spinach", 405 | quantity: 1, 406 | unit: "bunch", 407 | category: "vegetables", 408 | key: 2, 409 | }, 410 | { 411 | id: 4, 412 | name: "Milk", 413 | quantity: 10, 414 | unit: "liter", 415 | category: "dairy", 416 | key: 1, 417 | }, 418 | { 419 | id: 5, 420 | name: "Cheese", 421 | quantity: 200, 422 | unit: "grams", 423 | category: "dairy", 424 | key: 0, 425 | }, 426 | ]}' 427 | isPaginated="true" pageSizeOptions="{[3, 6, 12]}"> 428 | <Column bindTo="name"/> 429 | <Column bindTo="quantity"/> 430 | <Column bindTo="unit"/> 431 | </Table> 432 | </App> 433 | ``` 434 | 435 | %-PROP-END 436 | 437 | %-PROP-START loading 438 | 439 | This boolean property indicates if the component is fetching (or processing) data. 440 | This property is useful when data is loaded conditionally or receiving it takes some time. 441 | 442 | ```xmlui-pg copy display name="Example: loading" 443 | <App> 444 | <Table loading="true"> 445 | <Column bindTo="name"/> 446 | <Column bindTo="quantity"/> 447 | </Table> 448 | </App> 449 | ``` 450 | 451 | %-PROP-END 452 | 453 | %-PROP-START noDataTemplate 454 | 455 | ```xmlui-pg copy {3-5} display name="Example: noDataTemplate" 456 | <App> 457 | <Table> 458 | <property name="noDataTemplate"> 459 | <Text value="No data loaded" variant="strong" /> 460 | </property> 461 | <Column bindTo="name"/> 462 | <Column bindTo="quantity"/> 463 | </Table> 464 | </App> 465 | ``` 466 | 467 | %-PROP-END 468 | 469 | %-PROP-START pageSizeOptions 470 | 471 | Page sizes are only accepted in an array, even if the array contains one item. 472 | 473 | Note that this property only works if the [`isPaginated`](#ispaginated) property is set to `true`. 474 | 475 | ```xmlui copy /pageSizeOptions="{[3, 6, 12]}"/ 476 | <App> 477 | <Table data='{[...]}' isPaginated="true" pageSizeOptions="{[3, 6, 12]}"> 478 | <Column bindTo="name"/> 479 | <Column bindTo="quantity"/> 480 | <Column bindTo="unit"/> 481 | </Table> 482 | </App> 483 | ``` 484 | 485 | ```xmlui-pg name="Example: pageSizeOptions" 486 | <App> 487 | <Table data='{[ 488 | { 489 | id: 0, 490 | name: "Apples", 491 | quantity: 5, 492 | unit: "pieces", 493 | category: "fruits", 494 | key: 5, 495 | }, 496 | { 497 | id: 1, 498 | name: "Bananas", 499 | quantity: 6, 500 | unit: "pieces", 501 | category: "fruits", 502 | key: 4, 503 | }, 504 | { 505 | id: 2, 506 | name: "Carrots", 507 | quantity: 100, 508 | unit: "grams", 509 | category: "vegetables", 510 | key: 3, 511 | }, 512 | { 513 | id: 3, 514 | name: "Spinach", 515 | quantity: 1, 516 | unit: "bunch", 517 | category: "vegetables", 518 | key: 2, 519 | }, 520 | { 521 | id: 4, 522 | name: "Milk", 523 | quantity: 10, 524 | unit: "liter", 525 | category: "dairy", 526 | key: 1, 527 | }, 528 | { 529 | id: 5, 530 | name: "Cheese", 531 | quantity: 200, 532 | unit: "grams", 533 | category: "dairy", 534 | key: 0, 535 | }, 536 | ]}' 537 | isPaginated="true" pageSizeOptions="{[3, 6, 12]}"> 538 | <Column bindTo="name"/> 539 | <Column bindTo="quantity"/> 540 | <Column bindTo="unit"/> 541 | </Table> 542 | </App> 543 | ``` 544 | 545 | %-PROP-END 546 | 547 | %-PROP-START rowDisabledPredicate 548 | 549 | The following example disables all table rows where the item's quantity exceeds 6: 550 | 551 | ```xmlui copy {3} 552 | <App> 553 | <Table data='{[...]}' 554 | rowDisabledPredicate="{(item) => item.quantity > 6}"> 555 | <Column bindTo="name"/> 556 | <Column bindTo="quantity"/> 557 | <Column bindTo="unit"/> 558 | </Table> 559 | </App> 560 | ``` 561 | 562 | >[!INFO] 563 | > Disabled items are rendered with a different color. 564 | 565 | ```xmlui-pg name="Example: rowDisabledPredicate" 566 | <App> 567 | <Table data='{[ 568 | { 569 | id: 0, 570 | name: "Apples", 571 | quantity: 5, 572 | unit: "pieces", 573 | category: "fruits", 574 | key: 5, 575 | }, 576 | { 577 | id: 1, 578 | name: "Bananas", 579 | quantity: 6, 580 | unit: "pieces", 581 | category: "fruits", 582 | key: 4, 583 | }, 584 | { 585 | id: 2, 586 | name: "Carrots", 587 | quantity: 100, 588 | unit: "grams", 589 | category: "vegetables", 590 | key: 3, 591 | }, 592 | { 593 | id: 3, 594 | name: "Spinach", 595 | quantity: 1, 596 | unit: "bunch", 597 | category: "vegetables", 598 | key: 2, 599 | }, 600 | { 601 | id: 4, 602 | name: "Milk", 603 | quantity: 10, 604 | unit: "liter", 605 | category: "dairy", 606 | key: 1, 607 | }, 608 | { 609 | id: 5, 610 | name: "Cheese", 611 | quantity: 200, 612 | unit: "grams", 613 | category: "dairy", 614 | key: 0, 615 | }, 616 | ]}' 617 | rowDisabledPredicate="{(item) => item.quantity > 6}"> 618 | <Column bindTo="name"/> 619 | <Column bindTo="quantity"/> 620 | <Column bindTo="unit"/> 621 | </Table> 622 | </App> 623 | ``` 624 | 625 | %-PROP-END 626 | 627 | %-PROP-START rowsSelectable 628 | 629 | The default value is `false`. 630 | 631 | ```xmlui copy /rowsSelectable="true"/ 632 | <App> 633 | <Table data='{[...]}' rowsSelectable="true"> 634 | <Column bindTo="name"/> 635 | <Column bindTo="quantity"/> 636 | <Column bindTo="unit"/> 637 | </Table> 638 | </App> 639 | ``` 640 | 641 | ```xmlui-pg name="Example: rowsSelectable" 642 | <App> 643 | <Table data='{[ 644 | { 645 | id: 0, 646 | name: "Apples", 647 | quantity: 5, 648 | unit: "pieces", 649 | category: "fruits", 650 | key: 5, 651 | }, 652 | { 653 | id: 1, 654 | name: "Bananas", 655 | quantity: 6, 656 | unit: "pieces", 657 | category: "fruits", 658 | key: 4, 659 | }, 660 | { 661 | id: 2, 662 | name: "Carrots", 663 | quantity: 100, 664 | unit: "grams", 665 | category: "vegetables", 666 | key: 3, 667 | }, 668 | { 669 | id: 3, 670 | name: "Spinach", 671 | quantity: 1, 672 | unit: "bunch", 673 | category: "vegetables", 674 | key: 2, 675 | }, 676 | { 677 | id: 4, 678 | name: "Milk", 679 | quantity: 10, 680 | unit: "liter", 681 | category: "dairy", 682 | key: 1, 683 | }, 684 | { 685 | id: 5, 686 | name: "Cheese", 687 | quantity: 200, 688 | unit: "grams", 689 | category: "dairy", 690 | key: 0, 691 | }, 692 | ]}' 693 | rowsSelectable="true"> 694 | <Column bindTo="name"/> 695 | <Column bindTo="quantity"/> 696 | <Column bindTo="unit"/> 697 | </Table> 698 | </App> 699 | ``` 700 | 701 | %-PROP-END 702 | 703 | %-PROP-START checkboxTolerance 704 | 705 | The default value is `false`. 706 | 707 | ```xmlui copy /checkboxTolerance="comfortable"/ 708 | <App> 709 | <Table data='{[...]}' 710 | rowsSelectable="true" 711 | checkboxTolerance="comfortable" 712 | > 713 | <Column bindTo="name"/> 714 | <Column bindTo="quantity"/> 715 | <Column bindTo="unit"/> 716 | </Table> 717 | </App> 718 | ``` 719 | 720 | ```xmlui-pg name="Example: checkboxTolerance" 721 | <App> 722 | <Table data='{[ 723 | { 724 | id: 0, 725 | name: "Apples", 726 | quantity: 5, 727 | unit: "pieces", 728 | category: "fruits", 729 | key: 5, 730 | }, 731 | { 732 | id: 1, 733 | name: "Bananas", 734 | quantity: 6, 735 | unit: "pieces", 736 | category: "fruits", 737 | key: 4, 738 | }, 739 | { 740 | id: 2, 741 | name: "Carrots", 742 | quantity: 100, 743 | unit: "grams", 744 | category: "vegetables", 745 | key: 3, 746 | }, 747 | { 748 | id: 3, 749 | name: "Spinach", 750 | quantity: 1, 751 | unit: "bunch", 752 | category: "vegetables", 753 | key: 2, 754 | }, 755 | { 756 | id: 4, 757 | name: "Milk", 758 | quantity: 10, 759 | unit: "liter", 760 | category: "dairy", 761 | key: 1, 762 | }, 763 | { 764 | id: 5, 765 | name: "Cheese", 766 | quantity: 200, 767 | unit: "grams", 768 | category: "dairy", 769 | key: 0, 770 | }, 771 | ]}' 772 | rowsSelectable="true" 773 | checkboxTolerance="comfortable"> 774 | <Column bindTo="name"/> 775 | <Column bindTo="quantity"/> 776 | <Column bindTo="unit"/> 777 | </Table> 778 | </App> 779 | ``` 780 | 781 | %-PROP-END 782 | 783 | %-PROP-START singleSelectOnRowClick 784 | 785 | The following sample turns on this property. Try how it works when you click on a row or directly to the selection checkbox. 786 | 787 | ```xmlui copy /singleSelectOnRowClick="true"/ 788 | <App> 789 | <Table 790 | data='{[...]}' 791 | rowsSelectable="true" 792 | singleSelectOnRowClick="true"> 793 | <Column bindTo="name"/> 794 | <Column bindTo="quantity"/> 795 | <Column bindTo="unit"/> 796 | </Table> 797 | </App> 798 | ``` 799 | 800 | ```xmlui-pg name="Example: singleSelectOnRowClick" 801 | <App> 802 | <SelectionStore> 803 | <Table 804 | data='{[ 805 | { 806 | id: 0, 807 | name: "Apples", 808 | quantity: 5, 809 | unit: "pieces", 810 | category: "fruits", 811 | key: 5, 812 | }, 813 | { 814 | id: 1, 815 | name: "Bananas", 816 | quantity: 6, 817 | unit: "pieces", 818 | category: "fruits", 819 | key: 4, 820 | }, 821 | { 822 | id: 2, 823 | name: "Carrots", 824 | quantity: 100, 825 | unit: "grams", 826 | category: "vegetables", 827 | key: 3, 828 | }, 829 | { 830 | id: 3, 831 | name: "Spinach", 832 | quantity: 1, 833 | unit: "bunch", 834 | category: "vegetables", 835 | key: 2, 836 | }, 837 | { 838 | id: 4, 839 | name: "Milk", 840 | quantity: 10, 841 | unit: "liter", 842 | category: "dairy", 843 | key: 1, 844 | }, 845 | { 846 | id: 5, 847 | name: "Cheese", 848 | quantity: 200, 849 | unit: "grams", 850 | category: "dairy", 851 | key: 0, 852 | }, 853 | ]}' 854 | rowsSelectable="true" 855 | singleSelectOnRowClick="true"> 856 | <Column bindTo="name"/> 857 | <Column bindTo="quantity"/> 858 | <Column bindTo="unit"/> 859 | </Table> 860 | </SelectionStore> 861 | </App> 862 | ``` 863 | 864 | %-PROP-END 865 | 866 | 867 | %-PROP-START sortBy 868 | 869 | ```xmlui copy /sortBy="quantity"/ 870 | <App> 871 | <Table data='{[...]}' sortBy="quantity"> 872 | <Column bindTo="name"/> 873 | <Column bindTo="quantity"/> 874 | <Column bindTo="unit"/> 875 | </Table> 876 | </App> 877 | ``` 878 | 879 | ```xmlui-pg name="Example: sortBy" 880 | <App> 881 | <Table data='{[ 882 | { 883 | id: 0, 884 | name: "Apples", 885 | quantity: 5, 886 | unit: "pieces", 887 | category: "fruits", 888 | key: 5, 889 | }, 890 | { 891 | id: 1, 892 | name: "Bananas", 893 | quantity: 6, 894 | unit: "pieces", 895 | category: "fruits", 896 | key: 4, 897 | }, 898 | { 899 | id: 2, 900 | name: "Carrots", 901 | quantity: 100, 902 | unit: "grams", 903 | category: "vegetables", 904 | key: 3, 905 | }, 906 | { 907 | id: 3, 908 | name: "Spinach", 909 | quantity: 1, 910 | unit: "bunch", 911 | category: "vegetables", 912 | key: 2, 913 | }, 914 | { 915 | id: 4, 916 | name: "Milk", 917 | quantity: 10, 918 | unit: "liter", 919 | category: "dairy", 920 | key: 1, 921 | }, 922 | { 923 | id: 5, 924 | name: "Cheese", 925 | quantity: 200, 926 | unit: "grams", 927 | category: "dairy", 928 | key: 0, 929 | }, 930 | ]}' 931 | sortBy="quantity"> 932 | <Column bindTo="name"/> 933 | <Column bindTo="quantity"/> 934 | <Column bindTo="unit"/> 935 | </Table> 936 | </App> 937 | ``` 938 | 939 | %-PROP-END 940 | 941 | %-PROP-START sortDirection 942 | 943 | ```xmlui copy /sortDirection="descending"/ 944 | <App> 945 | <Table data='{[...]}' sortBy="quantity" sortDirection="descending"> 946 | <Column bindTo="name"/> 947 | <Column bindTo="quantity"/> 948 | <Column bindTo="unit"/> 949 | </Table> 950 | </App> 951 | ``` 952 | 953 | ```xmlui-pg name="Example: sortDirection" 954 | <App> 955 | <Table data='{[ 956 | { 957 | id: 0, 958 | name: "Apples", 959 | quantity: 5, 960 | unit: "pieces", 961 | category: "fruits", 962 | key: 5, 963 | }, 964 | { 965 | id: 1, 966 | name: "Bananas", 967 | quantity: 6, 968 | unit: "pieces", 969 | category: "fruits", 970 | key: 4, 971 | }, 972 | { 973 | id: 2, 974 | name: "Carrots", 975 | quantity: 100, 976 | unit: "grams", 977 | category: "vegetables", 978 | key: 3, 979 | }, 980 | { 981 | id: 3, 982 | name: "Spinach", 983 | quantity: 1, 984 | unit: "bunch", 985 | category: "vegetables", 986 | key: 2, 987 | }, 988 | { 989 | id: 4, 990 | name: "Milk", 991 | quantity: 10, 992 | unit: "liter", 993 | category: "dairy", 994 | key: 1, 995 | }, 996 | { 997 | id: 5, 998 | name: "Cheese", 999 | quantity: 200, 1000 | unit: "grams", 1001 | category: "dairy", 1002 | key: 0, 1003 | }, 1004 | ]}' 1005 | sortBy="quantity" sortDirection="descending"> 1006 | <Column bindTo="name"/> 1007 | <Column bindTo="quantity"/> 1008 | <Column bindTo="unit"/> 1009 | </Table> 1010 | </App> 1011 | ``` 1012 | 1013 | %-PROP-END 1014 | 1015 | %-PROP-START iconSortAsc 1016 | 1017 | Allows the customization of the icon displayed in a Table column header when sorting is enabled, 1018 | sorting is done according to the column, and the column is sorted in ascending order. 1019 | 1020 | ```xmlui copy /iconSortAsc="chevronup"/ 1021 | <App> 1022 | <Table data='{[...]}' sortBy="quantity" iconSortAsc="chevronup"> 1023 | <Column bindTo="name" canSort="true" /> 1024 | <Column bindTo="quantity" canSort="true" /> 1025 | <Column bindTo="unit" canSort="true" /> 1026 | </Table> 1027 | </App> 1028 | ``` 1029 | 1030 | ```xmlui-pg copy name="Example: iconSortAsc" 1031 | <App> 1032 | <Table data='{[ 1033 | { 1034 | id: 0, 1035 | name: "Apples", 1036 | quantity: 5, 1037 | unit: "pieces", 1038 | category: "fruits", 1039 | key: 5, 1040 | }, 1041 | { 1042 | id: 1, 1043 | name: "Bananas", 1044 | quantity: 6, 1045 | unit: "pieces", 1046 | category: "fruits", 1047 | key: 4, 1048 | }, 1049 | { 1050 | id: 2, 1051 | name: "Carrots", 1052 | quantity: 100, 1053 | unit: "grams", 1054 | category: "vegetables", 1055 | key: 3, 1056 | }, 1057 | { 1058 | id: 3, 1059 | name: "Spinach", 1060 | quantity: 1, 1061 | unit: "bunch", 1062 | category: "vegetables", 1063 | key: 2, 1064 | }, 1065 | { 1066 | id: 4, 1067 | name: "Milk", 1068 | quantity: 10, 1069 | unit: "liter", 1070 | category: "dairy", 1071 | key: 1, 1072 | }, 1073 | { 1074 | id: 5, 1075 | name: "Cheese", 1076 | quantity: 200, 1077 | unit: "grams", 1078 | category: "dairy", 1079 | key: 0, 1080 | }, 1081 | ]}' 1082 | sortBy="quantity" iconSortAsc="chevronup"> 1083 | <Column bindTo="name" canSort="true" /> 1084 | <Column bindTo="quantity" canSort="true" /> 1085 | <Column bindTo="unit" canSort="true" /> 1086 | </Table> 1087 | </App> 1088 | ``` 1089 | 1090 | %-PROP-END 1091 | 1092 | %-PROP-START iconSortDesc 1093 | 1094 | Allows the customization of the icon displayed in a Table column header when sorting is enabled, 1095 | sorting is done according to the column, and the column is sorted in descending order. 1096 | 1097 | ```xmlui copy /iconSortDesc="chevrondown"/ 1098 | <App> 1099 | <Table data='{[...]}' sortBy="quantity" iconSortDesc="chevrondown"> 1100 | <Column bindTo="name" canSort="true" /> 1101 | <Column bindTo="quantity" canSort="true" /> 1102 | <Column bindTo="unit" canSort="true" /> 1103 | </Table> 1104 | </App> 1105 | ``` 1106 | 1107 | Select a column header and set it to descending ordering. 1108 | 1109 | ```xmlui-pg name="Example: iconSortDesc" 1110 | <App> 1111 | <Table data='{[ 1112 | { 1113 | id: 0, 1114 | name: "Apples", 1115 | quantity: 5, 1116 | unit: "pieces", 1117 | category: "fruits", 1118 | key: 5, 1119 | }, 1120 | { 1121 | id: 1, 1122 | name: "Bananas", 1123 | quantity: 6, 1124 | unit: "pieces", 1125 | category: "fruits", 1126 | key: 4, 1127 | }, 1128 | { 1129 | id: 2, 1130 | name: "Carrots", 1131 | quantity: 100, 1132 | unit: "grams", 1133 | category: "vegetables", 1134 | key: 3, 1135 | }, 1136 | { 1137 | id: 3, 1138 | name: "Spinach", 1139 | quantity: 1, 1140 | unit: "bunch", 1141 | category: "vegetables", 1142 | key: 2, 1143 | }, 1144 | { 1145 | id: 4, 1146 | name: "Milk", 1147 | quantity: 10, 1148 | unit: "liter", 1149 | category: "dairy", 1150 | key: 1, 1151 | }, 1152 | { 1153 | id: 5, 1154 | name: "Cheese", 1155 | quantity: 200, 1156 | unit: "grams", 1157 | category: "dairy", 1158 | key: 0, 1159 | }, 1160 | ]}' 1161 | sortBy="quantity" iconSortDesc="chevrondown"> 1162 | <Column bindTo="name" canSort="true" /> 1163 | <Column bindTo="quantity" canSort="true" /> 1164 | <Column bindTo="unit" canSort="true" /> 1165 | </Table> 1166 | </App> 1167 | ``` 1168 | 1169 | %-PROP-END 1170 | 1171 | %-PROP-START iconNoSort 1172 | 1173 | Allows the customization of the icon displayed in a Table column header when when sorting is enabled 1174 | and sorting is not done according to the column. Use the "-" (dash) value to sign that you do not want to display an icon when a table column is not sorted. 1175 | 1176 | ```xmlui copy /iconNoSort="close"/ 1177 | <App> 1178 | <Table data='{[...]}' sortBy="quantity" iconNoSort="close"> 1179 | <Column bindTo="name" canSort="true" /> 1180 | <Column bindTo="quantity" canSort="true" /> 1181 | <Column bindTo="unit" canSort="true" /> 1182 | </Table> 1183 | </App> 1184 | ``` 1185 | 1186 | ```xmlui-pg name="Example: iconNoSort" 1187 | <App> 1188 | <Table data='{[ 1189 | { 1190 | id: 0, 1191 | name: "Apples", 1192 | quantity: 5, 1193 | unit: "pieces", 1194 | category: "fruits", 1195 | key: 5, 1196 | }, 1197 | { 1198 | id: 1, 1199 | name: "Bananas", 1200 | quantity: 6, 1201 | unit: "pieces", 1202 | category: "fruits", 1203 | key: 4, 1204 | }, 1205 | { 1206 | id: 2, 1207 | name: "Carrots", 1208 | quantity: 100, 1209 | unit: "grams", 1210 | category: "vegetables", 1211 | key: 3, 1212 | }, 1213 | { 1214 | id: 3, 1215 | name: "Spinach", 1216 | quantity: 1, 1217 | unit: "bunch", 1218 | category: "vegetables", 1219 | key: 2, 1220 | }, 1221 | { 1222 | id: 4, 1223 | name: "Milk", 1224 | quantity: 10, 1225 | unit: "liter", 1226 | category: "dairy", 1227 | key: 1, 1228 | }, 1229 | { 1230 | id: 5, 1231 | name: "Cheese", 1232 | quantity: 200, 1233 | unit: "grams", 1234 | category: "dairy", 1235 | key: 0, 1236 | }, 1237 | ]}' 1238 | sortBy="quantity" iconNoSort="close"> 1239 | <Column bindTo="name" canSort="true" /> 1240 | <Column bindTo="quantity" canSort="true" /> 1241 | <Column bindTo="unit" canSort="true" /> 1242 | </Table> 1243 | </App> 1244 | ``` 1245 | 1246 | %-PROP-END 1247 | 1248 | %-EVENT-START sortingDidChange 1249 | 1250 | Note the [`canSort`](/components/Column#cansort-default-true) properties on the `Column` components which enable custom ordering. 1251 | 1252 | ```xmlui copy {4} 1253 | <App var.sortedBy=""> 1254 | <Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/> 1255 | <Table data='{[...]}' 1256 | onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " > 1257 | <Column bindTo="name" canSort="true"/> 1258 | <Column bindTo="quantity" canSort="true"/> 1259 | <Column bindTo="unit" canSort="true"/> 1260 | </Table> 1261 | </App> 1262 | ``` 1263 | 1264 | Click on any of the column headers to trigger a new sorting: 1265 | 1266 | ```xmlui-pg name="Example: sortingDidChange" 1267 | <App var.sortedBy=""> 1268 | <Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/> 1269 | <Table data='{[ 1270 | { 1271 | id: 0, 1272 | name: "Apples", 1273 | quantity: 5, 1274 | unit: "pieces", 1275 | category: "fruits", 1276 | key: 5, 1277 | }, 1278 | { 1279 | id: 1, 1280 | name: "Bananas", 1281 | quantity: 6, 1282 | unit: "pieces", 1283 | category: "fruits", 1284 | key: 4, 1285 | }, 1286 | { 1287 | id: 2, 1288 | name: "Carrots", 1289 | quantity: 100, 1290 | unit: "grams", 1291 | category: "vegetables", 1292 | key: 3, 1293 | }, 1294 | { 1295 | id: 3, 1296 | name: "Spinach", 1297 | quantity: 1, 1298 | unit: "bunch", 1299 | category: "vegetables", 1300 | key: 2, 1301 | }, 1302 | { 1303 | id: 4, 1304 | name: "Milk", 1305 | quantity: 10, 1306 | unit: "liter", 1307 | category: "dairy", 1308 | key: 1, 1309 | }, 1310 | { 1311 | id: 5, 1312 | name: "Cheese", 1313 | quantity: 200, 1314 | unit: "grams", 1315 | category: "dairy", 1316 | key: 0, 1317 | }, 1318 | ]}' 1319 | onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " > 1320 | <Column bindTo="name" canSort="true"/> 1321 | <Column bindTo="quantity" canSort="true"/> 1322 | <Column bindTo="unit" canSort="true"/> 1323 | </Table> 1324 | </App> 1325 | ``` 1326 | 1327 | %-EVENT-END 1328 | 1329 | %-EVENT-START willSort 1330 | 1331 | The following example uses the `willSort` event to refuse sorting by name: 1332 | 1333 | ```xmlui copy {4} 1334 | <App var.sortedBy=""> 1335 | <Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/> 1336 | <Table data='{[...]}' 1337 | onWillSort="(by, dir) => by !== 'name'" 1338 | onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " > 1339 | <Column bindTo="name" canSort="true"/> 1340 | <Column bindTo="quantity" canSort="true"/> 1341 | <Column bindTo="unit" canSort="true"/> 1342 | </Table> 1343 | </App> 1344 | ``` 1345 | 1346 | Click on any of the column headers to trigger the event. 1347 | Though sorting is enabled in the `TableColumnnDef` component of the "name" column via `canSort`, 1348 | clicking that column header still does not sort because `willSort` prevents it: 1349 | 1350 | ```xmlui-pg name="Example: willSort" 1351 | <App var.sortedBy=""> 1352 | <Heading level="h4" value="Table is sorted by: {sortedBy || ''}" paddingLeft="1rem"/> 1353 | <Table data='{[ 1354 | { 1355 | id: 0, 1356 | name: "Apples", 1357 | quantity: 5, 1358 | unit: "pieces", 1359 | category: "fruits", 1360 | key: 5, 1361 | }, 1362 | { 1363 | id: 1, 1364 | name: "Bananas", 1365 | quantity: 6, 1366 | unit: "pieces", 1367 | category: "fruits", 1368 | key: 4, 1369 | }, 1370 | { 1371 | id: 2, 1372 | name: "Carrots", 1373 | quantity: 100, 1374 | unit: "grams", 1375 | category: "vegetables", 1376 | key: 3, 1377 | }, 1378 | { 1379 | id: 3, 1380 | name: "Spinach", 1381 | quantity: 1, 1382 | unit: "bunch", 1383 | category: "vegetables", 1384 | key: 2, 1385 | }, 1386 | { 1387 | id: 4, 1388 | name: "Milk", 1389 | quantity: 10, 1390 | unit: "liter", 1391 | category: "dairy", 1392 | key: 1, 1393 | }, 1394 | { 1395 | id: 5, 1396 | name: "Cheese", 1397 | quantity: 200, 1398 | unit: "grams", 1399 | category: "dairy", 1400 | key: 0, 1401 | }, 1402 | ]}' 1403 | onWillSort="(by, dir) => by !== 'name'" 1404 | onSortingDidChange="(by, dir) => sortedBy = (by && dir) ? by + ' | ' + dir : '' " > 1405 | <Column bindTo="name" canSort="true"/> 1406 | <Column bindTo="quantity" canSort="true"/> 1407 | <Column bindTo="unit" canSort="true"/> 1408 | </Table> 1409 | </App> 1410 | ``` 1411 | 1412 | %-EVENT-END 1413 | 1414 | %-EVENT-START selectionDidChange 1415 | 1416 | Of course, if multiple-row selection is not allowed (`enableMultipleRowSelection` is false), this array will contain zero or one item. 1417 | 1418 | ```xmlui copy {4} 1419 | <App var.selection=""> 1420 | <Text>Current selection (row IDs): [{selection}]</Text> 1421 | <Table data='{[...]}' 1422 | rowsSelectable="true" 1423 | enableMultiRowSelection="true" 1424 | onSelectionDidChange="(newSel) => selection = newSel.map(item => item.id).join()" > 1425 | <Column bindTo="name" canSort="true"/> 1426 | <Column bindTo="quantity" canSort="true"/> 1427 | <Column bindTo="unit" canSort="true"/> 1428 | </Table> 1429 | </App> 1430 | ``` 1431 | 1432 | Click on any of the column headers to trigger a new sorting: 1433 | 1434 | ```xmlui-pg name="Example: selectionDidChange" 1435 | <App var.selection=""> 1436 | <Text>Current selection (row IDs): [{selection}]</Text> 1437 | <Table data='{[ 1438 | { 1439 | id: 0, 1440 | name: "Apples", 1441 | quantity: 5, 1442 | unit: "pieces", 1443 | category: "fruits", 1444 | key: 5, 1445 | }, 1446 | { 1447 | id: 1, 1448 | name: "Bananas", 1449 | quantity: 6, 1450 | unit: "pieces", 1451 | category: "fruits", 1452 | key: 4, 1453 | }, 1454 | { 1455 | id: 2, 1456 | name: "Carrots", 1457 | quantity: 100, 1458 | unit: "grams", 1459 | category: "vegetables", 1460 | key: 3, 1461 | }, 1462 | { 1463 | id: 3, 1464 | name: "Spinach", 1465 | quantity: 1, 1466 | unit: "bunch", 1467 | category: "vegetables", 1468 | key: 2, 1469 | }, 1470 | { 1471 | id: 4, 1472 | name: "Milk", 1473 | quantity: 10, 1474 | unit: "liter", 1475 | category: "dairy", 1476 | key: 1, 1477 | }, 1478 | { 1479 | id: 5, 1480 | name: "Cheese", 1481 | quantity: 200, 1482 | unit: "grams", 1483 | category: "dairy", 1484 | key: 0, 1485 | }, 1486 | ]}' 1487 | rowsSelectable="true" 1488 | enableMultiRowSelection="true" 1489 | onSelectionDidChange="(newSel) => selection = newSel.map(item => item.id).join()" > 1490 | <Column bindTo="name" canSort="true"/> 1491 | <Column bindTo="quantity" canSort="true"/> 1492 | <Column bindTo="unit" canSort="true"/> 1493 | </Table> 1494 | </App> 1495 | ``` 1496 | 1497 | %-EVENT-END 1498 | 1499 | %-API-START clearSelection 1500 | 1501 | ```xmlui copy /clearSelection()/ /selectId(1)/ /selectId([2, 4])/ /selectAll()/ 1502 | <App> 1503 | <HStack> 1504 | <Button label="Select all" onClick="table.selectAll()" /> 1505 | <Button label="Clear all" onClick="table.clearSelection()" /> 1506 | <Button label="Select 1" onClick="table.selectId(1)" /> 1507 | <Button label="Select 2, 4" onClick="table.selectId([2, 4])" /> 1508 | </HStack> 1509 | <Table id="table" data='{[...]}' 1510 | rowsSelectable="true" 1511 | enableMultiRowSelection="true"> 1512 | <Column bindTo="name" canSort="true"/> 1513 | <Column bindTo="quantity" canSort="true"/> 1514 | <Column bindTo="unit" canSort="true"/> 1515 | </Table> 1516 | </App> 1517 | ``` 1518 | 1519 | ```xmlui-pg name="Example: clearSelection" 1520 | <App> 1521 | <HStack> 1522 | <Button label="Select all" onClick="table.selectAll()" /> 1523 | <Button label="Clear all" onClick="table.clearSelection()" /> 1524 | <Button label="Select 1" onClick="table.selectId(1)" /> 1525 | <Button label="Select 2, 4" onClick="table.selectId([2, 4])" /> 1526 | </HStack> 1527 | <Table id="table" data='{[ 1528 | { 1529 | id: 0, 1530 | name: "Apples", 1531 | quantity: 5, 1532 | unit: "pieces", 1533 | category: "fruits", 1534 | key: 5, 1535 | }, 1536 | { 1537 | id: 1, 1538 | name: "Bananas", 1539 | quantity: 6, 1540 | unit: "pieces", 1541 | category: "fruits", 1542 | key: 4, 1543 | }, 1544 | { 1545 | id: 2, 1546 | name: "Carrots", 1547 | quantity: 100, 1548 | unit: "grams", 1549 | category: "vegetables", 1550 | key: 3, 1551 | }, 1552 | { 1553 | id: 3, 1554 | name: "Spinach", 1555 | quantity: 1, 1556 | unit: "bunch", 1557 | category: "vegetables", 1558 | key: 2, 1559 | }, 1560 | { 1561 | id: 4, 1562 | name: "Milk", 1563 | quantity: 10, 1564 | unit: "liter", 1565 | category: "dairy", 1566 | key: 1, 1567 | }, 1568 | { 1569 | id: 5, 1570 | name: "Cheese", 1571 | quantity: 200, 1572 | unit: "grams", 1573 | category: "dairy", 1574 | key: 0, 1575 | }, 1576 | ]}' 1577 | rowsSelectable="true" 1578 | enableMultiRowSelection="true"> 1579 | <Column bindTo="name" canSort="true"/> 1580 | <Column bindTo="quantity" canSort="true"/> 1581 | <Column bindTo="unit" canSort="true"/> 1582 | </Table> 1583 | </App> 1584 | ``` 1585 | 1586 | %-API-END 1587 | 1588 | %-API-START getSelectedIds 1589 | 1590 | (See the [example](#clearselection) at the `clearSelection` method) 1591 | 1592 | %-API-END 1593 | 1594 | %-API-START getSelectedItems 1595 | 1596 | (See the [example](#clearselection) at the `clearSelection` method) 1597 | 1598 | %-API-END 1599 | 1600 | %-API-START selectAll 1601 | 1602 | (See the [example](#clearselection) at the `clearSelection` method) 1603 | 1604 | %-API-END 1605 | 1606 | %-API-START selectId 1607 | 1608 | (See the [example](#clearselection) at the `clearSelection` method) 1609 | 1610 | %-API-END 1611 | ``` -------------------------------------------------------------------------------- /xmlui/src/components-core/script-runner/process-statement-sync.ts: -------------------------------------------------------------------------------- ```typescript 1 | import type { LogicalThread } from "../../abstractions/scripting/LogicalThread"; 2 | import type { LoopScope } from "../../abstractions/scripting/LoopScope"; 3 | import type { BlockScope } from "../../abstractions/scripting/BlockScope"; 4 | import { 5 | T_ARROW_EXPRESSION_STATEMENT, 6 | T_ASSIGNMENT_EXPRESSION, 7 | T_BLOCK_STATEMENT, 8 | T_BREAK_STATEMENT, 9 | T_CONST_STATEMENT, 10 | T_CONTINUE_STATEMENT, 11 | T_DO_WHILE_STATEMENT, 12 | T_EMPTY_STATEMENT, 13 | T_EXPRESSION_STATEMENT, 14 | T_FOR_IN_STATEMENT, 15 | T_FOR_OF_STATEMENT, 16 | T_FOR_STATEMENT, 17 | T_FUNCTION_DECLARATION, 18 | T_IDENTIFIER, 19 | T_IF_STATEMENT, 20 | T_LET_STATEMENT, 21 | T_LITERAL, 22 | T_RETURN_STATEMENT, 23 | T_SWITCH_STATEMENT, 24 | T_THROW_STATEMENT, 25 | T_TRY_STATEMENT, 26 | T_VAR_STATEMENT, 27 | T_WHILE_STATEMENT, 28 | type ArrayDestructure, 29 | type AssignmentExpression, 30 | type Identifier, 31 | type Literal, 32 | type ObjectDestructure, 33 | type Statement, 34 | type VarDeclaration, 35 | } from "./ScriptingSourceTree"; 36 | import { reportEngineError } from "../reportEngineError"; 37 | import { StatementExecutionError, ThrowStatementError } from "../EngineError"; 38 | import { 39 | innermostBlockScope, 40 | innermostLoopScope, 41 | createLoopScope, 42 | provideLoopBody, 43 | releaseLoopScope, 44 | ensureMainThread, 45 | innermostTryScope, 46 | provideTryBody, 47 | createTryScope, 48 | provideCatchBody, 49 | provideFinallyBody, 50 | provideFinallyErrorBody, 51 | hoistFunctionDeclarations, 52 | toStatementItems, 53 | closing, 54 | guard, 55 | } from "./process-statement-common"; 56 | import type { BindingTreeEvaluationContext } from "./BindingTreeEvaluationContext"; 57 | import { evalBinding, executeArrowExpressionSync } from "./eval-tree-sync"; 58 | import type { 59 | StatementRunTimeInfo, 60 | StatementWithInfo, 61 | QueueInfo, 62 | StatementQueueItem, 63 | ProcessOutcome, 64 | } from "./statement-queue"; 65 | import { StatementQueue, mapStatementsToQueueItems, mapToItem } from "./statement-queue"; 66 | import { createXmlUiTreeNodeId } from "../../parsers/scripting/Parser"; 67 | 68 | const SYNC_EVAL_TIMEOUT = 1000; 69 | 70 | // --- Helper function to process the entire queue synchronously 71 | export function processStatementQueue( 72 | statements: Statement[], 73 | evalContext: BindingTreeEvaluationContext, 74 | thread?: LogicalThread, 75 | ): QueueInfo { 76 | if (!thread) { 77 | // --- Create the main thread for the queue 78 | thread = ensureMainThread(evalContext); 79 | } 80 | 81 | // --- Hoist function declarations to the top scope 82 | hoistFunctionDeclarations(thread, statements); 83 | 84 | // --- Set start tick to observe timeout 85 | evalContext.startTick = new Date().valueOf(); 86 | 87 | // --- Fill the queue with items 88 | const queue = new StatementQueue(); 89 | queue.push(mapStatementsToQueueItems(toStatementItems(statements))); 90 | 91 | // --- Prepare queue diagnostics information 92 | const diagInfo: QueueInfo = { 93 | processedStatements: 0, 94 | maxQueueLength: queue.length, 95 | unshiftedItems: 0, 96 | clearToLabels: 0, 97 | maxBlocks: 0, 98 | maxLoops: 0, 99 | }; 100 | 101 | // --- Consume the queue 102 | while (queue.length > 0) { 103 | // --- Check sync timeout 104 | if ( 105 | evalContext.startTick !== undefined && 106 | new Date().valueOf() - evalContext.startTick > SYNC_EVAL_TIMEOUT 107 | ) { 108 | throw new Error(`Sync evaluation timeout exceeded ${SYNC_EVAL_TIMEOUT} milliseconds`); 109 | } 110 | 111 | // --- Process the first item 112 | const queueItem = queue.dequeue(); 113 | thread.breakLabelValue = queue.length > 0 ? queue.peek()!.label : -1; 114 | 115 | let outcome: ProcessOutcome | undefined; 116 | try { 117 | // --- Sign that the statement is about to start 118 | void evalContext?.onStatementStarted?.(evalContext, queueItem!.statement); 119 | 120 | // --- Execute the statement 121 | outcome = processStatement( 122 | queueItem!.statement, 123 | queueItem!.execInfo ?? {}, 124 | evalContext, 125 | thread, 126 | ); 127 | } catch (err) { 128 | if (thread.tryBlocks && thread.tryBlocks.length > 0) { 129 | // --- We have a try block to handle this error 130 | const tryScope = thread.tryBlocks[thread.tryBlocks.length - 1]; 131 | 132 | // --- Sign the error to raise. Next time the guarded try block will execute the catch block, if there is any 133 | tryScope.errorToThrow = err; 134 | tryScope.errorSource = tryScope.processingPhase; 135 | tryScope.processingPhase = "error"; 136 | 137 | // --- Let's skip the remaining parts of the current block (try/catch/finally) 138 | outcome = { 139 | clearToLabel: tryScope.tryLabel, 140 | }; 141 | } else { 142 | if (err instanceof ThrowStatementError) { 143 | reportEngineError(err); 144 | } else { 145 | // TODO: Provide source code information 146 | reportEngineError( 147 | new StatementExecutionError(err as any /* queueItem!.statement?.source */), 148 | err, 149 | ); 150 | } 151 | } 152 | } 153 | 154 | // --- Modify the queue's content according to the outcome 155 | if (outcome) { 156 | if (outcome.toUnshift) { 157 | queue.unshift(outcome.toUnshift); 158 | 159 | diagInfo.unshiftedItems += outcome.toUnshift.length; 160 | } 161 | if (outcome.clearToLabel !== undefined) { 162 | queue.clearToLabel(outcome.clearToLabel); 163 | 164 | diagInfo.clearToLabels++; 165 | } 166 | } 167 | 168 | // --- Sign that the statement has been completed 169 | void evalContext?.onStatementCompleted?.(evalContext, queueItem!.statement); 170 | 171 | // --- Provide diagnostics 172 | if (queue.length > diagInfo.maxQueueLength) { 173 | diagInfo.maxQueueLength = queue.length; 174 | } 175 | if (thread.blocks && thread.blocks!.length > diagInfo.maxBlocks) { 176 | diagInfo.maxBlocks = thread.blocks!.length; 177 | } 178 | if (thread.loops && thread.loops.length > diagInfo.maxLoops) { 179 | diagInfo.maxLoops = thread.loops.length; 180 | } 181 | diagInfo.processedStatements++; 182 | } 183 | 184 | // --- Done. 185 | return diagInfo; 186 | } 187 | 188 | /** 189 | * Process the specified statement synchronously 190 | * @param statement Statement to process 191 | * @param evalContext Evaluation context used for processing 192 | * @param thread Logical thread to use for statement processing 193 | * @returns Items to put back into the queue of statements 194 | */ 195 | function processStatement( 196 | statement: Statement, 197 | execInfo: StatementRunTimeInfo, 198 | evalContext: BindingTreeEvaluationContext, 199 | thread: LogicalThread, 200 | ): ProcessOutcome { 201 | // --- These items should be put in the statement queue after return 202 | let toUnshift: StatementQueueItem[] = []; 203 | let clearToLabel: number | undefined; 204 | 205 | // --- Process the statement according to its type 206 | switch (statement.type) { 207 | case T_FUNCTION_DECLARATION: 208 | // --- Function declarations are already hoisted, nothing to do 209 | break; 210 | 211 | case T_VAR_STATEMENT: 212 | if (thread !== evalContext.mainThread) { 213 | throw new Error("'var' declarations are not allowed within functions"); 214 | } 215 | break; 216 | 217 | case T_EMPTY_STATEMENT: 218 | // --- Nothing to do 219 | break; 220 | 221 | case T_BLOCK_STATEMENT: 222 | // --- No statement, nothing to process 223 | if (statement.stmts.length === 0) break; 224 | 225 | // --- Create a new block scope 226 | thread.blocks ??= []; 227 | thread.blocks.push({ vars: {} }); 228 | 229 | // --- Hoist function declarations to the innermost block scope 230 | hoistFunctionDeclarations(thread, statement.stmts); 231 | 232 | // --- Queue the block scope's body... 233 | toUnshift = mapStatementsToQueueItems([ 234 | ...toStatementItems(statement.stmts), 235 | // --- ...and an empty statement to remove the block scope 236 | closing(), 237 | ]); 238 | break; 239 | 240 | case T_EXPRESSION_STATEMENT: 241 | // --- Just evaluate it 242 | const statementValue = evalBinding(statement.expr, evalContext, thread); 243 | if (thread.blocks && thread.blocks.length !== 0) { 244 | thread.blocks[thread.blocks.length - 1].returnValue = statementValue; 245 | } 246 | break; 247 | 248 | case T_ARROW_EXPRESSION_STATEMENT: 249 | // --- Compile the arrow expression 250 | const arrowFuncValue = executeArrowExpressionSync( 251 | statement.expr, 252 | evalContext, 253 | thread, 254 | ...(evalContext.eventArgs ?? []), 255 | ); 256 | if (thread.blocks && thread.blocks.length !== 0) { 257 | thread.blocks[thread.blocks.length - 1].returnValue = arrowFuncValue; 258 | } 259 | break; 260 | 261 | case T_LET_STATEMENT: { 262 | // --- Create a new variable in the innermost scope 263 | const block = innermostBlockScope(thread); 264 | if (!block) { 265 | throw new Error("Missing block scope"); 266 | } 267 | processDeclarations(block, evalContext, thread, statement.decls); 268 | break; 269 | } 270 | 271 | case T_CONST_STATEMENT: { 272 | // --- Create a new variable in the innermost scope 273 | const block = innermostBlockScope(thread); 274 | if (!block) { 275 | throw new Error("Missing block scope"); 276 | } 277 | processDeclarations(block, evalContext, thread, statement.decls, true); 278 | break; 279 | } 280 | 281 | case T_IF_STATEMENT: 282 | // --- Evaluate the condition 283 | const condition = !!evalBinding(statement.cond, evalContext, thread); 284 | if (condition) { 285 | toUnshift = mapToItem(statement.thenB); 286 | } else if (statement.elseB) { 287 | toUnshift = mapToItem(statement.elseB); 288 | } 289 | break; 290 | 291 | case T_RETURN_STATEMENT: { 292 | // --- Check if return is valid here 293 | let blockScope = innermostBlockScope(thread); 294 | if (blockScope === undefined) { 295 | throw new Error("Return requires a block scope"); 296 | } 297 | 298 | // --- Store the return value 299 | thread.returnValue = statement.expr 300 | ? evalBinding(statement.expr, evalContext, thread) 301 | : undefined; 302 | 303 | // --- Check for try blocks 304 | if ((thread.tryBlocks ?? []).length > 0) { 305 | // --- Mark the loop's try scope to exit with "return" 306 | const returnTryScope = thread.tryBlocks![0]; 307 | returnTryScope.exitType = "return"; 308 | 309 | // --- Remove the try/catch/finally block's scope 310 | if (returnTryScope.processingPhase !== "postFinally") { 311 | thread.blocks!.pop(); 312 | } 313 | 314 | // --- Clear the last part of the try/catch/finally block 315 | const tryScope = innermostTryScope(thread); 316 | clearToLabel = tryScope.tryLabel; 317 | } else { 318 | // --- Delete the remaining part of the queue 319 | clearToLabel = -1; 320 | } 321 | break; 322 | } 323 | 324 | case T_WHILE_STATEMENT: { 325 | // --- Create or get the loop's scope (guard is falsy for the first execution) 326 | let loopScope = execInfo.guard ? innermostLoopScope(thread) : createLoopScope(thread); 327 | 328 | // --- Evaluate the loop condition 329 | const condition = !!evalBinding(statement.cond, evalContext, thread); 330 | if (condition) { 331 | toUnshift = provideLoopBody(loopScope!, statement, thread.breakLabelValue); 332 | } else { 333 | // --- When the condition is not met, we're done. 334 | releaseLoopScope(thread); 335 | } 336 | break; 337 | } 338 | 339 | case T_DO_WHILE_STATEMENT: { 340 | if (!execInfo.guard) { 341 | // --- First loop execution (do-while is a post-test loop) 342 | toUnshift = provideLoopBody(createLoopScope(thread), statement, thread.breakLabelValue); 343 | break; 344 | } 345 | 346 | // --- Evaluate the loop condition 347 | const condition = !!evalBinding(statement.cond, evalContext, thread); 348 | if (condition) { 349 | toUnshift = provideLoopBody(innermostLoopScope(thread), statement, thread.breakLabelValue); 350 | } else { 351 | // --- When the condition is not met, we're done. 352 | releaseLoopScope(thread); 353 | } 354 | break; 355 | } 356 | 357 | case T_CONTINUE_STATEMENT: { 358 | // --- Search for the innermost non-switch loop scope, release the switch scopes 359 | if (!thread.loops || thread.loops.length === 0) { 360 | throw new Error("Missing loop scope"); 361 | } 362 | 363 | let loopScope: LoopScope | undefined; 364 | while (thread.loops.length > 0) { 365 | loopScope = innermostLoopScope(thread); 366 | if (!loopScope.isSwitch) { 367 | break; 368 | } 369 | thread.loops.pop(); 370 | } 371 | 372 | if (!loopScope) { 373 | throw new Error("Missing loop scope"); 374 | } 375 | 376 | if ( 377 | loopScope.tryBlockDepth >= 0 && 378 | loopScope.tryBlockDepth < (thread.tryBlocks ?? []).length 379 | ) { 380 | // --- Mark the loop's try scope to exit with "continue" 381 | for (let i = loopScope.tryBlockDepth; i < thread.tryBlocks!.length; i++) { 382 | thread.tryBlocks![loopScope.tryBlockDepth]!.exitType = "continue"; 383 | } 384 | 385 | // --- Clear the last part of the try/catch/finally block 386 | const tryScope = innermostTryScope(thread); 387 | clearToLabel = tryScope.tryLabel; 388 | } else { 389 | clearToLabel = loopScope.continueLabel; 390 | releaseLoopScope(thread, false); 391 | } 392 | break; 393 | } 394 | 395 | case T_BREAK_STATEMENT: { 396 | const loopScope = innermostLoopScope(thread); 397 | if (loopScope === undefined) { 398 | throw new Error("Missing loop scope"); 399 | } 400 | 401 | if (!!loopScope.isSwitch) { 402 | // --- Break is in a switch case 403 | clearToLabel = loopScope.breakLabel; 404 | break; 405 | } 406 | 407 | // --- Break is in a loop construct 408 | if ( 409 | loopScope.tryBlockDepth >= 0 && 410 | loopScope.tryBlockDepth < (thread.tryBlocks ?? []).length 411 | ) { 412 | // --- Mark the loop's try scope to exit with "break" 413 | for (let i = loopScope.tryBlockDepth; i < thread.tryBlocks!.length; i++) { 414 | thread.tryBlocks![loopScope.tryBlockDepth]!.exitType = "break"; 415 | } 416 | 417 | // --- Clear the last part of the try/catch/finally block 418 | const tryScope = innermostTryScope(thread); 419 | clearToLabel = tryScope.tryLabel; 420 | } else { 421 | clearToLabel = loopScope.breakLabel; 422 | releaseLoopScope(thread); 423 | } 424 | break; 425 | } 426 | 427 | case T_FOR_STATEMENT: 428 | if (!execInfo.guard) { 429 | // --- Init the loop with a new scope 430 | createLoopScope(thread, 1); 431 | 432 | // --- Create a new block for the loop variables 433 | thread.blocks ??= []; 434 | thread.blocks.push({ vars: {} }); 435 | 436 | const guardStatement = guard(statement); 437 | if (statement.init) { 438 | // --- Unshift the initialization part and the guarded for-loop 439 | toUnshift = mapStatementsToQueueItems([{ statement: statement.init }, guardStatement]); 440 | } else { 441 | // --- No init, unshift only the guard statement 442 | toUnshift = mapStatementsToQueueItems([guardStatement]); 443 | } 444 | } else { 445 | // --- Initialization already done. Evaluate the condition 446 | if (!statement.cond || evalBinding(statement.cond, evalContext, thread)) { 447 | // --- Stay in the loop, inject the body, the update expression, and the loop guard 448 | const loopScope = innermostLoopScope(thread); 449 | 450 | if (statement.upd) { 451 | const updateStmt: StatementWithInfo = { 452 | statement: { 453 | type: T_EXPRESSION_STATEMENT, 454 | nodeId: createXmlUiTreeNodeId(), 455 | expr: statement.upd, 456 | }, 457 | }; 458 | toUnshift = mapStatementsToQueueItems([ 459 | { statement: statement.body }, 460 | updateStmt, 461 | { statement, execInfo }, 462 | ]); 463 | } else { 464 | toUnshift = mapStatementsToQueueItems([ 465 | { statement: statement.body }, 466 | { statement, execInfo }, 467 | ]); 468 | } 469 | // --- The next queue label is for "break" 470 | loopScope.breakLabel = thread.breakLabelValue ?? -1; 471 | 472 | // --- The guard action's label is for "continue" 473 | loopScope.continueLabel = toUnshift[1].label; 474 | } else { 475 | // --- The condition is not met, we're done. Remove the loop's scope from the evaluation context 476 | releaseLoopScope(thread); 477 | } 478 | } 479 | break; 480 | 481 | case T_FOR_IN_STATEMENT: 482 | if (!execInfo.guard) { 483 | // --- Get the object keys 484 | const keyedObject = evalBinding(statement.expr, evalContext, thread); 485 | if (keyedObject == undefined) { 486 | // --- Nothing to do, no object to traverse 487 | break; 488 | } 489 | 490 | // --- Init the loop with a new scope 491 | createLoopScope(thread, 1); 492 | 493 | // --- Create a new block for the loop variables 494 | thread.blocks ??= []; 495 | thread.blocks.push({ vars: {} }); 496 | 497 | toUnshift = mapStatementsToQueueItems([ 498 | { statement, execInfo: { guard: true, keys: Object.keys(keyedObject), keyIndex: 0 } }, 499 | ]); 500 | } else { 501 | // --- Just for the sake of extra safety 502 | if (execInfo.keyIndex === undefined || execInfo.keys === undefined) { 503 | throw new Error("Keys information expected in for..in loop"); 504 | } 505 | 506 | // --- Any key left? 507 | if (execInfo.keyIndex < execInfo.keys.length) { 508 | // --- Set the binding variable to the next key 509 | const propValue = execInfo.keys[execInfo.keyIndex++]; 510 | switch (statement.varB) { 511 | case "none": { 512 | const assigmentExpr: AssignmentExpression = { 513 | type: T_ASSIGNMENT_EXPRESSION, 514 | leftValue: { 515 | type: T_IDENTIFIER, 516 | name: statement.id.name, 517 | } as Identifier, 518 | op: "=", 519 | expr: { 520 | type: T_LITERAL, 521 | value: propValue, 522 | } as Literal, 523 | } as AssignmentExpression; 524 | evalBinding(assigmentExpr, evalContext, thread); 525 | break; 526 | } 527 | 528 | case "const": 529 | case "let": 530 | { 531 | // --- Create a new variable in the innermost scope 532 | const block = innermostBlockScope(thread); 533 | if (!block) { 534 | throw new Error("Missing block scope"); 535 | } 536 | block.vars[statement.id.name] = propValue; 537 | if (statement.varB === "const") { 538 | block.constVars ??= new Set<string>(); 539 | block.constVars.add(statement.id.name); 540 | } 541 | } 542 | break; 543 | } 544 | 545 | // --- Inject the loop body 546 | const loopScope = innermostLoopScope(thread); 547 | toUnshift = mapStatementsToQueueItems([ 548 | { statement: statement.body }, 549 | { statement, execInfo }, 550 | ]); 551 | 552 | // --- The next queue label is for "break" 553 | loopScope.breakLabel = thread.breakLabelValue ?? -1; 554 | 555 | // --- The guard action's label is for "continue" 556 | loopScope.continueLabel = toUnshift[1].label; 557 | } else { 558 | // --- The for..in loop is complete. Remove the loop's scope from the evaluation context 559 | releaseLoopScope(thread); 560 | } 561 | } 562 | break; 563 | 564 | case T_FOR_OF_STATEMENT: 565 | if (!execInfo.guard) { 566 | // --- Get the object keys 567 | const iteratorObject = evalBinding(statement.expr, evalContext, thread); 568 | if (iteratorObject == null || typeof iteratorObject[Symbol.iterator] !== "function") { 569 | // --- The object is not an iterator 570 | throw new Error("Object in for..of is not iterable"); 571 | } 572 | 573 | // --- Init the loop with a new scope 574 | createLoopScope(thread, 1); 575 | 576 | // --- Create a new block for the loop variables 577 | thread.blocks ??= []; 578 | thread.blocks.push({ vars: {} }); 579 | 580 | toUnshift = mapStatementsToQueueItems([ 581 | { statement, execInfo: { guard: true, iterator: iteratorObject[Symbol.iterator]() } }, 582 | ]); 583 | } else { 584 | // --- Just for the sake of extra safety 585 | if (execInfo.iterator === undefined) { 586 | throw new Error("Iterator expected in for..of loop"); 587 | } 588 | 589 | // --- Any iteration left? 590 | const nextIteration = execInfo.iterator.next(); 591 | if (nextIteration.done) { 592 | // --- The for..of loop is complete. Remove the loop's scope from the evaluation context 593 | releaseLoopScope(thread); 594 | break; 595 | } 596 | 597 | // --- Set the binding variable to the next key 598 | const propValue = nextIteration.value; 599 | switch (statement.varB) { 600 | case "none": { 601 | const assigmentExpr: AssignmentExpression = { 602 | type: T_ASSIGNMENT_EXPRESSION, 603 | leftValue: { 604 | type: T_IDENTIFIER, 605 | name: statement.id.name, 606 | } as Identifier, 607 | op: "=", 608 | expr: { 609 | type: T_LITERAL, 610 | value: propValue, 611 | } as Literal, 612 | } as AssignmentExpression; 613 | evalBinding(assigmentExpr, evalContext, thread); 614 | break; 615 | } 616 | 617 | case "const": 618 | case "let": 619 | { 620 | // --- Create a new variable in the innermost scope 621 | const block = innermostBlockScope(thread); 622 | if (!block) { 623 | throw new Error("Missing block scope"); 624 | } 625 | block.vars[statement.id.name] = propValue; 626 | if (statement.varB === "const") { 627 | block.constVars ??= new Set<string>(); 628 | block.constVars.add(statement.id.name); 629 | } 630 | } 631 | break; 632 | } 633 | 634 | // --- Inject the loop body 635 | const loopScope = innermostLoopScope(thread); 636 | toUnshift = mapStatementsToQueueItems([ 637 | { statement: statement.body }, 638 | { statement, execInfo }, 639 | ]); 640 | 641 | // --- The next queue label is for "break" 642 | loopScope.breakLabel = thread.breakLabelValue ?? -1; 643 | 644 | // --- The guard action's label is for "continue" 645 | loopScope.continueLabel = toUnshift[1].label; 646 | } 647 | break; 648 | 649 | case T_THROW_STATEMENT: { 650 | throw new ThrowStatementError(evalBinding(statement.expr, evalContext, thread)); 651 | } 652 | 653 | case T_TRY_STATEMENT: { 654 | if (!execInfo.guard) { 655 | // --- Execute the try block 656 | toUnshift = provideTryBody(thread, createTryScope(thread, statement)); 657 | break; 658 | } 659 | 660 | // --- Evaluate try 661 | const tryScope = innermostTryScope(thread); 662 | switch (tryScope.processingPhase) { 663 | case "error": 664 | // --- There was an error we may handle with catch 665 | switch (tryScope.errorSource) { 666 | case "try": 667 | // --- Remove the "try" block's scope 668 | thread.blocks!.pop(); 669 | 670 | // --- Go on with catch or finally 671 | if (statement.catchB) { 672 | if (tryScope.statement.catchV) { 673 | const block = innermostBlockScope(thread)!; 674 | block.vars[tryScope.statement.catchV.name] = 675 | tryScope.errorToThrow instanceof ThrowStatementError 676 | ? tryScope.errorToThrow.errorObject 677 | : tryScope.errorToThrow; 678 | } 679 | delete tryScope.errorToThrow; 680 | tryScope.processingPhase = "catch"; 681 | toUnshift = provideCatchBody(thread, tryScope); 682 | } else if (tryScope.statement.finallyB) { 683 | // --- No catch, move on finally 684 | tryScope.processingPhase = "finally"; 685 | toUnshift = provideFinallyBody(thread, tryScope); 686 | } 687 | break; 688 | case "catch": 689 | // --- Remove the "catch" block's scope 690 | thread.blocks!.pop(); 691 | 692 | // --- Move to the finally block 693 | tryScope.processingPhase = "finally"; 694 | toUnshift = provideFinallyBody(thread, tryScope); 695 | break; 696 | case "finally": 697 | // --- Remove the "finally" block's scope 698 | thread.blocks!.pop(); 699 | 700 | // --- Move to the post finally execution 701 | tryScope.processingPhase = "postFinally"; 702 | toUnshift = provideFinallyErrorBody(tryScope); 703 | break; 704 | } 705 | break; 706 | case "try": 707 | // --- We completed the try block successfully 708 | tryScope.processingPhase = "finally"; 709 | if (statement.finallyB) { 710 | toUnshift = provideFinallyBody(thread, tryScope); 711 | } 712 | break; 713 | case "catch": 714 | // --- We completed the catch block successfully, remove the handled error 715 | tryScope.processingPhase = "finally"; 716 | if (statement.finallyB) { 717 | toUnshift = provideFinallyBody(thread, tryScope); 718 | } 719 | break; 720 | case "finally": 721 | tryScope.processingPhase = "postFinally"; 722 | toUnshift = provideFinallyErrorBody(tryScope); 723 | break; 724 | 725 | case "postFinally": 726 | // --- We completed the finally block successfully 727 | const innermostTry = thread.tryBlocks!.pop()!; 728 | 729 | // --- Is there any special exit type? 730 | switch (innermostTry.exitType) { 731 | case "break": { 732 | const loopScope = innermostLoopScope(thread); 733 | if (loopScope === undefined) { 734 | throw new Error("Missing loop scope"); 735 | } 736 | releaseLoopScope(thread); 737 | clearToLabel = loopScope.breakLabel; 738 | break; 739 | } 740 | case "continue": { 741 | const loopScope = innermostLoopScope(thread); 742 | if (loopScope === undefined) { 743 | throw new Error("Missing loop scope"); 744 | } 745 | 746 | clearToLabel = loopScope.continueLabel; 747 | releaseLoopScope(thread, false); 748 | break; 749 | } 750 | case "return": 751 | clearToLabel = -1; 752 | break; 753 | } 754 | 755 | // --- Should we raise an error? 756 | if (innermostTry.errorToThrow) { 757 | throw innermostTry.errorToThrow; 758 | } 759 | break; 760 | } 761 | break; 762 | } 763 | 764 | case T_SWITCH_STATEMENT: { 765 | // --- Create or get the loop's scope (guard is falsy for the first execution) 766 | if (execInfo.guard) { 767 | // --- Complete the switch 768 | releaseLoopScope(thread); 769 | } else { 770 | let loopScope = createLoopScope(thread); 771 | loopScope.isSwitch = true; 772 | thread.blocks!.push({ vars: {} }); 773 | 774 | // --- Evaluate the switch value 775 | const switchValue = evalBinding(statement.expr, evalContext, thread); 776 | 777 | // --- Find the matching label 778 | let matchingIndex = -1; 779 | for (let i = 0; i < statement.cases.length; i++) { 780 | const currentCase = statement.cases[i]; 781 | 782 | // --- Check for default case 783 | if (currentCase.caseE === undefined) { 784 | matchingIndex = i; 785 | break; 786 | } 787 | 788 | // --- Check for matching case 789 | const caseValue = evalBinding(currentCase.caseE, evalContext, thread); 790 | if (caseValue === switchValue) { 791 | matchingIndex = i; 792 | break; 793 | } 794 | } 795 | 796 | // --- Merge all statements from the matching label 797 | const statementFlow: Statement[] = []; 798 | if (matchingIndex >= 0) { 799 | for (let i = matchingIndex; i < statement.cases.length; i++) { 800 | statementFlow.push(...statement.cases[i].stmts!); 801 | } 802 | } 803 | 804 | // --- Queue the statement flow and the guard 805 | toUnshift = mapStatementsToQueueItems([ 806 | ...toStatementItems(statementFlow), 807 | guard(statement), 808 | ]); 809 | loopScope.breakLabel = toUnshift[toUnshift.length - 1].label; 810 | } 811 | break; 812 | } 813 | } 814 | 815 | // --- The statement may remove the innermost scope 816 | if (execInfo.removeBlockScope) { 817 | if (thread.blocks && thread.blocks.length > 0) { 818 | thread.blocks.pop(); 819 | } 820 | } 821 | 822 | // --- Done. 823 | return { toUnshift, clearToLabel }; 824 | } 825 | 826 | // --- Process a variable declaration 827 | export function processDeclarations( 828 | block: BlockScope, 829 | evalContext: BindingTreeEvaluationContext, 830 | thread: LogicalThread, 831 | declarations: VarDeclaration[], 832 | addConst = false, 833 | useValue = false, 834 | baseValue = undefined, 835 | ): void { 836 | for (let i = 0; i < declarations.length; i++) { 837 | let value: any; 838 | const decl = declarations[i]; 839 | if (useValue) { 840 | value = baseValue; 841 | } else if (decl.expr) { 842 | //TODO illesg here, functionInvocation for global function (e.g. window.confirm... ) 843 | value = evalBinding(decl.expr, evalContext, thread); 844 | } 845 | visitDeclaration(block, decl, value, addConst); 846 | } 847 | 848 | // --- Visit a variable 849 | function visitDeclaration( 850 | block: BlockScope, 851 | decl: VarDeclaration, 852 | baseValue: any, 853 | addConst: boolean, 854 | ): void { 855 | // --- Process each declaration 856 | if (decl.id) { 857 | visitIdDeclaration(block, decl.id, baseValue, addConst); 858 | } else if (decl.aDestr) { 859 | visitArrayDestruct(block, decl.aDestr, baseValue, addConst); 860 | } else if (decl.oDestr) { 861 | visitObjectDestruct(block, decl.oDestr, baseValue, addConst); 862 | } else { 863 | throw new Error("Unknown declaration specifier"); 864 | } 865 | } 866 | 867 | // --- Visits a single ID declaration 868 | function visitIdDeclaration( 869 | block: BlockScope, 870 | id: string, 871 | baseValue: any, 872 | addConst: boolean, 873 | ): void { 874 | if (block.vars[id]) { 875 | throw new Error(`Variable ${id} is already declared in the current scope.`); 876 | } 877 | block.vars[id] = baseValue; 878 | if (addConst) { 879 | block.constVars ??= new Set<string>(); 880 | block.constVars.add(id); 881 | } 882 | } 883 | 884 | // --- Visits an array destructure declaration 885 | function visitArrayDestruct( 886 | block: BlockScope, 887 | arrayD: ArrayDestructure[], 888 | baseValue: any, 889 | addConst: boolean, 890 | ): void { 891 | for (let i = 0; i < arrayD.length; i++) { 892 | const arrDecl = arrayD[i]; 893 | const value = baseValue?.[i]; 894 | if (arrDecl.id) { 895 | visitIdDeclaration(block, arrDecl.id, value, addConst); 896 | } else if (arrDecl.aDestr) { 897 | visitArrayDestruct(block, arrDecl.aDestr, value, addConst); 898 | } else if (arrDecl.oDestr) { 899 | visitObjectDestruct(block, arrDecl.oDestr, value, addConst); 900 | } 901 | } 902 | } 903 | 904 | // --- Visits an object destructure declaration 905 | function visitObjectDestruct( 906 | block: BlockScope, 907 | objectD: ObjectDestructure[], 908 | baseValue: any, 909 | addConst: boolean, 910 | ): void { 911 | for (let i = 0; i < objectD.length; i++) { 912 | const objDecl = objectD[i]; 913 | const value = baseValue?.[objDecl.id!]; 914 | if (objDecl.aDestr) { 915 | visitArrayDestruct(block, objDecl.aDestr, value, addConst); 916 | } else if (objDecl.oDestr) { 917 | visitObjectDestruct(block, objDecl.oDestr, value, addConst); 918 | } else { 919 | visitIdDeclaration(block, objDecl.alias ?? objDecl.id!, value, addConst); 920 | } 921 | } 922 | } 923 | } 924 | ```