oksy 0.1.6 → 0.1.8
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/boot.js +21 -21
- package/library.js +1 -1
- package/package.json +2 -2
- package/public/assets/index.53e319a9.js +75 -0
- package/public/assets/index.cad35096.js +75 -0
- package/public/assets/index.ef68285e.css +1 -0
- package/public/index.html +2 -2
- package/types/public/src/Components/Base/File/File.type.d.ts +10 -0
- package/types/src/Bootstrap/OrganizeSqlTables.d.ts +1 -1
- package/types/src/Bootstrap/ReadFileSystemFilesToTsFiles.d.ts +1 -1
- package/types/src/Bootstrap/TsFilesToBlueprint/Blueprint.d.ts +3 -3
- package/types/src/Frontend/Controllers/ForgotPasswordController.d.ts +1 -1
- package/types/src/Frontend/Controllers/LoginController.d.ts +1 -1
- package/types/src/Frontend/Controllers/PageController.d.ts +1 -1
- package/types/src/Frontend/Controllers/RegisterController.d.ts +2 -2
- package/types/src/Frontend/Controllers/ResetPasswordController.d.ts +2 -2
- package/types/src/Frontend/Controllers/ResumeSessionController.d.ts +1 -1
- package/types/src/Frontend/FrontendConfig.d.ts +1 -1
- package/types/src/Frontend/GoogleIcons.d.ts +1 -1
- package/types/src/Frontend/View/Components/Button.d.ts +2 -2
- package/types/src/Frontend/View/Components/Container.d.ts +3 -3
- package/types/src/Frontend/View/Components/DataTable.d.ts +4 -4
- package/types/src/Frontend/View/Components/DateTime.d.ts +21 -0
- package/types/src/Frontend/View/Components/File.d.ts +23 -0
- package/types/src/Frontend/View/Components/FileUpload.d.ts +3 -3
- package/types/src/Frontend/View/Components/FlatOrFunc.d.ts +1 -1
- package/types/src/Frontend/View/Components/Input.d.ts +2 -2
- package/types/src/Frontend/View/Components/Layout/DarkSidebar.d.ts +4 -4
- package/types/src/Frontend/View/Components/Select.d.ts +8 -8
- package/types/src/Frontend/View/Components/Text.d.ts +2 -2
- package/types/src/Frontend/View/Components/Toggle.d.ts +2 -2
- package/types/src/Frontend/View/UI.d.ts +176 -20
- package/types/src/Helper/CallStack.d.ts +1 -1
- package/types/src/Helper/DateTime.d.ts +3 -1
- package/types/src/Helper/Seeder.d.ts +1 -1
- package/types/src/Helper/UUID.d.ts +1 -0
- package/types/src/Mailer/JsToEmail.d.ts +2 -2
- package/types/src/ReactiveStore/BaseEntity.d.ts +2 -2
- package/types/src/Server/Socket/BaseCommunicator.d.ts +4 -4
- package/types/src/Server/Socket/PageManager.d.ts +1 -1
- package/types/src/Server/Socket/SessionManager.d.ts +1 -1
- package/types/src/Server/Socket/WebSocketServerClient.d.ts +4 -1
- package/types/src/library.pub.d.ts +3 -3
- package/types/types/config.d.ts +2 -2
- package/public/assets/index.7c7d591a.js +0 -75
- package/public/assets/index.ad749efe.js +0 -75
- package/public/assets/index.bd7a9b66.css +0 -1
@@ -1,5 +1,7 @@
|
|
1
1
|
import dayjs, { Dayjs } from 'dayjs';
|
2
2
|
export declare function nowAsUtc(): dayjs.Dayjs;
|
3
3
|
export declare function toSqlDateTime(date: null | Dayjs): null | string;
|
4
|
-
export declare function parseFromSqlFormat(
|
4
|
+
export declare function parseFromSqlFormat(dateStr: null | string): null | Dayjs;
|
5
5
|
export declare function isExpired(date: null | Dayjs): boolean;
|
6
|
+
export declare function utcToTz(date: null | Dayjs, tz: string): null | Dayjs;
|
7
|
+
export declare function parseDateTimeString(dateTimeStr: null | string, tz: string): null | Dayjs;
|
@@ -4,8 +4,8 @@ import { Database } from 'oksy';
|
|
4
4
|
import { Many } from 'oksy';
|
5
5
|
import { EmailValidator } from '../ReactiveStore/Validators/EmailValidator';
|
6
6
|
import { IValidator } from './Validators/IValidator';
|
7
|
-
export
|
8
|
-
export
|
7
|
+
export type One<T1 extends GlobalEntity, T2 extends keyof T1, T3 extends BlueprintFieldOne['cascade'] = 'DELETE'> = T1;
|
8
|
+
export type PartialGlobalEntity = Partial<GlobalEntity> & {
|
9
9
|
id: string;
|
10
10
|
};
|
11
11
|
export declare abstract class GlobalEntity {
|
@@ -1,16 +1,16 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
type MessageFormat = EmitMessage | RequestMessage | ResponseMessage;
|
2
|
+
type EmitMessage = {
|
3
3
|
type: 'emit';
|
4
4
|
roomName: string;
|
5
5
|
payload: any;
|
6
6
|
};
|
7
|
-
|
7
|
+
type RequestMessage = {
|
8
8
|
type: 'request';
|
9
9
|
id: string;
|
10
10
|
roomName: string;
|
11
11
|
payload: any;
|
12
12
|
};
|
13
|
-
|
13
|
+
type ResponseMessage = {
|
14
14
|
type: 'response';
|
15
15
|
id: string;
|
16
16
|
payload: any;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Database, ReactiveStore } from './../../ReactiveStore/ReactiveStore';
|
2
2
|
import { BasePage } from 'oksy';
|
3
3
|
import { BaseWorkspace } from 'oksy';
|
4
|
-
export
|
4
|
+
export type Route = {
|
5
5
|
database: null | Database;
|
6
6
|
pageClass: null | (new (...args: any[]) => BasePage);
|
7
7
|
workspace: null | BaseWorkspace;
|
@@ -4,7 +4,7 @@ import { Dayjs } from 'dayjs';
|
|
4
4
|
import { BaseUser } from 'oksy';
|
5
5
|
import { BasePage } from 'oksy';
|
6
6
|
import { WebSocketServerClient } from './WebSocketServerClient';
|
7
|
-
export
|
7
|
+
export type Session = {
|
8
8
|
id: string;
|
9
9
|
userId: null | string;
|
10
10
|
user: null | BaseUser;
|
@@ -1,12 +1,15 @@
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
1
2
|
import { WebSocket as WebSocketClient } from 'ws';
|
2
3
|
import { BaseCommunicator } from './BaseCommunicator';
|
3
4
|
export declare class WebSocketServerClient extends BaseCommunicator {
|
4
5
|
private client;
|
6
|
+
timeZone: string;
|
5
7
|
id: string;
|
6
|
-
constructor(client: WebSocketClient);
|
8
|
+
constructor(client: WebSocketClient, timeZone: string);
|
7
9
|
send(payload: object): void;
|
8
10
|
toast(type: 'success' | 'error', message: string): void;
|
9
11
|
prompt(message: string): Promise<string>;
|
10
12
|
confirm(title: string, message: string, primaryButtonText?: string): Promise<boolean>;
|
13
|
+
toLocalDate(utcDate: null | Dayjs): null | Dayjs;
|
11
14
|
navigate(url: string, type?: 'push' | 'replace' | 'hard' | 'blank'): void;
|
12
15
|
}
|
@@ -7,7 +7,7 @@ import { hash } from './Helper/Hash';
|
|
7
7
|
import { googleIcons, type GoogleIconType } from './Frontend/GoogleIcons';
|
8
8
|
import { WebSocketServerClient } from './Server/Socket/WebSocketServerClient';
|
9
9
|
import * as MODULES from './../../../../models/_generated/types.d';
|
10
|
-
|
10
|
+
type PartialClass<T> = {
|
11
11
|
[P in keyof T]: T[P] extends Function ? T[P] : (P extends 'id' | 'workspaceId' ? T[P] : null | T[P]);
|
12
12
|
};
|
13
13
|
declare abstract class GlobalEntity {
|
@@ -43,8 +43,8 @@ declare abstract class BasePage {
|
|
43
43
|
navigate: InstanceType<typeof WebSocketServerClient>['navigate'];
|
44
44
|
};
|
45
45
|
}
|
46
|
-
|
47
|
-
|
46
|
+
type MODULE_KEY = keyof typeof MODULES;
|
47
|
+
type MODEL<KEY extends MODULE_KEY> = InstanceType<(typeof MODULES[KEY])>;
|
48
48
|
declare class Database {
|
49
49
|
getById<T extends MODULE_KEY>(tableName: T, id: string): null | MODEL<T>;
|
50
50
|
getAll<T extends MODULE_KEY>(tableName: T): MODEL<T>[];
|
package/types/types/config.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
export
|
1
|
+
export type SMTPConfig = {
|
2
2
|
host: string;
|
3
3
|
port: number;
|
4
4
|
username: string;
|
5
5
|
password: string;
|
6
6
|
from: string;
|
7
7
|
};
|
8
|
-
export
|
8
|
+
export type Config = {
|
9
9
|
name: string;
|
10
10
|
appUrl: string;
|
11
11
|
register: 'closed' | 'open';
|