@proteinjs/db-ui 1.0.3
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 +24 -0
- package/LICENSE +21 -0
- package/dist/generated/index.d.ts +15 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +53 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/src/form/RecordForm.d.ts +8 -0
- package/dist/src/form/RecordForm.d.ts.map +1 -0
- package/dist/src/form/RecordForm.js +232 -0
- package/dist/src/form/RecordForm.js.map +1 -0
- package/dist/src/form/RecordFormCustomization.d.ts +10 -0
- package/dist/src/form/RecordFormCustomization.d.ts.map +1 -0
- package/dist/src/form/RecordFormCustomization.js +25 -0
- package/dist/src/form/RecordFormCustomization.js.map +1 -0
- package/dist/src/form/customizations/MigrationRecordFormCustomization.d.ts +8 -0
- package/dist/src/form/customizations/MigrationRecordFormCustomization.d.ts.map +1 -0
- package/dist/src/form/customizations/MigrationRecordFormCustomization.js +106 -0
- package/dist/src/form/customizations/MigrationRecordFormCustomization.js.map +1 -0
- package/dist/src/pages/RecordFormPage.d.ts +5 -0
- package/dist/src/pages/RecordFormPage.d.ts.map +1 -0
- package/dist/src/pages/RecordFormPage.js +140 -0
- package/dist/src/pages/RecordFormPage.js.map +1 -0
- package/dist/src/pages/RecordTablePage.d.ts +6 -0
- package/dist/src/pages/RecordTablePage.d.ts.map +1 -0
- package/dist/src/pages/RecordTablePage.js +77 -0
- package/dist/src/pages/RecordTablePage.js.map +1 -0
- package/dist/src/pages/TablesPage.d.ts +3 -0
- package/dist/src/pages/TablesPage.d.ts.map +1 -0
- package/dist/src/pages/TablesPage.js +93 -0
- package/dist/src/pages/TablesPage.js.map +1 -0
- package/dist/src/pages/UuidGeneratorPage.d.ts +3 -0
- package/dist/src/pages/UuidGeneratorPage.d.ts.map +1 -0
- package/dist/src/pages/UuidGeneratorPage.js +93 -0
- package/dist/src/pages/UuidGeneratorPage.js.map +1 -0
- package/dist/src/table/QueryTableLoader.d.ts +10 -0
- package/dist/src/table/QueryTableLoader.d.ts.map +1 -0
- package/dist/src/table/QueryTableLoader.js +71 -0
- package/dist/src/table/QueryTableLoader.js.map +1 -0
- package/dist/src/table/RecordTable.d.ts +15 -0
- package/dist/src/table/RecordTable.d.ts.map +1 -0
- package/dist/src/table/RecordTable.js +138 -0
- package/dist/src/table/RecordTable.js.map +1 -0
- package/generated/index.ts +49 -0
- package/index.ts +4 -0
- package/jest.config.js +18 -0
- package/package.json +51 -0
- package/src/form/RecordForm.tsx +191 -0
- package/src/form/RecordFormCustomization.tsx +20 -0
- package/src/form/customizations/MigrationRecordFormCustomization.tsx +29 -0
- package/src/pages/RecordFormPage.tsx +81 -0
- package/src/pages/RecordTablePage.tsx +56 -0
- package/src/pages/TablesPage.tsx +48 -0
- package/src/pages/UuidGeneratorPage.tsx +37 -0
- package/src/table/QueryTableLoader.ts +23 -0
- package/src/table/RecordTable.tsx +112 -0
- package/tsconfig.json +18 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [1.0.3](https://github.com/proteinjs/db/compare/@proteinjs/db-ui@1.0.2...@proteinjs/db-ui@1.0.3) (2024-04-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @proteinjs/db-ui
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.2](https://github.com/brentbahry/db/compare/@proteinjs/db-ui@1.0.1...@proteinjs/db-ui@1.0.2) (2024-04-19)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @proteinjs/db-ui
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.0.1 (2024-04-19)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @proteinjs/db-ui
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Brent Bahry
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Load Dependency Source Graphs */
|
|
2
|
+
import '@emotion/react';
|
|
3
|
+
import '@emotion/styled';
|
|
4
|
+
import '@mui/icons-material';
|
|
5
|
+
import '@mui/material';
|
|
6
|
+
import '@proteinjs/db';
|
|
7
|
+
import '@proteinjs/reflection';
|
|
8
|
+
import '@proteinjs/ui';
|
|
9
|
+
import '@proteinjs/util';
|
|
10
|
+
import 'moment';
|
|
11
|
+
import 'react';
|
|
12
|
+
import 'string';
|
|
13
|
+
import 'uuid';
|
|
14
|
+
export * from '../index';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,gBAAgB,CAAC;AACxB,OAAO,iBAAiB,CAAC;AACzB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,eAAe,CAAC;AACvB,OAAO,eAAe,CAAC;AACvB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,eAAe,CAAC;AACvB,OAAO,iBAAiB,CAAC;AACzB,OAAO,QAAQ,CAAC;AAChB,OAAO,OAAO,CAAC;AACf,OAAO,QAAQ,CAAC;AAChB,OAAO,MAAM,CAAC;AAmCd,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Load Dependency Source Graphs */
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
require("@emotion/react");
|
|
19
|
+
require("@emotion/styled");
|
|
20
|
+
require("@mui/icons-material");
|
|
21
|
+
require("@mui/material");
|
|
22
|
+
require("@proteinjs/db");
|
|
23
|
+
require("@proteinjs/reflection");
|
|
24
|
+
require("@proteinjs/ui");
|
|
25
|
+
require("@proteinjs/util");
|
|
26
|
+
require("moment");
|
|
27
|
+
require("react");
|
|
28
|
+
require("string");
|
|
29
|
+
require("uuid");
|
|
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\":\"/home/runner/work/db/db/packages/ui/src/table/QueryTableLoader.ts\",\"qualifiedName\":\"@proteinjs/db-ui/QueryTableLoader\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"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\"}],\"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}}]}],\"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\":\"/home/runner/work/db/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}}]}],\"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/recordFormPage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordFormPage\",\"filePath\":\"/home/runner/work/db/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/ui/Page\"},{\"v\":\"@proteinjs/db-ui/recordTablePage\",\"value\":{\"packageName\":\"@proteinjs/db-ui\",\"name\":\"recordTablePage\",\"filePath\":\"/home/runner/work/db/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\":\"/home/runner/work/db/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\":\"/home/runner/work/db/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\":\"/home/runner/work/db/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/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
|
+
/** Generate Source Links */
|
|
33
|
+
var QueryTableLoader_1 = require("../src/table/QueryTableLoader");
|
|
34
|
+
var RecordFormCustomization_1 = require("../src/form/RecordFormCustomization");
|
|
35
|
+
var RecordFormPage_1 = require("../src/pages/RecordFormPage");
|
|
36
|
+
var RecordTablePage_1 = require("../src/pages/RecordTablePage");
|
|
37
|
+
var TablesPage_1 = require("../src/pages/TablesPage");
|
|
38
|
+
var UuidGeneratorPage_1 = require("../src/pages/UuidGeneratorPage");
|
|
39
|
+
var MigrationRecordFormCustomization_1 = require("../src/form/customizations/MigrationRecordFormCustomization");
|
|
40
|
+
var sourceLinks = {
|
|
41
|
+
'@proteinjs/db-ui/QueryTableLoader': QueryTableLoader_1.QueryTableLoader,
|
|
42
|
+
'@proteinjs/db-ui/RecordFormCustomization': RecordFormCustomization_1.RecordFormCustomization,
|
|
43
|
+
'@proteinjs/db-ui/recordFormPage': RecordFormPage_1.recordFormPage,
|
|
44
|
+
'@proteinjs/db-ui/recordTablePage': RecordTablePage_1.recordTablePage,
|
|
45
|
+
'@proteinjs/db-ui/tablesPage': TablesPage_1.tablesPage,
|
|
46
|
+
'@proteinjs/db-ui/uuidGeneratorPage': UuidGeneratorPage_1.uuidGeneratorPage,
|
|
47
|
+
'@proteinjs/db-ui/MigrationRecordFormCustomization': MigrationRecordFormCustomization_1.MigrationRecordFormCustomization,
|
|
48
|
+
};
|
|
49
|
+
/** Load Source Graph and Links */
|
|
50
|
+
var reflection_1 = require("@proteinjs/reflection");
|
|
51
|
+
reflection_1.SourceRepository.merge(sourceGraph, sourceLinks);
|
|
52
|
+
__exportStar(require("../index"), exports);
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,0BAAwB;AACxB,2BAAyB;AACzB,+BAA6B;AAC7B,yBAAuB;AACvB,yBAAuB;AACvB,iCAA+B;AAC/B,yBAAuB;AACvB,2BAAyB;AACzB,kBAAgB;AAChB,iBAAe;AACf,kBAAgB;AAChB,gBAAc;AAGd,4BAA4B;AAE5B,IAAM,WAAW,GAAG,00RAA00R,CAAC;AAG/1R,4BAA4B;AAE5B,kEAAiE;AACjE,+EAA8E;AAC9E,8DAA6D;AAC7D,gEAA+D;AAC/D,sDAAqD;AACrD,oEAAmE;AACnE,gHAA+G;AAE/G,IAAM,WAAW,GAAG;IACnB,mCAAmC,EAAE,mCAAgB;IACrD,0CAA0C,EAAE,iDAAuB;IACnE,iCAAiC,EAAE,+BAAc;IACjD,kCAAkC,EAAE,iCAAe;IACnD,6BAA6B,EAAE,uBAAU;IACzC,oCAAoC,EAAE,qCAAiB;IACvD,mDAAmD,EAAE,mEAAgC;CACrF,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,uBAAuB,CAAA;AACrC,cAAc,oCAAoC,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/table/RecordTable"), exports);
|
|
18
|
+
__exportStar(require("./src/table/QueryTableLoader"), exports);
|
|
19
|
+
__exportStar(require("./src/form/RecordForm"), exports);
|
|
20
|
+
__exportStar(require("./src/form/RecordFormCustomization"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,+DAA4C;AAC5C,wDAAqC;AACrC,qEAAkD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Table, Record } from '@proteinjs/db';
|
|
3
|
+
export type RecordFormProps<T extends Record> = {
|
|
4
|
+
table: Table<T>;
|
|
5
|
+
record?: T;
|
|
6
|
+
};
|
|
7
|
+
export declare function RecordForm<T extends Record>({ table, record }: RecordFormProps<T>): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=RecordForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordForm.d.ts","sourceRoot":"","sources":["../../../src/form/RecordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,KAAK,EAAE,MAAM,EAA2F,MAAM,eAAe,CAAA;AAKtI,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;IAC9C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,CAAC;CACZ,CAAA;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC,CAAC,qBA+KjF"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.RecordForm = void 0;
|
|
43
|
+
var react_1 = __importDefault(require("react"));
|
|
44
|
+
var string_1 = __importDefault(require("string"));
|
|
45
|
+
var moment_1 = __importDefault(require("moment"));
|
|
46
|
+
var util_1 = require("@proteinjs/util");
|
|
47
|
+
var ui_1 = require("@proteinjs/ui");
|
|
48
|
+
var db_1 = require("@proteinjs/db");
|
|
49
|
+
var RecordTablePage_1 = require("../pages/RecordTablePage");
|
|
50
|
+
var RecordFormPage_1 = require("../pages/RecordFormPage");
|
|
51
|
+
var RecordFormCustomization_1 = require("./RecordFormCustomization");
|
|
52
|
+
function RecordForm(_a) {
|
|
53
|
+
var table = _a.table, record = _a.record;
|
|
54
|
+
var isNewRecord = typeof record === 'undefined';
|
|
55
|
+
var recordFormCustomization = (0, RecordFormCustomization_1.getRecordFormCustomization)(table.name);
|
|
56
|
+
return (react_1.default.createElement(ui_1.Form, { name: (0, string_1.default)(table.name).humanize().s, createFields: createFields(), fieldLayout: fieldLayout(), buttons: (recordFormCustomization === null || recordFormCustomization === void 0 ? void 0 : recordFormCustomization.getFormButtons) ? recordFormCustomization.getFormButtons(record, buttons()) : buttons(), onLoad: onLoad, onLoadProgressMessage: "Loading ".concat((0, string_1.default)(table.name).humanize().s) }));
|
|
57
|
+
function getColumns() {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
var columns = {};
|
|
60
|
+
var nameColumn = table.columns['name'];
|
|
61
|
+
if (nameColumn)
|
|
62
|
+
columns['name'] = nameColumn;
|
|
63
|
+
for (var columnPropertyName in table.columns) {
|
|
64
|
+
var column = table.columns[columnPropertyName];
|
|
65
|
+
if (columnPropertyName == 'name' || columnPropertyName == 'created' || columnPropertyName == 'updated')
|
|
66
|
+
continue;
|
|
67
|
+
if ((_b = (_a = column.options) === null || _a === void 0 ? void 0 : _a.ui) === null || _b === void 0 ? void 0 : _b.hidden)
|
|
68
|
+
continue;
|
|
69
|
+
if ((column instanceof db_1.StringColumn && column.maxLength === 'MAX') || column instanceof db_1.ReferenceArrayColumn)
|
|
70
|
+
continue;
|
|
71
|
+
columns[columnPropertyName] = column;
|
|
72
|
+
}
|
|
73
|
+
if (!isNewRecord) {
|
|
74
|
+
columns['created'] = table.columns['created'];
|
|
75
|
+
columns['updated'] = table.columns['updated'];
|
|
76
|
+
}
|
|
77
|
+
return columns;
|
|
78
|
+
}
|
|
79
|
+
function createFields() {
|
|
80
|
+
return function () {
|
|
81
|
+
var fields = {};
|
|
82
|
+
for (var columnPropertyName in getColumns()) {
|
|
83
|
+
fields[columnPropertyName] = (0, ui_1.textField)({
|
|
84
|
+
name: columnPropertyName,
|
|
85
|
+
label: util_1.StringUtil.humanizeCamel(columnPropertyName),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return fields;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function fieldLayout() {
|
|
92
|
+
var columns = getColumns();
|
|
93
|
+
var layoutColumns = Object.entries(columns).length > 6 ? 2 : 1;
|
|
94
|
+
if (layoutColumns > 1) {
|
|
95
|
+
var layout = [];
|
|
96
|
+
for (var columnPropertyName in columns) {
|
|
97
|
+
if (layout.length == 0 || layout[layout.length - 1].length >= layoutColumns)
|
|
98
|
+
layout.push([]);
|
|
99
|
+
layout[layout.length - 1].push(columnPropertyName);
|
|
100
|
+
}
|
|
101
|
+
return layout;
|
|
102
|
+
}
|
|
103
|
+
return Object.keys(columns);
|
|
104
|
+
}
|
|
105
|
+
function buttons() {
|
|
106
|
+
var _this = this;
|
|
107
|
+
var newRecord;
|
|
108
|
+
return {
|
|
109
|
+
delete: {
|
|
110
|
+
name: 'Delete',
|
|
111
|
+
accessibility: {
|
|
112
|
+
hidden: isNewRecord,
|
|
113
|
+
},
|
|
114
|
+
style: {
|
|
115
|
+
color: 'primary',
|
|
116
|
+
variant: 'text',
|
|
117
|
+
},
|
|
118
|
+
redirect: function (fields, buttons) { return __awaiter(_this, void 0, void 0, function () {
|
|
119
|
+
return __generator(this, function (_a) {
|
|
120
|
+
return [2 /*return*/, { path: (0, RecordTablePage_1.recordTableLink)(table) }];
|
|
121
|
+
});
|
|
122
|
+
}); },
|
|
123
|
+
onClick: function (fields, buttons) { return __awaiter(_this, void 0, void 0, function () {
|
|
124
|
+
return __generator(this, function (_a) {
|
|
125
|
+
switch (_a.label) {
|
|
126
|
+
case 0:
|
|
127
|
+
if (!record || !record.id)
|
|
128
|
+
throw new Error("Unable to delete record, record or id undefined");
|
|
129
|
+
return [4 /*yield*/, (0, db_1.getDbService)().delete(table, { id: record.id })];
|
|
130
|
+
case 1:
|
|
131
|
+
_a.sent();
|
|
132
|
+
return [2 /*return*/, "Deleted ".concat((0, string_1.default)(table.name).humanize().s)];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}); },
|
|
136
|
+
progressMessage: function (fields) { return "Deleting ".concat((0, string_1.default)(table.name).humanize().s); },
|
|
137
|
+
},
|
|
138
|
+
save: {
|
|
139
|
+
name: 'Save',
|
|
140
|
+
accessibility: {
|
|
141
|
+
hidden: isNewRecord,
|
|
142
|
+
},
|
|
143
|
+
style: {
|
|
144
|
+
color: 'primary',
|
|
145
|
+
variant: 'contained',
|
|
146
|
+
},
|
|
147
|
+
onClick: function (fields, buttons) { return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
+
var columnPropertyName, field;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0:
|
|
152
|
+
if (!record || !record.id)
|
|
153
|
+
throw new Error("Unable to save record, record or id undefined");
|
|
154
|
+
for (columnPropertyName in fields) {
|
|
155
|
+
field = fields[columnPropertyName];
|
|
156
|
+
record[columnPropertyName] = field.field.value;
|
|
157
|
+
}
|
|
158
|
+
return [4 /*yield*/, (0, db_1.getDbService)().update(table, record)];
|
|
159
|
+
case 1:
|
|
160
|
+
_a.sent();
|
|
161
|
+
return [2 /*return*/, "Saved ".concat((0, string_1.default)(table.name).humanize().s)];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}); },
|
|
165
|
+
progressMessage: function (fields) { return "Saving ".concat((0, string_1.default)(table.name).humanize().s); },
|
|
166
|
+
},
|
|
167
|
+
create: {
|
|
168
|
+
name: 'Create',
|
|
169
|
+
accessibility: {
|
|
170
|
+
hidden: !isNewRecord,
|
|
171
|
+
},
|
|
172
|
+
style: {
|
|
173
|
+
color: 'primary',
|
|
174
|
+
variant: 'contained',
|
|
175
|
+
},
|
|
176
|
+
redirect: function (fields, buttons) { return __awaiter(_this, void 0, void 0, function () {
|
|
177
|
+
return __generator(this, function (_a) {
|
|
178
|
+
return [2 /*return*/, { path: (0, RecordFormPage_1.recordFormLink)(table.name, newRecord.id) }];
|
|
179
|
+
});
|
|
180
|
+
}); },
|
|
181
|
+
onClick: function (fields, buttons) { return __awaiter(_this, void 0, void 0, function () {
|
|
182
|
+
var record, columnPropertyName, field;
|
|
183
|
+
return __generator(this, function (_a) {
|
|
184
|
+
switch (_a.label) {
|
|
185
|
+
case 0:
|
|
186
|
+
record = {};
|
|
187
|
+
for (columnPropertyName in fields) {
|
|
188
|
+
field = fields[columnPropertyName];
|
|
189
|
+
record[columnPropertyName] = field.field.value;
|
|
190
|
+
}
|
|
191
|
+
return [4 /*yield*/, (0, db_1.getDbService)().insert(table, record)];
|
|
192
|
+
case 1:
|
|
193
|
+
newRecord = _a.sent();
|
|
194
|
+
return [2 /*return*/, "Created ".concat((0, string_1.default)(table.name).humanize().s)];
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}); },
|
|
198
|
+
progressMessage: function (fields) { return "Creating ".concat((0, string_1.default)(table.name).humanize().s); },
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function onLoad(fields, buttons) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
204
|
+
var columnPropertyName, column, field, fieldValue;
|
|
205
|
+
return __generator(this, function (_a) {
|
|
206
|
+
if (isNewRecord)
|
|
207
|
+
return [2 /*return*/];
|
|
208
|
+
for (columnPropertyName in fields) {
|
|
209
|
+
column = table.columns[columnPropertyName];
|
|
210
|
+
field = fields[columnPropertyName].field;
|
|
211
|
+
fieldValue = record[columnPropertyName];
|
|
212
|
+
if (moment_1.default.isMoment(fieldValue))
|
|
213
|
+
fieldValue = fieldValue.format('ddd, MMM Do YY, h:mm:ss a');
|
|
214
|
+
else if (column instanceof db_1.BooleanColumn)
|
|
215
|
+
fieldValue = fieldValue == true ? 'True' : 'False';
|
|
216
|
+
field.value = fieldValue;
|
|
217
|
+
if (columnPropertyName == 'created' ||
|
|
218
|
+
columnPropertyName == 'updated' ||
|
|
219
|
+
columnPropertyName == 'id' ||
|
|
220
|
+
column instanceof db_1.DateTimeColumn) {
|
|
221
|
+
if (!field.accessibility)
|
|
222
|
+
field.accessibility = {};
|
|
223
|
+
field.accessibility.readonly = true;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return [2 /*return*/];
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.RecordForm = RecordForm;
|
|
232
|
+
//# sourceMappingURL=RecordForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordForm.js","sourceRoot":"","sources":["../../../src/form/RecordForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,kDAAsB;AACtB,kDAA2B;AAC3B,wCAA4C;AAC5C,oCAAoE;AACpE,oCAAsI;AACtI,4DAA0D;AAC1D,0DAAwD;AACxD,qEAAsE;AAOtE,SAAgB,UAAU,CAAmB,EAAqC;QAAnC,KAAK,WAAA,EAAE,MAAM,YAAA;IAC1D,IAAM,WAAW,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;IAClD,IAAM,uBAAuB,GAAG,IAAA,oDAA0B,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvE,OAAO,CACL,8BAAC,SAAI,IACH,IAAI,EAAE,IAAA,gBAAC,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,EAChC,YAAY,EAAE,YAAY,EAAE,EAC5B,WAAW,EAAE,WAAW,EAAE,EAC1B,OAAO,EAAE,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,cAAc,EAAC,CAAC,CAAC,uBAAuB,CAAC,cAAc,CAAC,M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AAC;aACzF;SACF,CAAA;IACH,CAAC;IAED,SAAe,MAAM,CAAC,MAAc,EAAE,OAA4B;;;;gBAChE,IAAI,WAAW;oBACb,sBAAO;gBAET,KAAS,kBAAkB,IAAI,MAAM,EAAE;oBAC/B,MAAM,GAAI,KAAK,CAAC,OAAe,CAAC,kBAAkB,CAAqB,CAAC;oBACxE,KAAK,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC;oBAC3C,UAAU,GAAI,MAAc,CAAC,kBAAkB,CAAC,CAAC;oBACrD,IAAI,gBAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;wBAC7B,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;yBACzD,IAAI,MAAM,YAAY,kBAAa;wBACtC,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;oBAErD,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC;oBACzB,IACE,kBAAkB,IAAI,SAAS;wBAC/B,kBAAkB,IAAI,SAAS;wBAC/B,kBAAkB,IAAI,IAAI;wBAC1B,MAAM,YAAY,mBAAc,EAChC;wBACA,IAAI,CAAC,KAAK,CAAC,aAAa;4BACtB,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC;wBAE3B,KAAK,CAAC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC;qBACrC;iBACF;;;;KACF;AACH,CAAC;AA/KD,gCA+KC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Loadable } from '@proteinjs/reflection';
|
|
2
|
+
import { FormButtons } from '@proteinjs/ui';
|
|
3
|
+
import { Table } from '@proteinjs/db';
|
|
4
|
+
export declare const getRecordFormCustomizations: () => RecordFormCustomization[];
|
|
5
|
+
export declare const getRecordFormCustomization: (tableName: string) => RecordFormCustomization | undefined;
|
|
6
|
+
export declare abstract class RecordFormCustomization implements Loadable {
|
|
7
|
+
abstract table: Table<any>;
|
|
8
|
+
getFormButtons(record: any, defaultFormButtons: FormButtons<any>): FormButtons<any>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=RecordFormCustomization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordFormCustomization.d.ts","sourceRoot":"","sources":["../../../src/form/RecordFormCustomization.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAoB,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,eAAO,MAAM,2BAA2B,iCAA4G,CAAC;AAErJ,eAAO,MAAM,0BAA0B,cAAe,MAAM,wCAM3D,CAAA;AAED,8BAAsB,uBAAwB,YAAW,QAAQ;IAC/D,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5B,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,kBAAkB,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC;CAGnF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecordFormCustomization = exports.getRecordFormCustomization = exports.getRecordFormCustomizations = void 0;
|
|
4
|
+
var reflection_1 = require("@proteinjs/reflection");
|
|
5
|
+
var getRecordFormCustomizations = function () { return reflection_1.SourceRepository.get().objects('@proteinjs/db-ui/RecordFormCustomization'); };
|
|
6
|
+
exports.getRecordFormCustomizations = getRecordFormCustomizations;
|
|
7
|
+
var getRecordFormCustomization = function (tableName) {
|
|
8
|
+
var recordFormCustomizations = (0, exports.getRecordFormCustomizations)();
|
|
9
|
+
for (var _i = 0, recordFormCustomizations_1 = recordFormCustomizations; _i < recordFormCustomizations_1.length; _i++) {
|
|
10
|
+
var recordFormCustomization = recordFormCustomizations_1[_i];
|
|
11
|
+
if (recordFormCustomization.table.name == tableName)
|
|
12
|
+
return recordFormCustomization;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.getRecordFormCustomization = getRecordFormCustomization;
|
|
16
|
+
var RecordFormCustomization = /** @class */ (function () {
|
|
17
|
+
function RecordFormCustomization() {
|
|
18
|
+
}
|
|
19
|
+
RecordFormCustomization.prototype.getFormButtons = function (record, defaultFormButtons) {
|
|
20
|
+
return defaultFormButtons;
|
|
21
|
+
};
|
|
22
|
+
return RecordFormCustomization;
|
|
23
|
+
}());
|
|
24
|
+
exports.RecordFormCustomization = RecordFormCustomization;
|
|
25
|
+
//# sourceMappingURL=RecordFormCustomization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordFormCustomization.js","sourceRoot":"","sources":["../../../src/form/RecordFormCustomization.tsx"],"names":[],"mappings":";;;AAAA,oDAAkE;AAI3D,IAAM,2BAA2B,GAAG,cAAM,OAAA,6BAAgB,CAAC,GAAG,EAAE,CAAC,OAAO,CAA0B,0CAA0C,CAAC,EAAnG,CAAmG,CAAC;AAAxI,QAAA,2BAA2B,+BAA6G;AAE9I,IAAM,0BAA0B,GAAG,UAAC,SAAiB;IAC1D,IAAM,wBAAwB,GAAG,IAAA,mCAA2B,GAAE,CAAC;IAC/D,KAAoC,UAAwB,EAAxB,qDAAwB,EAAxB,sCAAwB,EAAxB,IAAwB,EAAE;QAAzD,IAAI,uBAAuB,iCAAA;QAC9B,IAAI,uBAAuB,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS;YACjD,OAAO,uBAAuB,CAAC;KAClC;AACH,CAAC,CAAA;AANY,QAAA,0BAA0B,8BAMtC;AAED;IAAA;IAKA,CAAC;IAHA,gDAAc,GAAd,UAAe,MAAW,EAAE,kBAAoC;QAC7D,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACH,8BAAC;AAAD,CAAC,AALD,IAKC;AALqB,0DAAuB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormButtons } from '@proteinjs/ui';
|
|
2
|
+
import { Migration } from '@proteinjs/db';
|
|
3
|
+
import { RecordFormCustomization } from '../RecordFormCustomization';
|
|
4
|
+
export declare class MigrationRecordFormCustomization extends RecordFormCustomization {
|
|
5
|
+
table: import("@proteinjs/db").Table<Migration>;
|
|
6
|
+
getFormButtons(migration: Migration, defaultFormButtons: FormButtons<any>): FormButtons<any>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=MigrationRecordFormCustomization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MigrationRecordFormCustomization.d.ts","sourceRoot":"","sources":["../../../../src/form/customizations/MigrationRecordFormCustomization.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,SAAS,EAAqC,MAAM,eAAe,CAAA;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,qBAAa,gCAAiC,SAAQ,uBAAuB;IACpE,KAAK,2CAAoB;IAEhC,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC;CAqB7F"}
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
+
function step(op) {
|
|
42
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
44
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
+
switch (op[0]) {
|
|
47
|
+
case 0: case 1: t = op; break;
|
|
48
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
+
default:
|
|
52
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
+
if (t[2]) _.ops.pop();
|
|
57
|
+
_.trys.pop(); continue;
|
|
58
|
+
}
|
|
59
|
+
op = body.call(thisArg, _);
|
|
60
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
exports.MigrationRecordFormCustomization = void 0;
|
|
66
|
+
var db_1 = require("@proteinjs/db");
|
|
67
|
+
var RecordFormCustomization_1 = require("../RecordFormCustomization");
|
|
68
|
+
var MigrationRecordFormCustomization = /** @class */ (function (_super) {
|
|
69
|
+
__extends(MigrationRecordFormCustomization, _super);
|
|
70
|
+
function MigrationRecordFormCustomization() {
|
|
71
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
72
|
+
_this.table = db_1.tables.Migration;
|
|
73
|
+
return _this;
|
|
74
|
+
}
|
|
75
|
+
MigrationRecordFormCustomization.prototype.getFormButtons = function (migration, defaultFormButtons) {
|
|
76
|
+
var _this = this;
|
|
77
|
+
var formButtons = __assign({}, defaultFormButtons);
|
|
78
|
+
delete formButtons['create'];
|
|
79
|
+
delete formButtons['delete'];
|
|
80
|
+
formButtons['run'] = {
|
|
81
|
+
name: 'Run',
|
|
82
|
+
accessibility: {
|
|
83
|
+
hidden: !migration || migration.status === 'running',
|
|
84
|
+
},
|
|
85
|
+
style: {
|
|
86
|
+
color: 'primary',
|
|
87
|
+
variant: 'contained',
|
|
88
|
+
},
|
|
89
|
+
onClick: function (fields, buttons) { return __awaiter(_this, void 0, void 0, function () {
|
|
90
|
+
return __generator(this, function (_a) {
|
|
91
|
+
switch (_a.label) {
|
|
92
|
+
case 0: return [4 /*yield*/, (0, db_1.getMigrationRunnerService)().runMigration(migration.id)];
|
|
93
|
+
case 1:
|
|
94
|
+
_a.sent();
|
|
95
|
+
return [2 /*return*/, "Started migration"];
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}); },
|
|
99
|
+
progressMessage: function (fields) { return "Starting migration"; },
|
|
100
|
+
};
|
|
101
|
+
return formButtons;
|
|
102
|
+
};
|
|
103
|
+
return MigrationRecordFormCustomization;
|
|
104
|
+
}(RecordFormCustomization_1.RecordFormCustomization));
|
|
105
|
+
exports.MigrationRecordFormCustomization = MigrationRecordFormCustomization;
|
|
106
|
+
//# sourceMappingURL=MigrationRecordFormCustomization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MigrationRecordFormCustomization.js","sourceRoot":"","sources":["../../../../src/form/customizations/MigrationRecordFormCustomization.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oCAA4E;AAC5E,sEAAoE;AAEpE;IAAsD,oDAAuB;IAA7E;QAAA,qEAwBC;QAvBQ,WAAK,GAAG,WAAM,CAAC,SAAS,CAAC;;IAuBlC,CAAC;IArBC,yDAAc,GAAd,UAAe,SAAoB,EAAE,kBAAoC;QAAzE,iBAoBC;QAnBC,IAAM,WAAW,gBAAQ,kBAAkB,CAAE,CAAC;QAC9C,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC7B,WAAW,CAAC,KAAK,CAAC,GAAG;YACnB,IAAI,EAAE,KAAK;YACX,aAAa,EAAE;gBACb,MAAM,EAAE,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS;aACrD;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,SAAS;gBAChB,OAAO,EAAE,WAAW;aACrB;YACD,OAAO,EAAE,UAAO,MAAc,EAAE,OAA4B;;;gCAC1D,qBAAM,IAAA,8BAAyB,GAAE,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC,EAAA;;4BAA5D,SAA4D,CAAC;4BAC7D,sBAAO,mBAAmB,EAAC;;;iBAC5B;YACD,eAAe,EAAE,UAAC,MAAc,IAAO,OAAO,oBAAoB,CAAA,CAAC,CAAC;SACrE,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC;IACH,uCAAC;AAAD,CAAC,AAxBD,CAAsD,iDAAuB,GAwB5E;AAxBY,4EAAgC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Page } from '@proteinjs/ui';
|
|
2
|
+
export declare const recordFormPage: Page;
|
|
3
|
+
export declare const recordFormLink: (tableName: string, recordId: string) => string;
|
|
4
|
+
export declare const newRecordFormLink: (tableName: string) => string;
|
|
5
|
+
//# sourceMappingURL=RecordFormPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordFormPage.d.ts","sourceRoot":"","sources":["../../../src/pages/RecordFormPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAsB,MAAM,eAAe,CAAA;AAIlE,eAAO,MAAM,cAAc,EAAE,IAW5B,CAAA;AAED,eAAO,MAAM,cAAc,cAAe,MAAM,YAAY,MAAM,WAEjE,CAAA;AAED,eAAO,MAAM,iBAAiB,cAAe,MAAM,WAElD,CAAA"}
|