@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.
Files changed (27) hide show
  1. package/dist/{BSAlertModal-B6XlvWm2.js → BSAlertModal-C8PIj5h_.js} +1 -1
  2. package/dist/{BSGridColumnSettingModal-DgqYUHUF.js → BSGridColumnSettingModal-D9CI-F_e.js} +1 -1
  3. package/dist/{BSRichTextMaximizedModal-DhmCYN9S.js → BSRichTextMaximizedModal-DsSYqgSR.js} +1 -1
  4. package/dist/{BSYesNoModal-CcElFZw-.js → BSYesNoModal-CB_RIKt0.js} +1 -1
  5. package/dist/{BSYoutubeInputModal-DLXCEq2-.js → BSYoutubeInputModal-CwLcWtEI.js} +1 -1
  6. package/dist/{ImageInsertModal-B5WoMehM.js → ImageInsertModal-lWQeIMu7.js} +2 -2
  7. package/dist/{ImageProperties.vue_vue_type_script_setup_true_lang-BIoCOwlw.js → ImageProperties.vue_vue_type_script_setup_true_lang-DDj0Odaa.js} +1 -1
  8. package/dist/{ImagePropertiesModal-AuLfc63Y.js → ImagePropertiesModal-C6RyT5B5.js} +2 -2
  9. package/dist/{LinkPropertiesModal-CzM1G8qN.js → LinkPropertiesModal-D5A3Gq2i.js} +1 -1
  10. package/dist/{TableInsertModal-ChcQJBQV.js → TableInsertModal-B1F5T8qs.js} +1 -1
  11. package/dist/{TablePropertiesModal-C1FzxMmL.js → TablePropertiesModal-DUiHSjcT.js} +1 -1
  12. package/dist/{VideoInsertModal-Blyjl-az.js → VideoInsertModal-R0Bs5E2T.js} +2 -2
  13. package/dist/{VideoProperties.vue_vue_type_script_setup_true_lang-C7l371rG.js → VideoProperties.vue_vue_type_script_setup_true_lang-BCTNqg94.js} +1 -1
  14. package/dist/{VideoPropertiesModal-CcgFfcXd.js → VideoPropertiesModal-DQADTS-J.js} +2 -2
  15. package/dist/{YoutubeInsertModal-B81eZZ3b.js → YoutubeInsertModal-R97l6ge3.js} +2 -2
  16. package/dist/{YoutubeProperties.vue_vue_type_script_setup_true_lang-DKGiIhRX.js → YoutubeProperties.vue_vue_type_script_setup_true_lang-Ce9a5UDA.js} +1 -1
  17. package/dist/{YoutubePropertiesModal-BI7rBusJ.js → YoutubePropertiesModal-BbrU7l5m.js} +2 -2
  18. package/dist/bluesea.js +107 -105
  19. package/dist/bluesea.umd.cjs +97 -31
  20. package/dist/component/grid/DateFilterModel.d.ts +15 -0
  21. package/dist/component/grid/GridModel.d.ts +1 -0
  22. package/dist/component/input/BSDateRangePresets.vue.d.ts +2 -2
  23. package/dist/component/input/DateRangePresetModel.d.ts +2 -0
  24. package/dist/component/tree/TreeModel.d.ts +28 -0
  25. package/dist/config/config.d.ts +3 -2
  26. package/dist/{index-DzQ05auj.js → index-DRs7QwNQ.js} +217 -151
  27. 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-B5WoMehM.js")),
91
- videoInsertModal: defineAsyncComponent(() => import("./VideoInsertModal-Blyjl-az.js")),
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 ? createDateRange(value) : void 0;
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 findPreset = (range) => {
4966
+ const findPreset2 = (range) => {
4963
4967
  return props.presets.find((preset) => {
4964
- const presetValue = createDateRange(preset);
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 = findPreset(props.modelValue);
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-B6XlvWm2.js")),
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-CcElFZw-.js")),
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
- const allParents = this.getAllParents();
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
- this.collectParents(parents, children, childrenProvider);
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-C1FzxMmL.js")),
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-ChcQJBQV.js")),
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-B5WoMehM.js")),
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-AuLfc63Y.js")),
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-B81eZZ3b.js")),
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-BI7rBusJ.js")),
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-CzM1G8qN.js")),
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-Blyjl-az.js")),
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-CcgFfcXd.js")),
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-DhmCYN9S.js")),
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-DLXCEq2-.js")),
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) => betweenDateFilter(item.propertyId, item.value.from, item.value.to));
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, ($event) => setDateFilterValue(index, $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
- const dateFilter = filter;
38019
- if (dateFilter.name && (dateFilter.fromValue || dateFilter.toValue)) {
38020
- return betweenDateFilter(dateFilter.name, dateFilter.fromValue, dateFilter.toValue);
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-DgqYUHUF.js")),
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
- useFieldContext as b$,
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
- provideTabManager as b4,
69982
- useTabManager as b5,
69983
- useTabManagerSilently as b6,
69984
- TabStatusManagerImpl as b7,
69985
- provideTabStatusManager as b8,
69986
- useTabStatusManager as b9,
69987
- serializeAddress as bA,
69988
- IllegalAccessError as bB,
69989
- PaginatedList as bC,
69990
- AbstractFilter as bD,
69991
- AndFilter as bE,
69992
- OrFilter as bF,
69993
- NotFilter as bG,
69994
- InFilter as bH,
69995
- LikeFilter as bI,
69996
- EqualFilter as bJ,
69997
- BetweenFilter as bK,
69998
- BetweenDateFilter as bL,
69999
- IsNullFilter as bM,
70000
- IsNotNullFilter as bN,
70001
- andFilter as bO,
70002
- orFilter as bP,
70003
- notFilter as bQ,
70004
- inFilter as bR,
70005
- likeFilter as bS,
70006
- equalFilter as bT,
70007
- betweenFilter as bU,
70008
- betweenDateFilter as bV,
70009
- isNullFilter as bW,
70010
- isNotNullFilter as bX,
70011
- acceptFilter as bY,
70012
- SearchParam as bZ,
70013
- provideFieldContext as b_,
70014
- createTreeHandler as ba,
70015
- defaultExpandMultiLang as bb,
70016
- toggleDefaultExpandMultiLang as bc,
70017
- localeBasedExtraItemValidationRules as bd,
70018
- ValidationFailedError as be,
70019
- isValidationFailedError as bf,
70020
- storeFieldValidator as bg,
70021
- loadFieldValidator as bh,
70022
- findFieldValidatorElements as bi,
70023
- validateField as bj,
70024
- validateFields as bk,
70025
- fieldValidator as bl,
70026
- executeFieldValidationRule as bm,
70027
- executeRequiredValidation as bn,
70028
- executeRegExpValidation as bo,
70029
- executeBetweenLengthValidation as bp,
70030
- executeBetweenValueValidation as bq,
70031
- executeDateRangeValidation as br,
70032
- SavePointImpl as bs,
70033
- provideSavePoint as bt,
70034
- useSavePoint as bu,
70035
- cancelProvidedSavePoint as bv,
70036
- isMultiLangMessage as bw,
70037
- isNameEmpty as bx,
70038
- serializeName as by,
70039
- serializeTel as bz,
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
- modalPluginKey as c0,
70042
- modalHandleKey as c1,
70043
- BSModal as c2,
70044
- useModal as c3,
70045
- provideModalHandle as c4,
70046
- createModalPlugin as c5,
70047
- notificationEntries as c6,
70048
- showNotification as c7,
70049
- alarmEntries as c8,
70050
- showAlarm as c9,
70051
- parsePathParam as cA,
70052
- isBlankMultiLangString as cB,
70053
- isMultiLangStringValidRequired as cC,
70054
- addPrefixToMultiLangString as cD,
70055
- isBlankMultiLangImageFile as cE,
70056
- isMultiLangImageFileValidRequired as cF,
70057
- localeNameProvider as cG,
70058
- debounce$2 as cH,
70059
- closeAlarm as ca,
70060
- tooltipEntry as cb,
70061
- showTooltip$1 as cc,
70062
- hideTooltip$1 as cd,
70063
- isTooltipDisplayed as ce,
70064
- showLoadingIcon as cf,
70065
- showLoading as cg,
70066
- hideLoading as ch,
70067
- withLoading as ci,
70068
- contextMenuPluginKey as cj,
70069
- BSContextMenuPlugin as ck,
70070
- useContextMenu as cl,
70071
- useContextMenuOptional as cm,
70072
- createContextMenuPlugin as cn,
70073
- LocalStorageFavoriteMenuHandler as co,
70074
- DefaultFrameContext as cp,
70075
- createDefaultFrameContext as cq,
70076
- provideDefaultFrameContext as cr,
70077
- useDefaultFrame as cs,
70078
- ShortcutKeyHandler as ct,
70079
- I18NTexts as cu,
70080
- i18n as cv,
70081
- formatUtil as cw,
70082
- waitUntil as cx,
70083
- waitDuring as cy,
70084
- tryUntil as cz,
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,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@g1cloud/bluesea",
3
3
  "private": false,
4
- "version": "5.0.0-beta.6",
4
+ "version": "5.0.0-beta.8",
5
5
  "description": "Ui Library for g1cloud BackOffice.",
6
6
  "type": "module",
7
7
  "engines": {