├── .editorconfig ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .kotlin-js-store └── yarn.lock ├── CONTRIBUTING.md ├── LICENSE ├── Module.md ├── README.md ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts ├── settings.gradle.kts └── src │ └── main │ └── kotlin │ └── Shared.kt ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── graphics └── kvision-logo.png ├── karma.config.d └── karma.conf.js ├── kvision-assets ├── README.md ├── build.gradle.kts └── src │ ├── css │ ├── kv-bootstrap-upload.css │ ├── kv-bootstrap.css │ ├── kv-style.css │ ├── kv-tabulator.css │ ├── kv-tempus-dominus.css │ ├── kv-toastify.css │ ├── kv-tom-select.css │ └── kv-trix.css │ ├── img │ └── placeholder.png │ └── index.js ├── kvision-modules ├── kvision-ballast │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── state │ │ │ └── StateBinding.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-bootstrap-icons │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── BootstrapIconsModule.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-bootstrap-upload │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── BootstrapUploadModule.kt │ │ │ │ └── form │ │ │ │ └── upload │ │ │ │ ├── BootstrapUpload.kt │ │ │ │ └── BootstrapUploadInput.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── form │ │ │ └── upload │ │ │ ├── BootstrapUploadInputSpec.kt │ │ │ └── BootstrapUploadSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-bootstrap │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── BootstrapCssCoreModule.kt │ │ │ │ ├── BootstrapCssModule.kt │ │ │ │ ├── BootstrapModule.kt │ │ │ │ ├── badge │ │ │ │ └── Badge.kt │ │ │ │ ├── collapse │ │ │ │ └── Collapse.kt │ │ │ │ ├── core │ │ │ │ ├── Bootstrap.kt │ │ │ │ ├── Component.kt │ │ │ │ ├── PopupOptions.kt │ │ │ │ └── Widget.kt │ │ │ │ ├── dropdown │ │ │ │ ├── ContextMenu.kt │ │ │ │ ├── DropDown.kt │ │ │ │ ├── DropDownButton.kt │ │ │ │ ├── DropDownMenu.kt │ │ │ │ ├── Header.kt │ │ │ │ └── Separator.kt │ │ │ │ ├── form │ │ │ │ └── check │ │ │ │ │ ├── Switch.kt │ │ │ │ │ └── SwitchInput.kt │ │ │ │ ├── modal │ │ │ │ ├── Alert.kt │ │ │ │ ├── CloseIcon.kt │ │ │ │ ├── Confirm.kt │ │ │ │ ├── Dialog.kt │ │ │ │ └── Modal.kt │ │ │ │ ├── navbar │ │ │ │ ├── Nav.kt │ │ │ │ ├── NavForm.kt │ │ │ │ └── Navbar.kt │ │ │ │ ├── offcanvas │ │ │ │ └── Offcanvas.kt │ │ │ │ ├── panel │ │ │ │ ├── ResponsiveGridPanel.kt │ │ │ │ ├── Tab.kt │ │ │ │ └── TabPanel.kt │ │ │ │ ├── progress │ │ │ │ ├── Bounds.kt │ │ │ │ ├── ContentGenerator.kt │ │ │ │ ├── FormatFractionContentGenerator.kt │ │ │ │ ├── FormatNumberValueContentGenerator.kt │ │ │ │ ├── NumberProgressBarTag.kt │ │ │ │ ├── Progress.kt │ │ │ │ └── ProgressBarTag.kt │ │ │ │ ├── table │ │ │ │ ├── Cell.kt │ │ │ │ ├── HeaderCell.kt │ │ │ │ ├── Row.kt │ │ │ │ └── Table.kt │ │ │ │ ├── theme │ │ │ │ ├── ThemeManager.kt │ │ │ │ └── ThemeSwitcher.kt │ │ │ │ ├── toast │ │ │ │ └── ToastContainer.kt │ │ │ │ ├── toolbar │ │ │ │ ├── ButtonGroup.kt │ │ │ │ └── Toolbar.kt │ │ │ │ └── window │ │ │ │ ├── MaximizeIcon.kt │ │ │ │ ├── MinimizeIcon.kt │ │ │ │ ├── ResizeObserver.kt │ │ │ │ └── Window.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ ├── badge │ │ │ └── BadgeSpec.kt │ │ │ ├── collapse │ │ │ └── CollapseSpec.kt │ │ │ ├── dropdown │ │ │ ├── ContextMenuSpec.kt │ │ │ ├── DropDownSpec.kt │ │ │ ├── HeaderSpec.kt │ │ │ └── SeparatorSpec.kt │ │ │ ├── form │ │ │ └── check │ │ │ │ ├── SwitchInputSpec.kt │ │ │ │ └── SwitchSpec.kt │ │ │ ├── modal │ │ │ ├── AlertSpec.kt │ │ │ ├── CloseIconSpec.kt │ │ │ ├── ConfirmSpec.kt │ │ │ └── ModalSpec.kt │ │ │ ├── navbar │ │ │ ├── NavFormSpec.kt │ │ │ ├── NavSpec.kt │ │ │ └── NavbarSpec.kt │ │ │ ├── offcanvas │ │ │ └── OffcanvasSpec.kt │ │ │ ├── panel │ │ │ ├── ResponsiveGridPanelSpec.kt │ │ │ └── TabPanelSpec.kt │ │ │ ├── progress │ │ │ └── ProgressBarSpec.kt │ │ │ ├── table │ │ │ ├── CellSpec.kt │ │ │ ├── HeaderCellSpec.kt │ │ │ ├── RowSpec.kt │ │ │ └── TableSpec.kt │ │ │ ├── theme │ │ │ └── ThemeSwitcherSpec.kt │ │ │ ├── toast │ │ │ └── ToastContainerSpec.kt │ │ │ ├── toolbar │ │ │ ├── ButtonGroupSpec.kt │ │ │ └── ToolbarSpec.kt │ │ │ └── window │ │ │ └── WindowSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-chart │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── ChartModule.kt │ │ │ │ └── chart │ │ │ │ ├── Chart.kt │ │ │ │ ├── ChartCanvas.kt │ │ │ │ ├── Configuration.kt │ │ │ │ └── js │ │ │ │ ├── Adapters.kt │ │ │ │ ├── Animation.kt │ │ │ │ ├── Basic.kt │ │ │ │ ├── Chart.kt │ │ │ │ ├── Element.kt │ │ │ │ ├── Geometric.kt │ │ │ │ ├── Layout.kt │ │ │ │ └── Utils.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── chart │ │ │ ├── ChartCanvasSpec.kt │ │ │ └── ChartSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ ├── file.js │ │ └── webpack.js ├── kvision-common-remote │ ├── build.gradle.kts │ └── src │ │ ├── commonMain │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── remote │ │ │ └── RegisterRemoteTypes.kt │ │ ├── jsMain │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ ├── remote │ │ │ ├── RegisterRemoteTypes.kt │ │ │ └── Security.kt │ │ │ └── types │ │ │ └── Date.kt │ │ └── jvmMain │ │ └── kotlin │ │ └── io │ │ └── kvision │ │ ├── remote │ │ └── RegisterRemoteTypes.kt │ │ └── types │ │ └── Date.kt ├── kvision-common-types │ ├── build.gradle.kts │ └── src │ │ ├── commonMain │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── types │ │ │ ├── Date.kt │ │ │ └── KFile.kt │ │ ├── jsMain │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── types │ │ │ └── Date.kt │ │ └── jvmMain │ │ └── kotlin │ │ └── io │ │ └── kvision │ │ └── types │ │ ├── Date.kt │ │ └── KFileExt.kt ├── kvision-datetime │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── DatetimeModule.kt │ │ │ │ ├── TempusDominus.kt │ │ │ │ └── form │ │ │ │ └── time │ │ │ │ ├── DateTime.kt │ │ │ │ └── DateTimeInput.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── form │ │ │ └── time │ │ │ ├── DateTimeInputSpec.kt │ │ │ └── DateTimeSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-fontawesome │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── FontAwesomeModule.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-handlebars │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── HandlebarsModule.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-i18n │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── i18n │ │ │ └── DefaultI18nManager.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-imask │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── ImaskModule.kt │ │ │ │ └── form │ │ │ │ ├── number │ │ │ │ ├── ImaskNumeric.kt │ │ │ │ └── ImaskNumericInput.kt │ │ │ │ └── text │ │ │ │ ├── Imask.kt │ │ │ │ ├── ImaskFactory.kt │ │ │ │ └── ImaskOptions.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── form │ │ │ ├── number │ │ │ ├── ImaskNumericInputSpec.kt │ │ │ └── ImaskNumericSpec.kt │ │ │ └── text │ │ │ └── ImaskSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-jquery │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── core │ │ │ ├── Component.kt │ │ │ └── Widget.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-maps │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── MapsModule.kt │ │ │ │ └── maps │ │ │ │ ├── BaseTileLayer.kt │ │ │ │ ├── LeafletObjectFactory.kt │ │ │ │ ├── Maps.kt │ │ │ │ └── externals │ │ │ │ ├── geojson │ │ │ │ ├── geojson.kt │ │ │ │ └── position.kt │ │ │ │ └── leaflet │ │ │ │ ├── callback.kt │ │ │ │ ├── control │ │ │ │ ├── Attribution.kt │ │ │ │ ├── Control.kt │ │ │ │ ├── Layers.kt │ │ │ │ ├── Scale.kt │ │ │ │ └── Zoom.kt │ │ │ │ ├── core │ │ │ │ ├── Class.kt │ │ │ │ └── Handler.kt │ │ │ │ ├── dom │ │ │ │ ├── DomUtil.kt │ │ │ │ └── Draggable.kt │ │ │ │ ├── events │ │ │ │ ├── Evented.kt │ │ │ │ ├── LeafletEventHandlerFnMap.kt │ │ │ │ ├── eventHandlerFns.kt │ │ │ │ └── leafletEvents.kt │ │ │ │ ├── geo │ │ │ │ ├── CRS.kt │ │ │ │ ├── Coords.kt │ │ │ │ ├── LatLng.kt │ │ │ │ ├── LatLngBounds.kt │ │ │ │ └── Projection.kt │ │ │ │ ├── geometry │ │ │ │ ├── Bounds.kt │ │ │ │ └── Point.kt │ │ │ │ ├── layer │ │ │ │ ├── FeatureGroup.kt │ │ │ │ ├── GeoJSON.kt │ │ │ │ ├── Layer.kt │ │ │ │ ├── LayerGroup.kt │ │ │ │ ├── marker │ │ │ │ │ ├── DivIcon.kt │ │ │ │ │ ├── Icon.kt │ │ │ │ │ └── Marker.kt │ │ │ │ ├── overlay │ │ │ │ │ ├── DivOverlay.kt │ │ │ │ │ ├── ImageOverlay.kt │ │ │ │ │ ├── MediaOverlay.kt │ │ │ │ │ ├── Popup.kt │ │ │ │ │ ├── SVGOverlay.kt │ │ │ │ │ ├── Tooltip.kt │ │ │ │ │ └── VideoOverlay.kt │ │ │ │ ├── styleFunction.kt │ │ │ │ ├── tile │ │ │ │ │ ├── GridLayer.kt │ │ │ │ │ ├── TileLayer.kt │ │ │ │ │ └── WMS.kt │ │ │ │ └── vector │ │ │ │ │ ├── Canvas.kt │ │ │ │ │ ├── Circle.kt │ │ │ │ │ ├── CircleMarker.kt │ │ │ │ │ ├── Path.kt │ │ │ │ │ ├── Polygon.kt │ │ │ │ │ ├── Polyline.kt │ │ │ │ │ ├── Rectangle.kt │ │ │ │ │ ├── Renderer.kt │ │ │ │ │ └── SVG.kt │ │ │ │ ├── map │ │ │ │ ├── LeafletMap.kt │ │ │ │ └── mapPanes.kt │ │ │ │ └── unionAliases.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── maps │ │ │ └── MapsSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-material │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── MaterialAllJs.kt │ │ │ │ ├── MaterialModule.kt │ │ │ │ ├── MaterialStyles.kt.kt │ │ │ │ └── material │ │ │ │ ├── ExperimentalMaterialApi.kt │ │ │ │ ├── button │ │ │ │ ├── MdButton.kt │ │ │ │ ├── MdElevatedButton.kt │ │ │ │ ├── MdFilledButton.kt │ │ │ │ ├── MdFilledTonalButton.kt │ │ │ │ ├── MdOutlinedButton.kt │ │ │ │ └── MdTextButton.kt │ │ │ │ ├── checkbox │ │ │ │ └── MdCheckbox.kt │ │ │ │ ├── chips │ │ │ │ ├── ChipEvents.kt │ │ │ │ ├── MdAssistChip.kt │ │ │ │ ├── MdChip.kt │ │ │ │ ├── MdChipSet.kt │ │ │ │ ├── MdFilterChip.kt │ │ │ │ ├── MdInputChip.kt │ │ │ │ ├── MdSuggestionChip.kt │ │ │ │ └── RemovableChip.kt │ │ │ │ ├── container │ │ │ │ ├── MdContainer.kt │ │ │ │ └── MdListContainer.kt │ │ │ │ ├── dialog │ │ │ │ ├── DialogEvents.kt │ │ │ │ └── MdDialog.kt │ │ │ │ ├── divider │ │ │ │ └── MdDivider.kt │ │ │ │ ├── fab │ │ │ │ ├── MdBaseFab.kt │ │ │ │ ├── MdBrandedFab.kt │ │ │ │ └── MdFab.kt │ │ │ │ ├── form │ │ │ │ ├── MdFormInputWidget.kt │ │ │ │ ├── MdFormLabelWidget.kt │ │ │ │ ├── MdFormToggleInputWidget.kt │ │ │ │ └── MdFormWidget.kt │ │ │ │ ├── icon │ │ │ │ ├── IconSlot.kt │ │ │ │ └── MdIcon.kt │ │ │ │ ├── iconbutton │ │ │ │ ├── MdFilledIconButton.kt │ │ │ │ ├── MdFilledTonalIconButton.kt │ │ │ │ ├── MdIconButton.kt │ │ │ │ └── MdOutlinedIconButton.kt │ │ │ │ ├── list │ │ │ │ ├── MdList.kt │ │ │ │ └── MdListItem.kt │ │ │ │ ├── menu │ │ │ │ ├── CloseMenuEvent.kt │ │ │ │ ├── MaterialMenuDsl.kt │ │ │ │ ├── MdMenu.kt │ │ │ │ ├── MdMenuItem.kt │ │ │ │ ├── MdSubMenu.kt │ │ │ │ ├── MenuAnchor.kt │ │ │ │ ├── MenuEvents.kt │ │ │ │ ├── MenuItemEvents.kt │ │ │ │ └── SubMenuEvents.kt │ │ │ │ ├── progress │ │ │ │ ├── MdCircularProgress.kt │ │ │ │ ├── MdLinearProgress.kt │ │ │ │ └── MdProgress.kt │ │ │ │ ├── radio │ │ │ │ └── MdRadio.kt │ │ │ │ ├── ripple │ │ │ │ └── MdRipple.kt │ │ │ │ ├── select │ │ │ │ ├── MdFilledSelect.kt │ │ │ │ ├── MdOutlinedSelect.kt │ │ │ │ ├── MdSelect.kt │ │ │ │ ├── MdSelectOption.kt │ │ │ │ ├── SelectEvents.kt │ │ │ │ └── SelectOptionEvents.kt │ │ │ │ ├── slider │ │ │ │ ├── MdBaseSlider.kt │ │ │ │ ├── MdRangeSlider.kt │ │ │ │ └── MdSlider.kt │ │ │ │ ├── slot │ │ │ │ ├── Slots.kt │ │ │ │ └── TextSlots.kt │ │ │ │ ├── switch │ │ │ │ └── MdSwitch.kt │ │ │ │ ├── tabs │ │ │ │ ├── MdPrimaryTab.kt │ │ │ │ ├── MdSecondaryTab.kt │ │ │ │ ├── MdTab.kt │ │ │ │ └── MdTabs.kt │ │ │ │ ├── textfield │ │ │ │ ├── MaterielUnsupportedTextFieldType.kt │ │ │ │ ├── MdFilledTextField.kt │ │ │ │ ├── MdOutlinedTextField.kt │ │ │ │ ├── MdTextField.kt │ │ │ │ └── TextFieldTypes.kt │ │ │ │ ├── util │ │ │ │ ├── Assert.kt │ │ │ │ ├── Attribute.kt │ │ │ │ ├── Keep.kt │ │ │ │ ├── Number.kt │ │ │ │ └── Sync.kt │ │ │ │ └── widget │ │ │ │ ├── Corner.kt │ │ │ │ ├── FocusState.kt │ │ │ │ ├── LinkTarget.kt │ │ │ │ ├── MdItemWidget.kt │ │ │ │ ├── MdListWidget.kt │ │ │ │ ├── MdListWidgetContainer.kt │ │ │ │ ├── MdListWidgetContainerDelegate.kt │ │ │ │ ├── MdWidget.kt │ │ │ │ ├── Slot.kt │ │ │ │ ├── TouchTarget.kt │ │ │ │ └── UnsafeItemWidget.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── material │ │ │ ├── button │ │ │ └── ButtonSpec.kt │ │ │ ├── checkbox │ │ │ └── CheckboxSpec.kt │ │ │ ├── chips │ │ │ ├── ChipSetSpec.kt │ │ │ └── ChipSpec.kt │ │ │ ├── dialog │ │ │ └── DialogSpec.kt │ │ │ ├── divider │ │ │ └── DividerSpec.kt │ │ │ ├── fab │ │ │ └── FabSpec.kt │ │ │ ├── icon │ │ │ └── IconSpec.kt │ │ │ ├── iconbutton │ │ │ └── IconButtonSpec.kt │ │ │ ├── list │ │ │ ├── ListItemSpec.kt │ │ │ └── ListSpec.kt │ │ │ ├── menu │ │ │ ├── MenuItemSpec.kt │ │ │ ├── MenuSpec.kt │ │ │ └── SubMenuSpec.kt │ │ │ ├── progress │ │ │ ├── CircularProgressSpec.kt │ │ │ └── LinearProgressSpec.kt │ │ │ ├── radio │ │ │ └── RadioSpec.kt │ │ │ ├── ripple │ │ │ └── RippleSpec.kt │ │ │ ├── select │ │ │ ├── SelectOptionSpec.kt │ │ │ └── SelectSpec.kt │ │ │ ├── slider │ │ │ ├── RangeSliderSpec.kt │ │ │ └── SliderSpec.kt │ │ │ ├── switch │ │ │ └── SwitchSpec.kt │ │ │ ├── tabs │ │ │ ├── TabSpec.kt │ │ │ └── TabsSpec.kt │ │ │ └── textfield │ │ │ └── TextFieldSpec.kt │ └── webpack.config.d │ │ ├── css.js │ │ └── file.js ├── kvision-pace │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── pace │ │ │ └── Pace.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-print │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ ├── PrintJs.kt │ │ │ ├── PrintModule.kt │ │ │ └── print │ │ │ └── Print.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-react │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── ReactModule.kt │ │ │ │ └── react │ │ │ │ ├── React.kt │ │ │ │ └── ReactWrappers.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── react │ │ │ └── ReactSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-redux-kotlin │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ └── redux │ │ │ │ └── TypedReduxStore.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── redux │ │ │ ├── StateBindingSpec.kt │ │ │ └── TypedReduxStoreSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-rest │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── rest │ │ │ └── RestClient.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-richtext │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── Locales.kt │ │ │ │ ├── RichTextModule.kt │ │ │ │ └── form │ │ │ │ └── text │ │ │ │ ├── RichText.kt │ │ │ │ └── RichTextInput.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── form │ │ │ └── text │ │ │ ├── RichTextInputSpec.kt │ │ │ └── RichTextSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-routing-ballast │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── routing │ │ │ ├── BallastRouterFactory.kt │ │ │ ├── KVRoute.kt │ │ │ ├── KVRouterViewModel.kt │ │ │ ├── KVRoutingTable.kt │ │ │ └── Routing.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-routing-navigo-ng │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── routing │ │ │ └── Routing.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-routing-navigo │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── routing │ │ │ └── Routing.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-select-remote │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── form │ │ │ └── select │ │ │ ├── SelectRemote.kt │ │ │ └── SelectRemoteInput.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-state-flow │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ ├── event │ │ │ └── EventFlow.kt │ │ │ └── state │ │ │ ├── StateBinding.kt │ │ │ └── StateFlow.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-state │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ └── state │ │ │ │ ├── ObservableList.kt │ │ │ │ ├── ObservableSet.kt │ │ │ │ ├── ObservableState.kt │ │ │ │ └── StateBinding.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── state │ │ │ └── StateBindingSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-tabulator-remote │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── tabulator │ │ │ └── TabulatorRemote.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-tabulator │ ├── build.gradle.kts │ ├── karma.config.d │ │ └── karma.conf.js │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── TabulatorCssBootstrapModule.kt │ │ │ │ ├── TabulatorCssBulmaModule.kt │ │ │ │ ├── TabulatorCssMaterializeModule.kt │ │ │ │ ├── TabulatorCssMidnightModule.kt │ │ │ │ ├── TabulatorCssModernModule.kt │ │ │ │ ├── TabulatorCssSemanticUIModule.kt │ │ │ │ ├── TabulatorCssSimpleModule.kt │ │ │ │ ├── TabulatorCssSiteDarkModule.kt │ │ │ │ ├── TabulatorCssStandardModule.kt │ │ │ │ ├── TabulatorModule.kt │ │ │ │ └── tabulator │ │ │ │ ├── Options.kt │ │ │ │ ├── Tabulator.kt │ │ │ │ ├── TabulatorPagination.kt │ │ │ │ └── js │ │ │ │ ├── Tabulator.kt │ │ │ │ └── Types.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── tabulator │ │ │ └── TabulatorSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-tailwindcss │ ├── build.gradle.kts │ ├── src │ │ ├── jsMain │ │ │ └── kotlin │ │ │ │ └── io │ │ │ │ └── kvision │ │ │ │ ├── TailwindcssModule.kt │ │ │ │ └── theme │ │ │ │ ├── ThemeManager.kt │ │ │ │ └── ThemeSwitcher.kt │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── io │ │ │ └── kvision │ │ │ └── theme │ │ │ └── ThemeSwitcherSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-testutils │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── test │ │ │ ├── Formatting.kt │ │ │ └── TestUtil.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-toastify │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ ├── ToastifyModule.kt │ │ │ └── toast │ │ │ └── Toastify.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js ├── kvision-tom-select-remote │ ├── build.gradle.kts │ ├── src │ │ └── jsMain │ │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ └── form │ │ │ ├── select │ │ │ ├── TomSelectRemote.kt │ │ │ └── TomSelectRemoteInput.kt │ │ │ └── text │ │ │ ├── TomTypeaheadRemote.kt │ │ │ └── TomTypeaheadRemoteInput.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ └── file.js └── kvision-tom-select │ ├── build.gradle.kts │ ├── karma.config.d │ └── karma.conf.js │ ├── src │ ├── jsMain │ │ └── kotlin │ │ │ └── io │ │ │ └── kvision │ │ │ ├── TomSelectDefaultModule.kt │ │ │ ├── TomSelectMinModule.kt │ │ │ ├── TomSelectModule.kt │ │ │ └── form │ │ │ ├── select │ │ │ ├── TomSelect.kt │ │ │ ├── TomSelectCallbacks.kt │ │ │ ├── TomSelectInput.kt │ │ │ ├── TomSelectOptions.kt │ │ │ ├── TomSelectRenders.kt │ │ │ └── js │ │ │ │ └── TomSelectJs.kt │ │ │ └── text │ │ │ ├── TomTypeahead.kt │ │ │ └── TomTypeaheadInput.kt │ └── jsTest │ │ └── kotlin │ │ └── test │ │ └── io │ │ └── kvision │ │ └── form │ │ ├── select │ │ ├── TomSelectInputSpec.kt │ │ └── TomSelectSpec.kt │ │ └── text │ │ ├── TomTypeaheadInputSpec.kt │ │ └── TomTypeaheadSpec.kt │ └── webpack.config.d │ ├── bootstrap.js │ ├── css.js │ └── file.js ├── kvision-tools └── kvision-gradle-plugin │ ├── build.gradle.kts │ └── src │ ├── main │ └── kotlin │ │ └── io │ │ └── kvision │ │ └── gradle │ │ ├── KVisionExtension.kt │ │ ├── KVisionPlugin.kt │ │ ├── dependencyHandlers.kt │ │ ├── exec.kt │ │ └── tasks │ │ ├── KVConvertPoTask.kt │ │ ├── KVGeneratePotTask.kt │ │ ├── KVWorkerBundleTask.kt │ │ └── KVisionTask.kt │ └── test │ ├── kotlin │ └── io │ │ └── kvision │ │ └── gradle │ │ ├── JsTemplateTest.kt │ │ └── util │ │ └── gradleTestKit.kt │ └── resources │ └── template-projects │ ├── kotlin-js │ ├── .gettext.json │ ├── build.gradle.kts │ ├── gradle.properties │ ├── settings.gradle.kts │ ├── src │ │ ├── jsMain │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── App.kt │ │ │ └── resources │ │ │ │ ├── index.html │ │ │ │ └── modules │ │ │ │ ├── css │ │ │ │ └── kvapp.css │ │ │ │ └── i18n │ │ │ │ ├── messages-en.po │ │ │ │ ├── messages-pl.po │ │ │ │ └── messages.pot │ │ └── jsTest │ │ │ └── kotlin │ │ │ └── test │ │ │ └── com │ │ │ └── example │ │ │ └── AppSpec.kt │ └── webpack.config.d │ │ ├── bootstrap.js │ │ ├── css.js │ │ ├── file.js │ │ ├── handlebars.js │ │ └── webpack.js │ └── template-projects.md ├── kvision ├── build.gradle.kts └── src │ ├── jsMain │ └── kotlin │ │ └── io │ │ └── kvision │ │ ├── Application.kt │ │ ├── CoreModule.kt │ │ ├── HMR.kt │ │ ├── KVManager.kt │ │ ├── core │ │ ├── AttributeDelegate.kt │ │ ├── AttributeSetBuilder.kt │ │ ├── ClassSetBuilder.kt │ │ ├── Component.kt │ │ ├── Container.kt │ │ ├── Css.kt │ │ ├── CssClass.kt │ │ ├── DomAttribute.kt │ │ ├── InheritingStyle.kt │ │ ├── SingleObjectCache.kt │ │ ├── Style.kt │ │ ├── StyledComponent.kt │ │ ├── Types.kt │ │ ├── Widget.kt │ │ ├── WidgetSuspendingHandlers.kt │ │ └── WidgetWrapper.kt │ │ ├── form │ │ ├── FieldLabel.kt │ │ ├── FieldLabelCheck.kt │ │ ├── Form.kt │ │ ├── FormControl.kt │ │ ├── FormPanel.kt │ │ ├── HelpText.kt │ │ ├── InvalidFeedback.kt │ │ ├── check │ │ │ ├── CheckBox.kt │ │ │ ├── CheckBoxInput.kt │ │ │ ├── CheckInput.kt │ │ │ ├── GenericRadioGroup.kt │ │ │ ├── GenericRadioGroupInput.kt │ │ │ ├── Radio.kt │ │ │ ├── RadioGroup.kt │ │ │ ├── RadioGroupInput.kt │ │ │ ├── RadioInput.kt │ │ │ ├── TriStateCheckBox.kt │ │ │ └── TriStateCheckBoxInput.kt │ │ ├── number │ │ │ ├── Numeric.kt │ │ │ ├── NumericInput.kt │ │ │ ├── Range.kt │ │ │ ├── RangeInput.kt │ │ │ ├── Spinner.kt │ │ │ └── SpinnerInput.kt │ │ ├── select │ │ │ ├── Select.kt │ │ │ └── SelectInput.kt │ │ ├── text │ │ │ ├── AbstractText.kt │ │ │ ├── AbstractTextInput.kt │ │ │ ├── Mask.kt │ │ │ ├── Password.kt │ │ │ ├── Text.kt │ │ │ ├── TextArea.kt │ │ │ ├── TextAreaInput.kt │ │ │ └── TextInput.kt │ │ └── upload │ │ │ ├── Upload.kt │ │ │ └── UploadInput.kt │ │ ├── html │ │ ├── Address.kt │ │ ├── Article.kt │ │ ├── B.kt │ │ ├── Br.kt │ │ ├── Button.kt │ │ ├── Canvas.kt │ │ ├── Code.kt │ │ ├── CustomTag.kt │ │ ├── Div.kt │ │ ├── Em.kt │ │ ├── Fieldset.kt │ │ ├── Figcaption.kt │ │ ├── Figure.kt │ │ ├── Footer.kt │ │ ├── H1.kt │ │ ├── H2.kt │ │ ├── H3.kt │ │ ├── H4.kt │ │ ├── H5.kt │ │ ├── H6.kt │ │ ├── Header.kt │ │ ├── I.kt │ │ ├── Icon.kt │ │ ├── Iframe.kt │ │ ├── Image.kt │ │ ├── Input.kt │ │ ├── Label.kt │ │ ├── Li.kt │ │ ├── Link.kt │ │ ├── ListTag.kt │ │ ├── Main.kt │ │ ├── Nav.kt │ │ ├── Ol.kt │ │ ├── P.kt │ │ ├── Section.kt │ │ ├── Small.kt │ │ ├── Span.kt │ │ ├── Strong.kt │ │ ├── TBody.kt │ │ ├── Table.kt │ │ ├── Tag.kt │ │ ├── TagMarker.kt │ │ ├── Td.kt │ │ ├── Template.kt │ │ ├── TextNode.kt │ │ ├── Th.kt │ │ ├── Thead.kt │ │ ├── Time.kt │ │ ├── Tr.kt │ │ └── Ul.kt │ │ ├── i18n │ │ ├── I18n.kt │ │ ├── I18nManager.kt │ │ └── SimpleI18nManager.kt │ │ ├── panel │ │ ├── DockPanel.kt │ │ ├── FieldsetPanel.kt │ │ ├── FlexPanel.kt │ │ ├── GridPanel.kt │ │ ├── HPanel.kt │ │ ├── Root.kt │ │ ├── SimplePanel.kt │ │ ├── SplitPanel.kt │ │ ├── StackPanel.kt │ │ └── VPanel.kt │ │ ├── routing │ │ └── RoutingManager.kt │ │ ├── snabbdom │ │ ├── H.kt │ │ ├── Hooks.kt │ │ ├── Init.kt │ │ ├── Modules.kt │ │ ├── On.kt │ │ ├── Patch.kt │ │ └── VNode.kt │ │ ├── state │ │ ├── ObservableState.kt │ │ └── ObservableValue.kt │ │ ├── types │ │ └── Date.kt │ │ └── utils │ │ ├── Cache.kt │ │ ├── Dom.kt │ │ ├── File.kt │ │ ├── JavaScript.kt │ │ ├── Keys.kt │ │ ├── NumberFormat.kt │ │ ├── Result.kt │ │ ├── Serialization.kt │ │ ├── Snabbdom.kt │ │ └── Utils.kt │ └── jsTest │ └── kotlin │ └── test │ └── io │ └── kvision │ ├── KVManagerSpec.kt │ ├── core │ ├── AttributeSetBuilderImplSpec.kt │ ├── ClassSetBuilderImplSpec.kt │ ├── ContainerSpec.kt │ ├── CssSpec.kt │ ├── InheritingStyleSpec.kt │ ├── SingleObjectCacheSpec.kt │ ├── StyleSpec.kt │ ├── WidgetSpec.kt │ └── WidgetWrapperSpec.kt │ ├── form │ ├── FieldLabelSpec.kt │ ├── FormPanelSpec.kt │ ├── FormSpec.kt │ ├── HelpTextSpec.kt │ ├── check │ │ ├── CheckBoxInputSpec.kt │ │ ├── CheckBoxSpec.kt │ │ ├── GenericRadioGroupInputSpec.kt │ │ ├── GenericRadioGroupSpec.kt │ │ ├── RadioGroupInputSpec.kt │ │ ├── RadioGroupSpec.kt │ │ ├── RadioInputSpec.kt │ │ ├── RadioSpec.kt │ │ ├── TriStateCheckBoxInputSpec.kt │ │ └── TriStateCheckBoxSpec.kt │ ├── number │ │ ├── NumericInputSpec.kt │ │ ├── NumericSpec.kt │ │ ├── RangeInputSpec.kt │ │ ├── RangeSpec.kt │ │ ├── SpinnerInputSpec.kt │ │ └── SpinnerSpec.kt │ ├── select │ │ ├── SelectInputSpec.kt │ │ └── SelectSpec.kt │ └── text │ │ ├── PasswordSpec.kt │ │ ├── TextAreaInputSpec.kt │ │ ├── TextAreaSpec.kt │ │ ├── TextInputSpec.kt │ │ └── TextSpec.kt │ ├── html │ ├── AddressSpec.kt │ ├── ArticleSpec.kt │ ├── BSpec.kt │ ├── BrSpec.kt │ ├── ButtonSpec.kt │ ├── CanvasSpec.kt │ ├── CodeSpec.kt │ ├── CustomTagSpec.kt │ ├── DivSpec.kt │ ├── EmSpec.kt │ ├── FieldsetSpec.kt │ ├── FigcaptionSpec.kt │ ├── FigureSpec.kt │ ├── FooterSpec.kt │ ├── H1Spec.kt │ ├── H2Spec.kt │ ├── H3Spec.kt │ ├── H4Spec.kt │ ├── H5Spec.kt │ ├── H6Spec.kt │ ├── HeaderSpec.kt │ ├── ISpec.kt │ ├── IconSpec.kt │ ├── IframeSpec.kt │ ├── ImageSpec.kt │ ├── InputSpec.kt │ ├── LabelSpec.kt │ ├── LiSpec.kt │ ├── LinkSpec.kt │ ├── ListTagSpec.kt │ ├── NavSpec.kt │ ├── OlSpec.kt │ ├── PSpec.kt │ ├── SectionSpec.kt │ ├── SmallSpec.kt │ ├── SpanSpec.kt │ ├── StrongSpec.kt │ ├── TableSpec.kt │ ├── TagSpec.kt │ ├── TextNodeSpec.kt │ ├── TimeSpec.kt │ └── UlSpec.kt │ ├── panel │ ├── DockPanelSpec.kt │ ├── FieldsetPanelSpec.kt │ ├── FlexPanelSpec.kt │ ├── GridPanelSpec.kt │ ├── HPanelSpec.kt │ ├── RootSpec.kt │ ├── SplitPanelSpec.kt │ ├── StackPanelSpec.kt │ └── VPanelSpec.kt │ └── utils │ ├── JavaScriptSpec.kt │ └── UtilsSpec.kt ├── package.json.d └── project.info ├── settings.gradle.kts ├── versions.json ├── versions5.json ├── versions6.json ├── versions7.json ├── versions8.json ├── versions9.json └── webpack.config.d ├── bootstrap.js ├── css.js ├── file.js └── handlebars.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: [ master ] 5 | pull_request: 6 | branches: [ master ] 7 | 8 | workflow_dispatch: 9 | 10 | # This allows a subsequently queued workflow run to interrupt previous runs 11 | concurrency: 12 | group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' 13 | cancel-in-progress: true 14 | 15 | jobs: 16 | build: 17 | runs-on: ubuntu-latest 18 | timeout-minutes: 60 19 | 20 | steps: 21 | - uses: actions/checkout@v3 22 | 23 | - name: set up JDK 24 | uses: actions/setup-java@v3 25 | with: 26 | java-version: 21 27 | distribution: temurin 28 | 29 | - name: Setup Gradle 30 | uses: gradle/gradle-build-action@v2 31 | 32 | - name: Run all tests 33 | run: ./gradlew check -x :kvision-tools:kvision-gradle-plugin:check 34 | 35 | - name: Test Report 36 | uses: dorny/test-reporter@v1 37 | if: success() || failure() 38 | with: 39 | name: Karma JUnit Tests 40 | path: build/reports/junit/*.xml 41 | reporter: java-junit 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/ 2 | .idea/ 3 | .kotlin/ 4 | build/ 5 | *.iml 6 | /build-mvn.sh 7 | /build-mvnlocal.sh 8 | /upload.sh 9 | /src/main/kotlin/pl/treksoft/kvision/KVision.kt 10 | /src/main/kotlin/pl/treksoft/kvision/Main.kt 11 | /package-lock.json 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to KVision 2 | 3 | :+1::tada: Thanks for taking the time to contribute! :tada::+1: 4 | 5 | ## How to contribute 6 | 7 | - Use KVision in your applications to test the framework :smile: 8 | - Report bugs or feature requests by creating GitHub issues. 9 | - Fix existing bugs. 10 | - Implement new features and modules. 11 | 12 | ## How to develop KVision 13 | 14 | 1. You need JDK 21 or later installed on your system. 15 | 2. Clone the code repository (create a fork if you want to make pull requests with your changes). 16 | 3. Make your changes to KVision code. 17 | 4. Run tests with `./gradlew check` command to check if everything is OK. 18 | 5. Compile and publish artifacts to your local Maven repository with `./gradlew publishToMavenLocal -PSNAPSHOT=true` command. It will automatically publish a `*-SNAPSHOT` version. 19 | 6. Use your snapshot of KVision by specifying the correct version number in your application (in `gradle.properties` file). Remember to clean your project every time you publish new version of the framework. 20 | 21 | ## How to create new module 22 | 23 | 1. Copy one of exising module directories with new name (choose the module most similar to the one you create). 24 | 2. Add new module name to the list in the `settings.gradle.kts` file and to the `dokka` task in the `build.gradle.kts` file. 25 | 3. Remove copied code and start writing your own. 26 | 27 | ## Where to get help 28 | 29 | Ask questions on Kotlin Slack [KVision channel](https://kotlinlang.slack.com/?redir=%2Fmessages%2FCL4C1SLKC). 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017-present Robert Jaros 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | repositories { 6 | mavenCentral() 7 | gradlePluginPortal() 8 | } 9 | 10 | dependencies { 11 | implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.asProvider().get()}") 12 | implementation("org.jetbrains.dokka:dokka-gradle-plugin:${libs.versions.dokka.get()}") 13 | implementation(gradleApi()) 14 | } 15 | -------------------------------------------------------------------------------- /buildSrc/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | versionCatalogs { 3 | create("libs") { 4 | from(files("../gradle/libs.versions.toml")) 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx6g 2 | org.gradle.parallel=true 3 | org.gradle.caching=true 4 | #org.gradle.unsafe.configuration-cache=true 5 | #org.gradle.unsafe.configuration-cache-problems=warn 6 | org.gradle.kotlin.dsl.precompiled.accessors.strict=true 7 | 8 | kotlin.mpp.stability.nowarn=true 9 | kotlin.code.style=official 10 | org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled 11 | org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true 12 | org.jetbrains.dokka.experimental.tryK2=true 13 | org.jetbrains.dokka.experimental.tryK2.nowarn=true 14 | kotlin.js.ir.output.granularity=per-file 15 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rjaros/kvision/e08db2595c1ca40d80a9763491e216baf61b7f27/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /graphics/kvision-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rjaros/kvision/e08db2595c1ca40d80a9763491e216baf61b7f27/graphics/kvision-logo.png -------------------------------------------------------------------------------- /karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-assets/README.md: -------------------------------------------------------------------------------- 1 | ![KVision Logo](graphics/kvision-logo.png?raw=true "KVision") 2 | # KVision 3 | 4 | Object oriented web framework for Kotlin/JS. 5 | 6 | [https://kvision.io](https://kvision.io) 7 | 8 | [![API](https://img.shields.io/badge/API-dokka-green)](https://rjaros.github.io/kvision/index.html) 9 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 10 | [![Slack](https://img.shields.io/badge/slack-channel-green?logo=slack)](https://kotlinlang.slack.com/?redir=%2Fmessages%2FCL4C1SLKC) 11 | 12 | KVision allows you to build modern web applications with the [Kotlin](https://kotlinlang.org) language, 13 | without any use of HTML, CSS or JavaScript. It gives you a rich hierarchy of ready to use GUI components, 14 | which can be used as builder blocks for the application UI. 15 | -------------------------------------------------------------------------------- /kvision-assets/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.npm.publish) 3 | } 4 | 5 | npmPublish { 6 | dry.set(System.getenv("NPM_AUTH_TOKEN") == null) 7 | readme.set(file("README.md")) 8 | packages { 9 | register("zzz-kvision-assets") { 10 | packageName.set("zzz-kvision-assets") 11 | files { 12 | from("$projectDir/src") 13 | } 14 | packageJson { 15 | main.set("index.js") 16 | version.set("9.0.0") 17 | description.set("The assets for the KVision framework") 18 | keywords.set(listOf("kvision", "kotlin")) 19 | homepage.set("https://kvision.io") 20 | license.set("MIT") 21 | repository { 22 | type.set("git") 23 | url.set("git+https://github.com/rjaros/kvision.git") 24 | } 25 | author { 26 | name.set("Robert Jaros") 27 | } 28 | bugs { 29 | url.set("https://github.com/rjaros/kvision/issues") 30 | } 31 | } 32 | } 33 | } 34 | registries { 35 | register("npmjs") { 36 | uri.set("https://registry.npmjs.org") 37 | authToken.set(System.getenv("NPM_AUTH_TOKEN")) 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /kvision-assets/src/css/kv-bootstrap-upload.css: -------------------------------------------------------------------------------- 1 | .kv-preview-thumb .btn, .kv-zoom-actions .btn, .file-zoom-dialog .floating-buttons .btn { 2 | padding: 5px 8px; 3 | } 4 | 5 | .file-drop-zone.clickable:hover { 6 | border: 1px dashed #999; 7 | } 8 | 9 | .file-drop-zone.clickable:focus { 10 | border: 1px solid #5acde2; 11 | } 12 | 13 | .kv-focus { 14 | border-radius: 0.25rem; 15 | outline-width: 0px; 16 | box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25); 17 | } 18 | 19 | .kv-focus .kv-fileinput-caption { 20 | border-color: #80bdff; 21 | } 22 | -------------------------------------------------------------------------------- /kvision-assets/src/css/kv-tempus-dominus.css: -------------------------------------------------------------------------------- 1 | .input-group.date.is-invalid ~ .invalid-feedback { 2 | display: block; 3 | } 4 | 5 | .input-group.date { 6 | padding-left: 0px; 7 | padding-right: 0px; 8 | } 9 | -------------------------------------------------------------------------------- /kvision-assets/src/css/kv-toastify.css: -------------------------------------------------------------------------------- 1 | .toastify { 2 | background-image: unset; 3 | background-color: blue; 4 | } 5 | 6 | .kv-toastify-primary { 7 | color: #fff !important; 8 | background-color: rgba(13,110,253) !important; 9 | } 10 | 11 | .kv-toastify-secondary { 12 | color: #fff !important; 13 | background-color: rgba(108,117,125) !important; 14 | } 15 | 16 | .kv-toastify-success { 17 | color: #fff !important; 18 | background-color: rgba(25,135,84) !important; 19 | } 20 | 21 | .kv-toastify-info { 22 | color: #000 !important; 23 | background-color: rgba(13,202,240) !important; 24 | } 25 | 26 | .kv-toastify-warning { 27 | color: #000 !important; 28 | background-color: rgba(255,193,7) !important; 29 | } 30 | 31 | .kv-toastify-danger { 32 | color: #fff !important; 33 | background-color: rgba(220,53,69) !important; 34 | } 35 | 36 | .kv-toastify-light { 37 | color: #000 !important; 38 | background-color: rgba(248,249,250) !important; 39 | } 40 | 41 | .kv-toastify-dark { 42 | color: #fff !important; 43 | background-color: rgba(33,37,41) !important; 44 | } 45 | -------------------------------------------------------------------------------- /kvision-assets/src/css/kv-trix.css: -------------------------------------------------------------------------------- 1 | .trix-control { 2 | overflow-y: auto; 3 | } 4 | 5 | trix-toolbar .trix-button-group { 6 | margin-bottom: 3px !important; 7 | } 8 | 9 | @media (min-width: 576px) { 10 | 11 | .form-inline .form-control.trix-control { 12 | display: block; 13 | width: 100%; 14 | } 15 | 16 | } 17 | 18 | [data-bs-theme="dark"] trix-toolbar .trix-button { 19 | background: #fff !important; 20 | } 21 | -------------------------------------------------------------------------------- /kvision-assets/src/img/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rjaros/kvision/e08db2595c1ca40d80a9763491e216baf61b7f27/kvision-assets/src/img/placeholder.png -------------------------------------------------------------------------------- /kvision-assets/src/index.js: -------------------------------------------------------------------------------- 1 | // Empty file 2 | -------------------------------------------------------------------------------- /kvision-modules/kvision-ballast/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(project(":kvision-modules:kvision-state-flow")) 18 | api(libs.ballast.core) 19 | api(libs.ballast.saved.state) 20 | api(libs.ballast.repository) 21 | api(libs.ballast.sync) 22 | api(libs.ballast.undo) 23 | } 24 | } 25 | val jsTest by getting { 26 | dependencies { 27 | implementation(kotlin("test-js")) 28 | } 29 | } 30 | } 31 | } 32 | 33 | setupDokka(tasks.dokkaGeneratePublicationHtml) 34 | setupPublication() 35 | -------------------------------------------------------------------------------- /kvision-modules/kvision-ballast/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-ballast/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-ballast/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-icons/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("bootstrap-icons", libs.versions.bootstrap.icons.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-icons/src/jsMain/kotlin/io/kvision/BootstrapIconsModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision 24 | 25 | import io.kvision.utils.useModule 26 | 27 | @JsModule("bootstrap-icons/font/bootstrap-icons.css") 28 | internal external val bootstrapIconsCss: dynamic 29 | 30 | /** 31 | * Initializer for Bootstrap Icons module. 32 | */ 33 | object BootstrapIconsModule : ModuleInitializer { 34 | 35 | override fun initialize() { 36 | useModule(bootstrapIconsCss) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-icons/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-icons/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-icons/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-upload/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision-modules:kvision-common-types")) 17 | api(project(":kvision-modules:kvision-jquery")) 18 | api(project(":kvision-modules:kvision-bootstrap")) 19 | api(project(":kvision")) 20 | implementation(npm("bootstrap-fileinput", libs.versions.bootstrap.fileinput.get())) 21 | } 22 | } 23 | val jsTest by getting { 24 | dependencies { 25 | implementation(kotlin("test-js")) 26 | implementation(project(":kvision-modules:kvision-testutils")) 27 | } 28 | } 29 | } 30 | } 31 | 32 | setupDokka(tasks.dokkaGeneratePublicationHtml) 33 | setupPublication() 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-upload/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-bootstrap-upload.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-upload/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-upload/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap-upload/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("@popperjs/core", libs.versions.popperjs.core.get())) 18 | implementation(npm("bootstrap", libs.versions.bootstrap.asProvider().get())) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | implementation(project(":kvision-modules:kvision-testutils")) 25 | implementation(project(":kvision-modules:kvision-jquery")) 26 | } 27 | } 28 | } 29 | } 30 | 31 | setupDokka(tasks.dokkaGeneratePublicationHtml) 32 | setupPublication() 33 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-bootstrap.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/src/jsMain/kotlin/io/kvision/BootstrapCssCoreModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision 24 | 25 | import io.kvision.utils.useModule 26 | 27 | /** 28 | * Initializer for Bootstrap CSS module. 29 | */ 30 | object BootstrapCssCoreModule : ModuleInitializer { 31 | 32 | override fun initialize() { 33 | useModule(kvBootstrapCss) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/src/jsMain/kotlin/io/kvision/core/Bootstrap.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.core 24 | 25 | @JsModule("bootstrap") 26 | external object Bootstrap { 27 | val Dropdown: dynamic 28 | val Tooltip: dynamic 29 | val Popover: dynamic 30 | val Modal: dynamic 31 | val Toast: dynamic 32 | val Offcanvas: dynamic 33 | } 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/src/jsMain/kotlin/io/kvision/progress/Bounds.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2020 Yannik Hampe 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision.progress 25 | 26 | /** 27 | * Generic progress bounds. 28 | */ 29 | data class Bounds(val min: T, val max: T) 30 | 31 | /** 32 | * Calculate fraction for the given value and bounds. 33 | */ 34 | fun Bounds.fraction(value: Double): Double { 35 | val minDouble = min.toDouble() 36 | val maxDouble = max.toDouble() 37 | return (value - minDouble) / (maxDouble - minDouble) 38 | } 39 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/src/jsMain/kotlin/io/kvision/progress/ContentGenerator.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2020 Yannik Hampe 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision.progress 25 | 26 | import io.kvision.html.Tag 27 | 28 | /** 29 | * Generic interface for progress content generator. 30 | */ 31 | fun interface ContentGenerator { 32 | fun generateContent(tag: Tag, value: T, bounds: Bounds) 33 | } 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/src/jsTest/kotlin/test/io/kvision/badge/BadgeSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.badge 2 | 3 | import io.kvision.badge.BadgePosition 4 | import io.kvision.badge.badge 5 | import io.kvision.html.button 6 | import io.kvision.html.div 7 | import io.kvision.panel.Root 8 | import io.kvision.test.DomSpec 9 | import kotlinx.browser.document 10 | import kotlin.test.Test 11 | 12 | class BadgeSpec: DomSpec { 13 | 14 | @Test 15 | fun render() { 16 | run { 17 | Root("test", containerType = io.kvision.panel.ContainerType.FIXED) { 18 | div { 19 | button("") { 20 | badge("MR", position = BadgePosition.MIDDLE_RIGHT) 21 | } 22 | } 23 | } 24 | val element = document.getElementById("test") 25 | assertEqualsHtml("""
""", 26 | element?.innerHTML, 27 | "Should render correct badge components") 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-bootstrap/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("chart.js", libs.versions.chartjs.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | implementation(project(":kvision-modules:kvision-testutils")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-chart.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/src/jsMain/kotlin/io/kvision/ChartModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | /** 25 | * Initializer for KVision chart module. 26 | */ 27 | object ChartModule : ModuleInitializer { 28 | 29 | override fun initialize() { 30 | // Workaround CommonJS problems with Chart.js 4 31 | js("import('chart.js/auto')") 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/src/jsMain/kotlin/io/kvision/chart/js/Basic.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | @file:Suppress("UNUSED_TYPEALIAS_PARAMETER") 24 | 25 | package io.kvision.chart.js 26 | 27 | import io.kvision.utils.Object 28 | 29 | typealias Record = Object 30 | 31 | typealias AnyObject = Record 32 | 33 | typealias EmptyObject = Record 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/src/jsMain/kotlin/io/kvision/chart/js/Element.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.chart.js 24 | 25 | external interface Element { 26 | var x: Number 27 | var y: Number 28 | var active: Boolean 29 | var options: AnyObject 30 | fun tooltipPosition(useFinalPosition: Boolean = definedExternally): Point 31 | fun hasValue(): Boolean 32 | fun

> getProps(props: P, final: Boolean = definedExternally): Any 33 | } 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/src/jsMain/kotlin/io/kvision/chart/js/Geometric.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.chart.js 24 | 25 | external interface ChartArea { 26 | var top: Number 27 | var left: Number 28 | var right: Number 29 | var bottom: Number 30 | var width: Number 31 | var height: Number 32 | } 33 | 34 | external interface Point { 35 | var x: Number 36 | var y: Number 37 | } -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-chart/webpack.config.d/webpack.js: -------------------------------------------------------------------------------- 1 | config.resolve.conditionNames = ['import', 'require', 'default']; 2 | -------------------------------------------------------------------------------- /kvision-modules/kvision-common-remote/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | kotlinJvmTargets() 14 | sourceSets { 15 | val commonMain by getting { 16 | dependencies { 17 | api(libs.kotlinx.coroutines.core) 18 | api(libs.kotlinx.serialization.json) 19 | api(project(":kvision-modules:kvision-common-types")) 20 | api(libs.kilua.rpc.core) 21 | } 22 | } 23 | val jsMain by getting { 24 | dependencies { 25 | } 26 | } 27 | val jsTest by getting { 28 | dependencies { 29 | implementation(kotlin("test-js")) 30 | implementation(project(":kvision-modules:kvision-testutils")) 31 | } 32 | } 33 | val jvmMain by getting { 34 | dependencies { 35 | } 36 | } 37 | val jvmTest by getting { 38 | dependencies { 39 | } 40 | } 41 | } 42 | } 43 | 44 | setupDokka(tasks.dokkaGeneratePublicationHtml) 45 | setupPublication() 46 | -------------------------------------------------------------------------------- /kvision-modules/kvision-common-remote/src/commonMain/kotlin/io/kvision/remote/RegisterRemoteTypes.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.remote 24 | 25 | expect fun registerRemoteTypes() 26 | -------------------------------------------------------------------------------- /kvision-modules/kvision-common-types/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | kotlinJvmTargets() 14 | sourceSets { 15 | val commonMain by getting { 16 | dependencies { 17 | api(libs.kotlinx.serialization.json) 18 | } 19 | } 20 | val jsMain by getting { 21 | dependencies { 22 | } 23 | } 24 | val jvmMain by getting { 25 | dependencies { 26 | } 27 | } 28 | } 29 | } 30 | 31 | setupDokka(tasks.dokkaGeneratePublicationHtml) 32 | setupPublication() 33 | -------------------------------------------------------------------------------- /kvision-modules/kvision-common-types/src/commonMain/kotlin/io/kvision/types/Date.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.types 23 | 24 | expect class LocalDateTime 25 | 26 | expect class LocalDate 27 | 28 | expect class LocalTime 29 | 30 | expect class OffsetDateTime 31 | 32 | expect class OffsetTime 33 | 34 | expect class ZonedDateTime 35 | -------------------------------------------------------------------------------- /kvision-modules/kvision-common-types/src/jsMain/kotlin/io/kvision/types/Date.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.types 23 | 24 | import kotlin.js.Date 25 | 26 | var KV_DEFAULT_DATE_FORMAT = "YYYY-MM-DD HH:mm:ss" 27 | 28 | actual typealias LocalDateTime = Date 29 | 30 | actual typealias LocalDate = Date 31 | 32 | actual typealias LocalTime = Date 33 | 34 | actual typealias OffsetDateTime = Date 35 | 36 | actual typealias OffsetTime = Date 37 | 38 | actual typealias ZonedDateTime = Date 39 | -------------------------------------------------------------------------------- /kvision-modules/kvision-datetime/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("@popperjs/core", libs.versions.popperjs.core.get())) 18 | implementation(npm("@eonasdan/tempus-dominus", libs.versions.tempus.dominus.get())) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | implementation(project(":kvision-modules:kvision-testutils")) 25 | } 26 | } 27 | } 28 | } 29 | 30 | setupDokka(tasks.dokkaGeneratePublicationHtml) 31 | setupPublication() 32 | -------------------------------------------------------------------------------- /kvision-modules/kvision-datetime/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-datetime.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-datetime/src/jsMain/kotlin/io/kvision/TempusDominus.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("@eonasdan/tempus-dominus") 2 | /* 3 | * Copyright (c) 2023 Robert Jaros 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision 25 | 26 | import org.w3c.dom.HTMLElement 27 | 28 | /** 29 | * Tempus Dominus class. 30 | */ 31 | internal external class TempusDominus(element: HTMLElement, options: dynamic) 32 | -------------------------------------------------------------------------------- /kvision-modules/kvision-datetime/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-datetime/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-datetime/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-fontawesome/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("@fortawesome/fontawesome-free", libs.versions.fontawesome.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-fontawesome/src/jsMain/kotlin/io/kvision/FontAwesomeModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("@fortawesome/fontawesome-free/css/all.min.css") 27 | internal external val fontAwesomeCss: dynamic 28 | 29 | /** 30 | * Initializer for KVision Font Awesome module. 31 | */ 32 | object FontAwesomeModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(fontAwesomeCss) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-fontawesome/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-fontawesome/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-fontawesome/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-handlebars/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("handlebars", libs.versions.handlebars.asProvider().get())) 18 | implementation(npm("handlebars-loader", libs.versions.handlebars.loader.get())) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-handlebars/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-handlebars.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-handlebars/src/jsMain/kotlin/io/kvision/HandlebarsModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("handlebars/dist/handlebars.runtime.js") 27 | internal external val handlebars: dynamic 28 | 29 | /** 30 | * Initializer for KVision handlebars module. 31 | */ 32 | object HandlebarsModule : ModuleInitializer { 33 | 34 | override fun initialize() { 35 | useModule(handlebars) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /kvision-modules/kvision-handlebars/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-handlebars/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-handlebars/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-i18n/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | } 18 | } 19 | val jsTest by getting { 20 | dependencies { 21 | implementation(kotlin("test-js")) 22 | } 23 | } 24 | } 25 | } 26 | 27 | setupDokka(tasks.dokkaGeneratePublicationHtml) 28 | setupPublication() 29 | -------------------------------------------------------------------------------- /kvision-modules/kvision-i18n/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-i18n/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-i18n/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-imask/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("imask", libs.versions.imask.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | implementation(project(":kvision-modules:kvision-testutils")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-imask/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-imask.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-imask/src/jsMain/kotlin/io/kvision/ImaskModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.form.text.ImaskFactory 25 | import io.kvision.form.text.MaskManager 26 | 27 | @JsModule("imask/esm/index.js") 28 | internal external val imaskJs: dynamic 29 | 30 | /** 31 | * Initializer for KVision imask module. 32 | */ 33 | object ImaskModule : ModuleInitializer { 34 | internal val imask = imaskJs 35 | 36 | override fun initialize() { 37 | MaskManager.factory = ImaskFactory(imask) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /kvision-modules/kvision-imask/src/jsMain/kotlin/io/kvision/form/text/ImaskFactory.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.form.text 23 | 24 | import org.w3c.dom.HTMLElement 25 | 26 | class ImaskFactory(private val imask: dynamic) : MaskFactory { 27 | 28 | override fun createMask(element: HTMLElement, options: MaskOptions): Mask { 29 | return Imask(imask(element, options.unsafeCast().toJs(imask))) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kvision-modules/kvision-imask/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-imask/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-imask/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-jquery/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(libs.jquery.kotlin) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-jquery/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-jquery/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-jquery/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("leaflet", libs.versions.leaflet.get())) 18 | implementation(npm("geojson", libs.versions.geojson.get())) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | implementation(project(":kvision-modules:kvision-testutils")) 25 | implementation(project.dependencies.platform("io.kotest:kotest-bom:${libs.versions.kotest.get()}")) 26 | implementation("io.kotest:kotest-assertions-core") 27 | } 28 | } 29 | } 30 | } 31 | 32 | setupDokka(tasks.dokkaGeneratePublicationHtml) 33 | setupPublication() 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-maps.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/src/jsMain/kotlin/io/kvision/maps/externals/geojson/position.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.maps.externals.geojson 24 | 25 | typealias Position = Array 26 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/src/jsMain/kotlin/io/kvision/maps/externals/leaflet/callback.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.maps.externals.leaflet 24 | 25 | import org.w3c.dom.HTMLElement 26 | 27 | typealias DoneCallback = (error: Error, tile: HTMLElement) -> Unit 28 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/src/jsMain/kotlin/io/kvision/maps/externals/leaflet/geo/Coords.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | @file:JsModule("leaflet/dist/leaflet-src.esm.js") 24 | 25 | package io.kvision.maps.externals.leaflet.geo 26 | 27 | import io.kvision.maps.externals.leaflet.geometry.Point 28 | 29 | 30 | open external class Coords : Point { 31 | var z: Number 32 | } 33 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/src/jsMain/kotlin/io/kvision/maps/externals/leaflet/layer/overlay/MediaOverlay.kt: -------------------------------------------------------------------------------- 1 | package io.kvision.maps.externals.leaflet.layer.overlay 2 | 3 | import io.kvision.maps.externals.leaflet.geo.LatLngBounds 4 | 5 | /** 6 | * Artificial interface that does not represent a Leaflet type. It is used to align 7 | * [ImageOverlay], [SVGOverlay], and [VideoOverlay], because [getElement] and methods that return 8 | * `this` are dynamic. 9 | */ 10 | external interface MediaOverlay { 11 | fun getElement(): dynamic 12 | 13 | fun setOpacity(opacity: Number): dynamic /* this */ 14 | fun bringToFront(): dynamic /* this */ 15 | fun bringToBack(): dynamic /* this */ 16 | fun setUrl(url: String): dynamic /* this */ 17 | fun setBounds(bounds: LatLngBounds): dynamic /* this */ 18 | fun setZIndex(value: Number): dynamic /* this */ 19 | } 20 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/src/jsMain/kotlin/io/kvision/maps/externals/leaflet/layer/styleFunction.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.maps.externals.leaflet.layer 24 | 25 | import io.kvision.maps.externals.geojson.Feature 26 | import io.kvision.maps.externals.geojson.GeoJsonGeometry 27 | import io.kvision.maps.externals.leaflet.layer.vector.Path 28 | 29 | typealias StyleFunction = (feature: Feature) -> Path.PathOptions 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/src/jsMain/kotlin/io/kvision/maps/externals/leaflet/unionAliases.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.maps.externals.leaflet 24 | 25 | 26 | /** `topleft` | `topright` | `bottomleft` | `bottomright` */ 27 | typealias PositionsUnion = String 28 | 29 | /** `right` | `left` | `top` | `bottom` | `center` | `auto` */ 30 | typealias DirectionsUnion = String 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-maps/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("@material/web", libs.versions.material.web.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | implementation(project(":kvision-modules:kvision-testutils")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-material.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/MaterialAllJs.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("@material/web/all.js") 2 | /* 3 | * Copyright (c) 2017-present Robert Jaros 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision 25 | 26 | internal external val MdTextButton: dynamic 27 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/MaterialModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision 24 | 25 | import io.kvision.utils.useModule 26 | import kotlinx.browser.document 27 | 28 | /** 29 | * @author Maanrifa Bacar Ali 30 | */ 31 | object MaterialModule : ModuleInitializer { 32 | 33 | override fun initialize() { 34 | useModule(MdTextButton) 35 | document.asDynamic().adoptedStyleSheets.push(styles.styleSheet) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/MaterialStyles.kt.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("@material/web/typography/md-typescale-styles.js") 2 | /* 3 | * Copyright (c) 2017-present Robert Jaros 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision 25 | 26 | internal external val styles: dynamic 27 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/ExperimentalMaterialApi.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material 24 | 25 | @RequiresOptIn( 26 | message = "This material API is experimental. It may be changed in the future without notice." 27 | ) 28 | @Retention(AnnotationRetention.BINARY) 29 | @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) 30 | annotation class ExperimentalMaterialApi 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/chips/RemovableChip.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.chips 24 | 25 | /** 26 | * Chip which displays a remove button. 27 | */ 28 | interface RemovableChip 29 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/menu/MaterialMenuDsl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.menu 24 | 25 | /** 26 | * DSL Marker for menu building. 27 | */ 28 | @DslMarker 29 | @Target(AnnotationTarget.CLASS, AnnotationTarget.TYPE) 30 | annotation class MaterialMenuDsl 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/textfield/MaterielUnsupportedTextFieldType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.textfield 24 | 25 | @RequiresOptIn( 26 | message = "This text field type is not fully supported and may not behave as expected.", 27 | level = RequiresOptIn.Level.WARNING 28 | ) 29 | @Retention(AnnotationRetention.BINARY) 30 | @Target(AnnotationTarget.FIELD) 31 | annotation class MaterielUnsupportedTextFieldType 32 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/util/Assert.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.util 24 | 25 | import io.kvision.core.Widget 26 | 27 | internal fun Widget.requireElementD(): dynamic { 28 | return checkNotNull(getElementD()) { "DOM element has not been created." } 29 | } 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/util/Attribute.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.util 24 | 25 | import io.kvision.core.AttributeSetBuilder 26 | 27 | internal fun AttributeSetBuilder.addBool(name: String, value: Boolean = true) { 28 | add(name, value.toString()) 29 | } 30 | 31 | internal fun AttributeSetBuilder.add(name: String, value: Any) { 32 | add(name, value.toString()) 33 | } 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/util/Number.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.util 24 | 25 | /** 26 | * Whether a [Number] is NaN. 27 | */ 28 | @Suppress("SENSELESS_COMPARISON") 29 | internal fun Number?.isNaN(): Boolean { 30 | if (this === null || this === undefined) { 31 | return true 32 | } 33 | 34 | return this !== this 35 | } 36 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/widget/Corner.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.widget 24 | 25 | enum class Corner(internal val value: String) { 26 | EndStart("end-start"), 27 | EndEnd("end-end"), 28 | StartEnd("start-end"), 29 | StartStart("start-start") 30 | } 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/widget/FocusState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.widget 24 | 25 | enum class FocusState(internal val value: String) { 26 | FirstItem("first-item"), 27 | LastItem("last-item"), 28 | ListRoot("list-root"), 29 | None("none") 30 | } 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/widget/LinkTarget.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.widget 24 | 25 | sealed class LinkTarget(internal val value: String) { 26 | data object Blank: LinkTarget("_blank") 27 | data object Self: LinkTarget("_self") 28 | data object Parent: LinkTarget("_parent") 29 | data object Top: LinkTarget("_top") 30 | class Frame(name: String): LinkTarget(name) 31 | } 32 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsMain/kotlin/io/kvision/material/widget/TouchTarget.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2024 Maanrifa Bacar Ali 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | package io.kvision.material.widget 24 | 25 | enum class TouchTarget(internal val value: String) { 26 | None("none"), 27 | Wrapper("wrapper") 28 | } 29 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/button/ButtonSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.button 2 | 3 | import io.kvision.material.ExperimentalMaterialApi 4 | import io.kvision.material.button.MdTextButton 5 | import io.kvision.panel.Root 6 | import io.kvision.test.DomSpec 7 | import kotlinx.browser.document 8 | import kotlin.test.Test 9 | 10 | /** 11 | * TODO 12 | */ 13 | class ButtonSpec : DomSpec { 14 | @OptIn(ExperimentalMaterialApi::class) 15 | @Test 16 | fun render() { 17 | run { 18 | val root = Root("test", containerType = io.kvision.panel.ContainerType.FIXED) 19 | root.add(MdTextButton("Test Button", className = "test-button")) 20 | val element = document.getElementById("test") 21 | assertEqualsHtml( 22 | "Test Button", 23 | element?.innerHTML, 24 | "Should render Material Text Button correctly" 25 | ) 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/checkbox/CheckboxSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.checkbox 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class CheckboxSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/chips/ChipSetSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.chips 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class ChipSetSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/chips/ChipSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.chips 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class ChipSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/dialog/DialogSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.dialog 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class DialogSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/divider/DividerSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.divider 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class DividerSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/fab/FabSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.fab 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class FabSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/icon/IconSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.icon 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class IconSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/iconbutton/IconButtonSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.iconbutton 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class IconButtonSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/list/ListItemSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.list 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class ListItemSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/list/ListSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.list 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class ListSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/menu/MenuItemSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.menu 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class MenuItemSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/menu/MenuSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.menu 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class MenuSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/menu/SubMenuSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.menu 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class SubMenuSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/progress/CircularProgressSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.progress 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class CircularProgressSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/progress/LinearProgressSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.progress 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class LinearProgressSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/radio/RadioSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.radio 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class RadioSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/ripple/RippleSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.ripple 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class RippleSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/select/SelectOptionSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.select 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class SelectOptionSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/select/SelectSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.select 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class SelectSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/slider/RangeSliderSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.slider 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class RangeSliderSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/slider/SliderSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.slider 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class SliderSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/switch/SwitchSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.switch 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class SwitchSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/tabs/TabSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.tabs 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class TabSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/tabs/TabsSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.tabs 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class TabsSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/src/jsTest/kotlin/test/io/kvision/material/textfield/TextFieldSpec.kt: -------------------------------------------------------------------------------- 1 | package test.io.kvision.material.textfield 2 | 3 | import io.kvision.test.DomSpec 4 | 5 | /** 6 | * TODO 7 | */ 8 | class TextFieldSpec: DomSpec { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-material/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-pace/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("pace-progressbar", libs.versions.pace.progressbar.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-pace/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-pace/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-pace/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-print/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("print-js", libs.versions.printjs.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-print/src/jsMain/kotlin/io/kvision/PrintJs.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("print-js") 2 | /* 3 | * Copyright (c) 2017-present Robert Jaros 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision 25 | 26 | @JsName("default") 27 | internal external fun printJS(options: dynamic = definedExternally, type: String = definedExternally): Unit 28 | -------------------------------------------------------------------------------- /kvision-modules/kvision-print/src/jsMain/kotlin/io/kvision/PrintModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("print-js/dist/print.css") 27 | internal external val printCss: dynamic 28 | 29 | /** 30 | * Initializer for KVision Print module. 31 | */ 32 | object PrintModule : ModuleInitializer { 33 | 34 | internal var counter = 0 35 | 36 | override fun initialize() { 37 | useModule(printCss) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /kvision-modules/kvision-print/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-print/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-print/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-react/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(libs.kotlin.react) 18 | api(libs.kotlin.react.dom) 19 | implementation(npm("react", libs.versions.react.get())) 20 | implementation(npm("react-dom", libs.versions.react.get())) 21 | } 22 | } 23 | val jsTest by getting { 24 | dependencies { 25 | implementation(kotlin("test-js")) 26 | implementation(project(":kvision-modules:kvision-testutils")) 27 | } 28 | } 29 | } 30 | } 31 | 32 | setupDokka(tasks.dokkaGeneratePublicationHtml) 33 | setupPublication() 34 | -------------------------------------------------------------------------------- /kvision-modules/kvision-react/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-react.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-react/src/jsMain/kotlin/io/kvision/ReactModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | @JsModule("react-dom") 25 | internal external val reactDomModule: dynamic 26 | 27 | /** 28 | * Initializer for KVision React module. 29 | */ 30 | object ReactModule : ModuleInitializer { 31 | 32 | internal val reactDom = reactDomModule 33 | 34 | override fun initialize() {} 35 | } 36 | -------------------------------------------------------------------------------- /kvision-modules/kvision-react/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-react/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-react/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-redux-kotlin/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(libs.redux.kotlin) 18 | api(libs.redux.kotlin.thunk) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | implementation(project(":kvision-modules:kvision-testutils")) 25 | implementation(project(":kvision-modules:kvision-state")) 26 | } 27 | } 28 | } 29 | } 30 | 31 | setupDokka(tasks.dokkaGeneratePublicationHtml) 32 | setupPublication() 33 | -------------------------------------------------------------------------------- /kvision-modules/kvision-redux-kotlin/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-redux-kotlin.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-redux-kotlin/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-redux-kotlin/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-redux-kotlin/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-rest/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | } 18 | } 19 | val jsTest by getting { 20 | dependencies { 21 | implementation(kotlin("test-js")) 22 | implementation(project(":kvision-modules:kvision-testutils")) 23 | implementation(project(":kvision-modules:kvision-jquery")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-rest/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-rest/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-rest/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-richtext/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("trix", libs.versions.trix.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | implementation(project(":kvision-modules:kvision-testutils")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-richtext/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-richtext.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-richtext/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-richtext/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-richtext/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-ballast/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(libs.ballast.core) 18 | api(libs.ballast.navigation) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-ballast/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-ballast/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-ballast/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo-ng/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(libs.navigo.kotlin.ng) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo-ng/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo-ng/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo-ng/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(libs.navigo.kotlin) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-routing-navigo/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-select-remote/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(project(":kvision-modules:kvision-common-remote")) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-select-remote/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-select-remote/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-select-remote/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state-flow/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(libs.multiplatform.diff) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state-flow/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-state-flow.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state-flow/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state-flow/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state-flow/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(libs.multiplatform.diff) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | implementation(project(":kvision-modules:kvision-testutils")) 24 | implementation(project(":kvision-modules:kvision-jquery")) 25 | } 26 | } 27 | } 28 | } 29 | 30 | setupDokka(tasks.dokkaGeneratePublicationHtml) 31 | setupPublication() 32 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-state.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-state/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator-remote/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(project(":kvision-modules:kvision-tabulator")) 18 | api(project(":kvision-modules:kvision-common-remote")) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator-remote/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator-remote/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator-remote/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(project(":kvision-modules:kvision-state")) 18 | implementation(npm("tabulator-tables", libs.versions.tabulator.get())) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | implementation(project(":kvision-modules:kvision-testutils")) 25 | } 26 | } 27 | } 28 | } 29 | 30 | setupDokka(tasks.dokkaGeneratePublicationHtml) 31 | setupPublication() 32 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-tabulator.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssBulmaModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator_bulma.min.css") 27 | internal external val tabulatorCssBulma: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator with Bulma CSS theme. 31 | */ 32 | object TabulatorCssBulmaModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssBulma) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssMaterializeModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator_materialize.min.css") 27 | internal external val tabulatorCssMaterialize: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator with Materialize CSS theme. 31 | */ 32 | object TabulatorCssMaterializeModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssMaterialize) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssMidnightModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator_midnight.min.css") 27 | internal external val tabulatorCssMidnight: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator with Midnight CSS theme. 31 | */ 32 | object TabulatorCssMidnightModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssMidnight) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssModernModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator_modern.min.css") 27 | internal external val tabulatorCssModern: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator with Modern CSS theme. 31 | */ 32 | object TabulatorCssModernModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssModern) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssSemanticUIModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator_semanticui.min.css") 27 | internal external val tabulatorCssSemanticUI: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator with Semantic UI CSS theme. 31 | */ 32 | object TabulatorCssSemanticUIModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssSemanticUI) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssSimpleModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator_simple.min.css") 27 | internal external val tabulatorCssSimple: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator with simple CSS theme. 31 | */ 32 | object TabulatorCssSimpleModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssSimple) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssSiteDarkModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator_site_dark.min.css") 27 | internal external val tabulatorCssSiteDark: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator with Site Dark CSS theme. 31 | */ 32 | object TabulatorCssSiteDarkModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssSiteDark) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorCssStandardModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | import io.kvision.utils.useModule 25 | 26 | @JsModule("tabulator-tables/dist/css/tabulator.min.css") 27 | internal external val tabulatorCssStandard: dynamic 28 | 29 | /** 30 | * Initializer for KVision Tabulator module with standard CSS theme. 31 | */ 32 | object TabulatorCssStandardModule : ModuleInitializer { 33 | override fun initialize() { 34 | useModule(tabulatorCssStandard) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/src/jsMain/kotlin/io/kvision/TabulatorModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision 23 | 24 | /** 25 | * Initializer for KVision Tabulator module. 26 | */ 27 | object TabulatorModule : ModuleInitializer { 28 | override fun initialize() { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tabulator/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tailwindcss/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("postcss", libs.versions.postcss.asProvider().get())) 18 | implementation(npm("postcss-loader", libs.versions.postcss.loader.get())) 19 | implementation(npm("tailwindcss", libs.versions.tailwindcss.get())) 20 | implementation(npm("@tailwindcss/postcss", libs.versions.tailwindcss.get())) 21 | implementation(npm("cssnano", libs.versions.cssnano.get())) 22 | } 23 | } 24 | val jsTest by getting { 25 | dependencies { 26 | implementation(kotlin("test-js")) 27 | implementation(project(":kvision-modules:kvision-testutils")) 28 | } 29 | } 30 | } 31 | } 32 | 33 | setupDokka(tasks.dokkaGeneratePublicationHtml) 34 | setupPublication() 35 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tailwindcss/src/jsMain/kotlin/io/kvision/TailwindcssModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision 24 | 25 | import io.kvision.utils.useModule 26 | 27 | @JsModule("/kotlin/tailwind/tailwind.twcss") 28 | internal external val tailwindTwcss: dynamic 29 | 30 | /** 31 | * Initializer for Tailwindcss module. 32 | */ 33 | object TailwindcssModule : ModuleInitializer { 34 | 35 | override fun initialize() { 36 | useModule(tailwindTwcss) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tailwindcss/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tailwindcss/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tailwindcss/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-testutils/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(libs.jquery.kotlin) 18 | api(kotlin("test-js")) 19 | 20 | implementation(project.dependencies.platform("io.kotest:kotest-bom:${libs.versions.kotest.get()}")) { 21 | because("to use the latest stable version of Kotest") 22 | } 23 | implementation("io.kotest:kotest-assertions-core") { 24 | because("improved test assertions") 25 | } 26 | } 27 | } 28 | } 29 | } 30 | 31 | setupDokka(tasks.dokkaGeneratePublicationHtml) 32 | setupPublication() 33 | -------------------------------------------------------------------------------- /kvision-modules/kvision-testutils/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-testutils/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-testutils/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-toastify/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("toastify-js", libs.versions.toastify.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | } 24 | } 25 | } 26 | } 27 | 28 | setupDokka(tasks.dokkaGeneratePublicationHtml) 29 | setupPublication() 30 | -------------------------------------------------------------------------------- /kvision-modules/kvision-toastify/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-toastify/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-toastify/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select-remote/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | api(project(":kvision-modules:kvision-tom-select")) 18 | api(project(":kvision-modules:kvision-common-remote")) 19 | } 20 | } 21 | val jsTest by getting { 22 | dependencies { 23 | implementation(kotlin("test-js")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select-remote/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select-remote/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select-remote/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | alias(libs.plugins.kotlinx.serialization) 4 | alias(libs.plugins.nmcp) 5 | id("maven-publish") 6 | id("signing") 7 | id("org.jetbrains.dokka") 8 | } 9 | 10 | kotlin { 11 | compilerOptions() 12 | kotlinJsTargets() 13 | sourceSets { 14 | val jsMain by getting { 15 | dependencies { 16 | api(project(":kvision")) 17 | implementation(npm("tom-select", libs.versions.tom.select.get())) 18 | } 19 | } 20 | val jsTest by getting { 21 | dependencies { 22 | implementation(kotlin("test-js")) 23 | implementation(project(":kvision-modules:kvision-testutils")) 24 | } 25 | } 26 | } 27 | } 28 | 29 | setupDokka(tasks.dokkaGeneratePublicationHtml) 30 | setupPublication() 31 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select/karma.config.d/karma.conf.js: -------------------------------------------------------------------------------- 1 | config.set({ 2 | reporters: ['karma-kotlin-reporter', 'junit'], 3 | junitReporter: { 4 | outputDir: '../../../reports/junit', 5 | outputFile: 'kvision-tom-select.xml', 6 | useBrowserName: false 7 | }, 8 | captureTimeout: 360000, 9 | browserDisconnectTimeout: 360000, 10 | browserNoActivityTimeout: 360000 11 | }); 12 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select/src/jsMain/kotlin/io/kvision/TomSelectDefaultModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision 24 | 25 | import io.kvision.utils.useModule 26 | 27 | @JsModule("tom-select/dist/css/tom-select.default.min.css") 28 | internal external val tomSelectDefaultCss: dynamic 29 | 30 | /** 31 | * Initializer for KVision Tom Select module with default CSS styling. 32 | */ 33 | object TomSelectDefaultModule : ModuleInitializer { 34 | 35 | override fun initialize() { 36 | useModule(tomSelectDefaultCss) 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select/src/jsMain/kotlin/io/kvision/TomSelectMinModule.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision 24 | 25 | import io.kvision.utils.useModule 26 | 27 | @JsModule("tom-select/dist/css/tom-select.min.css") 28 | internal external val tomSelectMinCss: dynamic 29 | 30 | /** 31 | * Initializer for KVision Tom Select module with minimal CSS styling. 32 | */ 33 | object TomSelectMinModule : ModuleInitializer { 34 | 35 | override fun initialize() { 36 | useModule(tomSelectMinCss) 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /kvision-modules/kvision-tom-select/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/main/kotlin/io/kvision/gradle/dependencyHandlers.kt: -------------------------------------------------------------------------------- 1 | package io.kvision.gradle 2 | 3 | 4 | import org.gradle.api.artifacts.ExternalModuleDependency 5 | import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler 6 | 7 | 8 | private const val KVISION_GROUP = "io.kvision" 9 | 10 | 11 | fun KotlinDependencyHandler.kvision( 12 | module: String, 13 | version: String? = null, 14 | ): ExternalModuleDependency = 15 | project.dependencies.create( 16 | when (version) { 17 | null -> "$KVISION_GROUP:$module" 18 | else -> "$KVISION_GROUP:$module:$version" 19 | } 20 | ) as ExternalModuleDependency 21 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/main/kotlin/io/kvision/gradle/exec.kt: -------------------------------------------------------------------------------- 1 | package io.kvision.gradle 2 | 3 | import java.io.ByteArrayOutputStream 4 | import org.gradle.process.ExecOperations 5 | import org.gradle.process.ExecResult 6 | import org.gradle.process.ExecSpec 7 | 8 | /** 9 | * Run an executable, and capture the output. 10 | * 11 | * Note that [ExecSpec.isIgnoreExitValue] is enabled by default so the output can be logged before 12 | * re-throwing the exception ([ExecResult.rethrowFailure]). Alternatively, re-enable 13 | * [ExecSpec.isIgnoreExitValue] in [configure]. 14 | */ 15 | internal fun ExecOperations.execCapture( 16 | configure: ExecSpec.() -> Unit, 17 | ): ExecCaptureResult { 18 | val (execResult, output) = ByteArrayOutputStream().use { output -> 19 | exec { 20 | isIgnoreExitValue = true 21 | 22 | standardOutput = output 23 | errorOutput = output 24 | 25 | configure() 26 | } to output.toString() 27 | } 28 | 29 | return ExecCaptureResult(execResult, output) 30 | } 31 | 32 | internal data class ExecCaptureResult( 33 | private val result: ExecResult, 34 | val output: String, 35 | ) : ExecResult by result { 36 | val isSuccess = result.exitValue == 0 37 | } 38 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/main/kotlin/io/kvision/gradle/tasks/KVWorkerBundleTask.kt: -------------------------------------------------------------------------------- 1 | package io.kvision.gradle.tasks 2 | 3 | import io.kvision.gradle.KVisionPlugin 4 | import org.gradle.api.file.DirectoryProperty 5 | import org.gradle.api.file.RegularFileProperty 6 | import org.gradle.api.provider.Property 7 | import org.gradle.api.tasks.Exec 8 | import org.gradle.api.tasks.Input 9 | import org.gradle.api.tasks.InputDirectory 10 | import org.gradle.api.tasks.InputFile 11 | import org.gradle.api.tasks.OutputFile 12 | import org.gradle.api.tasks.SkipWhenEmpty 13 | 14 | abstract class KVWorkerBundleTask : Exec(), KVisionTask { 15 | 16 | @get:Input 17 | abstract val nodeJsBin: Property 18 | 19 | @get:InputFile 20 | abstract val webpackJs: RegularFileProperty 21 | 22 | @get:OutputFile 23 | abstract val webpackConfigJs: RegularFileProperty 24 | 25 | @get:InputDirectory 26 | @get:SkipWhenEmpty 27 | abstract val workerMainSrcDir: DirectoryProperty 28 | 29 | @get:OutputFile 30 | abstract val workerJsFile: RegularFileProperty 31 | 32 | init { 33 | group = KVisionPlugin.KVISION_TASK_GROUP 34 | description = "Builds and copies webworker bundle to the frontend static resources" 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/main/kotlin/io/kvision/gradle/tasks/KVisionTask.kt: -------------------------------------------------------------------------------- 1 | package io.kvision.gradle.tasks 2 | 3 | interface KVisionTask 4 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/.gettext.json: -------------------------------------------------------------------------------- 1 | { 2 | "js": { 3 | "parsers": [ 4 | { 5 | "expression": "tr", 6 | "arguments": { 7 | "text": 0 8 | } 9 | }, 10 | { 11 | "expression": "ntr", 12 | "arguments": { 13 | "text": 0, 14 | "textPlural": 1 15 | } 16 | }, 17 | { 18 | "expression": "gettext", 19 | "arguments": { 20 | "text": 0 21 | } 22 | }, 23 | { 24 | "expression": "ngettext", 25 | "arguments": { 26 | "text": 0, 27 | "textPlural": 1 28 | } 29 | } 30 | ], 31 | "glob": { 32 | "pattern": "src/jsMain/**/*.kt" 33 | } 34 | }, 35 | "headers": { 36 | "Language": "" 37 | }, 38 | "output": "src/jsMain/resources/modules/i18n/messages.pot" 39 | } 40 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig 2 | 3 | plugins { 4 | val kotlinVersion: String by System.getProperties() 5 | // kotlin("plugin.serialization")// version kotlinVersion 6 | kotlin("multiplatform")// version kotlinVersion 7 | val kvisionVersion: String by System.getProperties() 8 | id("io.kvision")// version kvisionVersion 9 | } 10 | 11 | version = "1.0.0-SNAPSHOT" 12 | group = "com.example" 13 | 14 | repositories { 15 | mavenCentral() 16 | mavenLocal() 17 | } 18 | 19 | // Versions 20 | val kotlinVersion: String by System.getProperties() 21 | val kvisionVersion: String by System.getProperties() 22 | 23 | kotlin { 24 | js(IR) { 25 | browser { 26 | useEsModules() 27 | commonWebpackConfig { 28 | outputFileName = "main.bundle.js" 29 | sourceMaps = false 30 | } 31 | testTask { 32 | useKarma { 33 | useChromeHeadless() 34 | } 35 | } 36 | } 37 | binaries.executable() 38 | compilerOptions { 39 | target.set("es2015") 40 | } 41 | } 42 | sourceSets["jsMain"].dependencies { 43 | implementation("io.kvision:kvision:$kvisionVersion") 44 | implementation("io.kvision:kvision-bootstrap:$kvisionVersion") 45 | implementation("io.kvision:kvision-i18n:$kvisionVersion") 46 | } 47 | sourceSets["jsTest"].dependencies { 48 | implementation(kotlin("test-js")) 49 | implementation("io.kvision:kvision-testutils:$kvisionVersion") 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/gradle.properties: -------------------------------------------------------------------------------- 1 | #Plugins 2 | systemProp.kotlinVersion=2.2.0-RC 3 | #Dependencies 4 | systemProp.kvisionVersion=9.1.0 5 | 6 | kotlin.js.ir.output.granularity=per-file 7 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | mavenLocal() 6 | } 7 | } 8 | rootProject.name = "template" 9 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsMain/kotlin/com/example/App.kt: -------------------------------------------------------------------------------- 1 | package com.example 2 | 3 | import io.kvision.Application 4 | import io.kvision.BootstrapCssModule 5 | import io.kvision.BootstrapModule 6 | import io.kvision.CoreModule 7 | import io.kvision.Hot 8 | import io.kvision.html.div 9 | import io.kvision.i18n.DefaultI18nManager 10 | import io.kvision.i18n.I18n 11 | import io.kvision.i18n.I18n.tr 12 | import io.kvision.panel.root 13 | import io.kvision.startApplication 14 | import io.kvision.utils.useModule 15 | 16 | @JsModule("/kotlin/modules/css/kvapp.css") 17 | external val kvappCss: dynamic 18 | 19 | @JsModule("/kotlin/modules/i18n/messages-en.json") 20 | external val messagesEn: dynamic 21 | 22 | @JsModule("/kotlin/modules/i18n/messages-pl.json") 23 | external val messagesPl: dynamic 24 | 25 | class App : Application() { 26 | init { 27 | useModule(kvappCss) 28 | } 29 | 30 | override fun start() { 31 | I18n.manager = 32 | DefaultI18nManager( 33 | mapOf( 34 | "en" to messagesEn, 35 | "pl" to messagesPl 36 | ) 37 | ) 38 | 39 | root("kvapp") { 40 | div(tr("This is a localized message.")) 41 | } 42 | } 43 | } 44 | 45 | fun main() { 46 | startApplication(::App, js("import.meta.webpackHot").unsafeCast(), BootstrapModule, BootstrapCssModule, CoreModule) 47 | } 48 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsMain/resources/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | KVision App 7 | 8 | 9 | 10 |

11 | 12 | 13 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsMain/resources/modules/css/kvapp.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rjaros/kvision/e08db2595c1ca40d80a9763491e216baf61b7f27/kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsMain/resources/modules/css/kvapp.css -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsMain/resources/modules/i18n/messages-en.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the KVision package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: KVision\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: English\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 20 | 21 | #: ../src/main/kotlin/com/example/App.kt:20 22 | msgid "This is a localized message." 23 | msgstr "" 24 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsMain/resources/modules/i18n/messages-pl.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the KVision package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: KVision\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: Polish\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" 20 | 21 | #: ../src/main/kotlin/com/example/App.kt:20 22 | msgid "This is a localized message." 23 | msgstr "To jest przetłumaczona wiadomość." 24 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsMain/resources/modules/i18n/messages.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Content-Type: text/plain; charset=UTF-8\n" 4 | "Language: \n" 5 | 6 | #: src/jsMain/kotlin/com/example/App.kt:40 7 | msgid "This is a localized message." 8 | msgstr "" 9 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/src/jsTest/kotlin/test/com/example/AppSpec.kt: -------------------------------------------------------------------------------- 1 | package test.com.example 2 | 3 | import io.kvision.test.SimpleSpec 4 | import kotlin.test.Test 5 | import kotlin.test.assertTrue 6 | 7 | class AppSpec : SimpleSpec { 8 | 9 | @Test 10 | fun render() { 11 | run { 12 | assertTrue(true, "Dummy test") 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/webpack.config.d/handlebars.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.hbs$/i, 4 | loader: 'handlebars-loader' 5 | } 6 | ); -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/kotlin-js/webpack.config.d/webpack.js: -------------------------------------------------------------------------------- 1 | if (config.devServer) { 2 | config.devServer.hot = true; 3 | config.devServer.open = false; 4 | config.devServer.port = 3000; 5 | config.devServer.historyApiFallback = true; 6 | config.devtool = 'eval-cheap-source-map'; 7 | } else { 8 | config.devtool = undefined; 9 | } 10 | 11 | // disable bundle size warning 12 | config.performance = { 13 | assetFilter: function (assetFilename) { 14 | return !assetFilename.endsWith('.js'); 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /kvision-tools/kvision-gradle-plugin/src/test/resources/template-projects/template-projects.md: -------------------------------------------------------------------------------- 1 | These projects are used by the Gradle TestKit tests to verify the KVision Gradle plugin can be 2 | applied to real projects. 3 | 4 | The major difference between these projects and 5 | [the template projects they are based on](https://github.com/rjaros/kvision-examples/) 6 | is that the version of the KVision Gradle plugin has been removed, as this 7 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/core/CssClass.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2020 Yannik Hampe 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision.core 25 | 26 | interface CssClass { 27 | val className: String 28 | } 29 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/core/DomAttribute.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * Copyright (c) 2020 Yannik Hampe 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision.core 25 | 26 | interface DomAttribute { 27 | val attributeName: String 28 | val attributeValue: String 29 | } 30 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/form/HelpText.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.form 23 | 24 | import io.kvision.html.TAG 25 | import io.kvision.html.Tag 26 | 27 | /** 28 | * Helper class for Bootstrap help text element. 29 | * 30 | * @constructor 31 | * @param content the text of the label 32 | * @param rich determines if [content] can contain HTML code 33 | */ 34 | open class HelpText(content: String? = null, rich: Boolean = false) : Tag( 35 | TAG.SMALL, content, rich, 36 | className = "form-text text-body-secondary" 37 | ) 38 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/form/InvalidFeedback.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.form 23 | 24 | import io.kvision.html.TAG 25 | import io.kvision.html.Tag 26 | 27 | /** 28 | * Helper class for Bootstrap invalid feedback element. 29 | * 30 | * @constructor 31 | * @param content the text of the label 32 | * @param rich determines if [content] can contain HTML code 33 | */ 34 | open class InvalidFeedback(content: String? = null, rich: Boolean = false) : Tag( 35 | TAG.DIV, content, rich, 36 | className = "invalid-feedback" 37 | ) 38 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/html/TagMarker.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.html 24 | 25 | @DslMarker 26 | annotation class TagMarker 27 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/i18n/SimpleI18nManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.i18n 23 | 24 | class SimpleI18nManager : I18nManager { 25 | 26 | override fun gettext(key: String, vararg args: Any?): String { 27 | return key 28 | } 29 | 30 | override fun ngettext(singularKey: String, pluralKey: String, value: Int, vararg args: Any?): String { 31 | return singularKey 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/snabbdom/Init.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | @file:JsModule("snabbdom") 24 | 25 | package io.kvision.snabbdom 26 | 27 | external fun init(modules: Array, domApi: dynamic = definedExternally): Patch 28 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/snabbdom/Modules.kt: -------------------------------------------------------------------------------- 1 | @file:JsModule("snabbdom") 2 | /* 3 | * Copyright (c) 2017-present Robert Jaros 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy 6 | * of this software and associated documentation files (the "Software"), to deal 7 | * in the Software without restriction, including without limitation the rights 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | * copies of the Software, and to permit persons to whom the Software is 10 | * furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in all 13 | * copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | * SOFTWARE. 22 | */ 23 | 24 | package io.kvision.snabbdom 25 | 26 | external val attributesModule: Module 27 | external val classModule: Module 28 | external val propsModule: Module 29 | external val styleModule: Module 30 | external val eventListenersModule: Module 31 | 32 | external interface Module { 33 | var pre: PreHook? 34 | var create: CreateHook? 35 | var update: UpdateHook? 36 | var destroy: DestroyHook? 37 | var remove: RemoveHook? 38 | var post: PostHook? 39 | } 40 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/snabbdom/Patch.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | package io.kvision.snabbdom 24 | 25 | typealias Patch = (oldVnode: dynamic, vnode: VNode) -> VNode 26 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/utils/Keys.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.utils 23 | 24 | /** 25 | * Keycode of the ENTER key. 26 | */ 27 | const val ENTER_KEY = 13 28 | /** 29 | * Keycode of the ESC key. 30 | */ 31 | const val ESC_KEY = 27 32 | -------------------------------------------------------------------------------- /kvision/src/jsMain/kotlin/io/kvision/utils/Result.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-present Robert Jaros 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | package io.kvision.utils 23 | 24 | /** 25 | * Simple flatmap implementation for the [Result] type 26 | */ 27 | inline fun Result.flatMap(block: (T) -> (Result)): Result { 28 | return this.mapCatching { 29 | block(it).getOrThrow() 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /package.json.d/project.info: -------------------------------------------------------------------------------- 1 | { 2 | "description": "KVision" 3 | } 4 | -------------------------------------------------------------------------------- /webpack.config.d/bootstrap.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'}); 3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'}); 4 | -------------------------------------------------------------------------------- /webpack.config.d/css.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] }); 2 | 3 | -------------------------------------------------------------------------------- /webpack.config.d/file.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.(jpe?g|png|gif|svg)$/i, 4 | type: 'asset/resource' 5 | } 6 | ); 7 | -------------------------------------------------------------------------------- /webpack.config.d/handlebars.js: -------------------------------------------------------------------------------- 1 | config.module.rules.push( 2 | { 3 | test: /\.hbs$/i, 4 | loader: 'handlebars-loader' 5 | } 6 | ); --------------------------------------------------------------------------------