@oinone/kunlun-vue-admin-base 6.3.7 → 6.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +25 -23
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/action/server-actions/ServerActionWidget.d.ts +3 -0
- package/dist/types/src/field/form/float/Plat.vue.d.ts +2 -2
- package/package.json +8 -8
- package/src/action/server-actions/ServerActionWidget.ts +6 -13
- package/src/basic/table/BaseTableWidget.ts +26 -16
- package/src/field/form/string/FormStringFieldWidget.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { translateValueByKey, RuntimeContextServiceToken, ClientType, RuntimeContextManager, resolveView, createDefaultLayout, baseActionTokenSymbol, SubmitType, RelationUpdateType, QueryService, SubmitRelationValue, CommonPatternMap, SubmitHandler, parseConfigs, getRefreshParameters, translate, ViewActionCache, MultiTabsConfigManager, MultiTabsRuntimeManifestMergedConfigManager, MultiTabsRouter, executeViewAction, RedirectTargetEnum, ModelCache, getRealTtype, ROOT_HANDLE, ExperimentalConfigManager, buildQueryCondition, ActiveRecordsOperator, isRelationField, resolveDynamicExpression, resolveDynamicDomain, isM2MField, SubmitValue, ActiveRecordExtendKeys, getValidatorParameters, OioProvider, isRelatedField, SubmitCacheManager, SubmitRelationHandler, isStaticRelationField, getStaticRelationField, FunctionCache, FunctionService, activeRecordsToJSONString, getRelationFieldKey, RequestHelper, isRelation2MField, FunctionMetadata, initI18n, getDefaultBrowser, RefreshCallChainingScope, getCurrentThemeSize, ColSpanEnum, isRuntimeClientAction, PopupManager, EventKeys as EventKeys$1, genStaticPath, ConfigHelper, queryResourceDateTimeFormat, getLabelFieldList4query, ExpressionExecutor, UnsupportedOperationException, MemoryListSearchCache, isO2MField, GenericFunctionService, isRelation2OField, ViewCache, systemMajorConfig, getLoginTheme, CurrentLanguage, BASIC_CONFIG_KEY, OioLoginLogoPosition, OioLoginThemeName, getCopyrightStatus, OINONE_HOMEPAGE_KEY, getMajorConfig, Dialog, Drawer, MultiTabsManager, UpdateOneWithRelationsService, resolveDslDefinition, computeViewMode, isRuntimeViewAction, generatorViewActionQueryParameter, Popup as Popup$1, executeServerAction, ModuleCache, getUrlParamByKey, SideBarThemeColor, SideBarTheme, MultiTabTheme, registerPopupConstructor, MultiTabType, $systemMajorConfig, getReloadMainViewParameters, formateLanguage, useLanguage, FrameworkInitializeSPI, registryLanguage, LanguageType, frameworkFactory, MetadataHelper, StaticMetadata, FunctionType } from '@oinone/kunlun-engine';
|
|
2
|
-
import { MessageHub, ILevel, Condition, GQL, HttpClient, gql, DefaultComparisonOperator as DefaultComparisonOperator$1, isFirstResetPasswordError, useMessageHub, isPicCodeError, SystemErrorCode,
|
|
1
|
+
import { translateValueByKey, RuntimeContextServiceToken, ClientType, RuntimeContextManager, resolveView, createDefaultLayout, baseActionTokenSymbol, SubmitType, RelationUpdateType, QueryService, SubmitRelationValue, CommonPatternMap, SubmitHandler, parseConfigs, getRefreshParameters, translate, ViewActionCache, MultiTabsConfigManager, MultiTabsRuntimeManifestMergedConfigManager, MultiTabsRouter, executeViewAction, RedirectTargetEnum, ModelCache, getRealTtype, ROOT_HANDLE, ExperimentalConfigManager, buildQueryCondition, ActiveRecordsOperator, isRelationField, resolveDynamicExpression, resolveDynamicDomain, isM2MField, SubmitValue, ActiveRecordExtendKeys, getValidatorParameters, OioProvider, isRelatedField, SubmitCacheManager, SubmitRelationHandler, isStaticRelationField, getStaticRelationField, FunctionCache, FunctionService, activeRecordsToJSONString, getRelationFieldKey, RequestHelper, isRelation2MField, FunctionMetadata, formValidateErrorProcess, initI18n, getDefaultBrowser, RefreshCallChainingScope, getCurrentThemeSize, ColSpanEnum, isRuntimeClientAction, PopupManager, EventKeys as EventKeys$1, genStaticPath, ConfigHelper, queryResourceDateTimeFormat, getLabelFieldList4query, ExpressionExecutor, UnsupportedOperationException, MemoryListSearchCache, isO2MField, GenericFunctionService, isRelation2OField, ViewCache, systemMajorConfig, getLoginTheme, CurrentLanguage, BASIC_CONFIG_KEY, OioLoginLogoPosition, OioLoginThemeName, getCopyrightStatus, OINONE_HOMEPAGE_KEY, getMajorConfig, Dialog, Drawer, MultiTabsManager, UpdateOneWithRelationsService, resolveDslDefinition, computeViewMode, isRuntimeViewAction, generatorViewActionQueryParameter, Popup as Popup$1, executeServerAction, ModuleCache, getUrlParamByKey, SideBarThemeColor, SideBarTheme, MultiTabTheme, registerPopupConstructor, MultiTabType, $systemMajorConfig, getReloadMainViewParameters, formateLanguage, useLanguage, FrameworkInitializeSPI, registryLanguage, LanguageType, frameworkFactory, MetadataHelper, StaticMetadata, FunctionType } from '@oinone/kunlun-engine';
|
|
2
|
+
import { MessageHub, ILevel, Condition, GQL, HttpClient, gql, DefaultComparisonOperator as DefaultComparisonOperator$1, isFirstResetPasswordError, useMessageHub, isPicCodeError, SystemErrorCode, useSessionPath, isNotPermission, setSessionPath, HttpClientHookToken, getSessionPath } from '@oinone/kunlun-request';
|
|
3
3
|
import { OioNotification, NotificationType, OioFormItem, PropRecordHelper, PageSizeEnum as PageSizeEnum$1, ListPaginationStyle, ListSelectMode, OioMessage, OioButton, OioModal, OioUpload, OioEmpty as OioEmpty$1, OioIcon as OioIcon$1, downloadFile, OioCheckbox, OioInputSearch, OioEmptyData, ButtonType, ConfirmType, PopconfirmPlacement as PopconfirmPlacement$1, OioPopconfirm, StringHelper as StringHelper$1, OioForm, StyleHelper as StyleHelper$1, OioBlock, OioBlockProps, useOioFormLayoutContext, OioCol, OioColProps, FlexColMode, FlexDirection as FlexDirection$1, OioRow, OioRowProps, CastHelper as CastHelper$1, OioDrawer, OioInnerPopup, SelectMode, WidgetTrigger as WidgetTrigger$1, EmptyStyle, OioTreeSelect, BooleanHelper as BooleanHelper$1, defaultCascaderProperties, OioCascader, CascaderCheckedStrategy, defaultLabelsSeparator, OioInputNumber, NumberHelper as NumberHelper$1, OioSwitch, OioTooltipHelp, OioSelect, defaultSelectProperties, OioSlider, SliderDirection, OioInput, InputType as InputType$1, OioTooltip, OioSpin, OioInputPassword, OioTextarea, OioDateTimePicker, OioDatePicker, OioTimePicker, OioYearPicker, OioDateRangePicker, OioDateTimeRangePicker, OioTimeRangePicker, OioYearRangePicker, OioTree, OioPagination, OioCollapse, OioBaseContainerProps, OioCollapseType, OioCollapseMethod, OioCollapseExpandIconPosition, OioGroup, OioTabs, OioTabPosition, OioTabAlign, onTabInvisibleChange, DEFAULT_TAB_TITLE, useTabBar, OioSpinProps, useInjectOioFormContext, useProviderOioFormContext, OioFormProps as OioFormProps$1, DEFAULT_COLS as DEFAULT_COLS$1, FormLayout as FormLayout$1, ValidateTrigger as ValidateTrigger$1, IconPlacement, OioTab, VIDEO_SUFFIX_LIST as VIDEO_SUFFIX_LIST$1, OioInputGroup, OioDropdown, OioDropdownProps, debugConsole as debugConsole$1, createEasyExportTask, getExportWorkBook, OioDropdownPlacement, OioDivider, uniqueKeyGenerator as uniqueKeyGenerator$1, useClick, DEFAULT_CARD_GUTTERS as DEFAULT_CARD_GUTTERS$1, FlexRowJustify as FlexRowJustify$1, OioGallery, getEasyImportTemplate as getEasyImportTemplate$1 } from '@oinone/kunlun-vue-ui-antd';
|
|
4
4
|
import { get, isNil, isString as isString$1, isPlainObject, toString, isEmpty, toNumber, isBoolean, isFunction as isFunction$2, cloneDeep, set, isObject as isObject$2, ceil, toInteger, isArray as isArray$3, isNaN as isNaN$1, isNumber, isDate, omitBy, isEqual as isEqual$1, debounce, remove, range, delay, find, trim } from 'lodash-es';
|
|
5
5
|
import { ViewType, ViewClientType, EnumOptionState, ModelFieldType, ViewMode, isValidateEmpty, isEmptyValue, ViewActionTarget, ActionContextType, ModelType, isComplexTtype, SYSTEM_MODULE_NAME, UserBehaviorEventEnum, deepClone, isNumberTtype, isStringTtype, SystemSource, RuntimeConfig, isEmptyKeObject, ActionType, isRelationTtype, GlobalConfig, ModelDefaultActionName, MetadataFragment, SYSTEM_MODULE, PluginsLoader, ModelFieldTypeDisplayName } from '@oinone/kunlun-meta';
|
|
@@ -33453,17 +33453,28 @@ class BaseTableWidget extends BaseElementListViewWidget {
|
|
|
33453
33453
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33454
33454
|
const { rootRuntimeContext, model } = this;
|
|
33455
33455
|
const requestFields = rootRuntimeContext.getRequestModelFields();
|
|
33456
|
-
|
|
33457
|
-
|
|
33456
|
+
const sessionPath = (_a = this.currentTriggerCreateAction) === null || _a === void 0 ? void 0 : _a.sessionPath;
|
|
33457
|
+
try {
|
|
33458
|
+
if (sessionPath) {
|
|
33459
|
+
return yield FunctionService.INSTANCE.simpleExecute(model, functionDefinition, {
|
|
33460
|
+
requestFields,
|
|
33461
|
+
variables: {
|
|
33462
|
+
path: sessionPath,
|
|
33463
|
+
relationExcludeUpdate: true
|
|
33464
|
+
}
|
|
33465
|
+
}, data);
|
|
33466
|
+
}
|
|
33467
|
+
return yield FunctionService.INSTANCE.simpleExecute(model, functionDefinition, {
|
|
33458
33468
|
requestFields,
|
|
33459
33469
|
variables: {
|
|
33460
|
-
|
|
33470
|
+
relationExcludeUpdate: true
|
|
33461
33471
|
}
|
|
33462
33472
|
}, data);
|
|
33463
33473
|
}
|
|
33464
|
-
|
|
33465
|
-
|
|
33466
|
-
|
|
33474
|
+
catch (e) {
|
|
33475
|
+
formValidateErrorProcess(e);
|
|
33476
|
+
throw e;
|
|
33477
|
+
}
|
|
33467
33478
|
});
|
|
33468
33479
|
}
|
|
33469
33480
|
refreshRowEditorUpdate(context, data, res) {
|
|
@@ -44434,10 +44445,10 @@ class FormStringFieldWidget extends FormInputAbstractFieldWidget {
|
|
|
44434
44445
|
validateLength(realValue) {
|
|
44435
44446
|
const length = !isNil(realValue) ? realValue.length : 0;
|
|
44436
44447
|
const { minLength, maxLength } = this;
|
|
44437
|
-
if (!isEmptyValue(realValue) && !isNil(maxLength) && length > maxLength) {
|
|
44448
|
+
if (!isEmptyValue(realValue) && !isNil(maxLength) && maxLength >= 0 && length > maxLength) {
|
|
44438
44449
|
return this.validatorError(`${translateValueByKey('最大长度为')}${maxLength}`);
|
|
44439
44450
|
}
|
|
44440
|
-
if (!isEmptyValue(realValue) && !isNil(minLength) && length < minLength) {
|
|
44451
|
+
if (!isEmptyValue(realValue) && !isNil(minLength) && minLength >= 0 && length < minLength) {
|
|
44441
44452
|
return this.validatorError(`${translateValueByKey('最小长度为')}${minLength}`);
|
|
44442
44453
|
}
|
|
44443
44454
|
return this.validatorSuccess();
|
|
@@ -77693,20 +77704,11 @@ let ServerActionWidget = class ServerActionWidget extends ActionWidget {
|
|
|
77693
77704
|
}
|
|
77694
77705
|
return results;
|
|
77695
77706
|
}
|
|
77707
|
+
/**
|
|
77708
|
+
* @deprecated 6.x please using {@link formValidateErrorProcess}
|
|
77709
|
+
*/
|
|
77696
77710
|
notifyValidateResults(e) {
|
|
77697
|
-
|
|
77698
|
-
const error = (_a = e.errors) === null || _a === void 0 ? void 0 : _a[0];
|
|
77699
|
-
if (!error) {
|
|
77700
|
-
return;
|
|
77701
|
-
}
|
|
77702
|
-
if (((_b = error.extensions) === null || _b === void 0 ? void 0 : _b.errorCode) !== SystemErrorCode.FORM_VALIDATE_ERROR) {
|
|
77703
|
-
return;
|
|
77704
|
-
}
|
|
77705
|
-
for (const messageItem of ((_c = error.extensions) === null || _c === void 0 ? void 0 : _c.messages) || []) {
|
|
77706
|
-
if (RequestErrorInterceptor.ignoredFormValidateMessage(messageItem)) {
|
|
77707
|
-
MessageHub.error(messageItem.message);
|
|
77708
|
-
}
|
|
77709
|
-
}
|
|
77711
|
+
formValidateErrorProcess(e);
|
|
77710
77712
|
}
|
|
77711
77713
|
clickActionAfter(result) {
|
|
77712
77714
|
return __awaiter(this, void 0, void 0, function* () {
|