@oinone/kunlun-vue-admin-base 6.2.4 → 6.2.6
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 +74 -26
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/field/tree-select/AbstractTreeFieldWidget.d.ts +2 -1
- package/dist/types/src/field/tree-select/DefaultTreeSelect.vue.d.ts +7 -1
- package/dist/types/src/util/tree-utils.d.ts +1 -0
- package/dist/types/src/view/tree/AbstractTreeElementWidget.d.ts +2 -0
- package/dist/types/src/view/tree/TreeWidget.d.ts +2 -0
- package/package.json +8 -8
- package/src/field/form/m2o/address/FormM2OAddressFieldWidget.ts +36 -11
- package/src/field/form/string/expression/ExpressionAbstractWidget.ts +7 -3
- package/src/field/tree-select/AbstractTreeFieldWidget.ts +10 -1
- package/src/field/tree-select/DefaultTreeSelect.vue +4 -6
- package/src/util/tree-utils.ts +9 -2
- package/src/view/tree/AbstractTreeElementWidget.ts +10 -1
- package/src/view/tree/TreeWidget.ts +10 -2
- package/src/view/workbench/services.ts +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
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, ExperimentalConfigManager, 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
2
|
import { MessageHub, ILevel, Condition, DefaultComparisonOperator as DefaultComparisonOperator$1, GQL, HttpClient, gql, isFirstResetPasswordError, useMessageHub, isPicCodeError, SystemErrorCode, RequestErrorInterceptor, useSessionPath, isNotPermission, setSessionPath, HttpClientHookToken, getSessionPath } from '@oinone/kunlun-request';
|
|
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,
|
|
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, 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';
|
|
6
6
|
import { NumberHelper, uniqueKeyGenerator, debugConsole, BooleanHelper, StringHelper, Optional, CastHelper, ObjectUtils, CallChaining, RSQLHelper, SortHelper, DateUtil, GraphqlHelper, TreeHelper, TreeNode, BlockingEventManager, instantiate, emitEvent, defaultFormat, DateTimeFormatMap, DateFormatMap, TimeFormatMap, defaultDateFormat, defaultTimeFormat, defaultYearFormat, defaultYearValueFormat, defaultDateFormatKey, defaultTimeFormatKey, BigNumber, fetchRealValue, KeyboardEventHelper, RSQLOperators, RSQLCompositeOperators, UrlHelper, NonBlockingEventManager, isMobile as isMobile$1, JSONUtils } from '@oinone/kunlun-shared';
|
|
7
7
|
import { DslRender, Widget, ActiveRecordsWidget, InnerWidgetType, VueWidget, DslDefinitionWidget, WidgetTagProps, reportAllMounted, renderWidgets, executeInvisible, onAllMounted, isAllInvisible, newVueWidget, getWidget, getWidgetNotNull, componentInstall, directiveInstall, pluginInstall, ViewWidget } from '@oinone/kunlun-vue-widget';
|
|
8
8
|
import { defineComponent, createVNode, computed, inject, provide, ref, watch, withDirectives, vShow, getCurrentInstance, onMounted, onBeforeMount, isRef, Fragment, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createElementVNode, toDisplayString, createCommentVNode, withModifiers, nextTick, normalizeClass, normalizeStyle, renderList, createTextVNode, renderSlot, withKeys, h as h$1, isVNode, Comment, Text, onBeforeUnmount, unref, reactive, onUnmounted, Teleport, TransitionGroup, render as render$2x, watchEffect, Transition, resolveDirective, cloneVNode, onUpdated, toRef, toRefs, shallowRef, toRaw, createSlots, vModelText, onActivated, useCssVars, mergeProps, normalizeProps, guardReactiveProps, pushScopeId, popScopeId, KeepAlive, resolveDynamicComponent, markRaw, createApp as createApp$1, onDeactivated } from 'vue';
|
|
9
|
-
import { PageSizeEnum, PopconfirmPlacement, FlexRowAlign, ValidateTrigger, ComputeTrigger, WidgetTrigger, PropRecordHelper as PropRecordHelper$1, StableSlotProp, OioDateTimePickerFormatProps, OioEmpty, VIDEO_SUFFIX_LIST, OioIcon, AUploadProps, FileHelper, ButtonBizStyle, ButtonType as ButtonType$1, ConfirmType as ConfirmType$1, StyleHelper, OioFormProps, FormLayout, FlexDirection, DEFAULT_GUTTERS, LayoutHelper, DEFAULT_CARD_GUTTERS, DEFAULT_VERTICAL_GUTTERS, DEFAULT_COLS, FlexColMode as FlexColMode$1, OioCollapseType as OioCollapseType$1, OioCollapseMethod as OioCollapseMethod$1, OioCollapseExpandIconPosition as OioCollapseExpandIconPosition$1, OioCollapsePanelProps, useOioFormLayoutContext as useOioFormLayoutContext$1, useInjectOioCollapseContext, DEFAULT_COLLAPSE_PANEL_TITLE, OioTabPosition as OioTabPosition$1, OioTabAlign as OioTabAlign$1, OioTabProps, useInjectOioTabsContext, vAutoHidden, vFocus, OioModalProps, ModalWidth, OioDrawerProps, DrawerPlacement, DrawerWidth, DrawerHeight, InnerPopupSize, InputType, SelectMode as SelectMode$1, EmptyStyle as EmptyStyle$1, CascaderCheckedStrategy as CascaderCheckedStrategy$1, InputMediaMode, OioInputNumberProps, SliderDirection as SliderDirection$1, ColorFormat, ColorInputPlacement, DEFAULT_PREDEFINE, MENU_ICON_LIST, DESIGNER_ICON_LIST, defaultMultiPartConfig, useUploadFileEvent, IUploadMethod, OioDateRangePickerProps, OioDateTimeRangePickerProps, OioTimeRangePickerProps, OioYearRangePickerProps, OioDatePickerProps, OioDateTimePickerProps, OioTimePickerProps, OioYearPickerProps, ZH_CN_CODE, getFileSignature, createResourceFile, FlexRowJustify, SearchTrigger, TreeSelectCheckedStrategy, LoginMode, defaultLoginErrorMessages, defaultLoginPageSettings, EN_US_CODE, LOGIN_LANGUAGE_STORAGE_KEY, LOGIN_LANGUAGE_ISO_STORAGE_KEY, loginMessageHubName, ListSelectMode as ListSelectMode$1, OioDropdownTrigger, getEasyImportTemplate, createEasyImportTask, ListPaginationStyle as ListPaginationStyle$1, DividerType, OioCardCascader, OioCard, PatchFlags, OioSpinProps as OioSpinProps$1, importTaskWithTableField } from '@oinone/kunlun-vue-ui-common';
|
|
9
|
+
import { PageSizeEnum, PopconfirmPlacement, FlexRowAlign, ValidateTrigger, ComputeTrigger, WidgetTrigger, PropRecordHelper as PropRecordHelper$1, StableSlotProp, OioDateTimePickerFormatProps, OioEmpty, VIDEO_SUFFIX_LIST, OioIcon, AUploadProps, FileHelper, ButtonBizStyle, ButtonType as ButtonType$1, ConfirmType as ConfirmType$1, StyleHelper, OioFormProps, FormLayout, FlexDirection, DEFAULT_GUTTERS, LayoutHelper, DEFAULT_CARD_GUTTERS, DEFAULT_VERTICAL_GUTTERS, DEFAULT_COLS, FlexColMode as FlexColMode$1, OioCollapseType as OioCollapseType$1, OioCollapseMethod as OioCollapseMethod$1, OioCollapseExpandIconPosition as OioCollapseExpandIconPosition$1, OioCollapsePanelProps, useOioFormLayoutContext as useOioFormLayoutContext$1, useInjectOioCollapseContext, DEFAULT_COLLAPSE_PANEL_TITLE, OioTabPosition as OioTabPosition$1, OioTabAlign as OioTabAlign$1, OioTabProps, useInjectOioTabsContext, vAutoHidden, vFocus, OioModalProps, ModalWidth, OioDrawerProps, DrawerPlacement, DrawerWidth, DrawerHeight, InnerPopupSize, InputType, defaultTreeSelectProperties, SelectMode as SelectMode$1, EmptyStyle as EmptyStyle$1, CascaderCheckedStrategy as CascaderCheckedStrategy$1, InputMediaMode, OioInputNumberProps, SliderDirection as SliderDirection$1, ColorFormat, ColorInputPlacement, DEFAULT_PREDEFINE, MENU_ICON_LIST, DESIGNER_ICON_LIST, defaultMultiPartConfig, useUploadFileEvent, IUploadMethod, OioDateRangePickerProps, OioDateTimeRangePickerProps, OioTimeRangePickerProps, OioYearRangePickerProps, OioDatePickerProps, OioDateTimePickerProps, OioTimePickerProps, OioYearPickerProps, ZH_CN_CODE, getFileSignature, createResourceFile, FlexRowJustify, SearchTrigger, TreeSelectCheckedStrategy, LoginMode, defaultLoginErrorMessages, defaultLoginPageSettings, EN_US_CODE, LOGIN_LANGUAGE_STORAGE_KEY, LOGIN_LANGUAGE_ISO_STORAGE_KEY, loginMessageHubName, ListSelectMode as ListSelectMode$1, OioDropdownTrigger, getEasyImportTemplate, createEasyImportTask, ListPaginationStyle as ListPaginationStyle$1, DividerType, OioCardCascader, OioCard, PatchFlags, OioSpinProps as OioSpinProps$1, importTaskWithTableField } from '@oinone/kunlun-vue-ui-common';
|
|
10
10
|
import { DslDefinitionType, DslDefinitionHelper, DEFAULT_SLOT_NAME, XMLParse, DslSlotUtils, UnknownDslDefinition, IGNORED_TEMPLATE_DSL_KEYS, DEFAULT_CHILDREN_KEY } from '@oinone/kunlun-dsl';
|
|
11
11
|
import { useMatched, isDev, getRouterInstance, setGlobalEnv } from '@oinone/kunlun-router';
|
|
12
12
|
import { SPIOperator, SPIFactory, SPIMatchAnyValue, SPI } from '@oinone/kunlun-spi';
|
|
@@ -3907,7 +3907,7 @@ class TreeUtils {
|
|
|
3907
3907
|
}
|
|
3908
3908
|
}
|
|
3909
3909
|
dslSlots[slotName] = targetSlot;
|
|
3910
|
-
return { targetSlot, viewDsl, viewTemplate };
|
|
3910
|
+
return { viewType: viewDsl.type, targetSlot, viewDsl, viewTemplate };
|
|
3911
3911
|
}
|
|
3912
3912
|
return undefined;
|
|
3913
3913
|
}
|
|
@@ -40505,6 +40505,9 @@ class AbstractTreeFieldWidget extends FormFieldWidget {
|
|
|
40505
40505
|
*/
|
|
40506
40506
|
this.backfillTreeNodes = [];
|
|
40507
40507
|
}
|
|
40508
|
+
get mappingProperties() {
|
|
40509
|
+
return Object.assign(Object.assign({}, defaultTreeSelectProperties), { labelProp: 'title', valueProp: 'key' });
|
|
40510
|
+
}
|
|
40508
40511
|
get referencesModel() {
|
|
40509
40512
|
return this.field.referencesModel;
|
|
40510
40513
|
}
|
|
@@ -41286,6 +41289,11 @@ __decorate([
|
|
|
41286
41289
|
Widget.Reactive(),
|
|
41287
41290
|
__metadata("design:type", Object)
|
|
41288
41291
|
], AbstractTreeFieldWidget.prototype, "expandedKeys", void 0);
|
|
41292
|
+
__decorate([
|
|
41293
|
+
Widget.Reactive(),
|
|
41294
|
+
__metadata("design:type", Object),
|
|
41295
|
+
__metadata("design:paramtypes", [])
|
|
41296
|
+
], AbstractTreeFieldWidget.prototype, "mappingProperties", null);
|
|
41289
41297
|
__decorate([
|
|
41290
41298
|
Widget.Reactive(),
|
|
41291
41299
|
__metadata("design:type", Object),
|
|
@@ -41384,14 +41392,15 @@ __decorate([
|
|
|
41384
41392
|
__metadata("design:returntype", void 0)
|
|
41385
41393
|
], AbstractTreeFieldWidget.prototype, "filterChanged", null);
|
|
41386
41394
|
|
|
41387
|
-
const mappingProperties$1 = Object.assign(Object.assign({}, defaultTreeSelectProperties), { labelProp: 'title', valueProp: 'key' });
|
|
41388
41395
|
var script$3b = defineComponent({
|
|
41389
41396
|
name: 'DefaultTreeSelect',
|
|
41390
41397
|
components: {
|
|
41391
41398
|
OioTreeSelect
|
|
41392
41399
|
},
|
|
41393
41400
|
inheritAttrs: false,
|
|
41394
|
-
props: Object.assign(Object.assign(Object.assign({}, OioCommonProps), OioMetadataProps), {
|
|
41401
|
+
props: Object.assign(Object.assign(Object.assign({}, OioCommonProps), OioMetadataProps), { mappingProperties: {
|
|
41402
|
+
type: Object
|
|
41403
|
+
}, maxTagCount: {
|
|
41395
41404
|
type: Number
|
|
41396
41405
|
}, selectedValue: {
|
|
41397
41406
|
type: [Object, Array]
|
|
@@ -41510,13 +41519,13 @@ var script$3b = defineComponent({
|
|
|
41510
41519
|
};
|
|
41511
41520
|
},
|
|
41512
41521
|
render() {
|
|
41513
|
-
const { treeData, selectMode, selectedValue, readonly, disabled, placeholder, allowClear, multipleCheckedStrategy, treeCheckStrictly, loading, enableSearch, enableLoadData, onlySelectedLeaf, maxTagCount, loadData, onDropdownVisibleChange, onChange, onSearch, onClickLoadMore, focus, blur, getTriggerContainer } = this;
|
|
41522
|
+
const { treeData, selectMode, selectedValue, readonly, disabled, placeholder, allowClear, multipleCheckedStrategy, treeCheckStrictly, loading, enableSearch, enableLoadData, onlySelectedLeaf, maxTagCount, mappingProperties, loadData, onDropdownVisibleChange, onChange, onSearch, onClickLoadMore, focus, blur, getTriggerContainer } = this;
|
|
41514
41523
|
return createVNode(OioTreeSelect, {
|
|
41515
41524
|
mode: selectMode,
|
|
41516
41525
|
value: selectedValue,
|
|
41517
41526
|
options: treeData,
|
|
41518
41527
|
expandedKeys: this.expandedKeys,
|
|
41519
|
-
properties: mappingProperties
|
|
41528
|
+
properties: mappingProperties,
|
|
41520
41529
|
maxTagCount,
|
|
41521
41530
|
enableSearch,
|
|
41522
41531
|
loading,
|
|
@@ -45727,21 +45736,24 @@ class ExpressionAbstractWidget extends FormFieldWidget {
|
|
|
45727
45736
|
});
|
|
45728
45737
|
}
|
|
45729
45738
|
initData() {
|
|
45739
|
+
var _a;
|
|
45730
45740
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45731
45741
|
if (this.value) {
|
|
45732
45742
|
const expression = (yield this.queryExpression());
|
|
45743
|
+
const defaultExpressionItem = createDefaultExpressionItem(this.type);
|
|
45733
45744
|
if (expression) {
|
|
45734
45745
|
createExpressionItemByExpressionDefinition(expression, this.createExpressionOption());
|
|
45735
45746
|
const valueList = expression.itemList;
|
|
45736
|
-
this.setExpressionItemList(!(valueList === null || valueList === void 0 ? void 0 : valueList.length) ? [
|
|
45747
|
+
this.setExpressionItemList(!(valueList === null || valueList === void 0 ? void 0 : valueList.length) ? [defaultExpressionItem] : valueList);
|
|
45737
45748
|
this.sourceCode = this.value;
|
|
45738
45749
|
const list = valueList || [];
|
|
45739
|
-
|
|
45750
|
+
const isDefaultCondition = list.length === 1 && ((_a = list[0].valueList) === null || _a === void 0 ? void 0 : _a.length) === 1 && !list[0].valueList[0].value;
|
|
45751
|
+
if (this.sourceCode && isDefaultCondition) {
|
|
45740
45752
|
this.hasChangeSourceCode = true;
|
|
45741
45753
|
}
|
|
45742
45754
|
}
|
|
45743
45755
|
else {
|
|
45744
|
-
this.setExpressionItemList([
|
|
45756
|
+
this.setExpressionItemList([defaultExpressionItem]);
|
|
45745
45757
|
this.sourceCode = this.value;
|
|
45746
45758
|
this.hasChangeSourceCode = true;
|
|
45747
45759
|
}
|
|
@@ -54758,7 +54770,7 @@ let FormM2OAddressFieldWidget = FormM2OAddressFieldWidget_1 = class FormM2OAddre
|
|
|
54758
54770
|
this.change(currentValue);
|
|
54759
54771
|
}
|
|
54760
54772
|
$onSelectedChangeNext(currentValue, selectedNode) {
|
|
54761
|
-
let nextAddressType;
|
|
54773
|
+
let nextAddressType = AddressTypeEnum.Street;
|
|
54762
54774
|
while (selectedNode) {
|
|
54763
54775
|
const targetValue = selectedNode.value.data;
|
|
54764
54776
|
if (!targetValue) {
|
|
@@ -54797,16 +54809,41 @@ let FormM2OAddressFieldWidget = FormM2OAddressFieldWidget_1 = class FormM2OAddre
|
|
|
54797
54809
|
}
|
|
54798
54810
|
getResourceAddressValue(currentValue, type) {
|
|
54799
54811
|
switch (type) {
|
|
54800
|
-
case AddressTypeEnum.Country:
|
|
54801
|
-
|
|
54802
|
-
|
|
54803
|
-
|
|
54804
|
-
|
|
54805
|
-
return
|
|
54806
|
-
|
|
54807
|
-
|
|
54808
|
-
|
|
54809
|
-
|
|
54812
|
+
case AddressTypeEnum.Country: {
|
|
54813
|
+
const { countryCode, countryName } = currentValue;
|
|
54814
|
+
if (countryCode && countryName) {
|
|
54815
|
+
return { code: countryCode, name: countryName };
|
|
54816
|
+
}
|
|
54817
|
+
return undefined;
|
|
54818
|
+
}
|
|
54819
|
+
case AddressTypeEnum.Province: {
|
|
54820
|
+
const { provinceCode, provinceName } = currentValue;
|
|
54821
|
+
if (provinceCode && provinceName) {
|
|
54822
|
+
return { code: provinceCode, name: provinceName };
|
|
54823
|
+
}
|
|
54824
|
+
return undefined;
|
|
54825
|
+
}
|
|
54826
|
+
case AddressTypeEnum.City: {
|
|
54827
|
+
const { cityCode, cityName } = currentValue;
|
|
54828
|
+
if (cityCode && cityName) {
|
|
54829
|
+
return { code: cityCode, name: cityName };
|
|
54830
|
+
}
|
|
54831
|
+
return undefined;
|
|
54832
|
+
}
|
|
54833
|
+
case AddressTypeEnum.District: {
|
|
54834
|
+
const { districtCode, districtName } = currentValue;
|
|
54835
|
+
if (districtCode && districtName) {
|
|
54836
|
+
return { code: districtCode, name: districtName };
|
|
54837
|
+
}
|
|
54838
|
+
return undefined;
|
|
54839
|
+
}
|
|
54840
|
+
case AddressTypeEnum.Street: {
|
|
54841
|
+
const { streetCode, streetName } = currentValue;
|
|
54842
|
+
if (streetCode && streetName) {
|
|
54843
|
+
return { code: streetCode, name: streetName };
|
|
54844
|
+
}
|
|
54845
|
+
return undefined;
|
|
54846
|
+
}
|
|
54810
54847
|
default:
|
|
54811
54848
|
console.error('Invalid region type.', type);
|
|
54812
54849
|
return undefined;
|
|
@@ -81970,11 +82007,11 @@ LayoutManager.register({
|
|
|
81970
82007
|
|
|
81971
82008
|
const getApps = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
81972
82009
|
var _a;
|
|
81973
|
-
const model = yield ModelCache.get('
|
|
82010
|
+
const model = yield ModelCache.get('base.AppSwitcherModuleProxy');
|
|
81974
82011
|
const bindUrlFieldExist = ((_a = model === null || model === void 0 ? void 0 : model.modelFields) !== null && _a !== void 0 ? _a : []).filter((it) => it.data === 'urlHomePage').length > 0;
|
|
81975
82012
|
const body = `{
|
|
81976
82013
|
appSwitcherModuleProxyQuery {
|
|
81977
|
-
queryPage(page: {}, queryWrapper: {}) {
|
|
82014
|
+
queryPage(page: { currentPage: 1, size: -1 }, queryWrapper: {}) {
|
|
81978
82015
|
content {
|
|
81979
82016
|
module
|
|
81980
82017
|
like
|
|
@@ -87169,6 +87206,7 @@ class AbstractTreeElementWidget extends AbstractTreeWidget {
|
|
|
87169
87206
|
return (_a = this.getDsl().searchRemote) !== null && _a !== void 0 ? _a : true;
|
|
87170
87207
|
}
|
|
87171
87208
|
initialize(props) {
|
|
87209
|
+
var _a;
|
|
87172
87210
|
if (!props.slotNames) {
|
|
87173
87211
|
props.slotNames = [DEFAULT_SLOT_NAME, CONTENT_SLOT_NAME$1, 'rowActions'];
|
|
87174
87212
|
}
|
|
@@ -87188,7 +87226,7 @@ class AbstractTreeElementWidget extends AbstractTreeWidget {
|
|
|
87188
87226
|
}
|
|
87189
87227
|
const { dslSlots, inline, view } = this;
|
|
87190
87228
|
if (dslSlots) {
|
|
87191
|
-
TreeUtils.mergeLayoutBySlotName(dslSlots, CONTENT_SLOT_NAME$1, inline || false, view);
|
|
87229
|
+
this.contentViewType = (_a = TreeUtils.mergeLayoutBySlotName(dslSlots, CONTENT_SLOT_NAME$1, inline || false, view)) === null || _a === void 0 ? void 0 : _a.viewType;
|
|
87192
87230
|
}
|
|
87193
87231
|
this.runtimeInitialed();
|
|
87194
87232
|
if (!this.rootNode && rootMetadata) {
|
|
@@ -87488,6 +87526,10 @@ __decorate([
|
|
|
87488
87526
|
Widget.Reactive(),
|
|
87489
87527
|
__metadata("design:type", Object)
|
|
87490
87528
|
], AbstractTreeElementWidget.prototype, "showContent", void 0);
|
|
87529
|
+
__decorate([
|
|
87530
|
+
Widget.Reactive(),
|
|
87531
|
+
__metadata("design:type", Object)
|
|
87532
|
+
], AbstractTreeElementWidget.prototype, "contentViewType", void 0);
|
|
87491
87533
|
__decorate([
|
|
87492
87534
|
Widget.Reactive(),
|
|
87493
87535
|
__metadata("design:type", Object),
|
|
@@ -87896,16 +87938,22 @@ let TreeWidget = class TreeWidget extends AbstractTreeElementWidget {
|
|
|
87896
87938
|
}
|
|
87897
87939
|
onUnselected() {
|
|
87898
87940
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87899
|
-
const currentValue =
|
|
87941
|
+
const currentValue = this.generatorEmptyValue();
|
|
87900
87942
|
this.reloadDataSource(currentValue);
|
|
87901
87943
|
this.reloadActiveRecords(currentValue);
|
|
87902
87944
|
});
|
|
87903
87945
|
}
|
|
87904
87946
|
$$mounted() {
|
|
87905
87947
|
super.$$mounted();
|
|
87906
|
-
const currentValue =
|
|
87948
|
+
const currentValue = this.generatorEmptyValue();
|
|
87907
87949
|
this.reloadDataSource(currentValue);
|
|
87908
87950
|
}
|
|
87951
|
+
generatorEmptyValue() {
|
|
87952
|
+
if (this.contentViewType === ViewType.Form) {
|
|
87953
|
+
return [{}];
|
|
87954
|
+
}
|
|
87955
|
+
return [];
|
|
87956
|
+
}
|
|
87909
87957
|
};
|
|
87910
87958
|
__decorate([
|
|
87911
87959
|
Widget.Reactive(),
|