@tager/admin-import
Advanced tools
Comparing version 0.1.1 to 0.1.2
import { FileType } from '@tager/admin-services'; | ||
interface HistoryType { | ||
import { FieldConfigUnion, FieldShortType, OutgoingValueUnion } from '@tager/admin-dynamic-field'; | ||
export interface HistoryType { | ||
readonly datetime: string; | ||
@@ -17,2 +18,3 @@ readonly status: string; | ||
readonly name: string; | ||
readonly fields: Array<FieldConfigUnion>; | ||
} | ||
@@ -26,3 +28,3 @@ export interface ModuleInfoType { | ||
file: string; | ||
params: Array<FieldShortType<OutgoingValueUnion>>; | ||
} | ||
export {}; |
import { OptionType, SingleFileInputValueType } from '@tager/admin-ui'; | ||
import { ImportCreatePayload } from '../../typings/model'; | ||
import { FieldUnion } from '@tager/admin-dynamic-field'; | ||
import { ImportCreatePayload, StrategyType } from '../../typings/model'; | ||
export declare type FormValues = { | ||
@@ -7,2 +8,3 @@ strategy: OptionType | null; | ||
}; | ||
export declare function convertImportFormValuesToCreationPayload(values: FormValues): ImportCreatePayload; | ||
export declare function convertImportFormValuesToCreationPayload(values: FormValues, templateValues: Array<FieldUnion>): ImportCreatePayload; | ||
export declare function convertStrategiesToStrategyOptionList(strategies: Array<StrategyType>): Array<OptionType>; |
import { ColumnDefinition } from '@tager/admin-ui'; | ||
import { ImportType } from '../../typings/model'; | ||
import { getImportFormUrl } from '../../utils/paths'; | ||
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{ | ||
import { CellHistory } from './components/CellHistory'; | ||
declare const _default: import("vue").ComponentOptions<CellHistory, import("@vue/composition-api").ShallowUnwrapRef<{ | ||
columnDefs: ColumnDefinition<ImportType>[]; | ||
@@ -15,4 +16,2 @@ getImportFormUrl: typeof getImportFormUrl; | ||
pageNumber: import("@vue/composition-api").Ref<number>; | ||
t: import("i18next").TFunction; | ||
dateTimeFormat: (value: number | string | Date) => string; | ||
}> & { | ||
@@ -22,3 +21,3 @@ [key: string]: unknown; | ||
[x: string]: any; | ||
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{ | ||
}> & import("vue").VueConstructor<CellHistory> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{ | ||
[x: string]: any; | ||
@@ -36,4 +35,2 @@ }, import("@vue/composition-api").ShallowUnwrapRef<{ | ||
pageNumber: import("@vue/composition-api").Ref<number>; | ||
t: import("i18next").TFunction; | ||
dateTimeFormat: (value: number | string | Date) => string; | ||
}>, { | ||
@@ -40,0 +37,0 @@ [x: string]: any; |
{ | ||
"name": "@tager/admin-import", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"license": "MIT", | ||
@@ -28,5 +28,6 @@ "main": "dist/index.umd.js", | ||
"@rollup/plugin-node-resolve": "^8.1.0", | ||
"@tager/admin-layout": "^0.5.1", | ||
"@tager/admin-services": "^0.2.23", | ||
"@tager/admin-ui": "^0.8.58", | ||
"@tager/admin-dynamic-field": "^0.1.18", | ||
"@tager/admin-layout": "^0.5.3", | ||
"@tager/admin-services": "^0.2.24", | ||
"@tager/admin-ui": "^0.8.81", | ||
"@types/lodash.kebabcase": "^4.1.6", | ||
@@ -33,0 +34,0 @@ "@types/node": "12.x", |
import { FileType } from '@tager/admin-services'; | ||
import { | ||
FieldConfigUnion, | ||
FieldShortType, | ||
OutgoingValueUnion, | ||
} from '@tager/admin-dynamic-field'; | ||
interface HistoryType { | ||
export interface HistoryType { | ||
readonly datetime: string; | ||
@@ -20,2 +25,3 @@ readonly status: string; | ||
readonly name: string; | ||
readonly fields: Array<FieldConfigUnion>; | ||
} | ||
@@ -31,2 +37,3 @@ | ||
file: string; | ||
params: Array<FieldShortType<OutgoingValueUnion>>; | ||
} |
import { OptionType, SingleFileInputValueType } from '@tager/admin-ui'; | ||
import { FieldUnion, universalFieldUtils } from '@tager/admin-dynamic-field'; | ||
import { ImportCreatePayload } from '../../typings/model'; | ||
import { ImportCreatePayload, StrategyType } from '../../typings/model'; | ||
@@ -11,3 +12,4 @@ export type FormValues = { | ||
export function convertImportFormValuesToCreationPayload( | ||
values: FormValues | ||
values: FormValues, | ||
templateValues: Array<FieldUnion> | ||
): ImportCreatePayload { | ||
@@ -17,3 +19,16 @@ return { | ||
file: values.file?.file.id ?? '', | ||
params: templateValues.map((field) => ({ | ||
name: field.config.name, | ||
value: universalFieldUtils.getOutgoingValue(field), | ||
})), | ||
}; | ||
} | ||
export function convertStrategiesToStrategyOptionList( | ||
strategies: Array<StrategyType> | ||
): Array<OptionType> { | ||
return strategies.map((strategy) => ({ | ||
value: strategy.id, | ||
label: strategy.name, | ||
})); | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
676471
45
16195
34
13
3