@oinone/kunlun-vue-admin-base 6.2.2 → 6.2.3

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.
@@ -1,5 +1,5 @@
1
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, buildQueryCondition, ActiveRecordsOperator, isRelationField, resolveDynamicExpression, resolveDynamicDomain, isM2MField, SubmitValue, ActiveRecordExtendKeys, getValidatorParameters, OioProvider, isRelatedField, SubmitCacheManager, SubmitRelationHandler, isStaticRelationField, getStaticRelationField, activeRecordsToJSONString, getRelationFieldKey, RequestHelper, isRelation2MField, FunctionMetadata, FunctionCache, FunctionService, initI18n, getDefaultBrowser, RefreshCallChainingScope, getCurrentThemeSize, ColSpanEnum, ViewCache, isRuntimeClientAction, PopupManager, EventKeys as EventKeys$1, genStaticPath, ConfigHelper, queryResourceDateTimeFormat, getLabelFieldList4query, ExpressionExecutor, UnsupportedOperationException, MemoryListSearchCache, isO2MField, GenericFunctionService, isRelation2OField, OioLoginLogoPosition, OioLoginThemeName, getCopyrightStatus, getLoginTheme, systemMajorConfig, CurrentLanguage, OINONE_HOMEPAGE_KEY, BASIC_CONFIG_KEY, getMajorConfig, Dialog, Drawer, MultiTabsManager, StaticMetadata, 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, FunctionType } from '@oinone/kunlun-engine';
2
- import { MessageHub, ILevel, Condition, DefaultComparisonOperator as DefaultComparisonOperator$1, GQL, HttpClient, gql, useMessageHub, SystemErrorCode, useSessionPath, isNotPermission, setSessionPath, HttpClientHookToken, getSessionPath } from '@oinone/kunlun-request';
2
+ import { MessageHub, ILevel, Condition, DefaultComparisonOperator as DefaultComparisonOperator$1, GQL, HttpClient, gql, useMessageHub, SystemErrorCode, RequestErrorInterceptor, 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, OioCollapse, OioBaseContainerProps, OioCollapseType, OioCollapseMethod, OioCollapseExpandIconPosition, CastHelper as CastHelper$1, OioGroup, OioTabs, OioTabPosition, OioTabAlign, onTabInvisibleChange, DEFAULT_TAB_TITLE, BooleanHelper as BooleanHelper$1, useTabBar, OioSpin, OioSpinProps, useInjectOioFormContext, useProviderOioFormContext, OioDrawer, OioInnerPopup, SelectMode, WidgetTrigger as WidgetTrigger$1, EmptyStyle, defaultTreeSelectProperties, OioTreeSelect, defaultCascaderProperties, OioCascader, CascaderCheckedStrategy, defaultLabelsSeparator, OioInputNumber, NumberHelper as NumberHelper$1, OioSwitch, OioSlider, SliderDirection, OioInput, OioSelect, InputType as InputType$1, OioTooltip, OioInputPassword, OioTextarea, OioDateTimePicker, OioDatePicker, OioTimePicker, OioYearPicker, OioDateRangePicker, OioDateTimeRangePicker, OioTimeRangePicker, OioYearRangePicker, defaultSelectProperties, OioTooltipHelp, OioTree, OioPagination, 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, isNumberTtype, isStringTtype, SystemSource, RuntimeConfig, deepClone, isEmptyKeObject, ActionType, isRelationTtype, GlobalConfig, ModelDefaultActionName, MetadataFragment, SYSTEM_MODULE, PluginsLoader, ModelFieldTypeDisplayName } from '@oinone/kunlun-meta';
@@ -176,9 +176,9 @@ let titleCache;
176
176
  function getNotificationTitle(type) {
177
177
  if (!titleCache) {
178
178
  titleCache = {};
179
- for (const item of typeof NotificationType) {
180
- const key = `kunlun.common.${type}`;
181
- titleCache[type] = translateValueByKey(get(zhCn, key));
179
+ for (const item in NotificationType) {
180
+ const key = `kunlun.common.${item}`;
181
+ titleCache[item] = translateValueByKey(get(zhCn, key));
182
182
  }
183
183
  }
184
184
  return titleCache[type];
@@ -42692,8 +42692,10 @@ var script$38 = defineComponent({
42692
42692
  createVNode('div', {
42693
42693
  class: 'detail-common-field-value',
42694
42694
  title: realValue,
42695
- innerHTML: realValue.replace(/\r?\n/g, '<br/>')
42696
- })
42695
+ style: {
42696
+ whiteSpace: 'pre-line'
42697
+ }
42698
+ }, realValue)
42697
42699
  ];
42698
42700
  }
42699
42701
  },
@@ -58122,7 +58124,7 @@ let FormHtmlRichTextFieldWidget = class FormHtmlRichTextFieldWidget extends Form
58122
58124
  get richTextToolbarExcludeKeys() {
58123
58125
  const { richTextToolbarExcludeKeys } = this.getDsl();
58124
58126
  if (!richTextToolbarExcludeKeys) {
58125
- return null;
58127
+ return [];
58126
58128
  }
58127
58129
  return richTextToolbarExcludeKeys.split(',').map((v) => v.trim());
58128
58130
  }
@@ -65060,9 +65062,8 @@ let TableTextFieldWidget = class TableTextFieldWidget extends TableStringFieldWi
65060
65062
  const value = this.compute(context);
65061
65063
  return [
65062
65064
  createVNode('span', {
65063
- // innerHTML: value ? value.replace(/\r?\n/g, '<br/>') : ''
65064
- innerHTML: value
65065
- })
65065
+ class: 'table-text-field-value'
65066
+ }, value)
65066
65067
  ];
65067
65068
  }
65068
65069
  };
@@ -76471,6 +76472,7 @@ let ServerActionWidget = class ServerActionWidget extends ActionWidget {
76471
76472
  formValidateProcess(e) {
76472
76473
  var _a;
76473
76474
  if (((_a = this.view) === null || _a === void 0 ? void 0 : _a.type) !== ViewType.Form) {
76475
+ this.notifyValidateResults(e);
76474
76476
  return;
76475
76477
  }
76476
76478
  const { formValidateCallChaining } = this;
@@ -76512,6 +76514,21 @@ let ServerActionWidget = class ServerActionWidget extends ActionWidget {
76512
76514
  }
76513
76515
  return results;
76514
76516
  }
76517
+ notifyValidateResults(e) {
76518
+ var _a, _b, _c;
76519
+ const error = (_a = e.errors) === null || _a === void 0 ? void 0 : _a[0];
76520
+ if (!error) {
76521
+ return;
76522
+ }
76523
+ if (((_b = error.extensions) === null || _b === void 0 ? void 0 : _b.errorCode) !== SystemErrorCode.FORM_VALIDATE_ERROR) {
76524
+ return;
76525
+ }
76526
+ for (const messageItem of ((_c = error.extensions) === null || _c === void 0 ? void 0 : _c.messages) || []) {
76527
+ if (RequestErrorInterceptor.ignoredFormValidateMessage(messageItem)) {
76528
+ MessageHub.error(messageItem.message);
76529
+ }
76530
+ }
76531
+ }
76515
76532
  submit(action) {
76516
76533
  var _a, _b, _c, _d, _e, _f;
76517
76534
  return __awaiter(this, void 0, void 0, function* () {