@synergy-client/types 0.1.5 → 0.1.7
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/dist/index.d.ts +47 -0
- package/dist/module-api.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,39 @@ export interface ChoiceListItem {
|
|
|
17
17
|
value: any;
|
|
18
18
|
text: string;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Operators a selection parameter can use. `eq` is emitted as a plain equality
|
|
22
|
+
* filter, everything else goes through the server's `quick` filter branch.
|
|
23
|
+
*/
|
|
24
|
+
export type SelectParamOperator = 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'iLike' | 'inList' | 'notInList' | 'filled' | 'notFilled';
|
|
25
|
+
/** Where a selection link reads its source value from. */
|
|
26
|
+
export type SelectLinkScope = 'object' | 'row';
|
|
27
|
+
/**
|
|
28
|
+
* A constant restriction on what a reference/enum field offers for selection —
|
|
29
|
+
* 1C's "Parametry wyboru". Applied to every list the field opens.
|
|
30
|
+
*/
|
|
31
|
+
export interface SelectParam {
|
|
32
|
+
id?: string;
|
|
33
|
+
/** Field of the referenced object (its column name); `value` for an enum field. */
|
|
34
|
+
field: string;
|
|
35
|
+
operator: SelectParamOperator;
|
|
36
|
+
value?: any;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A dependency of a reference/enum field on another field of the same object —
|
|
40
|
+
* 1C's "Powiazania parametrow wyboru". The source value narrows the selection
|
|
41
|
+
* list; an empty source drops the condition, and a value already picked is
|
|
42
|
+
* cleared whenever the source changes.
|
|
43
|
+
*/
|
|
44
|
+
export interface SelectLink {
|
|
45
|
+
id?: string;
|
|
46
|
+
/** Field of the referenced object (its column name); `value` for an enum field. */
|
|
47
|
+
field: string;
|
|
48
|
+
/** Path the value is read from, within `scope`. */
|
|
49
|
+
source: string;
|
|
50
|
+
/** Header attribute (`object`) or the current table row (`row`). */
|
|
51
|
+
sourceScope?: SelectLinkScope;
|
|
52
|
+
}
|
|
20
53
|
/**
|
|
21
54
|
* Argument of a `beforeChoice` handler — the 1C-like hook that lets a module
|
|
22
55
|
* replace a field's choice list at runtime.
|
|
@@ -78,6 +111,12 @@ export interface ViewItem {
|
|
|
78
111
|
format: string | null;
|
|
79
112
|
filter?: any;
|
|
80
113
|
filters?: any;
|
|
114
|
+
/** Constant restrictions of the selection list (1C "Parametry wyboru"). */
|
|
115
|
+
selectParams?: SelectParam[];
|
|
116
|
+
/** Dependencies of the selection list on other fields (1C "Powiazania parametrow wyboru"). */
|
|
117
|
+
selectLinks?: SelectLink[];
|
|
118
|
+
/** Table part the item belongs to, for a field of a table row. */
|
|
119
|
+
tableName?: string | null;
|
|
81
120
|
lang: any;
|
|
82
121
|
switch?: boolean;
|
|
83
122
|
maxLength: string | null;
|
|
@@ -164,6 +203,10 @@ export interface ViewAttribute {
|
|
|
164
203
|
ref: string | string[] | null;
|
|
165
204
|
lang?: any;
|
|
166
205
|
tableName?: string | null;
|
|
206
|
+
/** Constant restrictions of the selection list (1C "Parametry wyboru"). */
|
|
207
|
+
selectParams?: SelectParam[];
|
|
208
|
+
/** Dependencies of the selection list on other fields (1C "Powiazania parametrow wyboru"). */
|
|
209
|
+
selectLinks?: SelectLink[];
|
|
167
210
|
childs: ViewAttribute[];
|
|
168
211
|
}
|
|
169
212
|
export interface ViewAttributeTreeItem extends Omit<ViewAttribute, 'id' | 'childs'> {
|
|
@@ -186,6 +229,10 @@ export interface ObjectField {
|
|
|
186
229
|
lang: any;
|
|
187
230
|
type: string | null;
|
|
188
231
|
filter: string | null;
|
|
232
|
+
/** Constant restrictions of the selection list (1C "Parametry wyboru"). */
|
|
233
|
+
selectParams?: SelectParam[];
|
|
234
|
+
/** Dependencies of the selection list on other fields (1C "Powiazania parametrow wyboru"). */
|
|
235
|
+
selectLinks?: SelectLink[];
|
|
189
236
|
format: string | null;
|
|
190
237
|
leadingAlias: any;
|
|
191
238
|
primaryKey: boolean;
|
package/dist/module-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const moduleApiDts = "type ViewType = 'list' | 'detail' | 'other' | 'worker' | 'static' | 'select' | 'component' | 'print';\ntype ItemType = 'objectField' | 'field' | 'advancedComponent' | 'dynamic' | 'tabs' | 'tab' | 'radio' | 'file' | 'img' | 'text' | 'dynamicList' | 'dynamicTable' | 'group' | 'card' | 'progress' | 'calendar' | 'link' | 'button' | 'tablePart' | 'tableField' | 'select' | 'viewList';\ntype FieldType = 'object' | 'text' | 'number' | 'enum' | 'boolean' | 'date' | 'datetime' | 'time' | 'textarea';\ntype ToolbarPosition = 'top' | 'bottom' | 'none';\ntype ToolbarButtonsPosition = 'left' | 'right' | 'middle' | 'none';\n/** A single entry of a field's choice list (configured in view settings). */\ninterface ChoiceOption {\n /** Value written to the object field. */\n value: any;\n /** Text shown to the user (falls back when no translation is set). */\n title: string;\n /** Per-language overrides: `{ title: { pl: '...', ua: '...' } }`. */\n lang?: any;\n}\n/** The resolved option shape passed to the rendered select/autocomplete. */\ninterface ChoiceListItem {\n value: any;\n text: string;\n}\n/**\n * Argument of a `beforeChoice` handler — the 1C-like hook that lets a module\n * replace a field's choice list at runtime.\n */\ninterface BeforeChoiceParams {\n /** Fill this to provide the options; only used when `standardProcessing` is false. */\n choiceList: ChoiceListItem[];\n /** Set to false to use `choiceList` instead of the configured options. */\n standardProcessing: boolean;\n /** The item being rendered. */\n item?: ViewItem;\n}\n/** A form element (field, group, table, button, ...). */\ninterface ViewItem {\n id: string;\n type: ItemType;\n name: string;\n label: string;\n labelPosition: 'left' | 'top' | 'none';\n groupType?: 'toolbar' | 'collapsible';\n tagName?: string;\n tagRef?: any;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n fieldPath: string;\n fieldTypePath?: string;\n dataLinked?: boolean;\n dataPath?: string;\n defaultValue?: any;\n fieldType: FieldType;\n valueTypes?: any;\n selectView?: any;\n viewAttribute: boolean;\n ref: string | string[] | null;\n required: boolean;\n visible: boolean;\n translate: boolean;\n newRow: boolean;\n noGreed?: boolean;\n fieldCols: number;\n labelCols: number;\n contentCols: number | null;\n itemOffset: number;\n dataType: 'string' | 'integer' | 'decimal' | 'date' | 'enum';\n dateType: 'date' | 'datetime' | 'time';\n detailView: any;\n disabled: boolean;\n /** Render slot key (for slot-based group items). */\n slot?: string;\n options?: any;\n /** Render the field as a choice list instead of a plain input. */\n choiceList?: boolean;\n /** Statically configured entries of the choice list. */\n choiceOptions?: ChoiceOption[];\n /** Render the choice list as a searchable autocomplete instead of a select. */\n autocomplete?: boolean;\n /** Module function name that can replace the choice list at runtime. */\n beforeChoice?: string | null;\n format: string | null;\n filter?: any;\n filters?: any;\n lang: any;\n switch?: boolean;\n maxLength: string | null;\n numberPrecision: string | null;\n numberScale: string | null;\n onChange: string | null;\n placeholder: string | null;\n component?: any;\n icon: string;\n tooltip?: any;\n classes: string | null;\n styles: string | null;\n inputClasses: string | null;\n inputStyles: string | null;\n browseText?: any;\n accept?: any;\n noDrop?: boolean;\n multiple?: boolean;\n appObjectId?: any;\n showTotals?: boolean;\n disableSorting?: boolean;\n disableRowset?: boolean;\n hideToolbar?: boolean;\n hideActions?: boolean;\n usePagination?: boolean;\n rowsLimit?: number;\n maxHeight?: number;\n selectBtn?: boolean;\n openBtn?: boolean;\n addBtn?: boolean;\n hyperLink?: boolean;\n beforeSelect?: any;\n maxRows?: number;\n rowsCount?: number;\n variant?: string;\n pill?: boolean;\n squared?: boolean;\n block?: boolean;\n toggleGroup?: any;\n itemIcon?: any;\n max?: any;\n textVariant?: any;\n bgVariant?: any;\n attrs: any;\n /** Server function name invoked on select. */\n onSelect?: string | null;\n /** Detail-view route path for reference fields. */\n detailPath?: string | null;\n /** Referenced component id (for advancedComponent items). */\n componentId?: string;\n selectType?: string;\n /** Render key. */\n key?: string;\n /** Dynamic-parameter payload (advanced components). */\n parameter?: any;\n parameterId?: string;\n /** Totals row config (list/table parts). */\n isTotal?: boolean;\n totalFunc?: string | null;\n totalExp?: string | null;\n valueString?: any;\n valueNumber?: any;\n valueBoolean?: any;\n valueDate?: any;\n valueObject?: any;\n valueRef?: any;\n /** Nested items (for groups/tables). */\n items?: ViewItem[];\n}\n/** A view attribute (form-level field, not bound to the object). */\ninterface ViewAttribute {\n id: string;\n title: string;\n name: string;\n type: 'field' | 'tableField' | 'dynamicTable' | null;\n dataType: string | null;\n standard?: boolean;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n typeOptions?: any;\n dateType: string;\n defaultValue?: any;\n format: string | null;\n ref: string | string[] | null;\n lang?: any;\n tableName?: string | null;\n childs: ViewAttribute[];\n}\ninterface ViewAttributeTreeItem extends Omit<ViewAttribute, 'id' | 'childs'> {\n attrId: string;\n path: string;\n fullName: string;\n fullPath: string;\n fullTitle: string;\n expanded?: boolean;\n viewAttribute?: boolean;\n dependent: boolean;\n childs: ViewAttributeTreeItem[];\n}\n/** A field of an app object (catalog/document/register). */\ninterface ObjectField {\n id: string;\n name: string;\n title: string;\n ref: string | string[] | null;\n lang: any;\n type: string | null;\n filter: string | null;\n format: string | null;\n leadingAlias: any;\n primaryKey: boolean;\n leading: boolean;\n decryptable: boolean;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n defaultValue: any;\n standard?: any;\n dbName: string;\n dateType: string;\n notNull: boolean;\n autoIncrement: boolean;\n unique: boolean;\n index: boolean;\n password: boolean;\n isTablePart: boolean;\n model?: string;\n role: string | null;\n fullSearch: boolean;\n fullName?: string;\n typeOptions: any;\n virtual: boolean;\n comment: string | null;\n confidential?: boolean;\n confidentialRoleId?: string | null;\n fields?: ObjectField[];\n get: any;\n set: any;\n}\n/** A toolbar button/group. */\ninterface ToolbarItem {\n id: string;\n title: string;\n icon?: string | null;\n presentation: string;\n variant: string;\n size: string;\n disabled: boolean;\n visible: boolean;\n systemDisabled: boolean;\n systemVisible: boolean;\n hidden: boolean;\n tooltip?: string;\n type?: string;\n click?: Function;\n /** Server function name invoked on click (resolved via serverFunc). */\n onClick?: string;\n /** i18n overrides (lang.title[langCode], ...). */\n lang?: any;\n items?: ToolbarItem[];\n}\ninterface Toolbar {\n position: ToolbarPosition;\n buttonsPosition: ToolbarButtonsPosition;\n classes: string | null;\n styles: string | null;\n items: ToolbarItem[];\n staticItems: ToolbarItem[];\n commonCommands: ToolbarItem[];\n}\ninterface SortBy {\n key: string;\n order?: 'asc' | 'desc' | string;\n sortByOrig?: any;\n}\n/** List/table view data (list and select forms). */\ninterface ListViewTable {\n items: any[];\n fields: any[];\n total: number;\n page: number;\n limit: number;\n filters: Record<string, any>;\n sort: SortBy[];\n folders: {\n items: any[];\n expanded: any[];\n };\n}\n/** Current route (vue-router). */\ninterface Route {\n path: string;\n fullPath: string;\n name?: string | symbol | null;\n params: Record<string, any>;\n query: Record<string, any>;\n hash: string;\n meta: Record<string, any>;\n}\n/** Router instance (vue-router). */\ninterface Router {\n push(to: any): Promise<any>;\n replace(to: any): Promise<any>;\n back(): void;\n forward(): void;\n go(delta: number): void;\n}\n/** onCreate / onMount / afterConfirm / afterMarkedToDelete / afterDelete / onBeforeDestroy. */\ntype ModuleHook = () => void | Promise<void>;\n/** beforeWrite / beforeConfirm / beforeMarkedToDelete / beforeDelete — set params.cancel to abort. */\ntype CancelableHook = (params: {\n cancel: boolean;\n}) => void | Promise<void>;\n/** afterWrite — receives { close } (optional; also called with no args). */\ntype AfterWriteHook = (options?: {\n close?: boolean;\n}) => void | Promise<void>;\n/** setCustomStage — override the business-process stage. */\ntype SetCustomStageHook = (process: any) => any | Promise<any>;\n/** Entity data store (useStore('object'), or a view's `store`). */\ninterface Store {\n findByPk(payload?: any): Promise<any>;\n findAll(payload?: any): Promise<any>;\n count(payload?: any): Promise<number>;\n create(payload?: any): Promise<any>;\n createItem(payload?: any): Promise<any>;\n update(payload?: any): Promise<any>;\n updateItem(payload?: any): Promise<any>;\n delete(payload?: any): Promise<any>;\n deleteItem(payload?: any): Promise<any>;\n addNewItem(payload?: any): Promise<any>;\n changeDeletionMark(payload?: any): Promise<any>;\n getView(): {\n object: any;\n attrs: any;\n objectMeta: any;\n };\n}\n/** Control object passed to cancelable client `before*` hooks. Set `cancel` to abort the request. */\ninterface CancelParams {\n cancel: boolean;\n message?: string;\n}\n/**\n * `this` inside an object client-module EVENT hook (`events.*`).\n * The module receives no injected globals — the environment is reached through\n * these `$`-prefixed helpers on `this`.\n */\ninterface ObjectModuleContext {\n /** HTTP client (axios instance), e.g. `this.$axios.get('/products')`. */\n $axios: any;\n /** Get another object's data store by name. */\n $useStore(name: string): Store;\n /** i18n translation. */\n $t(key: string, ...args: any[]): string;\n /** Moment.js date helper. */\n $moment(input?: any): any;\n /** Lodash utilities. */\n $lodash: any;\n /** This object's views (ObjectView / ListView state). */\n views: any[];\n /** This object's metadata (blank-record template, fields). */\n objectMeta: any;\n /** Module actions merged into the store. */\n actions: Record<string, (...args: any[]) => any>;\n /** Module helper functions (`this.functions.x`). */\n functions: Record<string, (...args: any[]) => any>;\n /** Module getters. */\n getters: Record<string, any>;\n}\n/**\n * `this` inside an object client-module ACTION (`actions.*`) — the entity store\n * (all store methods + `views` / `objectMeta`). Overriding an action fully\n * replaces the built-in one (its `before*`/`after*` hooks are bypassed).\n */\ninterface ObjectModuleActionThis extends Store {\n views: any[];\n objectMeta: any;\n}";
|
|
1
|
+
export const moduleApiDts = "type ViewType = 'list' | 'detail' | 'other' | 'worker' | 'static' | 'select' | 'component' | 'print';\ntype ItemType = 'objectField' | 'field' | 'advancedComponent' | 'dynamic' | 'tabs' | 'tab' | 'radio' | 'file' | 'img' | 'text' | 'dynamicList' | 'dynamicTable' | 'group' | 'card' | 'progress' | 'calendar' | 'link' | 'button' | 'tablePart' | 'tableField' | 'select' | 'viewList';\ntype FieldType = 'object' | 'text' | 'number' | 'enum' | 'boolean' | 'date' | 'datetime' | 'time' | 'textarea';\ntype ToolbarPosition = 'top' | 'bottom' | 'none';\ntype ToolbarButtonsPosition = 'left' | 'right' | 'middle' | 'none';\n/** A single entry of a field's choice list (configured in view settings). */\ninterface ChoiceOption {\n /** Value written to the object field. */\n value: any;\n /** Text shown to the user (falls back when no translation is set). */\n title: string;\n /** Per-language overrides: `{ title: { pl: '...', ua: '...' } }`. */\n lang?: any;\n}\n/** The resolved option shape passed to the rendered select/autocomplete. */\ninterface ChoiceListItem {\n value: any;\n text: string;\n}\n/**\n * Operators a selection parameter can use. `eq` is emitted as a plain equality\n * filter, everything else goes through the server's `quick` filter branch.\n */\ntype SelectParamOperator = 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'iLike' | 'inList' | 'notInList' | 'filled' | 'notFilled';\n/** Where a selection link reads its source value from. */\ntype SelectLinkScope = 'object' | 'row';\n/**\n * A constant restriction on what a reference/enum field offers for selection —\n * 1C's \"Parametry wyboru\". Applied to every list the field opens.\n */\ninterface SelectParam {\n id?: string;\n /** Field of the referenced object (its column name); `value` for an enum field. */\n field: string;\n operator: SelectParamOperator;\n value?: any;\n}\n/**\n * A dependency of a reference/enum field on another field of the same object —\n * 1C's \"Powiazania parametrow wyboru\". The source value narrows the selection\n * list; an empty source drops the condition, and a value already picked is\n * cleared whenever the source changes.\n */\ninterface SelectLink {\n id?: string;\n /** Field of the referenced object (its column name); `value` for an enum field. */\n field: string;\n /** Path the value is read from, within `scope`. */\n source: string;\n /** Header attribute (`object`) or the current table row (`row`). */\n sourceScope?: SelectLinkScope;\n}\n/**\n * Argument of a `beforeChoice` handler — the 1C-like hook that lets a module\n * replace a field's choice list at runtime.\n */\ninterface BeforeChoiceParams {\n /** Fill this to provide the options; only used when `standardProcessing` is false. */\n choiceList: ChoiceListItem[];\n /** Set to false to use `choiceList` instead of the configured options. */\n standardProcessing: boolean;\n /** The item being rendered. */\n item?: ViewItem;\n}\n/** A form element (field, group, table, button, ...). */\ninterface ViewItem {\n id: string;\n type: ItemType;\n name: string;\n label: string;\n labelPosition: 'left' | 'top' | 'none';\n groupType?: 'toolbar' | 'collapsible';\n tagName?: string;\n tagRef?: any;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n fieldPath: string;\n fieldTypePath?: string;\n dataLinked?: boolean;\n dataPath?: string;\n defaultValue?: any;\n fieldType: FieldType;\n valueTypes?: any;\n selectView?: any;\n viewAttribute: boolean;\n ref: string | string[] | null;\n required: boolean;\n visible: boolean;\n translate: boolean;\n newRow: boolean;\n noGreed?: boolean;\n fieldCols: number;\n labelCols: number;\n contentCols: number | null;\n itemOffset: number;\n dataType: 'string' | 'integer' | 'decimal' | 'date' | 'enum';\n dateType: 'date' | 'datetime' | 'time';\n detailView: any;\n disabled: boolean;\n /** Render slot key (for slot-based group items). */\n slot?: string;\n options?: any;\n /** Render the field as a choice list instead of a plain input. */\n choiceList?: boolean;\n /** Statically configured entries of the choice list. */\n choiceOptions?: ChoiceOption[];\n /** Render the choice list as a searchable autocomplete instead of a select. */\n autocomplete?: boolean;\n /** Module function name that can replace the choice list at runtime. */\n beforeChoice?: string | null;\n format: string | null;\n filter?: any;\n filters?: any;\n /** Constant restrictions of the selection list (1C \"Parametry wyboru\"). */\n selectParams?: SelectParam[];\n /** Dependencies of the selection list on other fields (1C \"Powiazania parametrow wyboru\"). */\n selectLinks?: SelectLink[];\n /** Table part the item belongs to, for a field of a table row. */\n tableName?: string | null;\n lang: any;\n switch?: boolean;\n maxLength: string | null;\n numberPrecision: string | null;\n numberScale: string | null;\n onChange: string | null;\n placeholder: string | null;\n component?: any;\n icon: string;\n tooltip?: any;\n classes: string | null;\n styles: string | null;\n inputClasses: string | null;\n inputStyles: string | null;\n browseText?: any;\n accept?: any;\n noDrop?: boolean;\n multiple?: boolean;\n appObjectId?: any;\n showTotals?: boolean;\n disableSorting?: boolean;\n disableRowset?: boolean;\n hideToolbar?: boolean;\n hideActions?: boolean;\n usePagination?: boolean;\n rowsLimit?: number;\n maxHeight?: number;\n selectBtn?: boolean;\n openBtn?: boolean;\n addBtn?: boolean;\n hyperLink?: boolean;\n beforeSelect?: any;\n maxRows?: number;\n rowsCount?: number;\n variant?: string;\n pill?: boolean;\n squared?: boolean;\n block?: boolean;\n toggleGroup?: any;\n itemIcon?: any;\n max?: any;\n textVariant?: any;\n bgVariant?: any;\n attrs: any;\n /** Server function name invoked on select. */\n onSelect?: string | null;\n /** Detail-view route path for reference fields. */\n detailPath?: string | null;\n /** Referenced component id (for advancedComponent items). */\n componentId?: string;\n selectType?: string;\n /** Render key. */\n key?: string;\n /** Dynamic-parameter payload (advanced components). */\n parameter?: any;\n parameterId?: string;\n /** Totals row config (list/table parts). */\n isTotal?: boolean;\n totalFunc?: string | null;\n totalExp?: string | null;\n valueString?: any;\n valueNumber?: any;\n valueBoolean?: any;\n valueDate?: any;\n valueObject?: any;\n valueRef?: any;\n /** Nested items (for groups/tables). */\n items?: ViewItem[];\n}\n/** A view attribute (form-level field, not bound to the object). */\ninterface ViewAttribute {\n id: string;\n title: string;\n name: string;\n type: 'field' | 'tableField' | 'dynamicTable' | null;\n dataType: string | null;\n standard?: boolean;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n typeOptions?: any;\n dateType: string;\n defaultValue?: any;\n format: string | null;\n ref: string | string[] | null;\n lang?: any;\n tableName?: string | null;\n /** Constant restrictions of the selection list (1C \"Parametry wyboru\"). */\n selectParams?: SelectParam[];\n /** Dependencies of the selection list on other fields (1C \"Powiazania parametrow wyboru\"). */\n selectLinks?: SelectLink[];\n childs: ViewAttribute[];\n}\ninterface ViewAttributeTreeItem extends Omit<ViewAttribute, 'id' | 'childs'> {\n attrId: string;\n path: string;\n fullName: string;\n fullPath: string;\n fullTitle: string;\n expanded?: boolean;\n viewAttribute?: boolean;\n dependent: boolean;\n childs: ViewAttributeTreeItem[];\n}\n/** A field of an app object (catalog/document/register). */\ninterface ObjectField {\n id: string;\n name: string;\n title: string;\n ref: string | string[] | null;\n lang: any;\n type: string | null;\n filter: string | null;\n /** Constant restrictions of the selection list (1C \"Parametry wyboru\"). */\n selectParams?: SelectParam[];\n /** Dependencies of the selection list on other fields (1C \"Powiazania parametrow wyboru\"). */\n selectLinks?: SelectLink[];\n format: string | null;\n leadingAlias: any;\n primaryKey: boolean;\n leading: boolean;\n decryptable: boolean;\n multiType: boolean;\n multiTypeVariant: 'common' | 'objects';\n defaultValue: any;\n standard?: any;\n dbName: string;\n dateType: string;\n notNull: boolean;\n autoIncrement: boolean;\n unique: boolean;\n index: boolean;\n password: boolean;\n isTablePart: boolean;\n model?: string;\n role: string | null;\n fullSearch: boolean;\n fullName?: string;\n typeOptions: any;\n virtual: boolean;\n comment: string | null;\n confidential?: boolean;\n confidentialRoleId?: string | null;\n fields?: ObjectField[];\n get: any;\n set: any;\n}\n/** A toolbar button/group. */\ninterface ToolbarItem {\n id: string;\n title: string;\n icon?: string | null;\n presentation: string;\n variant: string;\n size: string;\n disabled: boolean;\n visible: boolean;\n systemDisabled: boolean;\n systemVisible: boolean;\n hidden: boolean;\n tooltip?: string;\n type?: string;\n click?: Function;\n /** Server function name invoked on click (resolved via serverFunc). */\n onClick?: string;\n /** i18n overrides (lang.title[langCode], ...). */\n lang?: any;\n items?: ToolbarItem[];\n}\ninterface Toolbar {\n position: ToolbarPosition;\n buttonsPosition: ToolbarButtonsPosition;\n classes: string | null;\n styles: string | null;\n items: ToolbarItem[];\n staticItems: ToolbarItem[];\n commonCommands: ToolbarItem[];\n}\ninterface SortBy {\n key: string;\n order?: 'asc' | 'desc' | string;\n sortByOrig?: any;\n}\n/** List/table view data (list and select forms). */\ninterface ListViewTable {\n items: any[];\n fields: any[];\n total: number;\n page: number;\n limit: number;\n filters: Record<string, any>;\n sort: SortBy[];\n folders: {\n items: any[];\n expanded: any[];\n };\n}\n/** Current route (vue-router). */\ninterface Route {\n path: string;\n fullPath: string;\n name?: string | symbol | null;\n params: Record<string, any>;\n query: Record<string, any>;\n hash: string;\n meta: Record<string, any>;\n}\n/** Router instance (vue-router). */\ninterface Router {\n push(to: any): Promise<any>;\n replace(to: any): Promise<any>;\n back(): void;\n forward(): void;\n go(delta: number): void;\n}\n/** onCreate / onMount / afterConfirm / afterMarkedToDelete / afterDelete / onBeforeDestroy. */\ntype ModuleHook = () => void | Promise<void>;\n/** beforeWrite / beforeConfirm / beforeMarkedToDelete / beforeDelete — set params.cancel to abort. */\ntype CancelableHook = (params: {\n cancel: boolean;\n}) => void | Promise<void>;\n/** afterWrite — receives { close } (optional; also called with no args). */\ntype AfterWriteHook = (options?: {\n close?: boolean;\n}) => void | Promise<void>;\n/** setCustomStage — override the business-process stage. */\ntype SetCustomStageHook = (process: any) => any | Promise<any>;\n/** Entity data store (useStore('object'), or a view's `store`). */\ninterface Store {\n findByPk(payload?: any): Promise<any>;\n findAll(payload?: any): Promise<any>;\n count(payload?: any): Promise<number>;\n create(payload?: any): Promise<any>;\n createItem(payload?: any): Promise<any>;\n update(payload?: any): Promise<any>;\n updateItem(payload?: any): Promise<any>;\n delete(payload?: any): Promise<any>;\n deleteItem(payload?: any): Promise<any>;\n addNewItem(payload?: any): Promise<any>;\n changeDeletionMark(payload?: any): Promise<any>;\n getView(): {\n object: any;\n attrs: any;\n objectMeta: any;\n };\n}\n/** Control object passed to cancelable client `before*` hooks. Set `cancel` to abort the request. */\ninterface CancelParams {\n cancel: boolean;\n message?: string;\n}\n/**\n * `this` inside an object client-module EVENT hook (`events.*`).\n * The module receives no injected globals — the environment is reached through\n * these `$`-prefixed helpers on `this`.\n */\ninterface ObjectModuleContext {\n /** HTTP client (axios instance), e.g. `this.$axios.get('/products')`. */\n $axios: any;\n /** Get another object's data store by name. */\n $useStore(name: string): Store;\n /** i18n translation. */\n $t(key: string, ...args: any[]): string;\n /** Moment.js date helper. */\n $moment(input?: any): any;\n /** Lodash utilities. */\n $lodash: any;\n /** This object's views (ObjectView / ListView state). */\n views: any[];\n /** This object's metadata (blank-record template, fields). */\n objectMeta: any;\n /** Module actions merged into the store. */\n actions: Record<string, (...args: any[]) => any>;\n /** Module helper functions (`this.functions.x`). */\n functions: Record<string, (...args: any[]) => any>;\n /** Module getters. */\n getters: Record<string, any>;\n}\n/**\n * `this` inside an object client-module ACTION (`actions.*`) — the entity store\n * (all store methods + `views` / `objectMeta`). Overriding an action fully\n * replaces the built-in one (its `before*`/`after*` hooks are bypassed).\n */\ninterface ObjectModuleActionThis extends Store {\n views: any[];\n objectMeta: any;\n}";
|
package/package.json
CHANGED