@oinone/kunlun-vue-admin-base 6.2.1 → 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
  };
@@ -68227,8 +68228,11 @@ const __default__$1 = defineComponent({
68227
68228
  const rightFixedRows = tableEle.querySelectorAll('.vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-body--row');
68228
68229
  rows.forEach((row, index) => {
68229
68230
  const height = row.clientHeight;
68231
+ row.style.height = 'auto';
68230
68232
  const leftFixedRow = leftFixedRows[index];
68231
68233
  const rightFixedRow = rightFixedRows[index];
68234
+ leftFixedRow && (leftFixedRow.style.height = 'auto');
68235
+ rightFixedRow && (rightFixedRow.style.height = 'auto');
68232
68236
  const maxHeight = Math.max(height || 0, (leftFixedRow === null || leftFixedRow === void 0 ? void 0 : leftFixedRow.clientHeight) || 0, (rightFixedRow === null || rightFixedRow === void 0 ? void 0 : rightFixedRow.clientHeight) || 0, props.minLineHeight || 0);
68233
68237
  if (leftFixedRow && leftFixedRow.clientHeight !== maxHeight) {
68234
68238
  leftFixedRow.style.height = `${maxHeight}px`;
@@ -68276,11 +68280,10 @@ const __default__$1 = defineComponent({
68276
68280
  window.removeEventListener('resize', calcTableColumnHeight);
68277
68281
  resizeObserver.unobserve(tableContentElement.value);
68278
68282
  });
68279
- const stop = watch(() => props.dataSource, (v) => {
68283
+ watch(() => props.dataSource, (v) => {
68280
68284
  if (v && v.length) {
68281
68285
  nextTick(() => {
68282
68286
  calcTableColumnHeight();
68283
- stop();
68284
68287
  });
68285
68288
  }
68286
68289
  }, { immediate: true });
@@ -68546,17 +68549,18 @@ let TableWidget = class TableWidget extends BaseTableWidget {
68546
68549
  }
68547
68550
  return undefined;
68548
68551
  }
68552
+ /**
68553
+ * 表格行高是否自适应,默认开启
68554
+ */
68549
68555
  get autoLineHeight() {
68550
- const autoLineHeight = Optional.ofNullable(this.getDsl().autoLineHeight)
68551
- .map(BooleanHelper.toBoolean)
68552
- .orElse(undefined);
68556
+ const autoLineHeight = Optional.ofNullable(this.getDsl().autoLineHeight).map(BooleanHelper.toBoolean).orElse(true);
68553
68557
  if (typeof autoLineHeight === 'boolean') {
68554
68558
  return autoLineHeight;
68555
68559
  }
68556
68560
  if (typeof this.tableConfig.autoLineHeight === 'boolean') {
68557
68561
  return this.tableConfig.autoLineHeight;
68558
68562
  }
68559
- return undefined;
68563
+ return true;
68560
68564
  }
68561
68565
  get enableSequence() {
68562
68566
  return Optional.ofNullable(this.getDsl().enableSequence).map(BooleanHelper.toBoolean).orElse(false);
@@ -69306,7 +69310,7 @@ __decorate([
69306
69310
  ], TableWidget.prototype, "minLineHeight", null);
69307
69311
  __decorate([
69308
69312
  Widget.Reactive(),
69309
- __metadata("design:type", Object),
69313
+ __metadata("design:type", Boolean),
69310
69314
  __metadata("design:paramtypes", [])
69311
69315
  ], TableWidget.prototype, "autoLineHeight", null);
69312
69316
  __decorate([
@@ -76468,6 +76472,7 @@ let ServerActionWidget = class ServerActionWidget extends ActionWidget {
76468
76472
  formValidateProcess(e) {
76469
76473
  var _a;
76470
76474
  if (((_a = this.view) === null || _a === void 0 ? void 0 : _a.type) !== ViewType.Form) {
76475
+ this.notifyValidateResults(e);
76471
76476
  return;
76472
76477
  }
76473
76478
  const { formValidateCallChaining } = this;
@@ -76509,6 +76514,21 @@ let ServerActionWidget = class ServerActionWidget extends ActionWidget {
76509
76514
  }
76510
76515
  return results;
76511
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
+ }
76512
76532
  submit(action) {
76513
76533
  var _a, _b, _c, _d, _e, _f;
76514
76534
  return __awaiter(this, void 0, void 0, function* () {