pict-section-recordset 1.1.0 → 1.2.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 +20 -2
  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 +26 -1
  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
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>
@@ -1,155 +0,0 @@
1
- # Record Providers
2
-
3
- Record providers handle all data operations for your record sets.
4
-
5
- ## Provider Types
6
-
7
- ### RecordSetProviderBase
8
-
9
- The base class for creating custom record providers:
10
-
11
- ```javascript
12
- const libRecordSetProviderBase = require('pict-section-recordset').RecordSetProviderBase;
13
-
14
- class MyRecordProvider extends libRecordSetProviderBase
15
- {
16
- constructor(pFable, pOptions, pServiceHash)
17
- {
18
- super(pFable, pOptions, pServiceHash);
19
- }
20
-
21
- // Get a single record by ID
22
- getRecord(pIDOrGuid, fCallback)
23
- {
24
- // Fetch record from your data source
25
- const record = this.fetchFromDatabase(pIDOrGuid);
26
- fCallback(null, record);
27
- }
28
-
29
- // Get multiple records with filtering
30
- getRecords(pFilter, fCallback)
31
- {
32
- // Fetch records with filter applied
33
- const records = this.queryDatabase(pFilter);
34
- fCallback(null, { Records: records });
35
- }
36
-
37
- // Create a new record
38
- createRecord(pRecord, fCallback)
39
- {
40
- const newRecord = this.insertIntoDatabase(pRecord);
41
- fCallback(null, newRecord);
42
- }
43
-
44
- // Update an existing record
45
- updateRecord(pRecord, fCallback)
46
- {
47
- const updated = this.updateInDatabase(pRecord);
48
- fCallback(null, updated);
49
- }
50
-
51
- // Delete a record
52
- deleteRecord(pIDOrGuid, fCallback)
53
- {
54
- this.deleteFromDatabase(pIDOrGuid);
55
- fCallback(null, true);
56
- }
57
- }
58
-
59
- module.exports = MyRecordProvider;
60
- ```
61
-
62
- ### RecordSetProviderMeadowEndpoints
63
-
64
- Provider for Meadow REST API endpoints:
65
-
66
- ```javascript
67
- const libMeadowProvider = require('pict-section-recordset').RecordSetProviderMeadowEndpoints;
68
-
69
- // The provider automatically handles:
70
- // - GET /Entity/{id} - Get single record
71
- // - GET /Entities/FilteredTo/{filter}/0/100 - Get filtered records
72
- // - POST /Entity - Create record
73
- // - PUT /Entity - Update record
74
- // - DELETE /Entity/{id} - Delete record
75
- ```
76
-
77
- ## Filter Object
78
-
79
- When fetching records, you can pass a filter object:
80
-
81
- ```javascript
82
- const filter = {
83
- // Entity name (can override for LiteExtended, etc.)
84
- Entity: 'User',
85
-
86
- // Meadow-style filter string
87
- FilterString: 'FBV~Name~EQ~John',
88
-
89
- // Pagination
90
- Offset: 0,
91
- PageSize: 25,
92
-
93
- // Faceting for search
94
- Facets: {
95
- ReturnRecords: true,
96
- Fields: ['Status', 'Department'],
97
- Ranges: [
98
- {
99
- Field: 'CreatedDate',
100
- Start: '2020-01-01',
101
- End: '2025-12-31',
102
- Gap: 'YEAR'
103
- }
104
- ]
105
- }
106
- };
107
-
108
- provider.getRecords(filter, (err, result) => {
109
- console.log(result.Records); // Array of records
110
- console.log(result.Facets); // Facet counts
111
- });
112
- ```
113
-
114
- ## Provider Configuration
115
-
116
- ```javascript
117
- const providerConfig = {
118
- ProviderIdentifier: 'MyRecordProvider',
119
-
120
- // Auto-initialize with application
121
- AutoInitialize: true,
122
- AutoInitializeOrdinal: 1,
123
-
124
- // Don't solve with app (records loaded on demand)
125
- AutoSolveWithApp: false
126
- };
127
- ```
128
-
129
- ## Registering Providers
130
-
131
- Register your provider with the Pict instance:
132
-
133
- ```javascript
134
- // Add the provider type
135
- pict.addProviderSingleton('MyRecordProvider', providerConfig, MyRecordProvider);
136
-
137
- // Or instantiate directly
138
- const provider = pict.instantiateServiceProvider('RecordSetProviderBase', {
139
- ProviderIdentifier: 'UserProvider'
140
- });
141
- ```
142
-
143
- ## Using with Meadow Endpoints
144
-
145
- The Meadow provider can auto-generate configuration from schema:
146
-
147
- ```javascript
148
- // Fetch schema from Meadow endpoint
149
- fetch('/1.0/User/Schema')
150
- .then(response => response.json())
151
- .then(schema => {
152
- // Use schema to configure the record set
153
- app.configureFromSchema(schema);
154
- });
155
- ```
@@ -1,87 +0,0 @@
1
- {
2
- "Generated": "2026-06-01T03:49:18.603Z",
3
- "Mode": "module",
4
- "GitHubOrg": "fable-retold",
5
- "DefaultBranch": "master",
6
- "Module": {
7
- "Name": "pict-section-recordset",
8
- "Repo": "pict-section-recordset",
9
- "Group": "",
10
- "Branch": "master",
11
- "HasDocs": true,
12
- "HasCover": true,
13
- "Sidebar": [
14
- {
15
- "Title": "Getting Started",
16
- "Children": [
17
- {
18
- "Title": "Introduction",
19
- "Path": "README.md"
20
- },
21
- {
22
- "Title": "Record Providers",
23
- "Path": "record-providers.md"
24
- }
25
- ]
26
- },
27
- {
28
- "Title": "Views",
29
- "Children": [
30
- {
31
- "Title": "Create View",
32
- "Path": "views/create/README.md"
33
- },
34
- {
35
- "Title": "Read View",
36
- "Path": "views/read/README.md"
37
- },
38
- {
39
- "Title": "List View",
40
- "Path": "views/list/README.md"
41
- },
42
- {
43
- "Title": "Dashboard View",
44
- "Path": "views/dashboard/README.md"
45
- }
46
- ]
47
- },
48
- {
49
- "Title": "Configuration",
50
- "Children": [
51
- {
52
- "Title": "Filters",
53
- "Path": "filters.md"
54
- }
55
- ]
56
- },
57
- {
58
- "Title": "Reference",
59
- "Children": [
60
- {
61
- "Title": "API Reference",
62
- "Path": "api-reference.md"
63
- }
64
- ]
65
- }
66
- ],
67
- "DocFiles": [
68
- ".nojekyll",
69
- "README.md",
70
- "_brand.json",
71
- "_cover.md",
72
- "_sidebar.md",
73
- "_version.json",
74
- "api-reference.md",
75
- "filters.md",
76
- "index.html",
77
- "record-providers.md",
78
- "retold-catalog.json",
79
- "retold-keyword-index.json",
80
- "views/create/README.md",
81
- "views/dashboard/README.md",
82
- "views/list/README.md",
83
- "views/read/README.md"
84
- ]
85
- },
86
- "Groups": []
87
- }