@g1cloud/bluesea 5.0.0-beta.6 → 5.0.0-beta.8
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/{BSAlertModal-B6XlvWm2.js → BSAlertModal-C8PIj5h_.js} +1 -1
- package/dist/{BSGridColumnSettingModal-DgqYUHUF.js → BSGridColumnSettingModal-D9CI-F_e.js} +1 -1
- package/dist/{BSRichTextMaximizedModal-DhmCYN9S.js → BSRichTextMaximizedModal-DsSYqgSR.js} +1 -1
- package/dist/{BSYesNoModal-CcElFZw-.js → BSYesNoModal-CB_RIKt0.js} +1 -1
- package/dist/{BSYoutubeInputModal-DLXCEq2-.js → BSYoutubeInputModal-CwLcWtEI.js} +1 -1
- package/dist/{ImageInsertModal-B5WoMehM.js → ImageInsertModal-lWQeIMu7.js} +2 -2
- package/dist/{ImageProperties.vue_vue_type_script_setup_true_lang-BIoCOwlw.js → ImageProperties.vue_vue_type_script_setup_true_lang-DDj0Odaa.js} +1 -1
- package/dist/{ImagePropertiesModal-AuLfc63Y.js → ImagePropertiesModal-C6RyT5B5.js} +2 -2
- package/dist/{LinkPropertiesModal-CzM1G8qN.js → LinkPropertiesModal-D5A3Gq2i.js} +1 -1
- package/dist/{TableInsertModal-ChcQJBQV.js → TableInsertModal-B1F5T8qs.js} +1 -1
- package/dist/{TablePropertiesModal-C1FzxMmL.js → TablePropertiesModal-DUiHSjcT.js} +1 -1
- package/dist/{VideoInsertModal-Blyjl-az.js → VideoInsertModal-R0Bs5E2T.js} +2 -2
- package/dist/{VideoProperties.vue_vue_type_script_setup_true_lang-C7l371rG.js → VideoProperties.vue_vue_type_script_setup_true_lang-BCTNqg94.js} +1 -1
- package/dist/{VideoPropertiesModal-CcgFfcXd.js → VideoPropertiesModal-DQADTS-J.js} +2 -2
- package/dist/{YoutubeInsertModal-B81eZZ3b.js → YoutubeInsertModal-R97l6ge3.js} +2 -2
- package/dist/{YoutubeProperties.vue_vue_type_script_setup_true_lang-DKGiIhRX.js → YoutubeProperties.vue_vue_type_script_setup_true_lang-Ce9a5UDA.js} +1 -1
- package/dist/{YoutubePropertiesModal-BI7rBusJ.js → YoutubePropertiesModal-BbrU7l5m.js} +2 -2
- package/dist/bluesea.js +107 -105
- package/dist/bluesea.umd.cjs +97 -31
- package/dist/component/grid/DateFilterModel.d.ts +15 -0
- package/dist/component/grid/GridModel.d.ts +1 -0
- package/dist/component/input/BSDateRangePresets.vue.d.ts +2 -2
- package/dist/component/input/DateRangePresetModel.d.ts +2 -0
- package/dist/component/tree/TreeModel.d.ts +28 -0
- package/dist/config/config.d.ts +3 -2
- package/dist/{index-DzQ05auj.js → index-DRs7QwNQ.js} +217 -151
- package/package.json +1 -1
|
@@ -87,8 +87,8 @@ const defaultAddressInputComponentConfig = {
|
|
|
87
87
|
countryConfigs: ADDRESS_COUNTRY_CONFIGS
|
|
88
88
|
};
|
|
89
89
|
const defaultRichTextComponentConfig = {
|
|
90
|
-
imageInsertModal: defineAsyncComponent(() => import("./ImageInsertModal-
|
|
91
|
-
videoInsertModal: defineAsyncComponent(() => import("./VideoInsertModal-
|
|
90
|
+
imageInsertModal: defineAsyncComponent(() => import("./ImageInsertModal-lWQeIMu7.js")),
|
|
91
|
+
videoInsertModal: defineAsyncComponent(() => import("./VideoInsertModal-R0Bs5E2T.js")),
|
|
92
92
|
toolButtons: [
|
|
93
93
|
"Heading",
|
|
94
94
|
"FontSize",
|
|
@@ -118,6 +118,7 @@ class BlueseaConfig {
|
|
|
118
118
|
__publicField(this, "currentLocale");
|
|
119
119
|
__publicField(this, "dataLocales");
|
|
120
120
|
__publicField(this, "currentDataLocale");
|
|
121
|
+
__publicField(this, "defaultDataLocale");
|
|
121
122
|
__publicField(this, "timeZone");
|
|
122
123
|
__publicField(this, "displayTimeZones");
|
|
123
124
|
__publicField(this, "allTimeZones");
|
|
@@ -142,6 +143,7 @@ class BlueseaConfig {
|
|
|
142
143
|
this.currentLocale = this.defaultLocale;
|
|
143
144
|
this.dataLocales = ["en"];
|
|
144
145
|
this.currentDataLocale = this.dataLocales[0];
|
|
146
|
+
this.defaultDataLocale = this.dataLocales[0];
|
|
145
147
|
this.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
146
148
|
this.displayTimeZones = [];
|
|
147
149
|
this.allTimeZones = [this.timeZone];
|
|
@@ -163,7 +165,8 @@ class BlueseaConfig {
|
|
|
163
165
|
if (options.dataLocales && options.dataLocales.length > 0) {
|
|
164
166
|
this.setDataLocales(
|
|
165
167
|
options.dataLocales,
|
|
166
|
-
options.currentDataLocale || options.dataLocales[0]
|
|
168
|
+
options.currentDataLocale || options.dataLocales[0],
|
|
169
|
+
options.defaultDataLocale || options.dataLocales[0]
|
|
167
170
|
);
|
|
168
171
|
}
|
|
169
172
|
if (options.timeZone) this.timeZone = options.timeZone;
|
|
@@ -212,9 +215,10 @@ class BlueseaConfig {
|
|
|
212
215
|
setCurrentLocale(locale) {
|
|
213
216
|
this.currentLocale = locale || this.defaultLocale;
|
|
214
217
|
}
|
|
215
|
-
setDataLocales(dataLocales, currentDataLocale) {
|
|
218
|
+
setDataLocales(dataLocales, currentDataLocale, defaultDataLocale) {
|
|
216
219
|
this.dataLocales = dataLocales;
|
|
217
220
|
this.currentDataLocale = currentDataLocale;
|
|
221
|
+
this.defaultDataLocale = defaultDataLocale || dataLocales[0];
|
|
218
222
|
}
|
|
219
223
|
setCurrentDataLocale(locale) {
|
|
220
224
|
this.currentDataLocale = locale || this.dataLocales[0] || "en";
|
|
@@ -4684,6 +4688,11 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
4684
4688
|
});
|
|
4685
4689
|
dayjs.extend(utc);
|
|
4686
4690
|
dayjs.extend(timezone);
|
|
4691
|
+
const createDateRangeFromPreset = (value, timeZone) => {
|
|
4692
|
+
const from2 = value.from ? resolveMoment(value.from, true, timeZone) : void 0;
|
|
4693
|
+
const to = value.to ? resolveMoment(value.to, false, timeZone) : void 0;
|
|
4694
|
+
return { from: from2 == null ? void 0 : from2.toISOString(), to: to == null ? void 0 : to.toISOString() };
|
|
4695
|
+
};
|
|
4687
4696
|
const resolveMoment = (setting, from2, timeZone, baseDate) => {
|
|
4688
4697
|
switch (setting.type) {
|
|
4689
4698
|
case "TODAY":
|
|
@@ -4950,25 +4959,20 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
4950
4959
|
const emit = __emit;
|
|
4951
4960
|
const actualTimeZone = computed(() => props.timeZone || blueseaConfig.timeZone);
|
|
4952
4961
|
const currentPreset = ref();
|
|
4953
|
-
const createDateRange = (value) => {
|
|
4954
|
-
const from2 = value.from ? resolveMoment(value.from, true, actualTimeZone.value) : void 0;
|
|
4955
|
-
const to = value.to ? resolveMoment(value.to, false, actualTimeZone.value) : void 0;
|
|
4956
|
-
return { from: from2 == null ? void 0 : from2.toISOString(), to: to == null ? void 0 : to.toISOString() };
|
|
4957
|
-
};
|
|
4958
4962
|
const presetSelected = (value) => {
|
|
4959
|
-
const range = value ?
|
|
4960
|
-
emit("update:modelValue", range);
|
|
4963
|
+
const range = value ? createDateRangeFromPreset(value, actualTimeZone.value) : void 0;
|
|
4964
|
+
emit("update:modelValue", range, value);
|
|
4961
4965
|
};
|
|
4962
|
-
const
|
|
4966
|
+
const findPreset2 = (range) => {
|
|
4963
4967
|
return props.presets.find((preset) => {
|
|
4964
|
-
const presetValue =
|
|
4968
|
+
const presetValue = createDateRangeFromPreset(preset, actualTimeZone.value);
|
|
4965
4969
|
return (range == null ? void 0 : range.from) === presetValue.from && (range == null ? void 0 : range.to) === presetValue.to;
|
|
4966
4970
|
});
|
|
4967
4971
|
};
|
|
4968
4972
|
watch(
|
|
4969
4973
|
() => props.modelValue,
|
|
4970
4974
|
() => {
|
|
4971
|
-
currentPreset.value =
|
|
4975
|
+
currentPreset.value = findPreset2(props.modelValue);
|
|
4972
4976
|
},
|
|
4973
4977
|
{ immediate: true }
|
|
4974
4978
|
);
|
|
@@ -6002,7 +6006,7 @@ class BSModal {
|
|
|
6002
6006
|
}
|
|
6003
6007
|
openAlert(title, message, clickHandler2) {
|
|
6004
6008
|
const option = {
|
|
6005
|
-
component: defineAsyncComponent(() => import("./BSAlertModal-
|
|
6009
|
+
component: defineAsyncComponent(() => import("./BSAlertModal-C8PIj5h_.js")),
|
|
6006
6010
|
bind: {
|
|
6007
6011
|
title,
|
|
6008
6012
|
message
|
|
@@ -6015,7 +6019,7 @@ class BSModal {
|
|
|
6015
6019
|
}
|
|
6016
6020
|
openYesNo(title, message, yesHandler, noHandler) {
|
|
6017
6021
|
const option = {
|
|
6018
|
-
component: defineAsyncComponent(() => import("./BSYesNoModal-
|
|
6022
|
+
component: defineAsyncComponent(() => import("./BSYesNoModal-CB_RIKt0.js")),
|
|
6019
6023
|
bind: {
|
|
6020
6024
|
title,
|
|
6021
6025
|
message
|
|
@@ -6149,16 +6153,7 @@ class TreeHandlerImpl {
|
|
|
6149
6153
|
},
|
|
6150
6154
|
clickRemoveButton: () => this.removeSelectedItem(),
|
|
6151
6155
|
expandAll: () => {
|
|
6152
|
-
|
|
6153
|
-
if (this.expandedRows.size === allParents.size) {
|
|
6154
|
-
this.expandedRows.clear();
|
|
6155
|
-
} else {
|
|
6156
|
-
allParents.forEach((item) => {
|
|
6157
|
-
const key = option.getItemKey(item);
|
|
6158
|
-
if (key) this.expandedRows.add(key);
|
|
6159
|
-
});
|
|
6160
|
-
}
|
|
6161
|
-
this.updateAllExpanded();
|
|
6156
|
+
this.expandAll(this.expandedRows.size !== this.getAllParents().size);
|
|
6162
6157
|
}
|
|
6163
6158
|
};
|
|
6164
6159
|
}
|
|
@@ -6294,6 +6289,25 @@ class TreeHandlerImpl {
|
|
|
6294
6289
|
}
|
|
6295
6290
|
this.cleanUpExpandedRows(this.expandedRows, this.tree.data);
|
|
6296
6291
|
}
|
|
6292
|
+
expandAll(expandOrDepth) {
|
|
6293
|
+
if (expandOrDepth === true) {
|
|
6294
|
+
const allParents = this.getAllParents();
|
|
6295
|
+
allParents.forEach((item) => {
|
|
6296
|
+
const key = this.option.getItemKey(item);
|
|
6297
|
+
if (key) this.expandedRows.add(key);
|
|
6298
|
+
});
|
|
6299
|
+
} else if (expandOrDepth === false) {
|
|
6300
|
+
this.expandedRows.clear();
|
|
6301
|
+
} else if (expandOrDepth > 1) {
|
|
6302
|
+
const parents = /* @__PURE__ */ new Set();
|
|
6303
|
+
this.collectParents(parents, this.tree.data, this.option.getChildren, expandOrDepth - 1);
|
|
6304
|
+
parents.forEach((item) => {
|
|
6305
|
+
const key = this.option.getItemKey(item);
|
|
6306
|
+
if (key) this.expandedRows.add(key);
|
|
6307
|
+
});
|
|
6308
|
+
}
|
|
6309
|
+
this.updateAllExpanded();
|
|
6310
|
+
}
|
|
6297
6311
|
forceRemoveItems(items) {
|
|
6298
6312
|
items.forEach((item) => {
|
|
6299
6313
|
var _a2, _b;
|
|
@@ -6330,12 +6344,14 @@ class TreeHandlerImpl {
|
|
|
6330
6344
|
}
|
|
6331
6345
|
}
|
|
6332
6346
|
}
|
|
6333
|
-
collectParents(parents, list, childrenProvider) {
|
|
6347
|
+
collectParents(parents, list, childrenProvider, maxDepth) {
|
|
6334
6348
|
for (const item of list) {
|
|
6335
6349
|
const children = childrenProvider(item);
|
|
6336
6350
|
if (children && children.length > 0) {
|
|
6337
6351
|
parents.add(item);
|
|
6338
|
-
|
|
6352
|
+
if (maxDepth === void 0 || maxDepth > 1) {
|
|
6353
|
+
this.collectParents(parents, children, childrenProvider, maxDepth ? maxDepth - 1 : void 0);
|
|
6354
|
+
}
|
|
6339
6355
|
}
|
|
6340
6356
|
}
|
|
6341
6357
|
}
|
|
@@ -31128,13 +31144,13 @@ const tableContextMenus = (modal, editor) => {
|
|
|
31128
31144
|
};
|
|
31129
31145
|
const showTableProperties = (modal, editor) => {
|
|
31130
31146
|
modal.openModal({
|
|
31131
|
-
component: defineAsyncComponent(() => import("./TablePropertiesModal-
|
|
31147
|
+
component: defineAsyncComponent(() => import("./TablePropertiesModal-DUiHSjcT.js")),
|
|
31132
31148
|
bind: { editor }
|
|
31133
31149
|
});
|
|
31134
31150
|
};
|
|
31135
31151
|
const insertTable = (modal, editor) => {
|
|
31136
31152
|
modal.openModal({
|
|
31137
|
-
component: defineAsyncComponent(() => import("./TableInsertModal-
|
|
31153
|
+
component: defineAsyncComponent(() => import("./TableInsertModal-B1F5T8qs.js")),
|
|
31138
31154
|
bind: { editor }
|
|
31139
31155
|
});
|
|
31140
31156
|
};
|
|
@@ -31299,7 +31315,7 @@ const insertImage = (modal, editor) => {
|
|
|
31299
31315
|
const component = (_a2 = blueseaConfig.componentConfig.richText) == null ? void 0 : _a2.imageInsertModal;
|
|
31300
31316
|
if (component) {
|
|
31301
31317
|
modal.openModal({
|
|
31302
|
-
component: defineAsyncComponent(() => import("./ImageInsertModal-
|
|
31318
|
+
component: defineAsyncComponent(() => import("./ImageInsertModal-lWQeIMu7.js")),
|
|
31303
31319
|
bind: { editor },
|
|
31304
31320
|
on: {
|
|
31305
31321
|
insertImage: (image) => {
|
|
@@ -31317,7 +31333,7 @@ const insertImage = (modal, editor) => {
|
|
|
31317
31333
|
};
|
|
31318
31334
|
const showImageProperties = (modal, editor) => {
|
|
31319
31335
|
modal.openModal({
|
|
31320
|
-
component: defineAsyncComponent(() => import("./ImagePropertiesModal-
|
|
31336
|
+
component: defineAsyncComponent(() => import("./ImagePropertiesModal-C6RyT5B5.js")),
|
|
31321
31337
|
bind: { editor }
|
|
31322
31338
|
});
|
|
31323
31339
|
};
|
|
@@ -31678,13 +31694,13 @@ const youtubeContextMenu = (modal, editor) => {
|
|
|
31678
31694
|
};
|
|
31679
31695
|
const insertYoutube = (modal, editor) => {
|
|
31680
31696
|
modal.openModal({
|
|
31681
|
-
component: defineAsyncComponent(() => import("./YoutubeInsertModal-
|
|
31697
|
+
component: defineAsyncComponent(() => import("./YoutubeInsertModal-R97l6ge3.js")),
|
|
31682
31698
|
bind: { editor }
|
|
31683
31699
|
});
|
|
31684
31700
|
};
|
|
31685
31701
|
const showYoutubeProperties = (modal, editor) => {
|
|
31686
31702
|
modal.openModal({
|
|
31687
|
-
component: defineAsyncComponent(() => import("./YoutubePropertiesModal-
|
|
31703
|
+
component: defineAsyncComponent(() => import("./YoutubePropertiesModal-BbrU7l5m.js")),
|
|
31688
31704
|
bind: { editor }
|
|
31689
31705
|
});
|
|
31690
31706
|
};
|
|
@@ -31728,7 +31744,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
31728
31744
|
const showLinkProperties = () => {
|
|
31729
31745
|
if (!props.disabled) {
|
|
31730
31746
|
modal.openModal({
|
|
31731
|
-
component: defineAsyncComponent(() => import("./LinkPropertiesModal-
|
|
31747
|
+
component: defineAsyncComponent(() => import("./LinkPropertiesModal-D5A3Gq2i.js")),
|
|
31732
31748
|
bind: {
|
|
31733
31749
|
editor: props.editor
|
|
31734
31750
|
}
|
|
@@ -32093,7 +32109,7 @@ const insertVideo = (modal, editor) => {
|
|
|
32093
32109
|
const component = (_a2 = blueseaConfig.componentConfig.richText) == null ? void 0 : _a2.videoInsertModal;
|
|
32094
32110
|
if (component) {
|
|
32095
32111
|
modal.openModal({
|
|
32096
|
-
component: defineAsyncComponent(() => import("./VideoInsertModal-
|
|
32112
|
+
component: defineAsyncComponent(() => import("./VideoInsertModal-R0Bs5E2T.js")),
|
|
32097
32113
|
bind: { editor },
|
|
32098
32114
|
on: {
|
|
32099
32115
|
insertVideo: (video) => {
|
|
@@ -32111,7 +32127,7 @@ const insertVideo = (modal, editor) => {
|
|
|
32111
32127
|
};
|
|
32112
32128
|
const showVideoProperties = (modal, editor) => {
|
|
32113
32129
|
modal.openModal({
|
|
32114
|
-
component: defineAsyncComponent(() => import("./VideoPropertiesModal-
|
|
32130
|
+
component: defineAsyncComponent(() => import("./VideoPropertiesModal-DQADTS-J.js")),
|
|
32115
32131
|
bind: { editor }
|
|
32116
32132
|
});
|
|
32117
32133
|
};
|
|
@@ -34289,7 +34305,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
34289
34305
|
emit("maximized");
|
|
34290
34306
|
if (!props.internalMaximized) {
|
|
34291
34307
|
modal.openModal({
|
|
34292
|
-
component: defineAsyncComponent(() => import("./BSRichTextMaximizedModal-
|
|
34308
|
+
component: defineAsyncComponent(() => import("./BSRichTextMaximizedModal-DsSYqgSR.js")),
|
|
34293
34309
|
bind: {
|
|
34294
34310
|
modelValue: getEditorValue(),
|
|
34295
34311
|
contentMaxWidth: props.contentMaxWidth,
|
|
@@ -34826,7 +34842,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
34826
34842
|
const modal = useModal();
|
|
34827
34843
|
const enterYoutubeUrl = () => {
|
|
34828
34844
|
modal.openModal({
|
|
34829
|
-
component: defineAsyncComponent(() => import("./BSYoutubeInputModal-
|
|
34845
|
+
component: defineAsyncComponent(() => import("./BSYoutubeInputModal-CwLcWtEI.js")),
|
|
34830
34846
|
on: {
|
|
34831
34847
|
"update:modelValue": (url) => {
|
|
34832
34848
|
emit("update:modelValue", {
|
|
@@ -36194,6 +36210,7 @@ class EditableInputGridHandlerImpl extends InputGridHandlerImpl {
|
|
|
36194
36210
|
this.selectDeleteSupport.removeIfAddedRow = (row) => this.editableSupport.removeIfAddedRow(row);
|
|
36195
36211
|
}
|
|
36196
36212
|
setGridData(data) {
|
|
36213
|
+
GridHandlerEditableSupport.cleanUpData(data);
|
|
36197
36214
|
super.setGridData(data);
|
|
36198
36215
|
this.editableSupport.clearAddedRows();
|
|
36199
36216
|
}
|
|
@@ -36280,6 +36297,11 @@ class GridHandlerEditableSupport {
|
|
|
36280
36297
|
};
|
|
36281
36298
|
controlEventListener.clickAdd = () => this.createAndAddNewRow();
|
|
36282
36299
|
}
|
|
36300
|
+
static cleanUpData(data) {
|
|
36301
|
+
data == null ? void 0 : data.forEach((row) => {
|
|
36302
|
+
if (row && row[GRID_NEW_ROW_KEY]) delete row[GRID_NEW_ROW_KEY];
|
|
36303
|
+
});
|
|
36304
|
+
}
|
|
36283
36305
|
getModifiedRows() {
|
|
36284
36306
|
var _a2;
|
|
36285
36307
|
const addedKeys = this.addedRows.map((row) => row[GRID_NEW_ROW_KEY]);
|
|
@@ -37801,6 +37823,35 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
37801
37823
|
};
|
|
37802
37824
|
}
|
|
37803
37825
|
});
|
|
37826
|
+
const serializeMomentSetting = (setting) => {
|
|
37827
|
+
if (!setting) return "";
|
|
37828
|
+
const value = setting.value === void 0 ? "" : `:${setting.value}`;
|
|
37829
|
+
return `${setting.type}${value}`;
|
|
37830
|
+
};
|
|
37831
|
+
const convertDateRangePresetKey = (preset) => {
|
|
37832
|
+
return `${serializeMomentSetting(preset.from)}~${serializeMomentSetting(preset.to)}`;
|
|
37833
|
+
};
|
|
37834
|
+
const findPreset = (presetKey, candidatePresets) => {
|
|
37835
|
+
if (!presetKey) return void 0;
|
|
37836
|
+
return candidatePresets == null ? void 0 : candidatePresets.find((preset) => convertDateRangePresetKey(preset) === presetKey);
|
|
37837
|
+
};
|
|
37838
|
+
class BetweenDateFilterWithPreset extends BetweenDateFilter {
|
|
37839
|
+
constructor(name2, fromValue, toValue, preset) {
|
|
37840
|
+
super(name2, fromValue, toValue);
|
|
37841
|
+
__publicField(this, "presetKey");
|
|
37842
|
+
this.name = name2;
|
|
37843
|
+
this.fromValue = fromValue;
|
|
37844
|
+
this.toValue = toValue;
|
|
37845
|
+
this.presetKey = preset ? convertDateRangePresetKey(preset) : void 0;
|
|
37846
|
+
}
|
|
37847
|
+
// candidatePresets 중 presetKey 에 해당하는 preset 을 찾아, fromValue, toValue 를 설정한다.
|
|
37848
|
+
// preset 을 찾을 수 없으면 undefined 를 리턴한다.
|
|
37849
|
+
static createFromPresetKey(name2, presetKey, candidatePresets, timeZone) {
|
|
37850
|
+
const preset = findPreset(presetKey, candidatePresets);
|
|
37851
|
+
const range = preset ? createDateRangeFromPreset(preset, timeZone) : void 0;
|
|
37852
|
+
return range ? new BetweenDateFilterWithPreset(name2, range.from, range.to, preset) : void 0;
|
|
37853
|
+
}
|
|
37854
|
+
}
|
|
37804
37855
|
const _hoisted_1$x = {
|
|
37805
37856
|
key: 0,
|
|
37806
37857
|
class: "date-filters .bs-layout-vertical mr-16"
|
|
@@ -37859,9 +37910,10 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
37859
37910
|
if (propertyId) item.propertyId = propertyId;
|
|
37860
37911
|
emitValue();
|
|
37861
37912
|
};
|
|
37862
|
-
const setDateFilterValue = (index, value) => {
|
|
37913
|
+
const setDateFilterValue = (index, value, preset) => {
|
|
37863
37914
|
const item = dateFilterValues.value[index];
|
|
37864
37915
|
item.value = value || {};
|
|
37916
|
+
item.preset = preset;
|
|
37865
37917
|
emitValue();
|
|
37866
37918
|
};
|
|
37867
37919
|
const addDateFilter = () => {
|
|
@@ -37886,7 +37938,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
37886
37938
|
};
|
|
37887
37939
|
const emitValue = () => {
|
|
37888
37940
|
var _a2;
|
|
37889
|
-
const filters = dateFilterValues.value.map((item) =>
|
|
37941
|
+
const filters = dateFilterValues.value.map((item) => new BetweenDateFilterWithPreset(item.propertyId, item.value.from, item.value.to, item.preset));
|
|
37890
37942
|
const and = filters.length > 0 ? andFilter(filters) : void 0;
|
|
37891
37943
|
if (((_a2 = props.modelValue) == null ? void 0 : _a2.toString()) !== (and == null ? void 0 : and.toString())) {
|
|
37892
37944
|
emit("update:modelValue", and);
|
|
@@ -37953,10 +38005,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
37953
38005
|
}, null, 8, ["display-format", "from-id", "model-value", "name-from", "name-to", "popup-display-format", "popup-end-year", "popup-start-year", "resolution", "time-zone", "to-id", "width", "onUpdate:modelValue"]),
|
|
37954
38006
|
createVNode(_sfc_main$1j, {
|
|
37955
38007
|
modelValue: item.value,
|
|
37956
|
-
"onUpdate:modelValue": [($event) => item.value = $event, (
|
|
38008
|
+
"onUpdate:modelValue": [($event) => item.value = $event, (value, preset) => setDateFilterValue(index, value, preset)],
|
|
37957
38009
|
presets: _ctx.presets,
|
|
38010
|
+
"time-zone": timeZoneOfFilterItem(item.propertyId),
|
|
37958
38011
|
class: "ml-4"
|
|
37959
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "presets"])
|
|
38012
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "presets", "time-zone"])
|
|
37960
38013
|
]);
|
|
37961
38014
|
}), 128))
|
|
37962
38015
|
])) : createCommentVNode("", true);
|
|
@@ -38012,12 +38065,23 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
38012
38065
|
emitUpdateModelValue();
|
|
38013
38066
|
emitSearch();
|
|
38014
38067
|
};
|
|
38068
|
+
const findDateFilterTimeZone = (name2, dateFilter) => {
|
|
38069
|
+
var _a2;
|
|
38070
|
+
return ((_a2 = dateFilter == null ? void 0 : dateFilter.filterItems.find((f) => f.propertyId === name2)) == null ? void 0 : _a2.timeZone) || blueseaConfig.timeZone;
|
|
38071
|
+
};
|
|
38015
38072
|
watch(() => props.gridPreferenceDateFilterValues, () => {
|
|
38016
38073
|
if (props.gridPreferenceDateFilterValues && props.gridPreferenceDateFilterValues.filters && props.gridPreferenceDateFilterValues.filters.length > 0) {
|
|
38017
38074
|
const filters = props.gridPreferenceDateFilterValues.filters.map((filter) => {
|
|
38018
|
-
|
|
38019
|
-
|
|
38020
|
-
|
|
38075
|
+
var _a2, _b;
|
|
38076
|
+
const f = filter;
|
|
38077
|
+
if (f.name && (f.fromValue || f.toValue)) {
|
|
38078
|
+
if (f.presetKey) {
|
|
38079
|
+
const presets = props.dateRangePresets || ((_a2 = blueseaConfig.componentConfig.gridLookup) == null ? void 0 : _a2.dateRangePresets) || [];
|
|
38080
|
+
const timeZone = findDateFilterTimeZone(f.name, (_b = props.config) == null ? void 0 : _b.dateFilter);
|
|
38081
|
+
return BetweenDateFilterWithPreset.createFromPresetKey(f.name, f.presetKey, presets, timeZone);
|
|
38082
|
+
} else {
|
|
38083
|
+
return new BetweenDateFilterWithPreset(f.name, f.fromValue, f.toValue);
|
|
38084
|
+
}
|
|
38021
38085
|
}
|
|
38022
38086
|
}).filter(notNull);
|
|
38023
38087
|
if (filters.length > 0) {
|
|
@@ -38147,7 +38211,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
38147
38211
|
const modal = useModal();
|
|
38148
38212
|
const openSettingModal = () => {
|
|
38149
38213
|
modal.openModal({
|
|
38150
|
-
component: defineAsyncComponent(() => import("./BSGridColumnSettingModal-
|
|
38214
|
+
component: defineAsyncComponent(() => import("./BSGridColumnSettingModal-D9CI-F_e.js")),
|
|
38151
38215
|
bind: {
|
|
38152
38216
|
columns: props.columns,
|
|
38153
38217
|
columnSettings: props.columnSettings,
|
|
@@ -69973,115 +70037,117 @@ export {
|
|
|
69973
70037
|
_sfc_main as ay,
|
|
69974
70038
|
vClickOutside as az,
|
|
69975
70039
|
_sfc_main$1J as b,
|
|
69976
|
-
|
|
70040
|
+
SearchParam as b$,
|
|
69977
70041
|
LocalStorageGridPreferenceStore as b0,
|
|
69978
70042
|
mergeSameValueVertical as b1,
|
|
69979
70043
|
gridExcelDownloadExtension as b2,
|
|
69980
70044
|
downloadGridDataAsExcel as b3,
|
|
69981
|
-
|
|
69982
|
-
|
|
69983
|
-
|
|
69984
|
-
|
|
69985
|
-
|
|
69986
|
-
|
|
69987
|
-
|
|
69988
|
-
|
|
69989
|
-
|
|
69990
|
-
|
|
69991
|
-
|
|
69992
|
-
|
|
69993
|
-
|
|
69994
|
-
|
|
69995
|
-
|
|
69996
|
-
|
|
69997
|
-
|
|
69998
|
-
|
|
69999
|
-
|
|
70000
|
-
|
|
70001
|
-
|
|
70002
|
-
|
|
70003
|
-
|
|
70004
|
-
|
|
70005
|
-
|
|
70006
|
-
|
|
70007
|
-
|
|
70008
|
-
|
|
70009
|
-
|
|
70010
|
-
|
|
70011
|
-
|
|
70012
|
-
|
|
70013
|
-
|
|
70014
|
-
|
|
70015
|
-
|
|
70016
|
-
|
|
70017
|
-
|
|
70018
|
-
|
|
70019
|
-
|
|
70020
|
-
|
|
70021
|
-
|
|
70022
|
-
|
|
70023
|
-
|
|
70024
|
-
|
|
70025
|
-
|
|
70026
|
-
|
|
70027
|
-
|
|
70028
|
-
|
|
70029
|
-
|
|
70030
|
-
|
|
70031
|
-
|
|
70032
|
-
|
|
70033
|
-
|
|
70034
|
-
|
|
70035
|
-
|
|
70036
|
-
|
|
70037
|
-
|
|
70038
|
-
|
|
70039
|
-
|
|
70045
|
+
convertDateRangePresetKey as b4,
|
|
70046
|
+
BetweenDateFilterWithPreset as b5,
|
|
70047
|
+
provideTabManager as b6,
|
|
70048
|
+
useTabManager as b7,
|
|
70049
|
+
useTabManagerSilently as b8,
|
|
70050
|
+
TabStatusManagerImpl as b9,
|
|
70051
|
+
serializeName as bA,
|
|
70052
|
+
serializeTel as bB,
|
|
70053
|
+
serializeAddress as bC,
|
|
70054
|
+
IllegalAccessError as bD,
|
|
70055
|
+
PaginatedList as bE,
|
|
70056
|
+
AbstractFilter as bF,
|
|
70057
|
+
AndFilter as bG,
|
|
70058
|
+
OrFilter as bH,
|
|
70059
|
+
NotFilter as bI,
|
|
70060
|
+
InFilter as bJ,
|
|
70061
|
+
LikeFilter as bK,
|
|
70062
|
+
EqualFilter as bL,
|
|
70063
|
+
BetweenFilter as bM,
|
|
70064
|
+
BetweenDateFilter as bN,
|
|
70065
|
+
IsNullFilter as bO,
|
|
70066
|
+
IsNotNullFilter as bP,
|
|
70067
|
+
andFilter as bQ,
|
|
70068
|
+
orFilter as bR,
|
|
70069
|
+
notFilter as bS,
|
|
70070
|
+
inFilter as bT,
|
|
70071
|
+
likeFilter as bU,
|
|
70072
|
+
equalFilter as bV,
|
|
70073
|
+
betweenFilter as bW,
|
|
70074
|
+
betweenDateFilter as bX,
|
|
70075
|
+
isNullFilter as bY,
|
|
70076
|
+
isNotNullFilter as bZ,
|
|
70077
|
+
acceptFilter as b_,
|
|
70078
|
+
provideTabStatusManager as ba,
|
|
70079
|
+
useTabStatusManager as bb,
|
|
70080
|
+
createTreeHandler as bc,
|
|
70081
|
+
defaultExpandMultiLang as bd,
|
|
70082
|
+
toggleDefaultExpandMultiLang as be,
|
|
70083
|
+
localeBasedExtraItemValidationRules as bf,
|
|
70084
|
+
ValidationFailedError as bg,
|
|
70085
|
+
isValidationFailedError as bh,
|
|
70086
|
+
storeFieldValidator as bi,
|
|
70087
|
+
loadFieldValidator as bj,
|
|
70088
|
+
findFieldValidatorElements as bk,
|
|
70089
|
+
validateField as bl,
|
|
70090
|
+
validateFields as bm,
|
|
70091
|
+
fieldValidator as bn,
|
|
70092
|
+
executeFieldValidationRule as bo,
|
|
70093
|
+
executeRequiredValidation as bp,
|
|
70094
|
+
executeRegExpValidation as bq,
|
|
70095
|
+
executeBetweenLengthValidation as br,
|
|
70096
|
+
executeBetweenValueValidation as bs,
|
|
70097
|
+
executeDateRangeValidation as bt,
|
|
70098
|
+
SavePointImpl as bu,
|
|
70099
|
+
provideSavePoint as bv,
|
|
70100
|
+
useSavePoint as bw,
|
|
70101
|
+
cancelProvidedSavePoint as bx,
|
|
70102
|
+
isMultiLangMessage as by,
|
|
70103
|
+
isNameEmpty as bz,
|
|
70040
70104
|
_sfc_main$1B as c,
|
|
70041
|
-
|
|
70042
|
-
|
|
70043
|
-
|
|
70044
|
-
|
|
70045
|
-
|
|
70046
|
-
|
|
70047
|
-
|
|
70048
|
-
|
|
70049
|
-
|
|
70050
|
-
|
|
70051
|
-
|
|
70052
|
-
|
|
70053
|
-
|
|
70054
|
-
|
|
70055
|
-
|
|
70056
|
-
|
|
70057
|
-
|
|
70058
|
-
|
|
70059
|
-
|
|
70060
|
-
|
|
70061
|
-
|
|
70062
|
-
|
|
70063
|
-
|
|
70064
|
-
|
|
70065
|
-
|
|
70066
|
-
|
|
70067
|
-
|
|
70068
|
-
|
|
70069
|
-
|
|
70070
|
-
|
|
70071
|
-
|
|
70072
|
-
|
|
70073
|
-
|
|
70074
|
-
|
|
70075
|
-
|
|
70076
|
-
|
|
70077
|
-
|
|
70078
|
-
|
|
70079
|
-
|
|
70080
|
-
|
|
70081
|
-
|
|
70082
|
-
|
|
70083
|
-
|
|
70084
|
-
|
|
70105
|
+
provideFieldContext as c0,
|
|
70106
|
+
useFieldContext as c1,
|
|
70107
|
+
modalPluginKey as c2,
|
|
70108
|
+
modalHandleKey as c3,
|
|
70109
|
+
BSModal as c4,
|
|
70110
|
+
useModal as c5,
|
|
70111
|
+
provideModalHandle as c6,
|
|
70112
|
+
createModalPlugin as c7,
|
|
70113
|
+
notificationEntries as c8,
|
|
70114
|
+
showNotification as c9,
|
|
70115
|
+
waitDuring as cA,
|
|
70116
|
+
tryUntil as cB,
|
|
70117
|
+
parsePathParam as cC,
|
|
70118
|
+
isBlankMultiLangString as cD,
|
|
70119
|
+
isMultiLangStringValidRequired as cE,
|
|
70120
|
+
addPrefixToMultiLangString as cF,
|
|
70121
|
+
isBlankMultiLangImageFile as cG,
|
|
70122
|
+
isMultiLangImageFileValidRequired as cH,
|
|
70123
|
+
localeNameProvider as cI,
|
|
70124
|
+
debounce$2 as cJ,
|
|
70125
|
+
alarmEntries as ca,
|
|
70126
|
+
showAlarm as cb,
|
|
70127
|
+
closeAlarm as cc,
|
|
70128
|
+
tooltipEntry as cd,
|
|
70129
|
+
showTooltip$1 as ce,
|
|
70130
|
+
hideTooltip$1 as cf,
|
|
70131
|
+
isTooltipDisplayed as cg,
|
|
70132
|
+
showLoadingIcon as ch,
|
|
70133
|
+
showLoading as ci,
|
|
70134
|
+
hideLoading as cj,
|
|
70135
|
+
withLoading as ck,
|
|
70136
|
+
contextMenuPluginKey as cl,
|
|
70137
|
+
BSContextMenuPlugin as cm,
|
|
70138
|
+
useContextMenu as cn,
|
|
70139
|
+
useContextMenuOptional as co,
|
|
70140
|
+
createContextMenuPlugin as cp,
|
|
70141
|
+
LocalStorageFavoriteMenuHandler as cq,
|
|
70142
|
+
DefaultFrameContext as cr,
|
|
70143
|
+
createDefaultFrameContext as cs,
|
|
70144
|
+
provideDefaultFrameContext as ct,
|
|
70145
|
+
useDefaultFrame as cu,
|
|
70146
|
+
ShortcutKeyHandler as cv,
|
|
70147
|
+
I18NTexts as cw,
|
|
70148
|
+
i18n as cx,
|
|
70149
|
+
formatUtil as cy,
|
|
70150
|
+
waitUntil as cz,
|
|
70085
70151
|
_sfc_main$X as d,
|
|
70086
70152
|
extractYoutubeVideoId as e,
|
|
70087
70153
|
createInputGridHandler as f,
|