ui-soxo-bootstrap-core 2.6.16 → 2.6.17

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.
@@ -0,0 +1,294 @@
1
+ # 📦 NPM Release Workflow — Task-Based Development → Develop → Master
2
+
3
+ This guide describes the complete workflow for publishing **task-based development builds** and **stable releases** using GitHub Actions, Git tags, and npm versioning.
4
+
5
+ Incorrect versioning or incorrect tags will break the publish pipeline — follow the process exactly.
6
+
7
+ ---
8
+
9
+ # 📘 Table of Contents
10
+
11
+ - Overview
12
+ - Branch Strategy
13
+ - Task Branch Workflow
14
+ - Versioning Rules
15
+ - Development Release Workflow (`develop`)
16
+ - Promotion Workflow (Dev → Master)
17
+ - Publishing via GitHub Release UI
18
+ - How GitHub Action Detects Release Type
19
+ - Summary Table
20
+ - Common Mistakes & Fixes
21
+
22
+ ---
23
+
24
+ # 🧩 Overview
25
+
26
+ We maintain two release channels:
27
+
28
+ | Channel | Branch | Tag | Purpose |
29
+ | ------------------- | ------- | -------------- | ------------------- |
30
+ | Stable (`latest`) | master | `vX.Y.Z` | Production release |
31
+ | Development (`dev`) | develop | `vX.Y.Z-dev.N` | QA/internal testing |
32
+
33
+ Releases are triggered using Git tags:
34
+
35
+ ```
36
+ npm version
37
+ ```
38
+
39
+ ---
40
+
41
+ # 🌿 Branch Strategy
42
+
43
+ ## `master`
44
+
45
+ - Production-ready code
46
+ - Publishes **stable** builds
47
+ - Versions never include a `dev` suffix
48
+
49
+ ## `develop`
50
+
51
+ - Used for QA/internal testing
52
+ - Publishes **development** builds
53
+ - Versions always include `-dev.N`
54
+
55
+ ## Task Branches
56
+
57
+ - Create from `master`
58
+ - Naming: `task/<JIRA-ID>-<description>`
59
+ - After completing work, merge into `develop`
60
+
61
+ ---
62
+
63
+ # 🏗️ Task Branch Workflow
64
+
65
+ ### 1. Create a task branch
66
+
67
+ ```bash
68
+ git checkout master
69
+ git pull origin master
70
+ git checkout -b task/<JIRA-ID>-<description>
71
+ ```
72
+
73
+ ### 2. Work on the task
74
+
75
+ ```bash
76
+ git add .
77
+ git commit -m "TASK-123: Implement XYZ"
78
+ ```
79
+
80
+ ### 3. Merge into develop
81
+
82
+ ```bash
83
+ git checkout develop
84
+ git pull origin develop
85
+ git merge task/<JIRA-ID>-<description>
86
+ ```
87
+
88
+ ---
89
+
90
+ # 🔧 Versioning Rules
91
+
92
+ ## Development Versions
93
+
94
+ ```
95
+ X.Y.Z-dev.N
96
+ ```
97
+
98
+ Example:
99
+
100
+ ```
101
+ 2.4.30-dev.0
102
+ ```
103
+
104
+ ## Stable Versions
105
+
106
+ ```
107
+ X.Y.Z
108
+ ```
109
+
110
+ ## Rules
111
+
112
+ - Each version must be unique
113
+ - Dev versions do **not** convert into stable versions
114
+ - Git tag must exactly match `package.json` version
115
+
116
+ ---
117
+
118
+ # 🟦 Development Release Workflow (`develop`)
119
+
120
+ ### 1. Switch to develop
121
+
122
+ ```bash
123
+ git checkout develop
124
+ git pull origin develop
125
+ ```
126
+
127
+ ### 2. Create a new development version
128
+
129
+ ```bash
130
+ npm version prerelease --preid=dev
131
+ ```
132
+
133
+ ### 3. Push commit + tag
134
+
135
+ ```bash
136
+ git push --follow-tags
137
+ ```
138
+
139
+ ### 4. GitHub Action publishes dev build
140
+
141
+ ```
142
+ npm publish --tag dev
143
+ ```
144
+
145
+ ### 5. Install the dev build
146
+
147
+ ```bash
148
+ npm install ui-soxo-bootstrap-core@dev
149
+ ```
150
+
151
+ ---
152
+
153
+ # 🟩 Promotion Workflow (Dev → Master)
154
+
155
+ ### 1. Switch to master
156
+
157
+ ```bash
158
+ git checkout master
159
+ git pull origin master
160
+ ```
161
+
162
+ ### 2. Merge develop into master
163
+
164
+ ```bash
165
+ git merge develop
166
+ ```
167
+
168
+ ### 3. Bump the stable version
169
+
170
+ ```bash
171
+ npm version patch
172
+ # or
173
+ npm version minor
174
+ # or
175
+ npm version major
176
+ ```
177
+
178
+ ### 4. Push with tags
179
+
180
+ ```bash
181
+ git push --follow-tags
182
+ ```
183
+
184
+ ### 5. GitHub Action publishes stable build
185
+
186
+ ```
187
+ npm publish
188
+ ```
189
+
190
+ ### 6. Install stable version
191
+
192
+ ```bash
193
+ npm install ui-soxo-bootstrap-core
194
+ # or
195
+ npm install ui-soxo-bootstrap-core@<version>
196
+ ```
197
+
198
+ ---
199
+
200
+ # 🟧 Publishing via GitHub Release UI
201
+
202
+ ### Important
203
+
204
+ **The tag must match the `package.json` version exactly**, including the `v` prefix.
205
+
206
+ Example:
207
+
208
+ ```
209
+ package.json: "version": "2.4.31-dev.0"
210
+ GitHub Tag: v2.4.31-dev.0
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Steps
216
+
217
+ ### 1. Ensure `develop` branch is up to date
218
+
219
+ Push your changes.
220
+
221
+ ### 2. Ensure version contains a dev suffix
222
+
223
+ If not:
224
+
225
+ ```bash
226
+ npm version prerelease --preid=dev
227
+ git push --follow-tags
228
+ ```
229
+
230
+ ### 3. Open GitHub → Releases → Draft a new release
231
+
232
+ ### 4. Create tag matching the version
233
+
234
+ Example:
235
+
236
+ ```
237
+ v2.4.31-dev.0
238
+ ```
239
+
240
+ ### 5. Select target branch = `develop`
241
+
242
+ ### 6. Title = tag version
243
+
244
+ Description is optional.
245
+
246
+ ### 7. Publish the release
247
+
248
+ Triggers:
249
+
250
+ ```
251
+ npm publish --tag dev
252
+ ```
253
+
254
+ ---
255
+
256
+ # ⚙️ How GitHub Action Detects Release Type
257
+
258
+ If version contains `dev`:
259
+
260
+ ```
261
+ npm publish --tag dev
262
+ ```
263
+
264
+ Otherwise:
265
+
266
+ ```
267
+ npm publish
268
+ ```
269
+
270
+ ---
271
+
272
+ # 📊 Summary Table
273
+
274
+ | Step | Branch | Command | Tag | Publish Type |
275
+ | ---------------------- | ------- | ------------------------------------ | -------------- | ------------ |
276
+ | Create task branch | master | `git checkout -b task/<ID>` | — | — |
277
+ | Merge task → develop | develop | `git merge task/<ID>` | — | — |
278
+ | Dev version | develop | `npm version prerelease --preid=dev` | `vX.Y.Z-dev.N` | dev |
279
+ | Publish dev build | develop | `git push --follow-tags` | — | dev |
280
+ | Merge develop → master | master | `git merge develop` | — | — |
281
+ | Stable version | master | `npm version patch/minor/major` | `vX.Y.Z` | latest |
282
+ | Publish stable build | master | `git push --follow-tags` | — | latest |
283
+
284
+ ---
285
+
286
+ # ⚠️ Common Mistakes & Fixes
287
+
288
+ | Mistake | Issue | Fix |
289
+ | ------------------------- | ------------------ | ---------------------------- |
290
+ | Tag doesn't match version | Publish fails | Always use `npm version` |
291
+ | Manual tag creation | Version mismatch | Avoid manual tagging |
292
+ | Dev publish from master | Wrong channel | Verify branch before tagging |
293
+ | Not pushing tags | Workflow won’t run | Use `git push --follow-tags` |
294
+ | Merging incomplete tasks | Breaks dev builds | Test before merging |
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useCallback, useEffect } from 'react';
2
- import { Space, Popconfirm, Input, Drawer, Skeleton, Collapse, message, Tag } from 'antd';
2
+ import { Space, Popconfirm, Input, Drawer, Skeleton, Collapse, message, Tag, Empty } from 'antd';
3
3
  import { ReloadOutlined, DeleteOutlined, EditOutlined, PlusCircleFilled, CopyOutlined } from '@ant-design/icons';
4
4
  import { Button, Card, Switch, DraggableWrapper } from '../../../../lib';
5
5
  // for draggable menu list import { DndProvider } from "react-dnd";
@@ -203,7 +203,7 @@ const MenuLists = ({ model, match, relativeAdd = false, additional_queries = [],
203
203
  model.delete(rec).then(loadMenus);
204
204
  };
205
205
 
206
- const filtered = records.filter((r) => r.name?.toUpperCase().includes(query.toUpperCase()));
206
+ const filtered = records.filter((r) => r.caption?.toUpperCase().includes(query.toUpperCase()));
207
207
 
208
208
  const visibleItems = filtered;
209
209
 
@@ -362,50 +362,53 @@ const MenuLists = ({ model, match, relativeAdd = false, additional_queries = [],
362
362
  <Card>
363
363
  <DndProvider backend={HTML5Backend}>
364
364
  <Collapse accordion>
365
- {visibleItems.map((item, index) => (
366
- <Panel
367
- key={item.id}
368
- header={
369
- <DraggableWrapper
370
- id={item.id}
371
- index={index}
372
- movePanel={movePanel}
373
- item={item}
374
- dragEnabled={dragMode}
375
- level={1}
376
- parentId={null}
377
- onCrossLevelMove={handleCrossLevelMove}
378
- canAcceptChildren={true}
379
- />
380
- }
381
- // only show arrow if sub_menus exist
382
- showArrow={item.sub_menus && item.sub_menus.length > 0}
383
- // disable panel
384
- // collapsible={item.sub_menus && item.sub_menus.length > 0 ? 'header' : 'disabled'}
385
- extra={panelActions(item, model, setSelectedRecord, setDrawerTitle, setDrawerVisible, deleteRecord)}
386
- >
387
- {item.sub_menus && item.sub_menus.length > 0 && (
388
- <NestedMenu
389
- parentId={item.id}
390
- step={item.step + 1}
391
- items={item.sub_menus || []}
392
- model={model}
393
- dragMode={dragMode}
394
- setSelectedRecord={setSelectedRecord}
395
- setDrawerTitle={setDrawerTitle}
396
- setDrawerVisible={setDrawerVisible}
397
- deleteRecord={deleteRecord}
398
- level={2}
399
- onCrossLevelMove={handleCrossLevelMove}
400
- onChange={(subMenus) => {
401
- const updated = records.map((r) => (r.id === item.id ? { ...r, sub_menus: subMenus } : r));
402
- setRecords(updated);
403
- setOrderChanged(true);
404
- }}
405
- />
406
- )}
407
- </Panel>
408
- ))}
365
+ {visibleItems && visibleItems.length > 0 ? (
366
+ visibleItems.map((item, index) => (
367
+ <Panel
368
+ key={item.id}
369
+ header={
370
+ <DraggableWrapper
371
+ id={item.id}
372
+ index={index}
373
+ movePanel={movePanel}
374
+ item={item}
375
+ dragEnabled={dragMode}
376
+ level={1}
377
+ parentId={null}
378
+ onCrossLevelMove={handleCrossLevelMove}
379
+ canAcceptChildren={true}
380
+ />
381
+ }
382
+ showArrow={item.sub_menus && item.sub_menus.length > 0}
383
+ extra={panelActions(item, model, setSelectedRecord, setDrawerTitle, setDrawerVisible, deleteRecord)}
384
+ >
385
+ {item.sub_menus && item.sub_menus.length > 0 && (
386
+ <NestedMenu
387
+ parentId={item.id}
388
+ step={item.step + 1}
389
+ items={item.sub_menus || []}
390
+ model={model}
391
+ dragMode={dragMode}
392
+ setSelectedRecord={setSelectedRecord}
393
+ setDrawerTitle={setDrawerTitle}
394
+ setDrawerVisible={setDrawerVisible}
395
+ deleteRecord={deleteRecord}
396
+ level={2}
397
+ onCrossLevelMove={handleCrossLevelMove}
398
+ onChange={(subMenus) => {
399
+ const updated = records.map((r) => (r.id === item.id ? { ...r, sub_menus: subMenus } : r));
400
+ setRecords(updated);
401
+ setOrderChanged(true);
402
+ }}
403
+ />
404
+ )}
405
+ </Panel>
406
+ ))
407
+ ) : (
408
+ <div style={{ textAlign: 'center', padding: '40px 0' }}>
409
+ <Empty description="No Menu Items" />
410
+ </div>
411
+ )}
409
412
  </Collapse>
410
413
  </DndProvider>
411
414
  </Card>
@@ -27,9 +27,13 @@ function getExportDefinition(entry, record) {
27
27
  * @param {boolean} root0.isFixedIndex
28
28
  * @param {Object} root0.CustomComponents
29
29
  * @param {Function} root0.refresh
30
+ * @param {Object} [root0.otherDetails={}] - Optional details from the report configuration.
31
+ * @param {boolean} [root0.otherDetails.isFilterEnabled] - Fallback to enable filtering on all columns.
32
+ * @param {boolean} [root.otherDetails.isSortingEnabled] - Fallback to enable sorting on all columns.
33
+ * @param {boolean} [root0.otherDetails.isHeaderWrapEnabled] - Fallback to enable header text wrapping for all columns.
30
34
  * @returns {Array}
31
35
  */
32
- export default function buildDisplayColumns({ columns = [], patients = [], isFixedIndex, CustomComponents, refresh }) {
36
+ export default function buildDisplayColumns({ columns = [], patients = [], isFixedIndex, CustomComponents, refresh, otherDetails = {} }) {
33
37
  const displayColumns = [
34
38
  {
35
39
  title: '#',
@@ -42,6 +46,11 @@ export default function buildDisplayColumns({ columns = [], patients = [], isFix
42
46
  ];
43
47
 
44
48
  columns.forEach((entry, index) => {
49
+ const isFilterEnabled = entry.isFilterEnabled || otherDetails?.isFilterEnabled;
50
+ const isSortingEnabled = entry.isSortingEnabled || otherDetails?.isSortingEnabled;
51
+ const isHeaderWrapEnabled = otherDetails?.isHeaderWrapEnabled;
52
+
53
+ const titleStyle = isHeaderWrapEnabled ? { whiteSpace: 'pre-wrap', overflowWrap: 'break-word' } : {};
45
54
  displayColumns.push({
46
55
  render: (record) =>
47
56
  renderDisplayCell({
@@ -52,20 +61,26 @@ export default function buildDisplayColumns({ columns = [], patients = [], isFix
52
61
  }),
53
62
  field: entry.field,
54
63
  title: (
55
- <Tooltip title={entry.tooltip || entry.title}>
56
- <span>{entry.title}</span>
64
+ <Tooltip
65
+ title={entry.tooltip || entry.title}
66
+ overlayInnerStyle={{
67
+ whiteSpace: 'normal',
68
+ overflowWrap: 'break-word',
69
+ }}
70
+ >
71
+ <span style={titleStyle}>{entry.title}</span>
57
72
  </Tooltip>
58
73
  ),
59
74
  key: entry.field || `display_column_${index}`,
60
75
  width: entry.width ? parseInt(entry.width, 10) : 160,
61
76
  fixed: entry.isFixedColumn ? entry.isFixedColumn : null,
62
77
  filters:
63
- entry.isFilterEnabled && Array.isArray(patients)
78
+ isFilterEnabled && Array.isArray(patients)
64
79
  ? [...new Set(patients.map((item) => item[entry.field]).filter(Boolean))].map((value) => ({ text: value, value }))
65
80
  : null,
66
- onFilter: entry.isFilterEnabled ? (value, record) => record[entry.field] === value : null,
67
- sorter: entry.isSortingEnabled ? (a, b) => String(a[entry.field]).localeCompare(String(b[entry.field])) : null,
68
- filterSearch: entry.isFilterEnabled ? entry.isFilterEnabled : false,
81
+ onFilter: isFilterEnabled ? (value, record) => record[entry.field] === value : null,
82
+ sorter: isSortingEnabled ? (a, b) => String(a[entry.field]).localeCompare(String(b[entry.field])) : null,
83
+ filterSearch: isFilterEnabled ? isFilterEnabled : false,
69
84
  exportDefinition: (record) => getExportDefinition(entry, record),
70
85
  align: entry.type === 'number' ? 'right' : 'left',
71
86
  });
@@ -299,7 +299,7 @@ export default function ReportingDashboard({
299
299
  // Update patients
300
300
  setPatients(resultDetails || []);
301
301
  console.log(parsedColumns);
302
-
302
+
303
303
  // Check if columns are not yet defined
304
304
  if (parsedColumns.length === 0 && resultDetails.length > 0) {
305
305
  // Create columns dynamically from resultDetails keys
@@ -599,6 +599,7 @@ function GuestList({
599
599
 
600
600
  const { isMobile, dispatch } = useContext(GlobalContext);
601
601
  const [single, setSingle] = useState({});
602
+ const otherDetails = config.other_details1 ? JSON.parse(config.other_details1) : {};
602
603
 
603
604
  // const [view, setView] = useState(isMobile ? true : false); //Need to check this condition
604
605
  const cols = buildDisplayColumns({
@@ -607,6 +608,7 @@ function GuestList({
607
608
  isFixedIndex,
608
609
  CustomComponents,
609
610
  refresh,
611
+ otherDetails
610
612
  });
611
613
 
612
614
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-soxo-bootstrap-core",
3
- "version": "2.6.16",
3
+ "version": "2.6.17",
4
4
  "description": "All the Core Components for you to start",
5
5
  "keywords": [
6
6
  "all in one"