@acomo/client 1.0.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@acomo/client",
3
+ "repository": {
4
+ "type": "git",
5
+ "url": "git+https://github.com/progress-all/acomo.git"
6
+ },
7
+ "version": "1.0.130",
8
+ "type": "module",
9
+ "main": "dist/src/index.js",
10
+ "types": "dist/src/index.d.ts",
11
+ "scripts": {
12
+ "prebuild": "tsc --build --clean",
13
+ "build": "tsc --build"
14
+ }
15
+ }
package/src/acomo.ts ADDED
@@ -0,0 +1,17 @@
1
+ export type AcomoInfo = {
2
+ version: string
3
+ }
4
+
5
+ // TODO: バックエンドから取得する
6
+ export const acomoInfo: AcomoInfo = {
7
+ version: '1.0.0'
8
+ }
9
+
10
+ // TODO: OpenAPIでクライアントや型は自動生成したい
11
+
12
+ // jwt.strategy.tsのProfile
13
+ export type UserProfile = {
14
+ id: string,
15
+ email: string,
16
+ name: string,
17
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './acomo'
2
+ export * from './client'
3
+ export * from './useFilter'
@@ -0,0 +1,27 @@
1
+ export const operators = (type: string) => {
2
+ return type === 'string'
3
+ ? [
4
+ { title: 'と一致', value: 'equals' },
5
+ { title: 'と一致しない', value: 'not' },
6
+ { title: '以上', value: 'gte' },
7
+ { title: 'より大きい', value: 'gt' },
8
+ { title: '以下', value: 'lte' },
9
+ { title: 'より小さい', value: 'lt' },
10
+ { title: 'を含む', value: 'contains' },
11
+ ]
12
+ : [
13
+ { title: '以上', value: 'gte' },
14
+ { title: '以下', value: 'lte' },
15
+ ]
16
+ }
17
+
18
+ export const textFieldType = (type: string) => {
19
+ switch (type) {
20
+ case 'datetime':
21
+ return 'datetime-local'
22
+ case 'number':
23
+ return 'number'
24
+ default:
25
+ return 'text'
26
+ }
27
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "module": "es2020",
5
+ "outDir": "./dist",
6
+ "baseUrl": "./",
7
+ },
8
+ "references": [
9
+ { "path": "../acomo-backend" },
10
+ ],
11
+ "include": ["src"],
12
+ "exclude": ["./dist", "./test"]
13
+ }