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.
- package/package.json +5 -1
- package/source/views/RecordSet-Filters.js +196 -72
- package/source/views/filters/RecordSet-Filter-Base.js +86 -8
- package/source/views/read/RecordSet-Read.js +308 -2
- package/types/providers/Filter-Data-Provider.d.ts +1 -1
- package/types/providers/Filter-Data-Provider.d.ts.map +1 -1
- package/types/views/Filter-PersistenceView.d.ts +23 -2
- package/types/views/Filter-PersistenceView.d.ts.map +1 -1
- package/types/views/RecordSet-Filters.d.ts +54 -2
- package/types/views/RecordSet-Filters.d.ts.map +1 -1
- package/types/views/filters/RecordSet-Filter-Base.d.ts +14 -0
- package/types/views/filters/RecordSet-Filter-Base.d.ts.map +1 -1
- package/types/views/list/RecordSet-List.d.ts.map +1 -1
- package/types/views/read/RecordSet-Read.d.ts +51 -0
- package/types/views/read/RecordSet-Read.d.ts.map +1 -1
- package/.vscode/launch.json +0 -46
- package/CONTRIBUTING.md +0 -50
- package/debug/Harness.js +0 -0
- package/docs/.nojekyll +0 -0
- package/docs/README.md +0 -76
- package/docs/_brand.json +0 -18
- package/docs/_cover.md +0 -11
- package/docs/_sidebar.md +0 -19
- package/docs/_version.json +0 -7
- package/docs/api-reference.md +0 -233
- package/docs/filters.md +0 -151
- package/docs/index.html +0 -38
- package/docs/record-providers.md +0 -155
- package/docs/retold-catalog.json +0 -87
- package/docs/retold-keyword-index.json +0 -5227
- package/docs/views/create/README.md +0 -181
- package/docs/views/dashboard/README.md +0 -308
- package/docs/views/list/README.md +0 -260
- package/docs/views/read/README.md +0 -216
- package/eslint.config.mjs +0 -10
- package/example_applications/README.md +0 -39
- package/example_applications/ServeExamples.js +0 -82
- package/example_applications/bookstore/.quackage.json +0 -9
- package/example_applications/bookstore/Bookstore-Application-Configuration.json +0 -4
- package/example_applications/bookstore/Bookstore-Application.js +0 -671
- package/example_applications/bookstore/css/bookstore.css +0 -729
- package/example_applications/bookstore/css/pure.min.css +0 -11
- package/example_applications/bookstore/html/index.html +0 -46
- package/example_applications/bookstore/package.json +0 -34
- package/example_applications/bookstore/providers/PictRouter-Bookstore.json +0 -32
- package/example_applications/bookstore/views/PictView-Bookstore-Content-About.json +0 -21
- package/example_applications/bookstore/views/PictView-Bookstore-Content-Legal.json +0 -21
- package/example_applications/bookstore/views/PictView-Bookstore-Dashboard.js +0 -147
- package/example_applications/bookstore/views/PictView-Bookstore-Layout.js +0 -85
- package/example_applications/bookstore/views/PictView-Bookstore-Login.js +0 -58
- package/example_applications/bookstore/views/PictView-Bookstore-Navigation.js +0 -228
- package/example_applications/index.html +0 -50
- package/example_applications/mocks/book-edit-view.html +0 -173
- package/example_applications/mocks/book-read-view.html +0 -166
- package/example_applications/mocks/list-view.html +0 -185
- package/example_applications/package.json +0 -16
- package/example_applications/simple_entity/.quackage.json +0 -9
- package/example_applications/simple_entity/README-Simple-RecordSet.md +0 -8
- package/example_applications/simple_entity/Simple-RecordSet-Application.js +0 -887
- package/example_applications/simple_entity/html/index.html +0 -207
- package/example_applications/simple_entity/package.json +0 -27
- package/test/PictSectionRecordSet-Basic_tests.js +0 -205
- package/test/PictSectionRecordSet-Filter-Data-Provider_tests.js +0 -263
- package/test/PictSectionRecordSet-Filter-InstanceViews-Render_tests.js +0 -328
- package/test/PictSectionRecordSet-RecordProvider-Meadow_tests.js +0 -216
- package/tsconfig.build.json +0 -16
- package/tsconfig.json +0 -16
package/docs/record-providers.md
DELETED
|
@@ -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
|
-
```
|
package/docs/retold-catalog.json
DELETED
|
@@ -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
|
-
}
|