Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: migrate text/textarea/password type input to BBTextField (#10088)
ecmadao045f99499654
diff --git a/frontend/src/bbkit/BBTable/BBTableSearch.vue b/frontend/src/bbkit/BBTable/BBTableSearch.vuedeleted file mode 100644index c706d65454..0000000000--- a/frontend/src/bbkit/BBTable/BBTableSearch.vue+++ /dev/null@@ -1,52 +0,0 @@-<template>- <div class="">- <label for="search" class="sr-only">Search</label>- <div class="relative rounded-md shadow-sm">- <div- class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"- aria-hidden="true"- >- <!-- Heroicon name: solid/search -->- <heroicons-solid:search class="mr-3 h-4 w-4 text-control" />- </div>- <input- id="search"- type="text"- autocomplete="off"- name="search"- class="focus:ring-main focus:border-main block w-full pl-9 sm:text-sm border-control-border rounded-md"- :value="state.value"- :placeholder="placeholder"- @input="(e: any) => $emit('change-text', e.target.value)"- />- </div>- </div>-</template>--<script lang="ts" setup>-import { reactive, watch, withDefaults } from "vue";--const props = withDefaults(- defineProps<{- placeholder?: string;- value?: string;- }>(),- {- placeholder: "Search",- value: "",- }-);--defineEmits<{- (event: "change-text", value: string): void;-}>();--const state = reactive({- value: props.value,-});--watch(- () => props.value,- (value) => (state.value = value)-);-</script>diff --git a/frontend/src/bbkit/BBTable/index.ts b/frontend/src/bbkit/BBTable/index.tsindex 306c52dc27..6cfdf2d3eb 100644--- a/frontend/src/bbkit/BBTable/index.ts+++ b/frontend/src/bbkit/BBTable/index.ts@@ -1,6 +1,5 @@import BBTable from "./BBTable.vue";import BBTableCell from "./BBTableCell.vue";import BBTableHeaderCell from "./BBTableHeaderCell.vue";-import BBTableSearch from "./BBTableSearch.vue";-export { BBTable, BBTableCell, BBTableHeaderCell, BBTableSearch };+export { BBTable, BBTableCell, BBTableHeaderCell };diff --git a/frontend/src/bbkit/BBTextField.vue b/frontend/src/bbkit/BBTextField.vueindex dcb38c845e..64641750f3 100644--- a/frontend/src/bbkit/BBTextField.vue+++ b/frontend/src/bbkit/BBTextField.vue@@ -1,16 +1,20 @@<template><NInputref="inputField"+ v-bind="$attrs"v-model:value="state.text"+ :type="type"class="!border-none":disabled="disabled":clearable="clearable":placeholder="placeholder":autofocus="focusOnMount"+ :autosize="autosize":status="state.hasError ? 'error' : undefined"@blur="onBlur"- @input="onInput($event)"+ @update:value="onInput($event)"@keypress.enter="onPressEnter"+ @input="$emit('input', $event)"/></template>@@ -26,6 +30,8 @@ interface LocalState {const props = withDefaults(defineProps<{+ autosize?: boolean | { minRows?: number; maxRows?: number };+ type?: "text" | "password" | "textarea";required?: boolean;value?: string;placeholder?: string;@@ -35,6 +41,8 @@ const props = withDefaults(clearable?: boolean;}>(),{+ autosize: false,+ type: "text",required: false,value: "",placeholder: "",@@ -48,7 +56,7 @@ const props = withDefaults(const emit = defineEmits<{(event: "end-editing", value: string): void;(event: "update:value", value: string): void;- (event: "input", e: Event): void;+ (event: "input", value: string): void;}>();const inputField = ref();diff --git a/frontend/src/bbkit/index.ts b/frontend/src/bbkit/index.tsindex d3c65473da..7e144a2ae3 100644--- a/frontend/src/bbkit/index.ts+++ b/frontend/src/bbkit/index.ts@@ -7,12 +7,7 @@ import BBDialog from "./BBDialog.vue";import { BBGrid } from "./BBGrid";import BBModal from "./BBModal.vue";import BBSpin from "./BBSpin.vue";-import {- BBTable,- BBTableCell,- BBTableHeaderCell,- BBTableSearch,-} from "./BBTable";+import { BBTable, BBTableCell, BBTableHeaderCell } from "./BBTable";import BBTextField from "./BBTextField.vue";export * from "./types";@@ -28,7 +23,6 @@ export {BBTable,BBTableCell,BBTableHeaderCell,- BBTableSearch,BBGrid,BBTextField,BBBetaBadge,diff --git a/frontend/src/components/Branch/BranchCreateView.vue b/frontend/src/components/Branch/BranchCreateView.vueindex fe2887e37d..4d89198747 100644--- a/frontend/src/components/Branch/BranchCreateView.vue+++ b/frontend/src/components/Branch/BranchCreateView.vue@@ -6,9 +6,9 @@<span class="flex w-40 items-center text-sm">{{ $t("database.branch-name") }}</span>- <NInput+ <BBTextFieldv-model:value="branchId"- type="text"+ requiredclass="!w-60 text-sm":placeholder="'feature/add-billing'"/>@@ -85,7 +85,7 @@<script lang="ts" setup>import { useDebounce } from "@vueuse/core";import { cloneDeep, uniqueId } from "lodash-es";-import { NButton, NDivider, NInput } from "naive-ui";+import { NButton, NDivider } from "naive-ui";import { computed, ref, shallowRef, watch } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";diff --git a/frontend/src/components/IdentityProviderCreateForm.vue b/frontend/src/components/IdentityProviderCreateForm.vueindex 5b6df51d1b..48ff392302 100644--- a/frontend/src/components/IdentityProviderCreateForm.vue+++ b/frontend/src/components/IdentityProviderCreateForm.vue@@ -74,11 +74,11 @@{{ $t("settings.sso.form.name") }}<span class="text-red-600">*</span></p>- <input- v-model="identityProvider.title"+ <BBTextField+ v-model:value="identityProvider.title"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full":placeholder="$t('settings.sso.form.name-description')"/><ResourceIdField@@ -94,11 +94,10 @@<p class="textlabel">{{ $t("settings.sso.form.domain") }}</p>- <input- v-model="identityProvider.domain"+ <BBTextField+ v-model:value="identityProvider.domain":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full":placeholder="$t('settings.sso.form.domain-description')"/></div>@@ -151,11 +150,11 @@Client ID<span class="text-red-600">*</span></p>- <input- v-model="configForOAuth2.clientId"+ <BBTextField+ v-model:value="configForOAuth2.clientId"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. 6655asd77895265aa110ac0d3"/></div>@@ -164,11 +163,11 @@Client secret<span class="text-red-600">*</span></p>- <input- v-model="configForOAuth2.clientSecret"+ <BBTextField+ v-model:value="configForOAuth2.clientSecret"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full":placeholder="isCreating? 'e.g. 5bbezxc3972ca304de70c5d70a6aa932asd8'@@ -184,11 +183,11 @@<p class="textinfolabel">{{ $t("settings.sso.form.auth-url-description") }}</p>- <input- v-model="configForOAuth2.authUrl"+ <BBTextField+ v-model:value="configForOAuth2.authUrl"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. https://github.com/login/oauth/authorize"/></div>@@ -200,11 +199,11 @@<p class="textinfolabel">{{ $t("settings.sso.form.scopes-description") }}</p>- <input- v-model="scopesStringOfConfig"+ <BBTextField+ v-model:value="scopesStringOfConfig"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. user"/></div>@@ -216,11 +215,11 @@<p class="textinfolabel">{{ $t("settings.sso.form.token-url-description") }}</p>- <input- v-model="configForOAuth2.tokenUrl"+ <BBTextField+ v-model:value="configForOAuth2.tokenUrl"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. https://github.com/login/oauth/access_token"/></div>@@ -232,11 +231,11 @@<p class="textinfolabel">{{ $t("settings.sso.form.user-info-url-description") }}</p>- <input- v-model="configForOAuth2.userInfoUrl"+ <BBTextField+ v-model:value="configForOAuth2.userInfoUrl"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. https://api.github.com/user"/></div>@@ -288,11 +287,10 @@</p></div><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForOAuth2.fieldMapping!.identifier"+ <BBTextField+ v-model:value="configForOAuth2.fieldMapping!.identifier":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. login"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -314,11 +312,10 @@</div></div><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForOAuth2.fieldMapping!.displayName"+ <BBTextField+ v-model:value="configForOAuth2.fieldMapping!.displayName":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. name"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -331,11 +328,10 @@</div></div><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForOAuth2.fieldMapping!.phone"+ <BBTextField+ v-model:value="configForOAuth2.fieldMapping!.phone":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. phone"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -396,11 +392,11 @@Issuer<span class="text-red-600">*</span></p>- <input- v-model="configForOIDC.issuer"+ <BBTextField+ v-model:value="configForOIDC.issuer"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. https://acme.okta.com"/></div>@@ -409,11 +405,11 @@Client ID<span class="text-red-600">*</span></p>- <input- v-model="configForOIDC.clientId"+ <BBTextField+ v-model:value="configForOIDC.clientId"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. 6655asd77895265aa110ac0d3"/></div>@@ -422,11 +418,11 @@Client secret<span class="text-red-600">*</span></p>- <input- v-model="configForOIDC.clientSecret"+ <BBTextField+ v-model:value="configForOIDC.clientSecret"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full":placeholder="isCreating? 'e.g. 5bbezxc3972ca304de70c5d70a6aa932asd8'@@ -485,11 +481,10 @@{{ $t("settings.sso.form.user-information-mapping") }}</p><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForOIDC.fieldMapping!.identifier"+ <BBTextField+ v-model:value="configForOIDC.fieldMapping!.identifier":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. preferred_username"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -511,11 +506,10 @@</div></div><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForOIDC.fieldMapping!.displayName"+ <BBTextField+ v-model:value="configForOIDC.fieldMapping!.displayName":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. name"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -528,11 +522,10 @@</div></div><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForOIDC.fieldMapping!.phone"+ <BBTextField+ v-model:value="configForOIDC.fieldMapping!.phone":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. phone"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -566,11 +559,11 @@Host<span class="text-red-600">*</span></p>- <input- v-model="configForLDAP.host"+ <BBTextField+ v-model:value="configForLDAP.host"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. ldap.example.com"/></div>@@ -579,11 +572,10 @@Port<span class="text-red-600">*</span></p>- <input- v-model="configForLDAP.port"+ <NInputNumber+ v-model:value="configForLDAP.port":disabled="!allowEdit"- type="number"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. 389 or 636"/></div>@@ -592,11 +584,11 @@Bind DN<span class="text-red-600">*</span></p>- <input- v-model="configForLDAP.bindDn"+ <BBTextField+ v-model:value="configForLDAP.bindDn"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. uid=system,ou=Users,dc=example,dc=com"/></div>@@ -605,11 +597,11 @@Bind Password<span class="text-red-600">*</span></p>- <input- v-model="configForLDAP.bindPassword"+ <BBTextField+ v-model:value="configForLDAP.bindPassword"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full":placeholder="$t('common.sensitive-placeholder')"/></div>@@ -618,11 +610,11 @@Base DN<span class="text-red-600">*</span></p>- <input+ <BBTextFieldv-model="configForLDAP.baseDn"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. ou=users,dc=example,dc=com"/></div>@@ -631,11 +623,11 @@User Filter<span class="text-red-600">*</span></p>- <input+ <BBTextFieldv-model="configForLDAP.userFilter"+ required:disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. (uid=%s)"/></div>@@ -684,11 +676,10 @@{{ $t("settings.sso.form.user-information-mapping") }}</p><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForLDAP.fieldMapping!.identifier"+ <BBTextField+ v-model:value="configForLDAP.fieldMapping!.identifier":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. mail"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -710,11 +701,10 @@</div></div><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForLDAP.fieldMapping!.displayName"+ <BBTextField+ v-model:value="configForLDAP.fieldMapping!.displayName":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. displayName"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -727,11 +717,10 @@</div></div><div class="w-full grid grid-cols-[256px_1fr]">- <input- v-model="configForLDAP.fieldMapping!.phone"+ <BBTextField+ v-model:value="configForLDAP.fieldMapping!.phone":disabled="!allowEdit"- type="text"- class="textfield mt-1 w-full"+ class="mt-1 w-full"placeholder="e.g. phone"/><div class="w-full flex flex-row justify-start items-center text-sm">@@ -818,7 +807,13 @@<script lang="ts" setup>import { cloneDeep, head, isEqual } from "lodash-es";-import { NRadioGroup, NCheckbox, NRadio, NTooltip } from "naive-ui";+import {+ NRadioGroup,+ NCheckbox,+ NRadio,+ NTooltip,+ NInputNumber,+} from "naive-ui";import { ClientError, Status } from "nice-grpc-common";import { computed, reactive, ref, onMounted, watch } from "vue";import { useI18n } from "vue-i18n";diff --git a/frontend/src/components/RepositorySelectionPanel.vue b/frontend/src/components/RepositorySelectionPanel.vueindex 8a280ee2ae..b54f9edcca 100644--- a/frontend/src/components/RepositorySelectionPanel.vue+++ b/frontend/src/components/RepositorySelectionPanel.vue@@ -5,9 +5,9 @@<button class="btn-icon" @click.prevent="refreshRepositoryList"><heroicons-outline:refresh class="w-6 h-6" /></button>- <BBTableSearch+ <SearchBox+ v-model:value="state.searchText":placeholder="$t('repository.select-repository-search')"- @change-text="(text: string) => changeSearchText(text)"/></div><div@@ -141,8 +141,4 @@ const selectRepository = (});emit("next");};--const changeSearchText = (searchText: string) => {- state.searchText = searchText;-};</script>diff --git a/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vue b/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vueindex b23f817d67..4f24ec6a07 100644--- a/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vue+++ b/frontend/src/components/SQLReview/components/RuleConfigComponents/NumberComponent.vue@@ -1,20 +1,14 @@<template>- <input+ <NInputNumber:value="value"- type="number":disabled="disabled"- :class="[- 'shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full border-gray-300 rounded-md',- disabled && 'cursor-not-allowed',- ]":placeholder="`${config.payload.default}`"- @change="- $emit('update:value', ($event.target as HTMLInputElement).valueAsNumber)- "+ @update:value="$emit('update:value', $event as number)"/></template><script lang="ts" setup>+import { NInputNumber } from "naive-ui";import { RuleConfigComponent } from "@/types";defineProps<{diff --git a/frontend/src/components/SQLReview/components/RuleConfigComponents/StringArrayComponent.vue b/frontend/src/components/SQLReview/components/RuleConfigComponents/StringArrayComponent.vueindex b0b3744b0c..d8605561dd 100644--- a/frontend/src/components/SQLReview/components/RuleConfigComponents/StringArrayComponent.vue+++ b/frontend/src/components/SQLReview/components/RuleConfigComponents/StringArrayComponent.vue@@ -9,15 +9,11 @@@remove="remove(val)"/></div>- <input+ <BBTextFieldv-if="editable"- type="text"+ v-model:value="inputValue"pattern="[a-z]+":disabled="disabled"- :class="[- 'shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full border-gray-300 rounded-md',- disabled && 'cursor-not-allowed',- ]":placeholder="$t('sql-review.input-then-press-enter')"@keyup.enter="push($event)"/>@@ -25,6 +21,7 @@</template><script lang="ts" setup>+import { ref } from "vue";import type { RuleConfigComponent } from "@/types";const props = defineProps<{@@ -38,14 +35,15 @@ const emit = defineEmits<{(event: "update:value", value: string[]): void;}>();-const push = (e: Event) => {+const inputValue = ref("");++const push = (_: Event) => {const array = [...props.value];- const input = e.target as HTMLInputElement;- const val = input.value.trim();+ const val = inputValue.value.trim();if (val) {if (!array.includes(val)) {array.push(val);- input.value = "";+ inputValue.value = "";emit("update:value", array);}}diff --git a/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vue b/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vueindex 6c88f966a6..ef9b2dbfc9 100644--- a/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vue+++ b/frontend/src/components/SQLReview/components/RuleConfigComponents/StringComponent.vue@@ -1,14 +1,9 @@<template>- <input+ <BBTextField:value="value"- type="text":disabled="disabled"- :class="[- 'shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full border-gray-300 rounded-md',- disabled && 'cursor-not-allowed',- ]"- :placeholder="config.payload.default as string"- @change="$emit('update:value', ($event.target as HTMLInputElement).value)"+ :placeholder="`${config.payload.default}`"+ @update:value="$emit('update:value', $event)"/></template>diff --git a/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue b/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vueindex d81e8b1c31..88ca4135b0 100644--- a/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue+++ b/frontend/src/components/SQLReview/components/SQLRuleEditDialog.vue@@ -54,15 +54,15 @@{{ $t("common.description") }}</h3><div class="flex flex-col gap-x-2">- <AutoHeightTextarea+ <BBTextFieldv-model:value="state.comment":disabled="disabled":placeholder="getRuleLocalization(rule.type).description ||$t('common.description')"- rows="1"- :max-height="120"+ type="textarea"+ :autosize="{ minRows: 1, maxRows: 4 }"/></div></div>@@ -160,7 +160,6 @@import { NSwitch } from "naive-ui";import { computed, nextTick, reactive, watch } from "vue";import { useI18n } from "vue-i18n";-import AutoHeightTextarea from "@/components/misc/AutoHeightTextarea.vue";import { Engine } from "@/types/proto/v1/common";import { SQLReviewRuleLevel } from "@/types/proto/v1/org_policy_service";import {diff --git a/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue b/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vueindex a8e31eafdc..aa06a50dde 100644--- a/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue+++ b/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue@@ -12,10 +12,9 @@class="w-[30rem] max-w-[100vw] relative"><div class="flex items-center justify-end mx-2 mb-2">- <BBTableSearch- class="m-px"+ <SearchBox+ v-model:value="state.searchText":placeholder="$t('database.filter-database')"- @change-text="(text: string) => (state.searchText = text)"/></div><NCollapsediff --git a/frontend/src/components/misc/AutoHeightTextarea.vue b/frontend/src/components/misc/AutoHeightTextarea.vuedeleted file mode 100644index 7ca71aefaf..0000000000--- a/frontend/src/components/misc/AutoHeightTextarea.vue+++ /dev/null@@ -1,59 +0,0 @@-<template>- <textarea- ref="textareaRef"- v-model="state.value"- class="text-main focus:ring-control focus:border-control sm:text-sm resize-none whitespace-pre-wrap border-control-border rounded-md disabled:cursor-not-allowed"- />-</template>--<script lang="ts" setup>-import { useEventListener } from "@vueuse/core";-import { debounce } from "lodash-es";-import { onMounted, reactive, ref, watch } from "vue";-import { useVModel } from "@/composables/useVModel";-import { sizeToFit } from "@/utils";--type LocalState = {- value: string | undefined;-};--const props = withDefaults(- defineProps<{- value?: string;- padding?: number;- maxHeight?: number;- minHeight?: number;- }>(),- {- value: undefined,- padding: 2,- maxHeight: -1,- minHeight: -1,- }-);--const emit = defineEmits<{- (name: "update:value", value: string | undefined): void;-}>();--const state = reactive<LocalState>({- value: props.value,-});-const textareaRef = ref<HTMLTextAreaElement>();--useVModel(props, state, emit, "value");--const resize = () => {- sizeToFit(textareaRef.value, props.padding, props.maxHeight);-};--const debouncedResize = debounce(resize, 50);--onMounted(() => {- resize();-});--useEventListener("resize", debouncedResize);--watch(() => state.value, debouncedResize);-</script>diff --git a/frontend/src/locales/sql-review/en-US.json b/frontend/src/locales/sql-review/en-US.jsonindex 0156a9d669..0185d52f22 100644--- a/frontend/src/locales/sql-review/en-US.json+++ b/frontend/src/locales/sql-review/en-US.json@@ -45,7 +45,7 @@},"table-drop-naming-convention": {"title": "Restrict the naming format of tables to be deleted",- "description": "For example, by requring the \"_del\" suffix, it can effectively prevent accidental deletions. Suggestion error level: Error",+ "description": "For example, by requiring the \"_del\" suffix, it can effectively prevent accidental deletions. Suggestion error level: Error","component": {"format": {"title": "Table name format (regex)"diff --git a/frontend/src/views/auth/Activate.vue b/frontend/src/views/auth/Activate.vueindex 622190d0bf..0a9a157447 100644--- a/frontend/src/views/auth/Activate.vue+++ b/frontend/src/views/auth/Activate.vue@@ -41,13 +41,12 @@<span class="text-red-600">*</span></label><div class="mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="password"- v-model="state.password"+ v-model:value="state.password"type="password"autocomplete="on"required- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"/></div></div>@@ -60,12 +59,10 @@{{ $t("common.username") }}</label><div class="mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="name"- v-model="state.name"- type="text"+ v-model:value="state.name"placeholder="Jim Gray"- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"/></div></div>diff --git a/frontend/src/views/auth/MultiFactor.vue b/frontend/src/views/auth/MultiFactor.vueindex 47d49b0077..8cbde76ea3 100644--- a/frontend/src/views/auth/MultiFactor.vue+++ b/frontend/src/views/auth/MultiFactor.vue@@ -17,21 +17,19 @@class="w-8 h-auto opacity-60"/><p class="my-2 mb-4">{{ $t("multi-factor.auth-code") }}</p>- <input- v-model="state.otpCode"+ <BBTextField+ v-model:value="state.otpCode"placeholder="XXXXXX"- class="textfield w-full"- type="text"+ class="w-full"/></template><template v-else-if="state.selectedMFAType === 'RECOVERY_CODE'"><heroicons-outline:key class="w-8 h-auto opacity-60" /><p class="my-2 mb-4">{{ $t("multi-factor.recovery-code") }}</p>- <input- v-model="state.recoveryCode"+ <BBTextField+ v-model:value="state.recoveryCode"placeholder="XXXXXXXXXX"- class="textfield w-full"- type="text"+ class="w-full"/></template><div class="w-full mt-4">diff --git a/frontend/src/views/auth/PasswordReset.vue b/frontend/src/views/auth/PasswordReset.vueindex 2a332d1e01..535f482347 100644--- a/frontend/src/views/auth/PasswordReset.vue+++ b/frontend/src/views/auth/PasswordReset.vue@@ -22,13 +22,10 @@{{ $t("auth.password-reset.content") }}</label><div class="mt-4 rounded-md shadow-sm">- <input- id="email"- v-model="state.email"- type="email"+ <BBTextField+ v-model:value="state.email"requiredplaceholder="[email protected]"- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"/></div></div>diff --git a/frontend/src/views/auth/Signin.vue b/frontend/src/views/auth/Signin.vueindex d98030077b..6b0d3fde42 100644--- a/frontend/src/views/auth/Signin.vue+++ b/frontend/src/views/auth/Signin.vue@@ -26,13 +26,11 @@<span class="text-red-600">*</span></label><div class="mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="email"- v-model="state.email"- type="email"+ v-model:value="state.email"requiredplaceholder="[email protected]"- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"/></div></div>@@ -62,13 +60,12 @@<divclass="relative flex flex-row items-center mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="password"- v-model="state.password"+ v-model:value="state.password":type="state.showPassword ? 'text' : 'password'"autocomplete="on"required- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"/><divclass="hover:cursor-pointer absolute right-3"@@ -148,13 +145,11 @@<span class="text-red-600">*</span></label><div class="mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="username"- v-model="state.email"- type="text"+ v-model:value="state.email"requiredplaceholder="jim"- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"/></div></div>@@ -172,13 +167,12 @@<divclass="relative flex flex-row items-center mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="password"- v-model="state.password"+ v-model:value="state.password":type="state.showPassword ? 'text' : 'password'"autocomplete="on"required- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"/><divclass="hover:cursor-pointer absolute right-3"diff --git a/frontend/src/views/auth/Signup.vue b/frontend/src/views/auth/Signup.vueindex 3d19113f91..77ba4de4e3 100644--- a/frontend/src/views/auth/Signup.vue+++ b/frontend/src/views/auth/Signup.vue@@ -35,13 +35,11 @@{{ $t("common.email") }} <span class="text-red-600">*</span></label><div class="mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="email"- v-model="state.email"- type="email"+ v-model:value="state.email"requiredplaceholder="[email protected]"- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"@input="onTextEmail"/></div>@@ -58,13 +56,12 @@<divclass="relative flex flex-row items-center mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="password"- v-model="state.password"+ v-model:value="state.password":type="state.showPassword ? 'text' : 'password'"autocomplete="off"required- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"@input="refreshPasswordValidation"/><div@@ -90,26 +87,25 @@class="block text-sm font-medium leading-5 text-control">{{ $t("auth.sign-up.confirm-password") }}- <span class="text-red-600"- >*+ <span class="text-red-600">+ *{{state.showPasswordMismatchError? $t("auth.sign-up.password-mismatch"): ""- }}</span- >+ }}+ </span></label><divclass="relative flex flex-row items-center mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="password-confirm"- v-model="state.passwordConfirm"+ v-model:value="state.passwordConfirm":type="state.showPassword ? 'text' : 'password'"autocomplete="off":placeholder="$t('auth.sign-up.confirm-password-placeholder')"required- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"@input="refreshPasswordValidation"/><div@@ -135,14 +131,14 @@class="block text-sm font-medium leading-5 text-control">{{ $t("common.username") }}+ <span class="text-red-600"> * </span></label><div class="mt-1 rounded-md shadow-sm">- <input+ <BBTextFieldid="name"- v-model="state.name"- type="text"+ v-model:value="state.name"+ requiredplaceholder="Jim Gray"- class="appearance-none block w-full px-3 py-2 border border-control-border rounded-md placeholder-control-placeholder focus:outline-none focus:shadow-outline-blue focus:border-control-border sm:text-sm sm:leading-5"@input="onTextName"/></div>