@tachybase/schema 0.23.40 → 0.23.47
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/lib/core/effects/index.d.ts +2 -0
- package/lib/core/effects/index.js +23 -0
- package/lib/core/effects/onFieldEffects.d.ts +27 -0
- package/lib/core/effects/onFieldEffects.js +158 -0
- package/lib/core/effects/onFormEffects.d.ts +24 -0
- package/lib/core/effects/onFormEffects.js +117 -0
- package/lib/core/global.d.js +0 -0
- package/lib/core/index.d.ts +4 -0
- package/lib/core/index.js +27 -0
- package/lib/core/models/ArrayField.d.ts +17 -0
- package/lib/core/models/ArrayField.js +145 -0
- package/lib/core/models/BaseField.d.ts +72 -0
- package/lib/core/models/BaseField.js +285 -0
- package/lib/core/models/Field.d.ts +70 -0
- package/lib/core/models/Field.js +426 -0
- package/lib/core/models/Form.d.ts +102 -0
- package/lib/core/models/Form.js +483 -0
- package/lib/core/models/Graph.d.ts +8 -0
- package/lib/core/models/Graph.js +77 -0
- package/lib/core/models/Heart.d.ts +16 -0
- package/lib/core/models/Heart.js +91 -0
- package/lib/core/models/LifeCycle.d.ts +14 -0
- package/lib/core/models/LifeCycle.js +64 -0
- package/lib/core/models/ObjectField.d.ts +12 -0
- package/lib/core/models/ObjectField.js +64 -0
- package/lib/core/models/Query.d.ts +18 -0
- package/lib/core/models/Query.js +105 -0
- package/lib/core/models/VoidField.d.ts +14 -0
- package/lib/core/models/VoidField.js +117 -0
- package/lib/core/models/index.d.ts +9 -0
- package/lib/core/models/index.js +37 -0
- package/lib/core/models/types.d.ts +9 -0
- package/lib/core/models/types.js +15 -0
- package/lib/core/shared/checkers.d.ts +117 -0
- package/lib/core/shared/checkers.js +109 -0
- package/lib/core/shared/constants.d.ts +48 -0
- package/lib/core/shared/constants.js +86 -0
- package/lib/core/shared/effective.d.ts +9 -0
- package/lib/core/shared/effective.js +91 -0
- package/lib/core/shared/externals.d.ts +8 -0
- package/lib/core/shared/externals.js +87 -0
- package/lib/core/shared/internals.d.ts +54 -0
- package/lib/core/shared/internals.js +956 -0
- package/lib/core/types.d.ts +275 -0
- package/lib/core/types.js +76 -0
- package/lib/grid/index.d.ts +67 -0
- package/lib/grid/index.js +378 -0
- package/lib/grid/observer.d.ts +19 -0
- package/lib/grid/observer.js +107 -0
- package/lib/index.d.ts +12 -24
- package/lib/index.js +27 -244
- package/lib/json-schema/compiler.d.ts +8 -0
- package/lib/json-schema/compiler.js +129 -0
- package/lib/json-schema/global.d.js +0 -0
- package/lib/json-schema/index.d.ts +2 -0
- package/lib/json-schema/index.js +23 -0
- package/lib/json-schema/patches.d.ts +5 -0
- package/lib/json-schema/patches.js +68 -0
- package/lib/json-schema/polyfills/SPECIFICATION_1_0.d.ts +2 -0
- package/lib/json-schema/polyfills/SPECIFICATION_1_0.js +132 -0
- package/lib/json-schema/polyfills/index.d.ts +1 -0
- package/lib/json-schema/polyfills/index.js +21 -0
- package/lib/json-schema/schema.d.ts +88 -0
- package/lib/json-schema/schema.js +231 -0
- package/lib/json-schema/shared.d.ts +62 -0
- package/lib/json-schema/shared.js +232 -0
- package/lib/json-schema/transformer.d.ts +4 -0
- package/lib/json-schema/transformer.js +238 -0
- package/lib/json-schema/types.d.ts +119 -0
- package/lib/json-schema/types.js +15 -0
- package/lib/path/contexts.d.ts +10 -0
- package/lib/path/contexts.js +49 -0
- package/lib/path/destructor.d.ts +15 -0
- package/lib/path/destructor.js +151 -0
- package/lib/path/index.d.ts +51 -0
- package/lib/path/index.js +513 -0
- package/lib/path/matcher.d.ts +33 -0
- package/lib/path/matcher.js +197 -0
- package/lib/path/parser.d.ts +33 -0
- package/lib/path/parser.js +379 -0
- package/lib/path/shared.d.ts +13 -0
- package/lib/path/shared.js +121 -0
- package/lib/path/tokenizer.d.ts +27 -0
- package/lib/path/tokenizer.js +269 -0
- package/lib/path/tokens.d.ts +27 -0
- package/lib/path/tokens.js +216 -0
- package/lib/path/types.d.ts +88 -0
- package/lib/path/types.js +63 -0
- package/lib/react/components/ArrayField.d.ts +6 -0
- package/lib/react/components/ArrayField.js +44 -0
- package/lib/react/components/ExpressionScope.d.ts +2 -0
- package/lib/react/components/ExpressionScope.js +35 -0
- package/lib/react/components/Field.d.ts +5 -0
- package/lib/react/components/Field.js +45 -0
- package/lib/react/components/FormConsumer.d.ts +2 -0
- package/lib/react/components/FormConsumer.js +36 -0
- package/lib/react/components/FormProvider.d.ts +2 -0
- package/lib/react/components/FormProvider.js +35 -0
- package/lib/react/components/ObjectField.d.ts +6 -0
- package/lib/react/components/ObjectField.js +39 -0
- package/lib/react/components/ReactiveField.d.ts +11 -0
- package/lib/react/components/ReactiveField.js +115 -0
- package/lib/react/components/RecordScope.d.ts +2 -0
- package/lib/react/components/RecordScope.js +65 -0
- package/lib/react/components/RecordsScope.d.ts +2 -0
- package/lib/react/components/RecordsScope.js +43 -0
- package/lib/react/components/RecursionField.d.ts +2 -0
- package/lib/react/components/RecursionField.js +105 -0
- package/lib/react/components/SchemaField.d.ts +41 -0
- package/lib/react/components/SchemaField.js +154 -0
- package/lib/react/components/VoidField.d.ts +5 -0
- package/lib/react/components/VoidField.js +39 -0
- package/lib/react/components/index.d.ts +11 -0
- package/lib/react/components/index.js +41 -0
- package/lib/react/global.d.js +0 -0
- package/lib/react/hooks/index.d.ts +6 -0
- package/lib/react/hooks/index.js +31 -0
- package/lib/react/hooks/useAttach.d.ts +6 -0
- package/lib/react/hooks/useAttach.js +35 -0
- package/lib/react/hooks/useExpressionScope.d.ts +1 -0
- package/lib/react/hooks/useExpressionScope.js +30 -0
- package/lib/react/hooks/useField.d.ts +2 -0
- package/lib/react/hooks/useField.js +32 -0
- package/lib/react/hooks/useFieldSchema.d.ts +2 -0
- package/lib/react/hooks/useFieldSchema.js +32 -0
- package/lib/react/hooks/useForm.d.ts +2 -0
- package/lib/react/hooks/useForm.js +32 -0
- package/lib/react/hooks/useFormEffects.d.ts +2 -0
- package/lib/react/hooks/useFormEffects.js +42 -0
- package/lib/react/hooks/useParentForm.d.ts +2 -0
- package/lib/react/hooks/useParentForm.js +40 -0
- package/lib/react/index.d.ts +5 -0
- package/lib/react/index.js +29 -0
- package/lib/react/shared/connect.d.ts +9 -0
- package/lib/react/shared/connect.js +118 -0
- package/lib/react/shared/context.d.ts +14 -0
- package/lib/react/shared/context.js +74 -0
- package/lib/react/shared/index.d.ts +2 -0
- package/lib/react/shared/index.js +23 -0
- package/lib/react/shared/render.d.ts +2 -0
- package/lib/react/shared/render.js +69 -0
- package/lib/react/types.d.ts +84 -0
- package/lib/react/types.js +15 -0
- package/lib/reactive/action.d.ts +2 -0
- package/lib/reactive/action.js +48 -0
- package/lib/reactive/annotations/box.d.ts +7 -0
- package/lib/reactive/annotations/box.js +76 -0
- package/lib/reactive/annotations/computed.d.ts +12 -0
- package/lib/reactive/annotations/computed.js +154 -0
- package/lib/reactive/annotations/index.d.ts +5 -0
- package/lib/reactive/annotations/index.js +29 -0
- package/lib/reactive/annotations/observable.d.ts +4 -0
- package/lib/reactive/annotations/observable.js +67 -0
- package/lib/reactive/annotations/ref.d.ts +6 -0
- package/lib/reactive/annotations/ref.js +78 -0
- package/lib/reactive/annotations/shallow.d.ts +2 -0
- package/lib/reactive/annotations/shallow.js +67 -0
- package/lib/reactive/array.d.ts +12 -0
- package/lib/reactive/array.js +83 -0
- package/lib/reactive/autorun.d.ts +7 -0
- package/lib/reactive/autorun.js +155 -0
- package/lib/reactive/batch.d.ts +2 -0
- package/lib/reactive/batch.js +40 -0
- package/lib/reactive/checkers.d.ts +10 -0
- package/lib/reactive/checkers.js +60 -0
- package/lib/reactive/environment.d.ts +28 -0
- package/lib/reactive/environment.js +76 -0
- package/lib/reactive/externals.d.ts +10 -0
- package/lib/reactive/externals.js +156 -0
- package/lib/reactive/global.d.js +0 -0
- package/lib/reactive/handlers.d.ts +4 -0
- package/lib/reactive/handlers.js +246 -0
- package/lib/reactive/index.d.ts +10 -0
- package/lib/reactive/index.js +39 -0
- package/lib/reactive/internals.d.ts +17 -0
- package/lib/reactive/internals.js +139 -0
- package/lib/reactive/model.d.ts +3 -0
- package/lib/reactive/model.js +68 -0
- package/lib/reactive/observable.d.ts +9 -0
- package/lib/reactive/observable.js +50 -0
- package/lib/reactive/observe.d.ts +2 -0
- package/lib/reactive/observe.js +58 -0
- package/lib/reactive/reaction.d.ts +21 -0
- package/lib/reactive/reaction.js +278 -0
- package/lib/reactive/tracker.d.ts +7 -0
- package/lib/reactive/tracker.js +63 -0
- package/lib/reactive/tree.d.ts +25 -0
- package/lib/reactive/tree.js +106 -0
- package/lib/reactive/types.d.ts +79 -0
- package/lib/reactive/types.js +21 -0
- package/lib/reactive/untracked.d.ts +4 -0
- package/lib/reactive/untracked.js +29 -0
- package/lib/reactive-react/hooks/index.d.ts +9 -0
- package/lib/reactive-react/hooks/index.js +48 -0
- package/lib/reactive-react/hooks/useCompatEffect.d.ts +2 -0
- package/lib/reactive-react/hooks/useCompatEffect.js +60 -0
- package/lib/reactive-react/hooks/useCompatFactory.d.ts +3 -0
- package/lib/reactive-react/hooks/useCompatFactory.js +74 -0
- package/lib/reactive-react/hooks/useDidUpdate.d.ts +1 -0
- package/lib/reactive-react/hooks/useDidUpdate.js +38 -0
- package/lib/reactive-react/hooks/useForceUpdate.d.ts +1 -0
- package/lib/reactive-react/hooks/useForceUpdate.js +76 -0
- package/lib/reactive-react/hooks/useLayoutEffect.d.ts +2 -0
- package/lib/reactive-react/hooks/useLayoutEffect.js +28 -0
- package/lib/reactive-react/hooks/useObserver.d.ts +2 -0
- package/lib/reactive-react/hooks/useObserver.js +43 -0
- package/lib/reactive-react/index.d.ts +3 -0
- package/lib/reactive-react/index.js +25 -0
- package/lib/reactive-react/observer.d.ts +8 -0
- package/lib/reactive-react/observer.js +64 -0
- package/lib/reactive-react/shared/gc.d.ts +8 -0
- package/lib/reactive-react/shared/gc.js +59 -0
- package/lib/reactive-react/shared/global.d.ts +1 -0
- package/lib/reactive-react/shared/global.js +50 -0
- package/lib/reactive-react/shared/immediate.d.ts +1 -0
- package/lib/reactive-react/shared/immediate.js +40 -0
- package/lib/reactive-react/shared/index.d.ts +2 -0
- package/lib/reactive-react/shared/index.js +23 -0
- package/lib/reactive-react/types.d.ts +14 -0
- package/lib/reactive-react/types.js +15 -0
- package/lib/shared/array.d.ts +35 -0
- package/lib/shared/array.js +189 -0
- package/lib/shared/case.d.ts +6 -0
- package/lib/shared/case.js +39 -0
- package/lib/shared/checkers.d.ts +21 -0
- package/lib/shared/checkers.js +77 -0
- package/lib/shared/clone.d.ts +2 -0
- package/lib/shared/clone.js +97 -0
- package/lib/shared/compare.d.ts +1 -0
- package/lib/shared/compare.js +129 -0
- package/lib/shared/defaults.d.ts +6 -0
- package/lib/shared/defaults.js +63 -0
- package/lib/shared/deprecate.d.ts +1 -0
- package/lib/shared/deprecate.js +42 -0
- package/lib/shared/global.d.ts +1 -0
- package/lib/shared/global.js +50 -0
- package/lib/shared/index.d.ts +16 -0
- package/lib/shared/index.js +51 -0
- package/lib/shared/instanceof.d.ts +1 -0
- package/lib/shared/instanceof.js +36 -0
- package/lib/shared/isEmpty.d.ts +3 -0
- package/lib/shared/isEmpty.js +94 -0
- package/lib/shared/merge.d.ts +12 -0
- package/lib/shared/merge.js +214 -0
- package/lib/shared/middleware.d.ts +4 -0
- package/lib/shared/middleware.js +41 -0
- package/lib/shared/path.d.ts +3 -0
- package/lib/shared/path.js +27 -0
- package/lib/shared/string.d.ts +1 -0
- package/lib/shared/string.js +38 -0
- package/lib/shared/subscribable.d.ts +11 -0
- package/lib/shared/subscribable.js +74 -0
- package/lib/shared/uid.d.ts +1 -0
- package/lib/shared/uid.js +35 -0
- package/lib/validator/formats.d.ts +16 -0
- package/lib/validator/formats.js +40 -0
- package/lib/validator/index.d.ts +4 -0
- package/lib/validator/index.js +27 -0
- package/lib/validator/locale.d.ts +219 -0
- package/lib/validator/locale.js +240 -0
- package/lib/validator/parser.d.ts +5 -0
- package/lib/validator/parser.js +153 -0
- package/lib/validator/registry.d.ts +15 -0
- package/lib/validator/registry.js +116 -0
- package/lib/validator/rules.d.ts +3 -0
- package/lib/validator/rules.js +154 -0
- package/lib/validator/template.d.ts +2 -0
- package/lib/validator/template.js +42 -0
- package/lib/validator/types.d.ts +62 -0
- package/lib/validator/types.js +28 -0
- package/lib/validator/validator.d.ts +2 -0
- package/lib/validator/validator.js +63 -0
- package/package.json +16 -10
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var LifeCycle_exports = {};
|
|
20
|
+
__export(LifeCycle_exports, {
|
|
21
|
+
LifeCycle: () => LifeCycle
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(LifeCycle_exports);
|
|
24
|
+
var import_shared = require("../../shared");
|
|
25
|
+
const _LifeCycle = class _LifeCycle {
|
|
26
|
+
constructor(...params) {
|
|
27
|
+
this.buildListener = /* @__PURE__ */ __name((params) => {
|
|
28
|
+
return function(payload, ctx) {
|
|
29
|
+
for (let index = 0; index < params.length; index++) {
|
|
30
|
+
let item = params[index];
|
|
31
|
+
if ((0, import_shared.isFn)(item)) {
|
|
32
|
+
item.call(this, payload, ctx);
|
|
33
|
+
} else if ((0, import_shared.isStr)(item) && (0, import_shared.isFn)(params[index + 1])) {
|
|
34
|
+
if (item === payload.type) {
|
|
35
|
+
params[index + 1].call(this, payload.payload, ctx);
|
|
36
|
+
}
|
|
37
|
+
index++;
|
|
38
|
+
} else {
|
|
39
|
+
(0, import_shared.each)(item, (handler, type) => {
|
|
40
|
+
if ((0, import_shared.isFn)(handler) && (0, import_shared.isStr)(type)) {
|
|
41
|
+
if (type === payload.type) {
|
|
42
|
+
handler.call(this, payload.payload, ctx);
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}, "buildListener");
|
|
51
|
+
this.notify = /* @__PURE__ */ __name((type, payload, ctx) => {
|
|
52
|
+
if ((0, import_shared.isStr)(type)) {
|
|
53
|
+
this.listener.call(ctx, { type, payload }, ctx);
|
|
54
|
+
}
|
|
55
|
+
}, "notify");
|
|
56
|
+
this.listener = this.buildListener(params);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
__name(_LifeCycle, "LifeCycle");
|
|
60
|
+
let LifeCycle = _LifeCycle;
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
LifeCycle
|
|
64
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormPathPattern, IFieldProps, JSXComponent } from '../types';
|
|
2
|
+
import { Field } from './Field';
|
|
3
|
+
import { Form } from './Form';
|
|
4
|
+
export declare class ObjectField<Decorator extends JSXComponent = any, Component extends JSXComponent = any> extends Field<Decorator, Component, any, Record<string, any>> {
|
|
5
|
+
displayName: string;
|
|
6
|
+
private additionalProperties;
|
|
7
|
+
constructor(address: FormPathPattern, props: IFieldProps<Decorator, Component>, form: Form, designable: boolean);
|
|
8
|
+
protected makeAutoCleanable(): void;
|
|
9
|
+
addProperty: (key: string, value: any) => Promise<void>;
|
|
10
|
+
removeProperty: (key: string) => Promise<void>;
|
|
11
|
+
existProperty: (key: string) => any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ObjectField_exports = {};
|
|
20
|
+
__export(ObjectField_exports, {
|
|
21
|
+
ObjectField: () => ObjectField
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(ObjectField_exports);
|
|
24
|
+
var import_reactive = require("../../reactive");
|
|
25
|
+
var import_internals = require("../shared/internals");
|
|
26
|
+
var import_Field = require("./Field");
|
|
27
|
+
const _ObjectField = class _ObjectField extends import_Field.Field {
|
|
28
|
+
constructor(address, props, form, designable) {
|
|
29
|
+
super(address, props, form, designable);
|
|
30
|
+
this.displayName = "ObjectField";
|
|
31
|
+
this.additionalProperties = [];
|
|
32
|
+
this.addProperty = /* @__PURE__ */ __name((key, value) => {
|
|
33
|
+
this.form.setValuesIn(this.path.concat(key), value);
|
|
34
|
+
this.additionalProperties.push(key);
|
|
35
|
+
return this.onInput(this.value);
|
|
36
|
+
}, "addProperty");
|
|
37
|
+
this.removeProperty = /* @__PURE__ */ __name((key) => {
|
|
38
|
+
this.form.deleteValuesIn(this.path.concat(key));
|
|
39
|
+
this.additionalProperties.splice(this.additionalProperties.indexOf(key), 1);
|
|
40
|
+
return this.onInput(this.value);
|
|
41
|
+
}, "removeProperty");
|
|
42
|
+
this.existProperty = /* @__PURE__ */ __name((key) => {
|
|
43
|
+
return this.form.existValuesIn(this.path.concat(key));
|
|
44
|
+
}, "existProperty");
|
|
45
|
+
this.makeAutoCleanable();
|
|
46
|
+
}
|
|
47
|
+
makeAutoCleanable() {
|
|
48
|
+
this.disposers.push(
|
|
49
|
+
(0, import_reactive.reaction)(
|
|
50
|
+
() => Object.keys(this.value || {}),
|
|
51
|
+
(newKeys) => {
|
|
52
|
+
const filterKeys = this.additionalProperties.filter((key) => !newKeys.includes(key));
|
|
53
|
+
(0, import_internals.cleanupObjectChildren)(this, filterKeys);
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
__name(_ObjectField, "ObjectField");
|
|
60
|
+
let ObjectField = _ObjectField;
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
ObjectField
|
|
64
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormPath, FormPathPattern } from '../../shared';
|
|
2
|
+
import { GeneralField, IGeneralFieldState, IQueryProps } from '../types';
|
|
3
|
+
export declare class Query {
|
|
4
|
+
private pattern;
|
|
5
|
+
private addresses;
|
|
6
|
+
private form;
|
|
7
|
+
constructor(props: IQueryProps);
|
|
8
|
+
take(): GeneralField | undefined;
|
|
9
|
+
take<Result>(getter: (field: GeneralField, address: FormPath) => Result): Result;
|
|
10
|
+
map(): GeneralField[];
|
|
11
|
+
map<Result>(iterator?: (field: GeneralField, address: FormPath) => Result): Result[];
|
|
12
|
+
forEach<Result>(iterator: (field: GeneralField, address: FormPath) => Result): void;
|
|
13
|
+
reduce<Result>(reducer: (value: Result, field: GeneralField, address: FormPath) => Result, initial?: Result): Result;
|
|
14
|
+
get<K extends keyof IGeneralFieldState>(key: K): IGeneralFieldState[K];
|
|
15
|
+
getIn(pattern?: FormPathPattern): any;
|
|
16
|
+
value(): any;
|
|
17
|
+
initialValue(): any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Query_exports = {};
|
|
20
|
+
__export(Query_exports, {
|
|
21
|
+
Query: () => Query
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Query_exports);
|
|
24
|
+
var import_shared = require("../../shared");
|
|
25
|
+
var import_internals = require("../shared/internals");
|
|
26
|
+
const output = /* @__PURE__ */ __name((field, taker) => {
|
|
27
|
+
if (!field) return;
|
|
28
|
+
if ((0, import_shared.isFn)(taker)) {
|
|
29
|
+
return taker(field, field.address);
|
|
30
|
+
}
|
|
31
|
+
return field;
|
|
32
|
+
}, "output");
|
|
33
|
+
const takeMatchPattern = /* @__PURE__ */ __name((form, pattern) => {
|
|
34
|
+
const identifier = pattern.toString();
|
|
35
|
+
const indexIdentifier = form.indexes[identifier];
|
|
36
|
+
const absoluteField = form.fields[identifier];
|
|
37
|
+
const indexField = form.fields[indexIdentifier];
|
|
38
|
+
if (absoluteField) {
|
|
39
|
+
return identifier;
|
|
40
|
+
} else if (indexField) {
|
|
41
|
+
return indexIdentifier;
|
|
42
|
+
}
|
|
43
|
+
}, "takeMatchPattern");
|
|
44
|
+
const _Query = class _Query {
|
|
45
|
+
constructor(props) {
|
|
46
|
+
this.addresses = [];
|
|
47
|
+
this.pattern = import_shared.FormPath.parse(props.pattern, props.base);
|
|
48
|
+
this.form = props.form;
|
|
49
|
+
if (!this.pattern.isMatchPattern) {
|
|
50
|
+
const matched = takeMatchPattern(
|
|
51
|
+
this.form,
|
|
52
|
+
this.pattern.haveRelativePattern ? (0, import_internals.buildDataPath)(props.form.fields, this.pattern) : this.pattern
|
|
53
|
+
);
|
|
54
|
+
if (matched) {
|
|
55
|
+
this.addresses = [matched];
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
(0, import_shared.each)(this.form.fields, (field, address) => {
|
|
59
|
+
if (!field) {
|
|
60
|
+
delete this.form.fields[address];
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (field.match(this.pattern)) {
|
|
64
|
+
this.addresses.push(address);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
take(taker) {
|
|
70
|
+
return output(this.form.fields[this.addresses[0]], taker);
|
|
71
|
+
}
|
|
72
|
+
map(iterator) {
|
|
73
|
+
return this.addresses.map((address) => output(this.form.fields[address], iterator));
|
|
74
|
+
}
|
|
75
|
+
forEach(iterator) {
|
|
76
|
+
return this.addresses.forEach((address) => output(this.form.fields[address], iterator));
|
|
77
|
+
}
|
|
78
|
+
reduce(reducer, initial) {
|
|
79
|
+
return this.addresses.reduce(
|
|
80
|
+
(value, address) => output(this.form.fields[address], (field, address2) => reducer(value, field, address2)),
|
|
81
|
+
initial
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
get(key) {
|
|
85
|
+
const results = this.take();
|
|
86
|
+
if (results) {
|
|
87
|
+
return results[key];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
getIn(pattern) {
|
|
91
|
+
return import_shared.FormPath.getIn(this.take(), pattern);
|
|
92
|
+
}
|
|
93
|
+
value() {
|
|
94
|
+
return this.get("value");
|
|
95
|
+
}
|
|
96
|
+
initialValue() {
|
|
97
|
+
return this.get("initialValue");
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
__name(_Query, "Query");
|
|
101
|
+
let Query = _Query;
|
|
102
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
+
0 && (module.exports = {
|
|
104
|
+
Query
|
|
105
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormPathPattern } from '../../shared';
|
|
2
|
+
import { IModelGetter, IModelSetter, IVoidFieldProps, IVoidFieldState } from '../types';
|
|
3
|
+
import { BaseField } from './BaseField';
|
|
4
|
+
import { Form } from './Form';
|
|
5
|
+
export declare class VoidField<Decorator = any, Component = any, TextType = any> extends BaseField<Decorator, Component, TextType> {
|
|
6
|
+
displayName: 'VoidField';
|
|
7
|
+
props: IVoidFieldProps<Decorator, Component>;
|
|
8
|
+
constructor(address: FormPathPattern, props: IVoidFieldProps<Decorator, Component>, form: Form, designable: boolean);
|
|
9
|
+
protected initialize(): void;
|
|
10
|
+
protected makeObservable(): void;
|
|
11
|
+
protected makeReactive(): void;
|
|
12
|
+
setState: IModelSetter<IVoidFieldState>;
|
|
13
|
+
getState: IModelGetter<IVoidFieldState>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var VoidField_exports = {};
|
|
20
|
+
__export(VoidField_exports, {
|
|
21
|
+
VoidField: () => VoidField
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(VoidField_exports);
|
|
24
|
+
var import_reactive = require("../../reactive");
|
|
25
|
+
var import_shared = require("../../shared");
|
|
26
|
+
var import_internals = require("../shared/internals");
|
|
27
|
+
var import_BaseField = require("./BaseField");
|
|
28
|
+
const _VoidField = class _VoidField extends import_BaseField.BaseField {
|
|
29
|
+
constructor(address, props, form, designable) {
|
|
30
|
+
super();
|
|
31
|
+
this.displayName = "VoidField";
|
|
32
|
+
this.setState = (0, import_internals.createStateSetter)(this);
|
|
33
|
+
this.getState = (0, import_internals.createStateGetter)(this);
|
|
34
|
+
this.form = form;
|
|
35
|
+
this.props = props;
|
|
36
|
+
this.designable = designable;
|
|
37
|
+
(0, import_internals.initializeStart)();
|
|
38
|
+
this.locate(address);
|
|
39
|
+
this.initialize();
|
|
40
|
+
this.makeObservable();
|
|
41
|
+
this.makeReactive();
|
|
42
|
+
this.onInit();
|
|
43
|
+
(0, import_internals.initializeEnd)();
|
|
44
|
+
}
|
|
45
|
+
initialize() {
|
|
46
|
+
this.mounted = false;
|
|
47
|
+
this.unmounted = false;
|
|
48
|
+
this.initialized = false;
|
|
49
|
+
this.title = this.props.title;
|
|
50
|
+
this.description = this.props.description;
|
|
51
|
+
this.pattern = this.props.pattern;
|
|
52
|
+
this.display = this.props.display;
|
|
53
|
+
this.hidden = this.props.hidden;
|
|
54
|
+
this.editable = this.props.editable;
|
|
55
|
+
this.disabled = this.props.disabled;
|
|
56
|
+
this.readOnly = this.props.readOnly;
|
|
57
|
+
this.readPretty = this.props.readPretty;
|
|
58
|
+
this.visible = this.props.visible;
|
|
59
|
+
this.content = this.props.content;
|
|
60
|
+
this.data = this.props.data;
|
|
61
|
+
this.decorator = (0, import_shared.toArr)(this.props.decorator);
|
|
62
|
+
this.component = (0, import_shared.toArr)(this.props.component);
|
|
63
|
+
}
|
|
64
|
+
makeObservable() {
|
|
65
|
+
if (this.designable) return;
|
|
66
|
+
(0, import_reactive.define)(this, {
|
|
67
|
+
path: import_reactive.observable.ref,
|
|
68
|
+
title: import_reactive.observable.ref,
|
|
69
|
+
description: import_reactive.observable.ref,
|
|
70
|
+
selfDisplay: import_reactive.observable.ref,
|
|
71
|
+
selfPattern: import_reactive.observable.ref,
|
|
72
|
+
initialized: import_reactive.observable.ref,
|
|
73
|
+
mounted: import_reactive.observable.ref,
|
|
74
|
+
unmounted: import_reactive.observable.ref,
|
|
75
|
+
decoratorType: import_reactive.observable.ref,
|
|
76
|
+
componentType: import_reactive.observable.ref,
|
|
77
|
+
content: import_reactive.observable.ref,
|
|
78
|
+
data: import_reactive.observable.shallow,
|
|
79
|
+
decoratorProps: import_reactive.observable,
|
|
80
|
+
componentProps: import_reactive.observable,
|
|
81
|
+
display: import_reactive.observable.computed,
|
|
82
|
+
pattern: import_reactive.observable.computed,
|
|
83
|
+
hidden: import_reactive.observable.computed,
|
|
84
|
+
visible: import_reactive.observable.computed,
|
|
85
|
+
disabled: import_reactive.observable.computed,
|
|
86
|
+
readOnly: import_reactive.observable.computed,
|
|
87
|
+
readPretty: import_reactive.observable.computed,
|
|
88
|
+
editable: import_reactive.observable.computed,
|
|
89
|
+
component: import_reactive.observable.computed,
|
|
90
|
+
decorator: import_reactive.observable.computed,
|
|
91
|
+
indexes: import_reactive.observable.computed,
|
|
92
|
+
setTitle: import_reactive.action,
|
|
93
|
+
setDescription: import_reactive.action,
|
|
94
|
+
setDisplay: import_reactive.action,
|
|
95
|
+
setPattern: import_reactive.action,
|
|
96
|
+
setComponent: import_reactive.action,
|
|
97
|
+
setComponentProps: import_reactive.action,
|
|
98
|
+
setDecorator: import_reactive.action,
|
|
99
|
+
setDecoratorProps: import_reactive.action,
|
|
100
|
+
setData: import_reactive.action,
|
|
101
|
+
setContent: import_reactive.action,
|
|
102
|
+
onInit: import_reactive.batch,
|
|
103
|
+
onMount: import_reactive.batch,
|
|
104
|
+
onUnmount: import_reactive.batch
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
makeReactive() {
|
|
108
|
+
if (this.designable) return;
|
|
109
|
+
(0, import_internals.createReactions)(this);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
__name(_VoidField, "VoidField");
|
|
113
|
+
let VoidField = _VoidField;
|
|
114
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
115
|
+
0 && (module.exports = {
|
|
116
|
+
VoidField
|
|
117
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var models_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(models_exports);
|
|
17
|
+
__reExport(models_exports, require("./Heart"), module.exports);
|
|
18
|
+
__reExport(models_exports, require("./LifeCycle"), module.exports);
|
|
19
|
+
__reExport(models_exports, require("./Graph"), module.exports);
|
|
20
|
+
__reExport(models_exports, require("./Query"), module.exports);
|
|
21
|
+
__reExport(models_exports, require("./Form"), module.exports);
|
|
22
|
+
__reExport(models_exports, require("./Field"), module.exports);
|
|
23
|
+
__reExport(models_exports, require("./ArrayField"), module.exports);
|
|
24
|
+
__reExport(models_exports, require("./ObjectField"), module.exports);
|
|
25
|
+
__reExport(models_exports, require("./VoidField"), module.exports);
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
...require("./Heart"),
|
|
29
|
+
...require("./LifeCycle"),
|
|
30
|
+
...require("./Graph"),
|
|
31
|
+
...require("./Query"),
|
|
32
|
+
...require("./Form"),
|
|
33
|
+
...require("./Field"),
|
|
34
|
+
...require("./ArrayField"),
|
|
35
|
+
...require("./ObjectField"),
|
|
36
|
+
...require("./VoidField")
|
|
37
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { Form } from './Form';
|
|
2
|
+
export type { Field } from './Field';
|
|
3
|
+
export type { Query } from './Query';
|
|
4
|
+
export type { Heart } from './Heart';
|
|
5
|
+
export type { Graph } from './Graph';
|
|
6
|
+
export type { LifeCycle } from './LifeCycle';
|
|
7
|
+
export type { ArrayField } from './ArrayField';
|
|
8
|
+
export type { ObjectField } from './ObjectField';
|
|
9
|
+
export type { VoidField } from './VoidField';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var types_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { DataField, JSXComponent } from '..';
|
|
2
|
+
import { ArrayField, Field, Form, ObjectField, Query, VoidField } from '../models';
|
|
3
|
+
import { GeneralField, IFieldState, IFormState, IGeneralFieldState, IVoidFieldState } from '../types';
|
|
4
|
+
export declare const isForm: (node: any) => node is Form;
|
|
5
|
+
export declare const isGeneralField: (node: any) => node is GeneralField;
|
|
6
|
+
export declare const isField: <Decorator extends unknown = any, Component extends unknown = any, TextType = any, ValueType = any>(node: any) => node is Field<Decorator, Component, TextType, ValueType>;
|
|
7
|
+
export declare const isArrayField: <Decorator extends unknown = any, Component extends unknown = any>(node: any) => node is ArrayField<Decorator, Component>;
|
|
8
|
+
export declare const isObjectField: <Decorator extends unknown = any, Component extends unknown = any>(node: any) => node is ObjectField<Decorator, Component>;
|
|
9
|
+
export declare const isVoidField: <Decorator = any, Component = any, TextType = any>(node: any) => node is VoidField<Decorator, Component, TextType>;
|
|
10
|
+
export declare const isFormState: <T extends Record<any, any> = any>(state: any) => state is IFormState<T>;
|
|
11
|
+
export declare const isFieldState: (state: any) => state is IFieldState;
|
|
12
|
+
export declare const isGeneralFieldState: (node: any) => node is IGeneralFieldState;
|
|
13
|
+
export declare const isArrayFieldState: (state: any) => state is IFieldState;
|
|
14
|
+
export declare const isDataField: (node: any) => node is DataField;
|
|
15
|
+
export declare const isDataFieldState: (node: any) => node is Partial<Pick<Field<any, any, any, any>, import("..").NonFunctionPropertyNames<{
|
|
16
|
+
value: ValueType;
|
|
17
|
+
match: (pattern: import("../../path").Pattern) => boolean;
|
|
18
|
+
readonly index: number;
|
|
19
|
+
onInput: (...args: any[]) => Promise<void>;
|
|
20
|
+
onFocus: (...args: any[]) => Promise<void>;
|
|
21
|
+
onBlur: (...args: any[]) => Promise<void>;
|
|
22
|
+
validator: import("..").FieldValidator;
|
|
23
|
+
required: boolean;
|
|
24
|
+
pattern: import("..").FieldPatternTypes;
|
|
25
|
+
readonly invalid: boolean;
|
|
26
|
+
editable: boolean;
|
|
27
|
+
readOnly: boolean;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
readPretty: boolean;
|
|
30
|
+
hidden: boolean;
|
|
31
|
+
visible: boolean;
|
|
32
|
+
loading: boolean;
|
|
33
|
+
validating: boolean;
|
|
34
|
+
submitting: boolean;
|
|
35
|
+
active: boolean;
|
|
36
|
+
visited: boolean;
|
|
37
|
+
selfModified: boolean;
|
|
38
|
+
modified: boolean;
|
|
39
|
+
inputValue: string;
|
|
40
|
+
inputValues: any[];
|
|
41
|
+
dataSource: import("..").FieldDataSource;
|
|
42
|
+
feedbacks: import("..").IFieldFeedback[];
|
|
43
|
+
caches: import("..").IFieldCaches;
|
|
44
|
+
selfErrors: import("..").FeedbackMessage;
|
|
45
|
+
readonly errors: import("..").IFormFeedback[];
|
|
46
|
+
selfWarnings: import("..").FeedbackMessage;
|
|
47
|
+
readonly warnings: import("..").IFormFeedback[];
|
|
48
|
+
selfSuccesses: import("..").FeedbackMessage;
|
|
49
|
+
readonly successes: import("..").IFormFeedback[];
|
|
50
|
+
readonly selfValid: boolean;
|
|
51
|
+
readonly valid: boolean;
|
|
52
|
+
readonly selfInvalid: boolean;
|
|
53
|
+
initialValue: ValueType;
|
|
54
|
+
readonly validateStatus: "error" | "warning" | "success" | "validating";
|
|
55
|
+
setDataSource: (dataSource?: import("..").FieldDataSource) => void;
|
|
56
|
+
setFeedback: (feedback?: import("..").IFieldFeedback) => void;
|
|
57
|
+
setSelfErrors: (messages?: import("..").FeedbackMessage) => void;
|
|
58
|
+
setSelfWarnings: (messages?: import("..").FeedbackMessage) => void;
|
|
59
|
+
setSelfSuccesses: (messages?: import("..").FeedbackMessage) => void;
|
|
60
|
+
setValidator: (validator?: import("..").FieldValidator) => void;
|
|
61
|
+
setValidatorRule: (name: string, value: any) => void;
|
|
62
|
+
setRequired: (required?: boolean) => void;
|
|
63
|
+
setValue: (value?: string) => void;
|
|
64
|
+
setInitialValue: (initialValue?: string) => void;
|
|
65
|
+
setLoading: (loading?: boolean) => void;
|
|
66
|
+
setValidating: (validating?: boolean) => void;
|
|
67
|
+
setSubmitting: (submitting?: boolean) => void;
|
|
68
|
+
validate: (triggerType?: import("../..").ValidatorTriggerType) => Promise<void>;
|
|
69
|
+
submit: <T>(onSubmit?: (values: any) => void | Promise<T>) => Promise<T>;
|
|
70
|
+
reset: (options?: import("..").IFieldResetOptions) => Promise<void>;
|
|
71
|
+
queryFeedbacks: (search?: import("..").ISearchFeedback) => import("..").IFieldFeedback[];
|
|
72
|
+
modify: () => void;
|
|
73
|
+
title: string;
|
|
74
|
+
description: string;
|
|
75
|
+
initialized: boolean;
|
|
76
|
+
mounted: boolean;
|
|
77
|
+
unmounted: boolean;
|
|
78
|
+
content: any;
|
|
79
|
+
data: any;
|
|
80
|
+
decoratorType: any;
|
|
81
|
+
decoratorProps: Record<string, any>;
|
|
82
|
+
componentType: any;
|
|
83
|
+
componentProps: Record<string, any>;
|
|
84
|
+
designable: boolean;
|
|
85
|
+
form: Form;
|
|
86
|
+
actions: import("..").IFieldActions;
|
|
87
|
+
locate: (address: import("../../path").Pattern) => void;
|
|
88
|
+
readonly records: any[];
|
|
89
|
+
readonly record: any;
|
|
90
|
+
component: import("..").FieldComponent<Component>;
|
|
91
|
+
decorator: import("..").FieldDecorator<Decorator>;
|
|
92
|
+
readonly parent: GeneralField;
|
|
93
|
+
display: import("..").FieldDisplayTypes;
|
|
94
|
+
readonly destroyed: boolean;
|
|
95
|
+
setTitle: (title?: string) => void;
|
|
96
|
+
setDescription: (description?: string) => void;
|
|
97
|
+
setDisplay: (type?: import("..").FieldDisplayTypes) => void;
|
|
98
|
+
setPattern: (type?: import("..").FieldPatternTypes) => void;
|
|
99
|
+
setComponent: <C extends unknown, ComponentProps extends object = {}>(component?: C, props?: ComponentProps) => void;
|
|
100
|
+
setComponentProps: <ComponentProps extends object = {}>(props?: ComponentProps) => void;
|
|
101
|
+
setDecorator: <D extends unknown, ComponentProps extends object = {}>(component?: D, props?: ComponentProps) => void;
|
|
102
|
+
setDecoratorProps: <ComponentProps extends object = {}>(props?: ComponentProps) => void;
|
|
103
|
+
setData: (data: any) => void;
|
|
104
|
+
setContent: (content: any) => void;
|
|
105
|
+
onInit: () => void;
|
|
106
|
+
onMount: () => void;
|
|
107
|
+
onUnmount: () => void;
|
|
108
|
+
query: (pattern: import("../../path").Pattern | RegExp) => Query;
|
|
109
|
+
notify: (type: import("..").LifeCycleTypes, payload?: any) => void;
|
|
110
|
+
dispose: () => void;
|
|
111
|
+
destroy: (forceClear?: boolean) => void;
|
|
112
|
+
inject: (actions: import("..").IFieldActions) => void;
|
|
113
|
+
invoke: (name: string, ...args: any[]) => any;
|
|
114
|
+
}>>>;
|
|
115
|
+
export declare const isObjectFieldState: (state: any) => state is IFieldState;
|
|
116
|
+
export declare const isVoidFieldState: (state: any) => state is IVoidFieldState;
|
|
117
|
+
export declare const isQuery: (query: any) => query is Query;
|