neo.mjs 6.10.0 → 6.10.2
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/apps/ServiceWorker.mjs +2 -2
- package/apps/learnneo/view/home/HeaderToolbar.mjs +47 -0
- package/apps/learnneo/view/home/MainContainer.mjs +32 -25
- package/apps/newwebsite/app.mjs +2 -2
- package/apps/newwebsite/view/{MainContainer.mjs → Viewport.mjs} +11 -11
- package/buildScripts/convertDesignTokens.mjs +1 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/examples/tab/container/neo-config.json +1 -1
- package/package.json +3 -3
- package/resources/data/deck/learnneo/p/2023-10-14T19-25-08-153Z.md +18 -21
- package/resources/data/deck/learnneo/p/MainThreadAddonIntro.md +2 -2
- package/resources/design-tokens/json/component.json +43 -7
- package/resources/design-tokens/json/core.json +45 -24
- package/resources/design-tokens/json/semantic.json +31 -1
- package/resources/scss/src/apps/learnneo/Viewport.scss +3 -3
- package/resources/scss/src/apps/learnneo/home/HeaderToolbar.scss +24 -0
- package/resources/scss/src/apps/learnneo/home/MainContainer.scss +7 -0
- package/resources/scss/src/apps/newwebsite/{MainContainer.scss → Viewport.scss} +1 -1
- package/resources/scss/theme-neo-light/design-tokens/Component.scss +12 -7
- package/resources/scss/theme-neo-light/design-tokens/Core.scss +67 -66
- package/resources/scss/theme-neo-light/design-tokens/Semantic.scss +11 -8
- package/resources/scss/theme-neo-light/tab/Strip.scss +3 -3
- package/resources/scss/theme-neo-light/tab/header/Button.scss +24 -13
- package/src/DefaultConfig.mjs +2 -2
- package/src/calendar/view/week/Component.mjs +64 -64
- package/src/main/addon/Mwc.mjs +8 -4
@@ -237,14 +237,14 @@ class Component extends BaseComponent {
|
|
237
237
|
me.getColumnTimeAxisContainer().cn[me.timeAxisPosition === 'start' ? 'unshift' : 'push'](me.timeAxis.vdom);
|
238
238
|
|
239
239
|
if (me.calendarStore.getCount() > 0 && me.eventStore.getCount() > 0) {
|
240
|
-
me.needsEventUpdate = true
|
240
|
+
me.needsEventUpdate = true
|
241
241
|
}
|
242
242
|
|
243
243
|
me.updateHeader(true, me.needsEventUpdate);
|
244
244
|
|
245
245
|
me.needsEventUpdate && me.updateEvents(false);
|
246
246
|
|
247
|
-
me.headerCreated = true
|
247
|
+
me.headerCreated = true
|
248
248
|
}
|
249
249
|
|
250
250
|
/**
|
@@ -268,7 +268,7 @@ class Component extends BaseComponent {
|
|
268
268
|
`var(--c-w-background-color) ${i * rowHeight + i}px`,
|
269
269
|
`var(--c-w-background-color) ${(i + 1) * rowHeight + i}px`,
|
270
270
|
'var(--c-w-border-color) 0'
|
271
|
-
)
|
271
|
+
)
|
272
272
|
}
|
273
273
|
|
274
274
|
Object.assign(me.getColumnContainer().style, {
|
@@ -278,7 +278,7 @@ class Component extends BaseComponent {
|
|
278
278
|
maxHeight : `${height}px`
|
279
279
|
});
|
280
280
|
|
281
|
-
!silent && me.update()
|
281
|
+
!silent && me.update()
|
282
282
|
}
|
283
283
|
|
284
284
|
/**
|
@@ -297,7 +297,7 @@ class Component extends BaseComponent {
|
|
297
297
|
};
|
298
298
|
|
299
299
|
oldValue?.un(listeners);
|
300
|
-
value ?.on(listeners)
|
300
|
+
value ?.on(listeners)
|
301
301
|
}
|
302
302
|
|
303
303
|
/**
|
@@ -307,7 +307,7 @@ class Component extends BaseComponent {
|
|
307
307
|
* @protected
|
308
308
|
*/
|
309
309
|
afterSetColumnsBuffer(value, oldValue) {
|
310
|
-
this.totalColumns = this.visibleColumns + 2 * value
|
310
|
+
this.totalColumns = this.visibleColumns + 2 * value
|
311
311
|
}
|
312
312
|
|
313
313
|
/**
|
@@ -317,7 +317,7 @@ class Component extends BaseComponent {
|
|
317
317
|
* @protected
|
318
318
|
*/
|
319
319
|
afterSetColumnsVisible(value, oldValue) {
|
320
|
-
this.totalColumns = 2 * this.columnsBuffer + value
|
320
|
+
this.totalColumns = 2 * this.columnsBuffer + value
|
321
321
|
}
|
322
322
|
|
323
323
|
/**
|
@@ -331,7 +331,7 @@ class Component extends BaseComponent {
|
|
331
331
|
|
332
332
|
if (me.isConstructed) {
|
333
333
|
me.updateHeader(false, true);
|
334
|
-
me.updateEvents()
|
334
|
+
me.updateEvents()
|
335
335
|
}
|
336
336
|
}
|
337
337
|
|
@@ -345,7 +345,7 @@ class Component extends BaseComponent {
|
|
345
345
|
let me = this;
|
346
346
|
|
347
347
|
me.intlFormat_day = new Intl.DateTimeFormat(me.locale, {weekday: value});
|
348
|
-
oldValue && me.updateHeader()
|
348
|
+
oldValue && me.updateHeader()
|
349
349
|
}
|
350
350
|
|
351
351
|
/**
|
@@ -379,8 +379,8 @@ class Component extends BaseComponent {
|
|
379
379
|
...me.pluginEventResizableConfig
|
380
380
|
});
|
381
381
|
|
382
|
-
me.plugins = plugins
|
383
|
-
})
|
382
|
+
me.plugins = plugins
|
383
|
+
})
|
384
384
|
}
|
385
385
|
}
|
386
386
|
|
@@ -397,7 +397,7 @@ class Component extends BaseComponent {
|
|
397
397
|
oldValue && NeoArray.remove(cls, `neo-event-border-${oldValue}`);
|
398
398
|
value && NeoArray.add( cls, `neo-event-border-${value}`);
|
399
399
|
|
400
|
-
me.cls = cls
|
400
|
+
me.cls = cls
|
401
401
|
}
|
402
402
|
|
403
403
|
/**
|
@@ -416,7 +416,7 @@ class Component extends BaseComponent {
|
|
416
416
|
};
|
417
417
|
|
418
418
|
oldValue?.un(listeners);
|
419
|
-
value ?.on(listeners)
|
419
|
+
value ?.on(listeners)
|
420
420
|
}
|
421
421
|
|
422
422
|
/**
|
@@ -430,7 +430,7 @@ class Component extends BaseComponent {
|
|
430
430
|
let me = this;
|
431
431
|
|
432
432
|
me.intlFormat_day = new Intl.DateTimeFormat(value, {weekday: me.dayNameFormat});
|
433
|
-
me.updateHeader()
|
433
|
+
me.updateHeader()
|
434
434
|
}
|
435
435
|
}
|
436
436
|
|
@@ -449,7 +449,7 @@ class Component extends BaseComponent {
|
|
449
449
|
if (value) {
|
450
450
|
if (me.needsEventUpdate) {
|
451
451
|
me.updateEvents();
|
452
|
-
me.needsEventUpdate = false
|
452
|
+
me.needsEventUpdate = false
|
453
453
|
}
|
454
454
|
|
455
455
|
await me.timeout(100);
|
@@ -462,7 +462,7 @@ class Component extends BaseComponent {
|
|
462
462
|
direction: 'left',
|
463
463
|
id : scrollContainerId,
|
464
464
|
value : rect.width * me.columnsBuffer / me.columnsVisible / 3
|
465
|
-
})
|
465
|
+
})
|
466
466
|
}
|
467
467
|
}
|
468
468
|
|
@@ -473,7 +473,7 @@ class Component extends BaseComponent {
|
|
473
473
|
* @protected
|
474
474
|
*/
|
475
475
|
afterSetShowEventEndTime(value, oldValue) {
|
476
|
-
oldValue !== undefined && this.updateEvents()
|
476
|
+
oldValue !== undefined && this.updateEvents()
|
477
477
|
}
|
478
478
|
|
479
479
|
/**
|
@@ -492,7 +492,7 @@ class Component extends BaseComponent {
|
|
492
492
|
|
493
493
|
if (oldValue !== undefined) {
|
494
494
|
me.updateHeader(false, true);
|
495
|
-
me.updateEvents()
|
495
|
+
me.updateEvents()
|
496
496
|
}
|
497
497
|
}
|
498
498
|
|
@@ -510,11 +510,11 @@ class Component extends BaseComponent {
|
|
510
510
|
NeoArray[value === 'end' ? 'add' : 'remove'](cls, 'neo-timeaxis-end');
|
511
511
|
|
512
512
|
if (oldValue !== undefined) {
|
513
|
-
timeAxisContainer.cn.unshift(timeAxisContainer.cn.pop())
|
513
|
+
timeAxisContainer.cn.unshift(timeAxisContainer.cn.pop()) // switch the order of the 2 items
|
514
514
|
}
|
515
515
|
|
516
516
|
me.cls = cls; // silent update
|
517
|
-
me.update()
|
517
|
+
me.update()
|
518
518
|
}
|
519
519
|
|
520
520
|
/**
|
@@ -526,7 +526,7 @@ class Component extends BaseComponent {
|
|
526
526
|
afterSetWeekStartDay(value, oldValue) {
|
527
527
|
if (oldValue !== undefined) {
|
528
528
|
this.updateHeader(false, true);
|
529
|
-
this.updateEvents()
|
529
|
+
this.updateEvents()
|
530
530
|
}
|
531
531
|
}
|
532
532
|
|
@@ -537,7 +537,7 @@ class Component extends BaseComponent {
|
|
537
537
|
* @protected
|
538
538
|
*/
|
539
539
|
beforeSetDayNameFormat(value, oldValue) {
|
540
|
-
return this.beforeSetEnumValue(value, oldValue, 'dayNameFormat', DateUtil.prototype.dayNameFormats)
|
540
|
+
return this.beforeSetEnumValue(value, oldValue, 'dayNameFormat', DateUtil.prototype.dayNameFormats)
|
541
541
|
}
|
542
542
|
|
543
543
|
/**
|
@@ -547,7 +547,7 @@ class Component extends BaseComponent {
|
|
547
547
|
* @protected
|
548
548
|
*/
|
549
549
|
beforeSetTimeAxisPosition(value, oldValue) {
|
550
|
-
return this.beforeSetEnumValue(value, oldValue, 'timeAxisPosition')
|
550
|
+
return this.beforeSetEnumValue(value, oldValue, 'timeAxisPosition')
|
551
551
|
}
|
552
552
|
|
553
553
|
/**
|
@@ -557,7 +557,7 @@ class Component extends BaseComponent {
|
|
557
557
|
* @protected
|
558
558
|
*/
|
559
559
|
beforeSetWeekStartDay(value, oldValue) {
|
560
|
-
return this.beforeSetEnumValue(value, oldValue, 'weekStartDay', DateUtil.prototype.weekStartDays)
|
560
|
+
return this.beforeSetEnumValue(value, oldValue, 'weekStartDay', DateUtil.prototype.weekStartDays)
|
561
561
|
}
|
562
562
|
|
563
563
|
/**
|
@@ -575,11 +575,11 @@ class Component extends BaseComponent {
|
|
575
575
|
|
576
576
|
if (currentDay === 0 || currentDay === 6) {
|
577
577
|
columnCls.push('neo-weekend');
|
578
|
-
!me.showWeekends && (removeDom = true)
|
578
|
+
!me.showWeekends && (removeDom = true)
|
579
579
|
}
|
580
580
|
|
581
581
|
if (currentDate === today.day && date.getMonth() === today.month && date.getFullYear() === today.year) {
|
582
|
-
dateCls.push('neo-today')
|
582
|
+
dateCls.push('neo-today')
|
583
583
|
}
|
584
584
|
|
585
585
|
column = {cls: columnCls, flag: DateUtil.convertToyyyymmdd(date), removeDom};
|
@@ -590,7 +590,7 @@ class Component extends BaseComponent {
|
|
590
590
|
{cls: dateCls, html: currentDate}
|
591
591
|
]};
|
592
592
|
|
593
|
-
return {column, header}
|
593
|
+
return {column, header}
|
594
594
|
}
|
595
595
|
|
596
596
|
/**
|
@@ -599,14 +599,14 @@ class Component extends BaseComponent {
|
|
599
599
|
destroy(...args) {
|
600
600
|
this.timeAxis = null;
|
601
601
|
|
602
|
-
super.destroy(...args)
|
602
|
+
super.destroy(...args)
|
603
603
|
}
|
604
604
|
|
605
605
|
/**
|
606
606
|
*
|
607
607
|
*/
|
608
608
|
getColumnContainer() {
|
609
|
-
return VDomUtil.getByFlag(this.vdom, 'neo-c-w-column-container')
|
609
|
+
return VDomUtil.getByFlag(this.vdom, 'neo-c-w-column-container')
|
610
610
|
}
|
611
611
|
|
612
612
|
/**
|
@@ -614,7 +614,7 @@ class Component extends BaseComponent {
|
|
614
614
|
* @returns {String}
|
615
615
|
*/
|
616
616
|
getColumnId(date) {
|
617
|
-
return `${this.id}_col_${DateUtil.convertToyyyymmdd(date)}
|
617
|
+
return `${this.id}_col_${DateUtil.convertToyyyymmdd(date)}`
|
618
618
|
}
|
619
619
|
|
620
620
|
/**
|
@@ -622,14 +622,14 @@ class Component extends BaseComponent {
|
|
622
622
|
* @returns {String}
|
623
623
|
*/
|
624
624
|
getColumnHeaderId(date) {
|
625
|
-
return `${this.id}_ch_${DateUtil.convertToyyyymmdd(date)}
|
625
|
+
return `${this.id}_ch_${DateUtil.convertToyyyymmdd(date)}`
|
626
626
|
}
|
627
627
|
|
628
628
|
/**
|
629
629
|
*
|
630
630
|
*/
|
631
631
|
getColumnTimeAxisContainer() {
|
632
|
-
return VDomUtil.getByFlag(this.vdom, 'neo-c-w-column-timeaxis-container')
|
632
|
+
return VDomUtil.getByFlag(this.vdom, 'neo-c-w-column-timeaxis-container')
|
633
633
|
}
|
634
634
|
|
635
635
|
/**
|
@@ -637,14 +637,14 @@ class Component extends BaseComponent {
|
|
637
637
|
* @returns {String}
|
638
638
|
*/
|
639
639
|
getEventId(recordId) {
|
640
|
-
return `${this.id}__${recordId}
|
640
|
+
return `${this.id}__${recordId}`
|
641
641
|
}
|
642
642
|
|
643
643
|
/**
|
644
644
|
*
|
645
645
|
*/
|
646
646
|
getHeaderContainer() {
|
647
|
-
return VDomUtil.getByFlag(this.vdom, 'neo-header-row')
|
647
|
+
return VDomUtil.getByFlag(this.vdom, 'neo-header-row')
|
648
648
|
}
|
649
649
|
|
650
650
|
/**
|
@@ -652,28 +652,28 @@ class Component extends BaseComponent {
|
|
652
652
|
* @returns {String}
|
653
653
|
*/
|
654
654
|
getIdKey() {
|
655
|
-
return 'c-w'
|
655
|
+
return 'c-w'
|
656
656
|
}
|
657
657
|
|
658
658
|
/**
|
659
659
|
*
|
660
660
|
*/
|
661
661
|
getScrollContainer() {
|
662
|
-
return VDomUtil.getByFlag(this.vdom, 'neo-c-w-scrollcontainer')
|
662
|
+
return VDomUtil.getByFlag(this.vdom, 'neo-c-w-scrollcontainer')
|
663
663
|
}
|
664
664
|
|
665
665
|
/**
|
666
666
|
* @param {Object[]} data
|
667
667
|
*/
|
668
668
|
onCalendarStoreLoad(data) {
|
669
|
-
this.eventStore.getCount() > 0 && this.updateEvents()
|
669
|
+
this.eventStore.getCount() > 0 && this.updateEvents()
|
670
670
|
}
|
671
671
|
|
672
672
|
/**
|
673
673
|
* @param {Object} data
|
674
674
|
*/
|
675
675
|
onCalendarStoreRecordChange(data) {
|
676
|
-
this.updateEvents()
|
676
|
+
this.updateEvents()
|
677
677
|
}
|
678
678
|
|
679
679
|
/**
|
@@ -692,7 +692,7 @@ class Component extends BaseComponent {
|
|
692
692
|
|
693
693
|
Object.assign(style, {left: `${eventNode.rect.width + 15}px`, top: eventVdom.style.top});
|
694
694
|
editEventContainer.setSilent({parentId: data.path[1].id, record, style});
|
695
|
-
editEventContainer.render(true)
|
695
|
+
editEventContainer.render(true)
|
696
696
|
}
|
697
697
|
}
|
698
698
|
|
@@ -700,14 +700,14 @@ class Component extends BaseComponent {
|
|
700
700
|
* @param {Object[]} data
|
701
701
|
*/
|
702
702
|
onEventStoreLoad(data) {
|
703
|
-
this.calendarStore.getCount() > 0 && this.updateEvents()
|
703
|
+
this.calendarStore.getCount() > 0 && this.updateEvents()
|
704
704
|
}
|
705
705
|
|
706
706
|
/**
|
707
707
|
* @param {Object[]} data
|
708
708
|
*/
|
709
709
|
onEventStoreRecordChange(data) {
|
710
|
-
this.updateEvents()
|
710
|
+
this.updateEvents()
|
711
711
|
}
|
712
712
|
|
713
713
|
/**
|
@@ -720,7 +720,7 @@ class Component extends BaseComponent {
|
|
720
720
|
path = data.path;
|
721
721
|
|
722
722
|
oldPath?.[0]?.cls.includes('neo-event') && Neo.applyDeltas(this.appName, {id: oldPath[0].id, cls: {remove: ['neo-focus']}});
|
723
|
-
path ?.[0]?.cls.includes('neo-event') && Neo.applyDeltas(this.appName, {id: path[0] .id, cls: {add: ['neo-focus']}})
|
723
|
+
path ?.[0]?.cls.includes('neo-event') && Neo.applyDeltas(this.appName, {id: path[0] .id, cls: {add: ['neo-focus']}})
|
724
724
|
}
|
725
725
|
|
726
726
|
/**
|
@@ -734,7 +734,7 @@ class Component extends BaseComponent {
|
|
734
734
|
let me = this;
|
735
735
|
|
736
736
|
me.adjustTotalHeight(data, me.headerCreated);
|
737
|
-
me.headerCreated && me.updateEvents()
|
737
|
+
me.headerCreated && me.updateEvents()
|
738
738
|
}
|
739
739
|
|
740
740
|
/**
|
@@ -767,7 +767,7 @@ class Component extends BaseComponent {
|
|
767
767
|
config = me.createColumnAndHeader(date);
|
768
768
|
|
769
769
|
columns.cn.push(config.column);
|
770
|
-
header .cn.push(config.header)
|
770
|
+
header .cn.push(config.header)
|
771
771
|
}
|
772
772
|
|
773
773
|
firstColumnDate.setDate(firstColumnDate.getDate() + columnsBuffer);
|
@@ -776,7 +776,7 @@ class Component extends BaseComponent {
|
|
776
776
|
// Details: https://github.com/neomjs/neo/issues/2216
|
777
777
|
setTimeout(() => {me.updateEvents(false, columnsBuffer + columnsVisible, me.totalColumns)}, 50);
|
778
778
|
|
779
|
-
scrollValue = -width
|
779
|
+
scrollValue = -width
|
780
780
|
}
|
781
781
|
|
782
782
|
else if (data.deltaX < 0 && Math.round(data.scrollLeft / width * columnsBuffer) < 1) {
|
@@ -791,7 +791,7 @@ class Component extends BaseComponent {
|
|
791
791
|
config = me.createColumnAndHeader(date);
|
792
792
|
|
793
793
|
columns.cn.unshift(config.column);
|
794
|
-
header .cn.unshift(config.header)
|
794
|
+
header .cn.unshift(config.header)
|
795
795
|
}
|
796
796
|
|
797
797
|
firstColumnDate.setDate(firstColumnDate.getDate() - columnsBuffer);
|
@@ -800,7 +800,7 @@ class Component extends BaseComponent {
|
|
800
800
|
// Details: https://github.com/neomjs/neo/issues/2216
|
801
801
|
setTimeout(() => {me.updateEvents(false, 0, columnsBuffer)}, 50);
|
802
802
|
|
803
|
-
scrollValue = width
|
803
|
+
scrollValue = width
|
804
804
|
}
|
805
805
|
|
806
806
|
if (scrollValue) {
|
@@ -812,9 +812,9 @@ class Component extends BaseComponent {
|
|
812
812
|
id : me.getScrollContainer().id,
|
813
813
|
value : scrollValue
|
814
814
|
}).then(() => {
|
815
|
-
me.isUpdating = false
|
816
|
-
})
|
817
|
-
})
|
815
|
+
me.isUpdating = false
|
816
|
+
})
|
817
|
+
})
|
818
818
|
}
|
819
819
|
}
|
820
820
|
}
|
@@ -823,7 +823,7 @@ class Component extends BaseComponent {
|
|
823
823
|
* @param {Date} date
|
824
824
|
*/
|
825
825
|
setFirstColumnDate(date) {
|
826
|
-
date.setDate(date.getDate() - date.getDay() + this.weekStartDay - this.columnsBuffer)
|
826
|
+
date.setDate(date.getDate() - date.getDay() + this.weekStartDay - this.columnsBuffer)
|
827
827
|
}
|
828
828
|
|
829
829
|
/**
|
@@ -836,7 +836,7 @@ class Component extends BaseComponent {
|
|
836
836
|
let me = this;
|
837
837
|
|
838
838
|
if (!me.mounted) {
|
839
|
-
me.needsEventUpdate = true
|
839
|
+
me.needsEventUpdate = true
|
840
840
|
} else {
|
841
841
|
let calendarStore = me.calendarStore,
|
842
842
|
eventStore = me.eventStore,
|
@@ -871,19 +871,19 @@ class Component extends BaseComponent {
|
|
871
871
|
startDate = record.startDate;
|
872
872
|
|
873
873
|
if (endTime <= startDate.getHours() || startTime >= endDate.getHours()) {
|
874
|
-
continue
|
874
|
+
continue
|
875
875
|
}
|
876
876
|
|
877
877
|
if (endTime < endDate.getHours()) {
|
878
878
|
endDate = DateUtil.clone(endDate);
|
879
879
|
endDate.setHours(endTime);
|
880
|
-
endDate.setMinutes(0)
|
880
|
+
endDate.setMinutes(0)
|
881
881
|
}
|
882
882
|
|
883
883
|
if (startTime > startDate.getHours()) {
|
884
884
|
startDate = DateUtil.clone(startDate);
|
885
885
|
startDate.setHours(startTime);
|
886
|
-
startDate.setMinutes(0)
|
886
|
+
startDate.setMinutes(0)
|
887
887
|
}
|
888
888
|
|
889
889
|
duration = (endDate - startDate) / 60 / 60 / 1000; // duration in hours
|
@@ -899,7 +899,7 @@ class Component extends BaseComponent {
|
|
899
899
|
hasOverflow = timeAxis.rowHeight * eventIntervals < (showEventEndTime ? 50 : 34);
|
900
900
|
|
901
901
|
if (hasOverflow && !(showEventEndTime && (timeAxis.rowHeight / eventIntervals >= 34))) {
|
902
|
-
eventCls.push('neo-overflow')
|
902
|
+
eventCls.push('neo-overflow')
|
903
903
|
}
|
904
904
|
}
|
905
905
|
|
@@ -933,14 +933,14 @@ class Component extends BaseComponent {
|
|
933
933
|
top : `calc(${top}% + 1px)`,
|
934
934
|
width : 'calc(100% - 1px)'
|
935
935
|
}
|
936
|
-
})
|
936
|
+
})
|
937
937
|
}
|
938
938
|
}
|
939
939
|
|
940
|
-
date.setDate(date.getDate() + 1)
|
940
|
+
date.setDate(date.getDate() + 1)
|
941
941
|
}
|
942
942
|
|
943
|
-
me[silent ? '_vdom' : 'vdom'] = vdom
|
943
|
+
me[silent ? '_vdom' : 'vdom'] = vdom
|
944
944
|
}
|
945
945
|
}
|
946
946
|
|
@@ -971,11 +971,11 @@ class Component extends BaseComponent {
|
|
971
971
|
|
972
972
|
if (currentDay === 0 || currentDay === 6) {
|
973
973
|
columnCls.push('neo-weekend');
|
974
|
-
!showWeekends && (removeDom = true)
|
974
|
+
!showWeekends && (removeDom = true)
|
975
975
|
}
|
976
976
|
|
977
977
|
if (currentDate === today.day && date.getMonth() === today.month && date.getFullYear() === today.year) {
|
978
|
-
dateCls.push('neo-today')
|
978
|
+
dateCls.push('neo-today')
|
979
979
|
}
|
980
980
|
|
981
981
|
headerId = me.getColumnHeaderId(date);
|
@@ -987,7 +987,7 @@ class Component extends BaseComponent {
|
|
987
987
|
{cls: ['neo-header-row-item'], id: headerId, removeDom, cn: [
|
988
988
|
{cls: ['neo-day'], html: me.intlFormat_day.format(date), id: `${headerId}_day`},
|
989
989
|
{cls : dateCls, html: currentDate, id: `${headerId}_date`}
|
990
|
-
]})
|
990
|
+
]})
|
991
991
|
} else {
|
992
992
|
Object.assign(content.cn[i], {
|
993
993
|
cls : columnCls,
|
@@ -1001,10 +1001,10 @@ class Component extends BaseComponent {
|
|
1001
1001
|
Object.assign(header.cn[i].cn[1], {cls: dateCls, html: currentDate, id: `${headerId}_date`});
|
1002
1002
|
}
|
1003
1003
|
|
1004
|
-
date.setDate(date.getDate() + 1)
|
1004
|
+
date.setDate(date.getDate() + 1)
|
1005
1005
|
}
|
1006
1006
|
|
1007
|
-
me[silent ? '_vdom' : 'vdom'] = vdom
|
1007
|
+
me[silent ? '_vdom' : 'vdom'] = vdom
|
1008
1008
|
}
|
1009
1009
|
}
|
1010
1010
|
|
package/src/main/addon/Mwc.mjs
CHANGED
@@ -8,6 +8,10 @@ import Base from '../../core/Base.mjs';
|
|
8
8
|
* @material/mwc-button
|
9
9
|
* @material/mwc-textfield
|
10
10
|
*
|
11
|
+
* You also need to un-comment the related imports.
|
12
|
+
* Recommendation: Copy this file into your workspace (src/main/addon), adjust it there and add the custom addon
|
13
|
+
* into the neo-config.json of your app. E.g.: [..., "WS/Mwc"].
|
14
|
+
*
|
11
15
|
* @class Neo.main.addon.Mwc
|
12
16
|
* @extends Neo.core.Base
|
13
17
|
* @singleton
|
@@ -55,10 +59,10 @@ class Mwc extends Base {
|
|
55
59
|
import(
|
56
60
|
/* webpackIgnore: true */
|
57
61
|
'https://unpkg.com/@material/mwc-button@0.26.1/mwc-button.js?module'
|
58
|
-
|
62
|
+
);
|
59
63
|
} else {
|
60
64
|
// dist/development & dist/production
|
61
|
-
import('@material/mwc-button');
|
65
|
+
// import('@material/mwc-button'); // <= comment me in
|
62
66
|
}
|
63
67
|
}
|
64
68
|
|
@@ -70,10 +74,10 @@ class Mwc extends Base {
|
|
70
74
|
import(
|
71
75
|
/* webpackIgnore: true */
|
72
76
|
'https://unpkg.com/@material/mwc-textfield@0.26.1/mwc-textfield.js?module'
|
73
|
-
|
77
|
+
);
|
74
78
|
} else {
|
75
79
|
// dist/development & dist/production
|
76
|
-
import('@material/mwc-textfield');
|
80
|
+
// import('@material/mwc-textfield'); // <= comment me in
|
77
81
|
}
|
78
82
|
}
|
79
83
|
|