retold 4.0.1 → 4.0.3
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/.claude/settings.local.json +38 -1
- package/README.md +92 -2
- package/docs/README.md +7 -6
- package/docs/_sidebar.md +36 -21
- package/docs/_topbar.md +2 -2
- package/docs/architecture/comprehensions.md +282 -0
- package/docs/architecture/fluid-models.md +355 -0
- package/docs/architecture/module-architecture.md +234 -0
- package/docs/{modules.md → architecture/modules.md} +25 -22
- package/docs/cover.md +2 -2
- package/docs/css/docuserve.css +6 -6
- package/docs/examples/examples.md +71 -0
- package/docs/examples/todolist/todo-list-cli-client.md +178 -0
- package/docs/examples/todolist/todo-list-console-client.md +152 -0
- package/docs/examples/todolist/todo-list-model.md +114 -0
- package/docs/examples/todolist/todo-list-server.md +128 -0
- package/docs/examples/todolist/todo-list-web-client.md +177 -0
- package/docs/examples/todolist/todo-list.md +162 -0
- package/docs/getting-started.md +8 -7
- package/docs/index.html +4 -4
- package/docs/{meadow.md → modules/meadow.md} +4 -6
- package/docs/{orator.md → modules/orator.md} +1 -0
- package/docs/{pict.md → modules/pict.md} +30 -8
- package/docs/{utility.md → modules/utility.md} +0 -9
- package/docs/retold-catalog.json +1792 -231
- package/docs/retold-keyword-index.json +136439 -64616
- package/examples/todo-list/Dockerfile +45 -0
- package/examples/todo-list/README.md +394 -0
- package/examples/todo-list/cli-client/package-lock.json +418 -0
- package/examples/todo-list/cli-client/package.json +19 -0
- package/examples/todo-list/cli-client/source/TodoCLI-CLIProgram.js +30 -0
- package/examples/todo-list/cli-client/source/TodoCLI-Run.js +3 -0
- package/examples/todo-list/cli-client/source/commands/add/TodoCLI-Command-Add.js +74 -0
- package/examples/todo-list/cli-client/source/commands/complete/TodoCLI-Command-Complete.js +84 -0
- package/examples/todo-list/cli-client/source/commands/list/TodoCLI-Command-List.js +110 -0
- package/examples/todo-list/cli-client/source/commands/remove/TodoCLI-Command-Remove.js +49 -0
- package/examples/todo-list/cli-client/source/services/TodoCLI-Service-API.js +92 -0
- package/examples/todo-list/console-client/console-client.cjs +913 -0
- package/examples/todo-list/console-client/package-lock.json +426 -0
- package/examples/todo-list/console-client/package.json +19 -0
- package/examples/todo-list/console-client/views/PictView-TUI-Header.cjs +43 -0
- package/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs +58 -0
- package/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs +41 -0
- package/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs +104 -0
- package/examples/todo-list/docker-motd.sh +36 -0
- package/examples/todo-list/docker-run.sh +2 -0
- package/examples/todo-list/docker-shell.sh +2 -0
- package/examples/todo-list/model/MeadowSchema-Task.json +152 -0
- package/examples/todo-list/model/Task-Compiled.json +25 -0
- package/examples/todo-list/model/Task.mddl +15 -0
- package/examples/todo-list/model/data/seeded_todo_events.csv +1001 -0
- package/examples/todo-list/server/database-initialization-service.cjs +273 -0
- package/examples/todo-list/server/package-lock.json +6113 -0
- package/examples/todo-list/server/package.json +19 -0
- package/examples/todo-list/server/server.cjs +138 -0
- package/examples/todo-list/web-client/css/todolist-theme.css +235 -0
- package/examples/todo-list/web-client/generate-build-config.cjs +18 -0
- package/examples/todo-list/web-client/html/index.html +18 -0
- package/examples/todo-list/web-client/package-lock.json +12030 -0
- package/examples/todo-list/web-client/package.json +43 -0
- package/examples/todo-list/web-client/source/TodoList-Application-Config.json +12 -0
- package/examples/todo-list/web-client/source/TodoList-Application.cjs +383 -0
- package/examples/todo-list/web-client/source/providers/Provider-TaskData.cjs +243 -0
- package/examples/todo-list/web-client/source/providers/Router-Config.json +32 -0
- package/examples/todo-list/web-client/source/views/View-Layout.cjs +75 -0
- package/examples/todo-list/web-client/source/views/View-TaskForm.cjs +87 -0
- package/examples/todo-list/web-client/source/views/View-TaskList.cjs +127 -0
- package/examples/todo-list/web-client/source/views/calendar/View-MonthView.cjs +293 -0
- package/examples/todo-list/web-client/source/views/calendar/View-WeekView.cjs +149 -0
- package/examples/todo-list/web-client/source/views/calendar/View-YearView.cjs +226 -0
- package/modules/Include-Retold-Module-List.sh +2 -2
- package/package.json +5 -5
- package/docs/js/pict.min.js +0 -12
- package/docs/js/pict.min.js.map +0 -1
- package/docs/pict-docuserve.min.js +0 -58
- package/docs/pict-docuserve.min.js.map +0 -1
- /package/docs/{architecture.md → architecture/architecture.md} +0 -0
- /package/docs/{fable.md → modules/fable.md} +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
const _ViewConfiguration =
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'TodoList-WeekView',
|
|
6
|
+
DefaultRenderable: 'TodoList-WeekView-Content',
|
|
7
|
+
DefaultDestinationAddress: '#TodoList-Content',
|
|
8
|
+
AutoRender: false,
|
|
9
|
+
|
|
10
|
+
Templates:
|
|
11
|
+
[
|
|
12
|
+
{
|
|
13
|
+
Hash: 'TodoList-WeekView-Template',
|
|
14
|
+
Template: /*html*/`
|
|
15
|
+
<div class="tl-cal-header">
|
|
16
|
+
<h2>Week View</h2>
|
|
17
|
+
<div class="tl-cal-nav">
|
|
18
|
+
<button class="tl-btn tl-btn-default" onclick="{~P~}.PictApplication.calendarNavigate('week', -1)">← Prev</button>
|
|
19
|
+
<button class="tl-btn tl-btn-primary" onclick="{~P~}.PictApplication.calendarToday('week')">Today</button>
|
|
20
|
+
<button class="tl-btn tl-btn-default" onclick="{~P~}.PictApplication.calendarNavigate('week', 1)">Next →</button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<p class="tl-cal-label">{~D:AppData.TodoList.CalendarState.WeekLabel~}</p>
|
|
24
|
+
<table class="tl-cal-table">
|
|
25
|
+
<thead>
|
|
26
|
+
<tr>
|
|
27
|
+
<th>Day</th>
|
|
28
|
+
<th>Date</th>
|
|
29
|
+
<th>Completed</th>
|
|
30
|
+
<th>Open</th>
|
|
31
|
+
<th>Total</th>
|
|
32
|
+
</tr>
|
|
33
|
+
</thead>
|
|
34
|
+
<tbody>
|
|
35
|
+
{~TemplateSet:TodoList-WeekRow:AppData.TodoList.CalendarState.WeekRows~}
|
|
36
|
+
</tbody>
|
|
37
|
+
</table>
|
|
38
|
+
`
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
Hash: 'TodoList-WeekRow',
|
|
42
|
+
Template: /*html*/`
|
|
43
|
+
<tr class="{~D:Record.TodayClass~}">
|
|
44
|
+
<td>{~D:Record.DayName~}</td>
|
|
45
|
+
<td>{~D:Record.DateLabel~}</td>
|
|
46
|
+
<td><span class="tl-cal-badge {~D:Record.CompleteBadge~}">{~D:Record.Complete~}</span></td>
|
|
47
|
+
<td><span class="tl-cal-badge {~D:Record.OpenBadge~}">{~D:Record.Open~}</span></td>
|
|
48
|
+
<td><span class="tl-cal-badge {~D:Record.TotalBadge~}">{~D:Record.Total~}</span></td>
|
|
49
|
+
</tr>
|
|
50
|
+
`
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
|
|
54
|
+
Renderables:
|
|
55
|
+
[
|
|
56
|
+
{
|
|
57
|
+
RenderableHash: 'TodoList-WeekView-Content',
|
|
58
|
+
TemplateHash: 'TodoList-WeekView-Template',
|
|
59
|
+
DestinationAddress: '#TodoList-Content',
|
|
60
|
+
RenderMethod: 'replace'
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const _DayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
66
|
+
const _MonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
67
|
+
|
|
68
|
+
class TodoListWeekView extends libPictView
|
|
69
|
+
{
|
|
70
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
71
|
+
{
|
|
72
|
+
super(pFable, pOptions, pServiceHash);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
onBeforeRender()
|
|
76
|
+
{
|
|
77
|
+
let tmpCal = this.pict.AppData.TodoList.CalendarState;
|
|
78
|
+
let tmpAnchor = new Date(tmpCal.AnchorDate + 'T00:00:00');
|
|
79
|
+
|
|
80
|
+
// Find the Monday of the anchor's week
|
|
81
|
+
let tmpDayOfWeek = tmpAnchor.getDay();
|
|
82
|
+
let tmpMonday = new Date(tmpAnchor);
|
|
83
|
+
tmpMonday.setDate(tmpMonday.getDate() - ((tmpDayOfWeek + 6) % 7));
|
|
84
|
+
|
|
85
|
+
let tmpToday = new Date().toISOString().substring(0, 10);
|
|
86
|
+
let tmpAllTasks = this.pict.AppData.TodoList.AllTasks;
|
|
87
|
+
|
|
88
|
+
// Build a lookup: dateString -> { complete, open }
|
|
89
|
+
let tmpTaskMap = {};
|
|
90
|
+
for (let i = 0; i < tmpAllTasks.length; i++)
|
|
91
|
+
{
|
|
92
|
+
let tmpDate = (tmpAllTasks[i].DueDate || '').substring(0, 10);
|
|
93
|
+
if (!tmpDate)
|
|
94
|
+
{
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (!tmpTaskMap[tmpDate])
|
|
98
|
+
{
|
|
99
|
+
tmpTaskMap[tmpDate] = { complete: 0, open: 0 };
|
|
100
|
+
}
|
|
101
|
+
if (tmpAllTasks[i].Status === 'Complete')
|
|
102
|
+
{
|
|
103
|
+
tmpTaskMap[tmpDate].complete++;
|
|
104
|
+
}
|
|
105
|
+
else
|
|
106
|
+
{
|
|
107
|
+
tmpTaskMap[tmpDate].open++;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Build 7 row objects (Mon–Sun)
|
|
112
|
+
let tmpRows = [];
|
|
113
|
+
for (let d = 0; d < 7; d++)
|
|
114
|
+
{
|
|
115
|
+
let tmpDay = new Date(tmpMonday);
|
|
116
|
+
tmpDay.setDate(tmpMonday.getDate() + d);
|
|
117
|
+
let tmpDateStr = tmpDay.toISOString().substring(0, 10);
|
|
118
|
+
let tmpCounts = tmpTaskMap[tmpDateStr] || { complete: 0, open: 0 };
|
|
119
|
+
let tmpTotal = tmpCounts.complete + tmpCounts.open;
|
|
120
|
+
|
|
121
|
+
tmpRows.push(
|
|
122
|
+
{
|
|
123
|
+
DayName: _DayNames[tmpDay.getDay()],
|
|
124
|
+
DateLabel: _MonthNames[tmpDay.getMonth()] + ' ' + tmpDay.getDate() + ', ' + tmpDay.getFullYear(),
|
|
125
|
+
Complete: tmpCounts.complete,
|
|
126
|
+
Open: tmpCounts.open,
|
|
127
|
+
Total: tmpTotal,
|
|
128
|
+
CompleteBadge: tmpCounts.complete > 0 ? 'tl-cal-badge-complete' : 'tl-cal-badge-zero',
|
|
129
|
+
OpenBadge: tmpCounts.open > 0 ? 'tl-cal-badge-open' : 'tl-cal-badge-zero',
|
|
130
|
+
TotalBadge: tmpTotal > 0 ? 'tl-cal-badge-complete' : 'tl-cal-badge-zero',
|
|
131
|
+
TodayClass: tmpDateStr === tmpToday ? 'tl-cal-today' : ''
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
tmpCal.WeekRows = tmpRows;
|
|
136
|
+
|
|
137
|
+
// Build the header label
|
|
138
|
+
let tmpSunday = new Date(tmpMonday);
|
|
139
|
+
tmpSunday.setDate(tmpMonday.getDate() + 6);
|
|
140
|
+
tmpCal.WeekLabel = _MonthNames[tmpMonday.getMonth()] + ' ' + tmpMonday.getDate()
|
|
141
|
+
+ ' – ' + _MonthNames[tmpSunday.getMonth()] + ' ' + tmpSunday.getDate()
|
|
142
|
+
+ ', ' + tmpSunday.getFullYear();
|
|
143
|
+
|
|
144
|
+
return super.onBeforeRender();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
module.exports = TodoListWeekView;
|
|
149
|
+
module.exports.default_configuration = _ViewConfiguration;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
const libPictView = require('pict-view');
|
|
2
|
+
|
|
3
|
+
const _ViewConfiguration =
|
|
4
|
+
{
|
|
5
|
+
ViewIdentifier: 'TodoList-YearView',
|
|
6
|
+
DefaultRenderable: 'TodoList-YearView-Content',
|
|
7
|
+
DefaultDestinationAddress: '#TodoList-Content',
|
|
8
|
+
AutoRender: false,
|
|
9
|
+
|
|
10
|
+
CSS: /*css*/`
|
|
11
|
+
.tl-year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; margin-bottom: 1.25em; }
|
|
12
|
+
.tl-year-month-card { background: #fff; border-radius: 6px; padding: 1em; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
|
|
13
|
+
.tl-year-month-card-current { border: 2px solid #2E7D74; }
|
|
14
|
+
.tl-year-month-name { font-weight: 700; font-size: 1em; margin-bottom: 0.5em; }
|
|
15
|
+
.tl-year-month-stats { display: flex; gap: 0.5em; flex-wrap: wrap; }
|
|
16
|
+
.tl-year-month-stat { font-size: 0.85em; color: #8A7F72; }
|
|
17
|
+
.tl-year-month-stat strong { font-weight: 700; }
|
|
18
|
+
`,
|
|
19
|
+
|
|
20
|
+
Templates:
|
|
21
|
+
[
|
|
22
|
+
{
|
|
23
|
+
Hash: 'TodoList-YearView-Template',
|
|
24
|
+
Template: /*html*/`
|
|
25
|
+
<div class="tl-cal-header">
|
|
26
|
+
<h2>Year View</h2>
|
|
27
|
+
<div class="tl-cal-nav">
|
|
28
|
+
<button class="tl-btn tl-btn-default" onclick="{~P~}.PictApplication.calendarNavigate('year', -1)">← Prev</button>
|
|
29
|
+
<button class="tl-btn tl-btn-primary" onclick="{~P~}.PictApplication.calendarToday('year')">Today</button>
|
|
30
|
+
<button class="tl-btn tl-btn-default" onclick="{~P~}.PictApplication.calendarNavigate('year', 1)">Next →</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<p class="tl-cal-label">{~D:AppData.TodoList.CalendarState.YearLabel~}</p>
|
|
34
|
+
<div id="TodoList-YearGrid"></div>
|
|
35
|
+
<table class="tl-cal-table">
|
|
36
|
+
<thead>
|
|
37
|
+
<tr>
|
|
38
|
+
<th>Month</th>
|
|
39
|
+
<th>Completed</th>
|
|
40
|
+
<th>Open</th>
|
|
41
|
+
<th>Total</th>
|
|
42
|
+
</tr>
|
|
43
|
+
</thead>
|
|
44
|
+
<tbody>
|
|
45
|
+
{~TemplateSet:TodoList-YearRow:AppData.TodoList.CalendarState.YearRows~}
|
|
46
|
+
</tbody>
|
|
47
|
+
</table>
|
|
48
|
+
`
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
Hash: 'TodoList-YearRow',
|
|
52
|
+
Template: /*html*/`
|
|
53
|
+
<tr class="{~D:Record.TotalClass~}">
|
|
54
|
+
<td>{~D:Record.MonthLabel~}</td>
|
|
55
|
+
<td><span class="tl-cal-badge {~D:Record.CompleteBadge~}">{~D:Record.Complete~}</span></td>
|
|
56
|
+
<td><span class="tl-cal-badge {~D:Record.OpenBadge~}">{~D:Record.Open~}</span></td>
|
|
57
|
+
<td><span class="tl-cal-badge {~D:Record.TotalBadge~}">{~D:Record.Total~}</span></td>
|
|
58
|
+
</tr>
|
|
59
|
+
`
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
|
|
63
|
+
Renderables:
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
RenderableHash: 'TodoList-YearView-Content',
|
|
67
|
+
TemplateHash: 'TodoList-YearView-Template',
|
|
68
|
+
DestinationAddress: '#TodoList-Content',
|
|
69
|
+
RenderMethod: 'replace'
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const _MonthNamesFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
75
|
+
|
|
76
|
+
class TodoListYearView extends libPictView
|
|
77
|
+
{
|
|
78
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
79
|
+
{
|
|
80
|
+
super(pFable, pOptions, pServiceHash);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
onBeforeRender()
|
|
84
|
+
{
|
|
85
|
+
let tmpCal = this.pict.AppData.TodoList.CalendarState;
|
|
86
|
+
let tmpAnchor = new Date(tmpCal.AnchorDate + 'T00:00:00');
|
|
87
|
+
let tmpYear = tmpAnchor.getFullYear();
|
|
88
|
+
let tmpCurrentMonth = new Date().getMonth();
|
|
89
|
+
let tmpCurrentYear = new Date().getFullYear();
|
|
90
|
+
|
|
91
|
+
tmpCal.YearLabel = String(tmpYear);
|
|
92
|
+
|
|
93
|
+
// Build month->counts map
|
|
94
|
+
let tmpAllTasks = this.pict.AppData.TodoList.AllTasks;
|
|
95
|
+
let tmpMonthMap = {};
|
|
96
|
+
for (let i = 0; i < tmpAllTasks.length; i++)
|
|
97
|
+
{
|
|
98
|
+
let tmpDate = (tmpAllTasks[i].DueDate || '').substring(0, 10);
|
|
99
|
+
if (!tmpDate)
|
|
100
|
+
{
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
// Only count tasks in this year
|
|
104
|
+
if (tmpDate.substring(0, 4) !== String(tmpYear))
|
|
105
|
+
{
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
let tmpMonthKey = parseInt(tmpDate.substring(5, 7), 10) - 1;
|
|
109
|
+
if (!tmpMonthMap[tmpMonthKey])
|
|
110
|
+
{
|
|
111
|
+
tmpMonthMap[tmpMonthKey] = { complete: 0, open: 0 };
|
|
112
|
+
}
|
|
113
|
+
if (tmpAllTasks[i].Status === 'Complete')
|
|
114
|
+
{
|
|
115
|
+
tmpMonthMap[tmpMonthKey].complete++;
|
|
116
|
+
}
|
|
117
|
+
else
|
|
118
|
+
{
|
|
119
|
+
tmpMonthMap[tmpMonthKey].open++;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Store for the grid
|
|
124
|
+
this._monthMap = tmpMonthMap;
|
|
125
|
+
this._gridYear = tmpYear;
|
|
126
|
+
this._currentMonth = tmpCurrentMonth;
|
|
127
|
+
this._isCurrentYear = tmpYear === tmpCurrentYear;
|
|
128
|
+
|
|
129
|
+
// Build 12 month rows + total
|
|
130
|
+
let tmpRows = [];
|
|
131
|
+
let tmpTotalComplete = 0;
|
|
132
|
+
let tmpTotalOpen = 0;
|
|
133
|
+
|
|
134
|
+
for (let m = 0; m < 12; m++)
|
|
135
|
+
{
|
|
136
|
+
let tmpCounts = tmpMonthMap[m] || { complete: 0, open: 0 };
|
|
137
|
+
let tmpTotal = tmpCounts.complete + tmpCounts.open;
|
|
138
|
+
|
|
139
|
+
tmpTotalComplete += tmpCounts.complete;
|
|
140
|
+
tmpTotalOpen += tmpCounts.open;
|
|
141
|
+
|
|
142
|
+
tmpRows.push(
|
|
143
|
+
{
|
|
144
|
+
MonthLabel: _MonthNamesFull[m],
|
|
145
|
+
Complete: tmpCounts.complete,
|
|
146
|
+
Open: tmpCounts.open,
|
|
147
|
+
Total: tmpTotal,
|
|
148
|
+
CompleteBadge: tmpCounts.complete > 0 ? 'tl-cal-badge-complete' : 'tl-cal-badge-zero',
|
|
149
|
+
OpenBadge: tmpCounts.open > 0 ? 'tl-cal-badge-open' : 'tl-cal-badge-zero',
|
|
150
|
+
TotalBadge: tmpTotal > 0 ? 'tl-cal-badge-complete' : 'tl-cal-badge-zero',
|
|
151
|
+
TotalClass: (this._isCurrentYear && m === tmpCurrentMonth) ? 'tl-cal-today' : ''
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
let tmpGrandTotal = tmpTotalComplete + tmpTotalOpen;
|
|
156
|
+
tmpRows.push(
|
|
157
|
+
{
|
|
158
|
+
MonthLabel: 'Total',
|
|
159
|
+
Complete: tmpTotalComplete,
|
|
160
|
+
Open: tmpTotalOpen,
|
|
161
|
+
Total: tmpGrandTotal,
|
|
162
|
+
CompleteBadge: tmpTotalComplete > 0 ? 'tl-cal-badge-complete' : 'tl-cal-badge-zero',
|
|
163
|
+
OpenBadge: tmpTotalOpen > 0 ? 'tl-cal-badge-open' : 'tl-cal-badge-zero',
|
|
164
|
+
TotalBadge: tmpGrandTotal > 0 ? 'tl-cal-badge-complete' : 'tl-cal-badge-zero',
|
|
165
|
+
TotalClass: 'tl-cal-total'
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
tmpCal.YearRows = tmpRows;
|
|
169
|
+
|
|
170
|
+
return super.onBeforeRender();
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Render the 4×3 month card grid after the template is in the DOM.
|
|
175
|
+
*/
|
|
176
|
+
onAfterRender()
|
|
177
|
+
{
|
|
178
|
+
let tmpContainer = document.getElementById('TodoList-YearGrid');
|
|
179
|
+
if (!tmpContainer)
|
|
180
|
+
{
|
|
181
|
+
return super.onAfterRender();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
let tmpMonthMap = this._monthMap;
|
|
185
|
+
let tmpHTML = '<div class="tl-year-grid">';
|
|
186
|
+
|
|
187
|
+
for (let m = 0; m < 12; m++)
|
|
188
|
+
{
|
|
189
|
+
let tmpCounts = tmpMonthMap[m] || { complete: 0, open: 0 };
|
|
190
|
+
let tmpTotal = tmpCounts.complete + tmpCounts.open;
|
|
191
|
+
let tmpIsCurrent = this._isCurrentYear && m === this._currentMonth;
|
|
192
|
+
|
|
193
|
+
let tmpCardClass = 'tl-year-month-card';
|
|
194
|
+
if (tmpIsCurrent)
|
|
195
|
+
{
|
|
196
|
+
tmpCardClass += ' tl-year-month-card-current';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
tmpHTML += '<div class="' + tmpCardClass + '">';
|
|
200
|
+
tmpHTML += '<div class="tl-year-month-name">' + _MonthNamesFull[m] + '</div>';
|
|
201
|
+
tmpHTML += '<div class="tl-year-month-stats">';
|
|
202
|
+
|
|
203
|
+
if (tmpTotal > 0)
|
|
204
|
+
{
|
|
205
|
+
tmpHTML += '<span class="tl-year-month-stat"><strong>' + tmpTotal + '</strong> tasks</span>';
|
|
206
|
+
tmpHTML += '<span class="tl-year-month-stat">(<span class="tl-cal-badge tl-cal-badge-complete">' + tmpCounts.complete + '</span> done';
|
|
207
|
+
tmpHTML += ', <span class="tl-cal-badge tl-cal-badge-open">' + tmpCounts.open + '</span> open)</span>';
|
|
208
|
+
}
|
|
209
|
+
else
|
|
210
|
+
{
|
|
211
|
+
tmpHTML += '<span class="tl-year-month-stat" style="color:#B5ADA2;">No tasks</span>';
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
tmpHTML += '</div>';
|
|
215
|
+
tmpHTML += '</div>';
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
tmpHTML += '</div>';
|
|
219
|
+
tmpContainer.innerHTML = tmpHTML;
|
|
220
|
+
|
|
221
|
+
return super.onAfterRender();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
module.exports = TodoListYearView;
|
|
226
|
+
module.exports.default_configuration = _ViewConfiguration;
|
|
@@ -4,12 +4,12 @@ echo "### Building list of modules..."
|
|
|
4
4
|
|
|
5
5
|
repositoriesFable=("fable" "fable-log" "fable-settings" "fable-uuid" "fable-serviceproviderbase" "fable-log-logger-bunyan")
|
|
6
6
|
|
|
7
|
-
repositoriesMeadow=("stricture" "foxhound" "bibliograph" "meadow" "parime" "meadow-endpoints" "meadow-connection-mysql" "meadow-connection-mssql" "meadow-connection-sqlite" "retold-data-service" "retold-harness" "meadow-integration"
|
|
7
|
+
repositoriesMeadow=("stricture" "foxhound" "bibliograph" "meadow" "parime" "meadow-endpoints" "meadow-connection-mysql" "meadow-connection-mssql" "meadow-connection-sqlite" "retold-data-service" "retold-harness" "meadow-integration")
|
|
8
8
|
|
|
9
9
|
repositoriesOrator=("orator" "orator-serviceserver-restify" "orator-static-server" "orator-http-proxy" "tidings" "orator-endpoint" "orator-conversion")
|
|
10
10
|
|
|
11
11
|
repositoriesPict=("pict" "pict-template" "pict-view" "pict-provider" "pict-application" "pict-panel" "pict-nonlinearconfig" "pict-section-flow" "pict-docuserve" "cryptbrau" "informary" "pict-service-commandlineutility" "pict-section-recordset" "pict-section-content" "pict-section-form" "pict-section-tuigrid" "pict-router" "pict-serviceproviderbase" "pict-terminalui")
|
|
12
12
|
|
|
13
|
-
repositoriesUtility=("indoctrinate" "manyfest" "
|
|
13
|
+
repositoriesUtility=("indoctrinate" "manyfest" "quackage" "ultravisor")
|
|
14
14
|
|
|
15
15
|
echo "### ... Module lists built!"
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "retold",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "The pict and fable node ecosystem.",
|
|
5
5
|
"main": "source/Retold.cjs",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "node source/Retold.cjs",
|
|
8
8
|
"coverage": "./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec",
|
|
9
9
|
"test": "./node_modules/.bin/mocha -u tdd -R spec",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
"build-docs": "npx quack prepare-docs ./docs -d ./modules",
|
|
11
|
+
"serve-docs": "npx pict-docuserve serve ./docs",
|
|
12
12
|
"docker-dev-build": "docker build ./ -f Dockerfile_LUXURYCode -t retold-image:local",
|
|
13
13
|
"docker-dev-run": "docker run -it -d --name retold-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/retold\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" retold-image:local",
|
|
14
14
|
"docker-dev-shell": "docker exec -it retold-dev /bin/bash"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"homepage": "https://github.com/stevenvelozo/retold",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"indoctrinate": "^1.0.4",
|
|
29
|
-
"pict-docuserve": "^0.0.
|
|
30
|
-
"quackage": "^1.0.
|
|
29
|
+
"pict-docuserve": "^0.0.15",
|
|
30
|
+
"quackage": "^1.0.48"
|
|
31
31
|
}
|
|
32
32
|
}
|