neo.mjs 8.40.0 → 8.41.0

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.
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='8.40.0'
23
+ * @member {String} version='8.41.0'
24
24
  */
25
- version: '8.40.0'
25
+ version: '8.41.0'
26
26
  }
27
27
 
28
28
  /**
@@ -16,7 +16,7 @@
16
16
  "@type": "Organization",
17
17
  "name": "Neo.mjs"
18
18
  },
19
- "datePublished": "2025-04-05",
19
+ "datePublished": "2025-04-06",
20
20
  "publisher": {
21
21
  "@type": "Organization",
22
22
  "name": "Neo.mjs"
@@ -107,7 +107,7 @@ class FooterContainer extends Container {
107
107
  }, {
108
108
  module: Component,
109
109
  cls : ['neo-version'],
110
- html : 'v8.40.0'
110
+ html : 'v8.41.0'
111
111
  }]
112
112
  }],
113
113
  /**
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='8.40.0'
23
+ * @member {String} version='8.41.0'
24
24
  */
25
- version: '8.40.0'
25
+ version: '8.41.0'
26
26
  }
27
27
 
28
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "8.40.0",
3
+ "version": "8.41.0",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -263,12 +263,12 @@ const DefaultConfig = {
263
263
  useVdomWorker: true,
264
264
  /**
265
265
  * buildScripts/injectPackageVersion.mjs will update this value
266
- * @default '8.40.0'
266
+ * @default '8.41.0'
267
267
  * @memberOf! module:Neo
268
268
  * @name config.version
269
269
  * @type String
270
270
  */
271
- version: '8.40.0'
271
+ version: '8.41.0'
272
272
  };
273
273
 
274
274
  Object.assign(DefaultConfig, {
@@ -448,7 +448,7 @@ class MainContainer extends Container {
448
448
  appName : me.appName,
449
449
  flex : 'none',
450
450
  height : me.sideBarWidth,
451
- listeners: {change: me.onDateSelectorChange, scope: me},
451
+ listeners: {dateChange: me.onDateSelectorChange, scope: me},
452
452
  parentId : me.id, // we need the parentId to access the model inside the ctor
453
453
  value : null,
454
454
 
@@ -599,8 +599,8 @@ class MainContainer extends Container {
599
599
  * @param {String} data.oldValue
600
600
  * @param {String} data.value
601
601
  */
602
- onDateSelectorChange(data) {
603
- data.oldValue !== undefined && this.setState('currentDate', new Date(`${data.value}T00:00:00.000Z`))
602
+ onDateSelectorChange({value}) {
603
+ this.setState('currentDate', value)
604
604
  }
605
605
 
606
606
  /**
@@ -225,7 +225,7 @@ class EventDragZone extends DragZone {
225
225
  endDate = me.newEndDate;
226
226
  startDate = me.newStartDate || record.startDate
227
227
  } else {
228
- startDate = new Date(VDomUtil.find(owner.vdom, me.proxyParentId).vdom.flag + 'T00:00:00.000Z');
228
+ startDate = new Date(VDomUtil.find(owner.vdom, me.proxyParentId).vdom.flag + 'T12:00:00.000Z');
229
229
  startDate.setHours(me.axisStartTime);
230
230
  startDate.setMinutes(me.currentInterval * me.intervalSize);
231
231
 
@@ -188,7 +188,7 @@ class DragDrop extends Base {
188
188
  intervalHeight = columnRect.height / intervals,
189
189
  position = Math.min(columnRect.height, data.clientY - columnRect.top),
190
190
  currentInterval = Math.floor(position / intervalHeight),
191
- startDate = new Date(VDomUtil.find(owner.vdom, data.path[0].id).vdom.flag + 'T00:00:00.000Z'),
191
+ startDate = new Date(VDomUtil.find(owner.vdom, data.path[0].id).vdom.flag + 'T12:00:00.000Z'),
192
192
  dragElement, endDate, eventDragZone, eventId, record;
193
193
 
194
194
  me.isDragging = true;
@@ -199,6 +199,14 @@ class DateSelector extends Component {
199
199
  me.updateHeaderYear(0, true);
200
200
  me.recreateDayViewContent(false, false)
201
201
  }
202
+
203
+ if (oldValue !== undefined) {
204
+ me.fire('dateChange', {
205
+ component: me,
206
+ oldValue,
207
+ value
208
+ })
209
+ }
202
210
  }
203
211
 
204
212
  /**
@@ -221,7 +229,7 @@ class DateSelector extends Component {
221
229
  if (value === false) {
222
230
  let me = this;
223
231
 
224
- if (me.cachedUpdate && me.cachedUpdate !== new Date(`${me.value}T00:00:00.000Z`)) {
232
+ if (me.cachedUpdate && me.cachedUpdate !== new Date(`${me.value}T12:00:00.000Z`)) {
225
233
  me.afterSetValue(me.value, DateUtil.convertToyyyymmdd(me.cachedUpdate))
226
234
  }
227
235
 
@@ -347,7 +355,7 @@ class DateSelector extends Component {
347
355
 
348
356
  if (value) {
349
357
  if (!me.isUpdating) {
350
- me.currentDate = new Date(`${value}T00:00:00.000Z`);
358
+ me.currentDate = new Date(`${value}T12:00:00.000Z`);
351
359
 
352
360
  me.fire('change', {
353
361
  component: me,
@@ -608,9 +616,9 @@ class DateSelector extends Component {
608
616
  currentMonth = currentDate.getMonth(),
609
617
  currentYear = currentDate.getFullYear(),
610
618
  date = me.currentDate, // cloned
611
- maxDate = me.maxValue && new Date(`${me.maxValue}T00:00:00.000Z`),
612
- minDate = me.minValue && new Date(`${me.minValue}T00:00:00.000Z`),
613
- valueDate = new Date(`${me.value}T00:00:00.000Z`),
619
+ maxDate = me.maxValue && new Date(`${me.maxValue}T12:00:00.000Z`),
620
+ minDate = me.minValue && new Date(`${me.minValue}T12:00:00.000Z`),
621
+ valueDate = new Date(`${me.value}T12:00:00.000Z`),
614
622
  valueMonth = valueDate.getMonth(),
615
623
  valueYear = valueDate.getFullYear(),
616
624
  daysInMonth = DateUtil.getDaysInMonth(currentDate),
@@ -132,9 +132,9 @@ class DayViewComponent extends Base {
132
132
  currentMonth = currentDate.getMonth(),
133
133
  currentYear = currentDate.getFullYear(),
134
134
  date = me.currentDate, // cloned
135
- maxDate = me.maxValue && new Date(`${me.maxValue}T00:00:00.000Z`),
136
- minDate = me.minValue && new Date(`${me.minValue}T00:00:00.000Z`),
137
- valueDate = new Date(`${me.value}T00:00:00.000Z`),
135
+ maxDate = me.maxValue && new Date(`${me.maxValue}T12:00:00.000Z`),
136
+ minDate = me.minValue && new Date(`${me.minValue}T12:00:00.000Z`),
137
+ valueDate = new Date(`${me.value}T12:00:00.000Z`),
138
138
  valueMonth = valueDate.getMonth(),
139
139
  valueYear = valueDate.getFullYear(),
140
140
  daysInMonth = DateUtil.getDaysInMonth(currentDate),
@@ -233,7 +233,7 @@ class SelectorContainer extends Container {
233
233
 
234
234
  if (value) {
235
235
  if (!me.isUpdating) {
236
- me.currentDate = new Date(`${value}T00:00:00.000Z`);
236
+ me.currentDate = new Date(`${value}T12:00:00.000Z`);
237
237
 
238
238
  me.fire('change', {
239
239
  component: me,
@@ -256,7 +256,7 @@ class SortZone extends DragZone {
256
256
  indexMap : indexMap,
257
257
  ownerStyle : {height: ownerStyle.height, width: ownerStyle.width},
258
258
  reversedLayoutDirection: layout.direction === 'column-reverse' || layout.direction === 'row-reverse',
259
- sortDirection : layout.direction.includes('row') ? 'horizontal' : 'vertical',
259
+ sortDirection : layout.direction?.includes('column') ? 'vertical' : 'horizontal',
260
260
  startIndex : index
261
261
  });
262
262
 
@@ -409,7 +409,7 @@ class Container extends BaseContainer {
409
409
  fields.forEach(field => {
410
410
  validField = field.validate?.(false);
411
411
 
412
- if (!validField) {
412
+ if (validField === false) {
413
413
  isValid = false
414
414
  }
415
415
  });
@@ -34,7 +34,7 @@ class Field extends Component {
34
34
  */
35
35
  formGroup_: null,
36
36
  /**
37
- * @member {String|null} keys={}
37
+ * @member {Object|null} keys={}
38
38
  */
39
39
  keys: {},
40
40
  /**
@@ -194,7 +194,7 @@ class DateField extends Picker {
194
194
  let value = this.value;
195
195
 
196
196
  if(this.submitDateObject && value) {
197
- return new Date(`${value}T00:00:00.000Z`);
197
+ return new Date(`${value}T12:00:00.000Z`);
198
198
  } else if(this.isoDate && value) {
199
199
  return new Date(value).toISOString();
200
200
  }