status-qml/statusq.qrc

261 lines
15 KiB
Plaintext
Raw Normal View History

<RCC>
<qresource prefix="/">
<file>src/StatusQ/Core/qmldir</file>
<file>src/StatusQ/Core/Theme/ThemePalette.qml</file>
<file>src/StatusQ/Core/Theme/StatusLightTheme.qml</file>
<file>src/StatusQ/Core/Theme/StatusDarkTheme.qml</file>
<file>src/StatusQ/Core/Theme/Theme.qml</file>
<file>src/StatusQ/Core/Theme/qmldir</file>
<file>src/StatusQ/Core/Theme/StatusColors.qml</file>
<file>src/StatusQ/Core/StatusIcon.qml</file>
<file>src/StatusQ/Core/StatusImageSettings.qml</file>
<file>src/StatusQ/Core/StatusIconSettings.qml</file>
<file>src/StatusQ/Core/StatusIconBackgroundSettings.qml</file>
<file>src/StatusQ/Core/StatusBaseText.qml</file>
<file>src/StatusQ/Popups/qmldir</file>
<file>src/StatusQ/Popups/StatusPopupMenu.qml</file>
<file>src/StatusQ/Popups/StatusMenuSeparator.qml</file>
<file>src/StatusQ/Popups/StatusMenuHeadline.qml</file>
<file>src/StatusQ/Popups/StatusMenuItem.qml</file>
<file>src/StatusQ/Popups/StatusModalDivider.qml</file>
<file>src/StatusQ/Components/qmldir</file>
<file>src/StatusQ/Components/StatusChatListItem.qml</file>
<file>src/StatusQ/Components/StatusChatListAndCategories.qml</file>
<file>src/StatusQ/Components/StatusChatInfoToolBar.qml</file>
<file>src/StatusQ/Components/StatusContactRequestsIndicatorListItem.qml</file>
<file>src/StatusQ/Components/StatusNavigationListItem.qml</file>
<file>src/StatusQ/Components/StatusNavigationPanelHeadline.qml</file>
<file>src/StatusQ/Components/StatusChatToolBar.qml</file>
<file>src/StatusQ/Components/StatusRoundedImage.qml</file>
<file>src/StatusQ/Components/StatusRoundIcon.qml</file>
<file>src/StatusQ/Components/StatusListItem.qml</file>
<file>src/StatusQ/Components/StatusListSectionHeadline.qml</file>
<file>src/StatusQ/Components/StatusDescriptionListItem.qml</file>
<file>src/StatusQ/Components/StatusBadge.qml</file>
<file>src/StatusQ/Components/StatusLetterIdenticon.qml</file>
<file>src/StatusQ/Components/StatusLoadingIndicator.qml</file>
<file>src/StatusQ/Platform/qmldir</file>
<file>src/StatusQ/Platform/StatusMacTrafficLights.qml</file>
<file>src/StatusQ/Controls/StatusIconTabButton.qml</file>
<file>src/StatusQ/Controls/StatusChatInfoButton.qml</file>
<file>src/StatusQ/Controls/qmldir</file>
<file>src/StatusQ/Controls/StatusSlider.qml</file>
<file>src/StatusQ/Controls/StatusRoundButton.qml</file>
<file>src/StatusQ/Controls/StatusNavBarTabButton.qml</file>
<file>src/StatusQ/Controls/StatusFlatRoundButton.qml</file>
<file>src/StatusQ/Controls/StatusRadioButton.qml</file>
<file>src/StatusQ/Controls/StatusFlatButton.qml</file>
<file>src/StatusQ/Controls/StatusBaseButton.qml</file>
<file>src/StatusQ/Controls/StatusSwitch.qml</file>
<file>src/StatusQ/Controls/StatusCheckBox.qml</file>
<file>src/StatusQ/Controls/StatusButton.qml</file>
<file>src/StatusQ/Controls/StatusToolTip.qml</file>
feat(StatusInput): introduce new validator pipeline There's a new `validators` property that can be used to add validators to `StatusInput` instances, which are executed in the same order: ```qml StatusInput { text: "Some value" validators: [...] } ``` For convenience StatusQ provides some common validation methods, such as `StatusMinLengthValidator`, StatusMaxLengthValidator` and could be extended to other (e.g. email validation etc): ```qml StatusInput { text: "Some value" validators: [ StatusMinLengthValidator { minLength: 3 } ] } ``` Validators are executed every time the text of the input changes. They are executed in the same order they have been applied, which enables users to create cascading conditions like "First make sure the value is at least 3 characters long, then make sure it matches a certain pattern". When a validation fails, it sets the validity of the input (`valid: false`) accordingly and optionally exposes additional error information on `StatusInput.errors`: ```qml StatusInput { text: "Fo" onTextChanged: { if (errors) { /** * errors now has the following structure: * errors: { * minLength: { minValue: 3, actual: ... } * } * Also, `StatusInput` is now `valid = false` **/ errorMesssage = "Expected " + errors.minLenght.minValue + " but got: "+ errors.minLength.actual; // i18n'able } } validators: [ StatusMinLengthValidator { minLength: 3 } ] } ``` There can be any number of error objects on the `errors` property, depending on who many validators have been run that failed validation. Custom validators can be implemented by introducing a new `StatusValidator` type that has to implement a `validate()` function and defines the validators name. The `validate()` function has to return either `true` or `false` depending on whether the value is valid. Alternatively, the function can return an error object which gets exposed on the underlying input's `errors` property, at which point it's considered invalid as well. Here's a simple custom validator: ```qml // HelloValidator.qml import StatusQ.Controls.Validators 0.1 StatusValidator { property string name: "hello" validate: function (value) { // `value` is the `text` value of the underlying control return value === "hello" } } ``` Applying this validators would look like this: ```qml StatusInput { text: "Some value" validators: [ HelloValidator {} ] onTextChanged: { if (errors.hello) { errorMessage = "Doesn't say hello!" } } } ``` Alternatively, validators can return error objects to provide more information about what went wrong. Here's the implementation of the `StatusMinLengthValidator` as an example: ```qml StatusValidator { property int minLength: 0 name: "minLength" validate: function (value) { return value.length >= minLength ? true : { min: minLength, actual: value.length } } } ``` Because validators as components, they can hold any custom properties they need to be configured. There has been concern that, with this API, error messages need to be potentially defined in multiple places, given that there could be multiple instances of any validator. This is easily solved by having a centralized function figure out what the error message is, given a certain error object: ```qml StatusInput { validators: [ StatusMinLengthValidator { minLength: 3 } ] onTextChanged: { if (errors) { errorMessage = getErrorMessage(errors) // this function is provided by global or elsewhere } } } ``` Closes #298
2021-08-13 11:37:26 +00:00
<file>src/StatusQ/Controls/Validators/StatusValidator.qml</file>
<file>src/StatusQ/Controls/Validators/StatusMinLengthValidator.qml</file>
<file>src/StatusQ/Layout/StatusAppNavBar.qml</file>
<file>src/StatusQ/Layout/qmldir</file>
<file>src/StatusQ/Layout/StatusAppTwoPanelLayout.qml</file>
<file>src/StatusQ/Layout/StatusAppLayout.qml</file>
<file>src/StatusQ/qmldir</file>
<file>src/assets/fonts/InterStatus/InterStatus-ThinItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-Thin.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-SemiBoldItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-SemiBold.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-Regular.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-MediumItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-Medium.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-LightItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-Light.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-Italic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-ExtraLightItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-ExtraLight.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-ExtraBoldItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-ExtraBold.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-BoldItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-Bold.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-BlackItalic.otf</file>
<file>src/assets/fonts/InterStatus/InterStatus-Black.otf</file>
<file>src/assets/fonts/Inter/Inter-V.otf</file>
<file>src/assets/fonts/Inter/Inter-ThinItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-Thin.otf</file>
<file>src/assets/fonts/Inter/Inter-SemiBoldItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-SemiBold.otf</file>
<file>src/assets/fonts/Inter/Inter-Regular.otf</file>
<file>src/assets/fonts/Inter/Inter-MediumItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-Medium.otf</file>
<file>src/assets/fonts/Inter/Inter-LightItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-Light.otf</file>
<file>src/assets/fonts/Inter/Inter-Italic.otf</file>
<file>src/assets/fonts/Inter/Inter-ExtraLightItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-ExtraLight.otf</file>
<file>src/assets/fonts/Inter/Inter-ExtraBoldItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-ExtraBold.otf</file>
<file>src/assets/fonts/Inter/Inter-BoldItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-Bold.otf</file>
<file>src/assets/fonts/Inter/Inter-BlackItalic.otf</file>
<file>src/assets/fonts/Inter/Inter-Black.otf</file>
<file>src/assets/img/icons/traffic_lights/minimise_pressed.png</file>
<file>src/assets/img/icons/traffic_lights/minimise.png</file>
<file>src/assets/img/icons/traffic_lights/maximize_pressed.png</file>
<file>src/assets/img/icons/traffic_lights/maximize.png</file>
<file>src/assets/img/icons/traffic_lights/close_pressed.png</file>
<file>src/assets/img/icons/traffic_lights/close.png</file>
<file>src/assets/img/icons/public-chat.svg</file>
<file>src/assets/img/icons/muted.svg</file>
<file>src/assets/img/icons/channel-white.svg</file>
<file>src/assets/img/icons/checkbox.svg</file>
<file>src/assets/img/icons/warning.svg</file>
<file>src/assets/img/icons/wallet.svg</file>
<file>src/assets/img/icons/username.svg</file>
<file>src/assets/img/icons/up.svg</file>
<file>src/assets/img/icons/union.svg</file>
<file>src/assets/img/icons/tributeToTalk.svg</file>
<file>src/assets/img/icons/travel-and-places.svg</file>
<file>src/assets/img/icons/touch-id.svg</file>
<file>src/assets/img/icons/token.svg</file>
<file>src/assets/img/icons/token-sale.svg</file>
<file>src/assets/img/icons/time.svg</file>
<file>src/assets/img/icons/text.svg</file>
<file>src/assets/img/icons/teller.svg</file>
<file>src/assets/img/icons/tabs.svg</file>
<file>src/assets/img/icons/symbols.svg</file>
<file>src/assets/img/icons/swap.svg</file>
<file>src/assets/img/icons/subscription.svg</file>
<file>src/assets/img/icons/strikethrough.svg</file>
<file>src/assets/img/icons/stickers.svg</file>
<file>src/assets/img/icons/status.svg</file>
<file>src/assets/img/icons/status-update.svg</file>
<file>src/assets/img/icons/speech.svg</file>
<file>src/assets/img/icons/sound.svg</file>
<file>src/assets/img/icons/smileys-and-people.svg</file>
<file>src/assets/img/icons/show.svg</file>
<file>src/assets/img/icons/share-ios.svg</file>
<file>src/assets/img/icons/share-android.svg</file>
<file>src/assets/img/icons/settings.svg</file>
<file>src/assets/img/icons/settings-advanced.svg</file>
<file>src/assets/img/icons/send.svg</file>
<file>src/assets/img/icons/security.svg</file>
<file>src/assets/img/icons/secret.svg</file>
<file>src/assets/img/icons/search.svg</file>
<file>src/assets/img/icons/rotate.svg</file>
<file>src/assets/img/icons/right.svg</file>
<file>src/assets/img/icons/reply.svg</file>
<file>src/assets/img/icons/remove.svg</file>
<file>src/assets/img/icons/remove-contact.svg</file>
<file>src/assets/img/icons/remove-circle.svg</file>
<file>src/assets/img/icons/refresh.svg</file>
<file>src/assets/img/icons/receive.svg</file>
<file>src/assets/img/icons/reaction-b.svg</file>
<file>src/assets/img/icons/reaction-a.svg</file>
<file>src/assets/img/icons/qr.svg</file>
<file>src/assets/img/icons/profile.svg</file>
<file>src/assets/img/icons/private-chat.svg</file>
<file>src/assets/img/icons/previous.svg</file>
<file>src/assets/img/icons/play.svg</file>
<file>src/assets/img/icons/pin.svg</file>
<file>src/assets/img/icons/pause.svg</file>
<file>src/assets/img/icons/paste.svg</file>
<file>src/assets/img/icons/password.svg</file>
<file>src/assets/img/icons/offline.svg</file>
<file>src/assets/img/icons/objects.svg</file>
<file>src/assets/img/icons/notification.svg</file>
<file>src/assets/img/icons/node.svg</file>
<file>src/assets/img/icons/node-offline.svg</file>
<file>src/assets/img/icons/next.svg</file>
<file>src/assets/img/icons/network.svg</file>
<file>src/assets/img/icons/more.svg</file>
<file>src/assets/img/icons/mobile.svg</file>
<file>src/assets/img/icons/mobile-sync.svg</file>
<file>src/assets/img/icons/mobile-sync-off.svg</file>
<file>src/assets/img/icons/max.svg</file>
<file>src/assets/img/icons/logout.svg</file>
<file>src/assets/img/icons/location.svg</file>
<file>src/assets/img/icons/loading.svg</file>
<file>src/assets/img/icons/link.svg</file>
<file>src/assets/img/icons/left.svg</file>
<file>src/assets/img/icons/ledger.svg</file>
<file>src/assets/img/icons/language.svg</file>
<file>src/assets/img/icons/keycard.svg</file>
<file>src/assets/img/icons/keycard-logo.svg</file>
<file>src/assets/img/icons/keyboard.svg</file>
<file>src/assets/img/icons/italic.svg</file>
<file>src/assets/img/icons/info.svg</file>
<file>src/assets/img/icons/in-contacts.svg</file>
<file>src/assets/img/icons/image.svg</file>
<file>src/assets/img/icons/history.svg</file>
<file>src/assets/img/icons/hide.svg</file>
<file>src/assets/img/icons/help.svg</file>
<file>src/assets/img/icons/group.svg</file>
<file>src/assets/img/icons/group-chat.svg</file>
<file>src/assets/img/icons/gallery.svg</file>
<file>src/assets/img/icons/food-and-drinks.svg</file>
<file>src/assets/img/icons/flash.svg</file>
<file>src/assets/img/icons/flash-disable.svg</file>
<file>src/assets/img/icons/flags.svg</file>
<file>src/assets/img/icons/filter.svg</file>
<file>src/assets/img/icons/filled-account.svg</file>
<file>src/assets/img/icons/file.svg</file>
<file>src/assets/img/icons/favourite.svg</file>
<file>src/assets/img/icons/face-sad.svg</file>
<file>src/assets/img/icons/face-id.svg</file>
<file>src/assets/img/icons/external.svg</file>
<file>src/assets/img/icons/exchange.svg</file>
<file>src/assets/img/icons/emojis.svg</file>
<file>src/assets/img/icons/edit.svg</file>
<file>src/assets/img/icons/download.svg</file>
<file>src/assets/img/icons/down.svg</file>
<file>src/assets/img/icons/double-checkmark.svg</file>
<file>src/assets/img/icons/desktop.svg</file>
<file>src/assets/img/icons/delete.svg</file>
<file>src/assets/img/icons/dapp.svg</file>
<file>src/assets/img/icons/copy.svg</file>
<file>src/assets/img/icons/contact.svg</file>
<file>src/assets/img/icons/condition-or.svg</file>
<file>src/assets/img/icons/communities.svg</file>
<file>src/assets/img/icons/code.svg</file>
<file>src/assets/img/icons/close.svg</file>
<file>src/assets/img/icons/close-circle.svg</file>
<file>src/assets/img/icons/clear.svg</file>
<file>src/assets/img/icons/chevron-up.svg</file>
<file>src/assets/img/icons/chevron-down.svg</file>
<file>src/assets/img/icons/checkmark.svg</file>
<file>src/assets/img/icons/checkmark-circle.svg</file>
<file>src/assets/img/icons/chatbot.svg</file>
<file>src/assets/img/icons/chat.svg</file>
<file>src/assets/img/icons/chat-commands.svg</file>
<file>src/assets/img/icons/channel.svg</file>
<file>src/assets/img/icons/channel-category.svg</file>
<file>src/assets/img/icons/cancel.svg</file>
<file>src/assets/img/icons/camera.svg</file>
<file>src/assets/img/icons/browser.svg</file>
<file>src/assets/img/icons/bold.svg</file>
<file>src/assets/img/icons/backspace.svg</file>
<file>src/assets/img/icons/arrow-right.svg</file>
<file>src/assets/img/icons/arrow-down.svg</file>
<file>src/assets/img/icons/arbitrator.svg</file>
<file>src/assets/img/icons/appearance.svg</file>
<file>src/assets/img/icons/animals-and-nature.svg</file>
<file>src/assets/img/icons/airdrop.svg</file>
<file>src/assets/img/icons/admin.svg</file>
<file>src/assets/img/icons/address.svg</file>
<file>src/assets/img/icons/add.svg</file>
<file>src/assets/img/icons/add-contact.svg</file>
<file>src/assets/img/icons/add-circle.svg</file>
<file>src/assets/img/icons/activity.svg</file>
<file>src/StatusQ/Components/StatusChatListCategoryItem.qml</file>
<file>src/StatusQ/Components/StatusChatListCategory.qml</file>
<file>src/StatusQ/Controls/StatusBaseInput.qml</file>
<file>src/StatusQ/Controls/StatusChatListCategoryItemButton.qml</file>
<file>src/StatusQ/Components/StatusChatList.qml</file>
<file>src/StatusQ/Popups/statusModal/StatusImageWithTitle.qml</file>
<file>src/StatusQ/Popups/statusModal/StatusModalFooter.qml</file>
<file>src/StatusQ/Popups/statusModal/StatusModalHeader.qml</file>
<file>src/StatusQ/Popups/StatusModal.qml</file>
<file>src/StatusQ/Core/StatusModalHeaderSettings.qml</file>
<file>src/StatusQ/Popups/StatusSearchPopup.qml</file>
<file>src/StatusQ/Components/StatusListItemBadge.qml</file>
<file>src/StatusQ/Popups/StatusSearchPopupMenuItem.qml</file>
<file>src/StatusQ/Popups/StatusSearchLocationMenu.qml</file>
</qresource>
</RCC>