oksy 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/boot.js +20 -20
  2. package/library.js +1 -1
  3. package/package.json +1 -1
  4. package/public/assets/index.75c2a5f4.js +75 -0
  5. package/public/assets/index.cbc0c532.js +75 -0
  6. package/public/index.html +1 -1
  7. package/tsconfig.json +0 -2
  8. package/types/src/Bootstrap/SqliteClient.d.ts +1 -1
  9. package/types/src/Frontend/Controllers/ForgotPasswordController.d.ts +2 -2
  10. package/types/src/Frontend/Controllers/LoginController.d.ts +3 -3
  11. package/types/src/Frontend/Controllers/PageController.d.ts +3 -3
  12. package/types/src/Frontend/Controllers/RegisterController.d.ts +3 -3
  13. package/types/src/Frontend/Controllers/ResetPasswordController.d.ts +3 -3
  14. package/types/src/Frontend/Controllers/ResumeSessionController.d.ts +2 -2
  15. package/types/src/Frontend/View/BasePage.d.ts +2 -2
  16. package/types/src/Frontend/View/Components/Button.d.ts +1 -1
  17. package/types/src/Frontend/View/Components/DataTable.d.ts +1 -1
  18. package/types/src/Frontend/View/Components/DateTime.d.ts +21 -0
  19. package/types/src/Frontend/View/UI.d.ts +174 -20
  20. package/types/src/Helper/DateTime.d.ts +3 -1
  21. package/types/src/Helper/PasswordResetLink.d.ts +1 -1
  22. package/types/src/Helper/Seeder.d.ts +2 -2
  23. package/types/src/ReactiveStore/BaseEntity.d.ts +1 -1
  24. package/types/src/ReactiveStore/HydrateReactiveStore.d.ts +1 -1
  25. package/types/src/ReactiveStore/Many.d.ts +2 -2
  26. package/types/src/ReactiveStore/ModelMaker.d.ts +2 -2
  27. package/types/src/ReactiveStore/ModelValidator.d.ts +1 -1
  28. package/types/src/ReactiveStore/Proxify.d.ts +2 -2
  29. package/types/src/ReactiveStore/ReactiveStore.d.ts +2 -2
  30. package/types/src/Server/RegisterFileUploader.d.ts +1 -1
  31. package/types/src/Server/RegisterSocketServer.d.ts +3 -3
  32. package/types/src/Server/Socket/PageManager.d.ts +1 -1
  33. package/types/src/Server/Socket/SessionManager.d.ts +2 -2
  34. package/types/src/Server/Socket/WebSocketServerClient.d.ts +4 -1
  35. package/types/src/Server/StartWebServer.d.ts +2 -2
  36. package/public/assets/index.7c7d591a.js +0 -75
  37. package/public/assets/index.ad749efe.js +0 -75
@@ -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(date: null | string): dayjs.Dayjs | null;
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;
@@ -1,2 +1,2 @@
1
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
1
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
2
2
  export declare function getPasswordResetLinkRow(sqliteClient: SqliteClient, token: any): Promise<null | any>;
@@ -1,5 +1,5 @@
1
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
2
- import { ReactiveStore } from '@src/ReactiveStore/ReactiveStore';
1
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
2
+ import { ReactiveStore } from './../ReactiveStore/ReactiveStore';
3
3
  declare type SeederParams = {
4
4
  reactiveStore: ReactiveStore;
5
5
  sqliteClient: SqliteClient;
@@ -1,4 +1,4 @@
1
- import { BlueprintFieldOne } from '@src/Bootstrap/TsFilesToBlueprint/Blueprint';
1
+ import { BlueprintFieldOne } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
2
2
  import { Dayjs } from 'dayjs';
3
3
  import { Database } from 'oksy';
4
4
  import { Many } from 'oksy';
@@ -1,4 +1,4 @@
1
- import { Blueprint } from '@src/Bootstrap/TsFilesToBlueprint/Blueprint';
1
+ import { Blueprint } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
2
2
  import { ReactiveStore } from './ReactiveStore';
3
3
  export declare function hydrateReactiveStore(databaseMap: {
4
4
  [tableName: string]: any[];
@@ -1,5 +1,5 @@
1
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
2
- import { Blueprint, BlueprintFieldMany } from '@src/Bootstrap/TsFilesToBlueprint/Blueprint';
1
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
2
+ import { Blueprint, BlueprintFieldMany } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
3
3
  import { GlobalEntity } from './BaseEntity';
4
4
  import { Storage } from './ReactiveStore';
5
5
  export declare class Many<T1 extends GlobalEntity = any, T2 extends keyof T1 = any> {
@@ -1,5 +1,5 @@
1
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
2
- import { Blueprint } from '@src/Bootstrap/TsFilesToBlueprint/Blueprint';
1
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
2
+ import { Blueprint } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
3
3
  import { Database, ReactiveStore } from './ReactiveStore';
4
4
  export declare class ModelMaker {
5
5
  private reactiveStore;
@@ -1,3 +1,3 @@
1
- import { Blueprint } from '@src/Bootstrap/TsFilesToBlueprint/Blueprint';
1
+ import { Blueprint } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
2
2
  import { GlobalEntity } from './BaseEntity';
3
3
  export declare function modelValidator(model: GlobalEntity, blueprint: Blueprint): boolean;
@@ -1,4 +1,4 @@
1
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
2
- import { Blueprint } from '@src/Bootstrap/TsFilesToBlueprint/Blueprint';
1
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
2
+ import { Blueprint } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
3
3
  import { Storage } from './ReactiveStore';
4
4
  export declare function Proxify(sqliteClient: SqliteClient, model: any, blueprint: Blueprint, globalStoreItemGetter: Storage, localStoreItemGetter: null | Storage): any;
@@ -1,5 +1,5 @@
1
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
2
- import { Blueprint } from '@src/Bootstrap/TsFilesToBlueprint/Blueprint';
1
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
2
+ import { Blueprint } from './../Bootstrap/TsFilesToBlueprint/Blueprint';
3
3
  import { PartialGlobalEntity } from './BaseEntity';
4
4
  import { ModelMaker } from './ModelMaker';
5
5
  export interface Storage {
@@ -1,3 +1,3 @@
1
1
  import { FastifyInstance } from 'fastify';
2
- import { ReactiveStore } from '@src/ReactiveStore/ReactiveStore';
2
+ import { ReactiveStore } from './../ReactiveStore/ReactiveStore';
3
3
  export declare function registerFileUploader(fastifyServer: FastifyInstance, reactiveStore: ReactiveStore): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import { FastifyInstance } from 'fastify';
2
- import { ReactiveStore } from '@src/ReactiveStore/ReactiveStore';
3
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
4
- import { IMailer } from '@src/Mailer/IMailer';
2
+ import { ReactiveStore } from './../ReactiveStore/ReactiveStore';
3
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
4
+ import { IMailer } from './../Mailer/IMailer';
5
5
  export declare function registerSocketServer(fastifyServer: FastifyInstance, reactiveStore: ReactiveStore, sqliteClient: SqliteClient, mailer: IMailer): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { Database, ReactiveStore } from '@src/ReactiveStore/ReactiveStore';
1
+ import { Database, ReactiveStore } from './../../ReactiveStore/ReactiveStore';
2
2
  import { BasePage } from 'oksy';
3
3
  import { BaseWorkspace } from 'oksy';
4
4
  export declare type Route = {
@@ -1,5 +1,5 @@
1
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
2
- import { ReactiveStore } from '@src/ReactiveStore/ReactiveStore';
1
+ import { SqliteClient } from './../../Bootstrap/SqliteClient';
2
+ import { ReactiveStore } from './../../ReactiveStore/ReactiveStore';
3
3
  import { Dayjs } from 'dayjs';
4
4
  import { BaseUser } from 'oksy';
5
5
  import { BasePage } from 'oksy';
@@ -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
  }
@@ -1,4 +1,4 @@
1
1
  import { ReactiveStore } from '../ReactiveStore/ReactiveStore';
2
- import { SqliteClient } from '@src/Bootstrap/SqliteClient';
3
- import { IMailer } from '@src/Mailer/IMailer';
2
+ import { SqliteClient } from './../Bootstrap/SqliteClient';
3
+ import { IMailer } from './../Mailer/IMailer';
4
4
  export declare function StartWebServer(reactiveStore: ReactiveStore, sqliteClient: SqliteClient, mailer: IMailer): Promise<void>;