xmlui 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.cjs +8836 -0
- package/dist/bin/index.js +8825 -0
- package/dist/lib/{apiInterceptorWorker-QiltRtq1.js → apiInterceptorWorker-dwrAyq6l.js} +126 -151
- package/dist/lib/{index-Cq0EMm3L.js → index-x4orhWfi.js} +1888 -2133
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-DCigV4Zh.js → initMock-DrUirixi.js} +19 -22
- package/dist/lib/language-server-web-worker.js +13 -5
- package/dist/lib/language-server.js +11 -3
- package/dist/lib/{metadata-utils-BiolWMg9.js → metadata-utils-2bsMr4Gd.js} +58 -26
- package/dist/lib/{server-common-DyCHOk-z.js → server-common-DI3W4cob.js} +6297 -5930
- package/dist/lib/syntax-textmate.js +8 -2472
- package/dist/lib/testing.d.ts +1 -0
- package/dist/lib/testing.js +20 -23
- package/dist/lib/{transform-DHf9tQF7.js → transform-CQ_6R-43.js} +159 -126
- package/dist/lib/vite-xmlui-plugin.d.ts +10 -0
- package/dist/lib/vite-xmlui-plugin.js +8316 -0
- package/dist/lib/{xmlui-parser-CHN3mADy.js → xmlui-parser-CW8YmGjO.js} +10 -11
- package/dist/lib/xmlui-parser.js +2 -2
- package/dist/lib/{xmlui-serializer-CYNSHAlP.js → xmlui-serializer-CeCcgdVR.js} +19 -19
- package/dist/lib/xmlui.d.ts +122 -1
- package/dist/lib/xmlui.js +8 -3
- package/dist/metadata/{apiInterceptorWorker-Dql7QGw2.js → apiInterceptorWorker-Wgm2_zjg.js} +124 -149
- package/dist/metadata/{collectedComponentMetadata-CLaDZhmc.js → collectedComponentMetadata-BGdap_gu.js} +1919 -2124
- package/dist/metadata/{initMock-Buqah4JF.js → initMock-DlJ0S4Uy.js} +19 -22
- package/dist/metadata/xmlui-metadata.css +1 -0
- package/dist/metadata/xmlui-metadata.js +1 -1
- package/dist/metadata/xmlui-metadata.umd.cjs +3 -3
- package/dist/standalone/xmlui-standalone.es.d.ts +171 -2
- package/dist/standalone/xmlui-standalone.umd.js +36 -37
- package/package.json +20 -50
- package/dist/lib/vite-xmlui-plugin/index.js +0 -13985
- package/dist/lib/vite-xmlui-plugin/package.json +0 -3
- package/dist/metadata/style.css +0 -1
- package/dist/scripts/bin/bootstrap.cjs +0 -4
- package/dist/scripts/bin/build-lib.js +0 -126
- package/dist/scripts/bin/build.js +0 -266
- package/dist/scripts/bin/index.js +0 -167
- package/dist/scripts/bin/preview.js +0 -44
- package/dist/scripts/bin/start.js +0 -52
- package/dist/scripts/bin/vite-xmlui-plugin.js +0 -109
- package/dist/scripts/bin/viteConfig.js +0 -144
- package/dist/scripts/package.json +0 -285
- package/dist/scripts/src/abstractions/ActionDefs.js +0 -2
- package/dist/scripts/src/abstractions/AppContextDefs.js +0 -4
- package/dist/scripts/src/abstractions/ComponentDefs.js +0 -2
- package/dist/scripts/src/abstractions/ContainerDefs.js +0 -2
- package/dist/scripts/src/abstractions/ExtensionDefs.js +0 -2
- package/dist/scripts/src/abstractions/FunctionDefs.js +0 -2
- package/dist/scripts/src/abstractions/RendererDefs.js +0 -2
- package/dist/scripts/src/abstractions/ThemingDefs.js +0 -2
- package/dist/scripts/src/abstractions/scripting/BlockScope.js +0 -2
- package/dist/scripts/src/abstractions/scripting/Compilation.js +0 -2
- package/dist/scripts/src/abstractions/scripting/LogicalThread.js +0 -2
- package/dist/scripts/src/abstractions/scripting/LoopScope.js +0 -2
- package/dist/scripts/src/abstractions/scripting/ScriptParserError.js +0 -2
- package/dist/scripts/src/abstractions/scripting/Token.js +0 -2
- package/dist/scripts/src/abstractions/scripting/TryScope.js +0 -2
- package/dist/scripts/src/abstractions/scripting/TryScopeExp.js +0 -2
- package/dist/scripts/src/abstractions/scripting/modules.js +0 -2
- package/dist/scripts/src/components/APICall/APICall.js +0 -130
- package/dist/scripts/src/components/APICall/APICall.spec.js +0 -910
- package/dist/scripts/src/components/APICall/APICallNative.js +0 -36
- package/dist/scripts/src/components/Accordion/Accordion.js +0 -97
- package/dist/scripts/src/components/Accordion/Accordion.spec.js +0 -969
- package/dist/scripts/src/components/Accordion/AccordionContext.js +0 -20
- package/dist/scripts/src/components/Accordion/AccordionItem.js +0 -35
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +0 -95
- package/dist/scripts/src/components/Accordion/AccordionNative.js +0 -141
- package/dist/scripts/src/components/Animation/AnimationNative.js +0 -263
- package/dist/scripts/src/components/App/App.js +0 -581
- package/dist/scripts/src/components/App/App.spec.js +0 -331
- package/dist/scripts/src/components/App/AppLayoutContext.js +0 -49
- package/dist/scripts/src/components/App/AppNative.js +0 -308
- package/dist/scripts/src/components/App/AppStateContext.js +0 -9
- package/dist/scripts/src/components/App/IndexerContext.js +0 -44
- package/dist/scripts/src/components/App/LinkInfoContext.js +0 -9
- package/dist/scripts/src/components/App/SearchContext.js +0 -35
- package/dist/scripts/src/components/App/Sheet.js +0 -99
- package/dist/scripts/src/components/AppHeader/AppHeader.js +0 -58
- package/dist/scripts/src/components/AppHeader/AppHeader.spec.js +0 -169
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +0 -72
- package/dist/scripts/src/components/AppState/AppState.js +0 -75
- package/dist/scripts/src/components/AppState/AppState.spec.js +0 -292
- package/dist/scripts/src/components/AppState/AppStateNative.js +0 -51
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +0 -109
- package/dist/scripts/src/components/AutoComplete/AutoComplete.spec.js +0 -546
- package/dist/scripts/src/components/AutoComplete/AutoCompleteContext.js +0 -19
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +0 -498
- package/dist/scripts/src/components/Avatar/Avatar.js +0 -55
- package/dist/scripts/src/components/Avatar/Avatar.spec.js +0 -1514
- package/dist/scripts/src/components/Avatar/AvatarNative.js +0 -58
- package/dist/scripts/src/components/Backdrop/Backdrop.js +0 -40
- package/dist/scripts/src/components/Backdrop/Backdrop.spec.js +0 -131
- package/dist/scripts/src/components/Backdrop/BackdropNative.js +0 -25
- package/dist/scripts/src/components/Badge/Badge.js +0 -81
- package/dist/scripts/src/components/Badge/Badge.spec.js +0 -2214
- package/dist/scripts/src/components/Badge/BadgeNative.js +0 -46
- package/dist/scripts/src/components/Bookmark/Bookmark.js +0 -48
- package/dist/scripts/src/components/Bookmark/Bookmark.spec.js +0 -230
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +0 -55
- package/dist/scripts/src/components/Breakout/Breakout.js +0 -17
- package/dist/scripts/src/components/Breakout/Breakout.spec.js +0 -56
- package/dist/scripts/src/components/Breakout/BreakoutNative.js +0 -24
- package/dist/scripts/src/components/Button/Button-style.spec.js +0 -274
- package/dist/scripts/src/components/Button/Button.js +0 -171
- package/dist/scripts/src/components/Button/Button.spec.js +0 -425
- package/dist/scripts/src/components/Button/ButtonNative.js +0 -109
- package/dist/scripts/src/components/Card/Card.js +0 -89
- package/dist/scripts/src/components/Card/Card.spec.js +0 -150
- package/dist/scripts/src/components/Card/CardNative.js +0 -41
- package/dist/scripts/src/components/Carousel/Carousel.js +0 -133
- package/dist/scripts/src/components/Carousel/Carousel.spec.js +0 -557
- package/dist/scripts/src/components/Carousel/CarouselContext.js +0 -57
- package/dist/scripts/src/components/Carousel/CarouselItem.js +0 -15
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +0 -40
- package/dist/scripts/src/components/Carousel/CarouselNative.js +0 -195
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +0 -34
- package/dist/scripts/src/components/ChangeListener/ChangeListener.spec.js +0 -169
- package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +0 -30
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.js +0 -92
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.spec.js +0 -999
- package/dist/scripts/src/components/Charts/AreaChart/AreaChartNative.js +0 -127
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +0 -97
- package/dist/scripts/src/components/Charts/BarChart/BarChart.spec.js +0 -597
- package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +0 -317
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +0 -60
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.spec.js +0 -608
- package/dist/scripts/src/components/Charts/LabelList/LabelList.js +0 -41
- package/dist/scripts/src/components/Charts/LabelList/LabelList.spec.js +0 -539
- package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +0 -25
- package/dist/scripts/src/components/Charts/Legend/Legend.js +0 -33
- package/dist/scripts/src/components/Charts/Legend/Legend.spec.js +0 -558
- package/dist/scripts/src/components/Charts/Legend/LegendNative.js +0 -64
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +0 -94
- package/dist/scripts/src/components/Charts/LineChart/LineChart.spec.js +0 -450
- package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +0 -192
- package/dist/scripts/src/components/Charts/PieChart/PieChart.js +0 -64
- package/dist/scripts/src/components/Charts/PieChart/PieChart.spec.js +0 -584
- package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +0 -167
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.js +0 -92
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.spec.js +0 -571
- package/dist/scripts/src/components/Charts/RadarChart/RadarChartNative.js +0 -125
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +0 -27
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.spec.js +0 -451
- package/dist/scripts/src/components/Charts/utils/ChartProvider.js +0 -65
- package/dist/scripts/src/components/Charts/utils/abstractions.js +0 -26
- package/dist/scripts/src/components/Checkbox/Checkbox.js +0 -81
- package/dist/scripts/src/components/Checkbox/Checkbox.spec.js +0 -900
- package/dist/scripts/src/components/CodeBlock/CodeBlock.js +0 -42
- package/dist/scripts/src/components/CodeBlock/CodeBlock.spec.js +0 -196
- package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +0 -127
- package/dist/scripts/src/components/CodeBlock/highlight-code.js +0 -273
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +0 -54
- package/dist/scripts/src/components/ColorPicker/ColorPicker.spec.js +0 -355
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +0 -86
- package/dist/scripts/src/components/Column/Column.js +0 -89
- package/dist/scripts/src/components/Column/ColumnNative.js +0 -49
- package/dist/scripts/src/components/Column/TableContext.js +0 -12
- package/dist/scripts/src/components/Column/doc-resources/list-component-data.js +0 -53
- package/dist/scripts/src/components/ComponentProvider.js +0 -811
- package/dist/scripts/src/components/ComponentRegistryContext.js +0 -44
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +0 -51
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +0 -531
- package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +0 -31
- package/dist/scripts/src/components/DataSource/DataSource.js +0 -124
- package/dist/scripts/src/components/DateInput/DateInput.js +0 -197
- package/dist/scripts/src/components/DateInput/DateInput.spec.js +0 -1023
- package/dist/scripts/src/components/DateInput/DateInputNative.js +0 -734
- package/dist/scripts/src/components/DatePicker/DatePicker.js +0 -146
- package/dist/scripts/src/components/DatePicker/DatePicker.spec.js +0 -394
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +0 -326
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +0 -196
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +0 -331
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +0 -146
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +0 -26
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.spec.js +0 -29
- package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +0 -71
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +0 -101
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.spec.js +0 -435
- package/dist/scripts/src/components/ExpandableItem/ExpandableItemNative.js +0 -109
- package/dist/scripts/src/components/FileInput/FileInput.js +0 -80
- package/dist/scripts/src/components/FileInput/FileInput.spec.js +0 -285
- package/dist/scripts/src/components/FileInput/FileInputNative.js +0 -161
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +0 -58
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.spec.js +0 -296
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +0 -134
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +0 -65
- package/dist/scripts/src/components/FlowLayout/FlowLayout.spec.js +0 -518
- package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +0 -153
- package/dist/scripts/src/components/Footer/Footer.js +0 -45
- package/dist/scripts/src/components/Footer/Footer.spec.js +0 -991
- package/dist/scripts/src/components/Footer/FooterNative.js +0 -35
- package/dist/scripts/src/components/Form/Form.js +0 -161
- package/dist/scripts/src/components/Form/Form.spec.js +0 -1719
- package/dist/scripts/src/components/Form/FormContext.js +0 -124
- package/dist/scripts/src/components/Form/FormNative.js +0 -463
- package/dist/scripts/src/components/Form/formActions.js +0 -115
- package/dist/scripts/src/components/FormItem/FormItem.js +0 -231
- package/dist/scripts/src/components/FormItem/FormItem.spec.js +0 -1022
- package/dist/scripts/src/components/FormItem/FormItemNative.js +0 -255
- package/dist/scripts/src/components/FormItem/HelperText.js +0 -27
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +0 -52
- package/dist/scripts/src/components/FormItem/Validations.js +0 -389
- package/dist/scripts/src/components/FormSection/FormSection.js +0 -56
- package/dist/scripts/src/components/Fragment/Fragment.js +0 -24
- package/dist/scripts/src/components/Fragment/Fragment.spec.js +0 -50
- package/dist/scripts/src/components/Heading/H1.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H2.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H3.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H4.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H5.spec.js +0 -66
- package/dist/scripts/src/components/Heading/H6.spec.js +0 -66
- package/dist/scripts/src/components/Heading/Heading.js +0 -396
- package/dist/scripts/src/components/Heading/Heading.spec.js +0 -966
- package/dist/scripts/src/components/Heading/HeadingNative.js +0 -98
- package/dist/scripts/src/components/Heading/abstractions.js +0 -4
- package/dist/scripts/src/components/HoverCard/HoverCard.js +0 -18
- package/dist/scripts/src/components/HoverCard/HovercardNative.js +0 -44
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +0 -1441
- package/dist/scripts/src/components/HtmlTags/HtmlTags.spec.js +0 -69
- package/dist/scripts/src/components/IFrame/IFrame.js +0 -77
- package/dist/scripts/src/components/IFrame/IFrame.spec.js +0 -527
- package/dist/scripts/src/components/IFrame/IFrameNative.js +0 -46
- package/dist/scripts/src/components/Icon/AdmonitionDanger.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionInfo.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionNote.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionTip.js +0 -10
- package/dist/scripts/src/components/Icon/AdmonitionWarning.js +0 -10
- package/dist/scripts/src/components/Icon/ApiIcon.js +0 -10
- package/dist/scripts/src/components/Icon/ArrowDropDown.js +0 -11
- package/dist/scripts/src/components/Icon/ArrowDropUp.js +0 -11
- package/dist/scripts/src/components/Icon/ArrowLeft.js +0 -11
- package/dist/scripts/src/components/Icon/ArrowRight.js +0 -11
- package/dist/scripts/src/components/Icon/Attach.js +0 -10
- package/dist/scripts/src/components/Icon/Binding.js +0 -11
- package/dist/scripts/src/components/Icon/BoardIcon.js +0 -7
- package/dist/scripts/src/components/Icon/BoxIcon.js +0 -10
- package/dist/scripts/src/components/Icon/CheckIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronDownIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronLeft.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronRight.js +0 -7
- package/dist/scripts/src/components/Icon/ChevronUpIcon.js +0 -7
- package/dist/scripts/src/components/Icon/CodeFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/CodeSandbox.js +0 -10
- package/dist/scripts/src/components/Icon/CompactListIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ContentCopyIcon.js +0 -7
- package/dist/scripts/src/components/Icon/DarkToLightIcon.js +0 -10
- package/dist/scripts/src/components/Icon/DatabaseIcon.js +0 -11
- package/dist/scripts/src/components/Icon/DocFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/DocIcon.js +0 -10
- package/dist/scripts/src/components/Icon/DotMenuHorizontalIcon.js +0 -7
- package/dist/scripts/src/components/Icon/DotMenuIcon.js +0 -7
- package/dist/scripts/src/components/Icon/EmailIcon.js +0 -7
- package/dist/scripts/src/components/Icon/EmptyFolderIcon.js +0 -10
- package/dist/scripts/src/components/Icon/ErrorIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ExpressionIcon.js +0 -10
- package/dist/scripts/src/components/Icon/FillPlusCricleIcon.js +0 -7
- package/dist/scripts/src/components/Icon/FilterIcon.js +0 -10
- package/dist/scripts/src/components/Icon/FolderIcon.js +0 -10
- package/dist/scripts/src/components/Icon/GlobeIcon.js +0 -7
- package/dist/scripts/src/components/Icon/HomeIcon.js +0 -7
- package/dist/scripts/src/components/Icon/HyperLinkIcon.js +0 -7
- package/dist/scripts/src/components/Icon/Icon.js +0 -42
- package/dist/scripts/src/components/Icon/Icon.spec.js +0 -527
- package/dist/scripts/src/components/Icon/IconNative.js +0 -127
- package/dist/scripts/src/components/Icon/ImageFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/Inspect.js +0 -10
- package/dist/scripts/src/components/Icon/LightToDark.js +0 -10
- package/dist/scripts/src/components/Icon/LinkIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ListIcon.js +0 -7
- package/dist/scripts/src/components/Icon/LooseListIcon.js +0 -7
- package/dist/scripts/src/components/Icon/MoonIcon.js +0 -10
- package/dist/scripts/src/components/Icon/MoreOptionsIcon.js +0 -7
- package/dist/scripts/src/components/Icon/NoSortIcon.js +0 -8
- package/dist/scripts/src/components/Icon/PDFIcon.js +0 -10
- package/dist/scripts/src/components/Icon/PenIcon.js +0 -7
- package/dist/scripts/src/components/Icon/PhoneIcon.js +0 -7
- package/dist/scripts/src/components/Icon/PhotoIcon.js +0 -10
- package/dist/scripts/src/components/Icon/PlusIcon.js +0 -7
- package/dist/scripts/src/components/Icon/SearchIcon.js +0 -7
- package/dist/scripts/src/components/Icon/ShareIcon.js +0 -10
- package/dist/scripts/src/components/Icon/SortAscendingIcon.js +0 -8
- package/dist/scripts/src/components/Icon/SortDescendingIcon.js +0 -8
- package/dist/scripts/src/components/Icon/StarsIcon.js +0 -10
- package/dist/scripts/src/components/Icon/SunIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TableDeleteColumnIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TableDeleteRowIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TableInsertColumnIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TableInsertRowIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TrashIcon.js +0 -7
- package/dist/scripts/src/components/Icon/TrendingDownIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TrendingLevelIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TrendingUpIcon.js +0 -10
- package/dist/scripts/src/components/Icon/TxtIcon.js +0 -10
- package/dist/scripts/src/components/Icon/UnknownFileIcon.js +0 -10
- package/dist/scripts/src/components/Icon/UnlinkIcon.js +0 -10
- package/dist/scripts/src/components/Icon/UserIcon.js +0 -7
- package/dist/scripts/src/components/Icon/WarningIcon.js +0 -7
- package/dist/scripts/src/components/Icon/XlsIcon.js +0 -10
- package/dist/scripts/src/components/IconProvider.js +0 -300
- package/dist/scripts/src/components/IconRegistryContext.js +0 -318
- package/dist/scripts/src/components/Image/Image.js +0 -52
- package/dist/scripts/src/components/Image/Image.spec.js +0 -198
- package/dist/scripts/src/components/Image/ImageNative.js +0 -73
- package/dist/scripts/src/components/Input/InputAdornment.js +0 -28
- package/dist/scripts/src/components/Input/InputDivider.js +0 -35
- package/dist/scripts/src/components/Input/InputLabel.js +0 -25
- package/dist/scripts/src/components/Input/PartialInput.js +0 -155
- package/dist/scripts/src/components/Input/index.js +0 -5
- package/dist/scripts/src/components/InspectButton/InspectButton.js +0 -35
- package/dist/scripts/src/components/Items/Items.js +0 -39
- package/dist/scripts/src/components/Items/Items.spec.js +0 -397
- package/dist/scripts/src/components/Items/ItemsNative.js +0 -33
- package/dist/scripts/src/components/Link/Link.js +0 -82
- package/dist/scripts/src/components/Link/Link.spec.js +0 -894
- package/dist/scripts/src/components/Link/LinkNative.js +0 -48
- package/dist/scripts/src/components/List/List.js +0 -130
- package/dist/scripts/src/components/List/List.spec.js +0 -927
- package/dist/scripts/src/components/List/ListNative.js +0 -433
- package/dist/scripts/src/components/List/doc-resources/list-component-data.js +0 -53
- package/dist/scripts/src/components/Logo/Logo.js +0 -30
- package/dist/scripts/src/components/Logo/LogoNative.js +0 -32
- package/dist/scripts/src/components/Markdown/CodeText.js +0 -38
- package/dist/scripts/src/components/Markdown/Markdown.js +0 -143
- package/dist/scripts/src/components/Markdown/Markdown.spec.js +0 -188
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +0 -476
- package/dist/scripts/src/components/Markdown/parse-binding-expr.js +0 -60
- package/dist/scripts/src/components/Markdown/utils.js +0 -389
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +0 -111
- package/dist/scripts/src/components/ModalDialog/Dialog.js +0 -20
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +0 -83
- package/dist/scripts/src/components/ModalDialog/ModalDialog.spec.js +0 -181
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +0 -217
- package/dist/scripts/src/components/ModalDialog/ModalVisibilityContext.js +0 -60
- package/dist/scripts/src/components/NavGroup/NavGroup.js +0 -70
- package/dist/scripts/src/components/NavGroup/NavGroup.spec.js +0 -304
- package/dist/scripts/src/components/NavGroup/NavGroupContext.js +0 -13
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +0 -133
- package/dist/scripts/src/components/NavLink/NavLink.js +0 -86
- package/dist/scripts/src/components/NavLink/NavLink.spec.js +0 -864
- package/dist/scripts/src/components/NavLink/NavLinkNative.js +0 -73
- package/dist/scripts/src/components/NavPanel/NavPanel.js +0 -53
- package/dist/scripts/src/components/NavPanel/NavPanel.spec.js +0 -864
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +0 -222
- package/dist/scripts/src/components/NestedApp/AppWithCodeView.js +0 -91
- package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +0 -84
- package/dist/scripts/src/components/NestedApp/NestedApp.js +0 -86
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +0 -231
- package/dist/scripts/src/components/NestedApp/Tooltip.js +0 -46
- package/dist/scripts/src/components/NestedApp/defaultProps.js +0 -12
- package/dist/scripts/src/components/NestedApp/utils.js +0 -67
- package/dist/scripts/src/components/NoResult/NoResult.js +0 -46
- package/dist/scripts/src/components/NoResult/NoResult.spec.js +0 -863
- package/dist/scripts/src/components/NoResult/NoResultNative.js +0 -31
- package/dist/scripts/src/components/NumberBox/NumberBox.js +0 -123
- package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +0 -979
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +0 -513
- package/dist/scripts/src/components/NumberBox/numberbox-abstractions.js +0 -109
- package/dist/scripts/src/components/Option/Option.js +0 -44
- package/dist/scripts/src/components/Option/Option.spec.js +0 -474
- package/dist/scripts/src/components/Option/OptionNative.js +0 -29
- package/dist/scripts/src/components/Option/OptionTypeProvider.js +0 -16
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +0 -13
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +0 -22
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.spec.js +0 -80
- package/dist/scripts/src/components/Pages/Pages.js +0 -54
- package/dist/scripts/src/components/Pages/PagesNative.js +0 -57
- package/dist/scripts/src/components/Pagination/Pagination.js +0 -107
- package/dist/scripts/src/components/Pagination/Pagination.spec.js +0 -1008
- package/dist/scripts/src/components/Pagination/PaginationNative.js +0 -157
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +0 -24
- package/dist/scripts/src/components/PositionedContainer/PositionedContainerNative.js +0 -14
- package/dist/scripts/src/components/ProfileMenu/ProfileMenu.js +0 -20
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +0 -38
- package/dist/scripts/src/components/ProgressBar/ProgressBar.spec.js +0 -166
- package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +0 -28
- package/dist/scripts/src/components/Queue/Queue.js +0 -85
- package/dist/scripts/src/components/Queue/Queue.spec.js +0 -624
- package/dist/scripts/src/components/Queue/QueueNative.js +0 -342
- package/dist/scripts/src/components/Queue/queueActions.js +0 -87
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +0 -61
- package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +0 -490
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +0 -158
- package/dist/scripts/src/components/RadioGroup/RadioItem.js +0 -28
- package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +0 -62
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +0 -24
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +0 -135
- package/dist/scripts/src/components/Redirect/Redirect.js +0 -31
- package/dist/scripts/src/components/Redirect/Redirect.spec.js +0 -527
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBar.js +0 -60
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBar.spec.js +0 -76
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBarNative.js +0 -313
- package/dist/scripts/src/components/Select/HiddenOption.js +0 -20
- package/dist/scripts/src/components/Select/OptionContext.js +0 -12
- package/dist/scripts/src/components/Select/Select.js +0 -131
- package/dist/scripts/src/components/Select/Select.spec.js +0 -763
- package/dist/scripts/src/components/Select/SelectContext.js +0 -16
- package/dist/scripts/src/components/Select/SelectNative.js +0 -440
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +0 -25
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +0 -103
- package/dist/scripts/src/components/Slider/Slider.js +0 -115
- package/dist/scripts/src/components/Slider/Slider.spec.js +0 -677
- package/dist/scripts/src/components/Slider/SliderNative.js +0 -237
- package/dist/scripts/src/components/Slot/Slot.js +0 -17
- package/dist/scripts/src/components/Slot/Slot.spec.js +0 -368
- package/dist/scripts/src/components/SlotItem.js +0 -32
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +0 -20
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.spec.js +0 -184
- package/dist/scripts/src/components/SpaceFiller/SpaceFillerNative.js +0 -10
- package/dist/scripts/src/components/Spinner/Spinner.js +0 -39
- package/dist/scripts/src/components/Spinner/Spinner.spec.js +0 -161
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +0 -48
- package/dist/scripts/src/components/Splitter/HSplitter.spec.js +0 -104
- package/dist/scripts/src/components/Splitter/Splitter.js +0 -163
- package/dist/scripts/src/components/Splitter/Splitter.spec.js +0 -856
- package/dist/scripts/src/components/Splitter/SplitterNative.js +0 -205
- package/dist/scripts/src/components/Splitter/VSplitter.spec.js +0 -104
- package/dist/scripts/src/components/Splitter/utils.js +0 -22
- package/dist/scripts/src/components/Stack/CHStack.spec.js +0 -86
- package/dist/scripts/src/components/Stack/CVStack.spec.js +0 -86
- package/dist/scripts/src/components/Stack/HStack.spec.js +0 -67
- package/dist/scripts/src/components/Stack/Stack.js +0 -156
- package/dist/scripts/src/components/Stack/Stack.spec.js +0 -654
- package/dist/scripts/src/components/Stack/StackNative.js +0 -45
- package/dist/scripts/src/components/Stack/VStack.spec.js +0 -67
- package/dist/scripts/src/components/StickyBox/StickyBox.js +0 -34
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +0 -42
- package/dist/scripts/src/components/Switch/Switch.js +0 -80
- package/dist/scripts/src/components/Switch/Switch.spec.js +0 -834
- package/dist/scripts/src/components/Table/Table.js +0 -268
- package/dist/scripts/src/components/Table/Table.spec.js +0 -827
- package/dist/scripts/src/components/Table/TableNative.js +0 -670
- package/dist/scripts/src/components/Table/doc-resources/list-component-data.js +0 -53
- package/dist/scripts/src/components/Table/useRowSelection.js +0 -454
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +0 -76
- package/dist/scripts/src/components/TableOfContents/TableOfContents.spec.js +0 -838
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +0 -81
- package/dist/scripts/src/components/Tabs/TabContext.js +0 -58
- package/dist/scripts/src/components/Tabs/TabItem.js +0 -44
- package/dist/scripts/src/components/Tabs/TabItemNative.js +0 -53
- package/dist/scripts/src/components/Tabs/Tabs.js +0 -95
- package/dist/scripts/src/components/Tabs/Tabs.spec.js +0 -1237
- package/dist/scripts/src/components/Tabs/TabsNative.js +0 -137
- package/dist/scripts/src/components/Text/Text.js +0 -181
- package/dist/scripts/src/components/Text/Text.spec.js +0 -1676
- package/dist/scripts/src/components/Text/TextNative.js +0 -244
- package/dist/scripts/src/components/TextArea/TextArea.js +0 -103
- package/dist/scripts/src/components/TextArea/TextArea.spec.js +0 -886
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +0 -196
- package/dist/scripts/src/components/TextArea/TextAreaResizable.js +0 -73
- package/dist/scripts/src/components/TextArea/useComposedRef.js +0 -60
- package/dist/scripts/src/components/TextBox/TextBox.js +0 -133
- package/dist/scripts/src/components/TextBox/TextBox.spec.js +0 -758
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +0 -142
- package/dist/scripts/src/components/Theme/NotificationToast.js +0 -64
- package/dist/scripts/src/components/Theme/Theme.js +0 -47
- package/dist/scripts/src/components/Theme/Theme.spec.js +0 -390
- package/dist/scripts/src/components/Theme/ThemeNative.js +0 -162
- package/dist/scripts/src/components/TimeInput/TimeInput.js +0 -149
- package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +0 -1236
- package/dist/scripts/src/components/TimeInput/TimeInputNative.js +0 -650
- package/dist/scripts/src/components/TimeInput/utils.js +0 -197
- package/dist/scripts/src/components/Timer/Timer.js +0 -62
- package/dist/scripts/src/components/Timer/Timer.spec.js +0 -328
- package/dist/scripts/src/components/Timer/TimerNative.js +0 -178
- package/dist/scripts/src/components/Toggle/Toggle.js +0 -172
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +0 -63
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.spec.js +0 -414
- package/dist/scripts/src/components/ToneSwitch/ToneSwitch.js +0 -51
- package/dist/scripts/src/components/ToneSwitch/ToneSwitch.spec.js +0 -89
- package/dist/scripts/src/components/ToneSwitch/ToneSwitchNative.js +0 -42
- package/dist/scripts/src/components/Tooltip/Tooltip.js +0 -118
- package/dist/scripts/src/components/Tooltip/Tooltip.spec.js +0 -418
- package/dist/scripts/src/components/Tooltip/TooltipNative.js +0 -160
- package/dist/scripts/src/components/Tree/Tree-dynamic.spec.js +0 -2894
- package/dist/scripts/src/components/Tree/Tree-icons.spec.js +0 -206
- package/dist/scripts/src/components/Tree/Tree.spec.js +0 -2839
- package/dist/scripts/src/components/Tree/TreeComponent.js +0 -324
- package/dist/scripts/src/components/Tree/TreeNative.js +0 -1129
- package/dist/scripts/src/components/Tree/testData.js +0 -296
- package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +0 -49
- package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +0 -104
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +0 -64
- package/dist/scripts/src/components/VisuallyHidden.js +0 -21
- package/dist/scripts/src/components/abstractions.js +0 -341
- package/dist/scripts/src/components/chart-color-schemes.js +0 -43
- package/dist/scripts/src/components/collectedComponentMetadata.js +0 -316
- package/dist/scripts/src/components/component-utils.js +0 -29
- package/dist/scripts/src/components/container-helpers.js +0 -26
- package/dist/scripts/src/components/metadata-helpers.js +0 -269
- package/dist/scripts/src/components-core/ApiBoundComponent.js +0 -227
- package/dist/scripts/src/components-core/AppContext.js +0 -16
- package/dist/scripts/src/components-core/ComponentDecorator.js +0 -74
- package/dist/scripts/src/components-core/ComponentViewer.js +0 -69
- package/dist/scripts/src/components-core/CompoundComponent.js +0 -145
- package/dist/scripts/src/components-core/DebugViewProvider.js +0 -43
- package/dist/scripts/src/components-core/EngineError.js +0 -91
- package/dist/scripts/src/components-core/InspectorContext.js +0 -248
- package/dist/scripts/src/components-core/LoaderComponent.js +0 -109
- package/dist/scripts/src/components-core/RestApiProxy.js +0 -468
- package/dist/scripts/src/components-core/StandaloneApp.js +0 -821
- package/dist/scripts/src/components-core/StandaloneExtensionManager.js +0 -44
- package/dist/scripts/src/components-core/TableOfContentsContext.js +0 -168
- package/dist/scripts/src/components-core/abstractions/ComponentRenderer.js +0 -2
- package/dist/scripts/src/components-core/abstractions/LoaderRenderer.js +0 -2
- package/dist/scripts/src/components-core/abstractions/standalone.js +0 -2
- package/dist/scripts/src/components-core/abstractions/treeAbstractions.js +0 -2
- package/dist/scripts/src/components-core/action/APICall.js +0 -284
- package/dist/scripts/src/components-core/action/FileDownloadAction.js +0 -80
- package/dist/scripts/src/components-core/action/FileUploadAction.js +0 -88
- package/dist/scripts/src/components-core/action/NavigateAction.js +0 -20
- package/dist/scripts/src/components-core/action/TimedAction.js +0 -21
- package/dist/scripts/src/components-core/action/actions.js +0 -15
- package/dist/scripts/src/components-core/appContext/date-functions.js +0 -24
- package/dist/scripts/src/components-core/appContext/math-function.js +0 -27
- package/dist/scripts/src/components-core/appContext/misc-utils.js +0 -14
- package/dist/scripts/src/components-core/behaviors/Behavior.js +0 -2
- package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +0 -201
- package/dist/scripts/src/components-core/component-hooks.js +0 -25
- package/dist/scripts/src/components-core/constants.js +0 -18
- package/dist/scripts/src/components-core/descriptorHelper.js +0 -96
- package/dist/scripts/src/components-core/devtools/InspectorDialog.js +0 -135
- package/dist/scripts/src/components-core/devtools/InspectorDialogVisibilityContext.js +0 -8
- package/dist/scripts/src/components-core/event-handlers.js +0 -46
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +0 -247
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +0 -167
- package/dist/scripts/src/components-core/interception/Backend.js +0 -141
- package/dist/scripts/src/components-core/interception/Errors.js +0 -129
- package/dist/scripts/src/components-core/interception/InMemoryDb.js +0 -41
- package/dist/scripts/src/components-core/interception/IndexedDb.js +0 -205
- package/dist/scripts/src/components-core/interception/ReadonlyCollection.js +0 -145
- package/dist/scripts/src/components-core/interception/abstractions.js +0 -2
- package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +0 -44
- package/dist/scripts/src/components-core/interception/initMock.js +0 -20
- package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +0 -9
- package/dist/scripts/src/components-core/loader/ApiLoader.js +0 -54
- package/dist/scripts/src/components-core/loader/DataLoader.js +0 -330
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +0 -60
- package/dist/scripts/src/components-core/loader/Loader.js +0 -159
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +0 -43
- package/dist/scripts/src/components-core/loader/PageableLoader.js +0 -272
- package/dist/scripts/src/components-core/markup-check.js +0 -279
- package/dist/scripts/src/components-core/parts.js +0 -11
- package/dist/scripts/src/components-core/renderers.js +0 -76
- package/dist/scripts/src/components-core/rendering/AppContent.js +0 -400
- package/dist/scripts/src/components-core/rendering/AppRoot.js +0 -87
- package/dist/scripts/src/components-core/rendering/AppWrapper.js +0 -49
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +0 -380
- package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +0 -166
- package/dist/scripts/src/components-core/rendering/Container.js +0 -621
- package/dist/scripts/src/components-core/rendering/ContainerWrapper.js +0 -94
- package/dist/scripts/src/components-core/rendering/ErrorBoundary.js +0 -65
- package/dist/scripts/src/components-core/rendering/InvalidComponent.js +0 -17
- package/dist/scripts/src/components-core/rendering/StandaloneComponent.js +0 -39
- package/dist/scripts/src/components-core/rendering/StateContainer.js +0 -350
- package/dist/scripts/src/components-core/rendering/UnknownComponent.js +0 -15
- package/dist/scripts/src/components-core/rendering/buildProxy.js +0 -58
- package/dist/scripts/src/components-core/rendering/collectFnVarDeps.js +0 -49
- package/dist/scripts/src/components-core/rendering/containers.js +0 -19
- package/dist/scripts/src/components-core/rendering/nodeUtils.js +0 -6
- package/dist/scripts/src/components-core/rendering/reducer.js +0 -160
- package/dist/scripts/src/components-core/rendering/renderChild.js +0 -82
- package/dist/scripts/src/components-core/rendering/valueExtractor.js +0 -216
- package/dist/scripts/src/components-core/reportEngineError.js +0 -62
- package/dist/scripts/src/components-core/script-runner/AttributeValueParser.js +0 -117
- package/dist/scripts/src/components-core/script-runner/BindingTreeEvaluationContext.js +0 -33
- package/dist/scripts/src/components-core/script-runner/ParameterParser.js +0 -117
- package/dist/scripts/src/components-core/script-runner/ScriptingSourceTree.js +0 -45
- package/dist/scripts/src/components-core/script-runner/asyncProxy.js +0 -96
- package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +0 -34
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +0 -613
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +0 -439
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +0 -522
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +0 -761
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +0 -208
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +0 -746
- package/dist/scripts/src/components-core/script-runner/simplify-expression.js +0 -386
- package/dist/scripts/src/components-core/script-runner/statement-queue.js +0 -63
- package/dist/scripts/src/components-core/script-runner/visitors.js +0 -369
- package/dist/scripts/src/components-core/theming/StyleContext.js +0 -133
- package/dist/scripts/src/components-core/theming/StyleRegistry.js +0 -171
- package/dist/scripts/src/components-core/theming/ThemeContext.js +0 -53
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +0 -342
- package/dist/scripts/src/components-core/theming/component-layout-resolver.js +0 -153
- package/dist/scripts/src/components-core/theming/extendThemeUtils.js +0 -47
- package/dist/scripts/src/components-core/theming/hvar.js +0 -105
- package/dist/scripts/src/components-core/theming/layout-resolver.js +0 -388
- package/dist/scripts/src/components-core/theming/parse-layout-props.js +0 -136
- package/dist/scripts/src/components-core/theming/themeVars.js +0 -62
- package/dist/scripts/src/components-core/theming/themes/base-utils.js +0 -15
- package/dist/scripts/src/components-core/theming/themes/palette.js +0 -57
- package/dist/scripts/src/components-core/theming/themes/root.js +0 -434
- package/dist/scripts/src/components-core/theming/themes/solid.js +0 -16
- package/dist/scripts/src/components-core/theming/themes/theme-colors.js +0 -561
- package/dist/scripts/src/components-core/theming/themes/xmlui.js +0 -57
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +0 -733
- package/dist/scripts/src/components-core/theming/utils.js +0 -31
- package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +0 -41
- package/dist/scripts/src/components-core/utils/LruCache.js +0 -184
- package/dist/scripts/src/components-core/utils/actionUtils.js +0 -32
- package/dist/scripts/src/components-core/utils/audio-utils.js +0 -83
- package/dist/scripts/src/components-core/utils/base64-utils.js +0 -124
- package/dist/scripts/src/components-core/utils/compound-utils.js +0 -11
- package/dist/scripts/src/components-core/utils/css-utils.js +0 -179
- package/dist/scripts/src/components-core/utils/date-utils.js +0 -186
- package/dist/scripts/src/components-core/utils/extractParam.js +0 -281
- package/dist/scripts/src/components-core/utils/hooks.js +0 -400
- package/dist/scripts/src/components-core/utils/mergeProps.js +0 -45
- package/dist/scripts/src/components-core/utils/misc.js +0 -539
- package/dist/scripts/src/components-core/utils/request-params.js +0 -70
- package/dist/scripts/src/components-core/utils/statementUtils.js +0 -224
- package/dist/scripts/src/components-core/utils/treeUtils.js +0 -226
- package/dist/scripts/src/components-core/xmlui-parser.js +0 -548
- package/dist/scripts/src/index-standalone.js +0 -61
- package/dist/scripts/src/index.js +0 -158
- package/dist/scripts/src/language-server/server-common.js +0 -152
- package/dist/scripts/src/language-server/server-web-worker.js +0 -47
- package/dist/scripts/src/language-server/server.js +0 -42
- package/dist/scripts/src/language-server/services/common/docs-generation.js +0 -73
- package/dist/scripts/src/language-server/services/common/lsp-utils.js +0 -9
- package/dist/scripts/src/language-server/services/common/metadata-utils.js +0 -157
- package/dist/scripts/src/language-server/services/common/syntax-node-utilities.js +0 -127
- package/dist/scripts/src/language-server/services/completion.js +0 -288
- package/dist/scripts/src/language-server/services/diagnostic.js +0 -19
- package/dist/scripts/src/language-server/services/format.js +0 -569
- package/dist/scripts/src/language-server/services/hover.js +0 -164
- package/dist/scripts/src/language-server/xmlui-metadata-generated.js +0 -16276
- package/dist/scripts/src/logging/LoggerContext.js +0 -22
- package/dist/scripts/src/logging/LoggerInitializer.js +0 -14
- package/dist/scripts/src/logging/LoggerService.js +0 -60
- package/dist/scripts/src/logging/xmlui.js +0 -21
- package/dist/scripts/src/parsers/common/GenericToken.js +0 -2
- package/dist/scripts/src/parsers/common/InputStream.js +0 -59
- package/dist/scripts/src/parsers/common/utils.js +0 -19
- package/dist/scripts/src/parsers/scripting/Lexer.js +0 -1097
- package/dist/scripts/src/parsers/scripting/Parser.js +0 -2638
- package/dist/scripts/src/parsers/scripting/ParserError.js +0 -47
- package/dist/scripts/src/parsers/scripting/ScriptingNodeTypes.js +0 -50
- package/dist/scripts/src/parsers/scripting/TokenTrait.js +0 -108
- package/dist/scripts/src/parsers/scripting/TokenType.js +0 -109
- package/dist/scripts/src/parsers/scripting/code-behind-collect.js +0 -101
- package/dist/scripts/src/parsers/scripting/modules.js +0 -105
- package/dist/scripts/src/parsers/scripting/tree-visitor.js +0 -601
- package/dist/scripts/src/parsers/style-parser/StyleInputStream.js +0 -39
- package/dist/scripts/src/parsers/style-parser/StyleLexer.js +0 -623
- package/dist/scripts/src/parsers/style-parser/StyleParser.js +0 -453
- package/dist/scripts/src/parsers/style-parser/errors.js +0 -37
- package/dist/scripts/src/parsers/style-parser/source-tree.js +0 -2
- package/dist/scripts/src/parsers/style-parser/tokens.js +0 -43
- package/dist/scripts/src/parsers/xmlui-parser/CharacterCodes.js +0 -136
- package/dist/scripts/src/parsers/xmlui-parser/ParserError.js +0 -60
- package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +0 -172
- package/dist/scripts/src/parsers/xmlui-parser/fileExtensions.js +0 -6
- package/dist/scripts/src/parsers/xmlui-parser/index.js +0 -29
- package/dist/scripts/src/parsers/xmlui-parser/lint.js +0 -165
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +0 -627
- package/dist/scripts/src/parsers/xmlui-parser/scanner.js +0 -415
- package/dist/scripts/src/parsers/xmlui-parser/syntax-kind.js +0 -123
- package/dist/scripts/src/parsers/xmlui-parser/syntax-node.js +0 -83
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +0 -1131
- package/dist/scripts/src/parsers/xmlui-parser/utils.js +0 -83
- package/dist/scripts/src/parsers/xmlui-parser/xmlui-serializer.js +0 -582
- package/dist/scripts/src/parsers/xmlui-parser/xmlui-tree.js +0 -2
- package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +0 -286
- package/dist/scripts/src/syntax/monaco/index.js +0 -14
- package/dist/scripts/src/syntax/monaco/xmlui-dark.js +0 -25
- package/dist/scripts/src/syntax/monaco/xmlui-light.js +0 -25
- package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +0 -310
- package/dist/scripts/src/syntax/textMate/index.js +0 -14
- package/dist/scripts/src/syntax/textMate/xmlui-dark.json +0 -631
- package/dist/scripts/src/syntax/textMate/xmlui-light.json +0 -565
- package/dist/scripts/src/syntax/textMate/xmlui.json +0 -564
- package/dist/scripts/src/syntax/textMate/xmlui.tmLanguage.json +0 -341
- package/dist/scripts/src/testing/ComponentDrivers.js +0 -1380
- package/dist/scripts/src/testing/assertions.js +0 -444
- package/dist/scripts/src/testing/component-test-helpers.js +0 -373
- package/dist/scripts/src/testing/drivers/DateInputDriver.js +0 -19
- package/dist/scripts/src/testing/drivers/ModalDialogDriver.js +0 -10
- package/dist/scripts/src/testing/drivers/NumberBoxDriver.js +0 -44
- package/dist/scripts/src/testing/drivers/TextBoxDriver.js +0 -20
- package/dist/scripts/src/testing/drivers/TimeInputDriver.js +0 -22
- package/dist/scripts/src/testing/drivers/TimerDriver.js +0 -64
- package/dist/scripts/src/testing/drivers/TreeDriver.js +0 -13
- package/dist/scripts/src/testing/drivers/index.js +0 -9
- package/dist/scripts/src/testing/fixtures.js +0 -519
- package/dist/scripts/src/testing/index.js +0 -69
- package/dist/scripts/src/testing/infrastructure/TestBed.js +0 -17
- package/dist/scripts/src/testing/infrastructure/main.js +0 -9
- package/dist/scripts/src/testing/infrastructure/public/mockServiceWorker.js +0 -266
- package/dist/scripts/src/testing/themed-app-test-helpers.js +0 -133
|
@@ -1,650 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.TimeInputNative = exports.defaultProps = void 0;
|
|
18
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
-
const react_1 = require("react");
|
|
20
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
-
const TimeInput_module_scss_1 = __importDefault(require("./TimeInput.module.scss"));
|
|
22
|
-
const PartialInput_1 = require("../Input/PartialInput");
|
|
23
|
-
const InputDivider_1 = require("../Input/InputDivider");
|
|
24
|
-
const misc_1 = require("../../components-core/utils/misc");
|
|
25
|
-
const InputAdornment_1 = require("../Input/InputAdornment");
|
|
26
|
-
const IconNative_1 = __importDefault(require("../Icon/IconNative"));
|
|
27
|
-
// Import utilities and types from merged utils file
|
|
28
|
-
const utils_1 = require("./utils");
|
|
29
|
-
// Component part names
|
|
30
|
-
const PART_HOUR = "hour";
|
|
31
|
-
const PART_MINUTE = "minute";
|
|
32
|
-
const PART_SECOND = "second";
|
|
33
|
-
const PART_AMPM = "ampm";
|
|
34
|
-
const PART_CLEAR_BUTTON = "clearButton";
|
|
35
|
-
exports.defaultProps = {
|
|
36
|
-
enabled: true,
|
|
37
|
-
validationStatus: "none",
|
|
38
|
-
hour24: true,
|
|
39
|
-
seconds: false,
|
|
40
|
-
clearable: false,
|
|
41
|
-
clearToInitialValue: true,
|
|
42
|
-
required: false,
|
|
43
|
-
readOnly: false,
|
|
44
|
-
autoFocus: false,
|
|
45
|
-
emptyCharacter: "-",
|
|
46
|
-
};
|
|
47
|
-
exports.TimeInputNative = (0, react_1.forwardRef)(function TimeInputNative(_a, ref) {
|
|
48
|
-
var { id, initialValue, value: controlledValue, enabled = exports.defaultProps.enabled, updateState, style, className, onDidChange, onFocus, onBlur, onInvalidChange, validationStatus = exports.defaultProps.validationStatus, registerComponentApi, hour24 = exports.defaultProps.hour24, seconds = exports.defaultProps.seconds, minTime, maxTime, clearable = exports.defaultProps.clearable, clearIcon, clearToInitialValue = exports.defaultProps.clearToInitialValue, required = exports.defaultProps.required, startText, startIcon, endText, endIcon, gap, readOnly = exports.defaultProps.readOnly, autoFocus = exports.defaultProps.autoFocus, emptyCharacter = exports.defaultProps.emptyCharacter } = _a, rest = __rest(_a, ["id", "initialValue", "value", "enabled", "updateState", "style", "className", "onDidChange", "onFocus", "onBlur", "onInvalidChange", "validationStatus", "registerComponentApi", "hour24", "seconds", "minTime", "maxTime", "clearable", "clearIcon", "clearToInitialValue", "required", "startText", "startIcon", "endText", "endIcon", "gap", "readOnly", "autoFocus", "emptyCharacter"]);
|
|
49
|
-
const timeInputRef = (0, react_1.useRef)(null);
|
|
50
|
-
// Refs for auto-tabbing between inputs
|
|
51
|
-
const hourInputRef = (0, react_1.useRef)(null);
|
|
52
|
-
const minuteInputRef = (0, react_1.useRef)(null);
|
|
53
|
-
const secondInputRef = (0, react_1.useRef)(null);
|
|
54
|
-
const amPmButtonRef = (0, react_1.useRef)(null);
|
|
55
|
-
// Process emptyCharacter according to requirements
|
|
56
|
-
const processedEmptyCharacter = (0, react_1.useMemo)(() => {
|
|
57
|
-
if (!emptyCharacter || emptyCharacter.length === 0) {
|
|
58
|
-
return "-";
|
|
59
|
-
}
|
|
60
|
-
if (emptyCharacter.length > 1) {
|
|
61
|
-
return emptyCharacter.charAt(0);
|
|
62
|
-
}
|
|
63
|
-
return emptyCharacter;
|
|
64
|
-
}, [emptyCharacter]);
|
|
65
|
-
// Stabilize initialValue to prevent unnecessary re-renders
|
|
66
|
-
const stableInitialValue = (0, react_1.useMemo)(() => {
|
|
67
|
-
return initialValue;
|
|
68
|
-
}, [initialValue]);
|
|
69
|
-
// Local state management - sync with value prop (like TextBox and NumberBox)
|
|
70
|
-
const [localValue, setLocalValue] = (0, react_1.useState)(() => {
|
|
71
|
-
const initial = controlledValue || stableInitialValue || null;
|
|
72
|
-
return initial;
|
|
73
|
-
});
|
|
74
|
-
// Parse current value into individual components
|
|
75
|
-
const [amPm, setAmPm] = (0, react_1.useState)(null);
|
|
76
|
-
const [hour, setHour] = (0, react_1.useState)(null);
|
|
77
|
-
const [minute, setMinute] = (0, react_1.useState)(null);
|
|
78
|
-
const [second, setSecond] = (0, react_1.useState)(null);
|
|
79
|
-
// Track whether the component currently has focus
|
|
80
|
-
const [componentHasFocus, setComponentHasFocus] = (0, react_1.useState)(false);
|
|
81
|
-
// State to track invalid status for visual feedback
|
|
82
|
-
const [isHourCurrentlyInvalid, setIsHourCurrentlyInvalid] = (0, react_1.useState)(false);
|
|
83
|
-
const [isMinuteCurrentlyInvalid, setIsMinuteCurrentlyInvalid] = (0, react_1.useState)(false);
|
|
84
|
-
const [isSecondCurrentlyInvalid, setIsSecondCurrentlyInvalid] = (0, react_1.useState)(false);
|
|
85
|
-
(0, react_1.useEffect)(() => {
|
|
86
|
-
// Initialize XMLUI state with initial value on first mount
|
|
87
|
-
if (updateState && stableInitialValue !== undefined && controlledValue === undefined) {
|
|
88
|
-
updateState({ value: stableInitialValue }, { initial: true });
|
|
89
|
-
return; // Don't sync on this first run, let the state update trigger a re-render
|
|
90
|
-
}
|
|
91
|
-
// Sync with controlled value - always sync when controlledValue changes
|
|
92
|
-
const newLocalValue = controlledValue || null;
|
|
93
|
-
setLocalValue(newLocalValue);
|
|
94
|
-
}, [controlledValue, stableInitialValue, updateState]);
|
|
95
|
-
// Determine what components to show based on flags
|
|
96
|
-
const is12HourFormat = !hour24;
|
|
97
|
-
const showSeconds = seconds;
|
|
98
|
-
const showLeadingZeros = hour24; // Always show leading zeros in 24-hour format
|
|
99
|
-
// Parse value into individual components
|
|
100
|
-
(0, react_1.useEffect)(() => {
|
|
101
|
-
if (localValue) {
|
|
102
|
-
const { amPm: parsedAmPm, hour: hourStr, minute: minuteStr, second: secondStr, } = parseTimeString(localValue, is12HourFormat);
|
|
103
|
-
setAmPm(parsedAmPm);
|
|
104
|
-
setHour(hourStr);
|
|
105
|
-
setMinute(minuteStr);
|
|
106
|
-
setSecond(secondStr);
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
setAmPm(null);
|
|
110
|
-
setHour(null);
|
|
111
|
-
setMinute(null);
|
|
112
|
-
setSecond(null);
|
|
113
|
-
}
|
|
114
|
-
}, [localValue, is12HourFormat]);
|
|
115
|
-
// Event handlers
|
|
116
|
-
const handleChange = (0, misc_1.useEvent)((newValue) => {
|
|
117
|
-
// Update local state immediately for immediate UI feedback
|
|
118
|
-
setLocalValue(newValue);
|
|
119
|
-
// Also update the XMLUI state
|
|
120
|
-
if (updateState) {
|
|
121
|
-
updateState({ value: newValue });
|
|
122
|
-
}
|
|
123
|
-
onDidChange === null || onDidChange === void 0 ? void 0 : onDidChange(newValue);
|
|
124
|
-
});
|
|
125
|
-
// Helper function to format the complete time value
|
|
126
|
-
const formatTimeValue = (0, react_1.useCallback)((h, m, s, ap, is12Hour) => {
|
|
127
|
-
if (!h || !m) {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
let formattedTime = "";
|
|
131
|
-
if (is12Hour) {
|
|
132
|
-
// 12-hour format
|
|
133
|
-
const hour12 = h.padStart(2, "0");
|
|
134
|
-
const minute12 = m.padStart(2, "0");
|
|
135
|
-
formattedTime = `${hour12}:${minute12}`;
|
|
136
|
-
if (s && showSeconds) {
|
|
137
|
-
formattedTime += `:${s.padStart(2, "0")}`;
|
|
138
|
-
}
|
|
139
|
-
if (ap) {
|
|
140
|
-
formattedTime += ` ${ap}`;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
// 24-hour format
|
|
145
|
-
const hour24 = h.padStart(2, "0");
|
|
146
|
-
const minute24 = m.padStart(2, "0");
|
|
147
|
-
formattedTime = `${hour24}:${minute24}`;
|
|
148
|
-
if (s && showSeconds) {
|
|
149
|
-
formattedTime += `:${s.padStart(2, "0")}`;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return formattedTime;
|
|
153
|
-
}, [showSeconds]);
|
|
154
|
-
// Generic handlers for input change and blur
|
|
155
|
-
const createInputChangeHandler = (0, react_1.useCallback)((field, setValue, setInvalid, validateFn) => (event) => {
|
|
156
|
-
const newValue = event.target.value;
|
|
157
|
-
setValue(newValue);
|
|
158
|
-
// Update invalid state immediately for visual feedback
|
|
159
|
-
const isInvalid = validateFn(newValue);
|
|
160
|
-
setInvalid(isInvalid);
|
|
161
|
-
// Fire invalidTime event if the value is invalid
|
|
162
|
-
if (isInvalid) {
|
|
163
|
-
onInvalidChange === null || onInvalidChange === void 0 ? void 0 : onInvalidChange();
|
|
164
|
-
}
|
|
165
|
-
// Don't format/normalize during typing - only on blur
|
|
166
|
-
}, [onInvalidChange]);
|
|
167
|
-
const createInputBlurHandler = (0, react_1.useCallback)((field, setValue, setInvalid, normalizeFn) => (event) => {
|
|
168
|
-
const currentValue = event.target.value;
|
|
169
|
-
const normalizedValue = normalizeFn(currentValue);
|
|
170
|
-
// Check if the current value was invalid (needed normalization or couldn't be normalized)
|
|
171
|
-
const wasInvalid = currentValue !== "" && (normalizedValue === null || normalizedValue !== currentValue);
|
|
172
|
-
if (normalizedValue !== null && normalizedValue !== currentValue) {
|
|
173
|
-
setValue(normalizedValue);
|
|
174
|
-
setInvalid(false); // Clear invalid state after normalization
|
|
175
|
-
// Always call handleChange to update the time value
|
|
176
|
-
const timeValues = { hour, minute, second };
|
|
177
|
-
timeValues[field] = normalizedValue;
|
|
178
|
-
const timeString = formatTimeValue(timeValues.hour, timeValues.minute, timeValues.second, amPm, is12HourFormat);
|
|
179
|
-
handleChange(timeString);
|
|
180
|
-
}
|
|
181
|
-
else if (normalizedValue === null && currentValue !== "") {
|
|
182
|
-
// Reset to previous valid value or clear
|
|
183
|
-
setValue("");
|
|
184
|
-
setInvalid(false); // Clear invalid state
|
|
185
|
-
// Always call handleChange to update the time value (likely to null)
|
|
186
|
-
const timeValues = { hour, minute, second };
|
|
187
|
-
timeValues[field] = "";
|
|
188
|
-
const timeString = formatTimeValue(timeValues.hour, timeValues.minute, timeValues.second, amPm, is12HourFormat);
|
|
189
|
-
handleChange(timeString);
|
|
190
|
-
}
|
|
191
|
-
else if (normalizedValue !== null) {
|
|
192
|
-
// Value didn't need normalization, but still update the complete time
|
|
193
|
-
const timeValues = { hour, minute, second };
|
|
194
|
-
timeValues[field] = normalizedValue;
|
|
195
|
-
const timeString = formatTimeValue(timeValues.hour, timeValues.minute, timeValues.second, amPm, is12HourFormat);
|
|
196
|
-
handleChange(timeString);
|
|
197
|
-
}
|
|
198
|
-
}, [hour, minute, second, formatTimeValue, amPm, is12HourFormat, handleChange]);
|
|
199
|
-
// Handle changes from individual inputs
|
|
200
|
-
const handleHourChange = (0, react_1.useMemo)(() => createInputChangeHandler("hour", setHour, setIsHourCurrentlyInvalid, (value) => isHourInvalid(value, !is12HourFormat)), [createInputChangeHandler, is12HourFormat]);
|
|
201
|
-
const handleHourBlur = (0, react_1.useMemo)(() => createInputBlurHandler("hour", setHour, setIsHourCurrentlyInvalid, (value) => normalizeHour(value, !is12HourFormat)), [createInputBlurHandler, is12HourFormat]);
|
|
202
|
-
const handleMinuteChange = (0, react_1.useMemo)(() => createInputChangeHandler("minute", setMinute, setIsMinuteCurrentlyInvalid, isMinuteOrSecondInvalid), [createInputChangeHandler]);
|
|
203
|
-
const handleMinuteBlur = (0, react_1.useMemo)(() => createInputBlurHandler("minute", setMinute, setIsMinuteCurrentlyInvalid, normalizeMinuteOrSecond), [createInputBlurHandler]);
|
|
204
|
-
const handleSecondChange = (0, react_1.useMemo)(() => createInputChangeHandler("second", setSecond, setIsSecondCurrentlyInvalid, isMinuteOrSecondInvalid), [createInputChangeHandler]);
|
|
205
|
-
const handleSecondBlur = (0, react_1.useMemo)(() => createInputBlurHandler("second", setSecond, setIsSecondCurrentlyInvalid, normalizeMinuteOrSecond), [createInputBlurHandler]);
|
|
206
|
-
const handleAmPmToggle = (0, react_1.useCallback)(() => {
|
|
207
|
-
const newAmPm = amPm === "am" ? "pm" : "am";
|
|
208
|
-
setAmPm(newAmPm);
|
|
209
|
-
// Always call handleChange to update the time value
|
|
210
|
-
const timeString = formatTimeValue(hour, minute, second, newAmPm, is12HourFormat);
|
|
211
|
-
handleChange(timeString);
|
|
212
|
-
}, [amPm, formatTimeValue, hour, minute, second, is12HourFormat, handleChange]);
|
|
213
|
-
const handleAmPmSet = (0, react_1.useCallback)((targetAmPm) => {
|
|
214
|
-
if (amPm === targetAmPm)
|
|
215
|
-
return; // No change needed
|
|
216
|
-
setAmPm(targetAmPm);
|
|
217
|
-
// Always call handleChange to update the time value
|
|
218
|
-
const timeString = formatTimeValue(hour, minute, second, targetAmPm, is12HourFormat);
|
|
219
|
-
handleChange(timeString);
|
|
220
|
-
}, [amPm, formatTimeValue, hour, minute, second, is12HourFormat, handleChange]);
|
|
221
|
-
// Focus method
|
|
222
|
-
const focus = (0, react_1.useCallback)(() => {
|
|
223
|
-
var _a;
|
|
224
|
-
const input = (_a = timeInputRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('input[type="time"], input[name*="hour"], input[name*="minute"]');
|
|
225
|
-
input === null || input === void 0 ? void 0 : input.focus();
|
|
226
|
-
}, []);
|
|
227
|
-
// Custom focus handler that fires gotFocus when component gains focus
|
|
228
|
-
const handleComponentFocus = (0, react_1.useCallback)((event) => {
|
|
229
|
-
// If component didn't have focus before, fire gotFocus
|
|
230
|
-
if (!componentHasFocus) {
|
|
231
|
-
setComponentHasFocus(true);
|
|
232
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
|
|
233
|
-
}
|
|
234
|
-
}, [componentHasFocus, onFocus]);
|
|
235
|
-
// Custom blur handler that only fires lostFocus when focus leaves the entire component
|
|
236
|
-
const handleComponentBlur = (0, react_1.useCallback)((event) => {
|
|
237
|
-
// Check if the new focus target is still within this TimeInput component
|
|
238
|
-
const relatedTarget = event.relatedTarget;
|
|
239
|
-
const currentTarget = event.currentTarget;
|
|
240
|
-
// If there's no related target, or the related target is not within this component, fire lostFocus
|
|
241
|
-
if (!relatedTarget || !currentTarget.contains(relatedTarget)) {
|
|
242
|
-
setComponentHasFocus(false);
|
|
243
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
244
|
-
}
|
|
245
|
-
}, [onBlur]);
|
|
246
|
-
// Arrow key navigation handler
|
|
247
|
-
const createArrowKeyHandler = (0, react_1.useCallback)(() => {
|
|
248
|
-
return (event) => {
|
|
249
|
-
const { key } = event;
|
|
250
|
-
if (key === "ArrowRight") {
|
|
251
|
-
event.preventDefault();
|
|
252
|
-
const currentTarget = event.target;
|
|
253
|
-
// Determine next input based on current input
|
|
254
|
-
if (currentTarget === hourInputRef.current && minuteInputRef.current) {
|
|
255
|
-
minuteInputRef.current.focus();
|
|
256
|
-
minuteInputRef.current.select();
|
|
257
|
-
}
|
|
258
|
-
else if (currentTarget === minuteInputRef.current) {
|
|
259
|
-
if (showSeconds && secondInputRef.current) {
|
|
260
|
-
secondInputRef.current.focus();
|
|
261
|
-
secondInputRef.current.select();
|
|
262
|
-
}
|
|
263
|
-
else if (!showSeconds && is12HourFormat && amPmButtonRef.current) {
|
|
264
|
-
amPmButtonRef.current.focus();
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
else if (currentTarget === secondInputRef.current &&
|
|
268
|
-
is12HourFormat &&
|
|
269
|
-
amPmButtonRef.current) {
|
|
270
|
-
amPmButtonRef.current.focus();
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
else if (key === "ArrowLeft") {
|
|
274
|
-
event.preventDefault();
|
|
275
|
-
const currentTarget = event.target;
|
|
276
|
-
// Determine previous input based on current input
|
|
277
|
-
if (currentTarget === minuteInputRef.current && hourInputRef.current) {
|
|
278
|
-
hourInputRef.current.focus();
|
|
279
|
-
hourInputRef.current.select();
|
|
280
|
-
}
|
|
281
|
-
else if (currentTarget === secondInputRef.current && minuteInputRef.current) {
|
|
282
|
-
minuteInputRef.current.focus();
|
|
283
|
-
minuteInputRef.current.select();
|
|
284
|
-
}
|
|
285
|
-
else if (currentTarget === amPmButtonRef.current) {
|
|
286
|
-
if (showSeconds && secondInputRef.current) {
|
|
287
|
-
secondInputRef.current.focus();
|
|
288
|
-
secondInputRef.current.select();
|
|
289
|
-
}
|
|
290
|
-
else if (!showSeconds && minuteInputRef.current) {
|
|
291
|
-
minuteInputRef.current.focus();
|
|
292
|
-
minuteInputRef.current.select();
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
}, [showSeconds, is12HourFormat]);
|
|
298
|
-
// Create the arrow key handler instance
|
|
299
|
-
const handleArrowKeys = createArrowKeyHandler();
|
|
300
|
-
const clear = (0, react_1.useCallback)(() => {
|
|
301
|
-
// Reset to initial value if provided, otherwise null
|
|
302
|
-
let valueToReset = clearToInitialValue
|
|
303
|
-
? stableInitialValue !== undefined
|
|
304
|
-
? stableInitialValue
|
|
305
|
-
: null
|
|
306
|
-
: null;
|
|
307
|
-
if (valueToReset) {
|
|
308
|
-
const { amPm: amPmValue, hour: hourStr, minute: minuteStr, second: secondStr, } = parseTimeString(String(valueToReset), is12HourFormat);
|
|
309
|
-
setHour(hourStr);
|
|
310
|
-
setMinute(minuteStr);
|
|
311
|
-
setSecond(secondStr);
|
|
312
|
-
setAmPm(amPmValue);
|
|
313
|
-
}
|
|
314
|
-
else {
|
|
315
|
-
// Clear all fields
|
|
316
|
-
setHour(null);
|
|
317
|
-
setMinute(null);
|
|
318
|
-
setSecond(null);
|
|
319
|
-
setAmPm(null);
|
|
320
|
-
}
|
|
321
|
-
handleChange(valueToReset);
|
|
322
|
-
// Focus the component after clearing
|
|
323
|
-
setTimeout(() => {
|
|
324
|
-
focus();
|
|
325
|
-
}, 0);
|
|
326
|
-
}, [clearToInitialValue, stableInitialValue, handleChange, is12HourFormat, focus]);
|
|
327
|
-
function stopPropagation(event) {
|
|
328
|
-
event.stopPropagation();
|
|
329
|
-
}
|
|
330
|
-
const setValue = (0, misc_1.useEvent)((newValue) => {
|
|
331
|
-
handleChange(newValue);
|
|
332
|
-
});
|
|
333
|
-
// Function to get ISO formatted time value (HH:MM:SS in 24-hour format)
|
|
334
|
-
const getIsoValue = (0, react_1.useCallback)(() => {
|
|
335
|
-
if (!hour || !minute) {
|
|
336
|
-
return null;
|
|
337
|
-
}
|
|
338
|
-
// Convert to 24-hour format if currently in 12-hour format
|
|
339
|
-
let hour24;
|
|
340
|
-
if (is12HourFormat && amPm) {
|
|
341
|
-
const hourInt = parseInt(hour, 10);
|
|
342
|
-
if (amPm === "am") {
|
|
343
|
-
hour24 = hourInt === 12 ? 0 : hourInt;
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
// pm
|
|
347
|
-
hour24 = hourInt === 12 ? 12 : hourInt + 12;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
351
|
-
hour24 = parseInt(hour, 10);
|
|
352
|
-
}
|
|
353
|
-
// Format as ISO time string (HH:MM:SS)
|
|
354
|
-
const h24 = hour24.toString().padStart(2, "0");
|
|
355
|
-
const m24 = minute.padStart(2, "0");
|
|
356
|
-
const s24 = (second || "00").padStart(2, "0");
|
|
357
|
-
return `${h24}:${m24}:${s24}`;
|
|
358
|
-
}, [hour, minute, second, amPm, is12HourFormat]);
|
|
359
|
-
// Component API registration
|
|
360
|
-
(0, react_1.useEffect)(() => {
|
|
361
|
-
if (registerComponentApi) {
|
|
362
|
-
registerComponentApi({
|
|
363
|
-
focus,
|
|
364
|
-
setValue,
|
|
365
|
-
isoValue: getIsoValue,
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
}, [registerComponentApi, focus, setValue, getIsoValue]);
|
|
369
|
-
// Custom clear icon
|
|
370
|
-
const clearIconElement = (0, react_1.useMemo)(() => {
|
|
371
|
-
if (clearIcon === null || clearIcon === "null")
|
|
372
|
-
return null;
|
|
373
|
-
if (clearIcon)
|
|
374
|
-
return (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: clearIcon });
|
|
375
|
-
// Default clear icon
|
|
376
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 19, viewBox: "0 0 19 19", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", className: (0, classnames_1.default)(TimeInput_module_scss_1.default.clearButtonIcon, TimeInput_module_scss_1.default.buttonIcon), children: [(0, jsx_runtime_1.jsx)("line", { x1: "4", x2: "15", y1: "4", y2: "15" }), (0, jsx_runtime_1.jsx)("line", { x1: "15", x2: "4", y1: "4", y2: "15" })] }));
|
|
377
|
-
}, [clearIcon]);
|
|
378
|
-
// Adornments
|
|
379
|
-
const startAdornment = (0, react_1.useMemo)(() => {
|
|
380
|
-
if (startIcon || startText) {
|
|
381
|
-
return (0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { iconName: startIcon, text: startText, className: TimeInput_module_scss_1.default.adornment });
|
|
382
|
-
}
|
|
383
|
-
return null;
|
|
384
|
-
}, [startIcon, startText]);
|
|
385
|
-
const endAdornment = (0, react_1.useMemo)(() => {
|
|
386
|
-
if (endIcon || endText) {
|
|
387
|
-
return (0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { iconName: endIcon, text: endText, className: TimeInput_module_scss_1.default.adornment });
|
|
388
|
-
}
|
|
389
|
-
return null;
|
|
390
|
-
}, [endIcon, endText]);
|
|
391
|
-
const timeInputComponent = ((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: timeInputRef, className: (0, classnames_1.default)(TimeInput_module_scss_1.default.timeInputWrapper, {
|
|
392
|
-
[TimeInput_module_scss_1.default.error]: validationStatus === "error",
|
|
393
|
-
[TimeInput_module_scss_1.default.warning]: validationStatus === "warning",
|
|
394
|
-
[TimeInput_module_scss_1.default.valid]: validationStatus === "valid",
|
|
395
|
-
[TimeInput_module_scss_1.default.disabled]: !enabled,
|
|
396
|
-
[TimeInput_module_scss_1.default.readOnly]: readOnly,
|
|
397
|
-
}, className), style: Object.assign(Object.assign({}, style), { gap }), onFocusCapture: handleComponentFocus, onBlur: handleComponentBlur, "data-validation-status": validationStatus }, rest, { children: [startAdornment, (0, jsx_runtime_1.jsxs)("div", { className: TimeInput_module_scss_1.default.wrapper, children: [(0, jsx_runtime_1.jsxs)("div", { className: TimeInput_module_scss_1.default.inputGroup, children: [(0, jsx_runtime_1.jsx)(HourInput, { id: id, amPm: amPm, autoFocus: autoFocus, disabled: !enabled, inputRef: hourInputRef, nextInputRef: minuteInputRef, maxTime: maxTime, minTime: minTime, onChange: handleHourChange, onBlur: handleHourBlur, onKeyDown: handleArrowKeys, readOnly: readOnly, required: required, value: hour, isInvalid: isHourCurrentlyInvalid, is24Hour: !is12HourFormat, emptyCharacter: processedEmptyCharacter }), (0, jsx_runtime_1.jsx)(InputDivider_1.InputDivider, { separator: ":" }), (0, jsx_runtime_1.jsx)(MinuteInput, { disabled: !enabled, hour: hour, inputRef: minuteInputRef, nextInputRef: showSeconds ? secondInputRef : undefined, nextButtonRef: showSeconds ? undefined : is12HourFormat ? amPmButtonRef : undefined, maxTime: maxTime, minTime: minTime, onChange: handleMinuteChange, onBlur: handleMinuteBlur, onKeyDown: handleArrowKeys, readOnly: readOnly, required: required, showLeadingZeros: showLeadingZeros, value: minute, isInvalid: isMinuteCurrentlyInvalid, emptyCharacter: processedEmptyCharacter }), showSeconds && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(InputDivider_1.InputDivider, { separator: ":", className: TimeInput_module_scss_1.default.divider }), (0, jsx_runtime_1.jsx)(SecondInput, { disabled: !enabled, hour: hour, inputRef: secondInputRef, nextButtonRef: is12HourFormat ? amPmButtonRef : undefined, maxTime: maxTime, minTime: minTime, minute: minute, onChange: handleSecondChange, onBlur: handleSecondBlur, onKeyDown: handleArrowKeys, readOnly: readOnly, required: required, showLeadingZeros: showLeadingZeros, value: second, isInvalid: isSecondCurrentlyInvalid, emptyCharacter: processedEmptyCharacter })] })), is12HourFormat && ((0, jsx_runtime_1.jsx)(AmPmButton, { className: "timeinput", disabled: !enabled, buttonRef: amPmButtonRef, maxTime: maxTime, minTime: minTime, onClick: handleAmPmToggle, onAmPmSet: handleAmPmSet, onKeyDown: handleArrowKeys, value: amPm }))] }), clearable && ((0, jsx_runtime_1.jsx)("button", { "data-part-id": PART_CLEAR_BUTTON, className: (0, classnames_1.default)(TimeInput_module_scss_1.default.clearButton, TimeInput_module_scss_1.default.button), disabled: !enabled, onClick: clear, onFocus: stopPropagation, type: "button", children: clearIconElement }))] }), endAdornment] })));
|
|
398
|
-
return timeInputComponent;
|
|
399
|
-
});
|
|
400
|
-
function AmPmButton({ ariaLabel, autoFocus, className, disabled, locale, maxTime, minTime, onClick, onAmPmSet, onKeyDown, buttonRef, value, }) {
|
|
401
|
-
const amDisabled = minTime ? (0, utils_1.convert24to12)((0, utils_1.getHours)(minTime))[1] === "pm" : false;
|
|
402
|
-
const pmDisabled = maxTime ? (0, utils_1.convert24to12)((0, utils_1.getHours)(maxTime))[1] === "am" : false;
|
|
403
|
-
const [amLabel, pmLabel] = (0, utils_1.getAmPmLabels)(locale);
|
|
404
|
-
// Determine if the button should be disabled based on time constraints
|
|
405
|
-
const isDisabled = disabled || (value === "am" && pmDisabled) || (value === "pm" && amDisabled);
|
|
406
|
-
const handleKeyDown = (0, react_1.useCallback)((event) => {
|
|
407
|
-
// First call the external key handler (for arrow navigation)
|
|
408
|
-
if (onKeyDown) {
|
|
409
|
-
onKeyDown(event);
|
|
410
|
-
}
|
|
411
|
-
// If the event was handled (preventDefault called), don't process further
|
|
412
|
-
if (event.defaultPrevented || disabled)
|
|
413
|
-
return;
|
|
414
|
-
const key = event.key.toLowerCase();
|
|
415
|
-
// Handle 'a' or 'A' to set AM
|
|
416
|
-
if (key === "a" && !amDisabled && value !== "am" && onAmPmSet) {
|
|
417
|
-
event.preventDefault();
|
|
418
|
-
onAmPmSet("am");
|
|
419
|
-
}
|
|
420
|
-
// Handle 'p' or 'P' to set PM
|
|
421
|
-
else if (key === "p" && !pmDisabled && value !== "pm" && onAmPmSet) {
|
|
422
|
-
event.preventDefault();
|
|
423
|
-
onAmPmSet("pm");
|
|
424
|
-
}
|
|
425
|
-
}, [onKeyDown, disabled, onAmPmSet, value, amDisabled, pmDisabled]);
|
|
426
|
-
return ((0, jsx_runtime_1.jsx)("button", { type: "button", "data-part-id": PART_AMPM, "aria-label": ariaLabel || "Toggle AM/PM (Press A for AM, P for PM)", autoFocus: autoFocus, className: (0, classnames_1.default)(TimeInput_module_scss_1.default.amPmButton, TimeInput_module_scss_1.default.button, className), disabled: isDisabled, onClick: onClick, onKeyDown: handleKeyDown, ref: buttonRef, children: (0, jsx_runtime_1.jsx)("span", { className: TimeInput_module_scss_1.default.amPmValue, children: value ? (value === "am" ? amLabel : pmLabel) : "--" }) }));
|
|
427
|
-
}
|
|
428
|
-
function HourInput(_a) {
|
|
429
|
-
var { id, amPm, maxTime, minTime, value, isInvalid = false, is24Hour = false, emptyCharacter = "-" } = _a, otherProps = __rest(_a, ["id", "amPm", "maxTime", "minTime", "value", "isInvalid", "is24Hour", "emptyCharacter"]);
|
|
430
|
-
// Calculate min/max based on format
|
|
431
|
-
const { minHour, maxHour } = (() => {
|
|
432
|
-
if (is24Hour) {
|
|
433
|
-
// 24-hour format: 0-23
|
|
434
|
-
return {
|
|
435
|
-
maxHour: (0, utils_1.safeMin)(23, maxTime && (0, utils_1.getHours)(maxTime)),
|
|
436
|
-
minHour: (0, utils_1.safeMax)(0, minTime && (0, utils_1.getHours)(minTime)),
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
else {
|
|
440
|
-
// 12-hour format: 1-12
|
|
441
|
-
const maxHour = (0, utils_1.safeMin)(12, maxTime &&
|
|
442
|
-
(() => {
|
|
443
|
-
const [maxHourResult, maxAmPm] = (0, utils_1.convert24to12)((0, utils_1.getHours)(maxTime));
|
|
444
|
-
if (maxAmPm !== amPm) {
|
|
445
|
-
// pm is always after am, so we should ignore validation
|
|
446
|
-
return null;
|
|
447
|
-
}
|
|
448
|
-
return maxHourResult;
|
|
449
|
-
})());
|
|
450
|
-
const minHour = (0, utils_1.safeMax)(1, minTime &&
|
|
451
|
-
(() => {
|
|
452
|
-
const [minHourResult, minAmPm] = (0, utils_1.convert24to12)((0, utils_1.getHours)(minTime));
|
|
453
|
-
if (
|
|
454
|
-
// pm is always after am, so we should ignore validation
|
|
455
|
-
minAmPm !== amPm ||
|
|
456
|
-
// If minHour is 12 am/pm, user should be able to enter 12, 1, ..., 11.
|
|
457
|
-
minHourResult === 12) {
|
|
458
|
-
return null;
|
|
459
|
-
}
|
|
460
|
-
return minHourResult;
|
|
461
|
-
})());
|
|
462
|
-
return { maxHour, minHour };
|
|
463
|
-
}
|
|
464
|
-
})();
|
|
465
|
-
// Always show the raw value during typing, no conversion
|
|
466
|
-
// This allows users to see invalid input like "23" before it gets normalized on blur
|
|
467
|
-
const displayValue = value || "";
|
|
468
|
-
return ((0, jsx_runtime_1.jsx)(PartialInput_1.PartialInput, { id: id, "data-part-id": PART_HOUR, value: displayValue, emptyCharacter: emptyCharacter, placeholderLength: 2, max: maxHour, min: minHour, maxLength: 2, validateFn: (val) => isHourInvalid(val, is24Hour), onChange: otherProps.onChange, onBlur: (direction, event) => {
|
|
469
|
-
// PartialInput provides direction, but the current onBlur expects just the event
|
|
470
|
-
if (otherProps.onBlur) {
|
|
471
|
-
otherProps.onBlur(event);
|
|
472
|
-
}
|
|
473
|
-
}, onKeyDown: otherProps.onKeyDown, className: (0, classnames_1.default)(TimeInput_module_scss_1.default.input, TimeInput_module_scss_1.default.hour), invalidClassName: TimeInput_module_scss_1.default.invalid, disabled: otherProps.disabled, readOnly: otherProps.readOnly, required: otherProps.required, autoFocus: otherProps.autoFocus, inputRef: otherProps.inputRef, nextInputRef: otherProps.nextInputRef, nextButtonRef: otherProps.nextButtonRef, name: is24Hour ? "hour24" : "hour12", ariaLabel: otherProps.ariaLabel, isInvalid: isInvalid }));
|
|
474
|
-
}
|
|
475
|
-
function MinuteInput(_a) {
|
|
476
|
-
var { hour, maxTime, minTime, showLeadingZeros = true, value, isInvalid = false, emptyCharacter = "-" } = _a, otherProps = __rest(_a, ["hour", "maxTime", "minTime", "showLeadingZeros", "value", "isInvalid", "emptyCharacter"]);
|
|
477
|
-
function isSameHour(date) {
|
|
478
|
-
return hour === (0, utils_1.getHours)(date).toString();
|
|
479
|
-
}
|
|
480
|
-
const maxMinute = (0, utils_1.safeMin)(59, maxTime && isSameHour(maxTime) && (0, utils_1.getMinutes)(maxTime));
|
|
481
|
-
const minMinute = (0, utils_1.safeMax)(0, minTime && isSameHour(minTime) && (0, utils_1.getMinutes)(minTime));
|
|
482
|
-
return ((0, jsx_runtime_1.jsx)(PartialInput_1.PartialInput, { "data-part-id": PART_MINUTE, max: maxMinute, min: minMinute, name: "minute", value: value, validateFn: isMinuteOrSecondInvalid, emptyCharacter: emptyCharacter, placeholderLength: 2, maxLength: 2, onChange: otherProps.onChange, onBlur: (direction, event) => {
|
|
483
|
-
// PartialInput provides direction, but the current onBlur expects just the event
|
|
484
|
-
if (otherProps.onBlur) {
|
|
485
|
-
otherProps.onBlur(event);
|
|
486
|
-
}
|
|
487
|
-
}, onKeyDown: otherProps.onKeyDown, className: (0, classnames_1.default)(TimeInput_module_scss_1.default.input, TimeInput_module_scss_1.default.minute), invalidClassName: TimeInput_module_scss_1.default.invalid, disabled: otherProps.disabled, readOnly: otherProps.readOnly, required: otherProps.required, autoFocus: otherProps.autoFocus, inputRef: otherProps.inputRef, nextInputRef: otherProps.nextInputRef, nextButtonRef: otherProps.nextButtonRef, ariaLabel: otherProps.ariaLabel, isInvalid: isInvalid }));
|
|
488
|
-
}
|
|
489
|
-
function SecondInput(_a) {
|
|
490
|
-
var { hour, maxTime, minTime, minute, showLeadingZeros = true, value, isInvalid = false, emptyCharacter = "-" } = _a, otherProps = __rest(_a, ["hour", "maxTime", "minTime", "minute", "showLeadingZeros", "value", "isInvalid", "emptyCharacter"]);
|
|
491
|
-
function isSameMinute(date) {
|
|
492
|
-
return hour === (0, utils_1.getHours)(date).toString() && minute === (0, utils_1.getMinutes)(date).toString();
|
|
493
|
-
}
|
|
494
|
-
const maxSecond = (0, utils_1.safeMin)(59, maxTime && isSameMinute(maxTime) && (0, utils_1.getSeconds)(maxTime));
|
|
495
|
-
const minSecond = (0, utils_1.safeMax)(0, minTime && isSameMinute(minTime) && (0, utils_1.getSeconds)(minTime));
|
|
496
|
-
return ((0, jsx_runtime_1.jsx)(PartialInput_1.PartialInput, { "data-part-id": PART_SECOND, max: maxSecond, min: minSecond, name: "second", value: value, validateFn: isMinuteOrSecondInvalid, emptyCharacter: emptyCharacter, placeholderLength: 2, maxLength: 2, onChange: otherProps.onChange, onBlur: (direction, event) => {
|
|
497
|
-
// PartialInput provides direction, but the current onBlur expects just the event
|
|
498
|
-
if (otherProps.onBlur) {
|
|
499
|
-
otherProps.onBlur(event);
|
|
500
|
-
}
|
|
501
|
-
}, onKeyDown: otherProps.onKeyDown, className: (0, classnames_1.default)(TimeInput_module_scss_1.default.input, TimeInput_module_scss_1.default.second), invalidClassName: TimeInput_module_scss_1.default.invalid, disabled: otherProps.disabled, readOnly: otherProps.readOnly, required: otherProps.required, autoFocus: otherProps.autoFocus, inputRef: otherProps.inputRef, nextInputRef: otherProps.nextInputRef, nextButtonRef: otherProps.nextButtonRef, ariaLabel: otherProps.ariaLabel, isInvalid: isInvalid }));
|
|
502
|
-
}
|
|
503
|
-
// Utility function to parse time string into components
|
|
504
|
-
function parseTimeString(timeValue, targetIs12Hour = false) {
|
|
505
|
-
// Handle non-string values gracefully
|
|
506
|
-
if (timeValue == null || timeValue === undefined) {
|
|
507
|
-
return {
|
|
508
|
-
amPm: null,
|
|
509
|
-
hour: "",
|
|
510
|
-
minute: "",
|
|
511
|
-
second: "",
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
// If not a string, return empty values for type safety
|
|
515
|
-
if (typeof timeValue !== "string") {
|
|
516
|
-
return {
|
|
517
|
-
amPm: null,
|
|
518
|
-
hour: "",
|
|
519
|
-
minute: "",
|
|
520
|
-
second: "",
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
const timeString = timeValue;
|
|
524
|
-
const normalizedTimeString = timeString.toLowerCase();
|
|
525
|
-
// Check if the time string contains AM/PM
|
|
526
|
-
const hasAmPm = normalizedTimeString.includes("am") || normalizedTimeString.includes("pm");
|
|
527
|
-
const isAmPmPm = normalizedTimeString.includes("pm");
|
|
528
|
-
// Extract just the time part (remove AM/PM suffix)
|
|
529
|
-
const timePart = normalizedTimeString.replace(/\s*(am|pm)\s*$/i, "").trim();
|
|
530
|
-
let parsedHour = (0, utils_1.getHours)(timePart);
|
|
531
|
-
let parsedMinute = (0, utils_1.getMinutes)(timePart);
|
|
532
|
-
let parsedSecond = (0, utils_1.getSeconds)(timePart);
|
|
533
|
-
// If parsing with the current format fails (all zeros), try ISO time format
|
|
534
|
-
if (parsedHour === 0 &&
|
|
535
|
-
parsedMinute === 0 &&
|
|
536
|
-
parsedSecond === 0 &&
|
|
537
|
-
timePart !== "00:00:00" &&
|
|
538
|
-
timePart !== "00:00") {
|
|
539
|
-
try {
|
|
540
|
-
// Try parsing as ISO time format using Date constructor
|
|
541
|
-
const isoDate = new Date(`1970-01-01T${timePart}`);
|
|
542
|
-
if (!isNaN(isoDate.getTime())) {
|
|
543
|
-
parsedHour = isoDate.getHours();
|
|
544
|
-
parsedMinute = isoDate.getMinutes();
|
|
545
|
-
parsedSecond = isoDate.getSeconds();
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
catch (_a) {
|
|
549
|
-
// If ISO parsing fails, keep the original parsed values (zeros)
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
// Set AM/PM based on the actual string content or convert from 24-hour
|
|
553
|
-
let amPmValue = null;
|
|
554
|
-
let displayHour = parsedHour;
|
|
555
|
-
if (hasAmPm) {
|
|
556
|
-
// String already has AM/PM, use the hour as-is (should be 1-12)
|
|
557
|
-
amPmValue = isAmPmPm ? "pm" : "am";
|
|
558
|
-
}
|
|
559
|
-
else {
|
|
560
|
-
// If no AM/PM in string, derive it from 24-hour format
|
|
561
|
-
const [hour12, amPm12] = (0, utils_1.convert24to12)(parsedHour);
|
|
562
|
-
amPmValue = amPm12;
|
|
563
|
-
// If target format is 12-hour, convert the hour value
|
|
564
|
-
if (targetIs12Hour) {
|
|
565
|
-
displayHour = hour12;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
// Format hour value appropriately
|
|
569
|
-
const hourStr = displayHour.toString().padStart(2, "0");
|
|
570
|
-
const minuteStr = parsedMinute.toString().padStart(2, "0");
|
|
571
|
-
const secondStr = parsedSecond.toString().padStart(2, "0");
|
|
572
|
-
return {
|
|
573
|
-
amPm: amPmValue,
|
|
574
|
-
hour: hourStr,
|
|
575
|
-
minute: minuteStr,
|
|
576
|
-
second: secondStr,
|
|
577
|
-
};
|
|
578
|
-
}
|
|
579
|
-
// Normalize the hour value based on 12/24 hour format
|
|
580
|
-
function normalizeHour(value, is24Hour) {
|
|
581
|
-
if (!value || value === "")
|
|
582
|
-
return null;
|
|
583
|
-
const num = parseInt(value, 10);
|
|
584
|
-
if (isNaN(num))
|
|
585
|
-
return null;
|
|
586
|
-
if (is24Hour) {
|
|
587
|
-
// 24-hour format: 0-23
|
|
588
|
-
if (num >= 0 && num <= 23) {
|
|
589
|
-
return num.toString().padStart(2, "0");
|
|
590
|
-
}
|
|
591
|
-
else {
|
|
592
|
-
// For out-of-range values, use value % 10
|
|
593
|
-
const corrected = num % 10;
|
|
594
|
-
return corrected.toString().padStart(2, "0");
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
else {
|
|
598
|
-
// 12-hour format: 1-12
|
|
599
|
-
if (num >= 1 && num <= 12) {
|
|
600
|
-
return num.toString().padStart(2, "0");
|
|
601
|
-
}
|
|
602
|
-
else if (num === 0) {
|
|
603
|
-
return "12"; // 0 becomes 12 in 12-hour format
|
|
604
|
-
}
|
|
605
|
-
else {
|
|
606
|
-
// For out-of-range values, use value % 10, but ensure it's 1-12
|
|
607
|
-
let corrected = num % 10;
|
|
608
|
-
if (corrected === 0)
|
|
609
|
-
corrected = 12; // 0 becomes 12 in 12-hour format
|
|
610
|
-
return corrected.toString().padStart(2, "0");
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
// Normalize the minute or second value
|
|
615
|
-
function normalizeMinuteOrSecond(value) {
|
|
616
|
-
if (!value || value === "")
|
|
617
|
-
return null;
|
|
618
|
-
const num = parseInt(value, 10);
|
|
619
|
-
if (isNaN(num))
|
|
620
|
-
return null;
|
|
621
|
-
if (num >= 0 && num <= 59) {
|
|
622
|
-
return num.toString().padStart(2, "0");
|
|
623
|
-
}
|
|
624
|
-
else {
|
|
625
|
-
// For out-of-range values, use value % 10
|
|
626
|
-
const corrected = num % 10;
|
|
627
|
-
return corrected.toString().padStart(2, "0");
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
// Helper functions to check if values are currently invalid (need normalization)
|
|
631
|
-
function isHourInvalid(value, is24Hour) {
|
|
632
|
-
if (!value || value === "")
|
|
633
|
-
return false;
|
|
634
|
-
const num = parseInt(value, 10);
|
|
635
|
-
if (isNaN(num)) {
|
|
636
|
-
return true;
|
|
637
|
-
}
|
|
638
|
-
const invalid = is24Hour ? num < 0 || num > 23 : num < 1 || num > 12;
|
|
639
|
-
return invalid;
|
|
640
|
-
}
|
|
641
|
-
function isMinuteOrSecondInvalid(value) {
|
|
642
|
-
if (!value || value === "")
|
|
643
|
-
return false;
|
|
644
|
-
const num = parseInt(value, 10);
|
|
645
|
-
if (isNaN(num)) {
|
|
646
|
-
return true;
|
|
647
|
-
}
|
|
648
|
-
const invalid = num < 0 || num > 59;
|
|
649
|
-
return invalid;
|
|
650
|
-
}
|