retold 1.0.6 → 4.0.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.
Files changed (119) hide show
  1. package/.claude/settings.local.json +84 -0
  2. package/CLAUDE.md +52 -0
  3. package/docs/.nojekyll +0 -0
  4. package/docs/README.md +162 -0
  5. package/docs/_sidebar.md +78 -0
  6. package/docs/_topbar.md +6 -0
  7. package/docs/architecture/architecture.md +312 -0
  8. package/docs/architecture/module-architecture.md +234 -0
  9. package/docs/architecture/modules.md +99 -0
  10. package/docs/cover.md +15 -0
  11. package/docs/css/docuserve.css +73 -0
  12. package/docs/examples/examples.md +71 -0
  13. package/docs/examples/todolist/todo-list-cli-client.md +178 -0
  14. package/docs/examples/todolist/todo-list-console-client.md +152 -0
  15. package/docs/examples/todolist/todo-list-model.md +114 -0
  16. package/docs/examples/todolist/todo-list-server.md +128 -0
  17. package/docs/examples/todolist/todo-list-web-client.md +177 -0
  18. package/docs/examples/todolist/todo-list.md +162 -0
  19. package/docs/getting-started.md +273 -0
  20. package/docs/index.html +39 -0
  21. package/docs/modules/fable.md +198 -0
  22. package/docs/modules/meadow.md +209 -0
  23. package/docs/modules/orator.md +165 -0
  24. package/docs/modules/pict.md +235 -0
  25. package/docs/modules/utility.md +54 -0
  26. package/docs/retold-building-documentation.md +33 -0
  27. package/docs/retold-catalog.json +1405 -0
  28. package/docs/retold-keyword-index.json +203389 -0
  29. package/examples/quickstart/README.md +47 -0
  30. package/examples/quickstart/layer1/README.md +21 -0
  31. package/examples/quickstart/layer1/index.js +49 -0
  32. package/examples/quickstart/layer1/package-lock.json +344 -0
  33. package/examples/quickstart/layer1/package.json +12 -0
  34. package/examples/quickstart/layer2/README.md +34 -0
  35. package/examples/quickstart/layer2/index.js +251 -0
  36. package/examples/quickstart/layer2/package-lock.json +4468 -0
  37. package/examples/quickstart/layer2/package.json +17 -0
  38. package/examples/quickstart/layer2/setup-database.js +61 -0
  39. package/examples/quickstart/layer3/README.md +39 -0
  40. package/examples/quickstart/layer3/index.js +91 -0
  41. package/examples/quickstart/layer3/package-lock.json +1936 -0
  42. package/examples/quickstart/layer3/package.json +14 -0
  43. package/examples/quickstart/layer4/README.md +47 -0
  44. package/examples/quickstart/layer4/generate-build-config.js +18 -0
  45. package/examples/quickstart/layer4/html/index.html +17 -0
  46. package/examples/quickstart/layer4/package-lock.json +13206 -0
  47. package/examples/quickstart/layer4/package.json +38 -0
  48. package/examples/quickstart/layer4/server.js +28 -0
  49. package/examples/quickstart/layer4/source/BookStore-Application-Config.json +15 -0
  50. package/examples/quickstart/layer4/source/BookStore-Application.js +54 -0
  51. package/examples/quickstart/layer4/source/providers/Router-Config.json +18 -0
  52. package/examples/quickstart/layer4/source/views/View-About.js +38 -0
  53. package/examples/quickstart/layer4/source/views/View-Home.js +50 -0
  54. package/examples/quickstart/layer4/source/views/View-Layout.js +60 -0
  55. package/examples/quickstart/layer5/README.md +26 -0
  56. package/examples/quickstart/layer5/index.js +121 -0
  57. package/examples/quickstart/layer5/package-lock.json +345 -0
  58. package/examples/quickstart/layer5/package.json +13 -0
  59. package/examples/todo-list/Dockerfile +45 -0
  60. package/examples/todo-list/README.md +394 -0
  61. package/examples/todo-list/cli-client/package-lock.json +418 -0
  62. package/examples/todo-list/cli-client/package.json +19 -0
  63. package/examples/todo-list/cli-client/source/TodoCLI-CLIProgram.js +30 -0
  64. package/examples/todo-list/cli-client/source/TodoCLI-Run.js +3 -0
  65. package/examples/todo-list/cli-client/source/commands/add/TodoCLI-Command-Add.js +74 -0
  66. package/examples/todo-list/cli-client/source/commands/complete/TodoCLI-Command-Complete.js +84 -0
  67. package/examples/todo-list/cli-client/source/commands/list/TodoCLI-Command-List.js +110 -0
  68. package/examples/todo-list/cli-client/source/commands/remove/TodoCLI-Command-Remove.js +49 -0
  69. package/examples/todo-list/cli-client/source/services/TodoCLI-Service-API.js +92 -0
  70. package/examples/todo-list/console-client/console-client.cjs +913 -0
  71. package/examples/todo-list/console-client/package-lock.json +426 -0
  72. package/examples/todo-list/console-client/package.json +19 -0
  73. package/examples/todo-list/console-client/views/PictView-TUI-Header.cjs +43 -0
  74. package/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs +58 -0
  75. package/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs +41 -0
  76. package/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs +104 -0
  77. package/examples/todo-list/docker-motd.sh +36 -0
  78. package/examples/todo-list/docker-run.sh +2 -0
  79. package/examples/todo-list/docker-shell.sh +2 -0
  80. package/examples/todo-list/model/MeadowSchema-Task.json +152 -0
  81. package/examples/todo-list/model/Task-Compiled.json +25 -0
  82. package/examples/todo-list/model/Task.mddl +15 -0
  83. package/examples/todo-list/model/data/seeded_todo_events.csv +1001 -0
  84. package/examples/todo-list/server/database-initialization-service.cjs +273 -0
  85. package/examples/todo-list/server/package-lock.json +6113 -0
  86. package/examples/todo-list/server/package.json +19 -0
  87. package/examples/todo-list/server/server.cjs +138 -0
  88. package/examples/todo-list/web-client/css/todolist-theme.css +235 -0
  89. package/examples/todo-list/web-client/generate-build-config.cjs +18 -0
  90. package/examples/todo-list/web-client/html/index.html +18 -0
  91. package/examples/todo-list/web-client/package-lock.json +12030 -0
  92. package/examples/todo-list/web-client/package.json +43 -0
  93. package/examples/todo-list/web-client/source/TodoList-Application-Config.json +12 -0
  94. package/examples/todo-list/web-client/source/TodoList-Application.cjs +383 -0
  95. package/examples/todo-list/web-client/source/providers/Provider-TaskData.cjs +243 -0
  96. package/examples/todo-list/web-client/source/providers/Router-Config.json +32 -0
  97. package/examples/todo-list/web-client/source/views/View-Layout.cjs +75 -0
  98. package/examples/todo-list/web-client/source/views/View-TaskForm.cjs +87 -0
  99. package/examples/todo-list/web-client/source/views/View-TaskList.cjs +127 -0
  100. package/examples/todo-list/web-client/source/views/calendar/View-MonthView.cjs +293 -0
  101. package/examples/todo-list/web-client/source/views/calendar/View-WeekView.cjs +149 -0
  102. package/examples/todo-list/web-client/source/views/calendar/View-YearView.cjs +226 -0
  103. package/modules/.claude/settings.local.json +52 -0
  104. package/modules/CLAUDE.md +60 -0
  105. package/modules/Checkout.sh +42 -0
  106. package/modules/Include-Retold-Module-List.sh +15 -0
  107. package/modules/Retold-Modules.md +24 -0
  108. package/modules/Status.sh +59 -0
  109. package/modules/Update.sh +45 -0
  110. package/modules/fable/Fable.md +2 -0
  111. package/modules/meadow/Meadow.md +1 -0
  112. package/modules/orator/Orator.md +1 -0
  113. package/modules/pict/Pict.md +1 -0
  114. package/package.json +30 -35
  115. package/source/Retold.cjs +2 -0
  116. package/test/Retold_tests.js +23 -41
  117. package/.travis.yml +0 -13
  118. package/source/Retold-Meadow-Macros.js +0 -269
  119. package/source/Retold.js +0 -48
@@ -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)">&larr; 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 &rarr;</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)">&larr; 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 &rarr;</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;
@@ -0,0 +1,52 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(xargs:*)",
5
+ "Bash(tree:*)",
6
+ "Bash(npm install:*)",
7
+ "Bash(npm view:*)",
8
+ "Bash(npm run build:*)",
9
+ "Bash(node -e:*)",
10
+ "Bash(curl:*)",
11
+ "Bash(find:*)",
12
+ "Bash(npx quack build:*)",
13
+ "Bash(npx quack copy:*)",
14
+ "Bash(npx quackage build)",
15
+ "Bash(npx quackage deploy:*)",
16
+ "Bash(ls:*)",
17
+ "Bash(lsof:*)",
18
+ "Bash(wc:*)",
19
+ "Bash(grep:*)",
20
+ "Bash(done)",
21
+ "Bash(npm test:*)",
22
+ "Bash(python3:*)",
23
+ "Bash(npx mocha:*)",
24
+ "Bash(git -C /Users/stevenvelozo/Code/retold remote:*)",
25
+ "Bash(git -C /Users/stevenvelozo/Code/retold config:*)",
26
+ "Bash(node:*)",
27
+ "Bash(chmod:*)",
28
+ "Bash(./scripts/mysql-test-db.sh:*)",
29
+ "Bash(npm run test-mysql:*)",
30
+ "Bash(npm run test-mysql-all:*)",
31
+ "Bash(npm run docker-mysql-status:*)",
32
+ "Bash(npm run:*)",
33
+ "Bash(./scripts/mssql-test-db.sh:*)",
34
+ "Bash(cat:*)",
35
+ "Bash(bash:*)",
36
+ "Bash(tr:*)",
37
+ "Bash(while read f)",
38
+ "Bash(do if [ ! -f \"/Users/stevenvelozo/Code/retold/docs/$f\" ])",
39
+ "Bash(then echo \"MISSING: $f\")",
40
+ "Bash(fi)",
41
+ "Bash(echo:*)",
42
+ "Bash(for app in todo-app contacts-app sports-stats-api)",
43
+ "Bash(do echo \"\")",
44
+ "Bash(cmp:*)",
45
+ "Bash(git rm:*)",
46
+ "Bash(xxd:*)",
47
+ "Bash(for f in *.cjs)",
48
+ "Bash(do sed -i '' \"s|require\\(''./Ultravisor-Task-Base.cjs''\\)|require\\(''../Ultravisor-Task-Base.cjs''\\)|g\" \"$f\")",
49
+ "Bash(npx ultravisor:*)"
50
+ ]
51
+ }
52
+ }
@@ -0,0 +1,60 @@
1
+ # Retold Modules
2
+
3
+ This directory contains all Retold module groups. Each subfolder holds individual git repos.
4
+
5
+ ## Module Management
6
+
7
+ Shell scripts manage all modules collectively:
8
+
9
+ - `Checkout.sh` — Clone all module repos from GitHub
10
+ - `Status.sh` — Show git status across all modules
11
+ - `Update.sh` — Pull with rebase across all modules
12
+ - `Include-Retold-Module-List.sh` — Central registry defining module arrays per group (sourced by the scripts above)
13
+ - `Retold-Modules.md` — Human-readable module list with hosted doc links
14
+
15
+ All modules are hosted at `github.com/stevenvelozo/<module-name>`.
16
+
17
+ ## Module Groups
18
+
19
+ | Group | Folder | Count | Purpose |
20
+ |-------|--------|-------|---------|
21
+ | Fable | `fable/` | 6 | Core ecosystem, DI, config, logging |
22
+ | Meadow | `meadow/` | 13 | Data access, ORM, query DSL, schema |
23
+ | Orator | `orator/` | 6 | API server, Restify, proxy, WebSocket |
24
+ | Pict | `pict/` | 15 | MVC, views, templates, forms, TUI |
25
+ | Utility | `utility/` | 10+ | Build tools, manifests, docs |
26
+
27
+ ## Working in a Module
28
+
29
+ Each module has its own `package.json`, tests, and README.
30
+
31
+ **Testing:**
32
+ ```bash
33
+ npm test # Mocha TDD: npx mocha -u tdd -R spec
34
+ npm run coverage # nyc coverage report
35
+ ```
36
+
37
+ **Building:**
38
+ ```bash
39
+ npx quack build # Most modules use Quackage
40
+ ```
41
+
42
+ Some modules (e.g., Pict, Fable) also use Gulp + Browserify for browser bundles.
43
+
44
+ ## Code Style
45
+
46
+ - Tabs for indentation, never spaces
47
+ - Plain JavaScript only — no TypeScript
48
+ - Opening braces on new lines (Allman style)
49
+ - Variable naming:
50
+ - `pVariable` — function parameters
51
+ - `tmpVariable` — scoped/temporary variables
52
+ - `VARIABLE` — globals and constants
53
+ - `libSomeLibrary` — imported/required libraries
54
+ - Match existing patterns in whichever module you are editing
55
+
56
+ ## Adding a New Module
57
+
58
+ 1. Add the repo name to the appropriate array in `Include-Retold-Module-List.sh`
59
+ 2. Update `Retold-Modules.md`
60
+ 3. The module should follow the same structure: `package.json`, `source/`, `test/`, Mocha TDD tests
@@ -0,0 +1,42 @@
1
+ #!/bin/bash
2
+ echo "### Checking out Retold modules into: [$(pwd)/..."
3
+
4
+ . ${BASH_SOURCE%/*}/Include-Retold-Module-List.sh
5
+
6
+ #
7
+ # This function attempts to checkout a repository from github relative to the current script folder
8
+ check_out_repository()
9
+ {
10
+ # echo "###--> attempting to check out the repository for $2 in $1"
11
+ CWD=$(pwd)
12
+ if [ -d "$CWD/$1/$2" ]
13
+ then
14
+ echo " > A $2 source directory already exists in $1.... skipping checkout."
15
+ elif [ -f "$CWD/$1/$2" ]; then
16
+ echo " > A $2 file already exists in $1... skipping checkout."
17
+ else
18
+ git clone https://github.com/stevenvelozo/$2 ./$1/$2
19
+ fi
20
+ }
21
+
22
+ process_repository_set()
23
+ {
24
+ # Save first argument in a variable
25
+ local repositorySetName="$1"
26
+ # Shift all arguments to the left (original $1 gets lost)
27
+ shift
28
+ # Collapse all remaining arguments into an array
29
+ local repositorySetRepositories=("$@") # Rebuild the array with rest of arguments
30
+ # Enumerate all repository addresses and check them out
31
+ for repositoryAddress in ${repositorySetRepositories[@]}; do
32
+ echo ""
33
+ echo "#####[ $repositorySetName -> $repositoryAddress ]#####"
34
+ check_out_repository $repositorySetName $repositoryAddress
35
+ done
36
+ }
37
+
38
+ process_repository_set "fable" "${repositoriesFable[@]}"
39
+ process_repository_set "meadow" "${repositoriesMeadow[@]}"
40
+ process_repository_set "orator" "${repositoriesOrator[@]}"
41
+ process_repository_set "pict" "${repositoriesPict[@]}"
42
+ process_repository_set "utility" "${repositoriesUtility[@]}"
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+
3
+ echo "### Building list of modules..."
4
+
5
+ repositoriesFable=("fable" "fable-log" "fable-settings" "fable-uuid" "fable-serviceproviderbase" "fable-log-logger-bunyan")
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")
8
+
9
+ repositoriesOrator=("orator" "orator-serviceserver-restify" "orator-static-server" "orator-http-proxy" "tidings" "orator-endpoint" "orator-conversion")
10
+
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
+
13
+ repositoriesUtility=("indoctrinate" "manyfest" "quackage" "ultravisor")
14
+
15
+ echo "### ... Module lists built!"
@@ -0,0 +1,24 @@
1
+ # Retold
2
+
3
+ Each of these folders contain the basic modules for the retold package sets.
4
+
5
+ ## Module Documentation
6
+
7
+ The following modules have documentation sites hosted on GitHub Pages:
8
+
9
+ ### Fable
10
+
11
+ - [fable-uuid](https://stevenvelozo.github.io/fable-uuid/) - A simple, flexible UUID generator for Node.js and browsers
12
+
13
+ ### Pict
14
+
15
+ - [pict](https://stevenvelozo.github.io/pict/) - A flexible MVC framework for building applications with text-based UI
16
+ - [pict-view](https://stevenvelozo.github.io/pict-view/) - A flexible View base class for the Pict application framework
17
+
18
+ ## Cleaning the DS_Store Folders
19
+
20
+ If you are using some variant of MacOS, and hate these folders, run this as a salve.
21
+
22
+ ```
23
+ find . -name '.DS_Store' -type f -delete
24
+ ```
@@ -0,0 +1,59 @@
1
+ #!/bin/bash
2
+ echo "Checking status of Retold modules in: [$(pwd)/..."
3
+
4
+ . ${BASH_SOURCE%/*}/Include-Retold-Module-List.sh
5
+
6
+ TOTAL_REPOS=0
7
+ CHANGED_REPOS=0
8
+ MISSING_REPOS=0
9
+
10
+ #
11
+ # This function checks the status of a repository, only showing output if there are changes
12
+ status_repository()
13
+ {
14
+ CWD=$(pwd)
15
+ TOTAL_REPOS=$((TOTAL_REPOS + 1))
16
+ if [ -d "$CWD/$1/$2" ]
17
+ then
18
+ cd "$CWD/$1/$2"
19
+ # Check if there are any changes (staged, unstaged, or untracked)
20
+ if [ -n "$(git status --porcelain)" ]
21
+ then
22
+ CHANGED_REPOS=$((CHANGED_REPOS + 1))
23
+ echo ""
24
+ echo "#####[ $1 -> $2 ]#####"
25
+ git status
26
+ fi
27
+ cd "$CWD"
28
+ else
29
+ MISSING_REPOS=$((MISSING_REPOS + 1))
30
+ fi
31
+ }
32
+
33
+ process_repository_set()
34
+ {
35
+ # Save first argument in a variable
36
+ local repositorySetName="$1"
37
+ # Shift all arguments to the left (original $1 gets lost)
38
+ shift
39
+ # Collapse all remaining arguments into an array
40
+ local repositorySetRepositories=("$@") # Rebuild the array with rest of arguments
41
+ # Enumerate all repository addresses and check them out
42
+ for repositoryAddress in ${repositorySetRepositories[@]}; do
43
+ status_repository $repositorySetName $repositoryAddress
44
+ done
45
+ }
46
+
47
+ process_repository_set "fable" "${repositoriesFable[@]}"
48
+ process_repository_set "meadow" "${repositoriesMeadow[@]}"
49
+ process_repository_set "orator" "${repositoriesOrator[@]}"
50
+ process_repository_set "pict" "${repositoriesPict[@]}"
51
+ process_repository_set "utility" "${repositoriesUtility[@]}"
52
+
53
+ echo ""
54
+ echo "===== Summary ====="
55
+ echo "$TOTAL_REPOS modules checked, $CHANGED_REPOS with changes, $((TOTAL_REPOS - CHANGED_REPOS - MISSING_REPOS)) clean"
56
+ if [ $MISSING_REPOS -gt 0 ]
57
+ then
58
+ echo "$MISSING_REPOS modules not checked out (run Checkout.sh)"
59
+ fi
@@ -0,0 +1,45 @@
1
+ #!/bin/bash
2
+ echo "Checking out Retold modules into: [$(pwd)/..."
3
+
4
+ . ${BASH_SOURCE%/*}/Include-Retold-Module-List.sh
5
+
6
+ #
7
+ # This function attempts to update a repository from github relative to the current script folder
8
+ update_repository()
9
+ {
10
+ # echo " ###--> attempting to update the repository for $2 in $1"
11
+ CWD=$(pwd)
12
+ if [ -d "$CWD/$1/$2" ]
13
+ then
14
+ # echo " # A $2 source directory exists in $1 -- updating with rebase...."
15
+ cd "$CWD/$1/$2"
16
+ git pull --rebase
17
+ # echo " ..."
18
+ cd "../.."
19
+ else
20
+ echo " # The $2 source directory does not exist in $1 -- maybe you need to run the Checkout script?"
21
+ fi
22
+ echo " <-- update attempt complete for repository $2 in $1"
23
+ }
24
+
25
+ process_repository_set()
26
+ {
27
+ # Save first argument in a variable
28
+ local repositorySetName="$1"
29
+ # Shift all arguments to the left (original $1 gets lost)
30
+ shift
31
+ # Collapse all remaining arguments into an array
32
+ local repositorySetRepositories=("$@") # Rebuild the array with rest of arguments
33
+ # Enumerate all repository addresses and check them out
34
+ for repositoryAddress in ${repositorySetRepositories[@]}; do
35
+ echo ""
36
+ echo "[ U ] --> #####[ $repositorySetName -> $repositoryAddress ]#####"
37
+ update_repository $repositorySetName $repositoryAddress
38
+ done
39
+ }
40
+
41
+ process_repository_set "fable" "${repositoriesFable[@]}"
42
+ process_repository_set "meadow" "${repositoriesMeadow[@]}"
43
+ process_repository_set "orator" "${repositoriesOrator[@]}"
44
+ process_repository_set "pict" "${repositoriesPict[@]}"
45
+ process_repository_set "utility" "${repositoriesUtility[@]}"
@@ -0,0 +1,2 @@
1
+ # Fable
2
+
@@ -0,0 +1 @@
1
+ # Meadow
@@ -0,0 +1 @@
1
+ # Orator