-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: split concat transform into separate components (#5224)
* refactor: split concat transform into separate components Signed-off-by: yuda <[email protected]> * chore: delete console.log Signed-off-by: yuda <[email protected]> * chore: fix watcher Signed-off-by: yuda <[email protected]> * refactor: split join transform into separate components Signed-off-by: yuda <[email protected]> * refactor: refactor EVAL form Signed-off-by: yuda <[email protected]> * refactor: refactor QUERY form Signed-off-by: yuda <[email protected]> * refactor: refactor ADD_LABELS form Signed-off-by: yuda <[email protected]> * refactor: update `createUnsavedTransformDataTable` Signed-off-by: yuda <[email protected]> * refactor: fix dt update validator and reset function Signed-off-by: yuda <[email protected]> * chore: update language Signed-off-by: yuda <[email protected]> * chore: update component name Signed-off-by: yuda <[email protected]> * fix: fix minor bugs Signed-off-by: yuda <[email protected]> --------- Signed-off-by: yuda <[email protected]>
- Loading branch information
Showing
14 changed files
with
596 additions
and
631 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...eb/src/common/modules/widgets/_components/WidgetFormDataTableCardTransformConcatenate.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<script setup lang="ts"> | ||
import { | ||
reactive, ref, watch, | ||
} from 'vue'; | ||
import { useProxyValue } from '@/common/composables/proxy-state'; | ||
import WidgetFormDataTableCardTransformFormWrapper | ||
from '@/common/modules/widgets/_components/WidgetFormDataTableCardTransformFormWrapper.vue'; | ||
import { | ||
type DATA_TABLE_OPERATOR, | ||
} from '@/common/modules/widgets/_constants/data-table-constant'; | ||
import type { TransformDataTableInfo, TransformDataTableProps } from '@/common/modules/widgets/types/widget-data-table-type'; | ||
import type { ConcatOptions } from '@/common/modules/widgets/types/widget-model'; | ||
const props = defineProps<TransformDataTableProps<ConcatOptions>>(); | ||
const emit = defineEmits<{(e: 'update:operator-options', value: ConcatOptions): void; }>(); | ||
const dataTableInfo = ref<TransformDataTableInfo>({ | ||
dataTables: props.originData?.data_tables, | ||
}); | ||
const state = reactive({ | ||
proxyOperatorOptions: useProxyValue<ConcatOptions>('operator-options', props, emit), | ||
}); | ||
// Update operator options | ||
watch(dataTableInfo, (_dataTableInfo) => { | ||
state.proxyOperatorOptions = { | ||
data_tables: _dataTableInfo.dataTables || [], | ||
}; | ||
}, { deep: true, immediate: true }); | ||
</script> | ||
|
||
<template> | ||
<div class="widget-form-data-table-card-transform-concatenate"> | ||
<widget-form-data-table-card-transform-form-wrapper :data-table-id="props.baseDataTableId" | ||
:operator="DATA_TABLE_OPERATOR.CONCAT" | ||
:data-table-info.sync="dataTableInfo" | ||
/> | ||
</div> | ||
</template> |
Oops, something went wrong.