pict-section-recordset 1.1.0 → 1.3.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.
Files changed (67) hide show
  1. package/package.json +5 -1
  2. package/source/views/RecordSet-Filters.js +196 -72
  3. package/source/views/filters/RecordSet-Filter-Base.js +86 -8
  4. package/source/views/read/RecordSet-Read.js +308 -2
  5. package/types/providers/Filter-Data-Provider.d.ts +1 -1
  6. package/types/providers/Filter-Data-Provider.d.ts.map +1 -1
  7. package/types/views/Filter-PersistenceView.d.ts +23 -2
  8. package/types/views/Filter-PersistenceView.d.ts.map +1 -1
  9. package/types/views/RecordSet-Filters.d.ts +54 -2
  10. package/types/views/RecordSet-Filters.d.ts.map +1 -1
  11. package/types/views/filters/RecordSet-Filter-Base.d.ts +14 -0
  12. package/types/views/filters/RecordSet-Filter-Base.d.ts.map +1 -1
  13. package/types/views/list/RecordSet-List.d.ts.map +1 -1
  14. package/types/views/read/RecordSet-Read.d.ts +51 -0
  15. package/types/views/read/RecordSet-Read.d.ts.map +1 -1
  16. package/.vscode/launch.json +0 -46
  17. package/CONTRIBUTING.md +0 -50
  18. package/debug/Harness.js +0 -0
  19. package/docs/.nojekyll +0 -0
  20. package/docs/README.md +0 -76
  21. package/docs/_brand.json +0 -18
  22. package/docs/_cover.md +0 -11
  23. package/docs/_sidebar.md +0 -19
  24. package/docs/_version.json +0 -7
  25. package/docs/api-reference.md +0 -233
  26. package/docs/filters.md +0 -151
  27. package/docs/index.html +0 -38
  28. package/docs/record-providers.md +0 -155
  29. package/docs/retold-catalog.json +0 -87
  30. package/docs/retold-keyword-index.json +0 -5227
  31. package/docs/views/create/README.md +0 -181
  32. package/docs/views/dashboard/README.md +0 -308
  33. package/docs/views/list/README.md +0 -260
  34. package/docs/views/read/README.md +0 -216
  35. package/eslint.config.mjs +0 -10
  36. package/example_applications/README.md +0 -39
  37. package/example_applications/ServeExamples.js +0 -82
  38. package/example_applications/bookstore/.quackage.json +0 -9
  39. package/example_applications/bookstore/Bookstore-Application-Configuration.json +0 -4
  40. package/example_applications/bookstore/Bookstore-Application.js +0 -671
  41. package/example_applications/bookstore/css/bookstore.css +0 -729
  42. package/example_applications/bookstore/css/pure.min.css +0 -11
  43. package/example_applications/bookstore/html/index.html +0 -46
  44. package/example_applications/bookstore/package.json +0 -34
  45. package/example_applications/bookstore/providers/PictRouter-Bookstore.json +0 -32
  46. package/example_applications/bookstore/views/PictView-Bookstore-Content-About.json +0 -21
  47. package/example_applications/bookstore/views/PictView-Bookstore-Content-Legal.json +0 -21
  48. package/example_applications/bookstore/views/PictView-Bookstore-Dashboard.js +0 -147
  49. package/example_applications/bookstore/views/PictView-Bookstore-Layout.js +0 -85
  50. package/example_applications/bookstore/views/PictView-Bookstore-Login.js +0 -58
  51. package/example_applications/bookstore/views/PictView-Bookstore-Navigation.js +0 -228
  52. package/example_applications/index.html +0 -50
  53. package/example_applications/mocks/book-edit-view.html +0 -173
  54. package/example_applications/mocks/book-read-view.html +0 -166
  55. package/example_applications/mocks/list-view.html +0 -185
  56. package/example_applications/package.json +0 -16
  57. package/example_applications/simple_entity/.quackage.json +0 -9
  58. package/example_applications/simple_entity/README-Simple-RecordSet.md +0 -8
  59. package/example_applications/simple_entity/Simple-RecordSet-Application.js +0 -887
  60. package/example_applications/simple_entity/html/index.html +0 -207
  61. package/example_applications/simple_entity/package.json +0 -27
  62. package/test/PictSectionRecordSet-Basic_tests.js +0 -205
  63. package/test/PictSectionRecordSet-Filter-Data-Provider_tests.js +0 -263
  64. package/test/PictSectionRecordSet-Filter-InstanceViews-Render_tests.js +0 -328
  65. package/test/PictSectionRecordSet-RecordProvider-Meadow_tests.js +0 -216
  66. package/tsconfig.build.json +0 -16
  67. package/tsconfig.json +0 -16
@@ -1,46 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "name": "Launch Debug Harness",
9
- "type": "pwa-node",
10
- "request": "launch",
11
- "outputCapture": "std",
12
- "skipFiles": [
13
- "<node_internals>/**"
14
- ],
15
- "program": "${workspaceFolder}/debug/Harness.js",
16
- "presentation": {
17
- "hidden": false,
18
- "group": "",
19
- "order": 1
20
- }
21
- },
22
- {
23
- "name": "Mocha Tests",
24
- "args": [
25
- "-u",
26
- "tdd",
27
- "--timeout",
28
- "999999",
29
- "--colors",
30
- "${workspaceFolder}/test"
31
- ],
32
- "internalConsoleOptions": "openOnSessionStart",
33
- "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
34
- "request": "launch",
35
- "skipFiles": [
36
- "<node_internals>/**"
37
- ],
38
- "type": "pwa-node",
39
- "presentation": {
40
- "hidden": false,
41
- "group": "",
42
- "order": 2
43
- }
44
- }
45
- ]
46
- }
package/CONTRIBUTING.md DELETED
@@ -1,50 +0,0 @@
1
- # Contributing to Retold
2
-
3
- We welcome contributions to Retold and its modules. This guide covers the expectations and process for contributing.
4
-
5
- ## Code of Conduct
6
-
7
- The Retold community values **empathy**, **equity**, **kindness**, and **thoughtfulness**. We expect all participants to treat each other with respect, assume good intent, and engage constructively. These values apply to all interactions: pull requests, issues, discussions, and code review.
8
-
9
- ## How to Contribute
10
-
11
- ### Pull Requests
12
-
13
- Pull requests are the preferred method for contributing changes. To submit one:
14
-
15
- 1. Fork the module repository you want to change
16
- 2. Create a branch for your work
17
- 3. Make your changes, following the code style of the module you are editing
18
- 4. Ensure your changes have test coverage (see below)
19
- 5. Open a pull request against the module's main branch
20
-
21
- **Submitting a pull request does not guarantee it will be accepted.** Maintainers review contributions for fit, quality, and alignment with the project's direction. A PR may be declined, or you may be asked to revise it. This is normal and not a reflection on the quality of your effort.
22
-
23
- ### Reporting Issues
24
-
25
- If you find a bug or have a feature suggestion, open an issue on the relevant module's repository. Include enough detail to reproduce the problem or understand the proposal.
26
-
27
- ## Test Coverage
28
-
29
- Every commit must include test coverage for the changes it introduces. Retold modules use Mocha in TDD style. Before submitting:
30
-
31
- - **Write tests** for any new functionality or bug fixes
32
- - **Run the existing test suite** with `npm test` and confirm all tests pass
33
- - **Check coverage** with `npm run coverage` if the module supports it
34
-
35
- Pull requests that break existing tests or lack coverage for new code will not be merged.
36
-
37
- ## Code Style
38
-
39
- Follow the conventions of the module you are working in. The general Retold style is:
40
-
41
- - **Tabs** for indentation, never spaces
42
- - **Plain JavaScript** only (no TypeScript)
43
- - **Allman-style braces** (opening brace on its own line)
44
- - **Variable naming:** `pVariable` for parameters, `tmpVariable` for temporaries, `libSomething` for imports
45
-
46
- When in doubt, match what the surrounding code does.
47
-
48
- ## Repository Structure
49
-
50
- Each module is its own git repository. The [retold](https://github.com/stevenvelozo/retold) repository tracks module organization but does not contain module source code. Direct your pull request to the specific module repository where your change belongs.
package/debug/Harness.js DELETED
File without changes
package/docs/.nojekyll DELETED
File without changes
package/docs/README.md DELETED
@@ -1,76 +0,0 @@
1
- # Pict-Section-RecordSet
2
-
3
- > Dynamic record set management views with CRUD operations
4
-
5
- Pict-Section-RecordSet provides automatic CRUD (Create, Read, Update, Delete) views for managing record sets in Pict applications. Built on top of pict-section-form, it offers list views, detail views, filtering, pagination, and smooth integration with Meadow API endpoints.
6
-
7
- ## Features
8
-
9
- - **Automatic CRUD Views** - List, detail, create, and edit views generated from configuration
10
- - **Built-in Filtering** - Configurable filter controls with various input types
11
- - **Pagination Support** - Navigate large record sets with configurable page sizes
12
- - **Meadow Integration** - Native support for Meadow REST API endpoints
13
- - **Faceted Search** - Search with facets for filtering by field values and ranges
14
- - **Custom Providers** - Extensible provider system for any data source
15
- - **Router Integration** - Built-in routing for navigation between views
16
-
17
- ## Quick Start
18
-
19
- ```javascript
20
- const libPictRecordSet = require('pict-section-recordset');
21
-
22
- // Create a record set application
23
- const app = new libPictRecordSet.PictRecordSetApplication(pict, {
24
- Name: 'User Management',
25
- Hash: 'UserManagement',
26
- pict_configuration: {
27
- Product: 'UserManager'
28
- }
29
- });
30
-
31
- // Initialize the application
32
- app.initialize();
33
- ```
34
-
35
- ## Installation
36
-
37
- ```bash
38
- npm install pict-section-recordset
39
- ```
40
-
41
- ## Core Concepts
42
-
43
- ### Record Providers
44
-
45
- Record providers handle data fetching, creating, updating, and deleting. The package includes:
46
-
47
- - **RecordSetProviderBase** - Base class for custom providers
48
- - **RecordSetProviderMeadowEndpoints** - Provider for Meadow REST APIs
49
-
50
- ### Views
51
-
52
- The package provides several view types:
53
-
54
- - **List View** - Displays records in a table with sorting and pagination
55
- - **Detail View** - Shows a single record with all fields
56
- - **Create View** - Form for creating new records
57
- - **Edit View** - Form for editing existing records
58
- - **Dashboard View** - Overview with statistics and quick actions
59
-
60
- ### Filters
61
-
62
- Filters allow users to narrow down record sets. Filter types include text search, date ranges, select dropdowns, and custom filter controls.
63
-
64
- ## Documentation
65
-
66
- - [Record Providers](record-providers.md) - Creating and configuring data providers
67
- - [Filters](filters.md) - Configuring filter controls
68
- - [API Reference](api-reference.md) - Complete API documentation
69
-
70
- ## Related Packages
71
-
72
- - [pict](https://fable-retold.github.io/pict/) - Core Pict framework
73
- - [pict-section-form](https://fable-retold.github.io/pict-section-form/) - Dynamic forms framework
74
- - [pict-application](https://fable-retold.github.io/pict-application/) - Application base class
75
- - [meadow](https://fable-retold.github.io/meadow/) - REST API framework
76
- - [fable](https://fable-retold.github.io/fable/) - Service provider framework
package/docs/_brand.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "Hash": "pict-section-recordset",
3
- "Name": "Pict Section Recordset",
4
- "Tagline": "CRUD record management views built from Meadow endpoint schemas with list, detail, and dashboard views",
5
- "Palette": "mix",
6
- "Icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\" width=\"96\" height=\"96\">\n\t\t<defs>\n\t\t\t<clipPath id=\"frame-pict-section-recordset-filled-light\">\n\t\t\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\" fill=\"#dac82e\"/>\n\t\t<g clip-path=\"url(#frame-pict-section-recordset-filled-light)\"><path d=\"M 48.00,12.00 L 79.18,30.00 L 79.18,66.00 L 48.00,84.00 L 16.82,66.00 L 16.82,30.00 Z\" fill=\"#4d98aa\"/>\n\t\t\t\t\t<circle cx=\"48\" cy=\"48\" r=\"24\" fill=\"rgba(255,255,255,0.18)\"/></g>\n\t\t<text x=\"48\" y=\"50\" text-anchor=\"middle\" dominant-baseline=\"central\"\n\t\t\tfont-family=\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\"\n\t\t\tfont-size=\"28\" font-weight=\"700\"\n\t\t\tfill=\"#ffffff\" letter-spacing=\"-1\">PSR</text>\n\t</svg>",
7
- "IconType": "svg",
8
- "Favicon": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\" width=\"96\" height=\"96\">\n\t\t<defs>\n\t\t\t<clipPath id=\"fav-pict-section-recordset-light\">\n\t\t\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\" fill=\"#dac82e\"/>\n\t\t<g clip-path=\"url(#fav-pict-section-recordset-light)\"><path d=\"M 48.00,12.00 L 79.18,30.00 L 79.18,66.00 L 48.00,84.00 L 16.82,66.00 L 16.82,30.00 Z\" fill=\"#4d98aa\"/></g>\n\t\t<text x=\"48\" y=\"50\" text-anchor=\"middle\" dominant-baseline=\"central\"\n\t\t\tfont-family=\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\"\n\t\t\tfont-size=\"60\" font-weight=\"800\"\n\t\t\tfill=\"#ffffff\" letter-spacing=\"-1\">P</text>\n\t</svg>",
9
- "FaviconDark": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\" width=\"96\" height=\"96\">\n\t\t<defs>\n\t\t\t<clipPath id=\"fav-pict-section-recordset-dark\">\n\t\t\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\" fill=\"#e3d980\"/>\n\t\t<g clip-path=\"url(#fav-pict-section-recordset-dark)\"><path d=\"M 48.00,12.00 L 79.18,30.00 L 79.18,66.00 L 48.00,84.00 L 16.82,66.00 L 16.82,30.00 Z\" fill=\"#8fbac4\"/></g>\n\t\t<text x=\"48\" y=\"50\" text-anchor=\"middle\" dominant-baseline=\"central\"\n\t\t\tfont-family=\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\"\n\t\t\tfont-size=\"60\" font-weight=\"800\"\n\t\t\tfill=\"#101418\" letter-spacing=\"-1\">P</text>\n\t</svg>",
10
- "Colors": {
11
- "Primary": "#dac82e",
12
- "Secondary": "#4d98aa",
13
- "PrimaryLight": "#dac82e",
14
- "PrimaryDark": "#e3d980",
15
- "SecondaryLight": "#4d98aa",
16
- "SecondaryDark": "#8fbac4"
17
- }
18
- }
package/docs/_cover.md DELETED
@@ -1,11 +0,0 @@
1
- # Pict-Section-RecordSet
2
-
3
- > Dynamic record set management views with CRUD operations
4
-
5
- - Automatic Create, Read, Update, Delete views
6
- - Built-in filtering, pagination, and search
7
- - Meadow endpoint integration for API-driven data
8
- - Extensible record providers for custom data sources
9
-
10
- [GitHub](https://github.com/fable-retold/pict-section-recordset)
11
- [Get Started](#pict-section-recordset)
package/docs/_sidebar.md DELETED
@@ -1,19 +0,0 @@
1
- - Getting Started
2
-
3
- - [Introduction](/)
4
- - [Record Providers](record-providers.md)
5
-
6
- - Views
7
-
8
- - [Create View](views/create/)
9
- - [Read View](views/read/)
10
- - [List View](views/list/)
11
- - [Dashboard View](views/dashboard/)
12
-
13
- - Configuration
14
-
15
- - [Filters](filters.md)
16
-
17
- - Reference
18
-
19
- - [API Reference](api-reference.md)
@@ -1,7 +0,0 @@
1
- {
2
- "Name": "pict-section-recordset",
3
- "Version": "1.0.69",
4
- "Description": "Pict dynamic record set management views",
5
- "GeneratedAt": "2026-05-26T21:14:43.837Z",
6
- "GitCommit": "6b60b91"
7
- }
@@ -1,233 +0,0 @@
1
- # API Reference
2
-
3
- Complete API documentation for Pict-Section-RecordSet.
4
-
5
- ## PictRecordSetApplication
6
-
7
- Main application class for record set management.
8
-
9
- ### Constructor
10
-
11
- ```javascript
12
- new PictRecordSetApplication(pFable, pOptions, pServiceHash)
13
- ```
14
-
15
- | Parameter | Type | Description |
16
- |-----------|------|-------------|
17
- | `pFable` | object | Pict/Fable instance |
18
- | `pOptions` | object | Application configuration |
19
- | `pServiceHash` | string | Service identifier |
20
-
21
- ### Configuration Options
22
-
23
- ```javascript
24
- {
25
- Name: 'My Record Set App',
26
- Hash: 'MyRecordSetApp',
27
- pict_configuration: {
28
- Product: 'MyProduct'
29
- }
30
- }
31
- ```
32
-
33
- ---
34
-
35
- ## RecordSetProviderBase
36
-
37
- Base class for record providers.
38
-
39
- ### Methods
40
-
41
- #### getRecord(pIDOrGuid, fCallback)
42
-
43
- Retrieves a single record.
44
-
45
- | Parameter | Type | Description |
46
- |-----------|------|-------------|
47
- | `pIDOrGuid` | string/number | Record identifier |
48
- | `fCallback` | function | Callback `(error, record)` |
49
-
50
- #### getRecords(pFilter, fCallback)
51
-
52
- Retrieves multiple records with filtering.
53
-
54
- | Parameter | Type | Description |
55
- |-----------|------|-------------|
56
- | `pFilter` | object | Filter configuration |
57
- | `fCallback` | function | Callback `(error, result)` |
58
-
59
- **Filter Object:**
60
-
61
- ```javascript
62
- {
63
- Entity: 'EntityName',
64
- FilterString: 'FBV~Field~EQ~Value',
65
- Offset: 0,
66
- PageSize: 25,
67
- Facets: {
68
- ReturnRecords: true,
69
- Fields: ['Field1', 'Field2'],
70
- Ranges: [{ Field: 'Date', Start: '2020', End: '2025', Gap: 'YEAR' }]
71
- }
72
- }
73
- ```
74
-
75
- **Result Object:**
76
-
77
- ```javascript
78
- {
79
- Records: [...],
80
- Facets: {
81
- Field1: { 'value1': 10, 'value2': 5 },
82
- ByRange: { '2020': 100, '2021': 150 }
83
- }
84
- }
85
- ```
86
-
87
- #### createRecord(pRecord, fCallback)
88
-
89
- Creates a new record.
90
-
91
- | Parameter | Type | Description |
92
- |-----------|------|-------------|
93
- | `pRecord` | object | Record data |
94
- | `fCallback` | function | Callback `(error, newRecord)` |
95
-
96
- #### updateRecord(pRecord, fCallback)
97
-
98
- Updates an existing record.
99
-
100
- | Parameter | Type | Description |
101
- |-----------|------|-------------|
102
- | `pRecord` | object | Record data with ID |
103
- | `fCallback` | function | Callback `(error, updatedRecord)` |
104
-
105
- #### deleteRecord(pIDOrGuid, fCallback)
106
-
107
- Deletes a record.
108
-
109
- | Parameter | Type | Description |
110
- |-----------|------|-------------|
111
- | `pIDOrGuid` | string/number | Record identifier |
112
- | `fCallback` | function | Callback `(error, success)` |
113
-
114
- ---
115
-
116
- ## RecordSetProviderMeadowEndpoints
117
-
118
- Provider for Meadow REST API endpoints. Extends RecordSetProviderBase.
119
-
120
- ### Additional Configuration
121
-
122
- ```javascript
123
- {
124
- // Base URL for API
125
- APIEndpoint: '/1.0/',
126
-
127
- // Entity name
128
- Entity: 'User',
129
-
130
- // Use schema endpoint for auto-configuration
131
- UseSchemaEndpoint: true
132
- }
133
- ```
134
-
135
- ### Meadow Endpoints Used
136
-
137
- | Operation | Endpoint |
138
- |-----------|----------|
139
- | Get One | `GET /{Entity}/{id}` |
140
- | Get Many | `GET /{Entity}s/FilteredTo/{filter}/{offset}/{limit}` |
141
- | Create | `POST /{Entity}` |
142
- | Update | `PUT /{Entity}` |
143
- | Delete | `DELETE /{Entity}/{id}` |
144
- | Schema | `GET /{Entity}/Schema` |
145
-
146
- ---
147
-
148
- ## Views
149
-
150
- ### List View
151
-
152
- Displays records in a table format.
153
-
154
- ```javascript
155
- // Configuration
156
- {
157
- ViewType: 'List',
158
- Columns: [
159
- { Field: 'Name', Header: 'Name', Sortable: true },
160
- { Field: 'Email', Header: 'Email' },
161
- { Field: 'Status', Header: 'Status' }
162
- ],
163
- PageSize: 25,
164
- ShowPagination: true
165
- }
166
- ```
167
-
168
- ### Detail View
169
-
170
- Shows a single record.
171
-
172
- ```javascript
173
- // Configuration
174
- {
175
- ViewType: 'Read',
176
- Fields: [
177
- { Field: 'Name', Label: 'Full Name' },
178
- { Field: 'Email', Label: 'Email Address' },
179
- { Field: 'CreatedDate', Label: 'Created', Format: 'date' }
180
- ]
181
- }
182
- ```
183
-
184
- ### Create/Edit View
185
-
186
- Form for creating or editing records. Uses pict-section-form configuration.
187
-
188
- ---
189
-
190
- ## Router
191
-
192
- Built-in routing for navigation.
193
-
194
- ### Routes
195
-
196
- | Route | View |
197
- |-------|------|
198
- | `/` | Dashboard |
199
- | `/list` | List view |
200
- | `/view/{id}` | Detail view |
201
- | `/create` | Create form |
202
- | `/edit/{id}` | Edit form |
203
-
204
- ### Programmatic Navigation
205
-
206
- ```javascript
207
- // Navigate to list
208
- pict.providers.RecordSetRouter.navigateTo('list');
209
-
210
- // Navigate to detail view
211
- pict.providers.RecordSetRouter.navigateTo('view', { id: 123 });
212
-
213
- // Navigate to edit
214
- pict.providers.RecordSetRouter.navigateTo('edit', { id: 123 });
215
- ```
216
-
217
- ---
218
-
219
- ## Module Exports
220
-
221
- ```javascript
222
- const libPictRecordSet = require('pict-section-recordset');
223
-
224
- // Main meta controller
225
- libPictRecordSet // RecordSet MetaController
226
-
227
- // Application class
228
- libPictRecordSet.PictRecordSetApplication
229
-
230
- // Providers
231
- libPictRecordSet.RecordSetProviderBase
232
- libPictRecordSet.RecordSetProviderMeadowEndpoints
233
- ```
package/docs/filters.md DELETED
@@ -1,151 +0,0 @@
1
- # Filters
2
-
3
- Filters allow users to narrow down record sets based on field values.
4
-
5
- ## Filter Types
6
-
7
- The record set supports various filter control types:
8
-
9
- | Type | Description |
10
- |------|-------------|
11
- | `Text` | Free-text search input |
12
- | `Select` | Dropdown selection |
13
- | `DateRange` | Date range picker |
14
- | `NumberRange` | Numeric range inputs |
15
- | `Checkbox` | Boolean toggle |
16
- | `MultiSelect` | Multiple selection |
17
-
18
- ## Filter Configuration
19
-
20
- Configure filters in your record set manifest:
21
-
22
- ```javascript
23
- const filterConfig = {
24
- Filters: [
25
- {
26
- Hash: 'NameFilter',
27
- Name: 'Name',
28
- FilterType: 'Text',
29
- Field: 'Name',
30
- Operator: 'LIKE'
31
- },
32
- {
33
- Hash: 'StatusFilter',
34
- Name: 'Status',
35
- FilterType: 'Select',
36
- Field: 'Status',
37
- Options: [
38
- { Value: 'active', Label: 'Active' },
39
- { Value: 'inactive', Label: 'Inactive' },
40
- { Value: 'pending', Label: 'Pending' }
41
- ]
42
- },
43
- {
44
- Hash: 'DateFilter',
45
- Name: 'Created Date',
46
- FilterType: 'DateRange',
47
- Field: 'CreatedDate'
48
- }
49
- ]
50
- };
51
- ```
52
-
53
- ## Filter Operators
54
-
55
- Available operators for filter conditions:
56
-
57
- | Operator | Description | Example |
58
- |----------|-------------|---------|
59
- | `EQ` | Equals | `Status EQ 'active'` |
60
- | `NE` | Not equals | `Status NE 'deleted'` |
61
- | `GT` | Greater than | `Age GT 18` |
62
- | `GE` | Greater or equal | `Age GE 21` |
63
- | `LT` | Less than | `Price LT 100` |
64
- | `LE` | Less or equal | `Price LE 50` |
65
- | `LIKE` | Contains | `Name LIKE 'John'` |
66
- | `IN` | In list | `Status IN ['active','pending']` |
67
-
68
- ## Filter String Format
69
-
70
- Filters are converted to Meadow filter strings:
71
-
72
- ```
73
- FBV~FieldName~Operator~Value
74
- ```
75
-
76
- Multiple filters are joined:
77
-
78
- ```
79
- FBV~Name~LIKE~John~FBV~Status~EQ~active
80
- ```
81
-
82
- ## Dynamic Filters
83
-
84
- Filters can be generated from record data:
85
-
86
- ```javascript
87
- // Auto-generate select options from unique field values
88
- const filter = {
89
- Hash: 'DepartmentFilter',
90
- Name: 'Department',
91
- FilterType: 'Select',
92
- Field: 'Department',
93
- DynamicOptions: true, // Fetch options from data
94
- FacetField: 'Department' // Use facet for counts
95
- };
96
- ```
97
-
98
- ## Filter Events
99
-
100
- Handle filter changes in your application:
101
-
102
- ```javascript
103
- // Listen for filter changes
104
- pict.PictSectionRecordSet.on('filter-changed', (filterState) => {
105
- console.log('Active filters:', filterState);
106
- });
107
-
108
- // Programmatically set filters
109
- pict.PictSectionRecordSet.setFilter('StatusFilter', 'active');
110
-
111
- // Clear all filters
112
- pict.PictSectionRecordSet.clearFilters();
113
- ```
114
-
115
- ## Custom Filter Controls
116
-
117
- Create custom filter input providers:
118
-
119
- ```javascript
120
- const libFilterProvider = require('pict-section-recordset').FilterProvider;
121
-
122
- class CustomRangeFilter extends libFilterProvider
123
- {
124
- constructor(pFable, pOptions, pServiceHash)
125
- {
126
- super(pFable, pOptions, pServiceHash);
127
- }
128
-
129
- // Render custom filter UI
130
- render(pFilterConfig, pContainer)
131
- {
132
- // Custom rendering logic
133
- }
134
-
135
- // Get filter value
136
- getValue()
137
- {
138
- return {
139
- min: this.minInput.value,
140
- max: this.maxInput.value
141
- };
142
- }
143
-
144
- // Convert to filter string
145
- toFilterString()
146
- {
147
- const value = this.getValue();
148
- return `FBV~${this.options.Field}~GE~${value.min}~FBV~${this.options.Field}~LE~${value.max}`;
149
- }
150
- }
151
- ```
package/docs/index.html DELETED
@@ -1,38 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7
- <meta name="description" content="Pict-Section-RecordSet v1.0.69 Documentation — Pict dynamic record set management views">
8
-
9
- <title>Pict-Section-RecordSet v1.0.69 Documentation</title>
10
-
11
- <!-- KaTeX stylesheet for LaTeX equation rendering -->
12
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css">
13
- <!-- PICT Dynamic View CSS Container -->
14
- <style id="PICT-CSS"></style>
15
-
16
- <!-- Load the PICT library from jsDelivr CDN -->
17
- <script src="https://cdn.jsdelivr.net/npm/pict@1/dist/pict.min.js" type="text/javascript"></script>
18
- <!-- Bootstrap the Application -->
19
- <script type="text/javascript">
20
- //<![CDATA[
21
- Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(PictDocuserve, 2)});
22
- //]]>
23
- </script>
24
- </head>
25
- <body>
26
- <!-- The root container for the Pict application -->
27
- <div id="Docuserve-Application-Container"></div>
28
-
29
- <!-- Mermaid diagram rendering. pict-section-content (v0.1.8+) drives
30
- initialization with theme: 'base' + themeVariables sourced
31
- from --theme-color-* so diagrams follow the active theme. -->
32
- <script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"></script>
33
- <!-- KaTeX for LaTeX equation rendering -->
34
- <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.js"></script>
35
- <!-- Load the Docuserve PICT Application Bundle from jsDelivr CDN -->
36
- <script src="https://cdn.jsdelivr.net/npm/pict-docuserve@1/dist/pict-docuserve.min.js" type="text/javascript"></script>
37
- </body>
38
- </html>