decord/source/modules/threads/FormError.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

76 lines
2.5 KiB
TypeScript

// Module ID: 16624
// Function ID: 16625
// Name: FormSubmitErrorType
// Dependencies: [1114, 7939, 2]
// Exports: makeApiNameRequiredError, makeAutomodViolationError, makeEmptyMessageError, makeEmptyTitleError, renderError
// Module 16624 (FormSubmitErrorType)
import set from "set" /* 2 */;
import getSystemLocale from "getSystemLocale" /* 1114 */;
import getAutomodErrorMessageFromErrorResponse from "getAutomodErrorMessageFromErrorResponse" /* 7939 */;
let obj = { EmptyContent: 0, [0]: "EmptyContent", AutomodViolation: 1, [1]: "AutomodViolation", ApiValidation: 2, [2]: "ApiValidation" };
const result = set.fileFinishedImporting("modules/threads/FormError.tsx");
export const FormSubmitErrorType = obj;
export const makeEmptyTitleError = function makeEmptyTitleError() {
const intl = getSystemLocale.intl;
let stringResult = intl.string(getSystemLocale.t.uXA573);
obj = { type: obj.EmptyContent, message: null };
if (stringResult == null) {
stringResult = null;
}
obj[1] = stringResult;
return obj;
};
export const makeEmptyMessageError = function makeEmptyMessageError() {
const intl = getSystemLocale.intl;
let stringResult = intl.string(getSystemLocale.t.kesTVT);
obj = { type: obj.EmptyContent, message: null };
if (stringResult == null) {
stringResult = null;
}
obj[1] = stringResult;
return obj;
};
export const makeApiNameRequiredError = function makeApiNameRequiredError() {
const intl = getSystemLocale.intl;
let stringResult = intl.string(getSystemLocale.t.uXA573);
obj = { type: obj.ApiValidation, message: null };
if (stringResult == null) {
stringResult = null;
}
obj[1] = stringResult;
return obj;
};
export const makeAutomodViolationError = function makeAutomodViolationError(errorResponseBody, id) {
obj = getAutomodErrorMessageFromErrorResponse;
id = undefined;
if (id != null) {
id = id.id;
}
let automodErrorMessageFromErrorResponse = obj.getAutomodErrorMessageFromErrorResponse(errorResponseBody, id);
obj = { type: obj.AutomodViolation, message: null };
if (automodErrorMessageFromErrorResponse == null) {
automodErrorMessageFromErrorResponse = null;
}
obj[1] = automodErrorMessageFromErrorResponse;
return obj;
};
export const renderError = function renderError(type, content) {
let tmp = null;
if (null != type) {
if (type.type === obj.EmptyContent) {
if (null != content.content) {
tmp = null;
const str = content.content;
}
}
let message = type.message;
if (message == null) {
message = null;
}
tmp = message;
}
return tmp;
};