Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/goldants/lowcoder into fix/auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasr committed Jul 5, 2024
2 parents df5a57d + 2d525d2 commit 26351ea
Show file tree
Hide file tree
Showing 19 changed files with 4,241 additions and 3,232 deletions.
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"chalk": "4",
"flag-icons": "^7.2.1",
"number-precision": "^1.6.0",
"posthog-js": "^1.144.1",
"react-countup": "^6.5.3",
"react-player": "^2.11.0",
"resize-observer-polyfill": "^1.5.1",
Expand Down
3,633 changes: 2,052 additions & 1,581 deletions client/packages/lowcoder-core/lib/index.cjs

Large diffs are not rendered by default.

19 changes: 8 additions & 11 deletions client/packages/lowcoder-core/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// this is the tpyes file next to index.js

/// <reference types="react" />
import React, { ReactNode } from 'react';
import * as react from 'react';
import { ReactNode } from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';

type EvalMethods = Record<string, Record<string, Function>>;
type CodeType = undefined | "JSON" | "Function" | "PureJSON";
Expand Down Expand Up @@ -337,7 +337,7 @@ interface SandBoxOption {
declare function evalScript(script: string, context: any, methods?: EvalMethods): any;
declare function evalFunc(functionBody: string, context: any, methods?: EvalMethods, options?: SandBoxOption, isAsync?: boolean): any;

declare function evalStyle(id: string, css: string[]): void;
declare function evalStyle(id: string, css: string[], globalStyle?: boolean): void;
declare function clearStyleEval(id?: string): void;

declare class DefaultParser {
Expand Down Expand Up @@ -456,7 +456,7 @@ declare enum CompActionTypes {
* broadcast other actions in comp tree structure.
* used for encapsulate MultiBaseComp
*/
BROADCAST = "BROADCAST",
BROADCAST = "BROADCAST"
}
type ExtraActionType = "layout" | "delete" | "add" | "modify" | "rename" | "recover" | "upgrade";
type ActionExtraInfo = {
Expand Down Expand Up @@ -650,9 +650,7 @@ declare const i18n: {
region?: string | undefined;
locales: string[];
};

declare function getValueByLocale<T>(defaultValue: T, func: (info: LocaleInfo) => T | undefined): T;

type AddDot<T extends string> = T extends "" ? "" : `.${T}`;
type ValidKey<T> = Exclude<keyof T, symbol>;
type NestedKey<T> = (T extends object ? {
Expand All @@ -662,18 +660,17 @@ type AddPrefix<T, P extends string> = {
[K in keyof T as K extends string ? `${P}${K}` : never]: T[K];
};
declare const globalMessages: AddPrefix<{}, "@">;

type GlobalMessageKey = NestedKey<typeof globalMessages>;
type VariableValue = string | number | boolean | Date | React.ReactNode;

declare class Translator<Messages extends object> {
private readonly messages;
readonly language: string;
constructor(fileData: object, filterLocales?: string, locales?: string[]);
trans(key: NestedKey<Messages> | GlobalMessageKey, variables?: Record<string, VariableValue>): string;
transToNode(key: NestedKey<Messages> | GlobalMessageKey, variables?: Record<string, VariableValue>): ReactNode;
transToNode(key: NestedKey<Messages> | GlobalMessageKey, variables?: Record<string, VariableValue>): string | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element[];
private getMessage;
private getNestedMessage;
}
declare function getI18nObjects<I18nObjects>(fileData: object, filterLocales?: string): I18nObjects;
declare function getI18nObjects<I18nObjects>(fileData: object, filterLocales?: string): any;

export { AbstractComp, AbstractNode, ActionContextType, ActionExtraInfo, ActionPriority, BroadcastAction, CachedNode, ChangeValueAction, CodeFunction, CodeNode, CodeNodeOptions, CodeType, Comp, CompAction, CompActionTypes, CompConstructor, CompParams, ConstructorToComp, ConstructorToDataType, ConstructorToNodeType, ConstructorToView, CustomAction, DispatchType, EvalMethods, ExecuteQueryAction, ExtraActionType, ExtraNodeType, FetchCheckNode, FetchInfo, FetchInfoOptions, FunctionNode, MultiBaseComp, MultiChangeAction, MultiCompConstructor, Node, NodeToValue, OptionalComp, OptionalNodeType, RecordConstructorToComp, RecordConstructorToView, RecordNode, RecordNodeToValue, RecordOptionalNodeToValue, RelaxedJsonParser, RenameAction, ReplaceCompAction, RouteByNameAction, SimpleAbstractComp, SimpleComp, SimpleCompAction, SimpleNode, Translator, TriggerModuleEventAction, UpdateActionContextAction, UpdateNodesV2Action, ValueAndMsg, WrapContextFn, WrapContextNodeV2, WrapNode, changeChildAction, changeDependName, changeEditDSLAction, changeValueAction, clearMockWindow, clearStyleEval, customAction, deferAction, deleteCompAction, dependingNodeMapEquals, evalFunc, evalFunctionResult, evalNodeOrMinor, evalPerfUtil, evalScript, evalStyle, executeQueryAction, fromRecord, fromUnevaledValue, fromValue, fromValueWithCache, getDynamicStringSegments, getI18nObjects, getValueByLocale, i18n, isBroadcastAction, isChildAction, isCustomAction, isDynamicSegment, isFetching, isMyCustomAction, mergeExtra, multiChangeAction, nodeIsRecord, onlyEvalAction, relaxedJSONToJSON, renameAction, replaceCompAction, routeByNameAction, transformWrapper, triggerModuleEventAction, unwrapChildAction, updateActionContextAction, updateNodesV2Action, withFunction, wrapActionExtraInfo, wrapChildAction, wrapContext, wrapDispatch };
Loading

0 comments on commit 26351ea

Please sign in to comment.