text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd" [ <!ENTITY space " "> <!ENTITY separators ",&#59;"> <!ENTITY ns_punctuators "!&#37;&space;&amp;()+-/.*&lt;=&gt;?[]{|}~^&separators;"> ]> <!-- --> <language name="C++" section="Sources" version="13" kateversion="5.0" indenter="cstyle" style="C++" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr" extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.cu;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.cuh;*.inl;*.ino;*.pde;*.moc" author="Alex Turbov (i.zaufi@gmail.com)" license="LGPL" priority="9" > <!-- The main purpose of this file is to hold Qt extensions syntax in a single place, so later it can be included (using IncludeRules) to other (C++ based) syntaxes. Based on Qt 5 documentation (path_to_url --> <highlighting> <list name="QtMacros"> <item>emit</item> <item>signals</item> <item>slots</item> <item>foreach</item> <item>forever</item> <item>SIGNAL</item> <item>SLOT</item> <!-- path_to_url#macros --> <item>qApp</item> <!-- path_to_url#qGuiApp --> <item>qGuiApp</item> <!-- path_to_url#macros --> <item>Q_COREAPP_STARTUP_FUNCTION</item> <item>Q_DECLARE_TR_FUNCTIONS</item> <!-- QObject related macros from path_to_url#macros --> <item>QT_NO_NARROWING_CONVERSIONS_IN_CONNECT</item> <item>Q_CLASSINFO</item> <item>Q_DISABLE_COPY</item> <item>Q_EMIT</item> <item>Q_ENUM</item> <item>Q_ENUMS</item> <item>Q_FLAG</item> <item>Q_FLAGS</item> <item>Q_GADGET</item> <item>Q_INTERFACES</item> <item>Q_INVOKABLE</item> <item>Q_OBJECT</item> <item>Q_PROPERTY</item> <item>Q_REVISION</item> <item>Q_SET_OBJECT_NAME</item> <item>Q_SIGNAL</item> <item>Q_SIGNALS</item> <item>Q_SLOT</item> <item>Q_SLOTS</item> <!-- Various macros from: path_to_url#macros path_to_url#macros path_to_url#macros path_to_url#macros path_to_url#macros --> <item>Q_DECLARE_ASSOCIATIVE_CONTAINER_METATYPE</item> <item>Q_DECLARE_METATYPE</item> <item>Q_DECLARE_OPAQUE_POINTER</item> <item>Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE</item> <item>Q_DECLARE_SMART_POINTER_METATYPE</item> <item>QT_NO_CAST_FROM_BYTEARRAY</item> <item>QT_NO_CAST_FROM_ASCII</item> <item>QT_NO_CAST_TO_ASCII</item> <item>QT_RESTRICTED_CAST_FROM_ASCII</item> <item>QT_NO_URL_CAST_FROM_STRING</item> <item>QT_USE_QSTRINGBUILDER</item> <item>Q_DECLARE_FLAGS</item> <item>Q_DECLARE_OPERATORS_FOR_FLAGS</item> <!-- QtTest macros: path_to_url#macros --> <item>QBENCHMARK</item> <item>QBENCHMARK_ONCE</item> <item>QCOMPARE</item> <item>QEXPECT_FAIL</item> <item>QFAIL</item> <item>QFETCH</item> <item>QFINDTESTDATA</item> <item>QSKIP</item> <item>QTEST</item> <item>QTEST_APPLESS_MAIN</item> <item>QTEST_GUILESS_MAIN</item> <item>QTEST_MAIN</item> <item>QTRY_COMPARE</item> <item>QTRY_COMPARE_WITH_TIMEOUT</item> <item>QTRY_VERIFY2</item> <item>QTRY_VERIFY</item> <item>QTRY_VERIFY2_WITH_TIMEOUT</item> <item>QTRY_VERIFY_WITH_TIMEOUT</item> <item>QVERIFY2</item> <item>QVERIFY</item> <item>QVERIFY_EXCEPTION_THROWN</item> <item>QWARN</item> <!-- path_to_url#macros --> <item>QAXCLASS</item> <item>QAXFACTORY_BEGIN</item> <item>QAXFACTORY_DEFAULT</item> <item>QAXFACTORY_END</item> <item>QAXFACTORY_EXPORT</item> <item>QAXTYPE</item> <!-- path_to_url#macros --> <item>QDESIGNER_WIDGET_EXPORT</item> <!-- path_to_url#macros --> <item>QML_DECLARE_TYPE</item> <item>QML_DECLARE_TYPEINFO</item> <!-- path_to_url#macros --> <item>Q_ARG</item> <item>Q_RETURN_ARG</item> <!-- path_to_url#macros --> <item>Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE</item> <item>Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE</item> <item>Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_SOMETIMES_NATIVE</item> <item>Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_WAIT_FREE</item> <item>Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE</item> <item>Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE</item> <item>Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_SOMETIMES_NATIVE</item> <item>Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_WAIT_FREE</item> <item>Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE</item> <item>Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE</item> <item>Q_ATOMIC_POINTER_TEST_AND_SET_IS_SOMETIMES_NATIVE</item> <item>Q_ATOMIC_POINTER_TEST_AND_SET_IS_WAIT_FREE</item> <!-- path_to_url#macros --> <item>Q_DECLARE_EXTENSION_INTERFACE</item> <!-- path_to_url#macros --> <item>Q_DECLARE_INTERFACE</item> <item>Q_IMPORT_PLUGIN</item> <item>Q_PLUGIN_METADATA</item> <!-- path_to_url#macros --> <item>Q_NOREPLY</item> <!-- path_to_url#macros --> <item>Q_SCRIPT_DECLARE_QMETAOBJECT</item> <!-- path_to_url#macros --> <item>QWIDGETSIZE_MAX</item> <!-- List of Qt macros obtained by part/syntax/data/get-Qt-macros.sh for qglobal.h qfeatures.h qconfig.h --> <item>QT_ASCII_CAST_WARN</item> <item>QT_CATCH</item> <item>QT_COMPILER_SUPPORTS_AVX</item> <item>QT_COMPILER_SUPPORTS_AVX2</item> <item>QT_COMPILER_SUPPORTS_SSE2</item> <item>QT_COMPILER_SUPPORTS_SSE3</item> <item>QT_COMPILER_SUPPORTS_SSE4_1</item> <item>QT_COMPILER_SUPPORTS_SSE4_2</item> <item>QT_COMPILER_SUPPORTS_SSSE3</item> <item>QT_DEBUG</item> <item>QT_DEPRECATED</item> <item>QT_DEPRECATED_CONSTRUCTOR</item> <item>QT_DEPRECATED_SINCE</item> <item>QT_DEPRECATED_VARIABLE</item> <item>QT_DEPRECATED_X</item> <item>QT_DISABLE_DEPRECATED_BEFORE</item> <item>QT_EMULATED_ALIGNOF</item> <item>QT_ENSURE_STACK_ALIGNED_FOR_SSE</item> <item>QT_FASTCALL</item> <item>QT_FORWARD_DECLARE_CLASS</item> <item>QT_FORWARD_DECLARE_STRUCT</item> <item>QT_IOS_DEPLOYMENT_TARGET_BELOW</item> <item>QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE</item> <item>QT_LARGEFILE_SUPPORT</item> <item>QT_LINKED_OPENSSL</item> <item>QT_MAC_DEPLOYMENT_TARGET_BELOW</item> <item>QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE</item> <item>QT_MOC_COMPAT</item> <item>QT_MODULE</item> <item>QT_NO_ACCESSIBILITY</item> <item>QT_NO_ANIMATION</item> <item>QT_NO_BEARERMANAGEMENT</item> <item>QT_NO_BIG_CODECS</item> <item>QT_NO_BUTTONGROUP</item> <item>QT_NO_CALENDARWIDGET</item> <item>QT_NO_CODECS</item> <item>QT_NO_COLORDIALOG</item> <item>QT_NO_COLUMNVIEW</item> <item>QT_NO_COMBOBOX</item> <item>QT_NO_COMPLETER</item> <item>QT_NO_CONTEXTMENU</item> <item>QT_NO_CRASHHANDLER</item> <item>QT_NO_CUPS</item> <item>QT_NO_DATAWIDGETMAPPER</item> <item>QT_NO_DATESTRING</item> <item>QT_NO_DATETIMEEDIT</item> <item>QT_NO_DBUS</item> <item>QT_NO_DIAL</item> <item>QT_NO_DIRMODEL</item> <item>QT_NO_DOCKWIDGET</item> <item>QT_NO_DRAGANDDROP</item> <item>QT_NO_ERRORMESSAGE</item> <item>QT_NO_EXCEPTIONS</item> <item>QT_NO_FILEDIALOG</item> <item>QT_NO_FILESYSTEMWATCHER</item> <item>QT_NO_FONTCOMBOBOX</item> <item>QT_NO_FONTDIALOG</item> <item>QT_NO_FSCOMPLETER</item> <item>QT_NO_FTP</item> <item>QT_NO_GRAPHICSEFFECT</item> <item>QT_NO_GRAPHICSVIEW</item> <item>QT_NO_ICONV</item> <item>QT_NO_IDENTITYPROXYMODEL</item> <item>QT_NO_IM</item> <item>QT_NO_IMAGEFORMATPLUGIN</item> <item>QT_NO_IMAGEFORMAT_JPEG</item> <item>QT_NO_INPUTDIALOG</item> <item>QT_NO_ITEMVIEWS</item> <item>QT_NO_KEYSEQUENCEEDIT</item> <item>QT_NO_LISTVIEW</item> <item>QT_NO_LISTWIDGET</item> <item>QT_NO_LOCALSERVER</item> <item>QT_NO_MAINWINDOW</item> <item>QT_NO_MDIAREA</item> <item>QT_NO_MENU</item> <item>QT_NO_MENUBAR</item> <item>QT_NO_MULTIPROCESS</item> <item>QT_NO_NETWORKDISKCACHE</item> <item>QT_NO_NETWORKPROXY</item> <item>QT_NO_OPENVG</item> <item>QT_NO_PAINT_DEBUG</item> <item>QT_NO_PDF</item> <item>QT_NO_PRINTDIALOG</item> <item>QT_NO_PRINTER</item> <item>QT_NO_PRINTPREVIEWDIALOG</item> <item>QT_NO_PRINTPREVIEWWIDGET</item> <item>QT_NO_PROCESS</item> <item>QT_NO_PROGRESSDIALOG</item> <item>QT_NO_PROXYMODEL</item> <item>QT_NO_SCROLLAREA</item> <item>QT_NO_SCROLLBAR</item> <item>QT_NO_SHAREDMEMORY</item> <item>QT_NO_SOCKETNOTIFIER</item> <item>QT_NO_SOCKS5</item> <item>QT_NO_SORTFILTERPROXYMODEL</item> <item>QT_NO_SPINBOX</item> <item>QT_NO_SPLITTER</item> <item>QT_NO_STANDARDITEMMODEL</item> <item>QT_NO_STATEMACHINE</item> <item>QT_NO_STRINGLISTMODEL</item> <item>QT_NO_STYLE_FUSION</item> <item>QT_NO_STYLE_STYLESHEET</item> <item>QT_NO_STYLE_WINDOWSCE</item> <item>QT_NO_STYLE_WINDOWSMOBILE</item> <item>QT_NO_STYLE_WINDOWSVISTA</item> <item>QT_NO_STYLE_WINDOWSXP</item> <item>QT_NO_SYNTAXHIGHLIGHTER</item> <item>QT_NO_SYSTEMSEMAPHORE</item> <item>QT_NO_TABBAR</item> <item>QT_NO_TABLEVIEW</item> <item>QT_NO_TABLEWIDGET</item> <item>QT_NO_TABWIDGET</item> <item>QT_NO_TEXTBROWSER</item> <item>QT_NO_TEXTEDIT</item> <item>QT_NO_TEXTODFWRITER</item> <item>QT_NO_TOOLBAR</item> <item>QT_NO_TOOLBOX</item> <item>QT_NO_TOOLBUTTON</item> <item>QT_NO_TREEVIEW</item> <item>QT_NO_TREEWIDGET</item> <item>QT_NO_UNDOGROUP</item> <item>QT_NO_UNDOSTACK</item> <item>QT_NO_UNDOVIEW</item> <item>QT_NO_UNSHARABLE_CONTAINERS</item> <item>QT_NO_WARNINGS</item> <item>QT_NO_WHATSTHIS</item> <item>QT_NO_WIZARD</item> <item>QT_NO_XMLSTREAMREADER</item> <item>QT_NO_XMLSTREAMWRITER</item> <item>QT_NO_ZLIB</item> <item>QT_OSX_DEPLOYMENT_TARGET_BELOW</item> <item>QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE</item> <item>QT_POINTER_SIZE</item> <item>QT_PREPEND_NAMESPACE</item> <item>QT_QPA_DEFAULT_PLATFORM_NAME</item> <item>QT_REDUCE_RELOCATIONS</item> <item>QT_REQUIRE_VERSION</item> <item>QT_RETHROW</item> <item>QT_SHARED</item> <item>QT_STATIC</item> <item>QT_STRINGIFY</item> <item>QT_STRINGIFY2</item> <item>QT_SUPPORTS</item> <item>QT_TERMINATE_ON_EXCEPTION</item> <item>QT_THREADSAFE_CLOEXEC</item> <item>QT_THROW</item> <item>QT_TRANSLATE_NOOP</item> <item>QT_TRANSLATE_NOOP3</item> <item>QT_TRANSLATE_NOOP3_UTF8</item> <item>QT_TRANSLATE_NOOP_UTF8</item> <item>QT_TRID_NOOP</item> <item>QT_TRY</item> <item>QT_TR_NOOP</item> <item>QT_TR_NOOP_UTF8</item> <item>QT_USE_NAMESPACE</item> <item>QT_VERSION</item> <item>QT_VERSION_CHECK</item> <item>QT_VERSION_MAJOR</item> <item>QT_VERSION_MINOR</item> <item>QT_VERSION_PATCH</item> <item>QT_VERSION_STR</item> <item>QT_VISIBILITY_AVAILABLE</item> <item>QT_WIN_CALLBACK</item> <item>Q_ALIGNOF</item> <item>Q_ALWAYS_INLINE</item> <item>Q_ASSERT</item> <item>Q_ASSERT_X</item> <item>Q_ASSUME</item> <item>Q_ATTRIBUTE_FORMAT_PRINTF</item> <item>Q_BIG_ENDIAN</item> <item>Q_BYTE_ORDER</item> <item>Q_CC_BOR</item> <item>Q_CC_CDS</item> <item>Q_CC_COMEAU</item> <item>Q_CC_DEC</item> <item>Q_CC_EDG</item> <item>Q_CC_GHS</item> <item>Q_CC_GNU</item> <item>Q_CC_HIGHC</item> <item>Q_CC_HPACC</item> <item>Q_CC_INTEL</item> <item>Q_CC_KAI</item> <item>Q_CC_MIPS</item> <item>Q_CC_MSVC</item> <item>Q_CC_OC</item> <item>Q_CC_PGI</item> <item>Q_CC_SUN</item> <item>Q_CC_SYM</item> <item>Q_CC_USLC</item> <item>Q_CC_WAT</item> <item>Q_CHECK_PTR</item> <item>Q_CHECK_PTRx</item> <item>Q_CLEANUP_RESOURCE</item> <item>Q_CONSTRUCTOR_FUNCTION</item> <item>Q_CONSTRUCTOR_FUNCTION0</item> <item>Q_D</item> <item>Q_DECLARE_PRIVATE</item> <item>Q_DECLARE_PRIVATE_D</item> <item>Q_DECLARE_PUBLIC</item> <item>Q_DECLARE_TYPEINFO</item> <item>Q_DECL_CONSTEXPR</item> <item>Q_DECL_EXPORT</item> <item>Q_DECL_FINAL</item> <item>Q_DECL_IMPORT</item> <item>Q_DECL_NOEXCEPT</item> <item>Q_DECL_NOEXCEPT_EXPR</item> <item>Q_DECL_NOTHROW</item> <item>Q_DECL_OVERRIDE</item> <item>Q_DECL_RELAXED_CONSTEXPR</item> <item>Q_DESTRUCTOR_FUNCTION</item> <item>Q_DESTRUCTOR_FUNCTION0</item> <item>Q_DISABLE_COPY</item> <item>Q_DUMMY_COMPARISON_OPERATOR</item> <item>Q_FALLTHROUGH</item> <item>Q_FOREACH</item> <item>Q_FOREVER</item> <item>Q_FORWARD_DECLARE_CF_TYPE</item> <item>Q_FORWARD_DECLARE_MUTABLE_CF_TYPE</item> <item>Q_FORWARD_DECLARE_OBJC_CLASS</item> <item>Q_FUNC_INFO</item> <item>Q_INIT_RESOURCE</item> <item>Q_INLINE_TEMPLATE</item> <item>Q_INT64_C</item> <item>Q_LIKELY</item> <item>Q_LITTLE_ENDIAN</item> <item>Q_NEVER_INLINE</item> <item>Q_OF_ELF</item> <item>Q_OF_MACH_O</item> <item>Q_OS_AIX</item> <item>Q_OS_ANDROID</item> <item>Q_OS_BSD4</item> <item>Q_OS_BSDI</item> <item>Q_OS_CYGWIN</item> <item>Q_OS_DARWIN</item> <item>Q_OS_DGUX</item> <item>Q_OS_DYNIX</item> <item>Q_OS_FREEBSD</item> <item>Q_OS_HPUX</item> <item>Q_OS_HURD</item> <item>Q_OS_IOS</item> <item>Q_OS_IRIX</item> <item>Q_OS_LINUX</item> <item>Q_OS_LYNX</item> <item>Q_OS_MAC</item> <item>Q_OS_MACOS</item> <item>Q_OS_NETBSD</item> <item>Q_OS_OPENBSD</item> <item>Q_OS_OSF</item> <item>Q_OS_OSX</item> <item>Q_OS_QNX</item> <item>Q_OS_RELIANT</item> <item>Q_OS_SCO</item> <item>Q_OS_SOLARIS</item> <item>Q_OS_TVOS</item> <item>Q_OS_ULTRIX</item> <item>Q_OS_UNIX</item> <item>Q_OS_UNIXWARE</item> <item>Q_OS_WATCHOS</item> <item>Q_OS_WIN</item> <item>Q_OS_WIN32</item> <item>Q_OS_WIN64</item> <item>Q_OS_WINPHONE</item> <item>Q_OS_WINRT</item> <item>Q_OUTOFLINE_TEMPLATE</item> <item>Q_PROCESSOR_ALPHA</item> <item>Q_PROCESSOR_ARM</item> <item>Q_PROCESSOR_ARM_V5</item> <item>Q_PROCESSOR_ARM_V6</item> <item>Q_PROCESSOR_ARM_V7</item> <item>Q_PROCESSOR_AVR32</item> <item>Q_PROCESSOR_BLACKFIN</item> <item>Q_PROCESSOR_IA64</item> <item>Q_PROCESSOR_MIPS</item> <item>Q_PROCESSOR_MIPS_32</item> <item>Q_PROCESSOR_MIPS_64</item> <item>Q_PROCESSOR_MIPS_I</item> <item>Q_PROCESSOR_MIPS_II</item> <item>Q_PROCESSOR_MIPS_III</item> <item>Q_PROCESSOR_MIPS_IV</item> <item>Q_PROCESSOR_MIPS_V</item> <item>Q_PROCESSOR_POWER</item> <item>Q_PROCESSOR_POWER_32</item> <item>Q_PROCESSOR_POWER_64</item> <item>Q_PROCESSOR_S390</item> <item>Q_PROCESSOR_S390_X</item> <item>Q_PROCESSOR_SH</item> <item>Q_PROCESSOR_SH_4A</item> <item>Q_PROCESSOR_SPARC</item> <item>Q_PROCESSOR_SPARC_V9</item> <item>Q_PROCESSOR_X86</item> <item>Q_PROCESSOR_X86_32</item> <item>Q_PROCESSOR_X86_64</item> <item>Q_Q</item> <item>Q_STATIC_ASSERT</item> <item>Q_STATIC_ASSERT_PRIVATE_JOIN</item> <item>Q_STATIC_ASSERT_PRIVATE_JOIN_IMPL</item> <item>Q_STATIC_ASSERT_X</item> <item>Q_UINT64_C</item> <item>Q_UNIMPLEMENTED</item> <item>Q_UNLIKELY</item> <item>Q_UNREACHABLE</item> <item>Q_UNUSED</item> <!-- arguments for Q_DECLARE_TYPEINFO, not really macros but good if highlighted like that --> <item>Q_COMPLEX_TYPE</item> <item>Q_PRIMITIVE_TYPE</item> <item>Q_STATIC_TYPE</item> <item>Q_MOVABLE_TYPE</item> <item>Q_DUMMY_TYPE</item> <item>Q_RELOCATABLE_TYPE</item> </list> <list name="QtFunc"> <!-- Global functions list from path_to_url#static-public-members --> <item>connect</item> <item>disconnect</item> <item>staticMetaObject</item> <item>tr</item> <item>trUtf8</item> <!-- Global functions list from path_to_url#related-non-members --> <item>qFindChildren</item> <item>qobject_cast</item> <!-- Global functions list path_to_url --> <item>qAbs</item> <item>qAsConst</item> <item>qBound</item> <item>qConstOverload</item> <item>qCritical</item> <item>qDebug</item> <item>qEnvironmentVariableIntValue</item> <item>qEnvironmentVariableIsEmpty</item> <item>qEnvironmentVariableIsSet</item> <item>qFloatDistance</item> <item>qFormatLogMessage</item> <item>qFatal</item> <item>qFuzzyCompare</item> <item>qFuzzyIsNull</item> <item>qInfo</item> <item>qMove</item> <item>qInstallMessageHandler</item> <item>qIsFinite</item> <item>qIsInf</item> <item>qIsNaN</item> <item>qMakePair</item> <item>qMax</item> <item>qMin</item> <item>qNonConstOverload</item> <item>qOverload</item> <item>qPrintable</item> <item>qQNaN</item> <item>qUtf16Printable</item> <item>qUtf8Printable</item> <item>qRound64</item> <item>qRound</item> <item>qSNaN</item> <item>qSetMessagePattern</item> <item>qVersion</item> <item>qWarning</item> <item>q_check_ptr</item> <item>qgetenv</item> <item>qrand</item> <item>qsrand</item> <item>qtTrId</item> <item>qt_set_sequence_auto_mnemonic</item> <!-- Global functions list from path_to_url --> <item>qCountLeadingZeroBits</item> <item>qCountTrailingZeroBits</item> <item>qBinaryFind</item> <item>qCopy</item> <item>qCopyBackward</item> <item>qCount</item> <item>qDeleteAll</item> <item>qPopulationCount</item> <item>qEqual</item> <item>qFill</item> <item>qFind</item> <item>qGreater</item> <item>qLess</item> <item>qLowerBound</item> <item>qSort</item> <item>qStableSort</item> <item>qSwap</item> <item>qUpperBound</item> <!-- Related non-members from path_to_url#related-non-members --> <item>qChecksum</item> <item>qCompress</item> <item>qUncompress</item> <item>qsnprintf</item> <item>qstrcmp</item> <item>qstrcpy</item> <item>qstrdup</item> <item>qstricmp</item> <item>qstrlen</item> <item>qstrncmp</item> <item>qstrncpy</item> <item>qstrnicmp</item> <item>qstrnlen</item> <item>qvsnprintf</item> <!-- path_to_url#related-non-members --> <item>qGlobalQHashSeed</item> <item>qHash</item> <item>qHashBits</item> <item>qHashRange</item> <item>qHashRangeCommutative</item> <item>qSetGlobalQHashSeed</item> <!-- path_to_url#related-non-members --> <item>qMetaTypeId</item> <item>qRegisterMetaType</item> <item>qRegisterMetaTypeStreamOperators</item> <!-- path_to_url#related-non-members --> <item>qAlpha</item> <item>qBlue</item> <item>qGray</item> <item>qGreen</item> <item>qPremultiply</item> <item>qRed</item> <item>qRgb</item> <item>qRgba</item> <item>qRgba</item> <item>qRgba64</item> <item>qUnpremultiply</item> <!-- path_to_url#related-non-members --> <item>qAddPostRoutine</item> <item>qRemovePostRoutine</item> <!-- path_to_url#related-non-members --> <item>qmlAttachedPropertiesObject</item> <item>qmlClearTypeRegistrations</item> <item>qmlContext</item> <item>qmlEngine</item> <item>qmlInfo</item> <item>qmlProtectModule</item> <item>qmlRegisterExtendedType</item> <item>qmlRegisterExtendedUncreatableType</item> <item>qmlRegisterInterface</item> <item>qmlRegisterRevision</item> <item>qmlRegisterSingletonType</item> <item>qmlRegisterType</item> <item>qmlRegisterTypeNotAvailable</item> <item>qmlRegisterUncreatableType</item> <!-- path_to_url#related-non-members --> <item>qt_extension</item> <!-- path_to_url#related-non-members --> <item>qvariant_cast</item> <!-- path_to_url#related-non-members --> <item>qDBusRegisterMetaType</item> <item>qdbus_cast</item> </list> <!-- Types list from path_to_url --> <list name="QtTypes"> <item>QtFunctionPointer</item> <item>QtMessageHandler</item> <item>QtMsgType</item> <item>qint8</item> <item>qint16</item> <item>qint32</item> <item>qint64</item> <item>qlonglong</item> <item>qptrdiff</item> <item>qreal</item> <item>quint8</item> <item>quint16</item> <item>quint32</item> <item>quint64</item> <item>quintptr</item> <item>qulonglong</item> <item>uchar</item> <item>uint</item> <item>ulong</item> <item>ushort</item> <!-- path_to_url#Q_PID-typedef --> <item>Q_PID</item> <!-- path_to_url#related-non-members --> <item>QRgb</item> <!-- path_to_url#related-non-members --> <item>qScriptConnect</item> <item>qScriptDisconnect</item> <item>qScriptRegisterMetaType</item> <item>qScriptRegisterSequenceMetaType</item> <item>qScriptValueFromSequence</item> <item>qScriptValueToSequence</item> </list> <!-- List of Qt5 classes, obtained from path_to_url --> <list name="QtClasses"> <!-- Extracted with regular expression Q[A-Z0-9][A-Za-z0-9]* --> <item>Q3DBars</item> <item>Q3DCamera</item> <item>Q3DInputHandler</item> <item>Q3DLight</item> <item>Q3DObject</item> <item>Q3DScatter</item> <item>Q3DScene</item> <item>Q3DSurface</item> <item>Q3DTheme</item> <item>QAbstract3DAxis</item> <item>QAbstract3DGraph</item> <item>QAbstract3DInputHandler</item> <item>QAbstract3DSeries</item> <item>QAbstractActionInput</item> <item>QAbstractAnimation</item> <item>QAbstractAnimation</item> <item>QAbstractAnimationClip</item> <item>QAbstractAspect</item> <item>QAbstractAudioDeviceInfo</item> <item>QAbstractAudioInput</item> <item>QAbstractAudioOutput</item> <item>QAbstractAxis</item> <item>QAbstractAxisInput</item> <item>QAbstractBarSeries</item> <item>QAbstractButton</item> <item>QAbstractCameraController</item> <item>QAbstractClipAnimator</item> <item>QAbstractClipBlendNode</item> <item>QAbstractDataProxy</item> <item>QAbstractEventDispatcher</item> <item>QAbstractExtensionFactory</item> <item>QAbstractExtensionManager</item> <item>QAbstractFormBuilder</item> <item>QAbstractFunctor</item> <item>QAbstractGraphicsShapeItem</item> <item>QAbstractItemDelegate</item> <item>QAbstractItemModel</item> <item>QAbstractItemModelTester</item> <item>QAbstractItemView</item> <item>QAbstractLight</item> <item>QAbstractListModel</item> <item>QAbstractMessageHandler</item> <item>QAbstractNativeEventFilter</item> <item>QAbstractNetworkCache</item> <item>QAbstractOAuth</item> <item>QAbstractOAuth2</item> <item>QAbstractOAuthReplyHandler</item> <item>QAbstractOpenGLFunctions</item> <item>QAbstractPhysicalDevice</item> <item>QAbstractPhysicalDeviceProxy</item> <item>QAbstractPlanarVideoBuffer</item> <item>QAbstractPrintDialog</item> <item>QAbstractProxyModel</item> <item>QAbstractRayCaster</item> <item>QAbstractScrollArea</item> <item>QAbstractSeries</item> <item>QAbstractSkeleton</item> <item>QAbstractSlider</item> <item>QAbstractSocket</item> <item>QAbstractSpinBox</item> <item>QAbstractState</item> <item>QAbstractTableModel</item> <item>QAbstractTextDocumentLayout</item> <item>QAbstractTexture</item> <item>QAbstractTextureImage</item> <item>QAbstractTransition</item> <item>QAbstractUriResolver</item> <item>QAbstractVideoBuffer</item> <item>QAbstractVideoFilter</item> <item>QAbstractVideoSurface</item> <item>QAbstractXmlNodeModel</item> <item>QAbstractXmlReceiver</item> <item>QAccelerometer</item> <item>QAccelerometerFilter</item> <item>QAccelerometerReading</item> <item>QAccessible</item> <item>QAccessibleActionInterface</item> <item>QAccessibleEditableTextInterface</item> <item>QAccessibleEvent</item> <item>QAccessibleInterface</item> <item>QAccessibleObject</item> <item>QAccessiblePlugin</item> <item>QAccessibleStateChangeEvent</item> <item>QAccessibleTableCellInterface</item> <item>QAccessibleTableInterface</item> <item>QAccessibleTableModelChangeEvent</item> <item>QAccessibleTextCursorEvent</item> <item>QAccessibleTextInsertEvent</item> <item>QAccessibleTextInterface</item> <item>QAccessibleTextRemoveEvent</item> <item>QAccessibleTextSelectionEvent</item> <item>QAccessibleTextUpdateEvent</item> <item>QAccessibleValueChangeEvent</item> <item>QAccessibleValueInterface</item> <item>QAccessibleWidget</item> <item>QAction</item> <item>QAction</item> <item>QActionEvent</item> <item>QActionGroup</item> <item>QActionInput</item> <item>QAdditiveClipBlend</item> <item>QAlphaCoverage</item> <item>QAlphaTest</item> <item>QAltimeter</item> <item>QAltimeterFilter</item> <item>QAltimeterReading</item> <item>QAmbientLightFilter</item> <item>QAmbientLightReading</item> <item>QAmbientLightSensor</item> <item>QAmbientTemperatureFilter</item> <item>QAmbientTemperatureReading</item> <item>QAmbientTemperatureSensor</item> <item>QAnalogAxisInput</item> <item>QAndroidActivityResultReceiver</item> <item>QAndroidBinder</item> <item>QAndroidIntent</item> <item>QAndroidJniEnvironment</item> <item>QAndroidJniExceptionCleaner</item> <item>QAndroidJniObject</item> <item>QAndroidParcel</item> <item>QAndroidService</item> <item>QAndroidServiceConnection</item> <item>QAnimationAspect</item> <item>QAnimationCallback</item> <item>QAnimationClip</item> <item>QAnimationClipData</item> <item>QAnimationClipLoader</item> <item>QAnimationController</item> <item>QAnimationGroup</item> <item>QAnimationGroup</item> <item>QApplication</item> <item>QAreaLegendMarker</item> <item>QAreaSeries</item> <item>QArmature</item> <item>QAspectEngine</item> <item>QAspectJob</item> <item>QAssociativeIterable</item> <item>QAtomicInt</item> <item>QAtomicInteger</item> <item>QAtomicPointer</item> <item>QAttribute</item> <item>QAudioBuffer</item> <item>QAudioDecoder</item> <item>QAudioDecoderControl</item> <item>QAudioDeviceInfo</item> <item>QAudioEncoderSettings</item> <item>QAudioEncoderSettingsControl</item> <item>QAudioFormat</item> <item>QAudioInput</item> <item>QAudioInputSelectorControl</item> <item>QAudioOutput</item> <item>QAudioOutputSelectorControl</item> <item>QAudioProbe</item> <item>QAudioRecorder</item> <item>QAudioRoleControl</item> <item>QAudioSystemPlugin</item> <item>QAuthenticator</item> <item>QAxAggregated</item> <item>QAxBase</item> <item>QAxBindable</item> <item>QAxFactory</item> <item>QAxis</item> <item>QAxisAccumulator</item> <item>QAxisSetting</item> <item>QAxObject</item> <item>QAxScript</item> <item>QAxScriptEngine</item> <item>QAxScriptManager</item> <item>QAxSelect</item> <item>QAxWidget</item> <item>QBackendNode</item> <item>QBackendNodeMapper</item> <item>QBackingStore</item> <item>QBar3DSeries</item> <item>QBarCategoryAxis</item> <item>QBarDataItem</item> <item>QBarDataProxy</item> <item>QBarLegendMarker</item> <item>QBarSeries</item> <item>QBarSet</item> <item>QBasicTimer</item> <item>QBEInteger</item> <item>QBitArray</item> <item>QBitmap</item> <item>QBlendedClipAnimator</item> <item>QBlendEquation</item> <item>QBlendEquationArguments</item> <item>QBlitFramebuffer</item> <item>QBluetoothAddress</item> <item>QBluetoothDeviceDiscoveryAgent</item> <item>QBluetoothDeviceInfo</item> <item>QBluetoothHostInfo</item> <item>QBluetoothLocalDevice</item> <item>QBluetoothServer</item> <item>QBluetoothServiceDiscoveryAgent</item> <item>QBluetoothServiceInfo</item> <item>QBluetoothSocket</item> <item>QBluetoothTransferManager</item> <item>QBluetoothTransferReply</item> <item>QBluetoothTransferRequest</item> <item>QBluetoothUuid</item> <item>QBoxLayout</item> <item>QBoxPlotLegendMarker</item> <item>QBoxPlotSeries</item> <item>QBoxSet</item> <item>QBrush</item> <item>QBuffer</item> <item>QBuffer</item> <item>QBufferCapture</item> <item>QBufferDataGenerator</item> <item>QButtonAxisInput</item> <item>QButtonGroup</item> <item>QByteArray</item> <item>QByteArrayList</item> <item>QByteArrayMatcher</item> <item>QCache</item> <item>QCalendar</item> <item>QCalendarWidget</item> <item>QCallbackMapping</item> <item>QCamera</item> <item>QCamera</item> <item>QCameraCaptureBufferFormatControl</item> <item>QCameraCaptureDestinationControl</item> <item>QCameraControl</item> <item>QCameraExposure</item> <item>QCameraExposureControl</item> <item>QCameraFeedbackControl</item> <item>QCameraFlashControl</item> <item>QCameraFocus</item> <item>QCameraFocusControl</item> <item>QCameraFocusZone</item> <item>QCameraImageCapture</item> <item>QCameraImageCaptureControl</item> <item>QCameraImageProcessing</item> <item>QCameraImageProcessingControl</item> <item>QCameraInfo</item> <item>QCameraInfoControl</item> <item>QCameraLens</item> <item>QCameraLocksControl</item> <item>QCameraSelector</item> <item>QCameraViewfinderSettings</item> <item>QCameraViewfinderSettingsControl</item> <item>QCameraViewfinderSettingsControl2</item> <item>QCameraZoomControl</item> <item>QCanBus</item> <item>QCanBusDevice</item> <item>QCanBusDeviceInfo</item> <item>QCanBusFactory</item> <item>QCanBusFactoryV2</item> <item>QCanBusFrame</item> <item>QCandlestickLegendMarker</item> <item>QCandlestickModelMapper</item> <item>QCandlestickSeries</item> <item>QCandlestickSet</item> <item>QCategory3DAxis</item> <item>QCategoryAxis</item> <item>QCborArray</item> <item>QCborError</item> <item>QCborMap</item> <item>QCborParserError</item> <item>QCborStreamReader</item> <item>QCborStreamWriter</item> <item>QCborValue</item> <item>QChannel</item> <item>QChannelMapper</item> <item>QChannelMapping</item> <item>QChannelMappingCreatedChangeBase</item> <item>QChar</item> <item>QChart</item> <item>QChartView</item> <item>QCheckBox</item> <item>QChildEvent</item> <item>QClearBuffers</item> <item>QClipAnimator</item> <item>QClipBlendNodeCreatedChangeBase</item> <item>QClipBlendValue</item> <item>QClipboard</item> <item>QClipPlane</item> <item>QCloseEvent</item> <item>QCocoaNativeContext</item> <item>QCocoaWindowFunctions</item> <item>QCollator</item> <item>QCollatorSortKey</item> <item>QColor</item> <item>QColorDialog</item> <item>QColormap</item> <item>QColorMask</item> <item>QColorSpace</item> <item>QColorTransform</item> <item>QColumnView</item> <item>QComboBox</item> <item>QCommandLineOption</item> <item>QCommandLineParser</item> <item>QCommandLinkButton</item> <item>QCommonStyle</item> <item>QCompass</item> <item>QCompassFilter</item> <item>QCompassReading</item> <item>QCompleter</item> <item>QComponent</item> <item>QComponentAddedChange</item> <item>QComponentRemovedChange</item> <item>QCompressedHelpInfo</item> <item>QComputeCommand</item> <item>QConcatenateTablesProxyModel</item> <item>QConeGeometry</item> <item>QConeMesh</item> <item>QConicalGradient</item> <item>QContextMenuEvent</item> <item>QContiguousCache</item> <item>QCoreApplication</item> <item>QCryptographicHash</item> <item>QCuboidGeometry</item> <item>QCuboidMesh</item> <item>QCullFace</item> <item>QCursor</item> <item>QCustom3DItem</item> <item>QCustom3DLabel</item> <item>QCustom3DVolume</item> <item>QCustomAudioRoleControl</item> <item>QCylinderGeometry</item> <item>QCylinderMesh</item> <item>QDataStream</item> <item>QDataWidgetMapper</item> <item>QDate</item> <item>QDateEdit</item> <item>QDateTime</item> <item>QDateTimeAxis</item> <item>QDateTimeEdit</item> <item>QDBusAbstractAdaptor</item> <item>QDBusAbstractInterface</item> <item>QDBusArgument</item> <item>QDBusConnection</item> <item>QDBusConnectionInterface</item> <item>QDBusContext</item> <item>QDBusError</item> <item>QDBusInterface</item> <item>QDBusMessage</item> <item>QDBusObjectPath</item> <item>QDBusPendingCall</item> <item>QDBusPendingCallWatcher</item> <item>QDBusPendingReply</item> <item>QDBusReply</item> <item>QDBusServer</item> <item>QDBusServiceWatcher</item> <item>QDBusSignature</item> <item>QDBusUnixFileDescriptor</item> <item>QDBusVariant</item> <item>QDBusVirtualObject</item> <item>QDeadlineTimer</item> <item>QDebug</item> <item>QDebugStateSaver</item> <item>QDepthRange</item> <item>QDepthTest</item> <item>QDesignerActionEditorInterface</item> <item>QDesignerContainerExtension</item> <item>QDesignerCustomWidgetCollectionInterface</item> <item>QDesignerCustomWidgetInterface</item> <item>QDesignerDynamicPropertySheetExtension</item> <item>QDesignerFormEditorInterface</item> <item>QDesignerFormWindowCursorInterface</item> <item>QDesignerFormWindowInterface</item> <item>QDesignerFormWindowManagerInterface</item> <item>QDesignerMemberSheetExtension</item> <item>QDesignerObjectInspectorInterface</item> <item>QDesignerPropertyEditorInterface</item> <item>QDesignerPropertySheetExtension</item> <item>QDesignerTaskMenuExtension</item> <item>QDesignerWidgetBoxInterface</item> <item>QDesktopServices</item> <item>QDesktopWidget</item> <item>QDial</item> <item>QDialog</item> <item>QDialogButtonBox</item> <item>QDiffuseMapMaterial</item> <item>QDiffuseSpecularMapMaterial</item> <item>QDiffuseSpecularMaterial</item> <item>QDir</item> <item>QDirectionalLight</item> <item>QDirIterator</item> <item>QDirModel</item> <item>QDispatchCompute</item> <item>QDistanceFilter</item> <item>QDistanceReading</item> <item>QDistanceSensor</item> <item>QDithering</item> <item>QDnsDomainNameRecord</item> <item>QDnsHostAddressRecord</item> <item>QDnsLookup</item> <item>QDnsMailExchangeRecord</item> <item>QDnsServiceRecord</item> <item>QDnsTextRecord</item> <item>QDockWidget</item> <item>QDomAttr</item> <item>QDomCDATASection</item> <item>QDomCharacterData</item> <item>QDomComment</item> <item>QDomDocument</item> <item>QDomDocumentFragment</item> <item>QDomDocumentType</item> <item>QDomElement</item> <item>QDomEntity</item> <item>QDomEntityReference</item> <item>QDomImplementation</item> <item>QDomNamedNodeMap</item> <item>QDomNode</item> <item>QDomNodeList</item> <item>QDomNotation</item> <item>QDomProcessingInstruction</item> <item>QDomText</item> <item>QDoubleSpinBox</item> <item>QDoubleValidator</item> <item>QDrag</item> <item>QDragEnterEvent</item> <item>QDragLeaveEvent</item> <item>QDragMoveEvent</item> <item>QDropEvent</item> <item>QDtls</item> <item>QDtlsClientVerifier</item> <item>QDynamicPropertyChangeEvent</item> <item>QDynamicPropertyUpdatedChange</item> <item>QEasingCurve</item> <item>QEffect</item> <item>QEglFSFunctions</item> <item>QEGLNativeContext</item> <item>QElapsedTimer</item> <item>QEnableSharedFromThis</item> <item>QEnterEvent</item> <item>QEntity</item> <item>QEnvironmentLight</item> <item>QErrorMessage</item> <item>QEvent</item> <item>QEventLoop</item> <item>QEventLoopLocker</item> <item>QEventTransition</item> <item>QException</item> <item>QExplicitlySharedDataPointer</item> <item>QExposeEvent</item> <item>QExtensionFactory</item> <item>QExtensionManager</item> <item>QExtrudedTextGeometry</item> <item>QExtrudedTextMesh</item> <item>QFile</item> <item>QFileDevice</item> <item>QFileDialog</item> <item>QFileIconProvider</item> <item>QFileInfo</item> <item>QFileOpenEvent</item> <item>QFileSelector</item> <item>QFileSystemModel</item> <item>QFileSystemWatcher</item> <item>QFilterKey</item> <item>QFinalState</item> <item>QFirstPersonCameraController</item> <item>QFlag</item> <item>QFlags</item> <item>qfloat16</item> <item>QFocusEvent</item> <item>QFocusFrame</item> <item>QFont</item> <item>QFontComboBox</item> <item>QFontDatabase</item> <item>QFontDialog</item> <item>QFontInfo</item> <item>QFontMetrics</item> <item>QFontMetricsF</item> <item>QFormBuilder</item> <item>QFormLayout</item> <item>QForwardRenderer</item> <item>QFrame</item> <item>QFrameAction</item> <item>QFrameGraphNode</item> <item>QFrameGraphNodeCreatedChangeBase</item> <item>QFrontFace</item> <item>QFrustumCulling</item> <item>QFuture</item> <item>QFutureIterator</item> <item>QFutureSynchronizer</item> <item>QFutureWatcher</item> <item>QGamepad</item> <item>QGamepadKeyNavigation</item> <item>QGamepadManager</item> <item>QGenericArgument</item> <item>QGenericMatrix</item> <item>QGenericPlugin</item> <item>QGenericPluginFactory</item> <item>QGenericReturnArgument</item> <item>QGeoAddress</item> <item>QGeoAreaMonitorInfo</item> <item>QGeoAreaMonitorSource</item> <item>QGeoCircle</item> <item>QGeoCodeReply</item> <item>QGeoCodingManager</item> <item>QGeoCodingManagerEngine</item> <item>QGeoCoordinate</item> <item>QGeoJson</item> <item>QGeoLocation</item> <item>QGeoManeuver</item> <item>QGeometry</item> <item>QGeometryRenderer</item> <item>QGeoPath</item> <item>QGeoPolygon</item> <item>QGeoPositionInfo</item> <item>QGeoPositionInfoSource</item> <item>QGeoPositionInfoSourceFactory</item> <item>QGeoPositionInfoSourceFactoryV2</item> <item>QGeoRectangle</item> <item>QGeoRoute</item> <item>QGeoRouteLeg</item> <item>QGeoRouteReply</item> <item>QGeoRouteRequest</item> <item>QGeoRouteSegment</item> <item>QGeoRoutingManager</item> <item>QGeoRoutingManagerEngine</item> <item>QGeoSatelliteInfo</item> <item>QGeoSatelliteInfoSource</item> <item>QGeoServiceProvider</item> <item>QGeoServiceProviderFactory</item> <item>QGeoServiceProviderFactoryV2</item> <item>QGeoShape</item> <item>QGesture</item> <item>QGestureEvent</item> <item>QGestureRecognizer</item> <item>QGLBuffer</item> <item>QGLColormap</item> <item>QGLContext</item> <item>QGLFormat</item> <item>QGLFramebufferObject</item> <item>QGLFramebufferObjectFormat</item> <item>QGLFunctions</item> <item>QGlobalStatic</item> <item>QGLPixelBuffer</item> <item>QGLShader</item> <item>QGLShaderProgram</item> <item>QGLWidget</item> <item>QGLXNativeContext</item> <item>QGlyphRun</item> <item>QGoochMaterial</item> <item>QGradient</item> <item>QGraphicsAnchor</item> <item>QGraphicsAnchorLayout</item> <item>QGraphicsApiFilter</item> <item>QGraphicsBlurEffect</item> <item>QGraphicsColorizeEffect</item> <item>QGraphicsDropShadowEffect</item> <item>QGraphicsEffect</item> <item>QGraphicsEllipseItem</item> <item>QGraphicsGridLayout</item> <item>QGraphicsItem</item> <item>QGraphicsItemAnimation</item> <item>QGraphicsItemGroup</item> <item>QGraphicsLayout</item> <item>QGraphicsLayoutItem</item> <item>QGraphicsLinearLayout</item> <item>QGraphicsLineItem</item> <item>QGraphicsObject</item> <item>QGraphicsOpacityEffect</item> <item>QGraphicsPathItem</item> <item>QGraphicsPixmapItem</item> <item>QGraphicsPolygonItem</item> <item>QGraphicsProxyWidget</item> <item>QGraphicsRectItem</item> <item>QGraphicsRotation</item> <item>QGraphicsScale</item> <item>QGraphicsScene</item> <item>QGraphicsSceneContextMenuEvent</item> <item>QGraphicsSceneDragDropEvent</item> <item>QGraphicsSceneEvent</item> <item>QGraphicsSceneHelpEvent</item> <item>QGraphicsSceneHoverEvent</item> <item>QGraphicsSceneMouseEvent</item> <item>QGraphicsSceneMoveEvent</item> <item>QGraphicsSceneResizeEvent</item> <item>QGraphicsSceneWheelEvent</item> <item>QGraphicsSimpleTextItem</item> <item>QGraphicsSvgItem</item> <item>QGraphicsTextItem</item> <item>QGraphicsTransform</item> <item>QGraphicsView</item> <item>QGraphicsWidget</item> <item>QGregorianCalendar</item> <item>QGridLayout</item> <item>QGroupBox</item> <item>QGuiApplication</item> <item>QGyroscope</item> <item>QGyroscopeFilter</item> <item>QGyroscopeReading</item> <item>QHash</item> <item>QHashIterator</item> <item>QHBarModelMapper</item> <item>QHBoxLayout</item> <item>QHBoxPlotModelMapper</item> <item>QHCandlestickModelMapper</item> <item>QHeaderView</item> <item>QHeightMapSurfaceDataProxy</item> <item>QHelpContentItem</item> <item>QHelpContentModel</item> <item>QHelpContentWidget</item> <item>QHelpEngine</item> <item>QHelpEngineCore</item> <item>QHelpEvent</item> <item>QHelpFilterData</item> <item>QHelpFilterEngine</item> <item>QHelpFilterSettingsWidget</item> <item>QHelpIndexModel</item> <item>QHelpIndexWidget</item> <item>QHelpLink</item> <item>QHelpSearchEngine</item> <item>QHelpSearchQuery</item> <item>QHelpSearchQueryWidget</item> <item>QHelpSearchResult</item> <item>QHelpSearchResultWidget</item> <item>QHideEvent</item> <item>QHistoryState</item> <item>QHolsterFilter</item> <item>QHolsterReading</item> <item>QHolsterSensor</item> <item>QHorizontalBarSeries</item> <item>QHorizontalPercentBarSeries</item> <item>QHorizontalStackedBarSeries</item> <item>QHostAddress</item> <item>QHostInfo</item> <item>QHoverEvent</item> <item>QHPieModelMapper</item> <item>QHstsPolicy</item> <item>QHttp2Configuration</item> <item>QHttpMultiPart</item> <item>QHttpPart</item> <item>QHumidityFilter</item> <item>QHumidityReading</item> <item>QHumiditySensor</item> <item>QHXYModelMapper</item> <item>QIcon</item> <item>QIconDragEvent</item> <item>QIconEngine</item> <item>QIconEnginePlugin</item> <item>QIdentityProxyModel</item> <item>QImage</item> <item>QImageEncoderControl</item> <item>QImageEncoderSettings</item> <item>QImageIOHandler</item> <item>QImageIOPlugin</item> <item>QImageReader</item> <item>QImageWriter</item> <item>QInAppProduct</item> <item>QInAppStore</item> <item>QInAppTransaction</item> <item>QInputAspect</item> <item>QInputChord</item> <item>QInputDeviceIntegration</item> <item>QInputDialog</item> <item>QInputEvent</item> <item>QInputMethod</item> <item>QInputMethodEvent</item> <item>QInputMethodQueryEvent</item> <item>QInputSequence</item> <item>QInputSettings</item> <item>QIntValidator</item> <item>QIODevice</item> <item>QIRProximityFilter</item> <item>QIRProximityReading</item> <item>QIRProximitySensor</item> <item>QItemDelegate</item> <item>QItemEditorCreator</item> <item>QItemEditorCreatorBase</item> <item>QItemEditorFactory</item> <item>QItemModelBarDataProxy</item> <item>QItemModelScatterDataProxy</item> <item>QItemModelSurfaceDataProxy</item> <item>QItemSelection</item> <item>QItemSelectionModel</item> <item>QItemSelectionRange</item> <item>QJalaliCalendar</item> <item>QJoint</item> <item>QJSEngine</item> <item>QJsonArray</item> <item>QJsonDocument</item> <item>QJsonObject</item> <item>QJsonParseError</item> <item>QJsonValue</item> <item>QJSValue</item> <item>QJSValueIterator</item> <item>QJulianCalendar</item> <item>QKeyboardDevice</item> <item>QKeyboardHandler</item> <item>QKeyEvent</item> <item>QKeyEvent</item> <item>QKeyEventTransition</item> <item>QKeyFrame</item> <item>QKeyframeAnimation</item> <item>QKeySequence</item> <item>QKeySequenceEdit</item> <item>QKeyValueIterator</item> <item>QLabel</item> <item>QLatin1Char</item> <item>QLatin1String</item> <item>QLayer</item> <item>QLayerFilter</item> <item>QLayout</item> <item>QLayoutItem</item> <item>QLCDNumber</item> <item>QLegend</item> <item>QLegendMarker</item> <item>QLEInteger</item> <item>QLerpClipBlend</item> <item>QLevelOfDetail</item> <item>QLevelOfDetailBoundingSphere</item> <item>QLevelOfDetailSwitch</item> <item>QLibrary</item> <item>QLibraryInfo</item> <item>QLidFilter</item> <item>QLidReading</item> <item>QLidSensor</item> <item>QLightFilter</item> <item>QLightReading</item> <item>QLightSensor</item> <item>QLine</item> <item>QLinearGradient</item> <item>QLineEdit</item> <item>QLineF</item> <item>QLineSeries</item> <item>QLineWidth</item> <item>QLinkedList</item> <item>QLinkedListIterator</item> <item>QLinuxFbFunctions</item> <item>QList</item> <item>QListIterator</item> <item>QListView</item> <item>QListWidget</item> <item>QListWidgetItem</item> <item>QLocale</item> <item>QLocalServer</item> <item>QLocalSocket</item> <item>QLockFile</item> <item>QLoggingCategory</item> <item>QLogicalDevice</item> <item>QLogicAspect</item> <item>QLogValue3DAxisFormatter</item> <item>QLogValueAxis</item> <item>QLowEnergyAdvertisingData</item> <item>QLowEnergyAdvertisingParameters</item> <item>QLowEnergyCharacteristic</item> <item>QLowEnergyCharacteristicData</item> <item>QLowEnergyConnectionParameters</item> <item>QLowEnergyController</item> <item>QLowEnergyDescriptor</item> <item>QLowEnergyDescriptorData</item> <item>QLowEnergyService</item> <item>QLowEnergyServiceData</item> <item>QMacCocoaViewContainer</item> <item>QMacNativeWidget</item> <item>QMacPasteboardMime</item> <item>QMacToolBar</item> <item>QMacToolBarItem</item> <item>QMagnetometer</item> <item>QMagnetometerFilter</item> <item>QMagnetometerReading</item> <item>QMainWindow</item> <item>QMap</item> <item>QMapIterator</item> <item>QMargins</item> <item>QMarginsF</item> <item>QMaskGenerator</item> <item>QMaterial</item> <item>QMatrix</item> <item>QMatrix4x4</item> <item>QMdiArea</item> <item>QMdiSubWindow</item> <item>QMediaAudioProbeControl</item> <item>QMediaAvailabilityControl</item> <item>QMediaBindableInterface</item> <item>QMediaContainerControl</item> <item>QMediaContent</item> <item>QMediaControl</item> <item>QMediaGaplessPlaybackControl</item> <item>QMediaNetworkAccessControl</item> <item>QMediaObject</item> <item>QMediaPlayer</item> <item>QMediaPlayerControl</item> <item>QMediaPlaylist</item> <item>QMediaRecorder</item> <item>QMediaRecorderControl</item> <item>QMediaResource</item> <item>QMediaService</item> <item>QMediaServiceCameraInfoInterface</item> <item>QMediaServiceDefaultDeviceInterface</item> <item>QMediaServiceFeaturesInterface</item> <item>QMediaServiceProviderPlugin</item> <item>QMediaServiceSupportedDevicesInterface</item> <item>QMediaServiceSupportedFormatsInterface</item> <item>QMediaStreamsControl</item> <item>QMediaTimeInterval</item> <item>QMediaTimeRange</item> <item>QMediaVideoProbeControl</item> <item>QMemoryBarrier</item> <item>QMenu</item> <item>QMenuBar</item> <item>QMesh</item> <item>QMessageAuthenticationCode</item> <item>QMessageBox</item> <item>QMessageLogContext</item> <item>QMessageLogger</item> <item>QMetaClassInfo</item> <item>QMetaDataReaderControl</item> <item>QMetaDataWriterControl</item> <item>QMetaEnum</item> <item>QMetalRoughMaterial</item> <item>QMetaMethod</item> <item>QMetaObject</item> <item>QMetaProperty</item> <item>QMetaType</item> <item>QMilankovicCalendar</item> <item>QMimeData</item> <item>QMimeDatabase</item> <item>QMimeType</item> <item>QModbusClient</item> <item>QModbusDataUnit</item> <item>QModbusDevice</item> <item>QModbusDeviceIdentification</item> <item>QModbusExceptionResponse</item> <item>QModbusPdu</item> <item>QModbusReply</item> <item>QModbusRequest</item> <item>QModbusResponse</item> <item>QModbusRtuSerialMaster</item> <item>QModbusRtuSerialSlave</item> <item>QModbusServer</item> <item>QModbusTcpClient</item> <item>QModbusTcpConnectionObserver</item> <item>QModbusTcpServer</item> <item>QModelIndex</item> <item>QMorphingAnimation</item> <item>QMorphPhongMaterial</item> <item>QMorphTarget</item> <item>QMouseDevice</item> <item>QMouseEvent</item> <item>QMouseEvent</item> <item>QMouseEventTransition</item> <item>QMouseHandler</item> <item>QMoveEvent</item> <item>QMovie</item> <item>QMultiHash</item> <item>QMultiMap</item> <item>QMultiSampleAntiAliasing</item> <item>QMutableHashIterator</item> <item>QMutableLinkedListIterator</item> <item>QMutableListIterator</item> <item>QMutableMapIterator</item> <item>QMutableSetIterator</item> <item>QMutableVectorIterator</item> <item>QMutex</item> <item>QMutexLocker</item> <item>QNativeGestureEvent</item> <item>QNdefFilter</item> <item>QNdefMessage</item> <item>QNdefNfcSmartPosterRecord</item> <item>QNdefNfcTextRecord</item> <item>QNdefNfcUriRecord</item> <item>QNdefRecord</item> <item>QNearFieldManager</item> <item>QNearFieldShareManager</item> <item>QNearFieldShareTarget</item> <item>QNearFieldTarget</item> <item>QNetworkAccessManager</item> <item>QNetworkAddressEntry</item> <item>QNetworkCacheMetaData</item> <item>QNetworkConfiguration</item> <item>QNetworkConfigurationManager</item> <item>QNetworkCookie</item> <item>QNetworkCookieJar</item> <item>QNetworkDatagram</item> <item>QNetworkDiskCache</item> <item>QNetworkInterface</item> <item>QNetworkProxy</item> <item>QNetworkProxyFactory</item> <item>QNetworkProxyQuery</item> <item>QNetworkReply</item> <item>QNetworkRequest</item> <item>QNetworkSession</item> <item>QNmeaPositionInfoSource</item> <item>QNode</item> <item>QNodeCommand</item> <item>QNodeCreatedChange</item> <item>QNodeCreatedChangeBase</item> <item>QNodeDestroyedChange</item> <item>QNodeId</item> <item>QNoDepthMask</item> <item>QNoDraw</item> <item>QNoPicking</item> <item>QNormalDiffuseMapAlphaMaterial</item> <item>QNormalDiffuseMapMaterial</item> <item>QNormalDiffuseSpecularMapMaterial</item> <item>QOAuth1</item> <item>QOAuth1Signature</item> <item>QOAuth2AuthorizationCodeFlow</item> <item>QObject</item> <item>QObjectCleanupHandler</item> <item>QObjectPicker</item> <item>QOcspResponse</item> <item>QOffscreenSurface</item> <item>QOpenGLBuffer</item> <item>QOpenGLContext</item> <item>QOpenGLContextGroup</item> <item>QOpenGLDebugLogger</item> <item>QOpenGLDebugMessage</item> <item>QOpenGLExtraFunctions</item> <item>QOpenGLFramebufferObject</item> <item>QOpenGLFramebufferObjectFormat</item> <item>QOpenGLFunctions</item> <item>QOpenGLFunctions_1_0</item> <item>QOpenGLFunctions_1_1</item> <item>QOpenGLFunctions_1_2</item> <item>QOpenGLFunctions_1_3</item> <item>QOpenGLFunctions_1_4</item> <item>QOpenGLFunctions_1_5</item> <item>QOpenGLFunctions_2_0</item> <item>QOpenGLFunctions_2_1</item> <item>QOpenGLFunctions_3_0</item> <item>QOpenGLFunctions_3_1</item> <item>QOpenGLFunctions_3_2_Compatibility</item> <item>QOpenGLFunctions_3_2_Core</item> <item>QOpenGLFunctions_3_3_Compatibility</item> <item>QOpenGLFunctions_3_3_Core</item> <item>QOpenGLFunctions_4_0_Compatibility</item> <item>QOpenGLFunctions_4_0_Core</item> <item>QOpenGLFunctions_4_1_Compatibility</item> <item>QOpenGLFunctions_4_1_Core</item> <item>QOpenGLFunctions_4_2_Compatibility</item> <item>QOpenGLFunctions_4_2_Core</item> <item>QOpenGLFunctions_4_3_Compatibility</item> <item>QOpenGLFunctions_4_3_Core</item> <item>QOpenGLFunctions_4_4_Compatibility</item> <item>QOpenGLFunctions_4_4_Core</item> <item>QOpenGLFunctions_4_5_Compatibility</item> <item>QOpenGLFunctions_4_5_Core</item> <item>QOpenGLFunctions_ES2</item> <item>QOpenGLPaintDevice</item> <item>QOpenGLPixelTransferOptions</item> <item>QOpenGLShader</item> <item>QOpenGLShaderProgram</item> <item>QOpenGLTexture</item> <item>QOpenGLTextureBlitter</item> <item>QOpenGLTimeMonitor</item> <item>QOpenGLTimerQuery</item> <item>QOpenGLVersionProfile</item> <item>QOpenGLVertexArrayObject</item> <item>QOpenGLWidget</item> <item>QOpenGLWindow</item> <item>QOperatingSystemVersion</item> <item>QOrbitCameraController</item> <item>QOrientationFilter</item> <item>QOrientationReading</item> <item>QOrientationSensor</item> <item>qoutputrange</item> <item>QPagedPaintDevice</item> <item>QPageLayout</item> <item>QPageSetupDialog</item> <item>QPageSize</item> <item>QPaintDevice</item> <item>QPaintDeviceWindow</item> <item>QPaintedTextureImage</item> <item>QPaintEngine</item> <item>QPaintEngineState</item> <item>QPainter</item> <item>QPainterPath</item> <item>QPainterPathStroker</item> <item>QPaintEvent</item> <item>QPair</item> <item>QPalette</item> <item>QPanGesture</item> <item>QParallelAnimationGroup</item> <item>QParameter</item> <item>QPauseAnimation</item> <item>QPdfDestination</item> <item>QPdfDocument</item> <item>QPdfDocumentRenderOptions</item> <item>QPdfPageNavigation</item> <item>QPdfPageRenderer</item> <item>QPdfSelection</item> <item>QPdfWriter</item> <item>QPen</item> <item>QPercentBarSeries</item> <item>QPersistentModelIndex</item> <item>QPerVertexColorMaterial</item> <item>QPhongAlphaMaterial</item> <item>QPhongMaterial</item> <item>QPhysicalDeviceCreatedChangeBase</item> <item>QPickEvent</item> <item>QPickingSettings</item> <item>QPickLineEvent</item> <item>QPickPointEvent</item> <item>QPickTriangleEvent</item> <item>QPicture</item> <item>QPictureFormatPlugin</item> <item>QPictureIO</item> <item>QPieLegendMarker</item> <item>QPieSeries</item> <item>QPieSlice</item> <item>QPinchGesture</item> <item>QPixelFormat</item> <item>QPixmap</item> <item>QPixmapCache</item> <item>QPlace</item> <item>QPlaceAttribute</item> <item>QPlaceCategory</item> <item>QPlaceContactDetail</item> <item>QPlaceContent</item> <item>QPlaceContentReply</item> <item>QPlaceContentRequest</item> <item>QPlaceDetailsReply</item> <item>QPlaceEditorial</item> <item>QPlaceIcon</item> <item>QPlaceIdReply</item> <item>QPlaceImage</item> <item>QPlaceManager</item> <item>QPlaceManagerEngine</item> <item>QPlaceMatchReply</item> <item>QPlaceMatchRequest</item> <item>QPlaceProposedSearchResult</item> <item>QPlaceRatings</item> <item>QPlaceReply</item> <item>QPlaceResult</item> <item>QPlaceReview</item> <item>QPlaceSearchReply</item> <item>QPlaceSearchRequest</item> <item>QPlaceSearchResult</item> <item>QPlaceSearchSuggestionReply</item> <item>QPlaceSupplier</item> <item>QPlaceUser</item> <item>QPlainTextDocumentLayout</item> <item>QPlainTextEdit</item> <item>QPlaneGeometry</item> <item>QPlaneMesh</item> <item>QPlatformSurfaceEvent</item> <item>QPluginLoader</item> <item>QPoint</item> <item>QPointer</item> <item>QPointF</item> <item>QPointingDeviceUniqueId</item> <item>QPointLight</item> <item>QPointSize</item> <item>QPolarChart</item> <item>QPolygon</item> <item>QPolygonF</item> <item>QPolygonOffset</item> <item>QPressureFilter</item> <item>QPressureReading</item> <item>QPressureSensor</item> <item>QPrintDialog</item> <item>QPrintEngine</item> <item>QPrinter</item> <item>QPrinterInfo</item> <item>QPrintPreviewDialog</item> <item>QPrintPreviewWidget</item> <item>QProcess</item> <item>QProcessEnvironment</item> <item>QProgressBar</item> <item>QProgressDialog</item> <item>QPropertyAnimation</item> <item>QPropertyNodeAddedChange</item> <item>QPropertyNodeRemovedChange</item> <item>QPropertyUpdatedChange</item> <item>QPropertyUpdatedChangeBase</item> <item>QPropertyValueAddedChange</item> <item>QPropertyValueAddedChangeBase</item> <item>QPropertyValueRemovedChange</item> <item>QPropertyValueRemovedChangeBase</item> <item>QProximityFilter</item> <item>QProximityFilter</item> <item>QProximityReading</item> <item>QProximitySensor</item> <item>QProxyStyle</item> <item>QPushButton</item> <item>QQmlAbstractUrlInterceptor</item> <item>QQmlApplicationEngine</item> <item>QQmlAspectEngine</item> <item>QQmlComponent</item> <item>QQmlContext</item> <item>QQmlEngine</item> <item>QQmlEngineExtensionPlugin</item> <item>QQmlError</item> <item>QQmlExpression</item> <item>QQmlFileSelector</item> <item>QQmlImageProviderBase</item> <item>QQmlIncubationController</item> <item>QQmlIncubator</item> <item>QQmlListProperty</item> <item>QQmlListReference</item> <item>QQmlNdefRecord</item> <item>QQmlNetworkAccessManagerFactory</item> <item>QQmlParserStatus</item> <item>QQmlProperty</item> <item>QQmlPropertyMap</item> <item>QQmlPropertyValueSource</item> <item>QQmlScriptString</item> <item>QQuaternion</item> <item>QQueue</item> <item>QQuick3D</item> <item>QQuick3DGeometry</item> <item>QQuick3DObject</item> <item>QQuickAsyncImageProvider</item> <item>QQuickFramebufferObject</item> <item>QQuickImageProvider</item> <item>QQuickImageResponse</item> <item>QQuickItem</item> <item>QQuickItemGrabResult</item> <item>QQuickPaintedItem</item> <item>QQuickRenderControl</item> <item>QQuickStyle</item> <item>QQuickTextDocument</item> <item>QQuickTextureFactory</item> <item>QQuickView</item> <item>QQuickWebEngineProfile</item> <item>QQuickWebEngineScript</item> <item>QQuickWidget</item> <item>QQuickWindow</item> <item>QRadialGradient</item> <item>QRadioButton</item> <item>QRadioData</item> <item>QRadioDataControl</item> <item>QRadioTuner</item> <item>QRadioTunerControl</item> <item>QRandomGenerator</item> <item>QRandomGenerator64</item> <item>QRasterMode</item> <item>QRasterPaintEngine</item> <item>QRasterWindow</item> <item>QRawFont</item> <item>QRayCaster</item> <item>QRayCasterHit</item> <item>QReadLocker</item> <item>QReadWriteLock</item> <item>QRect</item> <item>QRectF</item> <item>QRecursiveMutex</item> <item>QRegExp</item> <item>QRegExpValidator</item> <item>QRegion</item> <item>QRegularExpression</item> <item>QRegularExpressionMatch</item> <item>QRegularExpressionMatchIterator</item> <item>QRegularExpressionValidator</item> <item>QRemoteObjectAbstractPersistedStore</item> <item>QRemoteObjectDynamicReplica</item> <item>QRemoteObjectHost</item> <item>QRemoteObjectHostBase</item> <item>QRemoteObjectNode</item> <item>QRemoteObjectPendingCall</item> <item>QRemoteObjectPendingCallWatcher</item> <item>QRemoteObjectPendingReply</item> <item>QRemoteObjectRegistry</item> <item>QRemoteObjectRegistryHost</item> <item>QRemoteObjectReplica</item> <item>QRenderAspect</item> <item>QRenderCapabilities</item> <item>QRenderCapture</item> <item>QRenderCaptureReply</item> <item>QRenderPass</item> <item>QRenderPassFilter</item> <item>QRenderSettings</item> <item>QRenderState</item> <item>QRenderStateSet</item> <item>QRenderSurfaceSelector</item> <item>QRenderTarget</item> <item>QRenderTargetOutput</item> <item>QRenderTargetSelector</item> <item>QResizeEvent</item> <item>QResource</item> <item>QRgba64</item> <item>QRomanCalendar</item> <item>QRotationFilter</item> <item>QRotationReading</item> <item>QRotationSensor</item> <item>QRubberBand</item> <item>QRunnable</item> <item>QSaveFile</item> <item>QScatter3DSeries</item> <item>QScatterDataItem</item> <item>QScatterDataProxy</item> <item>QScatterSeries</item> <item>QScene2D</item> <item>QSceneChange</item> <item>QSceneLoader</item> <item>QScissorTest</item> <item>QScopedArrayPointer</item> <item>QScopedPointer</item> <item>QScopedValueRollback</item> <item>QScopeGuard</item> <item>QScreen</item> <item>QScreenRayCaster</item> <item>QScriptable</item> <item>QScriptClass</item> <item>QScriptClassPropertyIterator</item> <item>QScriptContext</item> <item>QScriptContextInfo</item> <item>QScriptEngine</item> <item>QScriptEngineAgent</item> <item>QScriptEngineDebugger</item> <item>QScriptExtensionPlugin</item> <item>QScriptProgram</item> <item>QScriptString</item> <item>QScriptSyntaxCheckResult</item> <item>QScriptValue</item> <item>QScriptValueIterator</item> <item>QScrollArea</item> <item>QScrollBar</item> <item>QScroller</item> <item>QScrollerProperties</item> <item>QScrollEvent</item> <item>QScrollPrepareEvent</item> <item>QSctpServer</item> <item>QSctpSocket</item> <item>QScxmlCompiler</item> <item>QScxmlCppDataModel</item> <item>QScxmlDataModel</item> <item>QScxmlDynamicScxmlServiceFactory</item> <item>QScxmlEcmaScriptDataModel</item> <item>QScxmlError</item> <item>QScxmlEvent</item> <item>QScxmlInvokableService</item> <item>QScxmlInvokableServiceFactory</item> <item>QScxmlNullDataModel</item> <item>QScxmlStateMachine</item> <item>QScxmlStaticScxmlServiceFactory</item> <item>QScxmlTableData</item> <item>QSeamlessCubemap</item> <item>QSemaphore</item> <item>QSemaphoreReleaser</item> <item>QSensor</item> <item>QSensorBackend</item> <item>QSensorBackendFactory</item> <item>QSensorChangesInterface</item> <item>QSensorFilter</item> <item>QSensorGesture</item> <item>QSensorGestureManager</item> <item>QSensorGesturePluginInterface</item> <item>QSensorGestureRecognizer</item> <item>QSensorManager</item> <item>QSensorPluginInterface</item> <item>QSensorReading</item> <item>QSequentialAnimationGroup</item> <item>QSequentialIterable</item> <item>QSerialPort</item> <item>QSerialPortInfo</item> <item>QSessionManager</item> <item>QSet</item> <item>QSetFence</item> <item>QSetIterator</item> <item>QSettings</item> <item>QSGAbstractRenderer</item> <item>QSGBasicGeometryNode</item> <item>QSGClipNode</item> <item>QSGDynamicTexture</item> <item>QSGEngine</item> <item>QSGFlatColorMaterial</item> <item>QSGGeometry</item> <item>QSGGeometryNode</item> <item>QSGImageNode</item> <item>QSGMaterial</item> <item>QSGMaterialRhiShader</item> <item>QSGMaterialShader</item> <item>QSGMaterialType</item> <item>QSGNode</item> <item>QSGOpacityNode</item> <item>QSGOpaqueTextureMaterial</item> <item>QSGRectangleNode</item> <item>QSGRendererInterface</item> <item>QSGRenderNode</item> <item>QSGSimpleMaterial</item> <item>QSGSimpleMaterialShader</item> <item>QSGSimpleRectNode</item> <item>QSGSimpleTextureNode</item> <item>QSGTexture</item> <item>QSGTextureMaterial</item> <item>QSGTextureProvider</item> <item>QSGTransformNode</item> <item>QSGVertexColorMaterial</item> <item>QShaderData</item> <item>QShaderImage</item> <item>QShaderProgram</item> <item>QShaderProgramBuilder</item> <item>QSharedData</item> <item>QSharedDataPointer</item> <item>QSharedGLTexture</item> <item>QSharedMemory</item> <item>QSharedPointer</item> <item>QShortcut</item> <item>QShortcutEvent</item> <item>QShowEvent</item> <item>QSignalBlocker</item> <item>QSignalMapper</item> <item>QSignalSpy</item> <item>QSignalTransition</item> <item>QSimpleXmlNodeModel</item> <item>QSize</item> <item>QSizeF</item> <item>QSizeGrip</item> <item>QSizePolicy</item> <item>QSkeleton</item> <item>QSkeletonLoader</item> <item>QSkyboxEntity</item> <item>QSlider</item> <item>QSocketNotifier</item> <item>QSortFilterProxyModel</item> <item>QSortPolicy</item> <item>QSound</item> <item>QSoundEffect</item> <item>QSourceLocation</item> <item>QSpacerItem</item> <item>QSphereGeometry</item> <item>QSphereMesh</item> <item>QSpinBox</item> <item>QSplashScreen</item> <item>QSplineSeries</item> <item>QSplitter</item> <item>QSplitterHandle</item> <item>QSpotLight</item> <item>QSqlDatabase</item> <item>QSqlDriver</item> <item>QSqlDriverCreator</item> <item>QSqlDriverCreatorBase</item> <item>QSqlDriverPlugin</item> <item>QSqlError</item> <item>QSqlField</item> <item>QSqlIndex</item> <item>QSqlQuery</item> <item>QSqlQueryModel</item> <item>QSqlRecord</item> <item>QSqlRelation</item> <item>QSqlRelationalDelegate</item> <item>QSqlRelationalTableModel</item> <item>QSqlResult</item> <item>QSqlTableModel</item> <item>QSslCertificate</item> <item>QSslCertificateExtension</item> <item>QSslCipher</item> <item>QSslConfiguration</item> <item>QSslDiffieHellmanParameters</item> <item>QSslEllipticCurve</item> <item>QSslError</item> <item>QSslKey</item> <item>QSslPreSharedKeyAuthenticator</item> <item>QSslSocket</item> <item>QStack</item> <item>QStackedBarSeries</item> <item>QStackedLayout</item> <item>QStackedWidget</item> <item>QStandardItem</item> <item>QStandardItemEditorCreator</item> <item>QStandardItemModel</item> <item>QStandardPaths</item> <item>QState</item> <item>QStateMachine</item> <item>QStaticByteArrayMatcher</item> <item>QStaticPlugin</item> <item>QStaticPropertyUpdatedChangeBase</item> <item>QStaticPropertyValueAddedChangeBase</item> <item>QStaticPropertyValueRemovedChangeBase</item> <item>QStaticText</item> <item>QStatusBar</item> <item>QStatusTipEvent</item> <item>QStencilMask</item> <item>QStencilOperation</item> <item>QStencilOperationArguments</item> <item>QStencilTest</item> <item>QStencilTestArguments</item> <item>QStorageInfo</item> <item>QString</item> <item>QStringList</item> <item>QStringListModel</item> <item>QStringMatcher</item> <item>QStringRef</item> <item>QStringView</item> <item>QStyle</item> <item>QStyledItemDelegate</item> <item>QStyleFactory</item> <item>QStyleHintReturn</item> <item>QStyleHintReturnMask</item> <item>QStyleHintReturnVariant</item> <item>QStyleHints</item> <item>QStyleOption</item> <item>QStyleOptionButton</item> <item>QStyleOptionComboBox</item> <item>QStyleOptionComplex</item> <item>QStyleOptionDockWidget</item> <item>QStyleOptionFocusRect</item> <item>QStyleOptionFrame</item> <item>QStyleOptionGraphicsItem</item> <item>QStyleOptionGroupBox</item> <item>QStyleOptionHeader</item> <item>QStyleOptionMenuItem</item> <item>QStyleOptionProgressBar</item> <item>QStyleOptionRubberBand</item> <item>QStyleOptionSizeGrip</item> <item>QStyleOptionSlider</item> <item>QStyleOptionSpinBox</item> <item>QStyleOptionTab</item> <item>QStyleOptionTabBarBase</item> <item>QStyleOptionTabWidgetFrame</item> <item>QStyleOptionTitleBar</item> <item>QStyleOptionToolBar</item> <item>QStyleOptionToolBox</item> <item>QStyleOptionToolButton</item> <item>QStyleOptionViewItem</item> <item>QStylePainter</item> <item>QStylePlugin</item> <item>QSubtreeEnabler</item> <item>QSupportedWritingSystems</item> <item>QSurface</item> <item>QSurface3DSeries</item> <item>QSurfaceDataItem</item> <item>QSurfaceDataProxy</item> <item>QSurfaceFormat</item> <item>QSvgGenerator</item> <item>QSvgRenderer</item> <item>QSvgWidget</item> <item>QSwipeGesture</item> <item>QSyntaxHighlighter</item> <item>QSysInfo</item> <item>QSystemSemaphore</item> <item>QSystemTrayIcon</item> <item>QTabBar</item> <item>QTabletEvent</item> <item>QTableView</item> <item>QTableWidget</item> <item>QTableWidgetItem</item> <item>QTableWidgetSelectionRange</item> <item>QTabWidget</item> <item>QTapAndHoldGesture</item> <item>QTapFilter</item> <item>QTapGesture</item> <item>QTapReading</item> <item>QTapSensor</item> <item>QTcpServer</item> <item>QTcpSocket</item> <item>QTechnique</item> <item>QTechniqueFilter</item> <item>QTemporaryDir</item> <item>QTemporaryFile</item> <item>QTestEventList</item> <item>QText2DEntity</item> <item>QTextBlock</item> <item>QTextBlockFormat</item> <item>QTextBlockGroup</item> <item>QTextBlockUserData</item> <item>QTextBoundaryFinder</item> <item>QTextBrowser</item> <item>QTextCharFormat</item> <item>QTextCodec</item> <item>QTextCursor</item> <item>QTextDecoder</item> <item>QTextDocument</item> <item>QTextDocumentFragment</item> <item>QTextDocumentWriter</item> <item>QTextEdit</item> <item>QTextEncoder</item> <item>QTextFormat</item> <item>QTextFragment</item> <item>QTextFrame</item> <item>QTextFrameFormat</item> <item>QTextImageFormat</item> <item>QTextInlineObject</item> <item>QTextItem</item> <item>QTextLayout</item> <item>QTextLength</item> <item>QTextLine</item> <item>QTextList</item> <item>QTextListFormat</item> <item>QTextObject</item> <item>QTextObjectInterface</item> <item>QTextOption</item> <item>QTextStream</item> <item>QTextTable</item> <item>QTextTableCell</item> <item>QTextTableCellFormat</item> <item>QTextTableFormat</item> <item>QTextToSpeech</item> <item>QTextToSpeechEngine</item> <item>QTextToSpeechPlugin</item> <item>QTexture1D</item> <item>QTexture1DArray</item> <item>QTexture2D</item> <item>QTexture2DArray</item> <item>QTexture2DMultisample</item> <item>QTexture2DMultisampleArray</item> <item>QTexture3D</item> <item>QTextureBuffer</item> <item>QTextureCubeMap</item> <item>QTextureCubeMapArray</item> <item>QTextureData</item> <item>QTextureDataUpdate</item> <item>QTexturedMetalRoughMaterial</item> <item>QTextureGenerator</item> <item>QTextureImage</item> <item>QTextureImageData</item> <item>QTextureImageDataGenerator</item> <item>QTextureLoader</item> <item>QTextureMaterial</item> <item>QTextureRectangle</item> <item>QTextureWrapMode</item> <item>QThread</item> <item>QThreadPool</item> <item>QThreadStorage</item> <item>QTileRules</item> <item>QTiltFilter</item> <item>QTiltReading</item> <item>QTiltSensor</item> <item>QTime</item> <item>QTimeEdit</item> <item>QTimeLine</item> <item>QTimer</item> <item>QTimerEvent</item> <item>QTimeZone</item> <item>QToolBar</item> <item>QToolBox</item> <item>QToolButton</item> <item>QToolTip</item> <item>QTorusGeometry</item> <item>QTorusMesh</item> <item>QTouch3DInputHandler</item> <item>QTouchDevice</item> <item>QTouchEvent</item> <item>QTouchEventSequence</item> <item>QTransform</item> <item>QTransform</item> <item>QTranslator</item> <item>QTransposeProxyModel</item> <item>QTreeView</item> <item>QTreeWidget</item> <item>QTreeWidgetItem</item> <item>QTreeWidgetItemIterator</item> <item>QtROClientFactory</item> <item>QtROServerFactory</item> <item>QUdpSocket</item> <item>QUiLoader</item> <item>QUndoCommand</item> <item>QUndoGroup</item> <item>QUndoStack</item> <item>QUndoView</item> <item>QUnhandledException</item> <item>QUrl</item> <item>QUrlQuery</item> <item>QUuid</item> <item>QValidator</item> <item>QValue3DAxis</item> <item>QValue3DAxisFormatter</item> <item>QValueAxis</item> <item>QVariant</item> <item>QVariantAnimation</item> <item>QVariantHash</item> <item>QVariantList</item> <item>QVariantMap</item> <item>QVarLengthArray</item> <item>QVBarModelMapper</item> <item>QVBoxLayout</item> <item>QVBoxPlotModelMapper</item> <item>QVCandlestickModelMapper</item> <item>QVector</item> <item>QVector2D</item> <item>QVector3D</item> <item>QVector4D</item> <item>QVectorIterator</item> <item>QVersionNumber</item> <item>QVertexBlendAnimation</item> <item>QVideoDeviceSelectorControl</item> <item>QVideoEncoderSettings</item> <item>QVideoEncoderSettingsControl</item> <item>QVideoFilterRunnable</item> <item>QVideoFrame</item> <item>QVideoProbe</item> <item>QVideoRendererControl</item> <item>QVideoSurfaceFormat</item> <item>QVideoWidget</item> <item>QVideoWidgetControl</item> <item>QVideoWindowControl</item> <item>QViewport</item> <item>QVirtualKeyboardAbstractInputMethod</item> <item>QVirtualKeyboardExtensionPlugin</item> <item>QVirtualKeyboardInputContext</item> <item>QVirtualKeyboardInputEngine</item> <item>QVirtualKeyboardSelectionListModel</item> <item>QVirtualKeyboardTrace</item> <item>QVoice</item> <item>QVPieModelMapper</item> <item>QVulkanDeviceFunctions</item> <item>QVulkanExtension</item> <item>QVulkanFunctions</item> <item>QVulkanInfoVector</item> <item>QVulkanInstance</item> <item>QVulkanLayer</item> <item>QVulkanWindow</item> <item>QVulkanWindowRenderer</item> <item>QVXYModelMapper</item> <item>QWaitCondition</item> <item>QWaitFence</item> <item>QWaylandBufferRef</item> <item>QWaylandClient</item> <item>QWaylandCompositor</item> <item>QWaylandIdleInhibitManagerV1</item> <item>QWaylandIviApplication</item> <item>QWaylandIviSurface</item> <item>QWaylandKeyboard</item> <item>QWaylandOutput</item> <item>QWaylandOutputMode</item> <item>QWaylandPointer</item> <item>QWaylandQuickItem</item> <item>QWaylandQuickShellIntegration</item> <item>QWaylandQuickShellSurfaceItem</item> <item>QWaylandSeat</item> <item>QWaylandShellSurface</item> <item>QWaylandSurface</item> <item>QWaylandSurfaceGrabber</item> <item>QWaylandTouch</item> <item>QWaylandView</item> <item>QWaylandViewporter</item> <item>QWaylandWlScaler</item> <item>QWaylandWlShell</item> <item>QWaylandWlShellSurface</item> <item>QWaylandXdgDecorationManagerV1</item> <item>QWaylandXdgOutputManagerV1</item> <item>QWaylandXdgPopup</item> <item>QWaylandXdgPopupV5</item> <item>QWaylandXdgPopupV6</item> <item>QWaylandXdgShell</item> <item>QWaylandXdgShellV5</item> <item>QWaylandXdgShellV6</item> <item>QWaylandXdgSurface</item> <item>QWaylandXdgSurfaceV5</item> <item>QWaylandXdgSurfaceV6</item> <item>QWaylandXdgToplevel</item> <item>QWaylandXdgToplevelV6</item> <item>QWeakPointer</item> <item>QWebChannel</item> <item>QWebChannelAbstractTransport</item> <item>QWebEngineClientCertificateStore</item> <item>QWebEngineCookieStore</item> <item>QWebEngineFindTextResult</item> <item>QWebEngineHttpRequest</item> <item>QWebEngineNotification</item> <item>QWebEnginePage</item> <item>QWebEngineProfile</item> <item>QWebEngineQuotaRequest</item> <item>QWebEngineRegisterProtocolHandlerRequest</item> <item>QWebEngineScript</item> <item>QWebEngineScriptCollection</item> <item>QWebEngineSettings</item> <item>QWebEngineUrlRequestInfo</item> <item>QWebEngineUrlRequestInterceptor</item> <item>QWebEngineUrlRequestJob</item> <item>QWebEngineUrlScheme</item> <item>QWebEngineUrlSchemeHandler</item> <item>QWebEngineView</item> <item>QWebSocket</item> <item>QWebSocketCorsAuthenticator</item> <item>QWebSocketServer</item> <item>QWGLNativeContext</item> <item>QWhatsThis</item> <item>QWhatsThisClickedEvent</item> <item>QWheelEvent</item> <item>QWheelEvent</item> <item>QWidget</item> <item>QWidgetAction</item> <item>QWidgetItem</item> <item>QWindow</item> <item>QWindowStateChangeEvent</item> <item>QWindowsWindowFunctions</item> <item>QWinEventNotifier</item> <item>QWinJumpList</item> <item>QWinJumpListCategory</item> <item>QWinJumpListItem</item> <item>QWinMime</item> <item>QWinTaskbarButton</item> <item>QWinTaskbarProgress</item> <item>QWinThumbnailToolBar</item> <item>QWinThumbnailToolButton</item> <item>QWizard</item> <item>QWizardPage</item> <item>QWriteLocker</item> <item>QX11Info</item> <item>QXcbWindowFunctions</item> <item>QXmlAttributes</item> <item>QXmlContentHandler</item> <item>QXmlDeclHandler</item> <item>QXmlDefaultHandler</item> <item>QXmlDTDHandler</item> <item>QXmlEntityResolver</item> <item>QXmlErrorHandler</item> <item>QXmlFormatter</item> <item>QXmlInputSource</item> <item>QXmlItem</item> <item>QXmlLexicalHandler</item> <item>QXmlLocator</item> <item>QXmlName</item> <item>QXmlNamePool</item> <item>QXmlNamespaceSupport</item> <item>QXmlNodeModelIndex</item> <item>QXmlParseException</item> <item>QXmlQuery</item> <item>QXmlReader</item> <item>QXmlResultItems</item> <item>QXmlSchema</item> <item>QXmlSchemaValidator</item> <item>QXmlSerializer</item> <item>QXmlSimpleReader</item> <item>QXmlStreamAttribute</item> <item>QXmlStreamAttributes</item> <item>QXmlStreamEntityDeclaration</item> <item>QXmlStreamEntityResolver</item> <item>QXmlStreamNamespaceDeclaration</item> <item>QXmlStreamNotationDeclaration</item> <item>QXmlStreamReader</item> <item>QXmlStreamWriter</item> <item>QXYLegendMarker</item> <item>QXYSeries</item> <!-- Not actually classes, but used like those --> <item>QByteArrayLiteral</item> <item>QStringLiteral</item> <!-- Not actually classes, but namespaces --> <item>Qt</item> <item>QTest</item> <item>QtConcurrent</item> <item>Phonon</item> <!-- Some public types, but not listed in main class list --> <item>QFileInfoList</item> <item>QMutableStringListIterator</item> <item>QTouchEventSequence</item> <!-- QTest --> <item>QStringListIterator</item> <item>QStringBuilder</item> <!-- Helper classes for C++11-only code, where qOverload (requires C++14) can't be used path_to_url#qOverload --> <item>QOverload</item> <item>QConstOverload</item> <item>QNonConstOverload</item> </list> <contexts> <!-- Base context for C++ and Qt highlighting to be used as standalone syntax --> <context attribute="Normal Text" lineEndContext="#stay" name="Normal"> <IncludeRules context="DetectQtExtensions" /> <IncludeRules context="##ISO C++" /> </context> <!-- This context can be used from other (alternative) C++ syntax files To use it just <IncludeRules context="DetectQtExtensions##Qt/C++" /> --> <context attribute="Normal Text" lineEndContext="#stay" name="DetectQtExtensions"> <keyword attribute="Qt Types" context="#stay" String="QtTypes" /> <keyword attribute="Qt Classes" context="Qt5ClassMember" String="QtClasses" /> <keyword attribute="Qt Functions" context="#stay" String="QtFunc" /> <keyword attribute="Qt Macros" context="#stay" String="QtMacros" /> </context> <context attribute="Qt Classes" lineEndContext="#pop" name="Qt5ClassMember"> <IncludeRules context="DetectNSEnd" /> </context> <context lineEndContext="#pop" name="DetectNSEnd" attribute="Normal Text"> <DetectIdentifier context="#stay" /> <AnyChar context="#pop" String="&ns_punctuators;" lookAhead="true" /> </context> </contexts> <itemDatas> <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" /> <itemData name="Qt Macros" defStyleNum="dsExtension" spellChecking="false" bold="1" italic="0" /> <itemData name="Qt Types" defStyleNum="dsExtension" spellChecking="false" /> <itemData name="Qt Classes" defStyleNum="dsExtension" spellChecking="false" /> <itemData name="Qt Functions" defStyleNum="dsFunction" spellChecking="false" /> </itemDatas> </highlighting> <general> <comments> <comment name="singleLine" start="//" /> <comment name="multiLine" start="/*" end="*/" /> </comments> <keywords casesensitive="1" /> </general> </language> <!-- kate: indent-width 2; tab-width 2; --> ```
/content/code_sandbox/syntax/cpp.xml
xml
2016-08-19T16:25:54
2024-08-11T08:59:44
matterhorn
matterhorn-chat/matterhorn
1,027
26,198
```xml import { makeStyles, mergeClasses } from '@griffel/react'; import { useDividerStyles_unstable, type DividerSlots } from '@fluentui/react-divider'; import type { SlotClassNames } from '@fluentui/react-utilities'; import type { NavDividerState } from './NavDivider.types'; export const navDividerClassNames: SlotClassNames<DividerSlots> = { root: 'fui-NavDivider', wrapper: 'fui-NavDivider__wrapper', }; const useStyles = makeStyles({ root: { flexGrow: 0, marginTop: '4px', marginBottom: '4px', }, }); /** * Apply styling to the NavDivider slots based on the state */ export const useNavDividerStyles_unstable = (state: NavDividerState): NavDividerState => { 'use no memo'; const styles = useStyles(); state.root.className = mergeClasses(navDividerClassNames.root, styles.root, state.root.className); state.wrapper.className = mergeClasses(navDividerClassNames.wrapper, state.wrapper.className); useDividerStyles_unstable(state); return state; }; ```
/content/code_sandbox/packages/react-components/react-nav-preview/library/src/components/NavDivider/useNavDividerStyles.styles.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
233
```xml import * as React from 'react'; import graphql from 'graphql-tag'; export default class extends React.Component<{}, {}> { public render() { return <div />; } } export const pageQuery = graphql` query IndexQuery { site { siteMetadata { title } } } `; // export const pageQuery = graphql` // query IndexQuery { // site { // siteMetadata { // title // } // } // } // `; ```
/content/code_sandbox/packages/load/tests/loaders/schema/test-files/13.tsx
xml
2016-03-22T00:14:38
2024-08-16T02:02:06
graphql-tools
ardatan/graphql-tools
5,331
107
```xml import { packageName } from '../../util/pkg-name'; export const inspectCommand = { name: 'inspect', description: 'Show information about a deployment.', arguments: [ { name: 'url', required: true, }, ], options: [ { name: 'timeout', description: 'Time to wait for deployment completion [3m]', argument: 'TIME', shorthand: null, type: String, deprecated: false, }, { name: 'wait', description: 'Blocks until deployment completes', shorthand: null, type: Boolean, deprecated: false, }, { name: 'logs', shorthand: 'l', type: Boolean, deprecated: false, description: 'Prints the build logs instead of the deployment summary', }, ], examples: [ { name: 'Get information about a deployment by its unique URL', value: `${packageName} inspect my-deployment-ji2fjij2.vercel.app`, }, { name: 'Get information about the deployment an alias points to', value: `${packageName} inspect my-deployment.vercel.app`, }, { name: 'Get information about a deployment by piping in the URL', value: `echo my-deployment.vercel.app | ${packageName} inspect`, }, { name: 'Wait up to 90 seconds for deployment to complete', value: `${packageName} inspect my-deployment.vercel.app --wait --timeout 90s`, }, { name: 'Get deployment build logs', value: `${packageName} inspect my-deployment.vercel.app --logs`, }, ], } as const; ```
/content/code_sandbox/packages/cli/src/commands/inspect/command.ts
xml
2016-09-09T01:12:08
2024-08-16T17:39:45
vercel
vercel/vercel
12,545
366
```xml import './clean-conversation-headers.css'; import React from 'dom-chef'; import {$} from 'select-dom'; import elementReady from 'element-ready'; import ArrowLeftIcon from 'octicons-plain-react/ArrowLeft'; import * as pageDetect from 'github-url-detection'; import features from '../feature-manager.js'; import getDefaultBranch from '../github-helpers/get-default-branch.js'; import observe from '../helpers/selector-observer.js'; async function cleanIssueHeader(byline: HTMLElement): Promise<void> { byline.classList.add('rgh-clean-conversation-headers', 'rgh-clean-conversation-headers-hide-author'); // Shows on issues: octocat opened this issue on 1 Jan [1 comments] // Removes on issues: octocat opened this issue on 1 Jan [] 1 comments const commentCount = $('relative-time', byline)!.nextSibling!; commentCount.replaceWith(<span>{commentCount.textContent.replace('', '')}</span>); } async function cleanPrHeader(byline: HTMLElement): Promise<void> { byline.classList.add('rgh-clean-conversation-headers'); // Extra author name is only shown on `isPRConversation` // Hide if it's the same as the opener (always) or merger const shouldHideAuthor = pageDetect.isPRConversation() && $('.author', byline)!.textContent === (await elementReady('.TimelineItem .author'))!.textContent; if (shouldHideAuthor) { byline.classList.add('rgh-clean-conversation-headers-hide-author'); } const base = $('.commit-ref', byline)!; const baseBranchDropdown = $('.commit-ref-dropdown', byline); // Shows on PRs: main [] feature const arrowIcon = <ArrowLeftIcon className="v-align-middle mx-1"/>; if (baseBranchDropdown) { baseBranchDropdown.after(<span>{arrowIcon}</span>); // #5598 } else { base.nextElementSibling!.replaceChildren(arrowIcon); } const baseBranch = base.title.split(':')[1]; const wasDefaultBranch = pageDetect.isClosedPR() && baseBranch === 'master'; const isDefaultBranch = baseBranch === await getDefaultBranch(); if (!isDefaultBranch && !wasDefaultBranch) { base.classList.add('rgh-clean-conversation-headers-non-default-branch'); } } async function init(signal: AbortSignal): Promise<void> { const cleanConversationHeader = pageDetect.isIssue() ? cleanIssueHeader : cleanPrHeader; observe([ '.gh-header-meta > .flex-auto', // Real '.rgh-conversation-activity-filter', // Helper in case it runs first and breaks the `>` selector, because it wraps the .flex-auto element ], cleanConversationHeader, {signal}); } void features.add(import.meta.url, { include: [ pageDetect.isIssue, pageDetect.isPR, ], init, }); /* Test URLs - Open PR (default branch): path_to_url - Open PR (non-default branch): path_to_url - Merged PR (same author): path_to_url - Merged PR (different author): path_to_url - Merged PR (different author + first published tag): path_to_url - Closed PR: path_to_url */ ```
/content/code_sandbox/source/features/clean-conversation-headers.tsx
xml
2016-02-15T16:45:02
2024-08-16T18:39:26
refined-github
refined-github/refined-github
24,013
690
```xml import { FluentDesignSystem } from '../fluent-design-system.js'; import { ProgressBar } from './progress-bar.js'; import { styles } from './progress-bar.styles.js'; import { template } from './progress-bar.template.js'; /** * The Fluent ProgressBar Element. * * * @public * @remarks * HTML Element: \<fluent-progress-bar\> */ export const definition = ProgressBar.compose({ name: `${FluentDesignSystem.prefix}-progress-bar`, template, styles, }); ```
/content/code_sandbox/packages/web-components/src/progress-bar/progress-bar.definition.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
103
```xml import { DELETE_CONFIRMATION_TYPES, ICAL_ATTENDEE_STATUS, RECURRING_TYPES, } from '@proton/shared/lib/calendar/constants'; import { getHasNonCancelledSingleEdits, getMustResetPartstat, } from '@proton/shared/lib/calendar/mailIntegration/invite'; import type { CalendarEvent } from '@proton/shared/lib/interfaces/calendar'; import type { VcalVeventComponent } from '@proton/shared/lib/interfaces/calendar/VcalModel'; import type { CalendarEventRecurring } from '../../../interfaces/CalendarEvents'; import type { EventOldData } from '../../../interfaces/EventData'; import type { InviteActions } from '../../../interfaces/Invite'; import type { OnDeleteConfirmationCb } from '../interface'; import { getHasFutureOption, getRecurrenceEvents } from './recurringHelper'; interface Arguments { originalEditEventData: EventOldData; recurrences: CalendarEvent[]; recurrence: CalendarEventRecurring; inviteActions: InviteActions; veventComponent?: VcalVeventComponent; canOnlyDeleteAll: boolean; canOnlyDeleteThis: boolean; cannotDeleteThisAndFuture: boolean; isCalendarDisabled: boolean; isAttendee: boolean; onDeleteConfirmation: OnDeleteConfirmationCb; selfAttendeeToken?: string; } const getRecurringDeleteType = ({ originalEditEventData, recurrences, recurrence, canOnlyDeleteAll, canOnlyDeleteThis, cannotDeleteThisAndFuture, isCalendarDisabled, isAttendee, onDeleteConfirmation, inviteActions, selfAttendeeToken, }: Arguments) => { let deleteTypes; if (canOnlyDeleteAll || !originalEditEventData.veventComponent) { deleteTypes = [RECURRING_TYPES.ALL]; } else if (canOnlyDeleteThis) { deleteTypes = [RECURRING_TYPES.SINGLE]; } else if (getHasFutureOption(originalEditEventData.veventComponent, recurrence) && !cannotDeleteThisAndFuture) { deleteTypes = [RECURRING_TYPES.SINGLE, RECURRING_TYPES.FUTURE, RECURRING_TYPES.ALL]; } else { deleteTypes = [RECURRING_TYPES.SINGLE, RECURRING_TYPES.ALL]; } const singleEditRecurrences = getRecurrenceEvents(recurrences, originalEditEventData.eventData); const singleEditRecurrencesWithoutSelf = singleEditRecurrences.filter((event) => { return event.ID !== originalEditEventData.eventData.ID; }); const mustResetPartstat = getMustResetPartstat( singleEditRecurrencesWithoutSelf, selfAttendeeToken, ICAL_ATTENDEE_STATUS.DECLINED ); const updatedInviteActions = { ...inviteActions, resetSingleEditsPartstat: deleteTypes.length === 1 && deleteTypes[0] === RECURRING_TYPES.ALL && mustResetPartstat && !isCalendarDisabled, deleteSingleEdits: isCalendarDisabled, }; const hasNonCancelledSingleEdits = getHasNonCancelledSingleEdits(singleEditRecurrencesWithoutSelf); return onDeleteConfirmation({ type: DELETE_CONFIRMATION_TYPES.RECURRING, data: { types: deleteTypes, hasNonCancelledSingleEdits }, inviteActions: updatedInviteActions, isAttendee, }); }; export default getRecurringDeleteType; ```
/content/code_sandbox/applications/calendar/src/app/containers/calendar/eventActions/getRecurringDeleteType.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
711
```xml import { PageHeader } from '@@/PageHeader'; import { EnvironmentGroupsDatatable } from './EnvironmentGroupsDatatable'; export function ListView() { return ( <> <PageHeader title="Environment Groups" breadcrumbs="Environment group management" reload /> <EnvironmentGroupsDatatable /> </> ); } ```
/content/code_sandbox/app/react/portainer/environments/environment-groups/ListView/ListView.tsx
xml
2016-05-19T20:15:28
2024-08-16T19:15:14
portainer
portainer/portainer
30,083
72
```xml <?xml version="1.0" encoding="UTF-8" ?> <Mission xmlns="path_to_url" xmlns:xsi="path_to_url"> <About> <Summary>Find the goal!</Summary> </About> <ServerSection> <ServerInitialConditions> <Time> <StartTime>6000</StartTime> <AllowPassageOfTime>false</AllowPassageOfTime> </Time> <Weather>clear</Weather> <AllowSpawning>false</AllowSpawning> </ServerInitialConditions> <ServerHandlers> <FlatWorldGenerator generatorString="3;7,220*1,5*3,2;3;,biome_1" /> <ClassroomDecorator seed="__SEED__"> <specification> <width>7</width> <height>7</height> <length>7</length> <pathLength>0</pathLength> <divisions> <southNorth>0</southNorth> <eastWest>0</eastWest> <aboveBelow>0</aboveBelow> </divisions> <horizontalObstacles> <gap>0</gap> <bridge>0</bridge> <door>0</door> <puzzle>0</puzzle> <jump>0</jump> </horizontalObstacles> <verticalObstacles> <stairs>0</stairs> <ladder>0</ladder> <jump>0</jump> </verticalObstacles> <hintLikelihood>1</hintLikelihood> </specification> </ClassroomDecorator> <ServerQuitFromTimeUp timeLimitMs="30000" description="out_of_time"/> <ServerQuitWhenAnyAgentFinishes /> </ServerHandlers> </ServerSection> <AgentSection mode="Survival"> <Name>James Bond</Name> <AgentStart> <Placement x="-203.5" y="81.0" z="217.5"/> </AgentStart> <AgentHandlers> <VideoProducer want_depth="false"> <Width>320</Width> <Height>240</Height> </VideoProducer> <ObservationFromFullStats /> <ContinuousMovementCommands turnSpeedDegs="180"> <ModifierList type="deny-list"> <command>attack</command> </ModifierList> </ContinuousMovementCommands> <RewardForMissionEnd rewardForDeath="-10000"> <Reward description="found_goal" reward="1000" /> <Reward description="out_of_time" reward="-1000" /> </RewardForMissionEnd> <RewardForTouchingBlockType> <Block type="gold_ore diamond_ore redstone_ore" reward="20" /> </RewardForTouchingBlockType> <AgentQuitFromTouchingBlockType> <Block type="gold_block diamond_block redstone_block" description="found_goal" /> </AgentQuitFromTouchingBlockType> </AgentHandlers> </AgentSection> </Mission> ```
/content/code_sandbox/sample_missions/classroom/basic.xml
xml
2016-05-17T14:58:40
2024-08-13T12:38:11
malmo
microsoft/malmo
4,051
670
```xml import * as React from 'react'; import { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons'; import { Label } from '@fluentui/react-label'; import { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities'; import type { FieldProps, FieldState } from './Field.types'; const validationMessageIcons = { error: <ErrorCircle12Filled />, warning: <Warning12Filled />, success: <CheckmarkCircle12Filled />, none: undefined, } as const; /** * Create the state required to render Field. * * The returned state can be modified with hooks such as useFieldStyles_unstable, * before being passed to renderField_unstable. * * @param props - Props passed to this field * @param ref - Ref to the root */ export const useField_unstable = (props: FieldProps, ref: React.Ref<HTMLDivElement>): FieldState => { const { children, orientation = 'vertical', required = false, validationState = props.validationMessage ? 'error' : 'none', size = 'medium', } = props; const baseId = useId('field-'); const generatedControlId = baseId + '__control'; const root = slot.always(getIntrinsicElementProps('div', { ...props, ref }, /*excludedPropNames:*/ ['children']), { elementType: 'div', }); const label = slot.optional(props.label, { defaultProps: { htmlFor: generatedControlId, id: baseId + '__label', required, size }, elementType: Label, }); const validationMessage = slot.optional(props.validationMessage, { defaultProps: { id: baseId + '__validationMessage', role: validationState === 'error' ? 'alert' : undefined }, elementType: 'div', }); const hint = slot.optional(props.hint, { defaultProps: { id: baseId + '__hint' }, elementType: 'div' }); const defaultIcon = validationMessageIcons[validationState]; const validationMessageIcon = slot.optional(props.validationMessageIcon, { renderByDefault: !!defaultIcon, defaultProps: { children: defaultIcon }, elementType: 'span', }); return { children, generatedControlId, orientation, required, size, validationState, components: { root: 'div', label: Label, validationMessage: 'div', validationMessageIcon: 'span', hint: 'div' }, root, label, validationMessageIcon, validationMessage, hint, }; }; ```
/content/code_sandbox/packages/react-components/react-field/library/src/components/Field/useField.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
560
```xml import {UniformStore, ShaderUniformType} from '@luma.gl/core'; import { AnimationLoopTemplate, AnimationProps, Model, CubeGeometry, Timeline, KeyFrames, makeRandomGenerator } from '@luma.gl/engine'; import {dirlight} from '@luma.gl/shadertools'; import {Matrix4, radians} from '@math.gl/core'; // Ensure repeatable rendertests const random = makeRandomGenerator(); const INFO_HTML = `\ Key frame animation based on multiple hierarchical timelines. <button id="play">Play</button> <button id="pause">Pause</button><BR> Time: <input type="range" id="time" min="0" max="30000" step="1"><BR> `; // SHADERS type AppUniforms = { uColor: number[]; uModel: number[]; uView: number[]; uProjection: number[]; }; const app: {uniformTypes: Record<string, ShaderUniformType>} = { uniformTypes: { uColor: 'vec3<f32>', uModel: 'mat4x4<f32>', uView: 'mat4x4<f32>', uProjection: 'mat4x4<f32>' } }; const source = /* wgsl */ `\ struct Uniforms { uColor : vec3<f32>, uModel : mat4x4<f32>, uView : mat4x4<f32>, uProjection : mat4x4<f32>, }; @binding(0) @group(0) var<uniform> app : Uniforms; struct VertexInputs { // CUBE GEOMETRY @location(0) positions : vec4<f32>, @location(1) normals : vec3<f32> }; struct FragmentInputs { @builtin(position) Position : vec4<f32>, @location(0) color : vec3<f32>, @location(1) dirlightNormal: DirlightNormal, } @vertex fn vertexMain(inputs: VertexInputs) -> FragmentInputs { var outputs : FragmentInputs; // gl_Position = app.uProjection * app.uView * app.uModel * vec4(positions, 1.0); outputs.Position = app.uProjection * app.uView * app.uModel * inputs.positions; outputs.color = app.uColor; let normal: vec3<f32> = (app.uModel * vec4<f32>(inputs.normals, 0.0)).xyz; outputs.dirlightNormal = dirlight_setNormal(normal); return outputs; } @fragment fn fragmentMain(inputs: FragmentInputs) -> @location(0) vec4<f32> { var fragColor = vec4(inputs.color, 1.); fragColor = dirlight_filterColor(fragColor, DirlightInputs(inputs.dirlightNormal)); return fragColor; } `; const vs = /* glsl */ `\ #version 300 es in vec3 positions; in vec3 normals; uniform appUniforms { vec3 uColor; mat4 uModel; mat4 uView; mat4 uProjection; } app; out vec3 color; void main(void) { vec3 normal = vec3(app.uModel * vec4(normals, 0.0)); // Set up data for modules color = app.uColor; dirlight_setNormal(normal); gl_Position = app.uProjection * app.uView * app.uModel * vec4(positions, 1.0); } `; const fs = /* glsl */ `\ #version 300 es precision highp float; in vec3 color; out vec4 fragColor; void main(void) { fragColor = vec4(color, 1.); fragColor = dirlight_filterColor(fragColor); } `; export default class AppAnimationLoopTemplate extends AnimationLoopTemplate { static info = INFO_HTML; readonly translations = [ [2, -2, 0], [2, 2, 0], [-2, 2, 0], [-2, -2, 0] ]; readonly rotations = [ [random(), random(), random()], [random(), random(), random()], [random(), random(), random()], [random(), random(), random()] ]; readonly colors = [ [1, 0, 0], [0, 1, 0], [0, 0, 1], [1, 1, 0] ]; readonly keyFrameData: [number, number][] = [ [0, 0], [1000, 2 * Math.PI], [2000, Math.PI], [3000, 2 * Math.PI], [4000, 0] ]; timeline: Timeline; timeSlider; cubes: { translation: number[]; rotation: number[]; keyFrames: KeyFrames<number>; model: Model; uniformStore: UniformStore<{app: AppUniforms}>; }[]; globalUniformStore = new UniformStore<{dirlight: typeof dirlight.uniforms}>({ dirlight }); constructor({device, aspect, animationLoop}: AnimationProps) { super(); const playButton = document.getElementById('play'); const pauseButton = document.getElementById('pause'); this.timeSlider = document.getElementById('time'); if (playButton && pauseButton) { playButton.addEventListener('click', () => this.timeline.play()); pauseButton.addEventListener('click', () => this.timeline.pause()); this.timeSlider.addEventListener('input', event => this.timeline.setTime(parseFloat(event.target.value)) ); } this.timeline = new Timeline(); animationLoop.attachTimeline(this.timeline); this.timeline.play(); const channels = [ this.timeline.addChannel({delay: 2000, rate: 0.5, duration: 8000, repeat: 2}), this.timeline.addChannel({delay: 10000, rate: 0.2, duration: 20000, repeat: 1}), this.timeline.addChannel({ delay: 7000, rate: 1, duration: 4000, repeat: 8 }), this.timeline.addChannel({ delay: 0, rate: 0.8, duration: 5000, repeat: Number.POSITIVE_INFINITY }) ]; this.cubes = new Array(4); const keyFrames = [ new KeyFrames(this.keyFrameData), new KeyFrames(this.keyFrameData), new KeyFrames(this.keyFrameData), new KeyFrames(this.keyFrameData) ]; for (let i = 0; i < 4; ++i) { this.timeline.attachAnimation(keyFrames[i], channels[i]); const cubeUniformStore = new UniformStore<{app: AppUniforms}>({app}); cubeUniformStore.setUniforms({ app: { uProjection: new Matrix4().perspective({fovy: radians(60), aspect, near: 1, far: 20.0}), uView: new Matrix4().lookAt({ center: [0, 0, 0], eye: [0, 0, -8] }), uColor: this.colors[i] } }); this.cubes[i] = { uniformStore: cubeUniformStore, translation: this.translations[i], rotation: this.rotations[i], keyFrames: keyFrames[i], model: new Model(device, { id: `cube-${i}`, source, vs, fs, instanceCount: 1, modules: [dirlight], geometry: new CubeGeometry(), parameters: { depthWriteEnabled: true, depthCompare: 'less-equal' }, bindings: { app: cubeUniformStore.getManagedUniformBuffer(device, 'app'), dirlight: this.globalUniformStore.getManagedUniformBuffer(device, 'dirlight') } }) }; } } onFinalize() { for (const cube of this.cubes) { cube.model.destroy(); } } onRender({device}) { if (this.timeSlider) { this.timeSlider.value = this.timeline.getTime(); } const modelMatrix = new Matrix4(); for (const cube of this.cubes) { const startRotation = cube.keyFrames.getStartData(); const endRotation = cube.keyFrames.getEndData(); const rotation = startRotation + cube.keyFrames.factor * (endRotation - startRotation); const rotationX = cube.rotation[0] + rotation; const rotationY = cube.rotation[1] + rotation; const rotationZ = cube.rotation[2]; modelMatrix .identity() .translate(cube.translation) .rotateXYZ([rotationX, rotationY, rotationZ]); cube.model.setUniforms({}); cube.uniformStore.setUniforms({ app: { uModel: modelMatrix } }); cube.uniformStore.updateUniformBuffers(); } // Draw the cubes const renderPass = device.beginRenderPass({ clearColor: [0, 0, 0, 1] // clearDepth: true }); for (const cube of this.cubes) { cube.model.draw(renderPass); } renderPass.end(); } } ```
/content/code_sandbox/examples/api/animation/app.ts
xml
2016-01-25T09:41:59
2024-08-16T10:03:05
luma.gl
visgl/luma.gl
2,280
2,016
```xml import {Component} from "./component.js"; /** * Opens up a modal to edit the value of this component. * @decorator * @formio * @property * @schema */ export function ModalEdit(modalEdit = true) { return Component({ modalEdit }); } ```
/content/code_sandbox/packages/third-parties/schema-formio/src/decorators/modalEdit.ts
xml
2016-02-21T18:38:47
2024-08-14T21:19:48
tsed
tsedio/tsed
2,817
65
```xml /* * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import { formatDate } from "@angular/common"; import { Component, OnInit } from "@angular/core"; import { MatDialog } from "@angular/material/dialog"; import { ActivatedRoute } from "@angular/router"; import { ColDef } from "ag-grid-community"; import { BehaviorSubject } from "rxjs"; import { Log } from "trafficops-types"; import { ChangeLogsService } from "src/app/api/change-logs.service"; import { LastDaysComponent } from "src/app/core/change-logs/last-days/last-days.component"; import { TextDialogComponent } from "src/app/shared/dialogs/text-dialog/text-dialog.component"; import { ContextMenuActionEvent, ContextMenuItem, TableTitleButton } from "src/app/shared/generic-table/generic-table.component"; import { NavigationService } from "src/app/shared/navigation/navigation.service"; import { relativeTimeString } from "src/app/utils"; /** * AugmentedChangeLog has fields for access to processed times. */ interface AugmentedChangeLog extends Log { longTime: string; relativeTime: string; } /** * Converts a changelog to an augmented one. * * @param cl Changelog to convert. * @returns Converted changelog */ export function augment(cl: Log): AugmentedChangeLog { const aug = {longTime: "", relativeTime: "", ...cl}; aug.relativeTime = relativeTimeString(new Date().getTime() - new Date(aug.lastUpdated).getTime()); aug.longTime = formatDate(aug.lastUpdated, "long", "en-US"); return aug; } /** * ChangeLogsComponent is the controller for the change logs page */ @Component({ selector: "tp-change-logs", styleUrls: ["./change-logs.component.scss"], templateUrl: "./change-logs.component.html" }) export class ChangeLogsComponent implements OnInit { /** Emits changes to the fuzzy search text. */ public fuzzySubj: BehaviorSubject<string>; /** The current search text. */ public searchText = ""; public changeLogs: Promise<Array<AugmentedChangeLog>> | null = null; public lastDays = 7; public titleBtns: Array<TableTitleButton> = [ { action: "lastDays", text: `Last ${this.lastDays} days`, } ]; public contextMenuOptions: Array<ContextMenuItem<AugmentedChangeLog>> = [ { action: "viewChangeLog", name: "Expand Log" } ]; public columnDefs: Array<ColDef> = [ { field: "relativeTime", headerName: "Occurred", }, { field: "longTime", headerName: "Created (UTC)", }, { field: "user", headerName: "User" }, { field: "level", headerName: "Level", hide: true }, { field: "message", headerName: "Message" } ]; /** Whether user data is still loading. */ public loading = true; constructor(private readonly navSvc: NavigationService, private readonly api: ChangeLogsService, private readonly route: ActivatedRoute, private readonly dialog: MatDialog) { this.fuzzySubj = new BehaviorSubject<string>(""); this.navSvc.headerTitle.next("Change Logs"); } /** * Loads the table data based on lastDays. */ public async loadData(): Promise<void> { this.loading = true; const data = await this.api.getChangeLogs({days: this.lastDays.toString()}); this.changeLogs = Promise.resolve(data.map(augment)); this.loading = false; } /** * Angular lifecycle hook */ public async ngOnInit(): Promise<void> { this.route.queryParamMap.subscribe( m => { const search = m.get("search"); if (search) { this.fuzzySubj.next(search); } this.searchText = search ?? ""; } ); await this.loadData(); } /** * handles when a context menu event is emitted * * @param action which button was pressed */ public async handleContextMenu(action: ContextMenuActionEvent<AugmentedChangeLog>): Promise<void> { switch (action.action) { case "viewChangeLog": let changeLog: AugmentedChangeLog; if (Array.isArray(action.data)) { changeLog = action.data[0]; } else { changeLog = action.data; } this.dialog.open(TextDialogComponent, { data: {message: changeLog.message, title: `Change Log for ${changeLog.user}`} }); break; } } /** * handles when a title button is event is emitted * * @param action which button was pressed */ public async handleTitleButton(action: string): Promise<void> { switch(action){ case "lastDays": const ref = this.dialog.open(LastDaysComponent, { data: this.lastDays }); ref.afterClosed().subscribe(result => { if (result) { this.lastDays = +result.toString(); this.loadData(); this.titleBtns = [ { action: "lastDays", text: `Last ${this.lastDays} days`, } ]; } }); break; } } /** * Updates the "search" query parameter in the URL every time the search * text input changes. */ public updateURL(): void { this.fuzzySubj.next(this.searchText); } } ```
/content/code_sandbox/experimental/traffic-portal/src/app/core/change-logs/change-logs.component.ts
xml
2016-09-02T07:00:06
2024-08-16T03:50:21
trafficcontrol
apache/trafficcontrol
1,043
1,223
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import dstdevpn = require( './index' ); // TESTS // // The function returns a number... { const x = new Float64Array( 10 ); dstdevpn( x.length, 1, x, 1 ); // $ExpectType number } // The compiler throws an error if the function is provided a first argument which is not a number... { const x = new Float64Array( 10 ); dstdevpn( '10', 1, x, 1 ); // $ExpectError dstdevpn( true, 1, x, 1 ); // $ExpectError dstdevpn( false, 1, x, 1 ); // $ExpectError dstdevpn( null, 1, x, 1 ); // $ExpectError dstdevpn( undefined, 1, x, 1 ); // $ExpectError dstdevpn( [], 1, x, 1 ); // $ExpectError dstdevpn( {}, 1, x, 1 ); // $ExpectError dstdevpn( ( x: number ): number => x, 1, x, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a second argument which is not a number... { const x = new Float64Array( 10 ); dstdevpn( x.length, '10', x, 1 ); // $ExpectError dstdevpn( x.length, true, x, 1 ); // $ExpectError dstdevpn( x.length, false, x, 1 ); // $ExpectError dstdevpn( x.length, null, x, 1 ); // $ExpectError dstdevpn( x.length, undefined, x, 1 ); // $ExpectError dstdevpn( x.length, [], x, 1 ); // $ExpectError dstdevpn( x.length, {}, x, 1 ); // $ExpectError dstdevpn( x.length, ( x: number ): number => x, x, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a third argument which is not a Float64Array... { const x = new Float64Array( 10 ); dstdevpn( x.length, 1, 10, 1 ); // $ExpectError dstdevpn( x.length, 1, '10', 1 ); // $ExpectError dstdevpn( x.length, 1, true, 1 ); // $ExpectError dstdevpn( x.length, 1, false, 1 ); // $ExpectError dstdevpn( x.length, 1, null, 1 ); // $ExpectError dstdevpn( x.length, 1, undefined, 1 ); // $ExpectError dstdevpn( x.length, 1, [], 1 ); // $ExpectError dstdevpn( x.length, 1, {}, 1 ); // $ExpectError dstdevpn( x.length, 1, ( x: number ): number => x, 1 ); // $ExpectError } // The compiler throws an error if the function is provided a fourth argument which is not a number... { const x = new Float64Array( 10 ); dstdevpn( x.length, 1, x, '10' ); // $ExpectError dstdevpn( x.length, 1, x, true ); // $ExpectError dstdevpn( x.length, 1, x, false ); // $ExpectError dstdevpn( x.length, 1, x, null ); // $ExpectError dstdevpn( x.length, 1, x, undefined ); // $ExpectError dstdevpn( x.length, 1, x, [] ); // $ExpectError dstdevpn( x.length, 1, x, {} ); // $ExpectError dstdevpn( x.length, 1, x, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... { const x = new Float64Array( 10 ); dstdevpn(); // $ExpectError dstdevpn( x.length ); // $ExpectError dstdevpn( x.length, 1 ); // $ExpectError dstdevpn( x.length, 1, x ); // $ExpectError dstdevpn( x.length, 1, x, 1, 10 ); // $ExpectError } // Attached to main export is an `ndarray` method which returns a number... { const x = new Float64Array( 10 ); dstdevpn.ndarray( x.length, 1, x, 1, 0 ); // $ExpectType number } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... { const x = new Float64Array( 10 ); dstdevpn.ndarray( '10', 1, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( true, 1, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( false, 1, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( null, 1, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( undefined, 1, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( [], 1, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( {}, 1, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( ( x: number ): number => x, 1, x, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a second argument which is not a number... { const x = new Float64Array( 10 ); dstdevpn.ndarray( x.length, '10', x, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, true, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, false, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, null, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, undefined, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, [], x, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, {}, x, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, ( x: number ): number => x, x, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a third argument which is not a Float64Array... { const x = new Float64Array( 10 ); dstdevpn.ndarray( x.length, 1, 10, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, '10', 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, true, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, false, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, null, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, undefined, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, [], 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, {}, 1, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, ( x: number ): number => x, 1, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... { const x = new Float64Array( 10 ); dstdevpn.ndarray( x.length, 1, x, '10', 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, true, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, false, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, null, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, undefined, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, [], 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, {}, 0 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, ( x: number ): number => x, 0 ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number... { const x = new Float64Array( 10 ); dstdevpn.ndarray( x.length, 1, x, 1, '10' ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, true ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, false ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, null ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, undefined ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, [] ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, {} ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... { const x = new Float64Array( 10 ); dstdevpn.ndarray(); // $ExpectError dstdevpn.ndarray( x.length ); // $ExpectError dstdevpn.ndarray( x.length, 1 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1 ); // $ExpectError dstdevpn.ndarray( x.length, 1, x, 1, 0, 10 ); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/base/dstdevpn/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
2,377
```xml import { Localized } from "@fluent/react/compat"; import React, { FunctionComponent, useCallback } from "react"; import { SearchIcon, SvgIcon } from "coral-ui/components/icons"; import { Button, Flex, TextField } from "coral-ui/components/v2"; import styles from "./SiteSearchTextField.css"; interface Props { onSearch: (event: React.SyntheticEvent) => void; onClearSearch: () => void; onSearchTextChanged: (event: React.ChangeEvent<HTMLInputElement>) => void; value: string; } const SiteSearchTextField: FunctionComponent<Props> = ({ onSearch, onClearSearch, onSearchTextChanged, value, }) => { const onSearchKeyDown = useCallback( (event: React.KeyboardEvent) => { if (event.key === "Escape") { onClearSearch(); } }, [onClearSearch] ); const onSearchKeyPress = useCallback( (event: React.KeyboardEvent) => { if (event.key === "Enter") { onSearch(event); } if (event.key === "Escape") { onClearSearch(); } }, [onSearch, onClearSearch] ); return ( <Flex> <Localized id="site-search-textField" attrs={{ "aria-label": true, placeholder: true }} > <TextField color="regular" className={styles.textField} data-testid="site-search-textField" placeholder="Search by site name" aria-label="Search by site name" onChange={onSearchTextChanged} onKeyPress={onSearchKeyPress} onKeyDown={onSearchKeyDown} variant="seamlessAdornment" value={value} adornment={ <Localized id="site-search-searchButton" attrs={{ "aria-label": true }} > <Button data-testid="site-search-button" type="submit" color="dark" adornmentRight aria-label="Search" onClick={onSearch} > <SvgIcon Icon={SearchIcon} /> </Button> </Localized> } /> </Localized> </Flex> ); }; export default SiteSearchTextField; ```
/content/code_sandbox/client/src/core/client/admin/components/SiteSearch/SiteSearchTextField.tsx
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
478
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // TypeScript Version: 4.1 /* eslint-disable max-lines */ import cdf = require( '@stdlib/stats/base/dists/exponential/cdf' ); import Exponential = require( '@stdlib/stats/base/dists/exponential/ctor' ); import entropy = require( '@stdlib/stats/base/dists/exponential/entropy' ); import kurtosis = require( '@stdlib/stats/base/dists/exponential/kurtosis' ); import logcdf = require( '@stdlib/stats/base/dists/exponential/logcdf' ); import logpdf = require( '@stdlib/stats/base/dists/exponential/logpdf' ); import mean = require( '@stdlib/stats/base/dists/exponential/mean' ); import median = require( '@stdlib/stats/base/dists/exponential/median' ); import mgf = require( '@stdlib/stats/base/dists/exponential/mgf' ); import mode = require( '@stdlib/stats/base/dists/exponential/mode' ); import pdf = require( '@stdlib/stats/base/dists/exponential/pdf' ); import quantile = require( '@stdlib/stats/base/dists/exponential/quantile' ); import skewness = require( '@stdlib/stats/base/dists/exponential/skewness' ); import stdev = require( '@stdlib/stats/base/dists/exponential/stdev' ); import variance = require( '@stdlib/stats/base/dists/exponential/variance' ); /** * Interface describing the `exponential` namespace. */ interface Namespace { /** * Exponential distribution cumulative distribution function (CDF). * * @param x - input value * @param lambda - rate parameter * @returns evaluated CDF * * @example * var y = ns.cdf( 2.0, 0.1 ); * // returns ~0.181 * * var myCDF = ns.cdf.factory( 0.5 ); * y = myCDF( 3.0 ); * // returns ~0.777 */ cdf: typeof cdf; /** * Exponential distribution. */ Exponential: typeof Exponential; /** * Returns the entropy of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns entropy * * @example * var v = ns.entropy( 9.0 ); * // returns ~-1.197 * * @example * var v = ns.entropy( 1.0 ); * // returns 1.0 * * @example * var v = ns.entropy( -0.2 ); * // returns NaN * * @example * var v = ns.entropy( NaN ); * // returns NaN */ entropy: typeof entropy; /** * Returns the excess kurtosis of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns excess kurtosis * * @example * var v = ns.kurtosis( 9.0 ); * // returns 6.0 * * @example * var v = ns.kurtosis( 1.0 ); * // returns 6.0 * * @example * var v = ns.kurtosis( -0.2 ); * // returns NaN * * @example * var v = ns.kurtosis( NaN ); * // returns NaN */ kurtosis: typeof kurtosis; /** * Exponential distribution logarithm of cumulative distribution function (CDF). * * @param x - input value * @param lambda - rate parameter * @returns evaluated logCDF * * @example * var y = ns.logcdf( 2.0, 0.1 ); * // returns ~-1.708 * * var mylogcdf = ns.logcdf.factory( 0.5 ); * y = mylogcdf( 3.0 ); * // returns ~-0.252 */ logcdf: typeof logcdf; /** * Exponential distribution natural logarithm of probability density function (logPDF). * * @param x - input value * @param lambda - rate parameter * @returns evaluated logPDF * * @example * var y = ns.logpdf( 0.3, 4.0 ); * // returns ~0.186 * * var mylogpdf = ns.logpdf.factory( 0.5 ); * * y = mylogpdf( 3.0 ); * // returns ~-2.193 * * y = mylogpdf( 1.0 ); * // returns ~-1.193 */ logpdf: typeof logpdf; /** * Returns the expected value of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns expected value * * @example * var v = ns.mean( 9.0 ); * // returns ~0.111 * * @example * var v = ns.mean( 1.0 ); * // returns 1.0 * * @example * var v = ns.mean( -0.2 ); * // returns NaN * * @example * var v = ns.mean( NaN ); * // returns NaN */ mean: typeof mean; /** * Returns the median of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns median * * @example * var v = ns.median( 9.0 ); * // returns ~0.077 * * @example * var v = ns.median( 1.0 ); * // returns ~0.693 * * @example * var v = ns.median( -0.2 ); * // returns NaN * * @example * var v = ns.median( NaN ); * // returns NaN */ median: typeof median; /** * Exponential distribution moment-generating function (MGF). * * @param t - input value * @param lambda - rate parameter * @returns evaluated MGF * * @example * var v = ns.mgf( 2.0, 3.0 ); * // returns 3.0 * * var mymgf = ns.mgf.factory( 4.0 ); * v = mymgf( 3.0 ); * // returns 4.0 */ mgf: typeof mgf; /** * Returns the mode of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns mode * * @example * var v = ns.mode( 9.0 ); * // returns 0.0 * * @example * var v = ns.mode( 1.0 ); * // returns 0.0 * * @example * var v = ns.mode( -0.2 ); * // returns NaN * * @example * var v = ns.mode( NaN ); * // returns NaN */ mode: typeof mode; /** * Exponential distribution probability density function (PDF). * * @param x - input value * @param lambda - rate parameter * @returns evaluated PDF * * @example * var y = ns.pdf( 0.3, 4.0 ); * // returns ~1.205 * * var myPDF = ns.pdf.factory( 0.5 ); * * y = myPDF( 3.0 ); * // returns ~0.112 * * y = myPDF( 1.0 ); * // returns ~0.303 */ pdf: typeof pdf; /** * Exponential distribution quantile function. * * @param p - input value * @param lambda - rate parameter * @returns evaluated quantile function * * @example * var y = ns.quantile( 0.5, 4.0 ); * // returns ~0.173 * * var myQuantile = ns.quantile.factory( 0.4 ); * * y = myQuantile( 0.4 ); * // returns ~1.277 * * y = myQuantile( 1.0 ); * // returns Infinity */ quantile: typeof quantile; /** * Returns the skewness of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns skewness * * @example * var v = ns.skewness( 9.0 ); * // returns 2.0 * * @example * var v = ns.skewness( 1.0 ); * // returns 2.0 * * @example * var v = ns.skewness( -0.2 ); * // returns NaN * * @example * var v = ns.skewness( NaN ); * // returns NaN */ skewness: typeof skewness; /** * Returns the standard deviation of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns standard deviation * * @example * var v = ns.stdev( 9.0 ); * // returns ~0.11 * * @example * var v = ns.stdev( 1.0 ); * // returns 1.0 * * @example * var v = ns.stdev( -0.2 ); * // returns NaN * * @example * var v = ns.stdev( NaN ); * // returns NaN */ stdev: typeof stdev; /** * Returns the variance of an exponential distribution. * * ## Notes * * - If provided a negative value for ``, the function returns `NaN`. * * @param lambda - rate parameter * @returns variance * * @example * var v = ns.variance( 9.0 ); * // returns ~0.012 * * @example * var v = ns.variance( 1.0 ); * // returns 1.0 * * @example * var v = ns.variance( -0.2 ); * // returns NaN * * @example * var v = ns.variance( NaN ); * // returns NaN */ variance: typeof variance; } /** * Exponential distribution. */ declare var ns: Namespace; // EXPORTS // export = ns; ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/base/dists/exponential/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
2,639
```xml import { ComponentRegistry, ExtensionRegistry } from 'mailspring-exports'; import AutoloadImagesExtension from './autoload-images-extension'; import AutoloadImagesHeader from './autoload-images-header'; /* All packages must export a basic object that has at least the following 3 methods: 1. `activate` - Actions to take once the package gets turned on. Pre-enabled packages get activated on Mailspring bootup. They can also be activated manually by a user. 2. `deactivate` - Actions to take when a package gets turned off. This can happen when a user manually disables a package. */ export function activate() { // Register Message List Actions we provide globally ExtensionRegistry.MessageView.register(AutoloadImagesExtension); ComponentRegistry.register(AutoloadImagesHeader, { role: 'message:BodyHeader', }); } export function deactivate() { ExtensionRegistry.MessageView.unregister(AutoloadImagesExtension); ComponentRegistry.unregister(AutoloadImagesHeader); } ```
/content/code_sandbox/app/internal_packages/message-autoload-images/lib/main.ts
xml
2016-10-13T06:45:50
2024-08-16T18:14:37
Mailspring
Foundry376/Mailspring
15,331
205
```xml import type { UnknownAction } from '@reduxjs/toolkit'; import { configureStore } from '@reduxjs/toolkit'; import * as React from 'react'; import type { ReactReduxContextValue, TypedUseSelectorHook } from 'react-redux'; import { createSelectorHook } from 'react-redux'; import { QueryBuilderContext } from '../components'; import type { QueriesSliceState } from './queriesSlice'; import { queriesSlice } from './queriesSlice'; import type { WarningsSliceState } from './warningsSlice'; import { warningsSlice } from './warningsSlice'; export type RqbState = { queries: QueriesSliceState; warnings: WarningsSliceState; }; const preloadedState = { queries: queriesSlice.getInitialState(), warnings: warningsSlice.getInitialState(), } satisfies RqbState; export const queryBuilderStore = configureStore({ reducer: { queries: queriesSlice.reducer, warnings: warningsSlice.reducer, }, preloadedState, middleware: getDefaultMiddleware => getDefaultMiddleware({ // Ignore non-serializable values in setQueryState actions and rule `value`s // path_to_url#working-with-non-serializable-data serializableCheck: { ignoredActions: ['queries/setQueryState'], ignoredPaths: [/^queries\b.*\.rules\.\d+\.value$/], }, }), }); export const QueryBuilderStateContext = React.createContext<ReactReduxContextValue< RqbState, UnknownAction > | null>(null); // #region Hooks const useRQB_INTERNAL_QueryBuilderSelector: TypedUseSelectorHook<RqbState> = createSelectorHook(QueryBuilderStateContext); /** * A Redux `useSelector` hook for RQB's internal store. See also {@link getQuerySelectorById}. * * **TIP:** Prefer {@link useQueryBuilderQuery} if you only need to access the query object * for the nearest ancestor {@link QueryBuilder} component. */ export const useQueryBuilderSelector: TypedUseSelectorHook<RqbState> = (selector, other) => { const rqbContext = React.useContext(QueryBuilderContext); // TODO: `as` shouldn't be necessary here, right? const result = useRQB_INTERNAL_QueryBuilderSelector(selector, other as undefined); return result ?? rqbContext?.initialQuery; }; /** * Retrieves the full, latest query object for the nearest ancestor {@link QueryBuilder} * component. * * The optional parameter should only be used when retrieving a query object from a different * {@link QueryBuilder} than the nearest ancestor. It can be a full props object as passed * to a custom component or any object matching the interface `{ schema: { qbId: string } }`. * * Must follow React's [Rules of Hooks](path_to_url */ export const useQueryBuilderQuery = (props?: { schema: { qbId: string } }) => { const rqbContext = React.useContext(QueryBuilderContext); return ( useRQB_INTERNAL_QueryBuilderSelector( getQuerySelectorById(props?.schema.qbId ?? rqbContext.qbId ?? /* istanbul ignore next */ '') ) ?? rqbContext?.initialQuery ); }; // #endregion // #region Selectors /** * Given a `qbId` (passed to every component as part of the `schema` prop), returns * a Redux selector for use with {@link useQueryBuilderSelector}. * * Note that {@link useQueryBuilderQuery} is a more concise way of accessing the * query for the nearest ancestor {@link QueryBuilder} component. */ export const getQuerySelectorById = (qbId: string) => (state: RqbState) => queriesSlice.selectors.getQuerySelectorById({ queries: state.queries }, qbId); // #endregion ```
/content/code_sandbox/packages/react-querybuilder/src/redux/index.ts
xml
2016-06-17T22:03:19
2024-08-16T10:28:42
react-querybuilder
react-querybuilder/react-querybuilder
1,131
796
```xml import * as React from 'react'; import { IAzureApp } from './IAppInterfaces'; import { AppList } from './AppList'; import { Icon, MessageBar, MessageBarType, Pivot, PivotItem } from 'office-ui-fabric-react'; import { Spinner } from '@fluentui/react'; import { IService, Service } from '../Service'; import { IAppProperties } from '../SitesSelectedManagerWebPart'; import * as strings from 'SitesSelectedManagerWebPartStrings'; import { AppCheckPermissions } from './AppCheckPermissions'; import styles from './AppStyles.module.scss'; import { initializeIcons } from '@uifabric/icons'; interface IMessageBoxProps { resetChoice?: () => void; } interface IAppState { showMessage: boolean; site: string; messageBarType: number; message: string; permissionJson: string; apps: IAzureApp[]; getPerm: boolean; permission: string; } export const App: React.FunctionComponent<IAppProperties> = (props) => { const [state, setState] = React.useState<IAppState>( { showMessage: false, site: '', messageBarType: null, message: '', permissionJson: '', apps: null, getPerm: false, permission: '' } ); const [service] = React.useState<IService>(props.context.serviceScope.consume(Service.serviceKey)) React.useEffect(() => { initializeIcons(); setState({ ...state, showMessage: false }); service.getApps(props.aadGuid) .then((_apps) => { setState({ ...state, apps: _apps }); if (_apps.length === 0) { setState({ ...state, message: strings.ErrorNoAppsFoundMessage, messageBarType: MessageBarType.info, showMessage: true }); } }, (error) => { let _errorDetail = strings.ErrorGettingApps; const _errorHint = strings.ErrorHintGettingApps; if (error.statusCode) { _errorDetail = `${strings.ErrorHttp} ${error.statusCode} - ${error.message}` } setState({ ...state, messageBarType: MessageBarType.error, apps: [], message: `${_errorDetail} ${_errorHint}`, showMessage: true }); }) }, []) const showMessage = (type: MessageBarType, message: string, autoDismiss: boolean = false, error?: any): void => { setState({ ...state, showMessage: true, messageBarType: type, message: message }); if (autoDismiss) { setTimeout(() => { setState({ ...state, showMessage: false }); }, 5000); } } const resetChoice = () => { setState({ ...state, showMessage: false, message: '' }); }; const SitesSelectedMessageBox = (p: IMessageBoxProps) => ( <MessageBar messageBarType={state.messageBarType} isMultiline={true} onDismiss={resetChoice} dismissButtonAriaLabel={strings.Close} > {state.message} </MessageBar> ); if (state.apps) { return <div className={styles.sitesSelectedManager}> <h1>{props.description}</h1> {state.showMessage ? <SitesSelectedMessageBox resetChoice={resetChoice} /> : React.Fragment} <Pivot> {props.showAbout ? <PivotItem headerText={strings.HomeTabTitle} headerButtonProps={{ 'data-order': 1, 'data-title': strings.HomeTabTitle }} itemIcon="Home" > <h3>{strings.HomeTitleMain}</h3> <ul> <li><Icon iconName="SharepointAppIcon16" /> {strings.HomeBulletList}</li> <li><Icon iconName="SharepointAppIcon16" /> {strings.HomeBulletAdd} </li> <li><Icon iconName="SharepointAppIcon16" /> {strings.HomeBulletClear} </li> <li><Icon iconName="Permissions" /> {strings.HomeBulletCheck} </li> </ul> <h3>{strings.HomeTitleFYI}</h3> <p> {strings.HomeFYI} </p> <h3>{strings.HomeAccessTitle}</h3> <p>{strings.HomeAccess}</p> </PivotItem> : React.Fragment} <PivotItem headerText={strings.AddTabTitle} itemIcon="SharepointAppIcon16"> <AppList {...{ applications: state.apps, wpContext: props.context, showMessage: showMessage }} /> </PivotItem> <PivotItem headerText={strings.CheckTabTitle} itemIcon="Permissions"> <AppCheckPermissions {...{ wpContext: props.context, showMessage: showMessage }} /> </PivotItem> </Pivot> </div> } else { return <div> <Spinner label={strings.WorkingOnIt} /> </div> } } ```
/content/code_sandbox/samples/react-sites-selected-admin/src/webparts/sitesSelectedManager/components/App.tsx
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
1,069
```xml import type { CustomMessageHandlerConnection } from '@react-native/dev-middleware'; import chalk from 'chalk'; import { launchInspectorBrowserAsync, type LaunchBrowserInstance } from './LaunchBrowser'; import { Log } from '../../../../log'; import { env } from '../../../../utils/env'; import { pageIsSupported } from '../../metro/debugging/pageIsSupported'; export interface MetroInspectorProxyApp { id: string; description: string; title: string; faviconUrl: string; devtoolsFrontendUrl: string; type: 'node'; webSocketDebuggerUrl: string; vm: 'Hermes' | "don't use"; /** Added since React Native 0.73.x */ deviceName?: string; /** Added since React Native 0.74.x */ reactNative?: { logicalDeviceId: string; capabilities: CustomMessageHandlerConnection['page']['capabilities']; }; } let openingBrowserInstance: LaunchBrowserInstance | null = null; export function openJsInspector(metroBaseUrl: string, app: MetroInspectorProxyApp) { if (env.EXPO_USE_UNSTABLE_DEBUGGER) { return openExperimentalJsInspector(metroBaseUrl, app); } else { return openClassicJsInspector(app); } } async function openExperimentalJsInspector(metroBaseUrl: string, app: MetroInspectorProxyApp) { const device = encodeURIComponent(app.id); const appId = encodeURIComponent(app.description); await fetch(`${metroBaseUrl}/open-debugger?device=${device}&appId=${appId}`, { method: 'POST' }); } /** * Chrome DevTools UI implemented for SDK <49. * TODO(cedric): Remove this when we fully swap over to the new React Native JS Inspector. */ async function openClassicJsInspector(app: MetroInspectorProxyApp) { Log.log(chalk`{bold Debug:} Opening JavaScript inspector in the browser...`); // To update devtoolsFrontendRev, find the full commit hash in the url: // path_to_url{CHROME_VERSION}/chrome/VERSION // // 1. Replace {CHROME_VERSION} with the target chrome version // 2. Click the first log item in the webpage // 3. The full commit hash is the desired revision const devtoolsFrontendRev = 'd9568d04d7dd79269c5a655d7ada69650c5a8336'; // Chrome 100.0.4896.75 const urlBase = `path_to_url{devtoolsFrontendRev}/devtools_app.html`; const ws = app.webSocketDebuggerUrl.replace(/^ws:\/\//, ''); const url = `${urlBase}?panel=console&ws=${encodeURIComponent(ws)}`; await closeJsInspector(); openingBrowserInstance = await launchInspectorBrowserAsync(url); } export async function closeJsInspector() { await openingBrowserInstance?.close(); openingBrowserInstance = null; } export async function queryInspectorAppAsync( metroServerOrigin: string, appId: string ): Promise<MetroInspectorProxyApp | null> { const apps = await queryAllInspectorAppsAsync(metroServerOrigin); return apps.find((app) => app.description === appId) ?? null; } export async function queryAllInspectorAppsAsync( metroServerOrigin: string ): Promise<MetroInspectorProxyApp[]> { const resp = await fetch(`${metroServerOrigin}/json/list`); const apps: MetroInspectorProxyApp[] = transformApps(await resp.json()); // Only use targets with better reloading support return apps.filter((app) => pageIsSupported(app)); } // The description of `React Native Experimental (Improved Chrome Reloads)` target is `don't use` from metro. // This function tries to transform the unmeaningful description to appId function transformApps(apps: MetroInspectorProxyApp[]): MetroInspectorProxyApp[] { const deviceIdToAppId: Record<string, string> = {}; for (const app of apps) { if (app.description !== "don't use") { const deviceId = app.reactNative?.logicalDeviceId ?? app.id.split('-')[0]; const appId = app.description; deviceIdToAppId[deviceId] = appId; } } return apps.map((app) => { if (app.description === "don't use") { const deviceId = app.reactNative?.logicalDeviceId ?? app.id.split('-')[0]; app.description = deviceIdToAppId[deviceId] ?? app.description; } return app; }); } ```
/content/code_sandbox/packages/@expo/cli/src/start/server/middleware/inspector/JsInspector.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
959
```xml /** * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ import React from 'react'; import useBaseUrl from '@docusaurus/useBaseUrl'; import DocusaurusThemedImage from '@theme/ThemedImage'; type CommandProps = { /** * Name of the Sapling subcommand to link to. Command aliases are also * supported. */ name: string; /** * If specified, overrides `name` as the the text to use fo the link. */ linkText?: string; }; /** Creates a link to the corresponding documentation page for the command. */ export function Command({name, linkText}: CommandProps) { const command = mapAliasToCommand(name); const label = linkText ?? name; return ( <a href={useBaseUrl(`/docs/commands/${command}`)}> <code>{label}</code> </a> ); } /** Shorthand for <Command> where `sl ${name}` is used as the linkText. */ export function SLCommand({name}: CommandProps) { return <Command name={name} linkText={`sl ${name}`} />; } // TODO(mbolin): This should be autogenerated as a byproduct of running // scripts/generate-command-markdown.py. function mapAliasToCommand(alias: string): string { switch (alias) { case 'go': return 'goto'; case 'isl': return 'web'; } return alias; } export function ReviewStackScreenshot() { return ( <p style={{textAlign: 'center'}}> <img src={useBaseUrl('/img/reviewstack-demo.gif')} width={800} align="center" /> </p> ); } export function ThemedImage({alt, light, dark}) { return <DocusaurusThemedImage alt={alt} sources={{ light: useBaseUrl(light), dark: useBaseUrl(dark), }} />; } export function Video({src}) { return <video controls> <source src={useBaseUrl(src)}/> </video>; } ```
/content/code_sandbox/website/elements.tsx
xml
2016-05-05T16:53:47
2024-08-16T19:12:02
sapling
facebook/sapling
5,987
466
```xml <?xml version="1.0" encoding="utf-8" ?> <hosts> <host name="localhost"> <alias>host1</alias> </host> </hosts> ```
/content/code_sandbox/config-model/src/test/cfg/application/treeconfig/hosts.xml
xml
2016-06-03T20:54:20
2024-08-16T15:32:01
vespa
vespa-engine/vespa
5,524
42
```xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="path_to_url" android:shape="oval"> <stroke android:width="3dp" android:color="#e6e6e6" /> </shape> ```
/content/code_sandbox/paper-onboarding/src/main/res/drawable/onboarding_pager_circle_icon.xml
xml
2016-04-25T09:31:20
2024-08-07T21:44:08
paper-onboarding-android
Ramotion/paper-onboarding-android
2,559
60
```xml import { PointF2D } from "../../Common/DataObjects/PointF2D"; import { Glissando } from "../VoiceData/Glissando"; import { ColDirEnum } from "./BoundingBox"; import { EngravingRules } from "./EngravingRules"; import { GraphicalLine } from "./GraphicalLine"; import { GraphicalNote } from "./GraphicalNote"; import { GraphicalStaffEntry } from "./GraphicalStaffEntry"; import { StaffLine } from "./StaffLine"; export class GraphicalGlissando { public Glissando: Glissando; public Line: GraphicalLine; public staffEntries: GraphicalStaffEntry[]; public StaffLine: StaffLine; public Width: number; public Color: string; // default: undefined = black. vexflow format (e.g. #12345600, 00 is alpha) constructor(glissando: Glissando) { this.Glissando = glissando; this.staffEntries = []; } public calculateLine(rules: EngravingRules): void { const startStaffEntry: GraphicalStaffEntry = this.staffEntries[0]; const endStaffEntry: GraphicalStaffEntry = this.staffEntries[this.staffEntries.length - 1]; // where the line (not the graphicalObject) starts and ends (could belong to another StaffLine) const glissStartNote: GraphicalNote = startStaffEntry.findGraphicalNoteFromNote(this.Glissando.StartNote); // if (!slurStartNote && this.graceStart) { // slurStartNote = startStaffEntry.findGraphicalNoteFromGraceNote(this.Glissando.StartNote); // } // if (!slurStartNote) { // slurStartNote = startStaffEntry.findEndTieGraphicalNoteFromNoteWithStartingSlur(this.Glissando.StartNote, this.slur); // } const glissEndNote: GraphicalNote = endStaffEntry.findGraphicalNoteFromNote(this.Glissando.EndNote); // if (!slurEndNote && this.graceEnd) { // slurEndNote = endStaffEntry.findGraphicalNoteFromGraceNote(this.Glissando.EndNote); // } if (!glissStartNote && !glissEndNote) { return; // otherwise causes error. TODO investigate, shouldn't happen. (M4_G_L19) } const staffLine: StaffLine = startStaffEntry.parentMeasure.ParentStaffLine; let startX: number; let endX: number; let startY: number; let endY: number; if (glissStartNote && startStaffEntry.parentMeasure.ParentStaffLine === this.StaffLine) { // must be relative to StaffLine startX = glissStartNote.PositionAndShape.RelativePosition.x + glissStartNote.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x + glissStartNote.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x + rules.GlissandoNoteOffset; //const glissStartVE: GraphicalVoiceEntry = glissStartNote.parentVoiceEntry; //startY = glissStartVE.PositionAndShape.RelativePosition.y + glissStartVE.PositionAndShape.BorderTop / 2; // startY = glissStartNote.PositionAndShape.RelativePosition.y - glissStartNote.PositionAndShape.Size.height / 2; startY = glissStartNote.PositionAndShape.AbsolutePosition.y; // unfortunately we need to take the AbsolutePosition, as the RelativePosition is imprecise (to the notehead). Maybe that could be fixed. } else { startX = endStaffEntry.parentMeasure.beginInstructionsWidth - 0.4; // startY: above/below note const sign: number = this.Glissando.Direction === ColDirEnum.Down ? -1 : 1; startY = glissEndNote.PositionAndShape.AbsolutePosition.y + sign * rules.GlissandoStafflineStartYDistanceToNote; // default: one line above/below end note. could also be 0.5 lines like for tab slide } if (glissEndNote && endStaffEntry.parentMeasure.ParentStaffLine === this.StaffLine) { endX = glissEndNote.PositionAndShape.RelativePosition.x + glissEndNote.parentVoiceEntry.parentStaffEntry.PositionAndShape.RelativePosition.x + glissEndNote.parentVoiceEntry.parentStaffEntry.parentMeasure.PositionAndShape.RelativePosition.x - 0.5 - rules.GlissandoNoteOffset; // -0.5: width of notehead. glissEndNote.x seems to be center of notehead. if (startX > endX) { // e.g. when beginInstructionsWidth too big at start of staffline, bigger than note startX startX = endX - rules.GlissandoStafflineStartMinimumWidth; } //const glissEndVe: GraphicalVoiceEntry = glissEndNote.parentVoiceEntry; //endY = glissEndVe.PositionAndShape.RelativePosition.y + glissEndVe.PositionAndShape.BorderTop; endY = glissEndNote.PositionAndShape.AbsolutePosition.y; } else { if (staffLine.Measures.last().parentSourceMeasure.HasEndLine) { return; // TODO inquire how this can happen: start of glissando at end of last measure. maybe faulty xml? or about slur/slide indices? } endX = staffLine.PositionAndShape.Size.width; if (endX - startX > rules.GlissandoStafflineEndOffset) { startX = endX - rules.GlissandoStafflineEndOffset; } // else: don't try to set a potentially bigger offset for a note very close to the staffline end // endY: above/below note const sign: number = this.Glissando.Direction === ColDirEnum.Down ? 1 : -1; endY = glissStartNote.PositionAndShape.AbsolutePosition.y + sign * rules.GlissandoStafflineStartYDistanceToNote; } const start: PointF2D = new PointF2D(startX, startY); const end: PointF2D = new PointF2D(endX, endY); if (this.Width === undefined) { this.Width = rules.GlissandoDefaultWidth; } this.Line = new GraphicalLine(start, end, this.Width); } } ```
/content/code_sandbox/src/MusicalScore/Graphical/GraphicalGlissando.ts
xml
2016-02-08T15:47:01
2024-08-16T17:49:53
opensheetmusicdisplay
opensheetmusicdisplay/opensheetmusicdisplay
1,416
1,385
```xml import type { SearchResultItem } from "@common/Core"; export type SearchOptions = { searchResultItems: SearchResultItem[]; searchTerm: string; fuzziness: number; maxSearchResultItems: number; }; ```
/content/code_sandbox/src/renderer/Core/Search/Helpers/SearchOptions.ts
xml
2016-10-11T04:59:52
2024-08-16T11:53:31
ueli
oliverschwendener/ueli
3,543
46
```xml /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { assertSlots } from '@fluentui/react-utilities'; import type { CarouselCardState, CarouselCardSlots } from './CarouselCard.types'; /** * Render the final JSX of CarouselCard */ export const renderCarouselCard_unstable = (state: CarouselCardState) => { assertSlots<CarouselCardSlots>(state); return <state.root />; }; ```
/content/code_sandbox/packages/react-components/react-carousel-preview/library/src/components/CarouselCard/renderCarouselCard.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
97
```xml // none of these should work, since non are actually modules var V = 12; import v = V; class C { name: string; } import c = C; enum E { Red, Blue } import e = E; interface I { id: number; } import i = I; ```
/content/code_sandbox/tests/format/typescript/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts
xml
2016-11-29T17:13:37
2024-08-16T17:29:57
prettier
prettier/prettier
48,913
67
```xml import { NativeModulesProxy, Platform } from 'expo-modules-core'; import * as SMS from '../SMS'; import { SMSAttachment } from '../SMS.types'; it(`normalizes one phone number into an array`, async () => { try { const { ExpoSMS } = NativeModulesProxy; await SMS.sendSMSAsync('0123456789', 'test'); expect(ExpoSMS.sendSMSAsync).toHaveBeenLastCalledWith(['0123456789'], 'test', {}); await SMS.sendSMSAsync(['0123456789', '9876543210'], 'test'); expect(ExpoSMS.sendSMSAsync).toHaveBeenLastCalledWith(['0123456789', '9876543210'], 'test', {}); } catch (e) { if (Platform.OS === 'web') { expect(e.code).toBe('ERR_UNAVAILABLE'); } } }); it(`normalizes attachments parameter to always pass array to native`, async () => { try { const { ExpoSMS } = NativeModulesProxy; const imageAttachment = { uri: 'path/myfile.png', filename: 'myfile.png', mimeType: 'image/png', } as SMSAttachment; await SMS.sendSMSAsync('0123456789', 'test', { attachments: imageAttachment }); expect(ExpoSMS.sendSMSAsync).toHaveBeenLastCalledWith(['0123456789'], 'test', { attachments: [imageAttachment], }); const audioAttachment = { uri: 'path/myfile.mp3', filename: 'myfile.mp3', mimeType: 'image/mp3', } as SMSAttachment; const multipleAttachments = [imageAttachment, audioAttachment]; await SMS.sendSMSAsync('0123456789', 'test', { attachments: multipleAttachments }); expect(ExpoSMS.sendSMSAsync).toHaveBeenLastCalledWith(['0123456789'], 'test', { attachments: Platform.OS === 'android' ? [imageAttachment] : multipleAttachments, }); } catch (e) { if (Platform.OS === 'web') { expect(e.code).toBe('ERR_UNAVAILABLE'); } } }); ```
/content/code_sandbox/packages/expo-sms/src/__tests__/SMS-test.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
457
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <resources> <string name="error_a11y_label">Pogreka: nije vaee</string> <string name="mtrl_checkbox_state_description_checked">Potvreno</string> <string name="mtrl_checkbox_state_description_unchecked">Nije potvreno</string> <string name="mtrl_checkbox_state_description_indeterminate">Djelomino potvreno</string> </resources> ```
/content/code_sandbox/lib/java/com/google/android/material/checkbox/res/values-hr/strings.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
154
```xml export function generateColor(str: string): string { let hash = 0; for (let i = 0; i < str.length; i++) { hash = str.charCodeAt(i) + ((hash << 5) - hash); } const h = hash % 360; return colorFromH(h); } export function colorFromH(h: string | number): string { return getHSLValue(h, 50, 85); } export function getHSLValue( h: string | number, s: string | number, l: string | number, ): string { return `hsl(${h}, ${s}%, ${l}%)`; } export const fileTypeMap: { [key: string]: string } = { '.wasm': 'wasm', '.json': 'json', '.html': 'html', '.js': 'script', '.jsx': 'script', '.es6': 'script', '.ts': 'script', '.tsx': 'script', '.flow': 'script', '.coffee': 'script', '.mjs': 'script', '.css': 'style', '.styl': 'style', '.scss': 'style', '.sass': 'style', '.less': 'style', '.png': 'image', '.jpg': 'image', '.jpeg': 'image', '.svg': 'image', '.eot': 'font', '.ttf': 'font', '.woff': 'font', '.woff2': 'font', }; export type ColorMap = { [key: string]: { color: string } }; export function createColorsFromString(strings: string[] | Set<string>): ColorMap { const step = Math.round(360 / (strings instanceof Set ? strings.size : strings.length)); let currentStep = 0; const all: ColorMap = {}; for (const value of strings) { all[value] = { color: colorFromH(currentStep) }; currentStep += step; } return all; } export const colorMap = { ...createColorsFromString(new Set(Object.values(fileTypeMap))), }; ```
/content/code_sandbox/packages/helpers/src/jora/colors.ts
xml
2016-11-30T14:09:21
2024-08-15T18:52:57
statoscope
statoscope/statoscope
1,423
465
```xml import { Slot, ErrorBoundary } from 'expo-router'; import Head from 'expo-router/head'; import { View, Text } from 'react-native'; /* * These 3 exports would normally break FastRefresh, as they do not follow the rules defined here: * path_to_url * * However, Expo Router monkey-patches the ReactRefresh.isLikelyComponent() function to accept these exports */ export const unstable_settings = {}; export { ErrorBoundary }; export function generateStaticParams() { return []; } export default function Layout() { const layoutValue = 'LAYOUT_VALUE'; return ( <> <Head> <meta name="expo-nested-layout" content={layoutValue} /> </Head> <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> <Text testID="layout-value">{layoutValue}</Text> <Slot /> </View> </> ); } ```
/content/code_sandbox/apps/router-e2e/__e2e__/fast-refresh/app/_layout.tsx
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
199
```xml // // // Microsoft Bot Framework: path_to_url // // Bot Framework Emulator Github: // path_to_url // // All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // import * as windowStateActions from './windowStateActions'; describe('Window state actions', () => { test('rememberTheme action', () => { expect(windowStateActions.rememberTheme('light')).toEqual({ type: windowStateActions.REMEMBER_THEME, payload: { theme: 'light', }, }); }); test('rememberBounds action', () => { const boundsState = { displayId: 123, top: 0, left: 0, width: 300, height: 300, }; expect(windowStateActions.rememberBounds(boundsState)).toEqual({ type: windowStateActions.REMEMBER_BOUNDS, payload: boundsState, }); }); test('rememberZoomLevel action', () => { const zoomState = { zoomLevel: 200 }; expect(windowStateActions.rememberZoomLevel(zoomState)).toEqual({ type: windowStateActions.REMEMBER_ZOOM_LEVEL, payload: zoomState, }); }); test('setAvailableThemes action', () => { const themes = [ { name: 'light', href: './light.css' }, { name: 'dark', href: './dark.css' }, ]; expect(windowStateActions.setAvailableThemes(themes)).toEqual({ type: windowStateActions.SET_AVAILABLE_THEMES, payload: { availableThemes: themes }, }); }); }); ```
/content/code_sandbox/packages/app/shared/src/state/actions/windowStateActions.spec.ts
xml
2016-11-11T23:15:09
2024-08-16T12:45:29
BotFramework-Emulator
microsoft/BotFramework-Emulator
1,803
553
```xml /// /// /// /// path_to_url /// /// Unless required by applicable law or agreed to in writing, software /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// import config from 'config'; import { _logger } from '../config/logger'; import { JsInvokeMessageProcessor } from '../api/jsInvokeMessageProcessor' import { IQueue } from './queue.models'; import { CreateQueueOptions, ProcessErrorArgs, ServiceBusAdministrationClient, ServiceBusClient, ServiceBusReceivedMessage, ServiceBusReceiver, ServiceBusSender } from '@azure/service-bus'; export class ServiceBusTemplate implements IQueue { private logger = _logger(`serviceBusTemplate`); private queuePrefix: string = config.get('queue_prefix'); private requestTopic: string = this.queuePrefix ? this.queuePrefix + "." + config.get('request_topic') : config.get('request_topic'); private namespaceName = config.get('service_bus.namespace_name'); private sasKeyName = config.get('service_bus.sas_key_name'); private sasKey = config.get('service_bus.sas_key'); private queueProperties: string = config.get('service_bus.queue_properties'); private sbClient: ServiceBusClient; private serviceBusService: ServiceBusAdministrationClient; private queueOptions: CreateQueueOptions = {}; private queues: string[] = []; private receiver: ServiceBusReceiver; private senderMap = new Map<string, ServiceBusSender>(); name = 'Azure Service Bus'; constructor() { } async init() { const connectionString = `Endpoint=sb://${this.namespaceName}.servicebus.windows.net/;SharedAccessKeyName=${this.sasKeyName};SharedAccessKey=${this.sasKey}`; this.sbClient = new ServiceBusClient(connectionString) this.serviceBusService = new ServiceBusAdministrationClient(connectionString); this.parseQueueProperties(); const listQueues = await this.serviceBusService.listQueues(); for await (const queue of listQueues) { this.queues.push(queue.name); } if (!this.queues.includes(this.requestTopic)) { await this.createQueueIfNotExist(this.requestTopic); this.queues.push(this.requestTopic); } this.receiver = this.sbClient.createReceiver(this.requestTopic, {receiveMode: 'peekLock'}); const messageProcessor = new JsInvokeMessageProcessor(this); const messageHandler = async (message: ServiceBusReceivedMessage) => { if (message) { messageProcessor.onJsInvokeMessage(message.body); await this.receiver.completeMessage(message); } }; const errorHandler = async (error: ProcessErrorArgs) => { this.logger.error('Failed to receive message from queue.', error); }; this.receiver.subscribe({processMessage: messageHandler, processError: errorHandler}) } async send(responseTopic: string, msgKey: string, rawResponse: Buffer, headers: any): Promise<any> { if (!this.queues.includes(this.requestTopic)) { await this.createQueueIfNotExist(this.requestTopic); this.queues.push(this.requestTopic); } let customSender = this.senderMap.get(responseTopic); if (!customSender) { customSender = this.sbClient.createSender(responseTopic); this.senderMap.set(responseTopic, customSender); } let data = { key: msgKey, data: [...rawResponse], headers: headers }; return customSender.sendMessages({body: data}); } private parseQueueProperties() { let properties: { [n: string]: string } = {}; const props = this.queueProperties.split(';'); props.forEach(p => { const delimiterPosition = p.indexOf(':'); properties[p.substring(0, delimiterPosition)] = p.substring(delimiterPosition + 1); }); this.queueOptions = { requiresDuplicateDetection: false, maxSizeInMegabytes: Number(properties['maxSizeInMb']), defaultMessageTimeToLive: `PT${properties['messageTimeToLiveInSec']}S`, lockDuration: `PT${properties['lockDurationInSec']}S` }; } private async createQueueIfNotExist(topic: string) { try { await this.serviceBusService.createQueue(topic, this.queueOptions) } catch (err: any) { if (err && err.code !== "MessageEntityAlreadyExistsError") { throw new Error(err); } } } async destroy() { this.logger.info('Stopping Azure Service Bus resources...') if (this.receiver) { this.logger.info('Stopping Service Bus Receiver...'); try { const _receiver = this.receiver; // @ts-ignore delete this.receiver; await _receiver.close(); this.logger.info('Service Bus Receiver stopped.'); } catch (e) { this.logger.info('Service Bus Receiver stop error.'); } } this.logger.info('Stopping Service Bus Senders...'); const senders: Promise<void>[] = []; this.senderMap.forEach((sender) => { senders.push(sender.close()); }); this.senderMap.clear(); try { await Promise.all(senders); this.logger.info('Service Bus Senders stopped.'); } catch (e) { this.logger.info('Service Bus Senders stop error.'); } if (this.sbClient) { this.logger.info('Stopping Service Bus Client...'); try { const _sbClient = this.sbClient; // @ts-ignore delete this.sbClient; await _sbClient.close(); this.logger.info('Service Bus Client stopped.'); } catch (e) { this.logger.info('Service Bus Client stop error.'); } } this.logger.info('Azure Service Bus resources stopped.') } } ```
/content/code_sandbox/msa/js-executor/queue/serviceBusTemplate.ts
xml
2016-12-01T09:33:30
2024-08-16T19:58:25
thingsboard
thingsboard/thingsboard
16,820
1,212
```xml /* * Squidex Headless CMS * * @license */ /* eslint-disable @angular-eslint/component-selector */ import { booleanAttribute, ChangeDetectionStrategy, Component, EventEmitter, Input, numberAttribute, Output } from '@angular/core'; import { RouterLink } from '@angular/router'; import { ConfirmClickDirective, ContentDto, ContentListCellDirective, ContentListFieldComponent, ContentValueComponent, getContentValue, LanguageDto, META_FIELDS, TooltipDirective, TranslatePipe } from '@app/shared'; @Component({ standalone: true, selector: '[sqxReferenceItem][language][languages]', styleUrls: ['./reference-item.component.scss'], templateUrl: './reference-item.component.html', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ ConfirmClickDirective, ContentListCellDirective, ContentListFieldComponent, ContentValueComponent, RouterLink, TooltipDirective, TranslatePipe, ], }) export class ReferenceItemComponent { public readonly metaFields = META_FIELDS; @Output() public delete = new EventEmitter(); @Output() public clone = new EventEmitter(); @Input() public language!: LanguageDto; @Input() public languages!: ReadonlyArray<LanguageDto>; @Input({ transform: booleanAttribute }) public canRemove?: boolean | null = true; @Input({ transform: booleanAttribute }) public isCompact?: boolean | null; @Input({ transform: booleanAttribute }) public isDisabled?: boolean | null; @Input({ transform: booleanAttribute }) public validations?: { [id: string]: boolean }; @Input({ transform: booleanAttribute }) public validityVisible?: boolean | null; @Input({ transform: numberAttribute }) public columns = 0; @Input('sqxReferenceItem') public content!: ContentDto; public values: ReadonlyArray<any> = []; public get isValid() { return !this.validations ? undefined : this.validations[this.content.id]; } public ngOnChanges() { const values = []; for (let i = 0; i < this.columns; i++) { const field = this.content.referenceFields[i]; if (field) { const { formatted } = getContentValue(this.content, this.language, field); values.push(formatted); } else { values.push(''); } } this.values = values; } } ```
/content/code_sandbox/frontend/src/app/features/content/shared/references/reference-item.component.ts
xml
2016-08-29T05:53:40
2024-08-16T17:39:38
squidex
Squidex/squidex
2,222
502
```xml // See LICENSE.txt for license information. import React, {useCallback} from 'react'; import {useIntl} from 'react-intl'; import {Keyboard, type StyleProp, StyleSheet, type ViewStyle} from 'react-native'; import ProfilePicture from '@components/profile_picture'; import TouchableWithFeedback from '@components/touchable_with_feedback'; import {Screens} from '@constants'; import {openAsBottomSheet} from '@screens/navigation'; import type UserModel from '@typings/database/models/servers/user'; type Props = { channelId: string; containerStyle?: StyleProp<ViewStyle>; size?: number; showStatus?: boolean; theme: Theme; user: UserModel; } const styles = StyleSheet.create({ profile: { height: 67, marginBottom: 12, marginRight: 12, }, }); const Member = ({channelId, containerStyle, size = 72, showStatus = true, theme, user}: Props) => { const intl = useIntl(); const onPress = useCallback(() => { const screen = Screens.USER_PROFILE; const title = intl.formatMessage({id: 'mobile.routes.user_profile', defaultMessage: 'Profile'}); const closeButtonId = 'close-user-profile'; const props = {closeButtonId, userId: user.id, channelId, location: Screens.CHANNEL}; Keyboard.dismiss(); openAsBottomSheet({screen, title, theme, closeButtonId, props}); }, [theme, intl.locale]); return ( <TouchableWithFeedback onPress={onPress} style={[styles.profile, containerStyle]} type='opacity' > <ProfilePicture author={user} size={size} iconSize={48} showStatus={showStatus} statusSize={24} testID={`channel_intro.${user.id}.profile_picture`} /> </TouchableWithFeedback> ); }; export default Member; ```
/content/code_sandbox/app/screens/channel/channel_post_list/intro/direct_channel/member/member.tsx
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
402
```xml import { PartialStrykerOptions } from '@stryker-mutator/api/core'; import { Immutable } from '@stryker-mutator/util'; import { CustomInitializer, CustomInitializerConfiguration } from './custom-initializer.js'; const guideUrl = 'path_to_url /** * More information can be found in the Stryker handbook: * path_to_url */ export class VueJsInitializer implements CustomInitializer { public readonly name = 'vue'; private readonly vitestConf: Immutable<PartialStrykerOptions> = { testRunner: 'vitest', reporters: ['progress', 'clear-text', 'html'], }; public createConfig(): Promise<CustomInitializerConfiguration> { return Promise.resolve({ config: this.vitestConf, dependencies: ['@stryker-mutator/vitest-runner'], guideUrl, }); } } ```
/content/code_sandbox/packages/core/src/initializer/custom-initializers/vue-js-initializer.ts
xml
2016-02-12T13:14:28
2024-08-15T18:38:25
stryker-js
stryker-mutator/stryker-js
2,561
182
```xml <menu xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" tools:context="com.journaldev.androidarsceneform.MainActivity"> <item android:id="@+id/action_settings" android:orderInCategory="100" android:title="@string/action_settings" app:showAsAction="never" /> </menu> ```
/content/code_sandbox/Android/AndroidArSceneform/app/src/main/res/menu/menu_main.xml
xml
2016-05-02T05:43:21
2024-08-16T06:51:39
journaldev
WebJournal/journaldev
1,314
87
```xml import { CloudSong } from "@signal-app/api" import { makeObservable, observable } from "mobx" export class CommunitySongStore { songs: CloudSong[] = [] constructor() { makeObservable(this, { songs: observable, }) } } ```
/content/code_sandbox/packages/community/src/stores/CommunitySongStore.ts
xml
2016-03-06T15:19:53
2024-08-15T14:27:10
signal
ryohey/signal
1,238
57
```xml /// <reference path="../../localtypings/pxtpackage.d.ts" /> import * as Blockly from "blockly"; // Validates that variables are created and used within the workspace. // Name is optional. If undefined or empty, all variable names are permitted. // Returns the definition blocks for variables that passed the check. export function validateVariableUsage({ usedBlocks, count, name, }: { usedBlocks: Blockly.Block[]; count: number; name?: String; }): { passingVarDefinitions: Map<string, Blockly.Block[]>; passed: boolean; } { const varDefinitionBlocks: Map<string, Blockly.Block[]> = new Map(); const usedVars: Set<string> = new Set(); for (const block of usedBlocks) { if (!block.isEnabled()) { continue; } const varsUsed = block.getVarModels(); for (const varModel of varsUsed ?? []) { const varName = varModel.name; if (!name || varName === name) { if (block.type === "variables_set" || block.type === "variables_change") { // Variable created if (!varDefinitionBlocks.has(varName)) { varDefinitionBlocks.set(varName, []); } varDefinitionBlocks.get(varName).push(block); } else { // Variable used usedVars.add(varName); } } } } // Var passes check if it is both used and defined. // We return the definition blocks to allow for recursively checking how the var was set. const passingVarDefinitions = new Map<string, Blockly.Block[]>(); for (const [varName, definitionBlocks] of varDefinitionBlocks) { if (usedVars.has(varName)) { passingVarDefinitions.set(varName, definitionBlocks); } } return { passingVarDefinitions, passed: passingVarDefinitions.size >= count }; } ```
/content/code_sandbox/pxteditor/code-validation/validateVariableUsage.ts
xml
2016-01-24T19:35:52
2024-08-16T16:39:39
pxt
microsoft/pxt
2,069
398
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <resources> <string name="mtrl_picker_range_header_title"> </string> <string name="mtrl_picker_date_header_title"> </string> <string name="mtrl_picker_range_header_unselected"> </string> <string name="mtrl_picker_range_header_only_start_selected">%1$s </string> <string name="mtrl_picker_range_header_only_end_selected"> %1$s</string> <string name="mtrl_picker_range_header_selected">%1$s %2$s</string> <string name="mtrl_picker_date_header_unselected"> </string> <string name="mtrl_picker_date_header_selected">%1$s</string> <string name="mtrl_picker_confirm">OK</string> <string name="mtrl_picker_cancel"></string> <string name="mtrl_picker_text_input_date_hint"></string> <string name="mtrl_picker_text_input_date_range_start_hint"> </string> <string name="mtrl_picker_text_input_date_range_end_hint"> </string> <string name="mtrl_picker_text_input_year_abbr"></string> <string name="mtrl_picker_text_input_month_abbr"></string> <string name="mtrl_picker_text_input_day_abbr"></string> <string name="mtrl_picker_save"></string> <string name="mtrl_picker_invalid_range"> .</string> <string name="mtrl_picker_out_of_range"> : %1$s</string> <string name="mtrl_picker_invalid_format"> .</string> <string name="mtrl_picker_invalid_format_use">: %1$s</string> <string name="mtrl_picker_invalid_format_example">: %1$s</string> <string name="mtrl_picker_toggle_to_calendar_input_mode"> </string> <string name="mtrl_picker_toggle_to_text_input_mode"> </string> <string name="mtrl_picker_a11y_prev_month"> </string> <string name="mtrl_picker_a11y_next_month"> </string> <string name="mtrl_picker_toggle_to_year_selection"> </string> <string name="mtrl_picker_toggle_to_day_selection"> </string> <string name="mtrl_picker_day_of_week_column_header">%1$s</string> <string name="mtrl_picker_announce_current_selection"> : %1$s</string> <string name="mtrl_picker_announce_current_range_selection"> : %1$s : %2$s</string> <string name="mtrl_picker_announce_current_selection_none"></string> <string name="mtrl_picker_navigate_to_year_description"> %1$d .</string> <string name="mtrl_picker_navigate_to_current_year_description"> %1$d</string> <string name="mtrl_picker_today_description"> %1$s</string> <string name="mtrl_picker_start_date_description"> : %1$s</string> <string name="mtrl_picker_end_date_description"> : %1$s</string> </resources> ```
/content/code_sandbox/lib/java/com/google/android/material/datepicker/res/values-bg/strings.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
725
```xml /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import * as React from "react"; import { Intent } from "@blueprintjs/core"; import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { Column, ColumnHeaderCell, EditableCell2, EditableName, Table2 } from "@blueprintjs/table"; export interface TableEditableExampleState { columnNames?: string[]; sparseCellData?: { [key: string]: string }; sparseCellIntent?: { [key: string]: Intent }; sparseColumnIntents?: Intent[]; } export class TableEditableExample extends React.PureComponent<ExampleProps, TableEditableExampleState> { public static dataKey = (rowIndex: number, columnIndex: number) => { return `${rowIndex}-${columnIndex}`; }; public state: TableEditableExampleState = { columnNames: ["Please", "Rename", "Me"], sparseCellData: { "1-1": "editable", "3-1": "validation 123", }, sparseCellIntent: { "3-1": Intent.DANGER, }, sparseColumnIntents: [], }; public render() { const columns = this.state.columnNames.map((_: string, index: number) => { return ( <Column key={index} cellRenderer={this.renderCell} columnHeaderCellRenderer={this.renderColumnHeader} /> ); }); return ( <Example options={false} showOptionsBelowExample={true} {...this.props}> <Table2 numRows={7}>{columns}</Table2> </Example> ); } public renderCell = (rowIndex: number, columnIndex: number) => { const dataKey = TableEditableExample.dataKey(rowIndex, columnIndex); const value = this.state.sparseCellData[dataKey]; return ( <EditableCell2 value={value == null ? "" : value} intent={this.state.sparseCellIntent[dataKey]} onCancel={this.cellValidator(rowIndex, columnIndex)} onChange={this.cellValidator(rowIndex, columnIndex)} onConfirm={this.cellSetter(rowIndex, columnIndex)} /> ); }; public renderColumnHeader = (columnIndex: number) => { const nameRenderer = (name: string) => { return ( <EditableName name={name} intent={this.state.sparseColumnIntents[columnIndex]} onChange={this.nameValidator(columnIndex)} onCancel={this.nameValidator(columnIndex)} onConfirm={this.nameSetter(columnIndex)} /> ); }; return <ColumnHeaderCell name={this.state.columnNames[columnIndex]} nameRenderer={nameRenderer} />; }; private isValidValue(value: string) { return /^[a-zA-Z]*$/.test(value); } private nameValidator = (index: number) => { return (name: string) => { const intent = this.isValidValue(name) ? null : Intent.DANGER; this.setArrayState("sparseColumnIntents", index, intent); this.setArrayState("columnNames", index, name); }; }; private nameSetter = (index: number) => { return (name: string) => { this.setArrayState("columnNames", index, name); }; }; private cellValidator = (rowIndex: number, columnIndex: number) => { const dataKey = TableEditableExample.dataKey(rowIndex, columnIndex); return (value: string) => { const intent = this.isValidValue(value) ? null : Intent.DANGER; this.setSparseState("sparseCellIntent", dataKey, intent); this.setSparseState("sparseCellData", dataKey, value); }; }; private cellSetter = (rowIndex: number, columnIndex: number) => { const dataKey = TableEditableExample.dataKey(rowIndex, columnIndex); return (value: string) => { const intent = this.isValidValue(value) ? null : Intent.DANGER; this.setSparseState("sparseCellData", dataKey, value); this.setSparseState("sparseCellIntent", dataKey, intent); }; }; private setArrayState<T>(key: string, index: number, value: T) { const values = (this.state as any)[key].slice() as T[]; values[index] = value; this.setState({ [key]: values }); } private setSparseState<T>(stateKey: string, dataKey: string, value: T) { const stateData = (this.state as any)[stateKey] as { [key: string]: T }; const values = { ...stateData, [dataKey]: value }; this.setState({ [stateKey]: values }); } } ```
/content/code_sandbox/packages/docs-app/src/examples/table-examples/tableEditableExample.tsx
xml
2016-10-25T21:17:50
2024-08-16T15:14:48
blueprint
palantir/blueprint
20,593
1,032
```xml import { ReactNode } from 'react'; export interface Props { value: string; icon?: ReactNode; color: string; } // Helper function used as workaround to add opacity to the background color function setOpacity(hex: string, alpha: number) { return `${hex}${Math.floor(alpha * 255) .toString(16) .padStart(2, '0')}`; } export function Badge({ icon, value, color }: Props) { return ( <span className="badge inline-flex items-center" style={{ backgroundColor: setOpacity(color, 0.1), color, padding: '5px 10px', }} > {icon} {value} </span> ); } ```
/content/code_sandbox/app/react/portainer/settings/AuthenticationView/InternalAuth/Badge.tsx
xml
2016-05-19T20:15:28
2024-08-16T19:15:14
portainer
portainer/portainer
30,083
163
```xml <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:id="@+id/relativeLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000" tools:context=".MainActivity"> <Button android:id="@+id/button_start" android:layout_width="wrap_content" android:layout_height="50dp" android:gravity="center" android:text="Start" app:layout_constraintBaseline_toBaselineOf="@+id/button_stop" app:layout_constraintEnd_toStartOf="@+id/button_stop" app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintStart_toStartOf="parent" /> <Button android:id="@+id/button_stop" android:layout_width="wrap_content" android:layout_height="50dp" android:gravity="center" android:text="Stop" app:layout_constraintEnd_toStartOf="@+id/button_call" app:layout_constraintStart_toEndOf="@+id/button_start" app:layout_constraintTop_toTopOf="parent" /> <Button android:id="@+id/button_call" android:layout_width="wrap_content" android:layout_height="50dp" android:gravity="center" android:text="Call" app:layout_constraintBaseline_toBaselineOf="@+id/button_stop" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/button_stop" /> <TextView android:id="@+id/text_info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:text="Library not started" android:textColor="@color/white" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/button_stop" /> <RelativeLayout android:id="@+id/video_layout" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_marginLeft="8dp" android:layout_marginTop="8dp" android:layout_marginRight="8dp" android:layout_marginBottom="16dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/text_info"> <SurfaceView android:id="@+id/svRemoteVideo" android:layout_width="10dp" android:layout_height="20dp" android:layout_marginLeft="8dp" android:layout_marginTop="8dp" /> <SurfaceView android:id="@+id/svLocalVideo" android:layout_width="10dp" android:layout_height="20dp" android:layout_marginLeft="300dp" android:layout_marginTop="400dp" /> </RelativeLayout> </android.support.constraint.ConstraintLayout> ```
/content/code_sandbox/pjsip-apps/src/swig/java/android/app-kotlin/src/main/res/layout/activity_main.xml
xml
2016-01-24T05:00:33
2024-08-16T03:31:21
pjproject
pjsip/pjproject
1,960
703
```xml /** * @license * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // Import to register the shared object types. import "#src/shared_disjoint_sets.js"; import "#src/uint64_map.js"; import "#src/uint64_set.js"; import type { ChunkRequester } from "#src/chunk_manager/backend.js"; import { ChunkSource } from "#src/chunk_manager/backend.js"; import type { RenderLayerTransformOrError } from "#src/render_coordinate_transform.js"; import type { IndexedSegmentProperty, VisibleSegmentsState, } from "#src/segmentation_display_state/base.js"; import { onTemporaryVisibleSegmentsStateChanged, onVisibleSegmentsStateChanged, VISIBLE_SEGMENTS_STATE_PROPERTIES, } from "#src/segmentation_display_state/base.js"; import type { SharedDisjointUint64Sets } from "#src/shared_disjoint_sets.js"; import type { SharedWatchableValue } from "#src/shared_watchable_value.js"; import type { Uint64OrderedSet } from "#src/uint64_ordered_set.js"; import type { Uint64Set } from "#src/uint64_set.js"; import type { AnyConstructor } from "#src/util/mixin.js"; import type { RPC } from "#src/worker_rpc.js"; export function receiveVisibleSegmentsState( rpc: RPC, options: any, target: VisibleSegmentsState = {} as VisibleSegmentsState, ): VisibleSegmentsState { // No need to increase the reference count of these properties since our owner will hold a // reference to their owners. for (const property of VISIBLE_SEGMENTS_STATE_PROPERTIES) { target[property] = rpc.get(options[property]); } return target; } export const withSegmentationLayerBackendState = < TBase extends AnyConstructor<ChunkRequester>, >( Base: TBase, ) => class SegmentationLayerState extends Base implements VisibleSegmentsState { visibleSegments: Uint64Set; selectedSegments: Uint64OrderedSet; segmentEquivalences: SharedDisjointUint64Sets; temporaryVisibleSegments: Uint64Set; temporarySegmentEquivalences: SharedDisjointUint64Sets; useTemporaryVisibleSegments: SharedWatchableValue<boolean>; useTemporarySegmentEquivalences: SharedWatchableValue<boolean>; transform: SharedWatchableValue<RenderLayerTransformOrError>; renderScaleTarget: SharedWatchableValue<number>; constructor(...args: any[]) { const [rpc, options] = args as [RPC, any]; super(rpc, options); receiveVisibleSegmentsState(rpc, options, this); this.transform = rpc.get(options.transform); this.renderScaleTarget = rpc.get(options.renderScaleTarget); const scheduleUpdateChunkPriorities = () => { this.chunkManager.scheduleUpdateChunkPriorities(); }; onTemporaryVisibleSegmentsStateChanged( this, this, scheduleUpdateChunkPriorities, ); onVisibleSegmentsStateChanged(this, this, scheduleUpdateChunkPriorities); this.registerDisposer( this.transform.changed.add(scheduleUpdateChunkPriorities), ); this.registerDisposer( this.renderScaleTarget.changed.add(scheduleUpdateChunkPriorities), ); } }; export class IndexedSegmentPropertySourceBackend extends ChunkSource { properties: readonly Readonly<IndexedSegmentProperty>[]; constructor(rpc: RPC, options: any) { super(rpc, options); this.properties = options.properties; } } ```
/content/code_sandbox/src/segmentation_display_state/backend.ts
xml
2016-05-27T02:37:25
2024-08-16T07:24:25
neuroglancer
google/neuroglancer
1,045
741
```xml // module import { IMultilingualState, initialState } from '../states/multilingual.state'; import { Actions, ActionTypes } from '../actions/multilingual.action'; export function reducer( state: IMultilingualState = initialState, action: Actions ): IMultilingualState { switch (action.type) { case ActionTypes.LANG_CHANGED: if (state.lang !== action.payload) return (<any>Object).assign({}, state, { lang: action.payload }); return state; default: return state; } } ```
/content/code_sandbox/src/client/app/modules/i18n/reducers/multilingual.reducer.ts
xml
2016-01-27T07:12:46
2024-08-15T11:32:04
angular-seed-advanced
NathanWalker/angular-seed-advanced
2,261
117
```xml import {computed} from "vue"; import {has} from "lodash"; export const formFieldProps = { field: { type: Object, required: false, default: () => { return undefined; } }, modelValue: { type: [String, Number, Boolean, Array], required: false, default: () => { return undefined; } }, required: { type: Boolean, default: false } } export function useFormField(props, emit) { const isVuelidateField = computed(() => { return props.field !== undefined; }); const model = computed({ get() { return (isVuelidateField.value) ? props.field.$model : props.modelValue; }, set(newValue) { if (isVuelidateField.value) { props.field.$model = newValue; } else { emit('update:modelValue', newValue); } } }); const fieldClass = computed(() => { if (!isVuelidateField.value) { return null; } if (!props.field.$dirty) { return null; } return props.field.$error ? 'is-invalid' : 'is-valid'; }); const isRequired = computed(() => { if (props.required) { return props.required; } return (isVuelidateField.value) ? has(props.field, 'required') : false; }); return { isVuelidateField, model, fieldClass, isRequired } } ```
/content/code_sandbox/frontend/components/Form/useFormField.ts
xml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
353
```xml import { Component, Input, HostBinding, ElementRef, Output, KeyValueDiffers, KeyValueDiffer, EventEmitter, HostListener, ChangeDetectionStrategy, ChangeDetectorRef, DoCheck, SkipSelf } from '@angular/core'; import { TreeStatus } from './body-cell.component'; import { columnsByPin, columnGroupWidths, columnsByPinArr } from '../../utils/column'; import { Keys } from '../../utils/keys'; import { ScrollbarHelper } from '../../services/scrollbar-helper.service'; import { translateXY } from '../../utils/translate'; @Component({ selector: 'datatable-body-row', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <div *ngFor="let colGroup of _columnsByPin; let i = index; trackBy: trackByGroups" class="datatable-row-{{ colGroup.type }} datatable-row-group" [ngStyle]="_groupStyles[colGroup.type]" > <datatable-body-cell role="cell" *ngFor="let column of colGroup.columns; let ii = index; trackBy: columnTrackingFn" tabindex="-1" [row]="row" [group]="group" [expanded]="expanded" [isSelected]="isSelected" [rowIndex]="rowIndex" [column]="column" [rowHeight]="rowHeight" [displayCheck]="displayCheck" [treeStatus]="treeStatus" (activate)="onActivate($event, ii)" (treeAction)="onTreeAction()" > </datatable-body-cell> </div> ` }) export class DataTableBodyRowComponent implements DoCheck { @Input() set columns(val: any[]) { this._columns = val; this.recalculateColumns(val); this.buildStylesByGroup(); } get columns(): any[] { return this._columns; } @Input() set innerWidth(val: number) { if (this._columns) { const colByPin = columnsByPin(this._columns); this._columnGroupWidths = columnGroupWidths(colByPin, this._columns); } this._innerWidth = val; this.recalculateColumns(); this.buildStylesByGroup(); } get innerWidth(): number { return this._innerWidth; } @Input() expanded: boolean; @Input() rowClass: any; @Input() row: any; @Input() group: any; @Input() isSelected: boolean; @Input() rowIndex: number; @Input() displayCheck: any; @Input() treeStatus: TreeStatus = 'collapsed'; @Input() set offsetX(val: number) { this._offsetX = val; this.buildStylesByGroup(); } get offsetX() { return this._offsetX; } @HostBinding('class') get cssClass() { let cls = 'datatable-body-row'; if (this.isSelected) { cls += ' active'; } if (this.rowIndex % 2 !== 0) { cls += ' datatable-row-odd'; } if (this.rowIndex % 2 === 0) { cls += ' datatable-row-even'; } if (this.rowClass) { const res = this.rowClass(this.row); if (typeof res === 'string') { cls += ` ${res}`; } else if (typeof res === 'object') { const keys = Object.keys(res); for (const k of keys) { if (res[k] === true) { cls += ` ${k}`; } } } } return cls; } @HostBinding('style.height.px') @Input() rowHeight: number; @HostBinding('style.width.px') get columnsTotalWidths(): string { return this._columnGroupWidths.total; } @Output() activate: EventEmitter<any> = new EventEmitter(); @Output() treeAction: EventEmitter<any> = new EventEmitter(); _element: any; _columnGroupWidths: any; _columnsByPin: any; _offsetX: number; _columns: any[]; _innerWidth: number; _groupStyles: { [prop: string]: {} } = { left: {}, center: {}, right: {} }; private _rowDiffer: KeyValueDiffer<{}, {}>; constructor( private differs: KeyValueDiffers, @SkipSelf() private scrollbarHelper: ScrollbarHelper, private cd: ChangeDetectorRef, element: ElementRef ) { this._element = element.nativeElement; this._rowDiffer = differs.find({}).create(); } ngDoCheck(): void { if (this._rowDiffer.diff(this.row)) { this.cd.markForCheck(); } } trackByGroups(index: number, colGroup: any): any { return colGroup.type; } columnTrackingFn(index: number, column: any): any { return column.$$id; } buildStylesByGroup() { this._groupStyles.left = this.calcStylesByGroup('left'); this._groupStyles.center = this.calcStylesByGroup('center'); this._groupStyles.right = this.calcStylesByGroup('right'); this.cd.markForCheck(); } calcStylesByGroup(group: string) { const widths = this._columnGroupWidths; const offsetX = this.offsetX; const styles = { width: `${widths[group]}px` }; if (group === 'left') { translateXY(styles, offsetX, 0); } else if (group === 'right') { const bodyWidth = parseInt(this.innerWidth + '', 0); const totalDiff = widths.total - bodyWidth; const offsetDiff = totalDiff - offsetX; const offset = (offsetDiff + this.scrollbarHelper.width) * -1; translateXY(styles, offset, 0); } return styles; } onActivate(event: any, index: number): void { event.cellIndex = index; event.rowElement = this._element; this.activate.emit(event); } @HostListener('keydown', ['$event']) onKeyDown(event: KeyboardEvent): void { const keyCode = event.keyCode; const isTargetRow = event.target === this._element; const isAction = keyCode === Keys.return || keyCode === Keys.down || keyCode === Keys.up || keyCode === Keys.left || keyCode === Keys.right; if (isAction && isTargetRow) { event.preventDefault(); event.stopPropagation(); this.activate.emit({ type: 'keydown', event, row: this.row, rowElement: this._element }); } } @HostListener('mouseenter', ['$event']) onMouseenter(event: any): void { this.activate.emit({ type: 'mouseenter', event, row: this.row, rowElement: this._element }); } recalculateColumns(val: any[] = this.columns): void { this._columns = val; const colsByPin = columnsByPin(this._columns); this._columnsByPin = columnsByPinArr(this._columns); this._columnGroupWidths = columnGroupWidths(colsByPin, this._columns); } onTreeAction() { this.treeAction.emit(); } } ```
/content/code_sandbox/projects/swimlane/ngx-datatable/src/lib/components/body/body-row.component.ts
xml
2016-05-31T19:25:47
2024-08-06T15:02:47
ngx-datatable
swimlane/ngx-datatable
4,624
1,605
```xml import React from "react"; export const Logo: React.FC = () => { return ( <svg width="123" height="29" viewBox="0 0 123 29" fill="none" xmlns="path_to_url" > <path d="M34.7441 22.9997H37.2741V16.3297H41.5981C44.7031 16.3297 46.9801 14.9037 46.9801 11.4537C46.9801 8.00369 44.7031 6.55469 41.5981 6.55469H34.7441V22.9997ZM37.2741 14.1447V8.73969H41.4831C43.3921 8.73969 44.3581 9.59069 44.3581 11.4537C44.3581 13.2937 43.3921 14.1447 41.4831 14.1447H37.2741Z" fill="black" /> <path d="M51.3652 23.3217C53.2742 23.3217 54.6082 22.5627 55.3672 21.3437H55.4132C55.5512 22.6777 56.1492 23.1147 57.2762 23.1147C57.6442 23.1147 58.0352 23.0687 58.4262 22.9767V21.5967C58.2882 21.6197 58.2192 21.6197 58.1502 21.6197C57.7132 21.6197 57.5982 21.1827 57.5982 20.3317V14.9497C57.5982 11.9137 55.6662 10.9017 53.2512 10.9017C49.6632 10.9017 48.1912 12.6727 48.0762 14.9267H50.3762C50.4912 13.3627 51.1122 12.7187 53.1592 12.7187C54.8842 12.7187 55.3902 13.4317 55.3902 14.2827C55.3902 15.4327 54.2632 15.6627 52.4232 16.0077C49.5022 16.5597 47.5242 17.3417 47.5242 19.9637C47.5242 21.9647 49.0192 23.3217 51.3652 23.3217ZM49.8702 19.8027C49.8702 18.5837 50.7442 18.0087 52.8142 17.5947C54.0102 17.3417 55.0222 17.0887 55.3902 16.7437V18.4227C55.3902 20.4697 53.8952 21.5047 51.8712 21.5047C50.4682 21.5047 49.8702 20.9067 49.8702 19.8027Z" fill="black" /> <path d="M61.4996 27.1167C63.3166 27.1167 64.4436 26.1737 65.5706 23.2757L70.2166 11.2697H67.8476L64.6276 20.2397H64.5816L61.1546 11.2697H58.6936L63.4316 22.8847C62.9716 24.7247 61.9136 25.1847 61.0166 25.1847C60.6486 25.1847 60.4416 25.1617 60.0506 25.1157V26.9557C60.6486 27.0707 60.9936 27.1167 61.4996 27.1167Z" fill="black" /> <path d="M71.5939 22.9997H73.8479V6.55469H71.5939V22.9997Z" fill="black" /> <path d="M81.6221 23.3447C85.2791 23.3447 87.4871 20.7917 87.4871 17.1117C87.4871 13.4547 85.2791 10.9017 81.6451 10.9017C77.9651 10.9017 75.7571 13.4777 75.7571 17.1347C75.7571 20.8147 77.9651 23.3447 81.6221 23.3447ZM78.1031 17.1347C78.1031 14.6737 79.2071 12.7877 81.6451 12.7877C84.0371 12.7877 85.1411 14.6737 85.1411 17.1347C85.1411 19.5727 84.0371 21.4817 81.6451 21.4817C79.2071 21.4817 78.1031 19.5727 78.1031 17.1347Z" fill="black" /> <path d="M92.6484 23.3217C94.5574 23.3217 95.8914 22.5627 96.6504 21.3437H96.6964C96.8344 22.6777 97.4324 23.1147 98.5594 23.1147C98.9274 23.1147 99.3184 23.0687 99.7094 22.9767V21.5967C99.5714 21.6197 99.5024 21.6197 99.4334 21.6197C98.9964 21.6197 98.8814 21.1827 98.8814 20.3317V14.9497C98.8814 11.9137 96.9494 10.9017 94.5344 10.9017C90.9464 10.9017 89.4744 12.6727 89.3594 14.9267H91.6594C91.7744 13.3627 92.3954 12.7187 94.4424 12.7187C96.1674 12.7187 96.6734 13.4317 96.6734 14.2827C96.6734 15.4327 95.5464 15.6627 93.7064 16.0077C90.7854 16.5597 88.8074 17.3417 88.8074 19.9637C88.8074 21.9647 90.3024 23.3217 92.6484 23.3217ZM91.1534 19.8027C91.1534 18.5837 92.0274 18.0087 94.0974 17.5947C95.2934 17.3417 96.3054 17.0887 96.6734 16.7437V18.4227C96.6734 20.4697 95.1784 21.5047 93.1544 21.5047C91.7514 21.5047 91.1534 20.9067 91.1534 19.8027Z" fill="black" /> <path d="M106.181 23.3217C108.021 23.3217 109.148 22.4477 109.792 21.6197H109.838V22.9997H112.092V6.55469H109.838V12.6957H109.792C109.148 11.7757 108.021 10.9247 106.181 10.9247C103.191 10.9247 100.914 13.2707 100.914 17.1347C100.914 20.9987 103.191 23.3217 106.181 23.3217ZM103.26 17.1347C103.26 14.8347 104.341 12.8107 106.549 12.8107C108.573 12.8107 109.815 14.4667 109.815 17.1347C109.815 19.7797 108.573 21.4587 106.549 21.4587C104.341 21.4587 103.26 19.4347 103.26 17.1347Z" fill="black" /> <path d="M12.2464 2.33838L22.2871 8.83812V21.1752L14.7265 25.8854V13.5484L4.67383 7.05725L12.2464 2.33838Z" fill="black" /> <path d="M11.477 25.2017V15.5747L3.90039 20.2936L11.477 25.2017Z" fill="black" /> <path d="M120.442 6.30273C119.086 6.30273 117.998 7.29978 117.998 8.75952C117.998 10.2062 119.086 11.1968 120.442 11.1968C121.791 11.1968 122.879 10.2062 122.879 8.75952C122.879 7.29978 121.791 6.30273 120.442 6.30273ZM120.442 10.7601C119.34 10.7601 118.48 9.95207 118.48 8.75952C118.48 7.54742 119.34 6.73935 120.442 6.73935C121.563 6.73935 122.397 7.54742 122.397 8.75952C122.397 9.95207 121.563 10.7601 120.442 10.7601ZM120.52 8.97457L121.048 9.9651H121.641L121.041 8.86378C121.367 8.72042 121.511 8.45975 121.511 8.17302C121.511 7.49528 121.054 7.36495 120.285 7.36495H119.49V9.9651H120.025V8.97457H120.52ZM120.37 7.78853C120.729 7.78853 120.976 7.86673 120.976 8.17953C120.976 8.43368 120.807 8.56402 120.403 8.56402H120.025V7.78853H120.37Z" fill="black" /> </svg> ); }; ```
/content/code_sandbox/examples/cms-payload/components/Logo/index.tsx
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
2,719
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import layouts = require( './index' ); // TESTS // // The function returns an array of strings... { layouts(); // $ExpectType string[] } // The compiler throws an error if the function is provided any arguments... { layouts( 9 ); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/blas/base/layouts/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
110
```xml import * as React from 'react'; import cx from 'classnames'; import { createSvgIcon } from '../utils/createSvgIcon'; import { iconClassNames } from '../utils/iconClassNames'; export const AppFolderIcon = createSvgIcon({ svg: ({ classes }) => ( <svg role="presentation" focusable="false" viewBox="2 2 16 16" className={classes.svg}> <path className={cx(iconClassNames.outline, classes.outlinePart)} d="M2 4.5C2 3.11929 3.11929 2 4.5 2H15.5C16.8807 2 18 3.11929 18 4.5V15.5C18 16.8807 16.8807 18 15.5 18H4.5C3.11929 18 2 16.8807 2 15.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V15.5C3 16.3284 3.67157 17 4.5 17H15.5C16.3284 17 17 16.3284 17 15.5V4.5C17 3.67157 16.3284 3 15.5 3H4.5ZM5 6C5 5.44772 5.44772 5 6 5H8C8.55228 5 9 5.44772 9 6V8C9 8.55228 8.55228 9 8 9H6C5.44772 9 5 8.55228 5 8V6ZM8 6H6V8H8V6ZM5 12C5 11.4477 5.44772 11 6 11H8C8.55228 11 9 11.4477 9 12V14C9 14.5523 8.55228 15 8 15H6C5.44772 15 5 14.5523 5 14V12ZM8 12H6V14H8V12ZM11 6C11 5.44772 11.4477 5 12 5H14C14.5523 5 15 5.44772 15 6V8C15 8.55228 14.5523 9 14 9H12C11.4477 9 11 8.55228 11 8V6ZM14 6H12V8H14V6ZM11 12C11 11.4477 11.4477 11 12 11H14C14.5523 11 15 11.4477 15 12V14C15 14.5523 14.5523 15 14 15H12C11.4477 15 11 14.5523 11 14V12ZM14 12H12V14H14V12Z" /> <path className={cx(iconClassNames.filled, classes.filledPart)} d="M2 4.5C2 3.11929 3.11929 2 4.5 2H15.5C16.8807 2 18 3.11929 18 4.5V15.5C18 16.8807 16.8807 18 15.5 18H4.5C3.11929 18 2 16.8807 2 15.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V15.5C3 16.3284 3.67157 17 4.5 17H15.5C16.3284 17 17 16.3284 17 15.5V4.5C17 3.67157 16.3284 3 15.5 3H4.5ZM11 12C11 11.4477 11.4477 11 12 11H14C14.5523 11 15 11.4477 15 12V14C15 14.5523 14.5523 15 14 15H12C11.4477 15 11 14.5523 11 14V12ZM11 6C11 5.44772 11.4477 5 12 5H14C14.5523 5 15 5.44772 15 6V8C15 8.55228 14.5523 9 14 9H12C11.4477 9 11 8.55228 11 8V6ZM5 12C5 11.4477 5.44772 11 6 11H8C8.55228 11 9 11.4477 9 12V14C9 14.5523 8.55228 15 8 15H6C5.44772 15 5 14.5523 5 14V12ZM5 6C5 5.44772 5.44772 5 6 5H8C8.55228 5 9 5.44772 9 6V8C9 8.55228 8.55228 9 8 9H6C5.44772 9 5 8.55228 5 8V6Z" /> </svg> ), displayName: 'AppFolderIcon', }); ```
/content/code_sandbox/packages/fluentui/react-icons-northstar/src/components/AppFolderIcon.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
1,295
```xml export { slot, isSlot, // eslint-disable-next-line deprecation/deprecation getSlots, // eslint-disable-next-line deprecation/deprecation getSlotsNext, assertSlots, // eslint-disable-next-line deprecation/deprecation resolveShorthand, isResolvedShorthand, getIntrinsicElementProps, SLOT_ELEMENT_TYPE_SYMBOL, SLOT_RENDER_FUNCTION_SYMBOL, } from './compose/index'; export type { ExtractSlotProps, ComponentProps, ComponentState, ForwardRefComponent, // eslint-disable-next-line deprecation/deprecation ResolveShorthandFunction, // eslint-disable-next-line deprecation/deprecation ResolveShorthandOptions, Slot, // eslint-disable-next-line deprecation/deprecation Slots, SlotClassNames, SlotPropsRecord, SlotRenderFunction, SlotShorthandValue, UnknownSlotProps, SlotComponentType, SlotOptions, InferredElementRefType, EventData, EventHandler, } from './compose/index'; export { IdPrefixProvider, resetIdsForTests, useAnimationFrame, useControllableState, useEventCallback, useFirstMount, useForceUpdate, useId, useIsomorphicLayoutEffect, useMergedRefs, useOnClickOutside, useOnScrollOutside, usePrevious, useScrollbarWidth, useTimeout, } from './hooks/index'; export type { RefObjectFunction, UseControllableStateOptions, UseOnClickOrScrollOutsideOptions } from './hooks/index'; export { canUseDOM, useIsSSR, SSRProvider } from './ssr/index'; export { clamp, // eslint-disable-next-line deprecation/deprecation getNativeElementProps, getPartitionedNativeProps, getRTLSafeKey, mergeCallbacks, isHTMLElement, isInteractiveHTMLElement, omit, createPriorityQueue, } from './utils/index'; export type { DistributiveOmit, UnionToIntersection } from './utils/types'; export type { PriorityQueue } from './utils/priorityQueue'; export { applyTriggerPropsToChildren, getTriggerChild, isFluentTrigger } from './trigger/index'; export type { FluentTriggerComponent, TriggerProps } from './trigger/index'; /** * Event utils */ export type { NativeTouchOrMouseEvent, ReactTouchOrMouseEvent, TouchOrMouseEvent } from './events/index'; export { isTouchEvent, isMouseEvent, getEventClientCoords } from './events/index'; export type { SelectionMode, OnSelectionChangeCallback, OnSelectionChangeData, SelectionItemId, SelectionHookParams, SelectionMethods, } from './selection/index'; export { useSelection } from './selection/index'; export { elementContains, setVirtualParent, getParent } from './virtualParent/index'; ```
/content/code_sandbox/packages/react-components/react-utilities/src/index.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
589
```xml import { Environment, RecordSource } from "relay-runtime"; import sinon from "sinon"; import { waitFor } from "coral-common/common/lib/helpers"; import { parseQuery } from "coral-common/common/lib/utils"; import { CoralContext } from "coral-framework/lib/bootstrap"; import { LOCAL_ID } from "coral-framework/lib/relay"; import { createRelayEnvironment } from "coral-framework/testHelpers"; import { commit } from "./SetCommentIDMutation"; let environment: Environment; const source: RecordSource = new RecordSource(); beforeAll(() => { environment = createRelayEnvironment({ source, }); }); const previousLocation = location.toString(); const previousState = window.history.state; afterEach(() => { // As history will change after the listener triggers, reset this to before. window.history.replaceState(previousState, document.title, previousLocation); }); it("Sets comment id", async () => { const id = "comment1-id"; const context = { window, renderWindow: window, }; await commit(environment, { id }, context as unknown as CoralContext); expect(source.get(LOCAL_ID)!.commentID).toEqual(id); }); it("Should call setCommentID in eventEmitter", async () => { const id = "comment2-id"; const context = { eventEmitter: { emit: sinon.mock().once().withArgs("stream.setCommentID", id), }, window, renderWindow: window, }; await commit(environment, { id }, context as unknown as CoralContext); await waitFor(); expect(source.get(LOCAL_ID)!.commentID).toEqual(id); context.eventEmitter.emit.verify(); }); it("Should call setCommentID in eventEmitter with empty id", async () => { const context = { eventEmitter: { emit: sinon.mock().once().withArgs("stream.setCommentID", ""), }, window, renderWindow: window, }; await commit(environment, { id: null }, context as unknown as CoralContext); await waitFor(); expect(source.get(LOCAL_ID)!.commentID).toEqual(null); expect(parseQuery(location.search).commentID).toBeUndefined(); context.eventEmitter.emit.verify(); }); ```
/content/code_sandbox/client/src/core/client/stream/mutations/SetCommentIDMutation.spec.ts
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
473
```xml <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>StalledIssueTab</class> <widget class="QFrame" name="StalledIssueTab"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>138</width> <height>32</height> </rect> </property> <property name="minimumSize"> <size> <width>0</width> <height>26</height> </size> </property> <property name="maximumSize"> <size> <width>16777215</width> <height>32</height> </size> </property> <property name="cursor"> <cursorShape>PointingHandCursor</cursorShape> </property> <property name="windowTitle"> <string notr="true"/> </property> <property name="styleSheet"> <string notr="true">QFrame[itsOn=true], QFrame[itsHover=true] { border-radius: 12px; border: 1px solid rgba(0,0,0,0.1); background: solid white; } QFrame[itsOn=false][itsHover=false] { border-radius: 12px; border: 1px solid #EAEBEC; background-color: #EAEBEC; } QLabel { color: #333333; font-size: 13px; }</string> </property> <property name="itsHover" stdset="0"> <bool>false</bool> </property> <property name="itsOn" stdset="0"> <bool>false</bool> </property> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="leftMargin"> <number>8</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>13</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QLabel" name="icon"> <property name="minimumSize"> <size> <width>14</width> <height>14</height> </size> </property> <property name="maximumSize"> <size> <width>14</width> <height>14</height> </size> </property> <property name="text"> <string/> </property> </widget> </item> <item> <widget class="QLabel" name="title"> <property name="text"> <string/> </property> </widget> </item> </layout> </widget> <resources/> <connections/> </ui> ```
/content/code_sandbox/src/MEGASync/stalled_issues/gui/macx/StalledIssueTab.ui
xml
2016-02-10T18:28:05
2024-08-16T19:36:44
MEGAsync
meganz/MEGAsync
1,593
655
```xml import {AuthenticationMWs} from '../middlewares/user/AuthenticationMWs'; import {Express} from 'express'; import {RenderingMWs} from '../middlewares/RenderingMWs'; import {UserRoles} from '../../common/entities/UserDTO'; import {VersionMWs} from '../middlewares/VersionMWs'; import {AlbumMWs} from '../middlewares/AlbumMWs'; import {ServerTimingMWs} from '../middlewares/ServerTimingMWs'; import {Config} from '../../common/config/private/Config'; export class AlbumRouter { public static route(app: Express): void { this.addListAlbums(app); this.addAddSavedSearch(app); this.addDeleteAlbum(app); } private static addListAlbums(app: Express): void { app.get( [Config.Server.apiPath + '/albums'], // common part AuthenticationMWs.authenticate, AuthenticationMWs.authorise(UserRoles.User), VersionMWs.injectGalleryVersion, // specific part AlbumMWs.listAlbums, ServerTimingMWs.addServerTiming, RenderingMWs.renderResult ); } private static addDeleteAlbum(app: Express): void { app.delete( [Config.Server.apiPath + '/albums/:id'], // common part AuthenticationMWs.authenticate, AuthenticationMWs.authorise(UserRoles.Admin), VersionMWs.injectGalleryVersion, // specific part AlbumMWs.deleteAlbum, ServerTimingMWs.addServerTiming, RenderingMWs.renderResult ); } private static addAddSavedSearch(app: Express): void { app.put( [Config.Server.apiPath + '/albums/saved-searches'], // common part AuthenticationMWs.authenticate, AuthenticationMWs.authorise(UserRoles.Admin), VersionMWs.injectGalleryVersion, // specific part AlbumMWs.createSavedSearch, ServerTimingMWs.addServerTiming, RenderingMWs.renderResult ); } } ```
/content/code_sandbox/src/backend/routes/AlbumRouter.ts
xml
2016-03-12T11:46:41
2024-08-16T19:56:44
pigallery2
bpatrik/pigallery2
1,727
418
```xml <vector xmlns:android="path_to_url" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:fillColor="#FF000000" android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" /> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_menu_home.xml
xml
2016-05-21T08:47:10
2024-08-14T04:13:43
JAViewer
SplashCodes/JAViewer
4,597
101
```xml <resources> <string name="app_name">GuDong Translate-Debug</string> <string name="app_process_text">TranslateFloat-Debug</string> </resources> ```
/content/code_sandbox/app/src/debug/res/values/strings.xml
xml
2016-02-26T06:10:35
2024-08-09T12:49:52
TranslateApp
maoruibin/TranslateApp
1,800
40
```xml <manifest xmlns:android="path_to_url" package="org.chromium.third_party.android"> </manifest> ```
/content/code_sandbox/libraries_res/datausagechart_res/src/main/AndroidManifest.xml
xml
2016-07-04T07:28:36
2024-08-15T05:20:42
AndroidChromium
JackyAndroid/AndroidChromium
3,090
25
```xml import { ObjectTypeComposer } from '../ObjectTypeComposer'; import { NonNullComposer } from '../NonNullComposer'; import { ListComposer } from '../ListComposer'; import { ThunkComposer } from '../ThunkComposer'; import { InterfaceTypeComposer } from '../InterfaceTypeComposer'; import type { InputTypeComposer } from '../InputTypeComposer'; import { isSomeInputTypeComposer, ComposeOutputType, ComposeInputType, ComposeInputTypeDefinition, AnyTypeComposer, } from './typeHelpers'; import { inspect } from './misc'; import { UnionTypeComposer } from '../UnionTypeComposer'; export type ToInputTypeOpts = { /** If ObjectType or Interface received then will be used `${prefix}ObjectTypeName` as name for new Input type */ prefix?: string; /** If ObjectType or Interface received then will be used `ObjectTypeName${suffix}` as name for new Input type */ postfix?: string; /** When Union type is met then Error will be throw. This option helps to return provided fallbackType instead of Error. */ fallbackType?: ComposeInputTypeDefinition | null; }; /** * Convert any TypeComposer to InputType. * * Type may be wrapped with modifiers NonNull, List. * * Scalars and Input types returned without changes. * * ObjectTypeComposer & InterfaceTypeComposer converted to InputTypeComposer * under name `{ObjectTypeName}Input`. Prefix & suffix can be overridden via opts. * * UnionTypeComposer throws Error, if opts?.fallbackType is not provided. */ export function toInputType(anyTC: AnyTypeComposer<any>, opts?: ToInputTypeOpts): ComposeInputType { let tc: any = anyTC; const wrappers = []; while ( tc instanceof ListComposer || tc instanceof NonNullComposer || tc instanceof ThunkComposer ) { if (tc instanceof ThunkComposer) { tc = tc.getUnwrappedTC(); } else { wrappers.unshift(tc.constructor); tc = tc.ofType; } } if (!isSomeInputTypeComposer(tc)) { if (tc instanceof ObjectTypeComposer || tc instanceof InterfaceTypeComposer) { tc = toInputObjectType(tc, opts); } else { if (opts?.fallbackType) return opts.fallbackType as any; if (tc instanceof UnionTypeComposer) { throw new Error( `Cannot convert UnionTypeComposer(${tc.getTypeName()}) to Input type. Please use 'fallbackType' option for removing this error.` ); } else { throw new Error( `Cannot convert '${inspect( tc )}' to InputType. Please use 'fallbackType' option for removing this error.` ); } } } if (tc) { // wrap TypeComposer back tc = wrappers.reduce((type: any, Wrapper: any) => new Wrapper(type), tc); } return tc; } /** * Convert ObjectTypeComposer or InterfaceTypeComposer to InputTypeComposer. * Also will be converted all Object types which are used for fields. */ export function toInputObjectType<TContext>( tc: ObjectTypeComposer<any, TContext> | InterfaceTypeComposer<any, TContext>, opts?: ToInputTypeOpts ): InputTypeComposer<TContext> { if (tc.hasInputTypeComposer()) { return tc.getInputTypeComposer(); } const prefix: string = opts?.prefix || ''; const postfix: string = opts?.postfix || 'Input'; const inputTypeName = `${prefix}${tc.getTypeName()}${postfix}`; const inputTypeComposer = tc.schemaComposer.createInputTC(inputTypeName); tc.setInputTypeComposer(inputTypeComposer); const fieldNames = tc.getFieldNames(); fieldNames.forEach((fieldName) => { const fc = tc.getField(fieldName); let fieldInputType: ComposeInputTypeDefinition; try { fieldInputType = toInputType(fc.type, opts); } catch (e) { if (opts?.fallbackType || opts?.fallbackType === null) { // Setting to null effectively skips this field fieldInputType = opts?.fallbackType as any; } else { throw new Error( `${ `Can not convert field '${tc.getTypeName()}.${fieldName}' to InputType` + '\nIt should be ObjectType or InterfaceType, but got \n' }${inspect(fc.type)}` ); } } if (fieldInputType) { inputTypeComposer.setField(fieldName, { type: fieldInputType, description: fc.description, }); } }); return inputTypeComposer; } /** * @deprecated use `toInputType(anyTC, opts): ComposeInputType` method instead */ export function convertInputObjectField( field: ComposeOutputType<any>, opts: ToInputTypeOpts // schemaComposer: SchemaComposer<any> ): ComposeInputType { return toInputType(field, opts); } ```
/content/code_sandbox/src/utils/toInputType.ts
xml
2016-06-07T07:43:40
2024-07-30T19:45:36
graphql-compose
graphql-compose/graphql-compose
1,205
1,042
```xml import React from 'react'; import Icon from '../index'; import { renderWithWrapper } from '../../../.ci/testHelper'; describe('Icon component', () => { it('should apply values from theme', () => { const { wrapper } = renderWithWrapper( <Icon name="edit" />, 'RNE__ICON__Component', { components: { Icon: { size: 26, }, }, } ); expect(wrapper.props.style[0].fontSize).toBe(26); }); }); ```
/content/code_sandbox/packages/themed/src/Icon/__tests__/Icon.test.tsx
xml
2016-09-08T14:21:41
2024-08-16T10:11:29
react-native-elements
react-native-elements/react-native-elements
24,875
114
```xml <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <response> <result code="1000"> <msg>Command completed successfully</msg> </result> <resData> <host:infData xmlns:host="urn:ietf:params:xml:ns:host-1.0"> <host:name>ns1.example.tld</host:name> <host:roid>NS1_EXAMPLE1-REP</host:roid> <host:status s="linked"/> <host:status s="clientUpdateProhibited"/> <host:addr ip="v4">192.0.2.2</host:addr> <host:addr ip="v4">192.0.2.29</host:addr> <host:addr ip="v6">1080:0:0:0:8:800:200C:417A</host:addr> <host:clID>TheRegistrar</host:clID> <host:crID>NewRegistrar</host:crID> <host:crDate>1999-04-03T22:00:00.0Z</host:crDate> <host:upID>NewRegistrar</host:upID> <host:upDate>1999-12-03T09:00:00.0Z</host:upDate> <host:trDate>2000-04-08T09:00:00.0Z</host:trDate> </host:infData> </resData> <trID> <clTRID>ABC-12345</clTRID> <svTRID>server-trid</svTRID> </trID> </response> </epp> ```
/content/code_sandbox/core/src/test/resources/google/registry/flows/host/host_info_response_linked.xml
xml
2016-02-29T20:16:48
2024-08-15T19:49:29
nomulus
google/nomulus
1,685
392
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{18F9F4A2-B589-42E9-84E1-09779FA452D6}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>MemCombineTest</RootNamespace> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v143</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v143</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v143</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="Shared"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <LinkIncremental>true</LinkIncremental> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <LinkIncremental>true</LinkIncremental> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <LinkIncremental>false</LinkIncremental> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <LinkIncremental>false</LinkIncremental> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>Use</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>true</SDLCheck> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>Use</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <SDLCheck>true</SDLCheck> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> <ItemGroup> <Text Include="ReadMe.txt" /> </ItemGroup> <ItemGroup> <ClInclude Include="stdafx.h" /> <ClInclude Include="targetver.h" /> </ItemGroup> <ItemGroup> <ClCompile Include="MemCombineTest.cpp" /> <ClCompile Include="stdafx.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> </ClCompile> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/MemCombineTest/MemCombineTest.vcxproj
xml
2016-11-15T08:01:35
2024-08-14T08:55:28
WindowsInternals
zodiacon/WindowsInternals
2,319
1,945
```xml import { IGitHubUserProfile } from "../../../services/GitHubServices"; import { HttpClient } from '@microsoft/sp-http'; import { DisplayMode } from '@microsoft/sp-core-library'; export interface IGitHubBadgeV2Props { gitHubUserName: string; httpClient: HttpClient; displayMode: DisplayMode; onConfigure: () => void; } export interface IGitHubBadgeV2State { isLoading: boolean; userProfile?: IGitHubUserProfile; errorMessage?: string; } ```
/content/code_sandbox/samples/react-github-badge/src/webparts/gitHubBadgeV2/components/IGitHubBadgeV2.types.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
107
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="path_to_url"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">x86</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{7B604F37-11C5-499F-9CE2-943BAFB60552}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>CommandLineDecoder</RootNamespace> <AssemblyName>CommandLineDecoder</AssemblyName> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkProfile> </TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <SccProjectName>SAK</SccProjectName> <SccLocalPath>SAK</SccLocalPath> <SccAuxPath>SAK</SccAuxPath> <SccProvider>SAK</SccProvider> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\Build\Debug\Clients\CommandLineDecoder\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\Build\Release\Clients\CommandLineDecoder\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup> <StartupObject>CommandLineDecoder.Program</StartupObject> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug - Reduced|AnyCPU'"> <DebugSymbols>true</DebugSymbols> <OutputPath>..\..\Build\Debug\Clients\CommandLineDecoder\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> </ItemGroup> <ItemGroup> <Compile Include="Config.cs" /> <Compile Include="DecodeThread.cs" /> <Compile Include="Inputs.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <None Include="app.config" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Source\lib\zxing.net4.8.csproj"> <Project>{d3751126-7345-4459-994d-8e3a8b5a1b1e}</Project> <Name>zxing.net4.8</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> ```
/content/code_sandbox/Clients/CommandLineDecoder/CommandLineDecoder.csproj
xml
2016-10-27T20:15:17
2024-08-16T02:15:03
ZXing.Net
micjahn/ZXing.Net
2,676
952
```xml import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { Send } from "@bitwarden/common/tools/send/models/domain/send"; import { SendId } from "@bitwarden/common/types/guid"; /** * The mode of the add/edit form. * - `add` - The form is creating a new send. * - `edit` - The form is editing an existing send. * - `partial-edit` - The form is editing an existing send, but only the favorite/folder fields */ export type SendFormMode = "add" | "edit" | "partial-edit"; /** * Base configuration object for the send form. Includes all common fields. */ type BaseSendFormConfig = { /** * The mode of the form. */ mode: SendFormMode; /** * The type of send to create/edit. */ sendType: SendType; /** * Flag to indicate if the user is allowed to create sends. If false, configuration must * supply a list of organizations that the user can create sends in. */ areSendsAllowed: boolean; /** * The original send that is being edited or cloned. This can be undefined when creating a new send. */ originalSend?: Send; }; /** * Configuration object for the send form when editing an existing send. */ type ExistingSendConfig = BaseSendFormConfig & { mode: "edit" | "partial-edit"; originalSend: Send; }; /** * Configuration object for the send form when creating a completely new send. */ type CreateNewSendConfig = BaseSendFormConfig & { mode: "add"; }; type CombinedAddEditConfig = ExistingSendConfig | CreateNewSendConfig; /** * Configuration object for the send form when personal ownership is allowed. */ type SendsAllowed = CombinedAddEditConfig & { areSendsAllowed: true; }; /** * Configuration object for the send form when Sends are not allowed by an organization. * Organizations must be provided. */ type SendsNotAllowed = CombinedAddEditConfig & { areSendsAllowed: false; }; /** * Configuration object for the send form. * Determines the behavior of the form and the controls that are displayed/enabled. */ export type SendFormConfig = SendsAllowed | SendsNotAllowed; /** * Service responsible for building the configuration object for the send form. */ export abstract class SendFormConfigService { /** * Builds the configuration for the send form using the specified mode, sendId, and sendType. * The other configuration fields will be fetched from their respective services. * @param mode * @param sendId * @param sendType */ abstract buildConfig( mode: SendFormMode, sendId?: SendId, sendType?: SendType, ): Promise<SendFormConfig>; } ```
/content/code_sandbox/libs/tools/send/send-ui/src/send-form/abstractions/send-form-config.service.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
599
```xml export { default, default as ModerateNavigationContainer, } from "./ModerateNavigationContainer"; ```
/content/code_sandbox/client/src/core/client/admin/routes/Moderate/ModerateNavigation/index.ts
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
21
```xml import {css, unsafeCSS} from "lit"; import {DefaultColor1, DefaultColor2, DefaultColor3, DefaultColor5, DefaultColor4, DefaultColor6, DefaultHeaderHeight} from "@openremote/core"; // language=CSS export const panelStyles = css` .panelContainer { flex: 1 1 50%; box-sizing: border-box; min-width: 400px; padding: 0 5px; } .panel { background-color: var(--internal-or-asset-viewer-panel-color); border: 1px solid #e5e5e5; border-radius: 5px; position: relative; margin: 0 0 10px 0; } .panel-content-wrapper { padding: var(--internal-or-asset-viewer-panel-padding); } .panel-content > :first-child { margin-top: 0; } .panel-content > :last-child { margin-bottom: 0; } .panel-content { display: flex; flex-wrap: wrap; } .panel-title { text-transform: uppercase; font-weight: bolder; line-height: 1em; color: var(--internal-or-asset-viewer-title-text-color); margin-bottom: 20px; flex: 0 0 auto; letter-spacing: 0.025em; } .field { margin: 10px 0; width: 100%; flex: 0 0 auto; } .field > * { width: 100%; box-sizing: border-box; } @media screen and (max-width: 767px) { .panel { border-radius: 0; border-right: none; border-left: none; flex-basis: 100%; min-width: 360px; } } #linkedUsers-panel { min-height: 200px; } `; // language=CSS export const style = css` :host { --internal-or-asset-viewer-background-color: var(--or-asset-viewer-background-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)})); --internal-or-asset-viewer-panel-margin: var(--or-asset-viewer-panel-margin, 20px); --internal-or-asset-viewer-panel-padding: var(--or-asset-viewer-panel-padding, 24px); --internal-or-asset-viewer-text-color: var(--or-asset-viewer-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)})); --internal-or-asset-viewer-title-text-color: var(--or-asset-viewer-title-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)})); --internal-or-asset-viewer-panel-color: var(--or-asset-viewer-panel-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)})); --internal-or-asset-viewer-line-color: var(--or-asset-viewer-line-color, var(--or-app-color5, ${unsafeCSS(DefaultColor5)})); --internal-or-asset-viewer-button-color: var(--or-asset-viewer-button-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)})); --internal-or-asset-viewer-error-color: var(--or-asset-viewer-error-color, var(--or-app-color6, ${unsafeCSS(DefaultColor6)})); --internal-or-header-height: var(--or-header-height, ${unsafeCSS(DefaultHeaderHeight)}); height: 100%; width: 100%; background-color: var(--internal-or-asset-viewer-background-color); } *[hidden] { display: none; } #wrapper { height: 100%; width: 100%; display: flex; flex-direction: column; } #wrapper.saving { opacity: 0.5; pointer-events: none; } #view-container, #edit-container { flex: 0 1 auto; overflow: auto; } #view-container { flex: 1; margin-top: 0; box-sizing: border-box; display: flex; flex-direction: row; flex-wrap: wrap; width: 100%; padding: 0 15px 15px; -webkit-animation: fadein 0.3s; /* Safari, Chrome and Opera > 12.1 */ -moz-animation: fadein 0.3s; /* Firefox < 16 */ -ms-animation: fadein 0.3s; /* Internet Explorer */ -o-animation: fadein 0.3s; /* Opera < 12.1 */ animation: fadein 0.3s; } #edit-container { padding: 10px 20px 0; } #name-input { width: 300px; } @keyframes fadein { from { opacity: 0; } to { opacity: 1; } } /* Firefox < 16 */ @-moz-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } /* Safari, Chrome and Opera > 12.1 */ @-webkit-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } /* Internet Explorer */ @-ms-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } /* Opera < 12.1 */ @-o-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } #asset-header { padding: 20px 30px 15px; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; z-index: 1; transition: box-shadow 0.2s; box-shadow: none; } #asset-header.editmode { padding: 14px 30px; background-color: var(--internal-or-asset-viewer-panel-color); border-bottom: solid 1px #e5e5e5; } #asset-header.scrolled { box-shadow: rgb(0 0 0 / 15%) 0 0 5px 0; } #title { flex: 1 1 auto; font-size: 18px; font-weight: bold; display: flex; flex-direction: row; align-items: center; color: var(--internal-or-asset-viewer-title-text-color); } #title > or-icon { margin-right: 10px; } #error-wrapper { color: var(--internal-or-asset-viewer-error-color); } #error-wrapper > * { vertical-align: middle; } #error-wrapper or-translate { margin-left: 5px; } #created-time { font-size: 12px; } #right-wrapper { flex: 1 1 auto; text-align: right; } #edit-wrapper { flex: 0 0 auto; } #edit-wrapper > or-translate { margin-right: 10px; } #save-btn { margin-left: 20px; } #edit-btn { margin-left: 15px; } #location-panel .panel-content { height: 100%; } #history-panel .panel-content { position: relative; } .msg { display: flex; justify-content: center; align-items: center; text-align: center; height: 100%; } .back-navigation { display: none; cursor: pointer; } #fileupload { display: flex; align-items: center; width: 100%; } .hidden { display: none; } .multipleAssetsView { display: flex; flex-direction: column; } .multipleAssetsView > *:first-child { margin: 30px; } @media screen and (max-width: 767px) { #wrapper { position: absolute; left: 0; right: 0; } .back-navigation { display: block; } .mobileHidden { display: none; } #asset-header { padding: 15px 15px 15px; } #name-input { width: auto; } #view-container { padding: 0; } #edit-container { padding: 10px 0; } .panelContainer { min-width: 360px; padding: 0; } } @media screen and (max-width: 1130px) { #name-input { width: 150px; } .tabletHidden { display: none; } #view-container { flex-direction: column; flex-wrap: nowrap; } .panelContainer { flex: 0 1 auto; } } `; ```
/content/code_sandbox/ui/component/or-asset-viewer/src/style.ts
xml
2016-02-03T11:14:02
2024-08-16T12:45:50
openremote
openremote/openremote
1,184
2,050
```xml import { PaginationTableSettings, SortableTableSettings, } from '@/react/components/datatables/types'; export interface TableSettings extends SortableTableSettings, PaginationTableSettings {} export type SupportedIngControllerTypes = | 'nginx' | 'traefik' | 'other' | 'custom'; // Not having 'extends Record<string, unknown>' fixes validation type errors from yup export interface IngressControllerClassMap { Name: string; ClassName: string; Type: string; Availability: boolean; New: boolean; Used: boolean; // if the controller is used by any ingress in the cluster } // Record<string, unknown> fixes type errors when using the type with a react datatable export interface IngressControllerClassMapRowData extends Record<string, unknown>, IngressControllerClassMap {} ```
/content/code_sandbox/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/types.ts
xml
2016-05-19T20:15:28
2024-08-16T19:15:14
portainer
portainer/portainer
30,083
179
```xml import { type FC } from 'react'; import { c } from 'ttag'; import { LockSetup } from '@proton/pass/components/Settings/LockSetup'; import { SettingsPanel } from './SettingsPanel'; export const LockSettings: FC = () => ( <SettingsPanel title={c('Label').t`Unlock with`}> <LockSetup /> </SettingsPanel> ); ```
/content/code_sandbox/packages/pass/components/Settings/LockSettings.tsx
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
83
```xml import ensureEndSlash from "./ensureEndSlash"; it("should add slash to the end", () => { const path = ensureEndSlash("/test"); expect(path).toBe("/test/"); }); it("should not add slash to the end if it's already there", () => { const path = ensureEndSlash("/test/"); expect(path).toBe("/test/"); }); ```
/content/code_sandbox/common/lib/utils/ensureEndSlash.spec.ts
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
79
```xml import { chartOnBrushFilter as render } from '../plots/api/chart-on-brush-filter'; import { PLOT_CLASS_NAME } from '../../src'; import { dblclick, brush } from '../plots/interaction/penguins-point-brush'; import { createNodeGCanvas } from './utils/createNodeGCanvas'; import { createPromise, receiveExpectData } from './utils/event'; import { sleep } from './utils/sleep'; import './utils/useCustomFetch'; describe('chart.on', () => { const canvas = createNodeGCanvas(640, 480); const { finished, chart } = render({ canvas }); chart.off(); it('chart.on("brush:filter", callback) should provide selection when filtering', async () => { await finished; const { document } = canvas; const plot = document.getElementsByClassName(PLOT_CLASS_NAME)[0]; // Brush plot. const [filtered, resolve] = createPromise(); chart.on( 'brush:filter', receiveExpectData(resolve, { selection: [ [33.56769931932968, 43.588104569765775], [15.365477250939671, 20.206975810017482], ], }), ); brush(plot, 100, 100, 300, 300); await filtered; await sleep(20); // Reset plot. const [rested, resolve1] = createPromise(); chart.off(); chart.on( 'brush:filter', receiveExpectData(resolve1, { selection: [ [32.1, 59.6], [13.1, 21.5], ], }), ); setTimeout(() => dblclick(plot), 1000); await rested; // Wait for rerender over to close test. await sleep(20); }); afterAll(() => { canvas?.destroy(); }); }); ```
/content/code_sandbox/__tests__/integration/chart-on-brush-filter.spec.ts
xml
2016-05-26T09:21:04
2024-08-15T16:11:17
G2
antvis/G2
12,060
408
```xml import { render } from '@testing-library/react-native'; import { expectTranslatedInlineCSSRuleTo } from './utils'; /** * path_to_url */ describe('HTML component', () => { it('should pass regression #361 regarding inline margin CSS rules', () => { expectTranslatedInlineCSSRuleTo({ cssInlineRules: 'margin: none;', render, test: (style) => expect(style.margin).toBeUndefined() }); }); }); ```
/content/code_sandbox/packages/render-html/src/__tests__/regression.361.css-margin-rule.test.tsx
xml
2016-11-29T10:50:53
2024-08-08T06:53:22
react-native-render-html
meliorence/react-native-render-html
3,445
97
```xml <Project Sdk="Microsoft.NET.Sdk.Worker"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks> <ImplicitUsings>disable</ImplicitUsings> <Nullable>disable</Nullable> </PropertyGroup> <ItemGroup> <PackageReference Include="Jaeger" Version="1.0.3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\src\Ocelot.Tracing.OpenTracing\Ocelot.Tracing.OpenTracing.csproj" /> <ProjectReference Include="..\..\src\Ocelot\Ocelot.csproj" /> </ItemGroup> <!-- Conditionally obtain references for the net 6.0 target --> <ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" /> </ItemGroup> <!-- Conditionally obtain references for the net 7.0 target --> <ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' "> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" /> </ItemGroup> <!-- Conditionally obtain references for the net 8.0 target --> <ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' "> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" /> </ItemGroup> <ItemGroup> <Content Update="appsettings.Development.json"> <ExcludeFromSingleFile>true</ExcludeFromSingleFile> </Content> <Content Update="appsettings.json"> <ExcludeFromSingleFile>true</ExcludeFromSingleFile> </Content> <Content Update="ocelot.json"> <ExcludeFromSingleFile>true</ExcludeFromSingleFile> </Content> </ItemGroup> </Project> ```
/content/code_sandbox/samples/OpenTracing/Ocelot.Samples.OpenTracing.csproj
xml
2016-06-29T20:35:24
2024-08-15T16:00:38
Ocelot
ThreeMammals/Ocelot
8,277
437
```xml <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="path_to_url" xmlns:x="path_to_url" xmlns:local="using:Xamarin.Forms.Xaml.UnitTests" x:Class="Xamarin.Forms.Xaml.UnitTests.DataTemplateExtension"> <ContentPage.Resources> <ShellContent x:Key="content" ContentTemplate="{DataTemplate local:DataTemplateExtension}" /> </ContentPage.Resources> </ContentPage> ```
/content/code_sandbox/Xamarin.Forms.Xaml.UnitTests/DataTemplateExtension.xaml
xml
2016-03-18T15:52:03
2024-08-16T16:25:43
Xamarin.Forms
xamarin/Xamarin.Forms
5,637
104
```xml import type { ImageLoaderPropsWithConfig } from './image-config' function defaultLoader({ config, src, width, quality, }: ImageLoaderPropsWithConfig): string { if (process.env.NODE_ENV !== 'production') { const missingValues = [] // these should always be provided but make sure they are if (!src) missingValues.push('src') if (!width) missingValues.push('width') if (missingValues.length > 0) { throw new Error( `Next Image Optimization requires ${missingValues.join( ', ' )} to be provided. Make sure you pass them as props to the \`next/image\` component. Received: ${JSON.stringify( { src, width, quality } )}` ) } if (src.startsWith('//')) { throw new Error( `Failed to parse src "${src}" on \`next/image\`, protocol-relative URL (//) must be changed to an absolute URL (http:// or path_to_url` ) } if (!src.startsWith('/') && (config.domains || config.remotePatterns)) { let parsedSrc: URL try { parsedSrc = new URL(src) } catch (err) { console.error(err) throw new Error( `Failed to parse src "${src}" on \`next/image\`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or path_to_url` ) } if ( process.env.NODE_ENV !== 'test' && // micromatch isn't compatible with edge runtime process.env.NEXT_RUNTIME !== 'edge' ) { // We use dynamic require because this should only error in development const { hasMatch } = require('./match-remote-pattern') if (!hasMatch(config.domains, config.remotePatterns, parsedSrc)) { throw new Error( `Invalid src prop (${src}) on \`next/image\`, hostname "${parsedSrc.hostname}" is not configured under images in your \`next.config.js\`\n` + `See more info: path_to_url` ) } } } } return `${config.path}?url=${encodeURIComponent(src)}&w=${width}&q=${ quality || 75 }${ process.env.NEXT_DEPLOYMENT_ID ? `&dpl=${process.env.NEXT_DEPLOYMENT_ID}` : '' }` } // We use this to determine if the import is the default loader // or a custom loader defined by the user in next.config.js defaultLoader.__next_img_default = true export default defaultLoader ```
/content/code_sandbox/packages/next/src/shared/lib/image-loader.ts
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
564
```xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="path_to_url" android:shape="rectangle"> <corners android:radius="12dp" /> <padding android:bottom="4dp" android:left="8dp" android:right="8dp" android:top="4dp" /> <solid android:color="#44aaaaaa" /> </shape> ```
/content/code_sandbox/sample/src/main/res/drawable/shape_number_indicator_background.xml
xml
2016-09-13T08:26:29
2024-08-15T09:49:27
XBanner
xiaohaibin/XBanner
2,159
94
```xml import {Controller, Get, PlatformTest, QueryParams} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import {MinLength, Property, Required} from "@tsed/schema"; import SuperTest from "supertest"; import {Server} from "./app/Server.js"; class QueryParamModel { @Required() @MinLength(1) name: string; @Property() duration: number; } @Controller("/scenarios") class QueryParamsSwaggerController { @Get("/1") scenario1(@QueryParams("id") id: string) {} @Get("/2") scenario2(@QueryParams("ids", String) ids: string[]) {} @Get("/3") scenario3(@QueryParams("ids", String) ids: Map<string, string>) {} @Get("/4") scenario4(@QueryParams() params: QueryParamModel, @QueryParams("locale") locale: string) {} } describe("Swagger query params", () => { let request: SuperTest.Agent; beforeEach( PlatformTest.bootstrap(Server, { platform: PlatformExpress, mount: { "/rest": [QueryParamsSwaggerController] } }) ); beforeEach(() => { request = SuperTest(PlatformTest.callback()); }); afterEach(PlatformTest.reset); it("should generate swagger", async () => { const response = await request.get("/v3/doc/swagger.json").expect(200); expect(response.body).toEqual({ info: { title: "Api documentation", version: "1.0.0" }, openapi: "3.0.1", paths: { "/rest/scenarios/1": { get: { operationId: "queryParamsSwaggerControllerScenario1", parameters: [ { in: "query", name: "id", required: false, schema: { type: "string" } } ], responses: { "200": { description: "Success" } }, tags: ["QueryParamsSwaggerController"] } }, "/rest/scenarios/2": { get: { operationId: "queryParamsSwaggerControllerScenario2", parameters: [ { in: "query", name: "ids", required: false, schema: { items: { type: "string" }, type: "array" } } ], responses: { "200": { description: "Success" } }, tags: ["QueryParamsSwaggerController"] } }, "/rest/scenarios/3": { get: { operationId: "queryParamsSwaggerControllerScenario3", parameters: [ { in: "query", name: "ids", required: false, schema: { additionalProperties: { type: "string" }, type: "object" } } ], responses: { "200": { description: "Success" } }, tags: ["QueryParamsSwaggerController"] } }, "/rest/scenarios/4": { get: { operationId: "queryParamsSwaggerControllerScenario4", parameters: [ { in: "query", name: "name", required: true, schema: { minLength: 1, type: "string" } }, { in: "query", name: "duration", required: false, schema: { type: "number" } }, { in: "query", name: "locale", required: false, schema: { type: "string" } } ], responses: { "200": { description: "Success" } }, tags: ["QueryParamsSwaggerController"] } } }, tags: [ { name: "QueryParamsSwaggerController" } ] }); await request.get("/rest/scenarios/4?name=name&duration=1&locale=fr-FR"); }); }); ```
/content/code_sandbox/packages/specs/swagger/test/swagger.query.spec.ts
xml
2016-02-21T18:38:47
2024-08-14T21:19:48
tsed
tsedio/tsed
2,817
884
```xml import {Component, TemplateRef, ViewChild, inject} from '@angular/core'; import { MatBottomSheet, MatBottomSheetConfig, MatBottomSheetModule, } from '@angular/material/bottom-sheet'; /** * @title Testing with MatBottomSheetHarness */ @Component({ selector: 'bottom-sheet-harness-example', templateUrl: 'bottom-sheet-harness-example.html', standalone: true, imports: [MatBottomSheetModule], }) export class BottomSheetHarnessExample { readonly bottomSheet = inject(MatBottomSheet); @ViewChild(TemplateRef) template: TemplateRef<any>; open(config?: MatBottomSheetConfig) { return this.bottomSheet.open(this.template, config); } } ```
/content/code_sandbox/src/components-examples/material/bottom-sheet/bottom-sheet-harness/bottom-sheet-harness-example.ts
xml
2016-01-04T18:50:02
2024-08-16T11:21:13
components
angular/components
24,263
149
```xml type OgModule = typeof import('next/dist/compiled/@vercel/og') function importModule(): Promise< typeof import('next/dist/compiled/@vercel/og') > { return import( process.env.NEXT_RUNTIME === 'edge' ? 'next/dist/compiled/@vercel/og/index.edge.js' : 'next/dist/compiled/@vercel/og/index.node.js' ) } /** * The ImageResponse class allows you to generate dynamic images using JSX and CSS. * This is useful for generating social media images such as Open Graph images, Twitter cards, and more. * * Read more: [Next.js Docs: `ImageResponse`](path_to_url */ export class ImageResponse extends Response { public static displayName = 'ImageResponse' constructor(...args: ConstructorParameters<OgModule['ImageResponse']>) { const readable = new ReadableStream({ async start(controller) { const OGImageResponse: typeof import('next/dist/compiled/@vercel/og').ImageResponse = // So far we have to manually determine which build to use, // as the auto resolving is not working (await importModule()).ImageResponse const imageResponse = new OGImageResponse(...args) as Response if (!imageResponse.body) { return controller.close() } const reader = imageResponse.body!.getReader() while (true) { const { done, value } = await reader.read() if (done) { return controller.close() } controller.enqueue(value) } }, }) const options = args[1] || {} const headers = new Headers({ 'content-type': 'image/png', 'cache-control': process.env.NODE_ENV === 'development' ? 'no-cache, no-store' : 'public, immutable, no-transform, max-age=31536000', }) if (options.headers) { const newHeaders = new Headers(options.headers) newHeaders.forEach((value, key) => headers.set(key, value)) } super(readable, { headers, status: options.status, statusText: options.statusText, }) } } ```
/content/code_sandbox/packages/next/src/server/og/image-response.ts
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
461
```xml try {} catch (e: any) {} try {} catch (e: unknown) {} ```
/content/code_sandbox/tests/format/typescript/catch-clause/type-annotation.ts
xml
2016-11-29T17:13:37
2024-08-16T17:29:57
prettier
prettier/prettier
48,913
19
```xml /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import * as React from "react"; import { Button, Intent, Popover, type PopoverInteractionKind } from "@blueprintjs/core"; import { Example, type ExampleProps } from "@blueprintjs/docs-theme"; import { FileMenu } from "./common/fileMenu"; export class PopoverInteractionKindExample extends React.PureComponent<ExampleProps> { public static displayName = "PopoverInteractionKindExample"; public render() { return ( <Example className="docs-popover-interaction-kind-example" options={false} {...this.props}> <div> {this.renderPopover("hover")} {this.renderPopover("hover-target")} {this.renderPopover("click")} {this.renderPopover("click-target")} </div> </Example> ); } private renderPopover(interactionKind: PopoverInteractionKind) { // MenuItem's default shouldDismissPopover={true} behavior is confusing // in this example, since it introduces an additional way popovers can // close. set it to false here for clarity. return ( <Popover enforceFocus={false} placement="bottom-end" interactionKind={interactionKind} content={<FileMenu shouldDismissPopover={false} />} // tslint:disable-next-line jsx-no-lambda renderTarget={({ isOpen, ...p }) => ( <Button {...p} active={isOpen} intent={Intent.PRIMARY} text={interactionKind} /> )} /> ); } } ```
/content/code_sandbox/packages/docs-app/src/examples/core-examples/popoverInteractionKindExample.tsx
xml
2016-10-25T21:17:50
2024-08-16T15:14:48
blueprint
palantir/blueprint
20,593
352
```xml <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <goals> <goal>config-gen</goal> </goals> </pluginExecutionFilter> <action> <execute> <runOnIncremental>false</runOnIncremental> <runOnConfiguration>true</runOnConfiguration> </execute> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> ```
/content/code_sandbox/config-class-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
xml
2016-06-03T20:54:20
2024-08-16T15:32:01
vespa
vespa-engine/vespa
5,524
103
```xml import * as React from 'react'; import { ReactNode } from 'react'; import { FieldProps } from './types'; /** * A field rendering its children. * * Designed as a wrapper for several fields, to support props read by * the parent element (e.g. `<SimpleShowLayout>`, `<Datagrid`). * * @example * import { WrapperField, TextField } from 'react-admin'; * * const PostShow = () => ( * <Show> * <SimpleShowLayout> * <WrapperField label="author" sortBy="last_name"> * <TextField source="first_name" /> * <TextField source="last_name" /> * </WrapperField> * </SimpleShowLayout> * </Show> * ); */ export const WrapperField = < RecordType extends Record<string, any> = Record<string, any>, >({ children, }: WrapperFieldProps<RecordType>) => <>{children}</>; WrapperField.displayName = 'WrapperField'; export interface WrapperFieldProps< RecordType extends Record<string, any> = Record<string, any>, > extends Omit<FieldProps<RecordType>, 'source'> { source?: FieldProps<RecordType>['source']; children: ReactNode; } ```
/content/code_sandbox/packages/ra-ui-materialui/src/field/WrapperField.tsx
xml
2016-07-13T07:58:54
2024-08-16T18:32:27
react-admin
marmelab/react-admin
24,624
265
```xml import { Text } from '@microsoft/sp-core-library'; import { SPHttpClient, SPHttpClientResponse } from '@microsoft/sp-http'; export class GroupService { private spHttpClient: SPHttpClient; constructor(spHttpClient: SPHttpClient) { this.spHttpClient = spHttpClient; } public async getGroupFromWeb(webUrl: string, groupId: number) { const endpoint = `${webUrl}/_api/Web/SiteGroups/GetById(${groupId})`; let res = await this.spHttpClient.get(endpoint, SPHttpClient.configurations.v1); let group = await res.json(); return group; } } ```
/content/code_sandbox/samples/react-list-form/src/common/services/GroupService.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
132
```xml import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities'; import { NavSize } from '../Nav/Nav.types'; export type AppItemStaticSlots = { /** * The root element of the AppItemStatic. */ root: Slot<'div'>; /** * Icon that renders before the content. */ icon?: Slot<'span'>; }; /** * AppItemStatic Props */ export type AppItemStaticProps = ComponentProps<AppItemStaticSlots> & {}; /** * State used in rendering AppItemStatic */ export type AppItemStaticState = ComponentState<AppItemStaticSlots> & { /** * The size of the Nav * * @default 'medium' */ size: NavSize; }; ```
/content/code_sandbox/packages/react-components/react-nav-preview/library/src/components/AppItemStatic/AppItemStatic.types.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
165
```xml <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%date{ISO8601} %-5level %logger - %msg%n</pattern> </encoder> </appender> <root level="INFO"> <appender-ref ref="STDOUT" /> </root> </configuration> ```
/content/code_sandbox/dev/maven-plugin/src/maven-test/external-project-2.12/integration-test/src/test/resources/logback-test.xml
xml
2016-02-23T01:51:06
2024-07-17T04:00:50
lagom
lagom/lagom
2,630
97
```xml import { Component } from '@angular/core'; import { Code } from '@domain/code'; @Component({ selector: 'badge-position-demo', template: ` <app-docsectiontext> <p>A Badge can be positioned at the top right corner of an element by adding <i>p-overlay-badge</i> style class to the element and embedding the badge inside.</p> </app-docsectiontext> <div class="card flex justify-content-center"> <i class="pi pi-bell mr-4 p-text-secondary" pBadge style="font-size: 2rem" value="2"></i> <i class="pi pi-calendar mr-4 p-text-secondary" pBadge style="font-size: 2rem" [value]="'10+'" severity="danger"></i> <i class="pi pi-envelope p-text-secondary" pBadge style="font-size: 2rem" severity="danger"></i> </div> <app-code [code]="code" selector="badge-position-demo"></app-code> ` }) export class PositionDoc { code: Code = { basic: `<i class="pi pi-bell mr-4 p-text-secondary" pBadge style="font-size: 2rem" value="2"></i>`, html: `<div class="card flex justify-content-center"> <i class="pi pi-bell mr-4 p-text-secondary" pBadge style="font-size: 2rem" value="2"></i> <i class="pi pi-calendar mr-4 p-text-secondary" pBadge style="font-size: 2rem" [value]="'10+'" severity="danger"></i> <i class="pi pi-envelope p-text-secondary" pBadge style="font-size: 2rem" severity="danger"></i> </div>`, typescript: `import { Component } from '@angular/core'; import { BadgeModule } from 'primeng/badge'; @Component({ selector: 'badge-position-demo', templateUrl: './badge-position-demo.html', standalone: true, imports: [BadgeModule] }) export class BadgePositionDemo {}` }; } ```
/content/code_sandbox/src/app/showcase/doc/badge/positiondoc.ts
xml
2016-01-16T09:23:28
2024-08-16T19:58:20
primeng
primefaces/primeng
9,969
454
```xml import { DecryptedItemMutator } from '../../Abstract/Item/Mutator/DecryptedItemMutator' import { ActionExtensionContent } from './ActionsExtension' import { Action } from './Types' export class ActionsExtensionMutator extends DecryptedItemMutator<ActionExtensionContent> { set description(description: string) { this.mutableContent.description = description } set supported_types(supported_types: string[]) { this.mutableContent.supported_types = supported_types } set actions(actions: Action[]) { this.mutableContent.actions = actions } set deprecation(deprecation: string | undefined) { this.mutableContent.deprecation = deprecation } } ```
/content/code_sandbox/packages/models/src/Domain/Syncable/ActionsExtension/ActionsExtensionMutator.ts
xml
2016-12-05T23:31:33
2024-08-16T06:51:19
app
standardnotes/app
5,180
145
```xml <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="path_to_url" xmlns:x="path_to_url" xmlns:viewmodels="clr-namespace:Xamarin.Forms.Controls.GalleryPages.VisualStateManagerGalleries" x:Class="Xamarin.Forms.Controls.GalleryPages.VisualStateManagerGalleries.StateTriggersDirectlyOnElements" Title="StateTriggers directly on Elements"> <ContentPage.BindingContext> <viewmodels:StateTriggersDirectlyOnElementsViewModel /> </ContentPage.BindingContext> <ContentPage.Content> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <VisualStateManager.VisualStateGroups> <VisualStateGroup> <VisualState x:Name="Wide"> <VisualState.StateTriggers> <CompareStateTrigger Property="{Binding ToggleState}" Value="True" /> </VisualState.StateTriggers> <VisualState.Setters> <Setter Property="BackgroundColor" Value="Green" /> <Setter TargetName="InfoLabel" Property="Label.Text" Value="Wide (CompareStateTrigger)"/> <Setter TargetName="InfoLabel" Property="Label.FontSize" Value="24"/> </VisualState.Setters> </VisualState> <VisualState x:Name="Narrow"> <VisualState.StateTriggers> <CompareStateTrigger Property="{Binding ToggleState}" Value="False" /> </VisualState.StateTriggers> <VisualState.Setters> <Setter Property="BackgroundColor" Value="Red" /> <Setter TargetName="InfoLabel" Property="Label.Text" Value="Narrow (CompareStateTrigger)"/> <Setter TargetName="InfoLabel" Property="Label.FontSize" Value="12"/> </VisualState.Setters> </VisualState> <VisualState x:Name="Medium"> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="720" /> </VisualState.StateTriggers> <VisualState.Setters> <Setter Property="BackgroundColor" Value="Blue" /> <Setter TargetName="InfoLabel" Property="Label.Text" Value="Medium (AdaptiveTrigger)"/> <Setter TargetName="InfoLabel" Property="Label.FontSize" Value="18"/> </VisualState.Setters> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Button Text="Click to toggle BackgroundColor" Command="{Binding ToggleCommand}" HorizontalOptions="Center" VerticalOptions="Center" /> <Label Grid.Row="1" x:Name="InfoLabel"/> </Grid> </ContentPage.Content> </ContentPage> ```
/content/code_sandbox/Xamarin.Forms.Controls/GalleryPages/VisualStateManagerGalleries/StateTriggersDirectlyOnElements.xaml
xml
2016-03-18T15:52:03
2024-08-16T16:25:43
Xamarin.Forms
xamarin/Xamarin.Forms
5,637
591
```xml <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="path_to_url" android:layout_width="12dp" android:layout_height="12dp" android:background="@drawable/simple_count_badge_bg" android:gravity="center" android:textColor="@android:color/white" android:textSize="8dp" /> ```
/content/code_sandbox/app/src/main/res/layout/simple_count_badge_layout.xml
xml
2016-06-26T08:20:43
2024-08-16T18:33:28
MagicIndicator
hackware1993/MagicIndicator
9,699
81
```xml import { Pipe, PipeTransform } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; @Pipe({ name: 'safe' }) export class SafePipe implements PipeTransform { constructor(private sanitizer: DomSanitizer) {} transform(url) { return this.sanitizer.bypassSecurityTrustResourceUrl(url); } } ```
/content/code_sandbox/src/Presentation/Web/ClientApp/src/app/shared/pipes/safe.pipe.ts
xml
2016-06-03T17:49:56
2024-08-14T02:53:24
AspNetCoreSpa
fullstackproltd/AspNetCoreSpa
1,472
74
```xml import { ChangeDetectionStrategy, Component, ElementRef, ErrorHandler, QueryList, ViewChild, ViewChildren, ViewEncapsulation, signal, } from '@angular/core'; import {fakeAsync, flush, tick} from '@angular/core/testing'; import { dispatchEvent, createMouseEvent, createTouchEvent, dispatchFakeEvent, dispatchMouseEvent, dispatchTouchEvent, } from '@angular/cdk/testing/private'; import {_supportsShadowDom} from '@angular/cdk/platform'; import {CdkDragHandle} from './drag-handle'; import {CdkDrag} from './drag'; import {CDK_DRAG_CONFIG, DragAxis, DragDropConfig} from './config'; import {DragRef, Point} from '../drag-ref'; import { createComponent, continueDraggingViaTouch, dragElementViaMouse, dragElementViaTouch, makeScrollable, startDraggingViaMouse, startDraggingViaTouch, } from './test-utils.spec'; describe('Standalone CdkDrag', () => { describe('mouse dragging', () => { it('should drag an element freely to a particular position', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); it('should drag an element freely to a particular position when the page is scrolled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const cleanup = makeScrollable(); const dragElement = fixture.componentInstance.dragElement.nativeElement; scrollTo(0, 500); expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); cleanup(); })); it('should continue dragging the element from where it was left off', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 300px, 0px)'); })); it('should continue dragging from where it was left off when the page is scrolled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const cleanup = makeScrollable(); scrollTo(0, 500); expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 300px, 0px)'); cleanup(); })); it('should not drag an element with the right mouse button', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const event = createMouseEvent('mousedown', 50, 100, 2); expect(dragElement.style.transform).toBeFalsy(); dispatchEvent(dragElement, event); fixture.detectChanges(); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); dispatchMouseEvent(document, 'mouseup'); fixture.detectChanges(); expect(dragElement.style.transform).toBeFalsy(); })); it('should not drag the element if it was not moved more than the minimum distance', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable, {dragDistance: 5}); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 2, 2); expect(dragElement.style.transform).toBeFalsy(); })); it('should be able to stop dragging after a double click', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable, {dragDistance: 5}); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dispatchMouseEvent(dragElement, 'mousedown'); fixture.detectChanges(); dispatchMouseEvent(document, 'mouseup'); fixture.detectChanges(); dispatchMouseEvent(dragElement, 'mousedown'); fixture.detectChanges(); dispatchMouseEvent(document, 'mouseup'); fixture.detectChanges(); dragElementViaMouse(fixture, dragElement, 50, 50); dispatchMouseEvent(document, 'mousemove', 100, 100); fixture.detectChanges(); expect(dragElement.style.transform).toBeFalsy(); })); it('should preserve the previous `transform` value', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElement.style.transform = 'translateX(-50%)'; dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px) translateX(-50%)'); })); it('should not generate multiple own `translate3d` values', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElement.style.transform = 'translateY(-50%)'; dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px) translateY(-50%)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 300px, 0px) translateY(-50%)'); })); it('should prevent the `mousedown` action for native draggable elements', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElement.draggable = true; const mousedownEvent = createMouseEvent('mousedown', 50, 50); Object.defineProperty(mousedownEvent, 'target', {get: () => dragElement}); spyOn(mousedownEvent, 'preventDefault').and.callThrough(); dispatchEvent(dragElement, mousedownEvent); fixture.detectChanges(); dispatchMouseEvent(document, 'mousemove', 50, 50); fixture.detectChanges(); expect(mousedownEvent.preventDefault).toHaveBeenCalled(); })); it('should not start dragging an element with a fake mousedown event', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const event = createMouseEvent('mousedown', 0, 0); Object.defineProperties(event, { buttons: {get: () => 0}, detail: {get: () => 0}, }); expect(dragElement.style.transform).toBeFalsy(); dispatchEvent(dragElement, event); fixture.detectChanges(); dispatchMouseEvent(document, 'mousemove', 20, 100); fixture.detectChanges(); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); dispatchMouseEvent(document, 'mouseup'); fixture.detectChanges(); expect(dragElement.style.transform).toBeFalsy(); })); it('should prevent the default dragstart action', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const event = dispatchFakeEvent( fixture.componentInstance.dragElement.nativeElement, 'dragstart', ); fixture.detectChanges(); expect(event.defaultPrevented).toBe(true); })); it('should not prevent the default dragstart action when dragging is disabled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragDisabled.set(true); fixture.detectChanges(); const event = dispatchFakeEvent( fixture.componentInstance.dragElement.nativeElement, 'dragstart', ); fixture.detectChanges(); expect(event.defaultPrevented).toBe(false); })); }); describe('touch dragging', () => { it('should drag an element freely to a particular position', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaTouch(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); it('should drag an element freely to a particular position when the page is scrolled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const cleanup = makeScrollable(); scrollTo(0, 500); expect(dragElement.style.transform).toBeFalsy(); dragElementViaTouch(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); cleanup(); })); it('should continue dragging the element from where it was left off', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaTouch(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); dragElementViaTouch(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 300px, 0px)'); })); it('should continue dragging from where it was left off when the page is scrolled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const cleanup = makeScrollable(); scrollTo(0, 500); expect(dragElement.style.transform).toBeFalsy(); dragElementViaTouch(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); dragElementViaTouch(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 300px, 0px)'); cleanup(); })); it('should prevent the default `touchmove` action on the page while dragging', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); dispatchTouchEvent(fixture.componentInstance.dragElement.nativeElement, 'touchstart'); fixture.detectChanges(); expect(dispatchTouchEvent(document, 'touchmove').defaultPrevented) .withContext('Expected initial touchmove to be prevented.') .toBe(true); expect(dispatchTouchEvent(document, 'touchmove').defaultPrevented) .withContext('Expected subsequent touchmose to be prevented.') .toBe(true); dispatchTouchEvent(document, 'touchend'); fixture.detectChanges(); })); it('should not prevent `touchstart` action for native draggable elements', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElement.draggable = true; const touchstartEvent = createTouchEvent('touchstart', 50, 50); Object.defineProperty(touchstartEvent, 'target', {get: () => dragElement}); spyOn(touchstartEvent, 'preventDefault').and.callThrough(); dispatchEvent(dragElement, touchstartEvent); fixture.detectChanges(); dispatchTouchEvent(document, 'touchmove'); fixture.detectChanges(); expect(touchstartEvent.preventDefault).not.toHaveBeenCalled(); })); it('should not start dragging an element with a fake touchstart event', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const event = createTouchEvent('touchstart', 50, 50) as TouchEvent; Object.defineProperties(event.touches[0], { identifier: {get: () => -1}, radiusX: {get: () => null}, radiusY: {get: () => null}, }); expect(dragElement.style.transform).toBeFalsy(); dispatchEvent(dragElement, event); fixture.detectChanges(); dispatchTouchEvent(document, 'touchmove', 20, 100); fixture.detectChanges(); dispatchTouchEvent(document, 'touchmove', 50, 100); fixture.detectChanges(); dispatchTouchEvent(document, 'touchend'); fixture.detectChanges(); expect(dragElement.style.transform).toBeFalsy(); })); }); describe('mouse dragging when initial transform is none', () => { it('should drag an element freely to a particular position', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElement.style.transform = 'none'; dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); }); it('should dispatch an event when the user has started dragging', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); startDraggingViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement); expect(fixture.componentInstance.startedSpy).toHaveBeenCalled(); const event = fixture.componentInstance.startedSpy.calls.mostRecent().args[0]; // Assert the event like this, rather than `toHaveBeenCalledWith`, because Jasmine will // go into an infinite loop trying to stringify the event, if the test fails. expect(event).toEqual({ source: fixture.componentInstance.dragInstance, event: jasmine.anything(), }); })); it('should dispatch an event when the user has stopped dragging', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); dragElementViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement, 5, 10); expect(fixture.componentInstance.endedSpy).toHaveBeenCalled(); const event = fixture.componentInstance.endedSpy.calls.mostRecent().args[0]; // Assert the event like this, rather than `toHaveBeenCalledWith`, because Jasmine will // go into an infinite loop trying to stringify the event, if the test fails. expect(event).toEqual({ source: fixture.componentInstance.dragInstance, distance: {x: jasmine.any(Number), y: jasmine.any(Number)}, dropPoint: {x: jasmine.any(Number), y: jasmine.any(Number)}, event: jasmine.anything(), }); })); it('should include the drag distance in the ended event', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); dragElementViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement, 25, 30); let event = fixture.componentInstance.endedSpy.calls.mostRecent().args[0]; expect(event).toEqual({ source: jasmine.anything(), distance: {x: 25, y: 30}, dropPoint: {x: 25, y: 30}, event: jasmine.anything(), }); dragElementViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement, 40, 50); event = fixture.componentInstance.endedSpy.calls.mostRecent().args[0]; expect(event).toEqual({ source: jasmine.anything(), distance: {x: 40, y: 50}, dropPoint: {x: 40, y: 50}, event: jasmine.anything(), }); })); it('should emit when the user is moving the drag element', () => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const spy = jasmine.createSpy('move spy'); const subscription = fixture.componentInstance.dragInstance.moved.subscribe(spy); dragElementViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement, 5, 10); expect(spy).toHaveBeenCalledTimes(1); dragElementViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement, 10, 20); expect(spy).toHaveBeenCalledTimes(2); subscription.unsubscribe(); }); it('should not emit events if it was not moved more than the minimum distance', () => { const fixture = createComponent(StandaloneDraggable, {dragDistance: 5}); fixture.detectChanges(); const moveSpy = jasmine.createSpy('move spy'); const subscription = fixture.componentInstance.dragInstance.moved.subscribe(moveSpy); dragElementViaMouse(fixture, fixture.componentInstance.dragElement.nativeElement, 2, 2); expect(fixture.componentInstance.startedSpy).not.toHaveBeenCalled(); expect(fixture.componentInstance.releasedSpy).not.toHaveBeenCalled(); expect(fixture.componentInstance.endedSpy).not.toHaveBeenCalled(); expect(moveSpy).not.toHaveBeenCalled(); subscription.unsubscribe(); }); it('should complete the `moved` stream on destroy', () => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const spy = jasmine.createSpy('move spy'); const subscription = fixture.componentInstance.dragInstance.moved.subscribe({complete: spy}); fixture.destroy(); expect(spy).toHaveBeenCalled(); subscription.unsubscribe(); }); it('should be able to lock dragging along the x axis', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragLockAxis.set('x'); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 0px, 0px)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 0px, 0px)'); })); it('should be able to lock dragging along the x axis while using constrainPosition', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragLockAxis.set('x'); fixture.componentInstance.constrainPosition = ( {x, y}: Point, _dragRef: DragRef, _dimensions: DOMRect, pickup: Point, ) => { x -= pickup.x; y -= pickup.y; return {x, y}; }; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 0px, 0px)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 0px, 0px)'); })); it('should be able to lock dragging along the y axis', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragLockAxis.set('y'); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(0px, 100px, 0px)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(0px, 300px, 0px)'); })); it('should be able to lock dragging along the y axis while using constrainPosition', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragLockAxis.set('y'); fixture.componentInstance.constrainPosition = ( {x, y}: Point, _dragRef: DragRef, _dimensions: DOMRect, pickup: Point, ) => { x -= pickup.x; y -= pickup.y; return {x, y}; }; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(0px, 100px, 0px)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(0px, 300px, 0px)'); })); it('should add a class while an element is being dragged', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const element = fixture.componentInstance.dragElement.nativeElement; expect(element.classList).not.toContain('cdk-drag-dragging'); startDraggingViaMouse(fixture, element); expect(element.classList).toContain('cdk-drag-dragging'); dispatchMouseEvent(document, 'mouseup'); fixture.detectChanges(); expect(element.classList).not.toContain('cdk-drag-dragging'); })); it('should add a class while an element is being dragged with OnPush change detection', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithOnPush); fixture.detectChanges(); const element = fixture.componentInstance.dragElement.nativeElement; expect(element.classList).not.toContain('cdk-drag-dragging'); startDraggingViaMouse(fixture, element); expect(element.classList).toContain('cdk-drag-dragging'); dispatchMouseEvent(document, 'mouseup'); fixture.detectChanges(); expect(element.classList).not.toContain('cdk-drag-dragging'); })); it('should not add a class if item was not dragged more than the threshold', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable, {dragDistance: 5}); fixture.detectChanges(); const element = fixture.componentInstance.dragElement.nativeElement; expect(element.classList).not.toContain('cdk-drag-dragging'); startDraggingViaMouse(fixture, element); expect(element.classList).not.toContain('cdk-drag-dragging'); })); it('should be able to set an alternate drag root element', fakeAsync(() => { const fixture = createComponent(DraggableWithAlternateRoot); fixture.componentInstance.rootElementSelector = '.alternate-root'; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragRoot = fixture.componentInstance.dragRoot.nativeElement; const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragRoot.style.transform).toBeFalsy(); expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragRoot, 50, 100); expect(dragRoot.style.transform).toBe('translate3d(50px, 100px, 0px)'); expect(dragElement.style.transform).toBeFalsy(); })); it('should be able to set the cdkDrag element as handle if it has a different root element', fakeAsync(() => { const fixture = createComponent(DraggableWithAlternateRootAndSelfHandle); fixture.detectChanges(); const dragRoot = fixture.componentInstance.dragRoot.nativeElement; const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragRoot.style.transform).toBeFalsy(); expect(dragElement.style.transform).toBeFalsy(); // Try dragging the root. This should be possible since the drag element is the handle. dragElementViaMouse(fixture, dragRoot, 50, 100); expect(dragRoot.style.transform).toBeFalsy(); expect(dragElement.style.transform).toBeFalsy(); // Drag via the drag element which acts as the handle. dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragRoot.style.transform).toBe('translate3d(50px, 100px, 0px)'); expect(dragElement.style.transform).toBeFalsy(); })); it('should be able to set an alternate drag root element for ng-container', fakeAsync(() => { const fixture = createComponent(DraggableNgContainerWithAlternateRoot); fixture.detectChanges(); const dragRoot = fixture.componentInstance.dragRoot.nativeElement; expect(dragRoot.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragRoot, 50, 100); expect(dragRoot.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); it('should preserve the initial transform if the root element changes', fakeAsync(() => { const fixture = createComponent(DraggableWithAlternateRoot); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const alternateRoot = fixture.componentInstance.dragRoot.nativeElement; dragElement.style.transform = 'translateX(-50%)'; dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toContain('translateX(-50%)'); alternateRoot.style.transform = 'scale(2)'; fixture.componentInstance.rootElementSelector = '.alternate-root'; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); dragElementViaMouse(fixture, alternateRoot, 50, 100); expect(alternateRoot.style.transform).not.toContain('translateX(-50%)'); expect(alternateRoot.style.transform).toContain('scale(2)'); })); it('should handle the root element selector changing after init', fakeAsync(() => { const fixture = createComponent(DraggableWithAlternateRoot); fixture.detectChanges(); tick(); fixture.componentInstance.rootElementSelector = '.alternate-root'; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragRoot = fixture.componentInstance.dragRoot.nativeElement; const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragRoot.style.transform).toBeFalsy(); expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragRoot, 50, 100); expect(dragRoot.style.transform).toBe('translate3d(50px, 100px, 0px)'); expect(dragElement.style.transform).toBeFalsy(); })); it('should not be able to drag the element if dragging is disabled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.classList).not.toContain('cdk-drag-disabled'); fixture.componentInstance.dragDisabled.set(true); fixture.detectChanges(); expect(dragElement.classList).toContain('cdk-drag-disabled'); expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBeFalsy(); })); it('should enable native drag interactions if dragging is disabled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const styles = dragElement.style; expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); fixture.componentInstance.dragDisabled.set(true); fixture.detectChanges(); expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); })); it('should enable native drag interactions if not dragging', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const styles = dragElement.style; expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); })); it('should disable native drag interactions if dragging', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const styles = dragElement.style; expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); startDraggingViaMouse(fixture, dragElement); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); expect(styles.touchAction || (styles as any).webkitUserDrag).toBe('none'); })); it('should re-enable drag interactions once dragging is over', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const styles = dragElement.style; startDraggingViaMouse(fixture, dragElement); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); expect(styles.touchAction || (styles as any).webkitUserDrag).toBe('none'); dispatchMouseEvent(document, 'mouseup', 50, 100); fixture.detectChanges(); expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); })); it('should not stop propagation for the drag sequence start event by default', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const event = createMouseEvent('mousedown'); spyOn(event, 'stopPropagation').and.callThrough(); dispatchEvent(dragElement, event); fixture.detectChanges(); expect(event.stopPropagation).not.toHaveBeenCalled(); })); it('should not throw if destroyed before the first change detection run', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); expect(() => { fixture.destroy(); }).not.toThrow(); })); it('should enable native drag interactions on the drag item when there is a handle', () => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.touchAction).not.toBe('none'); }); it('should disable native drag interactions on the drag handle', () => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const styles = fixture.componentInstance.handleElement.nativeElement.style; expect(styles.touchAction || (styles as any).webkitUserDrag).toBe('none'); }); it('should enable native drag interactions on the drag handle if dragging is disabled', () => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); fixture.componentInstance.draggingDisabled = true; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const styles = fixture.componentInstance.handleElement.nativeElement.style; expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); }); it( 'should enable native drag interactions on the drag handle if dragging is disabled ' + 'on init', () => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.componentInstance.draggingDisabled = true; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const styles = fixture.componentInstance.handleElement.nativeElement.style; expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); }, ); it('should toggle native drag interactions based on whether the handle is disabled', () => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); fixture.componentInstance.handleInstance.disabled = true; fixture.detectChanges(); const styles = fixture.componentInstance.handleElement.nativeElement.style; expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); fixture.componentInstance.handleInstance.disabled = false; fixture.detectChanges(); expect(styles.touchAction || (styles as any).webkitUserDrag).toBe('none'); }); it('should be able to reset a freely-dragged item to its initial position', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); fixture.componentInstance.dragInstance.reset(); expect(dragElement.style.transform).toBeFalsy(); })); it('should preserve initial transform after resetting', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElement.style.transform = 'scale(2)'; dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px) scale(2)'); fixture.componentInstance.dragInstance.reset(); expect(dragElement.style.transform).toBe('scale(2)'); })); it('should start dragging an item from its initial position after a reset', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); fixture.componentInstance.dragInstance.reset(); dragElementViaMouse(fixture, dragElement, 25, 50); expect(dragElement.style.transform).toBe('translate3d(25px, 50px, 0px)'); })); it('should not dispatch multiple events for a mouse event right after a touch event', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; // Dispatch a touch sequence. dispatchTouchEvent(dragElement, 'touchstart'); fixture.detectChanges(); dispatchTouchEvent(dragElement, 'touchend'); fixture.detectChanges(); tick(); // Immediately dispatch a mouse sequence to simulate a fake event. startDraggingViaMouse(fixture, dragElement); fixture.detectChanges(); dispatchMouseEvent(dragElement, 'mouseup'); fixture.detectChanges(); tick(); expect(fixture.componentInstance.startedSpy).toHaveBeenCalledTimes(1); expect(fixture.componentInstance.endedSpy).toHaveBeenCalledTimes(1); })); it('should round the transform value', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 13.37, 37); expect(dragElement.style.transform).toBe('translate3d(13px, 37px, 0px)'); })); it('should allow for dragging to be constrained to an element', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.boundary = '.wrapper'; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); })); it('should allow for dragging to be constrained to an element while using constrainPosition', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.boundary = '.wrapper'; fixture.detectChanges(); fixture.componentInstance.dragInstance.constrainPosition = ( {x, y}: Point, _dragRef: DragRef, _dimensions: DOMRect, pickup: Point, ) => { x -= pickup.x; y -= pickup.y; return {x, y}; }; const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); })); it('should be able to pass in a DOM node as the boundary', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.boundary = fixture.nativeElement.querySelector('.wrapper'); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); })); it('should adjust the x offset if the boundary becomes narrower after a viewport resize', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); const boundary: HTMLElement = fixture.nativeElement.querySelector('.wrapper'); fixture.componentInstance.boundary = boundary; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); boundary.style.width = '150px'; dispatchFakeEvent(window, 'resize'); tick(20); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); it('should keep the old position if the boundary is invisible after a resize', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); const boundary: HTMLElement = fixture.nativeElement.querySelector('.wrapper'); fixture.componentInstance.boundary = boundary; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); boundary.style.display = 'none'; dispatchFakeEvent(window, 'resize'); tick(20); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); })); it('should handle the element and boundary dimensions changing between drag sequences', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); const boundary: HTMLElement = fixture.nativeElement.querySelector('.wrapper'); fixture.componentInstance.boundary = boundary; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); // Bump the width and height of both the boundary and the drag element. boundary.style.width = boundary.style.height = '300px'; dragElement.style.width = dragElement.style.height = '150px'; dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(150px, 150px, 0px)'); })); it('should adjust the y offset if the boundary becomes shorter after a viewport resize', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); const boundary: HTMLElement = fixture.nativeElement.querySelector('.wrapper'); fixture.componentInstance.boundary = boundary; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); boundary.style.height = '150px'; dispatchFakeEvent(window, 'resize'); tick(20); expect(dragElement.style.transform).toBe('translate3d(100px, 50px, 0px)'); })); it( 'should reset the x offset if the boundary becomes narrower than the element ' + 'after a resize', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); const boundary: HTMLElement = fixture.nativeElement.querySelector('.wrapper'); fixture.componentInstance.boundary = boundary; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); boundary.style.width = '50px'; dispatchFakeEvent(window, 'resize'); tick(20); expect(dragElement.style.transform).toBe('translate3d(0px, 100px, 0px)'); }), ); it('should reset the y offset if the boundary becomes shorter than the element after a resize', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); const boundary: HTMLElement = fixture.nativeElement.querySelector('.wrapper'); fixture.componentInstance.boundary = boundary; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; dragElementViaMouse(fixture, dragElement, 300, 300); expect(dragElement.style.transform).toBe('translate3d(100px, 100px, 0px)'); boundary.style.height = '50px'; dispatchFakeEvent(window, 'resize'); tick(20); expect(dragElement.style.transform).toBe('translate3d(100px, 0px, 0px)'); })); it('should allow for the position constrain logic to be customized', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); const spy = jasmine.createSpy('constrain position spy').and.returnValue({ x: 50, y: 50, } as Point); fixture.componentInstance.constrainPosition = spy; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 300, 300); expect(spy).toHaveBeenCalledWith( jasmine.objectContaining({x: 300, y: 300}), jasmine.any(DragRef), jasmine.anything(), jasmine.objectContaining({x: jasmine.any(Number), y: jasmine.any(Number)}), ); const elementRect = dragElement.getBoundingClientRect(); expect(Math.floor(elementRect.top)).toBe(50); expect(Math.floor(elementRect.left)).toBe(50); })); it('should throw if drag item is attached to an ng-container', () => { const errorHandler = jasmine.createSpyObj(['handleError']); createComponent(DraggableOnNgContainer, { providers: [ { provide: ErrorHandler, useValue: errorHandler, }, ], }).detectChanges(); expect(errorHandler.handleError.calls.mostRecent().args[0].message).toMatch( /^cdkDrag must be attached to an element node/, ); }); it('should cancel drag if the mouse moves before the delay is elapsed', fakeAsync(() => { // We can't use Jasmine's `clock` because Zone.js interferes with it. spyOn(Date, 'now').and.callFake(() => currentTime); let currentTime = 0; const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragStartDelay = 1000; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform) .withContext('Expected element not to be moved by default.') .toBeFalsy(); startDraggingViaMouse(fixture, dragElement); currentTime += 750; dispatchMouseEvent(document, 'mousemove', 50, 100); currentTime += 500; fixture.detectChanges(); expect(dragElement.style.transform) .withContext('Expected element not to be moved if the mouse moved before the delay.') .toBeFalsy(); })); it('should enable native drag interactions if mouse moves before the delay', fakeAsync(() => { // We can't use Jasmine's `clock` because Zone.js interferes with it. spyOn(Date, 'now').and.callFake(() => currentTime); let currentTime = 0; const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragStartDelay = 1000; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const styles = dragElement.style; expect(dragElement.style.transform) .withContext('Expected element not to be moved by default.') .toBeFalsy(); startDraggingViaMouse(fixture, dragElement); currentTime += 750; dispatchMouseEvent(document, 'mousemove', 50, 100); currentTime += 500; fixture.detectChanges(); expect(styles.touchAction || (styles as any).webkitUserDrag).toBeFalsy(); })); it('should allow dragging after the drag start delay is elapsed', fakeAsync(() => { // We can't use Jasmine's `clock` because Zone.js interferes with it. spyOn(Date, 'now').and.callFake(() => currentTime); let currentTime = 0; const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragStartDelay = 500; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform) .withContext('Expected element not to be moved by default.') .toBeFalsy(); dispatchMouseEvent(dragElement, 'mousedown'); fixture.detectChanges(); currentTime += 750; // The first `mousemove` here starts the sequence and the second one moves the element. dispatchMouseEvent(document, 'mousemove', 50, 100); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); expect(dragElement.style.transform) .withContext('Expected element to be dragged after all the time has passed.') .toBe('translate3d(50px, 100px, 0px)'); })); it('should not prevent the default touch action before the delay has elapsed', fakeAsync(() => { spyOn(Date, 'now').and.callFake(() => currentTime); let currentTime = 0; const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragStartDelay = 500; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform) .withContext('Expected element not to be moved by default.') .toBeFalsy(); dispatchTouchEvent(dragElement, 'touchstart'); fixture.detectChanges(); currentTime += 250; expect(dispatchTouchEvent(document, 'touchmove', 50, 100).defaultPrevented).toBe(false); })); it('should handle the drag delay as a string', fakeAsync(() => { // We can't use Jasmine's `clock` because Zone.js interferes with it. spyOn(Date, 'now').and.callFake(() => currentTime); let currentTime = 0; const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragStartDelay = '500'; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform) .withContext('Expected element not to be moved by default.') .toBeFalsy(); dispatchMouseEvent(dragElement, 'mousedown'); fixture.detectChanges(); currentTime += 750; // The first `mousemove` here starts the sequence and the second one moves the element. dispatchMouseEvent(document, 'mousemove', 50, 100); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); expect(dragElement.style.transform) .withContext('Expected element to be dragged after all the time has passed.') .toBe('translate3d(50px, 100px, 0px)'); })); it('should be able to configure the drag start delay based on the event type', fakeAsync(() => { // We can't use Jasmine's `clock` because Zone.js interferes with it. spyOn(Date, 'now').and.callFake(() => currentTime); let currentTime = 0; const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.dragStartDelay = {touch: 500, mouse: 0}; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform) .withContext('Expected element not to be moved by default.') .toBeFalsy(); dragElementViaTouch(fixture, dragElement, 50, 100); expect(dragElement.style.transform) .withContext('Expected element not to be moved via touch because it has a delay.') .toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform) .withContext('Expected element to be moved via mouse because it has no delay.') .toBe('translate3d(50px, 100px, 0px)'); })); it('should be able to get the current position', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const dragInstance = fixture.componentInstance.dragInstance; expect(dragInstance.getFreeDragPosition()).toEqual({x: 0, y: 0}); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragInstance.getFreeDragPosition()).toEqual({x: 50, y: 100}); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragInstance.getFreeDragPosition()).toEqual({x: 150, y: 300}); })); it('should be able to set the current position programmatically', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const dragInstance = fixture.componentInstance.dragInstance; dragInstance.setFreeDragPosition({x: 50, y: 100}); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); expect(dragInstance.getFreeDragPosition()).toEqual({x: 50, y: 100}); })); it('should be able to set the current position', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.freeDragPosition = {x: 50, y: 100}; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const dragInstance = fixture.componentInstance.dragInstance; expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); expect(dragInstance.getFreeDragPosition()).toEqual({x: 50, y: 100}); })); it('should be able to get the up-to-date position as the user is dragging', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const dragInstance = fixture.componentInstance.dragInstance; expect(dragInstance.getFreeDragPosition()).toEqual({x: 0, y: 0}); startDraggingViaMouse(fixture, dragElement); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); expect(dragInstance.getFreeDragPosition()).toEqual({x: 50, y: 100}); dispatchMouseEvent(document, 'mousemove', 100, 200); fixture.detectChanges(); expect(dragInstance.getFreeDragPosition()).toEqual({x: 100, y: 200}); })); it('should react to changes in the free drag position', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.freeDragPosition = {x: 50, y: 100}; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); fixture.componentInstance.freeDragPosition = {x: 100, y: 200}; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); expect(dragElement.style.transform).toBe('translate3d(100px, 200px, 0px)'); })); it('should be able to continue dragging after the current position was set', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.freeDragPosition = {x: 50, y: 100}; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); dragElementViaMouse(fixture, dragElement, 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 300px, 0px)'); })); it('should include the dragged distance as the user is dragging', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const spy = jasmine.createSpy('moved spy'); const subscription = fixture.componentInstance.dragInstance.moved.subscribe(spy); startDraggingViaMouse(fixture, dragElement); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); let event = spy.calls.mostRecent().args[0]; expect(event.distance).toEqual({x: 50, y: 100}); dispatchMouseEvent(document, 'mousemove', 75, 50); fixture.detectChanges(); event = spy.calls.mostRecent().args[0]; expect(event.distance).toEqual({x: 75, y: 50}); subscription.unsubscribe(); })); it('should be able to configure the drag input defaults through a provider', fakeAsync(() => { const config: DragDropConfig = { draggingDisabled: true, dragStartDelay: 1337, lockAxis: 'y', constrainPosition: () => ({x: 1337, y: 42}), previewClass: 'custom-preview-class', boundaryElement: '.boundary', rootElementSelector: '.root', previewContainer: 'parent', }; const fixture = createComponent(PlainStandaloneDraggable, { providers: [ { provide: CDK_DRAG_CONFIG, useValue: config, }, ], }); fixture.detectChanges(); const drag = fixture.componentInstance.dragInstance; expect(drag.disabled).toBe(true); expect(drag.dragStartDelay).toBe(1337); expect(drag.lockAxis).toBe('y'); expect(drag.constrainPosition).toBe(config.constrainPosition); expect(drag.previewClass).toBe('custom-preview-class'); expect(drag.boundaryElement).toBe('.boundary'); expect(drag.rootElementSelector).toBe('.root'); expect(drag.previewContainer).toBe('parent'); })); it('should not throw if touches and changedTouches are empty', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; startDraggingViaTouch(fixture, dragElement); continueDraggingViaTouch(fixture, 50, 100); const event = createTouchEvent('touchend', 50, 100); Object.defineProperties(event, { touches: {get: () => []}, changedTouches: {get: () => []}, }); expect(() => { dispatchEvent(document, event); fixture.detectChanges(); tick(); }).not.toThrow(); })); it('should update the free drag position if the page is scrolled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const cleanup = makeScrollable(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); startDraggingViaMouse(fixture, dragElement, 0, 0); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); scrollTo(0, 500); dispatchFakeEvent(document, 'scroll'); fixture.detectChanges(); expect(dragElement.style.transform).toBe('translate3d(50px, 600px, 0px)'); cleanup(); })); it('should update the free drag position if the user moves their pointer after the page is scrolled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.detectChanges(); const cleanup = makeScrollable(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); startDraggingViaMouse(fixture, dragElement, 0, 0); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); scrollTo(0, 500); dispatchFakeEvent(document, 'scroll'); fixture.detectChanges(); dispatchMouseEvent(document, 'mousemove', 50, 200); fixture.detectChanges(); expect(dragElement.style.transform).toBe('translate3d(50px, 700px, 0px)'); cleanup(); })); it('should account for scale when moving the element', fakeAsync(() => { const fixture = createComponent(StandaloneDraggable); fixture.componentInstance.scale = 0.5; fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBe('translate3d(100px, 200px, 0px)'); })); describe('with a handle', () => { it('should not be able to drag the entire element if it has a handle', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform).toBeFalsy(); })); it('should be able to drag an element using its handle', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, handle, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); it('should not be able to drag the element if the handle is disabled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; fixture.componentInstance.handleInstance.disabled = true; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, handle, 50, 100); expect(dragElement.style.transform).toBeFalsy(); })); it('should not be able to drag the element if the handle is disabled before init', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithPreDisabledHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, handle, 50, 100); expect(dragElement.style.transform).toBeFalsy(); })); it('should not be able to drag using the handle if the element is disabled', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; fixture.componentInstance.draggingDisabled = true; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, handle, 50, 100); expect(dragElement.style.transform).toBeFalsy(); })); it('should be able to use a handle that was added after init', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithDelayedHandle); fixture.detectChanges(); fixture.componentInstance.showHandle = true; fixture.changeDetectorRef.markForCheck(); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, handle, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); it('should be able to use more than one handle to drag the element', fakeAsync(async () => { const fixture = createComponent(StandaloneDraggableWithMultipleHandles); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handles = fixture.componentInstance.handles.map(handle => handle.element.nativeElement); expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, handles[1], 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); dragElementViaMouse(fixture, handles[0], 100, 200); expect(dragElement.style.transform).toBe('translate3d(150px, 300px, 0px)'); })); it('should be able to drag with a handle that is not a direct descendant', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithIndirectHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, dragElement, 50, 100); expect(dragElement.style.transform) .withContext('Expected not to be able to drag the element by itself.') .toBeFalsy(); dragElementViaMouse(fixture, handle, 50, 100); expect(dragElement.style.transform) .withContext('Expected to drag the element by its handle.') .toBe('translate3d(50px, 100px, 0px)'); })); it('should disable the tap highlight while dragging via the handle', fakeAsync(() => { // This test is irrelevant if the browser doesn't support styling the tap highlight color. if (!('webkitTapHighlightColor' in document.body.style)) { return; } const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; expect((dragElement.style as any).webkitTapHighlightColor).toBeFalsy(); startDraggingViaMouse(fixture, handle); expect((dragElement.style as any).webkitTapHighlightColor).toBe('transparent'); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); dispatchMouseEvent(document, 'mouseup', 50, 100); fixture.detectChanges(); expect((dragElement.style as any).webkitTapHighlightColor).toBeFalsy(); })); it('should preserve any existing `webkitTapHighlightColor`', fakeAsync(() => { // This test is irrelevant if the browser doesn't support styling the tap highlight color. if (!('webkitTapHighlightColor' in document.body.style)) { return; } const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handle = fixture.componentInstance.handleElement.nativeElement; (dragElement.style as any).webkitTapHighlightColor = 'purple'; startDraggingViaMouse(fixture, handle); expect((dragElement.style as any).webkitTapHighlightColor).toBe('transparent'); dispatchMouseEvent(document, 'mousemove', 50, 100); fixture.detectChanges(); dispatchMouseEvent(document, 'mouseup', 50, 100); fixture.detectChanges(); expect((dragElement.style as any).webkitTapHighlightColor).toBe('purple'); })); it('should throw if drag handle is attached to an ng-container', fakeAsync(() => { expect(() => { createComponent(DragHandleOnNgContainer).detectChanges(); flush(); }).toThrowError(/^cdkDragHandle must be attached to an element node/); })); it('should be able to drag an element using a handle with a shadow DOM child', fakeAsync(() => { if (!_supportsShadowDom()) { return; } const fixture = createComponent(StandaloneDraggableWithShadowInsideHandle); fixture.detectChanges(); const dragElement = fixture.componentInstance.dragElement.nativeElement; const handleChild = fixture.componentInstance.handleChild.nativeElement; expect(dragElement.style.transform).toBeFalsy(); dragElementViaMouse(fixture, handleChild, 50, 100); expect(dragElement.style.transform).toBe('translate3d(50px, 100px, 0px)'); })); it('should prevent default dragStart on handle, not on entire draggable', fakeAsync(() => { const fixture = createComponent(StandaloneDraggableWithHandle); fixture.detectChanges(); const draggableEvent = dispatchFakeEvent( fixture.componentInstance.dragElement.nativeElement, 'dragstart', ); fixture.detectChanges(); const handleEvent = dispatchFakeEvent( fixture.componentInstance.handleElement.nativeElement, 'dragstart', true, ); fixture.detectChanges(); expect(draggableEvent.defaultPrevented).toBe(false); expect(handleEvent.defaultPrevented).toBe(true); })); }); }); @Component({ template: ` <div class="wrapper" style="width: 200px; height: 200px; background: green;"> <div cdkDrag [cdkDragBoundary]="boundary" [cdkDragStartDelay]="dragStartDelay" [cdkDragConstrainPosition]="constrainPosition" [cdkDragFreeDragPosition]="freeDragPosition" [cdkDragDisabled]="dragDisabled()" [cdkDragLockAxis]="dragLockAxis()" [cdkDragScale]="scale" (cdkDragStarted)="startedSpy($event)" (cdkDragReleased)="releasedSpy($event)" (cdkDragEnded)="endedSpy($event)" #dragElement style="width: 100px; height: 100px; background: red;"></div> </div> `, standalone: true, imports: [CdkDrag], }) class StandaloneDraggable { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild(CdkDrag) dragInstance: CdkDrag; startedSpy = jasmine.createSpy('started spy'); endedSpy = jasmine.createSpy('ended spy'); releasedSpy = jasmine.createSpy('released spy'); boundary: string | HTMLElement; dragStartDelay: number | string | {touch: number; mouse: number}; constrainPosition: ( userPointerPosition: Point, dragRef: DragRef, dimensions: DOMRect, pickupPositionInElement: Point, ) => Point; freeDragPosition?: {x: number; y: number}; dragDisabled = signal(false); dragLockAxis = signal<DragAxis | undefined>(undefined); scale = 1; } @Component({ changeDetection: ChangeDetectionStrategy.OnPush, template: ` <div cdkDrag #dragElement style="width: 100px; height: 100px; background: red;"></div> `, standalone: true, imports: [CdkDrag], }) class StandaloneDraggableWithOnPush { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild(CdkDrag) dragInstance: CdkDrag; } @Component({ template: ` <div #dragElement cdkDrag [cdkDragDisabled]="draggingDisabled" style="width: 100px; height: 100px; background: red; position: relative"> <div #handleElement cdkDragHandle style="width: 10px; height: 10px; background: green;"></div> </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle], }) class StandaloneDraggableWithHandle { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild('handleElement') handleElement: ElementRef<HTMLElement>; @ViewChild(CdkDrag) dragInstance: CdkDrag; @ViewChild(CdkDragHandle) handleInstance: CdkDragHandle; draggingDisabled = false; } @Component({ template: ` <div #dragElement cdkDrag style="width: 100px; height: 100px; background: red; position: relative"> <div #handleElement cdkDragHandle [cdkDragHandleDisabled]="disableHandle" style="width: 10px; height: 10px; background: green;"></div> </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle], }) class StandaloneDraggableWithPreDisabledHandle { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild('handleElement') handleElement: ElementRef<HTMLElement>; @ViewChild(CdkDrag) dragInstance: CdkDrag; disableHandle = true; } @Component({ template: ` <div #dragElement cdkDrag style="width: 100px; height: 100px; background: red; position: relative"> @if (showHandle) { <div #handleElement cdkDragHandle style="width: 10px; height: 10px; background: green;"></div> } </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle], }) class StandaloneDraggableWithDelayedHandle { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild('handleElement') handleElement: ElementRef<HTMLElement>; showHandle = false; } /** * Component that passes through whatever content is projected into it. * Used to test having drag elements being projected into a component. */ @Component({ selector: 'passthrough-component', template: '<ng-content></ng-content>', standalone: true, }) class PassthroughComponent {} @Component({ template: ` <div #dragElement cdkDrag style="width: 100px; height: 100px; background: red; position: relative"> <passthrough-component> <div #handleElement cdkDragHandle style="width: 10px; height: 10px; background: green;"></div> </passthrough-component> </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle, PassthroughComponent], }) class StandaloneDraggableWithIndirectHandle { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild('handleElement') handleElement: ElementRef<HTMLElement>; } @Component({ selector: 'shadow-wrapper', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.ShadowDom, standalone: true, }) class ShadowWrapper {} @Component({ template: ` <div #dragElement cdkDrag style="width: 100px; height: 100px; background: red;"> <div cdkDragHandle style="width: 10px; height: 10px;"> <shadow-wrapper> <div #handleChild style="width: 10px; height: 10px; background: green;"></div> </shadow-wrapper> </div> </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle, ShadowWrapper], }) class StandaloneDraggableWithShadowInsideHandle { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild('handleChild') handleChild: ElementRef<HTMLElement>; } @Component({ encapsulation: ViewEncapsulation.None, styles: ` .cdk-drag-handle { position: absolute; top: 0; background: green; width: 10px; height: 10px; } `, template: ` <div #dragElement cdkDrag style="width: 100px; height: 100px; background: red; position: relative"> <div cdkDragHandle style="left: 0;"></div> <div cdkDragHandle style="right: 0;"></div> </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle], }) class StandaloneDraggableWithMultipleHandles { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChildren(CdkDragHandle) handles: QueryList<CdkDragHandle>; } @Component({ template: ` <div #dragRoot class="alternate-root" style="width: 200px; height: 200px; background: hotpink"> <div cdkDrag [cdkDragRootElement]="rootElementSelector" #dragElement style="width: 100px; height: 100px; background: red;"></div> </div> `, standalone: true, imports: [CdkDrag], }) class DraggableWithAlternateRoot { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild('dragRoot') dragRoot: ElementRef<HTMLElement>; @ViewChild(CdkDrag) dragInstance: CdkDrag; rootElementSelector: string; } @Component({ template: ` <ng-container cdkDrag></ng-container> `, standalone: true, imports: [CdkDrag], }) class DraggableOnNgContainer {} @Component({ template: ` <div cdkDrag> <ng-container cdkDragHandle></ng-container> </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle], }) class DragHandleOnNgContainer {} @Component({ template: ` <div #dragRoot class="alternate-root" style="width: 200px; height: 200px; background: hotpink"> <div cdkDrag cdkDragRootElement=".alternate-root" cdkDragHandle #dragElement style="width: 100px; height: 100px; background: red;"></div> </div> `, standalone: true, imports: [CdkDrag, CdkDragHandle], }) class DraggableWithAlternateRootAndSelfHandle { @ViewChild('dragElement') dragElement: ElementRef<HTMLElement>; @ViewChild('dragRoot') dragRoot: ElementRef<HTMLElement>; @ViewChild(CdkDrag) dragInstance: CdkDrag; } @Component({ template: ` <div #dragRoot class="alternate-root" style="width: 200px; height: 200px; background: hotpink"> <ng-container cdkDrag cdkDragRootElement=".alternate-root"> <div style="width: 100px; height: 100px; background: red;"></div> </ng-container> </div> `, standalone: true, imports: [CdkDrag], }) class DraggableNgContainerWithAlternateRoot { @ViewChild('dragRoot') dragRoot: ElementRef<HTMLElement>; @ViewChild(CdkDrag) dragInstance: CdkDrag; } @Component({ template: `<div cdkDrag></div>`, standalone: true, imports: [CdkDrag], }) class PlainStandaloneDraggable { @ViewChild(CdkDrag) dragInstance: CdkDrag; } ```
/content/code_sandbox/src/cdk/drag-drop/directives/standalone-drag.spec.ts
xml
2016-01-04T18:50:02
2024-08-16T11:21:13
components
angular/components
24,263
16,392
```xml export const types = ` type TasksPipelineTemplateStage { _id: String! name: String! formId: String order: Int } input TasksPipelineTemplateStageInput { _id: String! name: String! formId: String } type TasksPipelineTemplate @key(fields: "_id") { _id: String! name: String! description: String type: String isDefinedByErxes: Boolean stages: [TasksPipelineTemplateStage] createdBy: String createdAt: Date } `; const commonParams = ` name: String! description: String type: String! stages: [TasksPipelineTemplateStageInput] `; export const queries = ` tasksPipelineTemplates(type: String!): [TasksPipelineTemplate] tasksPipelineTemplateDetail(_id: String!): TasksPipelineTemplate tasksPipelineTemplatesTotalCount: Int `; export const mutations = ` tasksPipelineTemplatesAdd(${commonParams}): TasksPipelineTemplate tasksPipelineTemplatesEdit(_id: String!, ${commonParams}): TasksPipelineTemplate tasksPipelineTemplatesRemove(_id: String!): JSON tasksPipelineTemplatesDuplicate(_id: String!): TasksPipelineTemplate `; ```
/content/code_sandbox/packages/plugin-tasks-api/src/graphql/schema/pipelineTemplate.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
271
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.cs.allow-jit</key> <true/> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.files.user-selected.read-only</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> <key>com.apple.security.cs.allow-dyld-environment-variables</key> <true/> </dict> </plist> ```
/content/code_sandbox/electron/entitlements.plist
xml
2016-03-06T15:19:53
2024-08-15T14:27:10
signal
ryohey/signal
1,238
168
```xml import { IConfigDocument } from '../../models/definitions/configs'; import { IPosUserDocument } from '../../models/definitions/posUsers'; import { IOrderInput } from '../types'; export const checkDirectDiscount = ( orderInput: IOrderInput, config: IConfigDocument, posUser: IPosUserDocument ): IOrderInput => { const { directDiscount, items } = orderInput; const { adminIds, cashierIds, permissionConfig } = config; const output = { ...orderInput, directDiscount: 0 }; if ( !directDiscount || !posUser || !isAuthorizedUser(posUser._id, adminIds, cashierIds) ) { return output; } const isAdmin = adminIds.includes(posUser._id); const staffConfig = permissionConfig[isAdmin ? 'admins' : 'cashiers']; if (!staffConfig?.directDiscount) return output; const limit = parseFloat(staffConfig?.directDiscountLimit); if (isNaN(limit)) return output; if (directDiscount > limit) { throw new Error( `Direct discount limit of ${isAdmin ? 'admins' : 'cashiers'} exceeded` ); } applyDiscount(items, directDiscount); return orderInput; }; const isAuthorizedUser = ( userId: string, adminIds: string[], cashierIds: string[] ): boolean => { return cashierIds.concat(adminIds).includes(userId); }; const applyDiscount = ( items: IOrderInput['items'], directDiscount: number ): void => { for (const item of items || []) { const discountValue = parseFloat( ((item.unitPrice * directDiscount) / 100).toFixed(2) ); item.unitPrice -= discountValue; item.discountAmount = discountValue * item.count; } }; ```
/content/code_sandbox/packages/plugin-posclient-api/src/graphql/utils/directDiscount.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
394
```xml /// /// /// /// path_to_url /// /// Unless required by applicable law or agreed to in writing, software /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// import { Component } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; import { BasicWidgetConfigComponent } from '@home/components/widget/config/widget-config.component.models'; import { WidgetConfigComponentData } from '@home/models/widget-component.models'; import { DataKey, Datasource, WidgetConfig } from '@shared/models/widget.models'; import { WidgetConfigComponent } from '@home/components/widget/widget-config.component'; import { isUndefined } from '@core/utils'; import { getTimewindowConfig, setTimewindowConfig } from '@home/components/widget/config/timewindow-config-panel.component'; @Component({ selector: 'tb-alarms-table-basic-config', templateUrl: './alarms-table-basic-config.component.html', styleUrls: ['../basic-config.scss'] }) export class AlarmsTableBasicConfigComponent extends BasicWidgetConfigComponent { public get alarmSource(): Datasource { const datasources: Datasource[] = this.alarmsTableWidgetConfigForm.get('datasources').value; if (datasources && datasources.length) { return datasources[0]; } else { return null; } } alarmsTableWidgetConfigForm: UntypedFormGroup; constructor(protected store: Store<AppState>, protected widgetConfigComponent: WidgetConfigComponent, private fb: UntypedFormBuilder) { super(store, widgetConfigComponent); } protected configForm(): UntypedFormGroup { return this.alarmsTableWidgetConfigForm; } protected onConfigSet(configData: WidgetConfigComponentData) { this.alarmsTableWidgetConfigForm = this.fb.group({ timewindowConfig: [getTimewindowConfig(configData.config), []], alarmFilterConfig: [configData.config.alarmFilterConfig, []], datasources: [[configData.config.alarmSource], []], columns: [this.getColumns(configData.config.alarmSource), []], showTitle: [configData.config.showTitle, []], title: [configData.config.settings?.alarmsTitle, []], titleFont: [configData.config.titleFont, []], titleColor: [configData.config.titleColor, []], showTitleIcon: [configData.config.showTitleIcon, []], titleIcon: [configData.config.titleIcon, []], iconColor: [configData.config.iconColor, []], displayActivity: [configData.config.settings?.displayActivity, []], displayDetails: [configData.config.settings?.displayDetails, []], allowAssign: [configData.config.settings?.allowAssign, []], allowAcknowledgment: [configData.config.settings?.allowAcknowledgment, []], allowClear: [configData.config.settings?.allowClear, []], cardButtons: [this.getCardButtons(configData.config), []], color: [configData.config.color, []], backgroundColor: [configData.config.backgroundColor, []], actions: [configData.config.actions || {}, []] }); } protected prepareOutputConfig(config: any): WidgetConfigComponentData { setTimewindowConfig(this.widgetConfig.config, config.timewindowConfig); this.widgetConfig.config.alarmFilterConfig = config.alarmFilterConfig; this.widgetConfig.config.alarmSource = config.datasources[0]; this.setColumns(config.columns, this.widgetConfig.config.alarmSource); this.widgetConfig.config.actions = config.actions; this.widgetConfig.config.showTitle = config.showTitle; this.widgetConfig.config.settings = this.widgetConfig.config.settings || {}; this.widgetConfig.config.settings.alarmsTitle = config.title; this.widgetConfig.config.settings.displayActivity = config.displayActivity; this.widgetConfig.config.settings.displayDetails = config.displayDetails; this.widgetConfig.config.settings.allowAssign = config.allowAssign; this.widgetConfig.config.settings.allowAcknowledgment = config.allowAcknowledgment; this.widgetConfig.config.settings.allowClear = config.allowClear; this.widgetConfig.config.titleFont = config.titleFont; this.widgetConfig.config.titleColor = config.titleColor; this.widgetConfig.config.showTitleIcon = config.showTitleIcon; this.widgetConfig.config.titleIcon = config.titleIcon; this.widgetConfig.config.iconColor = config.iconColor; this.setCardButtons(config.cardButtons, this.widgetConfig.config); this.widgetConfig.config.color = config.color; this.widgetConfig.config.backgroundColor = config.backgroundColor; return this.widgetConfig; } protected validatorTriggers(): string[] { return ['showTitle', 'showTitleIcon']; } protected updateValidators(emitEvent: boolean, trigger?: string) { const showTitle: boolean = this.alarmsTableWidgetConfigForm.get('showTitle').value; const showTitleIcon: boolean = this.alarmsTableWidgetConfigForm.get('showTitleIcon').value; if (showTitle) { this.alarmsTableWidgetConfigForm.get('title').enable(); this.alarmsTableWidgetConfigForm.get('titleFont').enable(); this.alarmsTableWidgetConfigForm.get('titleColor').enable(); this.alarmsTableWidgetConfigForm.get('showTitleIcon').enable({emitEvent: false}); if (showTitleIcon) { this.alarmsTableWidgetConfigForm.get('titleIcon').enable(); this.alarmsTableWidgetConfigForm.get('iconColor').enable(); } else { this.alarmsTableWidgetConfigForm.get('titleIcon').disable(); this.alarmsTableWidgetConfigForm.get('iconColor').disable(); } } else { this.alarmsTableWidgetConfigForm.get('title').disable(); this.alarmsTableWidgetConfigForm.get('titleFont').disable(); this.alarmsTableWidgetConfigForm.get('titleColor').disable(); this.alarmsTableWidgetConfigForm.get('showTitleIcon').disable({emitEvent: false}); this.alarmsTableWidgetConfigForm.get('titleIcon').disable(); this.alarmsTableWidgetConfigForm.get('iconColor').disable(); } this.alarmsTableWidgetConfigForm.get('title').updateValueAndValidity({emitEvent}); this.alarmsTableWidgetConfigForm.get('titleFont').updateValueAndValidity({emitEvent}); this.alarmsTableWidgetConfigForm.get('titleColor').updateValueAndValidity({emitEvent}); this.alarmsTableWidgetConfigForm.get('showTitleIcon').updateValueAndValidity({emitEvent: false}); this.alarmsTableWidgetConfigForm.get('titleIcon').updateValueAndValidity({emitEvent}); this.alarmsTableWidgetConfigForm.get('iconColor').updateValueAndValidity({emitEvent}); } private getColumns(alarmSource?: Datasource): DataKey[] { if (alarmSource) { return alarmSource.dataKeys || []; } return []; } private setColumns(columns: DataKey[], alarmSource?: Datasource) { if (alarmSource) { alarmSource.dataKeys = columns; } } private getCardButtons(config: WidgetConfig): string[] { const buttons: string[] = []; if (isUndefined(config.settings?.enableSearch) || config.settings?.enableSearch) { buttons.push('search'); } if (isUndefined(config.settings?.enableFilter) || config.settings?.enableFilter) { buttons.push('filter'); } if (isUndefined(config.settings?.enableSelectColumnDisplay) || config.settings?.enableSelectColumnDisplay) { buttons.push('columnsToDisplay'); } if (isUndefined(config.enableFullscreen) || config.enableFullscreen) { buttons.push('fullscreen'); } return buttons; } private setCardButtons(buttons: string[], config: WidgetConfig) { config.settings.enableSearch = buttons.includes('search'); config.settings.enableFilter = buttons.includes('filter'); config.settings.enableSelectColumnDisplay = buttons.includes('columnsToDisplay'); config.enableFullscreen = buttons.includes('fullscreen'); } } ```
/content/code_sandbox/ui-ngx/src/app/modules/home/components/widget/config/basic/alarm/alarms-table-basic-config.component.ts
xml
2016-12-01T09:33:30
2024-08-16T19:58:25
thingsboard
thingsboard/thingsboard
16,820
1,751
```xml /** * @license * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import {cssClasses, numbers} from '../../mdc-ripple/constants'; import {MDCRippleFoundation} from '../../mdc-ripple/foundation'; import {captureHandlers, checkNumTimesSpyCalledWithArgs} from '../../../testing/helpers/foundation'; import {setUpMdcTestEnvironment} from '../../../testing/helpers/setup'; import {testFoundation} from './helpers'; const {DEACTIVATION_TIMEOUT_MS} = numbers; describe('MDCRippleFoundation - Deactivation logic', () => { setUpMdcTestEnvironment(); testFoundation( 'runs deactivation UX on touchend after touchstart', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['touchstart']({changedTouches: [{pageX: 0, pageY: 0}]}); jasmine.clock().tick(1); documentHandlers['touchend'](); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); // NOTE: here and below, we use {times: 2} as these classes are removed // during activation as well in order to support re-triggering the // ripple. We want to test that this is called a *second* time when // deactivating. checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'runs deactivation UX on pointerup after pointerdown', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['pointerdown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['pointerup'](); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'runs deactivation UX on contextmenu after pointerdown', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['pointerdown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['contextmenu'](); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'runs deactivation UX on mouseup after mousedown', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['mouseup'](); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'runs deactivation UX on contextmenu after mousedown', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['contextmenu'](); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'runs deactivation on keyup after keydown when keydown makes surface active', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); adapter.isSurfaceActive.and.returnValue(true); foundation.init(); jasmine.clock().tick(1); handlers['keydown']({key: 'Space'}); jasmine.clock().tick(1); handlers['keyup']({key: 'Space'}); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'does not run deactivation on keyup after keydown if keydown did not make surface active', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); adapter.isSurfaceActive.and.returnValue(false); foundation.init(); jasmine.clock().tick(1); handlers['keydown']({key: 'Space'}); jasmine.clock().tick(1); handlers['keyup']({key: 'Space'}); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); // Note that all of these should be called 0 times since a keydown that // does not make a surface active should never activate it in the first // place. expect(adapter.removeClass) .not.toHaveBeenCalledWith(cssClasses.FG_ACTIVATION); expect(adapter.addClass) .not.toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'runs deactivation UX on public deactivate() call', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { foundation.init(); jasmine.clock().tick(1); foundation.activate(); jasmine.clock().tick(1); foundation.deactivate(); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'runs deactivation UX when activation UX timer finishes first (activation held for a long time)', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); documentHandlers['mouseup'](); jasmine.clock().tick(1); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); expect(adapter.addClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); expect(adapter.removeClass) .toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'clears any pending deactivation UX timers when re-triggered', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); // Trigger the first interaction handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['mouseup'](); jasmine.clock().tick(1); // Simulate certain amount of delay between first and second interaction jasmine.clock().tick(20); // Trigger the second interaction handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['mouseup'](); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); // Verify that deactivation timer was called 3 times: // - Once during the initial activation // - Once again during the second activation when the ripple was // re-triggered // - A third and final time when the deactivation UX timer runs checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 3); checkNumTimesSpyCalledWithArgs( adapter.addClass, [cssClasses.FG_DEACTIVATION], 1); }); testFoundation( 'clears any pending foreground deactivation class removal timers when re-triggered', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); // Trigger the first interaction handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['mouseup'](); jasmine.clock().tick(1); // Tick the clock such that the deactivation UX gets run, but _not_ so // the foreground deactivation removal timer gets run jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); // Sanity check that the foreground deactivation class removal was only // called once within the activation code. checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_DEACTIVATION], 1); // Trigger another activation handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); // Tick the clock past the time when the initial foreground deactivation // timer would have ran. jasmine.clock().tick(numbers.FG_DEACTIVATION_MS); // Verify that the foreground deactivation class removal was only called // twice: once within the original activation, and again within this // subsequent activation; NOT by means of any timers firing. checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_DEACTIVATION], 2); }); testFoundation( 'waits until activation UX timer runs before removing active fill classes', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); documentHandlers['mouseup'](); // Test conditions slightly before the timeout lapses (subtracting ~2 // frames due to runToFrame above) jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS - 32); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 1); expect(adapter.addClass) .not.toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); jasmine.clock().tick(32); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_DEACTIVATION], 1); }); testFoundation( 'waits until actual deactivation UX is needed if animation finishes before deactivating', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); foundation.init(); jasmine.clock().tick(1); handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 1); expect(adapter.addClass) .not.toHaveBeenCalledWith(cssClasses.FG_DEACTIVATION); }); testFoundation( 'only re-activates when there are no additional pointer events to be processed', ({adapter, foundation}: {adapter: any, foundation: MDCRippleFoundation}) => { const handlers = captureHandlers(adapter, 'registerInteractionHandler'); const documentHandlers = captureHandlers(adapter, 'registerDocumentInteractionHandler'); foundation.init(); jasmine.clock().tick(1); // Simulate Android 6 / Chrome latest event flow. handlers['pointerdown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); handlers['touchstart']({changedTouches: [{pageX: 0, pageY: 0}]}); jasmine.clock().tick(1); jasmine.clock().tick(DEACTIVATION_TIMEOUT_MS); documentHandlers['pointerup'](); jasmine.clock().tick(1); // At this point, the deactivation UX should have run, since the initial // activation was triggered by a pointerdown event. checkNumTimesSpyCalledWithArgs( adapter.removeClass, [cssClasses.FG_ACTIVATION], 2); checkNumTimesSpyCalledWithArgs( adapter.addClass, [cssClasses.FG_DEACTIVATION], 1); // Also at this point, all of the document event handlers should have // been deregistered so no more will be called. ['mouseup', 'pointerup', 'touchend'].forEach((type) => { expect(adapter.deregisterDocumentInteractionHandler) .toHaveBeenCalledWith(type, jasmine.any(Function)); }); handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); // Verify that activation only happened once, at pointerdown checkNumTimesSpyCalledWithArgs( adapter.addClass, [cssClasses.FG_ACTIVATION], 1); documentHandlers['mouseup'](); jasmine.clock().tick(1); jasmine.clock().tick(numbers.TAP_DELAY_MS); // Finally, verify that since mouseup happened, we can re-activate the // ripple. handlers['mousedown']({pageX: 0, pageY: 0}); jasmine.clock().tick(1); checkNumTimesSpyCalledWithArgs( adapter.addClass, [cssClasses.FG_ACTIVATION], 2); }); }); ```
/content/code_sandbox/packages/mdc-ripple/test/foundation-deactivation.test.ts
xml
2016-12-05T16:04:09
2024-08-16T15:42:22
material-components-web
material-components/material-components-web
17,119
3,831
```xml <?xml version="1.0" encoding="UTF-8"?> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <file source-language="en" target-language="cs" datatype="plaintext" original="messages.en.xlf"> <body> <trans-unit id="N7mikjJ" resname="time_tracking" xml:space="preserve"> <source>Time Tracking</source> <target state="translated">Sledovn asu</target> </trans-unit> <trans-unit id="inmIkP6" resname="yes"> <source>yes</source> <target>Ano</target> </trans-unit> <trans-unit id="k5Apjz_" resname="no"> <source>no</source> <target>Ne</target> </trans-unit> <trans-unit id=".3dyBTq" resname="both"> <source>both</source> <target>Oba</target> </trans-unit> <trans-unit id="KLIuHvt" resname="This is a mandatory field"> <source>This is a mandatory field</source> <target>Toto pole je povinn</target> </trans-unit> <trans-unit id="_ohHsMM" resname="create"> <source>create</source> <target>Vytvoit</target> </trans-unit> <trans-unit id="DYHuW58" resname="confirm.delete"> <source>confirm.delete</source> <target>Opravdu to chcete smazat?</target> </trans-unit> <trans-unit id="vDd3alC" resname="admin_entity.delete_confirm"> <source>admin_entity.delete_confirm</source> <target state="translated">Tato data budou smazna! Ppadn mete data penst do jinho zznamu:</target> </trans-unit> <trans-unit id="COyxNde" resname="delete.not_in_use"> <source>delete.not_in_use</source> <target>Tuto poloku lze bezpen smazat.</target> </trans-unit> <trans-unit id="I3TZF5S" resname="cancel"> <source>cancel</source> <target>Zruit</target> </trans-unit> <trans-unit id="PyZ8KrQ" resname="confirm"> <source>confirm</source> <target>Potvrdit</target> </trans-unit> <trans-unit id="XohImNo" resname="password"> <source>Password</source> <target state="translated">Heslo</target> </trans-unit> <trans-unit id="hLEZkoC" resname="password_repeat"> <source>password_repeat</source> <target>Potvrzen hesla</target> </trans-unit> <trans-unit id="ACcM9j_" resname="logout"> <source>logout</source> <target>Odhlsit se</target> </trans-unit> <trans-unit id="_x2He8M" resname="user_profile"> <source>user_profile</source> <target>Mj profil</target> </trans-unit> <trans-unit id="T4nAM7X" resname="api_token"> <source>api_token</source> <target>API heslo</target> </trans-unit> <trans-unit id="aq59Sk8" resname="api_token_repeat"> <source>api_token_repeat</source> <target>Potvrdit API heslo</target> </trans-unit> <trans-unit id="UoOv6mx" resname="menu.homepage"> <source>menu.homepage</source> <target>Nstnka</target> </trans-unit> <trans-unit id="wvvYSw_" resname="menu.admin"> <source>menu.admin</source> <target>Sprva</target> </trans-unit> <trans-unit id="6OKwCUB" resname="menu.system"> <source>menu.system</source> <target>Systm</target> </trans-unit> <trans-unit id="wBTFKFR" resname="menu.logout"> <source>menu.logout</source> <target>Odhlsit se</target> </trans-unit> <trans-unit id="ebTjBb9" resname="my_times"> <source>my_times</source> <target>Moje asy</target> </trans-unit> <trans-unit id="yxQop43" resname="all_times"> <source>all_times</source> <target>Pracovn vkaz</target> </trans-unit> <trans-unit id="IeshU90" resname="customers"> <source>customers</source> <target>Zkaznci</target> </trans-unit> <trans-unit id="JXfA9Ve" resname="projects"> <source>projects</source> <target>Projekty</target> </trans-unit> <trans-unit id="YkyVVAY" resname="activities"> <source>activities</source> <target>Aktivity</target> </trans-unit> <trans-unit id="fftM9nd" resname="users"> <source>users</source> <target>Uivatel</target> </trans-unit> <trans-unit id="_t.2z4V" resname="teams"> <source>teams</source> <target>Skupiny</target> </trans-unit> <trans-unit id="hOZxcaK" resname="menu.plugin"> <source>menu.plugin</source> <target>Doplky</target> </trans-unit> <trans-unit id="IXtkHRw" resname="menu.system_configuration"> <source>menu.system_configuration</source> <target>Nastaven</target> </trans-unit> <trans-unit id="l4wviUE" resname="tags"> <source>tags</source> <target>ttky</target> </trans-unit> <trans-unit id="Vz3Igj3" resname="error.no_entries_found"> <source>error.no_entries_found</source> <target>Na zklad vybranch dat nebyly nalezeny dn zznamy.</target> </trans-unit> <trans-unit id="DodjLNR" resname="date"> <source>date</source> <target>Datum</target> </trans-unit> <trans-unit id="BHk4pZ3" resname="starttime"> <source>starttime</source> <target>Zatek</target> </trans-unit> <trans-unit id="eI_tMbq" resname="endtime"> <source>endtime</source> <target>Konec</target> </trans-unit> <trans-unit id="yqea9Nt" resname="duration"> <source>duration</source> <target>Doba trvn</target> </trans-unit> <trans-unit id="BPiZbad" resname="user"> <source>user</source> <target>Uivatel</target> </trans-unit> <trans-unit id="FveKfWM" resname="username"> <source>username</source> <target>Uivatelsk jmno</target> </trans-unit> <trans-unit id="yQRveje" resname="description"> <source>Description</source> <target state="translated">Popis</target> </trans-unit> <trans-unit id="gqNTf.D" resname="name"> <source>name</source> <target>Jmno</target> </trans-unit> <trans-unit id="xEuy.VF" resname="comment"> <source>comment</source> <target>Poznmka</target> </trans-unit> <trans-unit id="pWFFJwz" resname="id"> <source>id</source> <target>ID</target> </trans-unit> <trans-unit id="1C7xSXk" resname="visible"> <source>visible</source> <target>Viditeln</target> </trans-unit> <trans-unit id="CvlqjtY" resname="budget"> <source>budget</source> <target>Rozpoet</target> </trans-unit> <trans-unit id="qbD0dHa" resname="timeBudget"> <source>timeBudget</source> <target>Hodinov rozpoet</target> </trans-unit> <trans-unit id="BlGGO.X" resname="activity"> <source>activity</source> <target state="translated">Aktivita</target> </trans-unit> <trans-unit id="JEIQ5IQ" resname="project"> <source>project</source> <target>Projekt</target> </trans-unit> <trans-unit id="KhBzpuZ" resname="tag"> <source>tag</source> <target>ttek</target> </trans-unit> <trans-unit id="E_bHhGR" resname="hourlyRate"> <source>hourlyRate</source> <target>Hodinov mzda</target> </trans-unit> <trans-unit id="QEMUsfS" resname="hours"> <source>hours</source> <target>Hodin</target> </trans-unit> <trans-unit id="xUl3nXn" resname="rate"> <source>rate</source> <target>Sazba</target> </trans-unit> <trans-unit id="pO8wS6Q" resname="language"> <source>language</source> <target>Jazyk</target> </trans-unit> <trans-unit id="tsRYY4d" resname="customer"> <source>customer</source> <target>Zkaznk</target> </trans-unit> <trans-unit id="giREF.l" resname="email"> <source>email</source> <target>E-mail</target> </trans-unit> <trans-unit id="yosi0Nu" resname="team"> <source>team</source> <target>Team</target> </trans-unit> <trans-unit id="evFI7nW" resname="teamlead"> <source>teamlead</source> <target>Vedouc teamu</target> </trans-unit> <trans-unit id="Kw3N1AA" resname="actions"> <source>actions</source> <target>Akce</target> </trans-unit> <trans-unit id="ovKkXwU" resname="action.edit"> <source>action.edit</source> <target>Upravit</target> </trans-unit> <trans-unit id="YZdZVQP" resname="delete"> <source>action.delete</source> <target>Odstranit</target> </trans-unit> <trans-unit id="HLtdhYw" resname="action.save"> <source>action.save</source> <target>Uloit</target> </trans-unit> <trans-unit id="tKZKI2Z" resname="action.reset"> <source>action.reset</source> <target>Restart</target> </trans-unit> <trans-unit id="wCazS.X" resname="action.close"> <source>action.close</source> <target>Zavt</target> </trans-unit> <trans-unit id="3bqLM8Q" resname="dashboard.title"> <source>dashboard.title</source> <target>Nstnka</target> </trans-unit> <trans-unit id="muzkQpM" resname="toggle_dropdown"> <source>toggle_dropdown</source> <target>Zobrazit menu</target> </trans-unit> <trans-unit id="VXj0Y3h" resname="timesheet.title"> <source>timesheet.title</source> <target>Moje asy</target> </trans-unit> <trans-unit id="dwEVXUR" resname="timesheet.edit"> <source>timesheet.edit</source> <target>Upravit zznam</target> </trans-unit> <trans-unit id="5vB9Q7X" resname="begin"> <source>begin</source> <target state="translated">Od</target> </trans-unit> <trans-unit id="Nh5I0DC" resname="end"> <source>end</source> <target state="translated">Do</target> </trans-unit> <trans-unit id="iNOVZRh" resname="daterange"> <source>daterange</source> <target>asov rozsah</target> </trans-unit> <trans-unit id="UbnqJLn" resname="modal.columns.title"> <source>modal.columns.title</source> <target>Zmnit viditelnost sloubce</target> </trans-unit> <trans-unit id="_0tuMNE" resname="fixedRate"> <source>fixedRate</source> <target>Fixn sazba</target> </trans-unit> <trans-unit id="dChNncv" resname="color"> <source>color</source> <target>Barva</target> </trans-unit> <trans-unit id="1_wnK76" resname="profile.title"> <source>profile.title</source> <target>Profil uivatele</target> </trans-unit> <trans-unit id="HWKJZ0T" resname="profile.about_me"> <source>profile.about_me</source> <target>O mn</target> </trans-unit> <trans-unit id="Fm.kwVn" resname="profile.first_entry"> <source>profile.first_entry</source> <target>Zatek prce</target> </trans-unit> <trans-unit id="xEYQXPy" resname="profile.settings"> <source>profile.settings</source> <target>Profil</target> </trans-unit> <trans-unit id="A6TLLQa" resname="profile.password"> <source>profile.password</source> <target>Heslo</target> </trans-unit> <trans-unit id="Z34ZpjK" resname="profile.api-token"> <source>profile.api-token</source> <target state="translated">Pstup k API</target> </trans-unit> <trans-unit id="ygtTz8." resname="profile.roles"> <source>profile.roles</source> <target>loha</target> </trans-unit> <trans-unit id="MQKiG33" resname="profile.preferences"> <source>profile.preferences</source> <target>Pedvolby</target> </trans-unit> <trans-unit id="j4Kd9N1" resname="calendar_initial_view"> <source>calendar_initial_view</source> <target>Poten zobrazen kalende</target> </trans-unit> <trans-unit id="H.IqJTQ" resname="login_initial_view"> <source>login_initial_view</source> <target>Poten zobrazen po pihlen</target> </trans-unit> <trans-unit id="pcfRcZ4" resname="month"> <source>month</source> <target>Msc</target> </trans-unit> <trans-unit id="Irm6dfx" resname="agendaWeek"> <source>agendaWeek</source> <target>Tden</target> </trans-unit> <trans-unit id="Q0Zip02" resname="agendaDay"> <source>agendaDay</source> <target>Den</target> </trans-unit> <trans-unit id="r49TNAg" resname="daily_stats"> <source>daily_stats</source> <target>Zobrazit denn statistiky v pracovnm vkaze</target> </trans-unit> <trans-unit id="UVJ5Die" resname="calendar"> <source>calendar</source> <target>Kalend</target> </trans-unit> <trans-unit id="EohvnQA" resname="number"> <source>number</source> <target>et</target> </trans-unit> <trans-unit id="8WjM3ZF" resname="company"> <source>company</source> <target>Jmno spolenosti</target> </trans-unit> <trans-unit id="fFErSLq" resname="vat"> <source>vat</source> <target>Da</target> </trans-unit> <trans-unit id="CT59X9u" resname="contact"> <source>Contact</source> <target state="translated">Kontakt</target> </trans-unit> <trans-unit id="2Ayb_RD" resname="address"> <source>address</source> <target>Adresa</target> </trans-unit> <trans-unit id="r.ZOT9U" resname="country"> <source>country</source> <target>Zem</target> </trans-unit> <trans-unit id="RVadpX9" resname="phone"> <source>phone</source> <target>Telefon</target> </trans-unit> <trans-unit id="SvTiF8B" resname="fax"> <source>fax</source> <target>Fax</target> </trans-unit> <trans-unit id="1STBoIE" resname="mobile"> <source>mobile</source> <target>Mobiln telefon</target> </trans-unit> <trans-unit id="pcWhXux" resname="homepage"> <source>homepage</source> <target>Domc strnka</target> </trans-unit> <trans-unit id="OWLt7pw" resname="timezone"> <source>timezone</source> <target>asov psmo</target> </trans-unit> <trans-unit id="Rm5bnNV" resname="currency"> <source>currency</source> <target>Mna</target> </trans-unit> <trans-unit id="GgpqNso" resname="alias"> <source>alias</source> <target>Jmno</target> </trans-unit> <trans-unit id="qvIyBkY" resname="title"> <source>title</source> <target>Nzev</target> </trans-unit> <trans-unit id="h7voece" resname="avatar"> <source>avatar</source> <target>Profilov obrzek</target> </trans-unit> <trans-unit id="loeWEWU" resname="active"> <source>active</source> <target>Aktivn</target> </trans-unit> <trans-unit id="Zs9VE7N" resname="roles"> <source>roles</source> <target>Funkce</target> </trans-unit> <trans-unit id="XKTzhQz" resname="version"> <source>version</source> <target>Verze</target> </trans-unit> <trans-unit id="WRuKTcz" resname="ROLE_SUPER_ADMIN"> <source>ROLE_SUPER_ADMIN</source> <target>Systmov-Admin</target> </trans-unit> <trans-unit id="718iPw6" resname="ROLE_ADMIN"> <source>ROLE_ADMIN</source> <target>Sprvce</target> </trans-unit> <trans-unit id="yttGLAB" resname="ROLE_TEAMLEAD"> <source>ROLE_TEAMLEAD</source> <target>Vedouc skupiny</target> </trans-unit> <trans-unit id="rvO5ZXf" resname="ROLE_USER"> <source>ROLE_USER</source> <target>Uivatel</target> </trans-unit> <trans-unit id="TdBJBAl" resname="stats.durationToday"> <source>stats.durationToday</source> <target>Dnen pracovn doba</target> </trans-unit> <trans-unit id="XhKalZH" resname="stats.durationWeek"> <source>stats.durationWeek</source> <target>Pracovn doba tento tden</target> </trans-unit> <trans-unit id="uaOwf_P" resname="stats.durationMonth"> <source>stats.durationMonth</source> <target>Pracovn doba tento msc</target> </trans-unit> <trans-unit id="WqF84KR" resname="stats.durationYear"> <source>stats.durationYear</source> <target>Pracovn doba tento rok</target> </trans-unit> <trans-unit id="YtvPnl1" resname="stats.durationTotal"> <source>stats.durationTotal</source> <target>Pracovn doba celkem</target> </trans-unit> <trans-unit id="IFOLMgp" resname="stats.yourWorkingHours"> <source>stats.yourWorkingHours</source> <target>Moje hodiny</target> </trans-unit> <trans-unit id="023M9Ta" resname="stats.amountToday"> <source>stats.amountToday</source> <target>Pjem dnes</target> </trans-unit> <trans-unit id="xnJvYAE" resname="stats.amountWeek"> <source>stats.amountWeek</source> <target>Pjem tento tden</target> </trans-unit> <trans-unit id="ulr3reE" resname="stats.amountMonth"> <source>stats.amountMonth</source> <target>Pjem tento msc</target> </trans-unit> <trans-unit id="bQZyZaO" resname="stats.amountYear"> <source>stats.amountYear</source> <target>Pjem tento rok</target> </trans-unit> <trans-unit id="Z0fz23v" resname="stats.amountTotal"> <source>stats.amountTotal</source> <target>Celkov pjem</target> </trans-unit> <trans-unit id="HzICegM" resname="stats.activeUsersToday"> <source>stats.activeUsersToday</source> <target>Aktivn uivatel dnes</target> </trans-unit> <trans-unit id="7oP64Kh" resname="stats.activeUsersWeek"> <source>stats.activeUsersWeek</source> <target>Aktivn uivatel tento tden</target> </trans-unit> <trans-unit id="40xQ.Qt" resname="stats.activeUsersMonth"> <source>stats.activeUsersMonth</source> <target>Aktivn uivatel tento msc</target> </trans-unit> <trans-unit id="lGuZo7g" resname="stats.activeUsersYear"> <source>stats.activeUsersYear</source> <target>Aktivn uivatel tento rok</target> </trans-unit> <trans-unit id="8FFVmiv" resname="stats.activeUsersTotal"> <source>stats.activeUsersTotal</source> <target>Aktivn uivatel celkem</target> </trans-unit> <trans-unit id="lEW82ex" resname="stats.activeRecordings"> <source>stats.activeRecordings</source> <target>Aktivn evidence</target> </trans-unit> <trans-unit id="t5eIWp8" resname="stats.userTotal"> <source>stats.userTotal</source> <target state="translated">Uivatel</target> </trans-unit> <trans-unit id="Bor.76M" resname="stats.activityTotal"> <source>stats.activityTotal</source> <target>innosti</target> </trans-unit> <trans-unit id="67uSaR3" resname="stats.projectTotal"> <source>stats.projectTotal</source> <target>Projekty</target> </trans-unit> <trans-unit id="tnD6aPj" resname="stats.customerTotal"> <source>stats.customerTotal</source> <target>Zkaznci</target> </trans-unit> <trans-unit id="Oq.KtC6" resname="admin_invoice_template.title"> <source>admin_invoice_template.title</source> <target>ablona faktury</target> </trans-unit> <trans-unit id="SR2r1Cs" resname="invoices"> <source>invoices</source> <target>Faktura</target> </trans-unit> <trans-unit id="X70dwP8" resname="button.print"> <source>button.print</source> <target>Tisk</target> </trans-unit> <trans-unit id="W_TXvSi" resname="button.csv"> <source>button.csv</source> <target>CSV</target> </trans-unit> <trans-unit id="vC2IsaP" resname="button.xlsx"> <source>button.xlsx</source> <target>Excel</target> </trans-unit> <trans-unit id="aAa5uRR" resname="button.pdf"> <source>button.pdf</source> <target>PDF</target> </trans-unit> <trans-unit id="ulYFDIo" resname="button.ods"> <source>button.ods</source> <target>ODS</target> </trans-unit> <trans-unit id="zPcx3O_" resname="invoice_print"> <source>invoice_print</source> <target>Faktura</target> </trans-unit> <trans-unit id="XN4PEpj" resname="template"> <source>template</source> <target>ablona</target> </trans-unit> <trans-unit id="ohNu8DK" resname="due_days"> <source>due_days</source> <target>Doba splatnosti ve dnech</target> </trans-unit> <trans-unit id="rAJrxSK" resname="invoice.due_days"> <source>invoice.due_days</source> <target state="translated">Datum splatnosti</target> </trans-unit> <trans-unit id="4XKFnWh" resname="invoice.from"> <source>invoice.from</source> <target>Z</target> </trans-unit> <trans-unit id="hx7vsMA" resname="invoice.to"> <source>invoice.to</source> <target>Do</target> </trans-unit> <trans-unit id="x_W5sV4" resname="invoice.number"> <source>invoice.number</source> <target>slo faktury</target> </trans-unit> <trans-unit id="86KyrKO" resname="invoice.subtotal"> <source>invoice.subtotal</source> <target>Mezisouet</target> </trans-unit> <trans-unit id="EO57yXg" resname="invoice.tax"> <source>invoice.tax</source> <target>Da</target> </trans-unit> <trans-unit id="N68vyvo" resname="invoice.total"> <source>invoice.total</source> <target>Celkem</target> </trans-unit> <trans-unit id="TPzFWUs" resname="invoice.service_date"> <source>invoice.service_date</source> <target>Datum vyhotoven</target> </trans-unit> <trans-unit id="zzjZXJx" resname="amount"> <source>amount</source> <target>Mnostv</target> </trans-unit> <trans-unit id="BAkWQqr" resname="total_rate"> <source>total_rate</source> <target>Celkov cena</target> </trans-unit> <trans-unit id="IoKfYkz" resname="unit_price"> <source>unit_price</source> <target>Jednotkov cena</target> </trans-unit> <trans-unit id="033t0aO" resname="payment_terms"> <source>payment_terms</source> <target>Platebn podmnky</target> </trans-unit> <trans-unit id="9p2KQag" resname="invoice.signature_user"> <source>invoice.signature_user</source> <target>Potvrzen: Datum / Jmno / Podpis</target> </trans-unit> <trans-unit id="Q9ykNhO" resname="invoice.signature_customer"> <source>invoice.signature_customer</source> <target>Potvrzen: Datum / Zkaznk / Podpis</target> </trans-unit> <trans-unit id="c3d6p33" resname="invoice.total_working_time"> <source>invoice.total_working_time</source> <target>Celkov doba trvn</target> </trans-unit> <trans-unit id="3tegKgk" resname="orderNumber"> <source>orderNumber</source> <target>slo objednvky</target> </trans-unit> <trans-unit id="WMJwy8r" resname="invoice_tax_number"> <source>invoice_tax_number</source> <target>DI:</target> </trans-unit> <trans-unit id="lswYe8s" resname="invoice_bank_account"> <source>invoice_bank_account</source> <target>Bankovn et</target> </trans-unit> <trans-unit id="1GruCMx" resname="export"> <source>export</source> <target>Export</target> </trans-unit> <trans-unit id="vjmoQGo" resname="export.period"> <source>export.period</source> <target>Obdob</target> </trans-unit> <trans-unit id="3CQ7A2m" resname="export.document_title"> <source>export.document_title</source> <target>Seznam vdaj</target> </trans-unit> <trans-unit id="d5wyWRD" resname="export.full_list"> <source>export.full_list</source> <target state="translated">Podrobn seznam</target> </trans-unit> <trans-unit id="N778uJ6" resname="export.summary"> <source>export.summary</source> <target>Souhrn</target> </trans-unit> <trans-unit id="ElDyzrx" resname="export.page_of"> <source>export.page_of</source> <target>Strnka %page% z %pages%</target> </trans-unit> <trans-unit id="vKY0tof" resname="export.date_copyright"> <source>export.date_copyright</source> <target>Vytvoeno %date% s %kimai%</target> </trans-unit> <trans-unit id="OxdYMR3" resname="active.entries"> <source>active.entries</source> <target>Vae aktivn men asu</target> </trans-unit> <trans-unit id="WVU_S.A" resname="recent.activities"> <source>recent.activities</source> <target>Restartujte jednu z vaich poslednch aktivit</target> </trans-unit> <trans-unit id="dTHY7Mw" resname="timesheet.start" xml:space="preserve"> <source>timesheet.start</source> <target state="translated">Spustit sledovn asu</target> </trans-unit> <trans-unit id="igCkqAP" resname="pageSize"> <source>pageSize</source> <target>Velikost strnky</target> </trans-unit> <trans-unit id="cjgNYUB" resname="entryState"> <source>entryState</source> <target state="translated">Zznamy</target> </trans-unit> <trans-unit id="Qn2ouiL" resname="exported"> <source>exported</source> <target>Exportovno</target> </trans-unit> <trans-unit id="_DDecAV" resname="entryState.exported"> <source>entryState.exported</source> <target>Vymazno</target> </trans-unit> <trans-unit id="ccCiXyR" resname="entryState.not_exported"> <source>entryState.not_exported</source> <target state="translated">Oteveno</target> </trans-unit> <trans-unit id="XvXvA2S" resname="all"> <source>all</source> <target>Ve</target> </trans-unit> <trans-unit id="xm7mqoK" resname="entryState.running"> <source>entryState.running</source> <target state="translated">Aktivn</target> </trans-unit> <trans-unit id="spHpd_I" resname="entryState.stopped"> <source>entryState.stopped</source> <target state="translated">Zastaveno</target> </trans-unit> <trans-unit id="BhsaLxX" resname="export.clear_all"> <source>export.clear_all</source> <target>Oznait vechny zobrazen zznamy jako oteven?</target> </trans-unit> <trans-unit id="qtjPKUT" resname="export.mark_all"> <source>export.mark_all</source> <target>Oznait vechny zobrazen zznamy jako odstrann?</target> </trans-unit> <trans-unit id="NNsA8i2" resname="globalsOnly"> <source>globalsOnly</source> <target>Pouze globln</target> </trans-unit> <trans-unit id="9Wt8Pp_" resname="help.batch_meta_fields"> <source>help.batch_meta_fields</source> <target>Pole, kter jsou urena k aktualizaci, mus bt aktivovna v zakrtvacm polku.</target> </trans-unit> <trans-unit id="8BPmHPa" resname="batch_meta_fields"> <source>batch_meta_fields</source> <target>Dodaten pole</target> </trans-unit> <trans-unit id="iwWaUoa" resname="export.filter"> <source>export.filter</source> <target>Filtrovat data pro export</target> </trans-unit> <trans-unit id="PHJwR4w" resname="status.paid"> <source>status.paid</source> <target>Uhrazeno</target> </trans-unit> <trans-unit id="Uvo1CbP" resname="status.pending"> <source>status.pending</source> <target>ekajc</target> </trans-unit> <trans-unit id="X_NRsed" resname="status.new"> <source>status.new</source> <target>Nov</target> </trans-unit> <trans-unit id="BzwWNMS" resname="status"> <source>status</source> <target>Stav</target> </trans-unit> <trans-unit id="tCNBGKG" resname="orderDate"> <source>orderDate</source> <target>Datum objednvky</target> </trans-unit> <trans-unit id="Xyjr.V." resname="project_start"> <source>project_start</source> <target>Zatek projektu</target> </trans-unit> <trans-unit id="dicW36D" resname="mark_as_exported"> <source>mark_as_exported</source> <target>Oznait jako exportovno</target> </trans-unit> <trans-unit id="WXXPG7p" resname="preview"> <source>preview</source> <target>Nhled</target> </trans-unit> <trans-unit id="HkjvwLc" resname="stats.percentUsedLeft"> <source>stats.percentUsedLeft</source> <target>%percent%% pouito (%left% pod oteveno)</target> </trans-unit> <trans-unit id="ov4OQOh" resname="invoice.filter"> <source>invoice.filter</source> <target>Filtr dat faktury</target> </trans-unit> <trans-unit id="unC5MXv" resname="stats.percentUsed"> <source>stats.percentUsed</source> <target>%percent%% pouito</target> </trans-unit> <trans-unit id="JnUFsNi" resname="stats.workingTimeYear"> <source>stats.workingTimeYear</source> <target>Cel rok %year%</target> </trans-unit> <trans-unit id="JIKNAYP" resname="stats.workingTimeMonth"> <source>stats.workingTimeMonth</source> <target>%month% %year%</target> </trans-unit> <trans-unit id="XdYs3I8" resname="stats.workingTimeWeek"> <source>stats.workingTimeWeek</source> <target>Kalendn tden %week%</target> </trans-unit> <trans-unit id="lfSTZGe" resname="stats.workingTimeToday"> <source>stats.workingTimeToday</source> <target>Dnes, %day%</target> </trans-unit> <trans-unit id="G.GEdlk" resname="user_role.title"> <source>user_role.title</source> <target>Role uivatele</target> </trans-unit> <trans-unit id="ZlZ20pG" resname="user_permissions.title"> <source>user_permissions.title</source> <target>Oprvnn uivatele</target> </trans-unit> <trans-unit id="E7G60OF" resname="Allowed character: A-Z and _"> <source>Allowed character: A-Z and _</source> <target>Povolen znaky: A-Z a _</target> </trans-unit> <trans-unit id="TBWoUYf" resname="project_end"> <source>project_end</source> <target>Konec projektu</target> </trans-unit> <trans-unit id="EJDS9HY" resname="vat_id"> <source>vat_id</source> <target>IO</target> </trans-unit> <trans-unit id="dherSTU" resname="export_decimal"> <source>export_decimal</source> <target>Pouij destkov trvn v exportu</target> </trans-unit> <trans-unit id="gRIArHS" resname="lastLogin"> <source>lastLogin</source> <target>Posledn pihlen</target> </trans-unit> <trans-unit id="1c0EQaz" resname="profile.registration_date"> <source>profile.registration_date</source> <target>Registrovn</target> </trans-unit> <trans-unit id="rlJLVNm" resname="append"> <source>append</source> <target>Pipojit</target> </trans-unit> <trans-unit id="erN3h3b" resname="replace"> <source>replace</source> <target>Nahradit</target> </trans-unit> <trans-unit id="b43sCwO" resname="help.fixedRate"> <source>help.fixedRate</source> <target>Kad zznam obdr stejnou hodnotu, nezle na jeho dlce</target> </trans-unit> <trans-unit id="tfkKlua" resname="progress"> <source>progress</source> <target>Postup</target> </trans-unit> <trans-unit id="Ia0kvPi" resname="my_team_projects"> <source>my_team_projects</source> <target>Rozpoty &amp; tmovch projekt</target> </trans-unit> <trans-unit id="L05Qw2x" resname="my_teams"> <source>my_teams</source> <target>Moje tmy</target> </trans-unit> <trans-unit id="aVwNQcX" resname="billable"> <source>billable</source> <target>Zpoplatniteln</target> </trans-unit> <trans-unit id="LIOnolg" resname="placeholder.type_message"> <source>placeholder.type_message</source> <target>Napite vai zprvu</target> </trans-unit> <trans-unit id="Qc5nsFn" resname="recalculate_rates"> <source>recalculate_rates</source> <target>Pepotat sazby</target> </trans-unit> <trans-unit id="Cxv_0wG" resname="help.internalRate"> <source>help.internalRate</source> <target>Intern nklady (jestli nen zadno, je pouita normln sazba)</target> </trans-unit> <trans-unit id="5ofAsOs" resname="internalRate"> <source>internalRate</source> <target>Intern sazba</target> </trans-unit> <trans-unit id="djL6LMC" resname="help.rate"> <source>help.rate</source> <target>Hodinov sazba</target> </trans-unit> <trans-unit id="HcWuW2g" resname="layout"> <source>layout</source> <target>Obrazovka: layout</target> </trans-unit> <trans-unit id="hlu4iX5" resname="error.no_comments_found"> <source>error.no_comments_found</source> <target>Nebyl zasln dn koment.</target> </trans-unit> <trans-unit id="JGaf9IK" resname="Doctor"> <source>Doctor</source> <target>Doktor</target> </trans-unit> <trans-unit id="ypVQO7o" resname="menu.reporting"> <source>menu.reporting</source> <target>Reportovn</target> </trans-unit> <trans-unit id=".372.o7" resname="login_required"> <source>login_required</source> <target>Chybjc oprvnn. Pesmrovat na pihlen?</target> </trans-unit> <trans-unit id="XP5zkiN" resname="modal.dirty"> <source>modal.dirty</source> <target>Formul byl zmnn. Prosm kliknte "Uloit" pro uloen zmn nebo "Zavt" pro zruen.</target> </trans-unit> <trans-unit id="zFfl7jw" resname="sum.total"> <source>sum.total</source> <target>Celkem</target> </trans-unit> <trans-unit id="mflwMcX" resname="rates.title"> <source>rates.title</source> <target>Poplatky</target> </trans-unit> <trans-unit id="0M_Gylq" resname="rates.empty"> <source>rates.empty</source> <target>Nebyly nakonfigurovny dn poplatky.</target> </trans-unit> <trans-unit id="OTDmccn" resname="attachments"> <source>attachments</source> <target>Soubory</target> </trans-unit> <trans-unit id="J258iS6" resname="update_multiple"> <source>update_multiple</source> <target state="translated">%action% %count% zznam?</target> </trans-unit> <trans-unit id="hBNESu6" resname="my.profile"> <source>my.profile</source> <target>Mj profil</target> </trans-unit> <trans-unit id="JBkykGe" resname="search"> <source>search</source> <target>Hledat</target> </trans-unit> <trans-unit id=".0CFrRV" resname="upload"> <source>upload</source> <target>Nahrt</target> </trans-unit> <trans-unit id="l4ZOh4." resname="desc"> <source>desc</source> <target>Sestupn</target> </trans-unit> <trans-unit id="1o0.9vf" resname="asc"> <source>asc</source> <target>Vzestupn</target> </trans-unit> <trans-unit id="8W_TZI0" resname="searchTerm"> <source>searchTerm</source> <target>Hledan vraz</target> </trans-unit> <trans-unit id="CiA4s9E" resname="set_as_default"> <source>set_as_default</source> <target>Uloit nastaven jako oblben vyhledvn</target> </trans-unit> <trans-unit id="VSo_gmO" resname="orderBy"> <source>orderBy</source> <target>Seadit podle</target> </trans-unit> <trans-unit id="O5w1jzb" resname="file"> <source>file</source> <target>Soubor</target> </trans-unit> <trans-unit id="XQ2.pq2" resname="error.too_many_entries"> <source>error.too_many_entries</source> <target>Poadavek se nepodailo zpracovat. Bylo nalezeno pli mnoho vsledk.</target> </trans-unit> <trans-unit id="jdbtx6z" resname="action.add"> <source>action.add</source> <target>Pidat</target> </trans-unit> <trans-unit id="qX_CKtU" resname="tax_rate"> <source>tax_rate</source> <target>Sazba dan</target> </trans-unit> <trans-unit id="HPhRbtc" resname="stats.workingTimeWeekShort"> <source>stats.workingTimeWeekShort</source> <target>Tden %week%</target> </trans-unit> <trans-unit id="HWB4OGJ" resname="stats.workingTimeFinancialYear"> <source>stats.workingTimeFinancialYear</source> <target>Finann rok</target> </trans-unit> <trans-unit id="BXBFJP8" resname="stats.workingTime" xml:space="preserve"> <source>Working hours</source> <target>Pracovn doba</target> </trans-unit> <trans-unit id="pX_3dNm" resname="stats.revenue"> <source>stats.revenue</source> <target>Pjmy</target> </trans-unit> <trans-unit id="xkugSAA" resname="stats.durationFinancialYear"> <source>stats.durationFinancialYear</source> <target>Pracovn doba tento finann rok</target> </trans-unit> <trans-unit id="_Pym9RO" resname="stats.activeUsersFinancialYear"> <source>stats.activeUsersFinancialYear</source> <target>Aktivn uivatel tento finann rok</target> </trans-unit> <trans-unit id="crrlEUA" resname="preview.skipped_rows"> <source>preview.skipped_rows</source> <target>Peskoen nhled %rows% dalch dk</target> </trans-unit> <trans-unit id="L0hRlcf" resname="includeNoBudget"> <source>includeNoBudget</source> <target>Zobrazit poloky bez rozpotu</target> </trans-unit> <trans-unit id="KukrzcT" resname="includeBudgetType_full"> <source>includeBudgetType_full</source> <target>Zobrazit poloky s rozpotem ivotnho cyklu</target> </trans-unit> <trans-unit id="ViUuILv" resname="includeBudgetType_month"> <source>includeBudgetType_month</source> <target>Zobrazit poloky s msnm rozpotem</target> </trans-unit> <trans-unit id="2dm.ZWM" resname="not_exported"> <source>not_exported</source> <target>Neexportovno</target> </trans-unit> <trans-unit id="o0yOFHL" resname="not_invoiced"> <source>not_invoiced</source> <target>Netovno</target> </trans-unit> <trans-unit id="4Ndj7Xo" resname="budgetType"> <source>budgetType</source> <target>Typ rozpotu</target> </trans-unit> <trans-unit id="wYqyL6A" resname="budgetType_month"> <source>budgetType_month</source> <target>Msn</target> </trans-unit> <trans-unit id="KH2hgil" resname="account_number"> <source>account_number</source> <target>slo pracovnka</target> </trans-unit> <trans-unit id="Zif614Q" resname="add_user.label"> <source>add_user.label</source> <target>Pidat uivatele</target> </trans-unit> <trans-unit id="f8oNzSP" resname="quick_entry.title"> <source>quick_entry.title</source> <target>Tdenn pracovn doba</target> </trans-unit> <trans-unit id="dnQEYoJ" resname="budgetType_full"> <source>budgetType_full</source> <target>ivotn cyklus</target> </trans-unit> <trans-unit id="GzWKgBk" resname="error.directory_missing"> <source>The directory %dir% does not exist and could not be created.</source> <target>Sloka %dir% neexistuje a nelze ji vytvoit.</target> </trans-unit> <trans-unit id="C2TGff0" resname="error.directory_protected"> <source>error.directory_protected</source> <target>Sloka %dir% je chrnna proti zpisu.</target> </trans-unit> <trans-unit id="xN7MfSA" resname="stats.percentUsed_month"> <source>stats.percentUsed_month</source> <target>%percent%% pouito tento msc</target> </trans-unit> <trans-unit id="vWJPpYU" resname="stats.percentUsedLeft_month"> <source>stats.percentUsedLeft_month</source> <target>%percent%% pouito (%left% pod oteveno v tomto msci)</target> </trans-unit> <trans-unit id="Xij3oQl" resname="invoice.payment_date"> <source>invoice.payment_date</source> <target>Datum splatnosti</target> </trans-unit> <trans-unit id="EwPAaws" resname="type"> <source>type</source> <target>Typ</target> </trans-unit> <trans-unit id="IPHM4iP" resname="updated_at"> <source>Updated at</source> <target>Aktualizovno v</target> </trans-unit> <trans-unit id="yNWIi5U" resname="default_value_new"> <source>default_value_new</source> <target>Vchoz hodnoty pro nov zznamy</target> </trans-unit> <trans-unit id="DUDrvjk" resname="remove_default"> <source>remove_default</source> <target>Smazat oblben vyhledvn</target> </trans-unit> <trans-unit id=".ndupSK" resname="registration.check_email"> <source>registration.check_email</source> <target>Aktivan email byl odesln na %email%. Email obsahuje aktivan odkaz, na kter muste kliknout pro aktivaci tu.</target> </trans-unit> <trans-unit id="_cY.wHP" resname="resetting.check_email" xml:space="preserve"> <source>An email has been sent with a link to reset your password. Note: You can only request a new password once every %tokenLifetime% hours. If you don't receive the email, please check your spam folder or try again.</source> <target state="needs-translation">Email s odkazem pro obnoven hesla byl odesln. Poznmka: O nov heslo si mete podat pouze jednou za %tokenLifetime% hodin. Pokud email neobdrte, zkontrolujte sloku se spamem nebo to zkuste znovu.</target> </trans-unit> <trans-unit id="wuUWovn" resname="stats.amountFinancialYear"> <source>stats.amountFinancialYear</source> <target>Pjem tento finann rok</target> </trans-unit> <trans-unit id="gT9W2pZ" resname="status.canceled"> <source>status.canceled</source> <target>Zrueno</target> </trans-unit> <trans-unit id="W92QGbY" resname="export.warn_result_amount"> <source>export.warn_result_amount</source> <target>Vae vyhledvn vede k %count% vsledkm. Pokud se export nezda, muste vyhledvn dle zit.</target> </trans-unit> <trans-unit id="_YiKaOT" resname="last_record"> <source>last_record</source> <target>Posledn zznam</target> </trans-unit> <trans-unit id="fVA3M2x" resname="choice_pattern"> <source>Display of entries in selection lists</source> <target state="translated">Zobrazen poloek ve vbru</target> </trans-unit> <trans-unit id="tvV0NhL" resname="delete_warning.short_stats"> <source>delete_warning.short_stats</source> <target state="translated">V souasnosti existuje %records% asovch zznam, kterch souet pedstavuje celkovou dobu %duration%.</target> </trans-unit> <trans-unit id="7zptTeh" resname="update_browser_title"> <source>update_browser_title</source> <target state="translated">Aktualizovat nadpis prohlee</target> </trans-unit> <trans-unit id="tp.gIrE" resname="team.add_user.help"> <source>team.add_user.help</source> <target state="translated">Vbrem ze seznamu pidejte do tmu novho uivatele. Pot mete rozhodnout, zda se m uivatel stt vedoucm tmu.</target> </trans-unit> <trans-unit id="nlwMf5w" resname="invoice_document.max_reached"> <source>invoice_document.max_reached</source> <target state="translated">Dosaeno maximlnho mnostv %max% doklad faktur. Po odebrn jednoho dokladu mete pidat dal.</target> </trans-unit> <trans-unit id="L27KvC9" resname="includeNoWork"> <source>includeNoWork</source> <target state="translated">Zobrazit vstupy bez rezervace</target> </trans-unit> <trans-unit id="vpqPF8v" resname="last_record_before"> <source>last_record_before</source> <target state="translated">Bez rezervace asu</target> </trans-unit> <trans-unit id="U_D.NIy" resname="automatic"> <source>automatic</source> <target state="translated">Automaticky</target> </trans-unit> <trans-unit id="OJ.wI1U" resname="invoiceText"> <source>invoiceText</source> <target state="translated">Text faktury</target> </trans-unit> <trans-unit id="3Clo55j" resname="about.title"> <source>about.title</source> <target>O Kimai</target> </trans-unit> <trans-unit id="HNFpvnH" resname="globalActivities"> <source>globalActivities</source> <target state="translated">Povolit veobecn aktivity</target> </trans-unit> <trans-unit id="mjKOAgQ" resname="skin.light"> <source>skin.light</source> <target state="translated">Svtl</target> </trans-unit> <trans-unit id="i7aSJ1i" resname="notifications"> <source>notifications</source> <target state="translated">Upozornn</target> </trans-unit> <trans-unit id="PLLl1E0" resname="system_account"> <source>system_account</source> <target state="translated">Systmov et</target> </trans-unit> <trans-unit id="Zngu6M9" resname="status.planned"> <source>status.planned</source> <target state="translated">Plnovan</target> </trans-unit> <trans-unit id="m8V2yFG" resname="status.progress"> <source>status.progress</source> <target state="translated">Pipravuje se</target> </trans-unit> <trans-unit id="5NugIxO" resname="includeWithBudget"> <source>includeWithBudget</source> <target state="translated">Zobrazit poloky s rozpotem</target> </trans-unit> <trans-unit id="dru_Thv" resname="please_choose"> <source>please_choose</source> <target state="translated">Vyberte prosm</target> </trans-unit> <trans-unit id="aGk9Aqt" resname="desktop"> <source>desktop</source> <target state="translated">Plocha</target> </trans-unit> <trans-unit id="KgBw0BS" resname="skin"> <source>skin</source> <target state="translated">Design</target> </trans-unit> <trans-unit id="fQ3Prt4" resname="security.unlock.title"> <source>security.unlock.title</source> <target state="translated">Odemknout et</target> </trans-unit> <trans-unit id="AeMGtJO" resname="help.visible"> <source>help.visible</source> <target state="translated">Pokud je toto nastaven vypnuto, objekt se nezobrazuje v rozbalovacch rmecch ani v seznamech.</target> </trans-unit> <trans-unit id="LDsHBXd" resname="modal.columns.label"> <source>modal.columns.label</source> <target state="translated">Sloupce tabulky</target> </trans-unit> <trans-unit id="FeFBn_3" resname="profile.2fa"> <source>profile.2fa</source> <target state="translated">Dvoufzov (2FA)</target> </trans-unit> <trans-unit id="IRzPWmL" resname="login.2fa_intro"> <source>login.2fa_intro</source> <target state="translated">Pro dokonen procesu pihlen zadejte potvrzovac kd.</target> </trans-unit> <trans-unit id="EI5gPkp" resname="stats.userDurationToday"> <source>stats.userDurationToday</source> <target state="translated">M dnen pracovn hodiny</target> </trans-unit> <trans-unit id="EedlgkM" resname="stats.userDurationTotal"> <source>stats.userDurationTotal</source> <target state="translated">M pracovn hodiny celkem</target> </trans-unit> <trans-unit id="t.jgy7A" resname="all_invoices"> <source>all_invoices</source> <target state="translated">Historie faktur</target> </trans-unit> <trans-unit id="ojfv7Jl" resname="invoice_form.title"> <source>invoice_form.title</source> <target state="translated">Vytvoit fakturu</target> </trans-unit> <trans-unit id="WOFPb2i" resname="skin.dark"> <source>skin.dark</source> <target state="translated">Tmav</target> </trans-unit> <trans-unit id="wYcx0So" resname="search.no_results"> <source>search.no_results</source> <target state="translated">Nebyly nalezeny dn vsledky pro "%input%"</target> </trans-unit> <trans-unit id="biHjm0h" resname="select.add_new"> <source>select.add_new</source> <target state="translated">Vytvoit nov s nzvem "%input%"</target> </trans-unit> <trans-unit id="i_XOmN4" resname="help_locales" xml:space="preserve"> <source>help_locales</source> <target state="translated">Zde jsou pklady formtovacch pravidel pro podporovan jazyky</target> </trans-unit> <trans-unit id="JmkKf48" resname="user.language.help" xml:space="preserve"> <source>user.language.help</source> <target state="translated">Toto nastaven je odpovdn za peklad softwaru</target> </trans-unit> <trans-unit id="ulgdXdi" resname="hour_24"> <source>hour_24</source> <target state="translated">24-hodinov</target> </trans-unit> <trans-unit id="mQMcndl" resname="stats.userAmountToday"> <source>stats.userAmountToday</source> <target state="translated">Mj dnen vdlek</target> </trans-unit> <trans-unit id="E3Kj9lt" resname="stats.userAmountMonth"> <source>stats.userAmountMonth</source> <target state="translated">Mj mscn vdlek</target> </trans-unit> <trans-unit id="nqEYrfk" resname="security.unlock.intro"> <source>security.unlock.intro</source> <target state="translated">Pro pln pstup zadejte sv heslo</target> </trans-unit> <trans-unit id="0WpgaGa" resname="stats.userDurationMonth"> <source>stats.userDurationMonth</source> <target state="translated">M pracovn hodiny tento msc</target> </trans-unit> <trans-unit id="1MfS6X5" resname="remove_filter"> <source>remove_filter</source> <target state="translated">Vymazat filtr hledn</target> </trans-unit> <trans-unit id="853W5Iu" resname="security.unlock.button"> <source>security.unlock.button</source> <target state="translated">Odemknout</target> </trans-unit> <trans-unit id="aOJITgv" resname="help.invoiceText"> <source>help.invoiceText</source> <target state="translated">Tento text se pouv ve fakturanch dokladech a lze jej pout nap. k uveden dalch dodacch podmnek.</target> </trans-unit> <trans-unit id="Eq2E_Rd" resname="menu.apps"> <source>Apps</source> <target state="translated">Aplikace</target> </trans-unit> <trans-unit id="3rJ5QDP" resname="help.teams"> <source>help.teams</source> <target state="translated">Omez viditelnost na vybran tmy.</target> </trans-unit> <trans-unit id="hPY2VcD" resname="profile.2fa_intro"> <source>profile.2fa_intro</source> <target state="translated">Nov zazen mete aktivovat naskenovnm obrzku v aplikaci.</target> </trans-unit> <trans-unit id="IDDfzoR" resname="invoiceLabel"> <source>invoiceLabel</source> <target state="translated">Text na faktue</target> </trans-unit> <trans-unit id="jLzX0Ae" resname="help.invoiceLabel"> <source>help.invoiceLabel</source> <target state="translated">Tento text nahrazuje nzev objektu, co umouje podrobnj popisky pro poloky faktury.</target> </trans-unit> <trans-unit id="wv3n.FT" resname="dashboard.edit_mode"> <source>dashboard.edit_mode</source> <target state="translated">Widgety mete peskldat pomoc drag &amp; drop. Pidvn widget ukld ekajc zmny.</target> </trans-unit> <trans-unit id="oq1jcSQ" resname="help.billable"> <source>help.billable</source> <target state="translated">Pokud je toto nastaven vypnuto, budou vechny asov zznamy zaznamenan v budoucnu oznaeny jako "neztovateln".</target> </trans-unit> <trans-unit id="WOAx9yz" resname="modal.columns.profile"> <source>modal.columns.profile</source> <target state="translated">Profil</target> </trans-unit> <trans-unit id="FgKTw5v" resname="login.2fa_label"> <source>login.2fa_label</source> <target state="translated">Potvrzovac kd</target> </trans-unit> <trans-unit id="SdLZTel" resname="favorite_routes"> <source>favorite_routes</source> <target state="translated">Oblben</target> </trans-unit> <trans-unit id="BrOQ92O" resname="notifications.denied"> <source>You have rejected notifications. Please refer to your web-browser documentation to find out how to turn them on.</source> <target state="translated">Odmtli jste upozornn. Jak je zapnout, se dozvte v dokumentaci k webovmu prohlei.</target> </trans-unit> <trans-unit id="Y0PRG9Z" resname="profile.2fa_confirmation"> <source>profile.2fa_confirmation</source> <target state="translated">Uvete prosm kd, kter aktivuje dvoufzov oven pro tento et.</target> </trans-unit> <trans-unit id="On18MKP" resname="plugin.installed"> <source>plugin.installed</source> <target state="translated">Staen pluginy</target> </trans-unit> <trans-unit id="0ZWvn12" resname="notifications.welcome"> <source>notifications.welcome</source> <target state="translated">Dkujeme, e souhlaste s upozornnmi!</target> </trans-unit> <trans-unit id="0Hhg4zQ" resname="system_account.help"> <source>system_account.help</source> <target state="translated">Bude skryt v zznamech a rozevracch nabdkch</target> </trans-unit> <trans-unit id="DXcvOMM" resname="stats.userDurationWeek"> <source>stats.userDurationWeek</source> <target state="translated">M pracovn hodiny tento tden</target> </trans-unit> <trans-unit id="BjyLITj" resname="stats.userDurationYear"> <source>stats.userDurationYear</source> <target state="translated">M pracovn hodiny v tomto roce</target> </trans-unit> <trans-unit id="xvdsZsS" resname="stats.userAmountYear"> <source>stats.userAmountYear</source> <target state="translated">Mj leton vdlek</target> </trans-unit> <trans-unit id="9jlbhkf" resname="stats.userAmountTotal"> <source>stats.userAmountTotal</source> <target state="translated">Mj celkov pjem</target> </trans-unit> <trans-unit id="o0hsx2H" resname="mark_as_open"> <source>mark_as_open</source> <target state="translated">Oznait jako oteven</target> </trans-unit> <trans-unit id="2lL9ACs" resname="help.invoiceTemplate"> <source>help.invoiceTemplate</source> <target state="translated">Faktura je generovna pomoc tto ablony.</target> </trans-unit> <trans-unit id="F7xeAn4" resname="invoice_date"> <source>invoice_date</source> <target state="translated">Datum faktury</target> </trans-unit> <trans-unit id="NOEx3FF" resname="invoice_date.help"> <source>invoice_date.help</source> <target state="translated">Datum faktury mete zmnit zde</target> </trans-unit> <trans-unit id="GxuKjNb" resname="help.invoiceTemplate_customer"> <source>help.invoiceTemplate_customer</source> <target state="translated">Faktury pro tohoto klienta jsou ve vchozm nastaven generovny pomoc tto ablony. V ppad poteby ji lze bhem generovn faktury zmnit.</target> </trans-unit> <trans-unit id="ZZaqTEr" resname="no_activity"> <source>no_activity</source> <target state="translated">Bez aktivity</target> </trans-unit> <trans-unit id="HF70hZq" resname="status.closed"> <source>status.closed</source> <target state="translated">Dokoneno</target> </trans-unit> <trans-unit id="FxwWVFI" resname="help.globalActivity"> <source>help.globalActivity</source> <target state="translated">Pokud si nevyberete projekt, tato aktivita se stane globln a lze ji kombinovat s jakmkoli projektem. Pokud projekt vyberete, lze tuto aktivitu pout pouze s tmto projektem. Toto nastaven nelze pozdji zmnit.</target> </trans-unit> <trans-unit id="Fkrev.q" resname="help.globalActivities"> <source>help.globalActivities</source> <target state="translated">Pokud je toto nastaven vypnuto, asy lze zaznamenvat pouze u innost specifickch pro projekt.</target> </trans-unit> <trans-unit id="5kFod8o" resname="team.configure_teamlead.help"> <source>team.configure_teamlead.help</source> <target state="translated">Vybran / zvraznn uivatel jsou vedoucmi tm.</target> </trans-unit> <trans-unit id="wwrREDg" resname="pagination"> <source>pagination</source> <target state="translated">Zobrazit poloky %start% a %end% z %total%.</target> </trans-unit> <trans-unit id="JSBReoa" resname="api_password.intro" xml:space="preserve"> <source>api_password.intro</source> <target state="translated">Zde mete spravovat sv API tokeny, kter se pouvaj k autentizaci va aplikace pro Kimai.</target> </trans-unit> <trans-unit id="QT8.BCN" resname="api_password.missing_title"> <source>api_password.missing_title</source> <target state="translated">API nelze pout</target> </trans-unit> <trans-unit id="WbT2QLP" resname="extended_settings"> <source>extended_settings</source> <target state="translated">Rozen nastaven</target> </trans-unit> <trans-unit id="Uu8YvYV" resname="deactivated"> <source>Deactivated</source> <target state="translated">Deaktivovno</target> </trans-unit> <trans-unit id="3WHV.yf" resname="activated"> <source>Activated</source> <target state="translated">Aktivovno</target> </trans-unit> <trans-unit id="M2B0gF." resname="time"> <source>time</source> <target state="translated">as</target> </trans-unit> <trans-unit id="52lzpZE" resname="active.help"> <source>active.help</source> <target state="translated">Deaktivovan uivatel se ji nemohou pihlsit a jsou skryti v pehledech a vbrovch polch</target> </trans-unit> <trans-unit id="LDS9o5X" resname="stats.userAmountWeek"> <source>stats.userAmountWeek</source> <target state="translated">Mj tdenn vdlek</target> </trans-unit> <trans-unit id="EYXzfTO" resname="deleted"> <source>deleted</source> <target state="translated">Smazno</target> </trans-unit> <trans-unit id="eCEGRzN" resname="work_contract"> <source>work_contract</source> <target state="translated">Zamstnaneck smlouva</target> </trans-unit> <trans-unit id="7_d7IB3" resname="evaluation"> <source>evaluation</source> <target state="translated">Hodnocen</target> </trans-unit> <trans-unit id="4lrfIsZ" resname="complete_month" xml:space="preserve"> <source>Complete month</source> <target state="translated">Uzamknout msc</target> </trans-unit> <trans-unit id="eWmotjb" resname="completed_month_pdf"> <source>completed_month_pdf</source> <target state="translated">Dokonen msc PDF</target> </trans-unit> <trans-unit id="znIJiOw" resname="manual_bookings.duration_help"> <source>manual_bookings.duration_help</source> <target state="translated">Doba trvn me bt jak pozitivn (zven je-as), tak negativn (snen je-as).</target> </trans-unit> <trans-unit id="M.zFjwe" resname="pto_year_holiday"> <source>pto_year_holiday</source> <target state="translated">dny dovolen za rok</target> </trans-unit> <trans-unit id="gcFtM3o" resname="holiday"> <source>holiday</source> <target state="translated">Dovolen</target> </trans-unit> <trans-unit id="mS4SSmt" resname="work_times"> <source>work_times</source> <target state="translated">Pracovn doba</target> </trans-unit> <trans-unit id="EX27Gdt" resname="created_by"> <source>created_by</source> <target state="translated">Vytvoil</target> </trans-unit> <trans-unit id="6Hip2aF" resname="created_at"> <source>created_at</source> <target state="translated">Vytvoeno v</target> </trans-unit> <trans-unit id="W8XQTkJ" resname="complete_month.help" xml:space="preserve"> <source>complete_month.help</source> <target state="translated">Toto uzamkne vechny dny roku pedchzejc vybran datum. Uivatel dl nebude moci vytvet ani upravovat asy pro uzamen obdob.</target> </trans-unit> <trans-unit id="uHrZlbq" resname="work_times_result"> <source>work_times_result</source> <target state="translated">Odpracovan hodiny</target> </trans-unit> <trans-unit id="s9NPI3v" resname="work_times_should.none_configured"> <source>work_times_should.none_configured</source> <target state="translated">Pro tohoto uivatele nebyly v nastaven pracovn smlouvy nakonfigurovny dn clov hodiny.</target> </trans-unit> <trans-unit id="AXr_aHI" resname="completed_month_pdf_note"> <source>completed_month_pdf_note</source> <target state="translated">Tento dokument slou jako doklad o odpracovanch hodinch.</target> </trans-unit> <trans-unit id="31dFXhR" resname="work_times_is"> <source>work_times_is</source> <target state="translated">Je-hodin</target> </trans-unit> <trans-unit id="1btzNDa" resname="work_times_should" xml:space="preserve"> <source>Expected number of hours</source> <target state="translated">Oekvan poet hodin</target> </trans-unit> <trans-unit id="8yqaKzX" resname="confirmed_by_at"> <source>confirmed_by_at</source> <target state="translated">Potvrdil %user% dne %date%</target> </trans-unit> <trans-unit id="IalLD5Q" resname="manual_bookings.work_contract_intro"> <source>manual_bookings.work_contract_intro</source> <target state="translated">Manuln rezervace nelze dodaten mnit ani mazat!</target> </trans-unit> <trans-unit id="wZRRqg0" resname="manual_bookings"> <source>manual_bookings</source> <target state="translated">Manuln rezervace</target> </trans-unit> <trans-unit id="opDmYAa" resname="status.approved"> <source>status.approved</source> <target state="translated">Schvleno</target> </trans-unit> <trans-unit id="Na24cyT" resname="status.requested"> <source>status.requested</source> <target state="translated">Vydno</target> </trans-unit> <trans-unit id="fWuGTog" resname="public_holiday"> <source>public_holiday</source> <target state="translated">Sttn svtek</target> </trans-unit> <trans-unit id="95DUED0" resname="send_to"> <source>send_to</source> <target state="translated">Poslat na %name%</target> </trans-unit> <trans-unit id="5buBUCm" resname="receive_from"> <source>receive_from</source> <target state="translated">Pijmout od %name%</target> </trans-unit> <trans-unit id="zlmddHB" resname="public_holidays"> <source>public_holidays</source> <target state="translated">Sttn svtky</target> </trans-unit> <trans-unit id="u4lbYD5" resname="public_holiday.group"> <source>public_holiday.group</source> <target state="translated">Przdninov skupina</target> </trans-unit> <trans-unit id="GIgQHa4" resname="absence"> <source>absence</source> <target state="translated">Neptomnost</target> </trans-unit> <trans-unit id="4PMHpIp" resname="time_off"> <source>time_off</source> <target state="translated">Volno</target> </trans-unit> <trans-unit id="N6juwc4" resname="default"> <source>default</source> <target state="translated">Vchoz</target> </trans-unit> <trans-unit id="2SmKENG" resname="other"> <source>other</source> <target state="translated">Jin</target> </trans-unit> <trans-unit id="csAXaBa" resname="button.request"> <source>button.request</source> <target state="translated">Odeslat</target> </trans-unit> <trans-unit id="_WlU8Fp" resname="sickness"> <source>sickness</source> <target state="translated">Nemoc</target> </trans-unit> <trans-unit id="Od3xvQK" resname="button.report"> <source>button.report</source> <target state="translated">Nahlsit</target> </trans-unit> <trans-unit id="YDrWFFP" resname="sickness.intro"> <source>sickness.intro</source> <target state="translated">Nemoc, nvtva lkae, pe o blzk pbuzn, atd.</target> </trans-unit> <trans-unit id="yJg6P3m" resname="holiday.intro"> <source>holiday.intro</source> <target state="translated">Doposud jste vyuili %used% z dostupnch %days% dn dovolen.</target> </trans-unit> <trans-unit id="DA1.Ln_" resname="time_off.intro"> <source>time_off.intro</source> <target state="translated">V et pracovn doby m zstatek %hours% hodin.</target> </trans-unit> <trans-unit id="YPO294a" resname="absence_other.intro"> <source>absence_other.intro</source> <target state="translated">Rodinn udlosti, sthovn, chaos v poas, atd.</target> </trans-unit> <trans-unit id="TTnaBm4" resname="day_full"> <source>day_full</source> <target state="translated">Cel den</target> </trans-unit> <trans-unit id="Eml59KV" resname="day_half"> <source>day_half</source> <target state="translated">Pl dne</target> </trans-unit> <trans-unit id="t1r372x" resname="invisible"> <source>invisible</source> <target state="translated">Neviditeln</target> </trans-unit> <trans-unit id="vURcRit" resname="overview"> <source>Overview</source> <target state="translated">Pehled</target> </trans-unit> <trans-unit id="0xFBb6O" resname="Expenses"> <source>Expenses</source> <target state="translated">Vdaje</target> </trans-unit> <trans-unit id=".wmq_rT" resname="force_password_change"> <source>force_password_change</source> <target state="translated">dost o nov heslo</target> </trans-unit> <trans-unit id="0bKwA0k" resname="force_password_change_help"> <source>force_password_change_help</source> <target state="translated">Pi ptm pihlen mus uivatel zadat nov heslo.</target> </trans-unit> <trans-unit id="7Sycs4M" resname="Importer"> <source>Importer</source> <target state="translated">Importoval</target> </trans-unit> <trans-unit id="KSwG8AR" resname="Category"> <source>Category</source> <target state="translated">Kategorie</target> </trans-unit> <trans-unit id="uLHYlMa" resname="Categories"> <source>Categories</source> <target state="translated">Kategorie</target> </trans-unit> <trans-unit id="YRRgZCe" resname="Custom content"> <source>Custom content</source> <target state="translated">Uivatelsk obsah</target> </trans-unit> <trans-unit id="Ga4bvUX" resname="unpaid_vacation"> <source>unpaid_vacation</source> <target state="translated">Neplacen dovolen</target> </trans-unit> <trans-unit id="XE01Ar1" resname="parental"> <source>parental</source> <target state="translated">Rodiovsk dovolen</target> </trans-unit> <trans-unit id="YTzKpcP" resname="Absence calendar"> <source>Absence calendar</source> <target state="translated">Kalend neptomnosti</target> </trans-unit> <trans-unit id="Nw2x5hI" resname="sickness_child"> <source>sickness_child</source> <target state="translated">Oetovn dtte</target> </trans-unit> <trans-unit id="J6EJUj9" resname="Meta fields"> <source>Meta fields</source> <target state="translated">Uivatelsk pole</target> </trans-unit> <trans-unit id="JmpBuQ1" resname="Translations"> <source>Translations</source> <target state="translated">Peklady</target> </trans-unit> <trans-unit id="b712axp" resname="Translation"> <source>Translation</source> <target state="translated">Peklad</target> </trans-unit> <trans-unit id="Vp7xjKh" resname="Audit logs"> <source>Audit logs</source> <target state="translated">Auditn protokol</target> </trans-unit> <trans-unit id="yXrOTI." resname="review"> <source>Review</source> <target state="translated">Kontrola</target> </trans-unit> <trans-unit id="CDTC1gc" resname="supervisor"> <source>supervisor</source> <target state="translated">Vedouc</target> </trans-unit> <trans-unit id="iaJj4va" resname="work_times_account"> <source>Account working times</source> <target state="translated">Pracovn doba tu</target> </trans-unit> <trans-unit id="q1EATp1" resname="days"> <source>days</source> <target state="translated">Dny</target> </trans-unit> <trans-unit id="EGpYQvx" resname="help"> <source>help</source> <target>Dokumentace</target> </trans-unit> <trans-unit id="oYYDCG5" resname="support"> <source>support</source> <target>Podpora</target> </trans-unit> <trans-unit id="mz4ieCN" resname="donate"> <source>donate</source> <target>Podpote</target> </trans-unit> <trans-unit id="cR5DD88" resname="invoice_number_generator.date"> <source>invoice_number_generator.date</source> <target state="translated">Datum</target> </trans-unit> <trans-unit id="Qh1X4Vu" resname="invoice_number_generator.default"> <source>invoice_number_generator.default</source> <target state="translated">Nastaven formt</target> </trans-unit> <trans-unit id="UI6nPeP" resname="invoice_number_generator"> <source>invoice_number_generator</source> <target>Genertor fakturanch sel</target> </trans-unit> <trans-unit id="M_WE1pa" resname="booking_allow_only_work_days" xml:space="preserve"> <source>booking_allow_only_work_days</source> <target state="translated">Povol zznam asu pouze pro dny, pro kter jsou oekvan hodiny, definovan v pracovn smlouv</target> </trans-unit> <trans-unit id="tfOjLNp" resname="project_number" xml:space="preserve"> <source>Project number</source> <target state="translated">slo projektu</target> </trans-unit> <trans-unit id="f1Cgptu" resname="batch_table_checkbox" xml:space="preserve"> <source>batch_table_checkbox</source> <target state="translated">Pidat zznam do seznamu skupinov aktualizace</target> </trans-unit> <trans-unit id="ekN4GLW" resname="batch_table_checkbox_all" xml:space="preserve"> <source>batch_table_checkbox_all</source> <target state="translated">Vybrat vechny zznamy do seznamu skupinov aktualizace</target> </trans-unit> <trans-unit id="8JEDuyx" resname="activity_number" xml:space="preserve"> <source>Activity number</source> <target state="translated">slo aktivity</target> </trans-unit> <trans-unit id="q59lI2y" resname="user_identifier" xml:space="preserve"> <source>user_identifier</source> <target state="translated">ID uivatele</target> </trans-unit> <trans-unit id="uqv2Lrv" resname="user_identifier.help" xml:space="preserve"> <source>user_identifier.help</source> <target state="translated">Uniktn identifiktor uovatele je pouit pro autentizaci a v exportech</target> </trans-unit> <trans-unit id="op76XPd" resname="search_filter" xml:space="preserve"> <source>Search filter</source> <target state="translated">Vyhledvac filtr</target> </trans-unit> <trans-unit id="mR_Y5Mv" resname="timesheet.stop" xml:space="preserve"> <source>timesheet.stop</source> <target state="translated">Ukonit sledovn asu</target> </trans-unit> <trans-unit id="WwesQPU" resname="deactivate" xml:space="preserve"> <source>Deactivate</source> <target state="translated">Deaktivovat</target> </trans-unit> <trans-unit id="d9m85KE" resname="locale" xml:space="preserve" approved="no"> <source>Time, date and currency format</source> <target state="translated">Formt asu, data a mny</target> </trans-unit> <trans-unit id="IAx_YiA" resname="activate" xml:space="preserve"> <source>Activate</source> <target state="translated">Aktivovat</target> </trans-unit> <trans-unit id="q4ooRfF" resname="expires" xml:space="preserve"> <source>Expiry date</source> <target state="translated">Datum vypren</target> </trans-unit> <trans-unit id="rkCw7Ml" resname="last_usage" xml:space="preserve"> <source>Last usage</source> <target state="translated">Posledn pouit</target> </trans-unit> <trans-unit id="Z9IIn_b" resname="api_token_hidden" xml:space="preserve"> <source>api_token_hidden</source> <target state="translated">Toto je jedin as, kdy tento kl kdy bude zobrazen! Tak ho udrujte v bezpe a ujisttete se, e jste si ho zkoprovali ped zavenm tohoto okna.</target> </trans-unit> <trans-unit id="TCr2ArH" resname="api_password_deprecated" xml:space="preserve"> <source>api_password_deprecated</source> <target state="translated">API hesla jsou zastaral: prosm pouvejte msto nich API tokeny.</target> </trans-unit> <trans-unit id="O5KpOtm" resname="absence_comment_mandatory" xml:space="preserve"> <source>absence_comment_mandatory</source> <target state="translated">Neptomnost: Koment je povinn pole</target> </trans-unit> </body> </file> </xliff> ```
/content/code_sandbox/translations/messages.cs.xlf
xml
2016-10-20T17:06:34
2024-08-16T18:27:30
kimai
kimai/kimai
3,084
21,219
```xml import { formatEther } from '@ethersproject/units'; import styled from 'styled-components'; import { Button, LinkApp, Tooltip } from '@components'; import { ROUTE_PATHS } from '@config'; import { getTotalByAsset, useRates } from '@services'; import { getAccountsAssets } from '@services/Store/helpers'; import { getStoreAccounts, selectCurrentAccounts, useSelector } from '@store'; import { BREAK_POINTS, COLORS, FONT_SIZE, SPACING } from '@theme'; import { translateRaw } from '@translations'; import { Asset, ReserveAsset, StoreAsset } from '@types'; import { bigify, multiplyBNFloats, trimBN, weiToFloat } from '@utils'; import { fetchZapRiskObject, IZapConfig } from '../config'; interface SProps { isOwned?: boolean; } const ZapCardContainer = styled.div` background: #ffffff; border: 1px solid ${(props: SProps) => (props.isOwned ? COLORS.LIGHT_GREEN : COLORS.BLUE_BRIGHT)}; border-radius: 3px; display: flex; flex-direction: column; flex: 1; margin-bottom: 0px; &:not(:last-child) { margin-bottom: ${SPACING.SM}; } @media (min-width: ${BREAK_POINTS.SCREEN_XS}) { &:not(:last-child) { margin-right: ${SPACING.SM}; margin-bottom: 0px; } } `; const ZapCardHeader = styled('div')` display: flex; background: ${(props: SProps) => (props.isOwned ? COLORS.LIGHT_GREEN : COLORS.BLUE_BRIGHT)}; height: 49px; align-items: center; justify-content: center; color: white; font-weight: bold; padding: ${SPACING.XS} ${SPACING.SM}; `; const ZapCardContent = styled('div')` display: flex; flex: 1; padding: 0px ${SPACING.BASE} 0px ${SPACING.BASE}; flex-direction: column; justify-content: flex-start; `; const ZapCardContentText = styled.p` padding-bottom: ${SPACING.SM}; margin-bottom: 0px; `; const ZapCardContentRow = styled('div')` align-items: center; justify-content: center; margin-bottom: ${SPACING.SM}; & p { &:last-child { margin-bottom: 0px; padding-bottom: 0px; } } `; const ZapContentAmountRow = styled(ZapCardContentRow)` flex: 1; justify-content: flex-start; `; const ZapCardContentBottom = styled('div')` display: flex; padding: 15px 15px; align-items: stretch + center; justify-content: space-between; width: 100%; flex-direction: row; & a { width: 100%; &:not(:first-child) { margin-top: 0px; } :first-child { margin-right: ${SPACING.XS}; } :last-child { margin-left: ${SPACING.XS}; } :first-child:last-child { margin-left: 0; margin-right: 0; } } @media (min-width: ${BREAK_POINTS.SCREEN_XS}) and (max-width: ${BREAK_POINTS.SCREEN_MD}) { flex-direction: column; & a { &:not(:first-child) { margin-top: ${SPACING.SM}; margin-left: 0px; } } } `; const ZapCardContentHeaderRow = styled('div')` margin: ${SPACING.BASE} 0px 0px 0px; display: flex; flex-direction: row; align-items: top; justify-content: center; `; const ZapCardHeaderTextSection = styled('div')` display: flex; justify-content: left; flex-direction: column; margin-left: 0.5em; `; const ZapCardHeaderTitle = styled.h5` font-weight: bold; margin-top: 0px; `; const ZapCardHeaderName = styled.p` color: ${COLORS.GREY}; `; const ZapCardImgSection = styled('div')` display: flex; align-items: top; justify-content: center; `; const ZapCardImg = styled.img` min-width: 40px; overflow: hidden; `; const ZapCardRiskProfile = styled('div')` margin-left: 0.5em; `; const ZapCardButton = styled(Button)` @media (min-width: ${BREAK_POINTS.SCREEN_XS}) and (max-width: ${BREAK_POINTS.SCREEN_MD}) { width: 100%; } display: flex; flex: 1 auto; justify-content: center; align-items: center; width: 100%; height: 40px; padding: 0; font-size: ${FONT_SIZE.MD}; `; const ZapEstimatedBalance = styled.div` position: relative; display: flex; font-weight: bold; width: 80px; @media (max-width: ${BREAK_POINTS.SCREEN_MD}) { margin-bottom: ${SPACING.SM}; } `; const BalanceWrapper = styled.div` display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; width: 100%; font-weight: bold; color: ${COLORS.BLUE_DARK}; line-height: 17px; font-size: 16px; @media (min-width: ${BREAK_POINTS.SCREEN_XS}) and (max-width: ${BREAK_POINTS.SCREEN_MD}) { flex-direction: column; } `; const AmountContainer = styled.div` display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; & > * { margin-bottom: ${SPACING.XS}; } @media (max-width: ${BREAK_POINTS.SCREEN_MD}) { align-items: flex-start; } `; const TooltipWrapper = styled.div` position: absolute; bottom: 0; right: 2px; `; const WithdrawButton = () => ( <ZapCardButton colorScheme={'inverted'}>{translateRaw('WITHDRAW')}</ZapCardButton> ); interface Props { config: IZapConfig; } // Moved from StoreProvider const getDeFiAssetReserveAssets = (poolAsset: StoreAsset, assets: StoreAsset[]) => ( getPoolAssetReserveRate: (poolTokenUuid: string, assets: Asset[]) => ReserveAsset[] ) => getPoolAssetReserveRate(poolAsset.uuid, assets).map((reserveAsset) => ({ ...reserveAsset, balance: multiplyBNFloats( weiToFloat(poolAsset.balance, poolAsset.decimal).toString(), reserveAsset.reserveExchangeRate ), mtime: Date.now() })); const ZapCard = ({ config }: Props) => { const { getPoolAssetReserveRate } = useRates(); const accounts = useSelector(getStoreAccounts); const currentAccounts = useSelector(selectCurrentAccounts); const IndicatorItem = config.positionDetails; const defiPoolBalances = getAccountsAssets(currentAccounts).filter( ({ uuid }) => uuid === config.poolTokenUUID ); const userZapBalances = getTotalByAsset(defiPoolBalances)[config.poolTokenUUID]; const humanReadableZapBalance = userZapBalances ? weiToFloat(userZapBalances.balance, userZapBalances.decimal) : undefined; const defiReserveBalances = !userZapBalances ? [] : getDeFiAssetReserveAssets( userZapBalances, getAccountsAssets(accounts) )(getPoolAssetReserveRate); const isZapOwned = !!humanReadableZapBalance; return ( <ZapCardContainer isOwned={isZapOwned}> <ZapCardHeader isOwned={isZapOwned}> <img src={fetchZapRiskObject(config.risk).image} /> <ZapCardRiskProfile> {translateRaw('ZAP_RISK_PROFILE_HEADER_TEXT', { $riskProfile: fetchZapRiskObject(config.risk).text })} </ZapCardRiskProfile> </ZapCardHeader> <ZapCardContent> <ZapCardContentHeaderRow> <ZapCardImgSection> <Tooltip tooltip={config.breakdownTooltip}> <ZapCardImg src={config.breakdownImage} /> </Tooltip> </ZapCardImgSection> <ZapCardHeaderTextSection> <ZapCardHeaderTitle>{config.title}</ZapCardHeaderTitle> <ZapCardHeaderName>{config.name}</ZapCardHeaderName> </ZapCardHeaderTextSection> </ZapCardContentHeaderRow> <ZapCardContentRow> <IndicatorItem /> </ZapCardContentRow> <ZapContentAmountRow> {!humanReadableZapBalance ? ( <ZapCardContentText>{config.description}</ZapCardContentText> ) : ( <> <ZapCardContentText>{translateRaw('ZAP_BALANCE_DETECTED')}</ZapCardContentText> <BalanceWrapper> <ZapEstimatedBalance> {translateRaw('ZAP_ESTIMATED_BALANCE')}{' '} <TooltipWrapper> <Tooltip tooltip={translateRaw('ZAP_BALANCE_TOOLTIP', { $protocol: config.platformsUsed[0] })} type="informational" /> </TooltipWrapper> </ZapEstimatedBalance> <AmountContainer> {defiReserveBalances && defiReserveBalances.length > 0 ? ( defiReserveBalances.map((defiReserveAsset) => ( <div key={defiReserveAsset.uuid}> {`~ ${bigify( trimBN(formatEther(defiReserveAsset.balance.toString())) ).toFixed(4)} ${defiReserveAsset.ticker}`} </div> )) ) : ( <ZapCardContentText> {`(${humanReadableZapBalance.toFixed(4)} ${userZapBalances.ticker})`} </ZapCardContentText> )} </AmountContainer> </BalanceWrapper> </> )} </ZapContentAmountRow> </ZapCardContent> <ZapCardContentBottom> {!humanReadableZapBalance ? ( <LinkApp href={`${ROUTE_PATHS.DEFIZAP.path}/zap?key=${config.key}`}> <ZapCardButton colorScheme={'inverted'}>{translateRaw('ZAP_CARD_CTA')}</ZapCardButton> </LinkApp> ) : ( <> <LinkApp href={`${ROUTE_PATHS.DEFIZAP.path}/zap?key=${config.key}`}> <ZapCardButton colorScheme={'inverted'}>{translateRaw('ADD')}</ZapCardButton> </LinkApp> <LinkApp href={config.link} isExternal={true}> {config.withdrawTooltip ? ( <Tooltip tooltip={config.withdrawTooltip}> <WithdrawButton /> </Tooltip> ) : ( <WithdrawButton /> )} </LinkApp> </> )} </ZapCardContentBottom> </ZapCardContainer> ); }; export default ZapCard; ```
/content/code_sandbox/src/features/DeFiZap/components/ZapCard.tsx
xml
2016-12-04T01:35:27
2024-08-14T21:41:58
MyCrypto
MyCryptoHQ/MyCrypto
1,347
2,477
```xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" /> ```
/content/code_sandbox/core-sample-app/src/main/res/layout/empty_layout.xml
xml
2016-08-29T12:04:03
2024-08-16T13:03:46
android-youtube-player
PierfrancescoSoffritti/android-youtube-player
3,391
47
```xml import { usePopover_unstable } from '@fluentui/react-popover'; import type { TeachingPopoverProps, TeachingPopoverState } from './TeachingPopover.types'; export const useTeachingPopover_unstable = (props: TeachingPopoverProps): TeachingPopoverState => { const popoverState = usePopover_unstable(props); return { ...popoverState, withArrow: props.withArrow ?? true, // We trap focus because the default TeachingPopover view has buttons/carousel. trapFocus: props.trapFocus ?? true, }; }; ```
/content/code_sandbox/packages/react-components/react-teaching-popover/library/src/components/TeachingPopover/useTeachingPopover.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
115