mirror of
https://github.com/directus/directus.git
synced 2026-02-11 22:14:56 -05:00
The Great TypeScript Modernization Program Season 3 Episode 6: The Big One (#18014)
* Step 1 * Step 2 * False sense of confidence * Couple more before dinner * Update schema package * Update format-title * Upgrade specs file * Close * Replace ts-node-dev with tsx, and various others * Replace lodash with lodash-es * Add lodash-es types * Update knex import * More fun is had * FSE * Consolidate repos * Various tweaks and fixes * Fix specs * Remove dependency on knex-schema-inspector * Fix wrong imports of inspector * Move shared exceptions to new package * Move constants to separate module * Move types to new types package * Use directus/types * I believe this is no longer needed * [WIP] Start moving utils to esm * ESMify Shared * Move shared utils to @directus/utils * Use @directus/utils instead of @directus/shared/utils * It runs! * Use correct schemaoverview type * Fix imports * Fix the thing * Start on new update-checker lib * Use new update-check package * Swap out directus/shared in app * Pushing through the last bits now * Dangerously make extensions SDK ESM * Use @directus/types in tests * Copy util function to test * Fix linter config * Add missing import * Hot takes * Fix build * Curse these default exports * No tests in constants * Add tests * Remove tests from types * Add tests for exceptions * Fix test * Fix app tests * Fix import in test * Fix various tests * Fix specs export * Some more tests * Remove broken integration tests These were broken beyond repair.. They were also written before we really knew what we we're doing with tests, so I think it's better to say goodbye and start over with these * Regenerate lockfile * Fix imports from merge * I create my own problems * Make sharp play nice * Add vitest config * Install missing blackbox dep * Consts shouldn't be in types tsk tsk tsk tsk * Fix type/const usage in extensions-sdk * cursed.default * Reduce circular deps * Fix circular dep in items service * vvv * Trigger testing for all vendors * Add workaround for rollup * Prepend the file protocol for the ESM loader to be compatible with Windows "WARN: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'" * Fix postgres * Schema package updates Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com> * Resolve cjs/mjs extensions * Clean-up eslint config * fixed extension concatination * using string interpolation for consistency * Revert MySQL optimisation * Revert testing for all vendors * Replace tsx with esbuild-kit/esm-loader Is a bit faster and we can rely on the built-in `watch` and `inspect` functionalities of Node.js Note: The possibility to watch other files (.env in our case) might be added in the future, see https://github.com/nodejs/node/issues/45467 * Use exact version for esbuild-kit/esm-loader * Fix import --------- Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: Brainslug <tim@brainslug.nl> Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-8dd7c482=\\"\\" class=\\"v-avatar\\">Slot Content</div>"`;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-a39517a7=\\"\\" class=\\"v-badge\\"><span data-v-a39517a7=\\"\\" class=\\"badge\\"><span data-v-a39517a7=\\"\\"></span></span>Slot Content</div>"`;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<span data-v-273d8978=\\"\\" class=\\"v-breadcrumb\\"><span data-v-273d8978=\\"\\" class=\\"section\\"><!--v-if--><router-link-stub data-v-273d8978=\\"\\" to=\\"hi\\" class=\\"section-link\\"></router-link-stub></span><span data-v-273d8978=\\"\\" class=\\"section\\"><v-icon-stub data-v-273d8978=\\"\\" name=\\"chevron_right\\" small=\\"\\"></v-icon-stub><router-link-stub data-v-273d8978=\\"\\" to=\\"wow\\" class=\\"section-link\\"></router-link-stub></span><span data-v-273d8978=\\"\\" class=\\"section disabled\\"><v-icon-stub data-v-273d8978=\\"\\" name=\\"chevron_right\\" small=\\"\\"></v-icon-stub><span data-v-273d8978=\\"\\" class=\\"section-link\\"><!--v-if--> Disabled</span></span></span>"`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-28d526fe=\\"\\" class=\\"v-button\\"><button data-v-28d526fe=\\"\\" class=\\"button align-center normal\\" type=\\"button\\"><span data-v-28d526fe=\\"\\" class=\\"content\\"></span>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-b9233e5b=\\"\\" class=\\"v-card-actions\\">Slot Content</div>"`;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-f6658148=\\"\\" class=\\"v-card-subtitle\\">Slot Content</div>"`;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-de36d604=\\"\\" class=\\"v-card-text\\">Slot Content</div>"`;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-0768f50f=\\"\\" class=\\"v-card-title type-label\\">Slot Content</div>"`;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-12731031=\\"\\" class=\\"v-card\\">Slot Content</div>"`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<button data-v-61c33115=\\"\\" class=\\"v-checkbox\\" type=\\"button\\" role=\\"checkbox\\" aria-pressed=\\"false\\">
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<span data-v-0ab7ac28=\\"\\" class=\\"v-chip label\\"><span data-v-0ab7ac28=\\"\\" class=\\"chip-content\\"><!--v-if--></span></span>"`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-51167fde=\\"\\" class=\\"v-divider inlineTitle\\"><span data-v-51167fde=\\"\\" class=\\"wrapper\\"><span data-v-51167fde=\\"\\" class=\\"type-text\\">Default slot</span></span>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `""`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-167e9f7d=\\"\\" class=\\"v-fancy-select\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"Th
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div>hidden</div>"`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-a90644d4=\\"\\" class=\\"icon\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-30215bfa=\\"\\" class=\\"v-info info\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-418390f4=\\"\\" class=\\"v-input full-width\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-41b8fe03=\\"\\" class=\\"v-menu\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-f0538e61=\\"\\" class=\\"v-notice normal\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-500f2fb5=\\"\\" class=\\"v-overlay active has-click\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-278b16a4=\\"\\" class=\\"v-pagination\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-0b5afddc=\\"\\" class=\\"v-progress-circular\\"><svg data-v-0b5afddc=\\"\\" class=\\"circle\\" viewBox=\\"0 0 30 30\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-f02f7ebf=\\"\\" class=\\"v-progress-linear danger\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<button data-v-2b39bf8c=\\"\\" class=\\"v-radio\\" type=\\"button\\" aria-pressed=\\"false\\">
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-7bdf141c=\\"\\" class=\\"v-sheet\\">Slot Content</div>"`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-b5d05879=\\"\\" class=\\"list-item-icon v-skeleton-loader\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-de7fe070=\\"\\" class=\\"v-slider\\" style=\\"--_v-slider-percentage: 0;\\">
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-21b3cbb9=\\"\\" class=\\"v-tabs horizontal\\">Some value</div>"`;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<div data-v-dcb797ca=\\"\\" class=\\"v-text-overflow\\">My text</div>"`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-6a3718b7=\\"\\" class=\\"v-textarea full-width has-content\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-a110deb5=\\"\\" class=\\"v-workspace-tile draggable br-tl br-tr br-br br-bl\\" style=\\"--pos-x: 1; --pos-y: 1; --width: 10; --height: 10;\\" data-move=\\"\\">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `
|
||||
"<div data-v-c965220a=\\"\\" class=\\"v-workspace\\" style=\\"width: 480px; height: 280px;\\">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useSizeClass } from '@directus/shared/composables';
|
||||
import { useSizeClass } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** Render as a tile (square) */
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { RouteLocation, useRoute, useLink } from 'vue-router';
|
||||
import { useSizeClass, useGroupable } from '@directus/shared/composables';
|
||||
import { useSizeClass, useGroupable } from '@directus/composables';
|
||||
import { isEqual, isNil } from 'lodash';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<ul data-v-ff20e609=\\"\\" class=\\"v-list\\"></ul>"`;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useSync } from '@directus/shared/composables';
|
||||
import { useSync } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** If the `modelValue` is an array of strings, activates the checkbox if the value is inside it */
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue';
|
||||
import { useSizeClass } from '@directus/shared/composables';
|
||||
import { useSizeClass } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** Model the active state */
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
|
||||
<script lang="ts" setup>
|
||||
import formatTitle from '@directus/format-title';
|
||||
import { getFunctionsForType } from '@directus/shared/utils';
|
||||
import { getFunctionsForType } from '@directus/utils';
|
||||
import { FieldNode } from '@/composables/use-field-tree';
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { FieldNode, useFieldTree } from '@/composables/use-field-tree';
|
||||
import { Field } from '@directus/shared/types';
|
||||
import { Field } from '@directus/types';
|
||||
import { computed, ref, toRefs, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VFieldListItem from './v-field-list-item.vue';
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
import { toRefs, ref, watch, onMounted, onUnmounted, computed } from 'vue';
|
||||
import FieldListItem from './field-list-item.vue';
|
||||
import { FieldTree } from './types';
|
||||
import { Field, Relation } from '@directus/shared/types';
|
||||
import { Field, Relation } from '@directus/types';
|
||||
import { useFieldTree } from '@/composables/use-field-tree';
|
||||
import { flattenFieldGroups } from '@/utils/flatten-field-groups';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`should render 1`] = `
|
||||
"<v-dialog data-v-33a4ea83=\\"\\" model-value=\\"true\\" persistent=\\"\\">
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed } from 'vue';
|
||||
import { Field } from '@directus/shared/types';
|
||||
import { Field } from '@directus/types';
|
||||
import { getDefaultInterfaceForType } from '@/utils/get-default-interface-for-type';
|
||||
import { useExtension } from '@/composables/use-extension';
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Field } from '@directus/shared/types';
|
||||
import { Field } from '@directus/types';
|
||||
|
||||
interface Props {
|
||||
field: Field;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed } from 'vue';
|
||||
import { Field } from '@directus/shared/types';
|
||||
import { Field } from '@directus/types';
|
||||
import { useClipboard } from '@/composables/use-clipboard';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getJSType } from '@/utils/get-js-type';
|
||||
import { Field } from '@directus/shared/types';
|
||||
import { Field } from '@directus/types';
|
||||
import { isNil } from 'lodash';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Field, ValidationError } from '@directus/shared/types';
|
||||
import { Field, ValidationError } from '@directus/types';
|
||||
import { isEqual } from 'lodash';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@@ -81,7 +81,7 @@ import FormFieldMenu from './form-field-menu.vue';
|
||||
import { formatFieldFunction } from '@/utils/format-field-function';
|
||||
import { useClipboard } from '@/composables/use-clipboard';
|
||||
import FormFieldRawEditor from './form-field-raw-editor.vue';
|
||||
import { parseJSON } from '@directus/shared/utils';
|
||||
import { parseJSON } from '@directus/utils';
|
||||
|
||||
interface Props {
|
||||
field: Field;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DeepPartial, Field } from '@directus/shared/types';
|
||||
import { DeepPartial, Field } from '@directus/types';
|
||||
|
||||
export type FormField = DeepPartial<Field> & {
|
||||
field: string;
|
||||
|
||||
@@ -90,8 +90,8 @@ import { useFieldsStore } from '@/stores/fields';
|
||||
import { applyConditions } from '@/utils/apply-conditions';
|
||||
import { extractFieldFromFunction } from '@/utils/extract-field-from-function';
|
||||
import { getDefaultValuesFromFields } from '@/utils/get-default-values-from-fields';
|
||||
import { useElementSize } from '@directus/shared/composables';
|
||||
import { Field, ValidationError } from '@directus/shared/types';
|
||||
import { useElementSize } from '@directus/composables';
|
||||
import { Field, ValidationError } from '@directus/types';
|
||||
import { assign, cloneDeep, isEqual, isNil, omit, pick } from 'lodash';
|
||||
import { computed, ComputedRef, onBeforeUpdate, provide, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed } from 'vue';
|
||||
import { ValidationError, Field } from '@directus/shared/types';
|
||||
import { ValidationError, Field } from '@directus/types';
|
||||
import { formatFieldFunction } from '@/utils/format-field-function';
|
||||
import { extractFieldFromFunction } from '@/utils/extract-field-from-function';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import { computed } from 'vue';
|
||||
import { flatten } from 'lodash';
|
||||
import { remove as removeDiacritics } from 'diacritics';
|
||||
import { toArray } from '@directus/shared/utils';
|
||||
import { toArray } from '@directus/utils';
|
||||
|
||||
type HighlightPart = {
|
||||
text: string;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<span data-v-23a4d650=\\"\\" class=\\"v-icon\\"><i data-v-23a4d650=\\"\\" class=\\"\\" data-icon=\\"close\\"></i></span>"`;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useSizeClass } from '@directus/shared/composables';
|
||||
import { useSizeClass } from '@directus/composables';
|
||||
import { IconName } from '@fortawesome/fontawesome-svg-core';
|
||||
import { camelCase, upperFirst } from 'lodash';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { toRefs } from 'vue';
|
||||
import { useGroupableParent } from '@directus/shared/composables';
|
||||
import { useGroupableParent } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** If enabled, at least one item has to be selected */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { toRefs } from 'vue';
|
||||
import { useGroupable } from '@directus/shared/composables';
|
||||
import { useGroupable } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** Which value to represent when active */
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useGroupable } from '@directus/shared/composables';
|
||||
import { useGroupable } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** If enabled, multiple elements can be selected */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<script setup lang="ts">
|
||||
import { RouteLocation, useLink, useRoute } from 'vue-router';
|
||||
import { computed } from 'vue';
|
||||
import { useGroupable } from '@directus/shared/composables';
|
||||
import { useGroupable } from '@directus/composables';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { toRefs } from 'vue';
|
||||
import { useGroupableParent } from '@directus/shared/composables';
|
||||
import { useGroupableParent } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** Model what elements should be currently active */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useSizeClass } from '@directus/shared/composables';
|
||||
import { useSizeClass } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** If set to true displays no value but spins indefinitely */
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Vitest Snapshot v1
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`Mount component 1`] = `"<v-menu-stub data-v-cdcb6889=\\"\\" class=\\"v-select\\" disabled=\\"false\\" attached=\\"true\\" is-same-width=\\"true\\" show-arrow=\\"false\\" close-on-content-click=\\"true\\" placement=\\"bottom\\"></v-menu-stub>"`;
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useCustomSelection, useCustomSelectionMultiple } from '@directus/shared/composables';
|
||||
import { useCustomSelection, useCustomSelectionMultiple } from '@directus/composables';
|
||||
import { Placement } from '@popperjs/core';
|
||||
import { debounce, get } from 'lodash';
|
||||
import { computed, Ref, ref, toRefs, watch } from 'vue';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useGroupable } from '@directus/shared/composables';
|
||||
import { useGroupable } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** Custom value to use for selection state */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { inject, ref } from 'vue';
|
||||
import { useGroupable } from '@directus/shared/composables';
|
||||
import { useGroupable } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** A custom value to be used with `v-tabs` */
|
||||
|
||||
@@ -100,13 +100,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed, ref, useSlots } from 'vue';
|
||||
import { ShowSelect } from '@directus/shared/types';
|
||||
import { ShowSelect } from '@directus/types';
|
||||
import { useEventListener } from '@/composables/use-event-listener';
|
||||
import { Header, Sort } from './types';
|
||||
import { throttle, clone } from 'lodash';
|
||||
import Draggable from 'vuedraggable';
|
||||
import { hideDragImage } from '@/utils/hide-drag-image';
|
||||
import { useSync } from '@directus/shared/composables';
|
||||
import { useSync } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
headers: Header[];
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { ShowSelect } from '@directus/shared/types';
|
||||
import { ShowSelect } from '@directus/types';
|
||||
import { Header, Item } from './types';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, useSlots } from 'vue';
|
||||
import { ShowSelect } from '@directus/shared/types';
|
||||
import { ShowSelect } from '@directus/types';
|
||||
import { Header, HeaderRaw, Item, ItemSelectEvent, Sort } from './types';
|
||||
import TableHeader from './table-header.vue';
|
||||
import TableRow from './table-row.vue';
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { toRefs, provide, ref } from 'vue';
|
||||
import { useGroupableParent } from '@directus/shared/composables';
|
||||
import { useGroupableParent } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** Display the tabs in a vertical format */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { useElementSize } from '@directus/shared/composables';
|
||||
import { useElementSize } from '@directus/composables';
|
||||
|
||||
interface Props {
|
||||
/** The text that should be displayed */
|
||||
|
||||
@@ -93,7 +93,7 @@ import DrawerCollection from '@/views/private/components/drawer-collection.vue';
|
||||
import api from '@/api';
|
||||
import emitter, { Events } from '@/events';
|
||||
import { unexpectedError } from '@/utils/unexpected-error';
|
||||
import { Filter } from '@directus/shared/types';
|
||||
import { Filter } from '@directus/types';
|
||||
|
||||
interface Props {
|
||||
multiple?: boolean;
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Panel } from '@directus/shared/types';
|
||||
import { Panel } from '@directus/types';
|
||||
import { computed, ref, reactive, StyleValue } from 'vue';
|
||||
import { throttle } from 'lodash';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, inject, ref } from 'vue';
|
||||
import { useElementSize } from '@directus/shared/composables';
|
||||
import { useElementSize } from '@directus/composables';
|
||||
import { AppTile } from './v-workspace-tile.vue';
|
||||
import { cssVar } from '@directus/shared/utils/browser';
|
||||
import { cssVar } from '@directus/utils/browser';
|
||||
|
||||
interface Props {
|
||||
/** What tiles to render inside the workspace */
|
||||
|
||||
Reference in New Issue
Block a user