@proteinjs/db-ui 1.6.0 → 1.7.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/CHANGELOG.md +8 -0
- package/dist/generated/index.js +1 -1
- package/dist/src/form/RecordForm.d.ts +7 -0
- package/dist/src/form/RecordForm.d.ts.map +1 -1
- package/dist/src/form/RecordForm.js +29 -2
- package/dist/src/form/RecordForm.js.map +1 -1
- package/dist/src/pages/HashGeneratorPage.d.ts.map +1 -1
- package/dist/src/pages/HashGeneratorPage.js +2 -0
- package/dist/src/pages/HashGeneratorPage.js.map +1 -1
- package/dist/src/pages/TablesPage.d.ts.map +1 -1
- package/dist/src/pages/TablesPage.js +7 -0
- package/dist/src/pages/TablesPage.js.map +1 -1
- package/dist/src/pages/UuidGeneratorPage.d.ts.map +1 -1
- package/dist/src/pages/UuidGeneratorPage.js +2 -0
- package/dist/src/pages/UuidGeneratorPage.js.map +1 -1
- package/dist/test/RecordForm.test.d.ts +2 -0
- package/dist/test/RecordForm.test.d.ts.map +1 -0
- package/dist/test/RecordForm.test.js +65 -0
- package/dist/test/RecordForm.test.js.map +1 -0
- package/dist/test/devToolPagesAuth.test.d.ts +2 -0
- package/dist/test/devToolPagesAuth.test.d.ts.map +1 -0
- package/dist/test/devToolPagesAuth.test.js +24 -0
- package/dist/test/devToolPagesAuth.test.js.map +1 -0
- package/generated/index.ts +1 -1
- package/package.json +5 -4
- package/src/form/RecordForm.tsx +16 -1
- package/src/pages/HashGeneratorPage.tsx +2 -0
- package/src/pages/TablesPage.tsx +7 -0
- package/src/pages/UuidGeneratorPage.tsx +2 -0
- package/test/RecordForm.test.ts +52 -0
- package/test/devToolPagesAuth.test.ts +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.6.1](https://github.com/proteinjs/db/compare/@proteinjs/db-ui@1.6.0...@proteinjs/db-ui@1.6.1) (2026-08-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @proteinjs/db-ui
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.5.34](https://github.com/proteinjs/db/compare/@proteinjs/db-ui@1.5.33...@proteinjs/db-ui@1.5.34) (2026-07-28)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @proteinjs/db-ui
|
package/dist/generated/index.js
CHANGED
|
@@ -28,7 +28,7 @@ require("react");
|
|
|
28
28
|
require("string");
|
|
29
29
|
require("uuid");
|
|
30
30
|
/** Generate Source Graph */
|
|
31
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"QueryTableLoader\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/table/QueryTableLoader.ts\",\"qualifiedName\":\"@proteinjs/db-ui/QueryTableLoader\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"rowCountQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"paginationQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"reactQueryKeys\",\"type\":{\"packageName\":\"\",\"name\":\"TableLoader<T>['reactQueryKeys']\",\"filePath\":null,\"qualifiedName\":\"/TableLoader<T>['reactQueryKeys']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"sort\",\"type\":{\"packageName\":\"\",\"name\":\"SortCriteria<T>[]\",\"filePath\":null,\"qualifiedName\":\"/SortCriteria<T>[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"queryOptions\",\"type\":{\"packageName\":\"\",\"name\":\"QueryOptions<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryOptions<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"load\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<RowWindow<T>>\",\"filePath\":null,\"qualifiedName\":\"/Promise<RowWindow<T>>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"startIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"endIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"skipRowCount\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"TableLoader\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/TableLoader\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"/T\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/ui/TableLoader\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/RecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getFieldLayout\",\"returnType\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFieldLayout\",\"type\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"hashGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/HashGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/hashGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/ui/Page\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordFormPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordFormPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordFormPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordTablePage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordTablePage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordTablePage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"tablesPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/TablesPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/tablesPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"uuidGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/UuidGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/SpecificTableProps\"},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"MigrationRecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/customizations/MigrationRecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"migration\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Migration\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Migration\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"w\":\"@proteinjs/ui/TableLoader\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"w\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":\"extends class\"}]}";
|
|
31
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"QueryTableLoader\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/table/QueryTableLoader.ts\",\"qualifiedName\":\"@proteinjs/db-ui/QueryTableLoader\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"rowCountQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"paginationQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"reactQueryKeys\",\"type\":{\"packageName\":\"\",\"name\":\"TableLoader<T>['reactQueryKeys']\",\"filePath\":null,\"qualifiedName\":\"/TableLoader<T>['reactQueryKeys']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"sort\",\"type\":{\"packageName\":\"\",\"name\":\"SortCriteria<T>[]\",\"filePath\":null,\"qualifiedName\":\"/SortCriteria<T>[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"queryOptions\",\"type\":{\"packageName\":\"\",\"name\":\"QueryOptions<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryOptions<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"load\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<RowWindow<T>>\",\"filePath\":null,\"qualifiedName\":\"/Promise<RowWindow<T>>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"startIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"endIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"skipRowCount\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"TableLoader\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/TableLoader\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"/T\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/ui/TableLoader\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/RecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getFieldLayout\",\"returnType\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFieldLayout\",\"type\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/db-ui/SpecificTableProps\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"hashGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/HashGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/hashGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/ui/Page\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordFormPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordFormPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordFormPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordTablePage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordTablePage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordTablePage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"tablesPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/TablesPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/tablesPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"uuidGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/UuidGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"MigrationRecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/customizations/MigrationRecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"migration\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Migration\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Migration\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"w\":\"@proteinjs/ui/TableLoader\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"w\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":\"extends class\"}]}";
|
|
32
32
|
/** Generate Source Links */
|
|
33
33
|
var QueryTableLoader_1 = require("../src/table/QueryTableLoader");
|
|
34
34
|
var RecordFormCustomization_1 = require("../src/form/RecordFormCustomization");
|
|
@@ -4,5 +4,12 @@ export type RecordFormProps<T extends Record> = {
|
|
|
4
4
|
table: Table<T>;
|
|
5
5
|
record?: T;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Service-protected columns are reserved to server write paths (e.g. user.roles → the Roles
|
|
9
|
+
* service). The form never renders them, but a loaded record still carries their values —
|
|
10
|
+
* sending them back would be rejected by TableServiceAuth as a protected-column write. The form
|
|
11
|
+
* physically cannot set them; its save payload must not carry them.
|
|
12
|
+
*/
|
|
13
|
+
export declare function stripServiceProtectedColumns<T extends Record>(table: Table<T>, record: T): Partial<T>;
|
|
7
14
|
export declare function RecordForm<T extends Record>({ table, record }: RecordFormProps<T>): React.JSX.Element;
|
|
8
15
|
//# sourceMappingURL=RecordForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordForm.d.ts","sourceRoot":"","sources":["../../../src/form/RecordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EACL,KAAK,EACL,MAAM,EASP,MAAM,eAAe,CAAC;AAKvB,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;IAC9C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,CAAC;CACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"RecordForm.d.ts","sourceRoot":"","sources":["../../../src/form/RecordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EACL,KAAK,EACL,MAAM,EASP,MAAM,eAAe,CAAC;AAKvB,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;IAC9C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAOrG;AA4DD,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC,CAAC,qBA4OjF"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -39,7 +50,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
51
|
};
|
|
41
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.RecordForm = void 0;
|
|
53
|
+
exports.RecordForm = exports.stripServiceProtectedColumns = void 0;
|
|
43
54
|
var react_1 = __importDefault(require("react"));
|
|
44
55
|
var string_1 = __importDefault(require("string"));
|
|
45
56
|
var moment_1 = __importDefault(require("moment"));
|
|
@@ -49,6 +60,22 @@ var db_1 = require("@proteinjs/db");
|
|
|
49
60
|
var RecordTablePage_1 = require("../pages/RecordTablePage");
|
|
50
61
|
var RecordFormPage_1 = require("../pages/RecordFormPage");
|
|
51
62
|
var RecordFormCustomization_1 = require("./RecordFormCustomization");
|
|
63
|
+
/**
|
|
64
|
+
* Service-protected columns are reserved to server write paths (e.g. user.roles → the Roles
|
|
65
|
+
* service). The form never renders them, but a loaded record still carries their values —
|
|
66
|
+
* sending them back would be rejected by TableServiceAuth as a protected-column write. The form
|
|
67
|
+
* physically cannot set them; its save payload must not carry them.
|
|
68
|
+
*/
|
|
69
|
+
function stripServiceProtectedColumns(table, record) {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
var payload = __assign({}, record);
|
|
72
|
+
for (var _i = 0, _c = (_b = (_a = table.auth) === null || _a === void 0 ? void 0 : _a.serviceProtectedColumns) !== null && _b !== void 0 ? _b : []; _i < _c.length; _i++) {
|
|
73
|
+
var protectedColumn = _c[_i];
|
|
74
|
+
delete payload[protectedColumn];
|
|
75
|
+
}
|
|
76
|
+
return payload;
|
|
77
|
+
}
|
|
78
|
+
exports.stripServiceProtectedColumns = stripServiceProtectedColumns;
|
|
52
79
|
function isObject(value) {
|
|
53
80
|
return typeof value === 'object' && value !== null;
|
|
54
81
|
}
|
|
@@ -235,7 +262,7 @@ function RecordForm(_a) {
|
|
|
235
262
|
field = fields[columnPropertyName];
|
|
236
263
|
record[columnPropertyName] = getFieldValue(columnPropertyName, field.field.value);
|
|
237
264
|
}
|
|
238
|
-
return [4 /*yield*/, (0, db_1.getDbService)().update(table, record)];
|
|
265
|
+
return [4 /*yield*/, (0, db_1.getDbService)().update(table, stripServiceProtectedColumns(table, record))];
|
|
239
266
|
case 1:
|
|
240
267
|
_a.sent();
|
|
241
268
|
return [2 /*return*/, "Saved ".concat((0, string_1.default)(table.name).humanize().s)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordForm.js","sourceRoot":"","sources":["../../../src/form/RecordForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RecordForm.js","sourceRoot":"","sources":["../../../src/form/RecordForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,kDAAuB;AACvB,kDAA4B;AAC5B,wCAA2D;AAC3D,oCAAqE;AACrE,oCAWuB;AACvB,4DAA2D;AAC3D,0DAAyD;AACzD,qEAAuE;AAOvE;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAmB,KAAe,EAAE,MAAS;;IACvF,IAAM,OAAO,gBAAa,MAAM,CAAE,CAAC;IACnC,KAA8B,UAAyC,EAAzC,WAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,uBAAuB,mCAAI,EAAE,EAAzC,cAAyC,EAAzC,IAAyC,EAAE;QAApE,IAAM,eAAe,SAAA;QACxB,OAAO,OAAO,CAAC,eAAe,CAAC,CAAC;KACjC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAPD,oEAOC;AAID,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO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,gBAAgB,CAAC,UAAU,CAAC,EAAE;wBACvC,UAAU,GAAG,UAAU,CAAC,GAAG,IAAI,EAAE,CAAC;qBACnC;yBAAM,IAAI,qBAAqB,CAAC,UAAU,CAAC,EAAE;wBAC5C,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;qBACzC;yBAAM,IAAI,IAAA,mBAAY,EAAC,MAAM,EAAE,kBAAa,CAAC,EAAE;wBAC9C,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;qBACpD;oBAED,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC;oBACzB,IACE,kBAAkB,IAAI,SAAS;wBAC/B,kBAAkB,IAAI,SAAS;wBAC/B,kBAAkB,IAAI,IAAI;wBAC1B,IAAA,mBAAY,EAAC,MAAM,EAAE,mBAAc,CAAC,EACpC;wBACA,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;4BACxB,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC;yBAC1B;wBAED,KAAK,CAAC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC;qBACrC;iBACF;;;;KACF;AACH,CAAC;AA5OD,gCA4OC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HashGeneratorPage.d.ts","sourceRoot":"","sources":["../../../src/pages/HashGeneratorPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAwC,MAAM,eAAe,CAAC;AAGrF,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"HashGeneratorPage.d.ts","sourceRoot":"","sources":["../../../src/pages/HashGeneratorPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAwC,MAAM,eAAe,CAAC;AAGrF,eAAO,MAAM,iBAAiB,EAAE,IAqB/B,CAAC"}
|
|
@@ -60,6 +60,8 @@ var ui_1 = require("@proteinjs/ui");
|
|
|
60
60
|
exports.hashGeneratorPage = {
|
|
61
61
|
name: 'Hash Generator',
|
|
62
62
|
path: 'hash-generator',
|
|
63
|
+
/** Dev tool — gated by the abstract 'dev' permission (see tablesPage) instead of default-admin. */
|
|
64
|
+
auth: { permission: 'dev' },
|
|
63
65
|
pageContainerSxProps: function (theme) {
|
|
64
66
|
return {
|
|
65
67
|
height: '100vh',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HashGeneratorPage.js","sourceRoot":"","sources":["../../../src/pages/HashGeneratorPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,oCAAqF;AAGxE,QAAA,iBAAiB,GAAS;IACrC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,oBAAoB,EAAE,UAAC,KAAY;QACjC,OAAO;YACL,MAAM,EAAE,OAAO;YACf,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;SAClD,CAAC;IACJ,CAAC;IACD,SAAS,EAAE,cAAM,OAAA,CACf,8BAAC,aAAQ;QACP,8BAAC,SAAI,IACH,IAAI,EAAC,gBAAgB,EACrB,YAAY,EAAE,cAAM,OAAA,IAAI,mBAAmB,EAAE,EAAzB,CAAyB,EAC7C,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAC9B,OAAO,EAAE,OAAO,GAChB,CACO,CACZ,EATgB,CAShB;CACF,CAAC;AAEF;IAAkC,uCAAM;IAAxC;QAAA,qEAOC;QANC,WAAK,GAAG,IAAA,cAAS,EAAsB;YACrC,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;QACH,UAAI,GAAG,IAAA,cAAS,EAAsB;YACpC,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;;IACL,CAAC;IAAD,0BAAC;AAAD,CAAC,AAPD,CAAkC,WAAM,GAOvC;AAED,IAAM,OAAO,GA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AI,WAAW,EAAE,CAAC;oBAC5B,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBAGhB,qBAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,EAAA;;oBAAxD,UAAU,GAAG,SAA2C;oBAGxD,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;oBACnD,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAA/B,CAA+B,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;oBAE/E,sBAAO,OAAO,EAAC;;;;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablesPage.d.ts","sourceRoot":"","sources":["../../../src/pages/TablesPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAoE,MAAM,eAAe,CAAC;AAKjH,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"TablesPage.d.ts","sourceRoot":"","sources":["../../../src/pages/TablesPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAoE,MAAM,eAAe,CAAC;AAKjH,eAAO,MAAM,UAAU,EAAE,IAqBxB,CAAC"}
|
|
@@ -63,6 +63,13 @@ var material_1 = require("@mui/material");
|
|
|
63
63
|
exports.tablesPage = {
|
|
64
64
|
name: 'Tables',
|
|
65
65
|
path: 'tables',
|
|
66
|
+
/**
|
|
67
|
+
* Dev tool: browse every table and its row count. Gated by the abstract 'dev' permission
|
|
68
|
+
* (resolved through the consumer app's PermissionRolesMapping; admin passes as break-glass)
|
|
69
|
+
* instead of the implicit default-admin, so the consumer's dev-role holders can use it.
|
|
70
|
+
* Row-level reads stay enforced server-side per table.
|
|
71
|
+
*/
|
|
72
|
+
auth: { permission: 'dev' },
|
|
66
73
|
pageContainerSxProps: function (theme) {
|
|
67
74
|
return {
|
|
68
75
|
height: '100vh',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablesPage.js","sourceRoot":"","sources":["../../../src/pages/TablesPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,oCAAiH;AACjH,oCAA+D;AAC/D,qDAA0D;AAC1D,0CAAoD;AAEvC,QAAA,UAAU,GAAS;IAC9B,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,UAAC,KAAY;QACjC,OAAO;YACL,MAAM,EAAE,OAAO;YACf,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;SAClD,CAAC;IACJ,CAAC;IACD,SAAS,EAAE,cAAM,OAAA,CACf,8BAAC,aAAQ;QACP,8BAAC,MAAM,OAAG,CACD,CACZ,EAJgB,CAIhB;CACF,CAAC;AAOF;IAAiC,sCAA6B;IAC5D,4BAAoB,MAAoB;QAAxC,YACE,iBAAO,SACR;QAFmB,YAAM,GAAN,MAAM,CAAc;;IAExC,CAAC;IAEK,iCAAI,GAAV,UAAW,UAAkB,EAAE,QAAgB;;;;;;wBACvC,IAAI,GAA4B,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;wBAC7E,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;wBACjD,SAAS,GAAG,IAAA,iBAAY,GAAE,CAAC;8BACP,EAAN,iBAAM;;;6BAAN,CAAA,oBAAM,CAAA;wBAAf,KAAK;wBACG,qBAAM,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,EAAA;;wBAA7C,QAAQ,GAAG,SAAkC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B;;wBAClC,sBAAO,IAAA,uCAAqB,EAAC,GAAG,CAAC,IAAI,CAAC,EAAC;;qBACxC,GACD,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UuidGeneratorPage.d.ts","sourceRoot":"","sources":["../../../src/pages/UuidGeneratorPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAwC,MAAM,eAAe,CAAC;AAIrF,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"UuidGeneratorPage.d.ts","sourceRoot":"","sources":["../../../src/pages/UuidGeneratorPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAwC,MAAM,eAAe,CAAC;AAIrF,eAAO,MAAM,iBAAiB,EAAE,IAqB/B,CAAC"}
|
|
@@ -61,6 +61,8 @@ var uuid_1 = require("uuid");
|
|
|
61
61
|
exports.uuidGeneratorPage = {
|
|
62
62
|
name: 'Uuid Generator',
|
|
63
63
|
path: 'uuid-generator',
|
|
64
|
+
/** Dev tool — gated by the abstract 'dev' permission (see tablesPage) instead of default-admin. */
|
|
65
|
+
auth: { permission: 'dev' },
|
|
64
66
|
pageContainerSxProps: function (theme) {
|
|
65
67
|
return {
|
|
66
68
|
height: '100vh',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UuidGeneratorPage.js","sourceRoot":"","sources":["../../../src/pages/UuidGeneratorPage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,oCAAqF;AACrF,6BAAoC;AAGvB,QAAA,iBAAiB,GAAS;IACrC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,oBAAoB,EAAE,UAAC,KAAY;QACjC,OAAO;YACL,MAAM,EAAE,OAAO;YACf,eAAe,EAAE,KAAK,CAAC,OAAO,C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,UAAU,CAAC,OAAO;SAClD,CAAC;IACJ,CAAC;IACD,SAAS,EAAE,cAAM,OAAA,CACf,8BAAC,aAAQ;QACP,8BAAC,SAAI,IACH,IAAI,EAAC,gBAAgB,EACrB,YAAY,EAAE,cAAM,OAAA,IAAI,UAAU,EAAE,EAAhB,CAAgB,EACpC,WAAW,EAAE,CAAC,MAAM,CAAC,EACrB,OAAO,EAAE,OAAO,GAChB,CACO,CACZ,EATgB,CAShB;CACF,CAAC;AAEF;IAAyB,8BAAM;IAA/B;QAAA,qEAIC;QAHC,UAAI,GAAG,IAAA,cAAS,EAAa;YAC3B,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;;IACL,CAAC;IAAD,iBAAC;AAAD,CAAC,AAJD,CAAyB,WAAM,GAI9B;AAED,IAAM,OAAO,GAA4B;IACvC,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,WAAW;SACrB;QACD,OAAO,EAAE,UAAO,MAAkB,EAAE,OAAgC;;gBAClE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAA,SAAM,GAAE,CAAC;;;aACpC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordForm.test.d.ts","sourceRoot":"","sources":["../../test/RecordForm.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var db_1 = require("@proteinjs/db");
|
|
19
|
+
var RecordForm_1 = require("../src/form/RecordForm");
|
|
20
|
+
var ProtectedColumnTable = /** @class */ (function (_super) {
|
|
21
|
+
__extends(ProtectedColumnTable, _super);
|
|
22
|
+
function ProtectedColumnTable() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.name = 'record_form_protected_test';
|
|
25
|
+
_this.auth = {
|
|
26
|
+
service: { all: 'authenticated' },
|
|
27
|
+
serviceProtectedColumns: ['owner'],
|
|
28
|
+
};
|
|
29
|
+
_this.columns = (0, db_1.withRecordColumns)({
|
|
30
|
+
title: new db_1.StringColumn('title'),
|
|
31
|
+
owner: new db_1.StringColumn('owner'),
|
|
32
|
+
});
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
return ProtectedColumnTable;
|
|
36
|
+
}(db_1.Table));
|
|
37
|
+
var OpenTable = /** @class */ (function (_super) {
|
|
38
|
+
__extends(OpenTable, _super);
|
|
39
|
+
function OpenTable() {
|
|
40
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
41
|
+
_this.name = 'record_form_open_test';
|
|
42
|
+
_this.columns = (0, db_1.withRecordColumns)({
|
|
43
|
+
title: new db_1.StringColumn('title'),
|
|
44
|
+
owner: new db_1.StringColumn('owner'),
|
|
45
|
+
});
|
|
46
|
+
return _this;
|
|
47
|
+
}
|
|
48
|
+
return OpenTable;
|
|
49
|
+
}(db_1.Table));
|
|
50
|
+
var record = { id: 'doc-1', title: 't', owner: 'server-set-owner' };
|
|
51
|
+
describe('stripServiceProtectedColumns', function () {
|
|
52
|
+
it('drops protected columns from the save payload and keeps everything else', function () {
|
|
53
|
+
var payload = (0, RecordForm_1.stripServiceProtectedColumns)(new ProtectedColumnTable(), record);
|
|
54
|
+
expect(payload).toEqual({ id: 'doc-1', title: 't' });
|
|
55
|
+
});
|
|
56
|
+
it('leaves records untouched on tables without protected columns', function () {
|
|
57
|
+
var payload = (0, RecordForm_1.stripServiceProtectedColumns)(new OpenTable(), record);
|
|
58
|
+
expect(payload).toEqual(record);
|
|
59
|
+
});
|
|
60
|
+
it('does not mutate the loaded record (the form re-renders from it)', function () {
|
|
61
|
+
(0, RecordForm_1.stripServiceProtectedColumns)(new ProtectedColumnTable(), record);
|
|
62
|
+
expect(record.owner).toBe('server-set-owner');
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=RecordForm.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordForm.test.js","sourceRoot":"","sources":["../../test/RecordForm.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oCAA+E;AAC/E,qDAAsE;AAatE;IAAmC,wCAAU;IAA7C;QAAA,qEAUC;QATQ,UAAI,GAAG,4BAA4B,CAAC;QACpC,UAAI,GAAuB;YAChC,OAAO,EAAE,EAAE,GAAG,EAAE,eAAe,EAAE;YACjC,uBAAuB,EAAE,CAAC,OAAO,CAAC;SACnC,CAAC;QACK,aAAO,GAAG,IAAA,sBAAiB,EAAM;YACtC,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;YAChC,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;SACjC,CAAC,CAAC;;IACL,CAAC;IAAD,2BAAC;AAAD,CAAC,AAVD,CAAmC,UAAK,GAUvC;AAED;IAAwB,6BAAU;IAAlC;QAAA,qEAMC;QALQ,UAAI,GAAG,uBAAuB,CAAC;QAC/B,aAAO,GAAG,IAAA,sBAAiB,EAAM;YACtC,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;YAChC,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;SACjC,CAAC,CAAC;;IACL,CAAC;IAAD,gBAAC;AAAD,CAAC,AAND,CAAwB,UAAK,GAM5B;AAED,IAAM,MAAM,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,EAAS,CAAC;AAE7E,QAAQ,CAAC,8BAA8B,EAAE;IACvC,EAAE,CAAC,yEAAyE,EAAE;QAC5E,IAAM,OAAO,GAAG,IAAA,yCAA4B,EAAC,IAAI,oBAAoB,EAAE,EAAE,MAAM,CAAC,CAAC;QACjF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE;QACjE,IAAM,OAAO,GAAG,IAAA,yCAA4B,EAAC,IAAI,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;QACtE,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE;QACpE,IAAA,yCAA4B,EAAC,IAAI,oBAAoB,EAAE,EAAE,MAAM,CAAC,CAAC;QACjE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devToolPagesAuth.test.d.ts","sourceRoot":"","sources":["../../test/devToolPagesAuth.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var TablesPage_1 = require("../src/pages/TablesPage");
|
|
4
|
+
var HashGeneratorPage_1 = require("../src/pages/HashGeneratorPage");
|
|
5
|
+
var UuidGeneratorPage_1 = require("../src/pages/UuidGeneratorPage");
|
|
6
|
+
/**
|
|
7
|
+
* The dev-tool pages (tables browser, hash/uuid generators) declare the abstract 'dev'
|
|
8
|
+
* permission EXPLICITLY instead of leaning on the default-admin fallback. The consumer app maps
|
|
9
|
+
* 'dev' to its roles (admin passes as break-glass), so holders of the consumer's dev roles can
|
|
10
|
+
* reach these tools without holding admin. A page that loses its auth block silently regresses
|
|
11
|
+
* to admin-only — this pins the gate.
|
|
12
|
+
*/
|
|
13
|
+
describe('dev-tool pages declare the dev permission', function () {
|
|
14
|
+
it('tables browser requires the dev permission', function () {
|
|
15
|
+
expect(TablesPage_1.tablesPage.auth).toEqual({ permission: 'dev' });
|
|
16
|
+
});
|
|
17
|
+
it('hash generator requires the dev permission', function () {
|
|
18
|
+
expect(HashGeneratorPage_1.hashGeneratorPage.auth).toEqual({ permission: 'dev' });
|
|
19
|
+
});
|
|
20
|
+
it('uuid generator requires the dev permission', function () {
|
|
21
|
+
expect(UuidGeneratorPage_1.uuidGeneratorPage.auth).toEqual({ permission: 'dev' });
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=devToolPagesAuth.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devToolPagesAuth.test.js","sourceRoot":"","sources":["../../test/devToolPagesAuth.test.ts"],"names":[],"mappings":";;AAAA,sDAAqD;AACrD,oEAAmE;AACnE,oEAAmE;AAEnE;;;;;;GAMG;AACH,QAAQ,CAAC,2CAA2C,EAAE;IACpD,EAAE,CAAC,4CAA4C,EAAE;QAC/C,MAAM,CAAC,uBAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE;QAC/C,MAAM,CAAC,qCAAiB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE;QAC/C,MAAM,CAAC,qCAAiB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/generated/index.ts
CHANGED
|
@@ -16,7 +16,7 @@ import 'uuid';
|
|
|
16
16
|
|
|
17
17
|
/** Generate Source Graph */
|
|
18
18
|
|
|
19
|
-
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"QueryTableLoader\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/table/QueryTableLoader.ts\",\"qualifiedName\":\"@proteinjs/db-ui/QueryTableLoader\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"rowCountQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"paginationQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"reactQueryKeys\",\"type\":{\"packageName\":\"\",\"name\":\"TableLoader<T>['reactQueryKeys']\",\"filePath\":null,\"qualifiedName\":\"/TableLoader<T>['reactQueryKeys']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"sort\",\"type\":{\"packageName\":\"\",\"name\":\"SortCriteria<T>[]\",\"filePath\":null,\"qualifiedName\":\"/SortCriteria<T>[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"queryOptions\",\"type\":{\"packageName\":\"\",\"name\":\"QueryOptions<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryOptions<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"load\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<RowWindow<T>>\",\"filePath\":null,\"qualifiedName\":\"/Promise<RowWindow<T>>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"startIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"endIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"skipRowCount\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"TableLoader\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/TableLoader\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"/T\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/ui/TableLoader\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/RecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getFieldLayout\",\"returnType\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFieldLayout\",\"type\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"hashGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/HashGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/hashGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/ui/Page\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordFormPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordFormPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordFormPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordTablePage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordTablePage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordTablePage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"tablesPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/TablesPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/tablesPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"uuidGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/UuidGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/SpecificTableProps\"},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"MigrationRecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/customizations/MigrationRecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"migration\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Migration\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Migration\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"w\":\"@proteinjs/ui/TableLoader\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"w\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":\"extends class\"}]}";
|
|
19
|
+
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"QueryTableLoader\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/table/QueryTableLoader.ts\",\"qualifiedName\":\"@proteinjs/db-ui/QueryTableLoader\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"rowCountQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"paginationQb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"reactQueryKeys\",\"type\":{\"packageName\":\"\",\"name\":\"TableLoader<T>['reactQueryKeys']\",\"filePath\":null,\"qualifiedName\":\"/TableLoader<T>['reactQueryKeys']\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<T>\",\"filePath\":null,\"qualifiedName\":\"/Table<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"query\",\"type\":{\"packageName\":\"\",\"name\":\"Query<T>\",\"filePath\":null,\"qualifiedName\":\"/Query<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"sort\",\"type\":{\"packageName\":\"\",\"name\":\"SortCriteria<T>[]\",\"filePath\":null,\"qualifiedName\":\"/SortCriteria<T>[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"queryOptions\",\"type\":{\"packageName\":\"\",\"name\":\"QueryOptions<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryOptions<T>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"load\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<RowWindow<T>>\",\"filePath\":null,\"qualifiedName\":\"/Promise<RowWindow<T>>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"startIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"endIndex\",\"type\":{\"packageName\":\"\",\"name\":\"number\",\"filePath\":null,\"qualifiedName\":\"/number\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"skipRowCount\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[\"/T extends Record\"],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"TableLoader\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/TableLoader\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"/T\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/ui/TableLoader\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/RecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":{\"packageName\":\"\",\"name\":\"Table<any>\",\"filePath\":null,\"qualifiedName\":\"/Table<any>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getFieldLayout\",\"returnType\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"record\",\"type\":{\"packageName\":\"\",\"name\":\"any\",\"filePath\":null,\"qualifiedName\":\"/any\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFieldLayout\",\"type\":{\"packageName\":\"\",\"name\":\"string[] | string[][]\",\"filePath\":null,\"qualifiedName\":\"/string[] | string[][]\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/db-ui/SpecificTableProps\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"hashGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/HashGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/hashGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/ui/Page\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordFormPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordFormPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordFormPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordTablePage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/RecordTablePage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/recordTablePage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"tablesPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/TablesPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/tablesPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"uuidGeneratorPage\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/pages/UuidGeneratorPage.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/Page\",\"typeParameters\":[],\"directParents\":null}]},\"isExported\":true,\"isConst\":true,\"sourceType\":0}},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"MigrationRecordFormCustomization\",\"filePath\":\"/Users/brentbahry/repos/farm/n3xa2/packages/proteinjs/packages/db/packages/ui/src/form/customizations/MigrationRecordFormCustomization.tsx\",\"qualifiedName\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"table\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[{\"name\":\"getFormButtons\",\"returnType\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"migration\",\"type\":{\"packageName\":\"@proteinjs/db\",\"name\":\"Migration\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Migration\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"defaultFormButtons\",\"type\":{\"packageName\":\"\",\"name\":\"FormButtons<any>\",\"filePath\":null,\"qualifiedName\":\"/FormButtons<any>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"RecordFormCustomization\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-ui/RecordFormCustomization\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/db-ui/QueryTableLoader\",\"w\":\"@proteinjs/ui/TableLoader\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/RecordFormCustomization\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-ui/hashGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordFormPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/tablesPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/uuidGeneratorPage\",\"w\":\"@proteinjs/ui/Page\",\"value\":\"has type\"},{\"v\":\"@proteinjs/db-ui/MigrationRecordFormCustomization\",\"w\":\"@proteinjs/db-ui/RecordFormCustomization\",\"value\":\"extends class\"}]}";
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
/** Generate Source Links */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/db-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Db ui components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -18,16 +18,17 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"clean": "rm -rf dist/ node_modules/ generated/",
|
|
20
20
|
"build": "reflection-build && tsc",
|
|
21
|
-
"watch": "reflection-watch"
|
|
21
|
+
"watch": "reflection-watch",
|
|
22
|
+
"test": "jest --passWithNoTests"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@emotion/react": "11.11.1",
|
|
25
26
|
"@emotion/styled": "11.11.0",
|
|
26
27
|
"@mui/icons-material": "5.14.11",
|
|
27
28
|
"@mui/material": "5.14.11",
|
|
28
|
-
"@proteinjs/db": "^1.
|
|
29
|
+
"@proteinjs/db": "^1.28.0",
|
|
29
30
|
"@proteinjs/reflection": "^1.1.12",
|
|
30
|
-
"@proteinjs/ui": "^4.
|
|
31
|
+
"@proteinjs/ui": "^4.5.0",
|
|
31
32
|
"@proteinjs/util": "^1.6.1",
|
|
32
33
|
"moment": "2.29.4",
|
|
33
34
|
"react": "18.2.0",
|
package/src/form/RecordForm.tsx
CHANGED
|
@@ -24,6 +24,21 @@ export type RecordFormProps<T extends Record> = {
|
|
|
24
24
|
record?: T;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Service-protected columns are reserved to server write paths (e.g. user.roles → the Roles
|
|
29
|
+
* service). The form never renders them, but a loaded record still carries their values —
|
|
30
|
+
* sending them back would be rejected by TableServiceAuth as a protected-column write. The form
|
|
31
|
+
* physically cannot set them; its save payload must not carry them.
|
|
32
|
+
*/
|
|
33
|
+
export function stripServiceProtectedColumns<T extends Record>(table: Table<T>, record: T): Partial<T> {
|
|
34
|
+
const payload: any = { ...record };
|
|
35
|
+
for (const protectedColumn of table.auth?.serviceProtectedColumns ?? []) {
|
|
36
|
+
delete payload[protectedColumn];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return payload;
|
|
40
|
+
}
|
|
41
|
+
|
|
27
42
|
type PlainObject = { [key: string]: unknown };
|
|
28
43
|
|
|
29
44
|
function isObject(value: unknown): value is PlainObject {
|
|
@@ -247,7 +262,7 @@ export function RecordForm<T extends Record>({ table, record }: RecordFormProps<
|
|
|
247
262
|
(record as any)[columnPropertyName] = getFieldValue(columnPropertyName, field.field.value);
|
|
248
263
|
}
|
|
249
264
|
|
|
250
|
-
await getDbService().update(table, record);
|
|
265
|
+
await getDbService().update(table, stripServiceProtectedColumns(table, record));
|
|
251
266
|
return `Saved ${S(table.name).humanize().s}`;
|
|
252
267
|
},
|
|
253
268
|
progressMessage: (fields: Fields) => {
|
|
@@ -5,6 +5,8 @@ import { SxProps, Theme } from '@mui/material';
|
|
|
5
5
|
export const hashGeneratorPage: Page = {
|
|
6
6
|
name: 'Hash Generator',
|
|
7
7
|
path: 'hash-generator',
|
|
8
|
+
/** Dev tool — gated by the abstract 'dev' permission (see tablesPage) instead of default-admin. */
|
|
9
|
+
auth: { permission: 'dev' },
|
|
8
10
|
pageContainerSxProps: (theme: Theme): SxProps => {
|
|
9
11
|
return {
|
|
10
12
|
height: '100vh',
|
package/src/pages/TablesPage.tsx
CHANGED
|
@@ -7,6 +7,13 @@ import { Box, SxProps, Theme } from '@mui/material';
|
|
|
7
7
|
export const tablesPage: Page = {
|
|
8
8
|
name: 'Tables',
|
|
9
9
|
path: 'tables',
|
|
10
|
+
/**
|
|
11
|
+
* Dev tool: browse every table and its row count. Gated by the abstract 'dev' permission
|
|
12
|
+
* (resolved through the consumer app's PermissionRolesMapping; admin passes as break-glass)
|
|
13
|
+
* instead of the implicit default-admin, so the consumer's dev-role holders can use it.
|
|
14
|
+
* Row-level reads stay enforced server-side per table.
|
|
15
|
+
*/
|
|
16
|
+
auth: { permission: 'dev' },
|
|
10
17
|
pageContainerSxProps: (theme: Theme): SxProps => {
|
|
11
18
|
return {
|
|
12
19
|
height: '100vh',
|
|
@@ -6,6 +6,8 @@ import { SxProps, Theme } from '@mui/material';
|
|
|
6
6
|
export const uuidGeneratorPage: Page = {
|
|
7
7
|
name: 'Uuid Generator',
|
|
8
8
|
path: 'uuid-generator',
|
|
9
|
+
/** Dev tool — gated by the abstract 'dev' permission (see tablesPage) instead of default-admin. */
|
|
10
|
+
auth: { permission: 'dev' },
|
|
9
11
|
pageContainerSxProps: (theme: Theme): SxProps => {
|
|
10
12
|
return {
|
|
11
13
|
height: '100vh',
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Record, StringColumn, Table, withRecordColumns } from '@proteinjs/db';
|
|
2
|
+
import { stripServiceProtectedColumns } from '../src/form/RecordForm';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The record form's save path sends the whole loaded record; service-protected columns must be
|
|
6
|
+
* stripped from that payload — TableServiceAuth rejects any service write that sets one, so a
|
|
7
|
+
* form that echoed the loaded value back would make every save of such a record fail.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
interface Doc extends Record {
|
|
11
|
+
title: string;
|
|
12
|
+
owner?: string | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
class ProtectedColumnTable extends Table<Doc> {
|
|
16
|
+
public name = 'record_form_protected_test';
|
|
17
|
+
public auth: Table<Doc>['auth'] = {
|
|
18
|
+
service: { all: 'authenticated' },
|
|
19
|
+
serviceProtectedColumns: ['owner'],
|
|
20
|
+
};
|
|
21
|
+
public columns = withRecordColumns<Doc>({
|
|
22
|
+
title: new StringColumn('title'),
|
|
23
|
+
owner: new StringColumn('owner'),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
class OpenTable extends Table<Doc> {
|
|
28
|
+
public name = 'record_form_open_test';
|
|
29
|
+
public columns = withRecordColumns<Doc>({
|
|
30
|
+
title: new StringColumn('title'),
|
|
31
|
+
owner: new StringColumn('owner'),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const record = { id: 'doc-1', title: 't', owner: 'server-set-owner' } as Doc;
|
|
36
|
+
|
|
37
|
+
describe('stripServiceProtectedColumns', () => {
|
|
38
|
+
it('drops protected columns from the save payload and keeps everything else', () => {
|
|
39
|
+
const payload = stripServiceProtectedColumns(new ProtectedColumnTable(), record);
|
|
40
|
+
expect(payload).toEqual({ id: 'doc-1', title: 't' });
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('leaves records untouched on tables without protected columns', () => {
|
|
44
|
+
const payload = stripServiceProtectedColumns(new OpenTable(), record);
|
|
45
|
+
expect(payload).toEqual(record);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('does not mutate the loaded record (the form re-renders from it)', () => {
|
|
49
|
+
stripServiceProtectedColumns(new ProtectedColumnTable(), record);
|
|
50
|
+
expect(record.owner).toBe('server-set-owner');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { tablesPage } from '../src/pages/TablesPage';
|
|
2
|
+
import { hashGeneratorPage } from '../src/pages/HashGeneratorPage';
|
|
3
|
+
import { uuidGeneratorPage } from '../src/pages/UuidGeneratorPage';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The dev-tool pages (tables browser, hash/uuid generators) declare the abstract 'dev'
|
|
7
|
+
* permission EXPLICITLY instead of leaning on the default-admin fallback. The consumer app maps
|
|
8
|
+
* 'dev' to its roles (admin passes as break-glass), so holders of the consumer's dev roles can
|
|
9
|
+
* reach these tools without holding admin. A page that loses its auth block silently regresses
|
|
10
|
+
* to admin-only — this pins the gate.
|
|
11
|
+
*/
|
|
12
|
+
describe('dev-tool pages declare the dev permission', () => {
|
|
13
|
+
it('tables browser requires the dev permission', () => {
|
|
14
|
+
expect(tablesPage.auth).toEqual({ permission: 'dev' });
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('hash generator requires the dev permission', () => {
|
|
18
|
+
expect(hashGeneratorPage.auth).toEqual({ permission: 'dev' });
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('uuid generator requires the dev permission', () => {
|
|
22
|
+
expect(uuidGeneratorPage.auth).toEqual({ permission: 'dev' });
|
|
23
|
+
});
|
|
24
|
+
});
|