@cortezaproject/corteza-vue 2024.9.4 → 2024.9.5-dev.2
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/components/index.d.ts +1 -1
- package/dist/components/input/index.d.ts +1 -0
- package/dist/index.cjs +1702 -4544
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1700 -4542
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/pm/state/index.d.ts +1 -0
- package/dist/src/components/auth/index.d.ts +1 -0
- package/dist/src/components/c3/Controls/index.d.ts +22 -0
- package/dist/src/components/c3/helpers.d.ts +29 -0
- package/dist/src/components/c3/index.d.ts +7 -0
- package/dist/src/components/chart/index.d.ts +1 -0
- package/dist/src/components/corredor/index.d.ts +1 -0
- package/dist/src/components/filePreview/index.d.ts +3 -0
- package/dist/src/components/hint/index.d.ts +1 -0
- package/dist/src/components/index.d.ts +24 -0
- package/dist/src/components/input/CInputDateTime/lib/index.d.ts +4 -0
- package/dist/src/components/input/button/index.d.ts +1 -0
- package/dist/src/components/input/index.d.ts +15 -0
- package/dist/src/components/itemPicker/index.d.ts +2 -0
- package/dist/src/components/lightbox/index.d.ts +1 -0
- package/dist/src/components/loader/index.d.ts +1 -0
- package/dist/src/components/map/index.d.ts +1 -0
- package/dist/src/components/navigation/index.d.ts +3 -0
- package/dist/src/components/notifications/index.d.ts +2 -0
- package/dist/src/components/notifications/types/index.d.ts +6 -0
- package/dist/src/components/permissions/def.d.ts +14 -0
- package/dist/src/components/permissions/index.d.ts +2 -0
- package/dist/src/components/privacy/index.d.ts +1 -0
- package/dist/src/components/progress/index.d.ts +1 -0
- package/dist/src/components/prompts/definitions.d.ts +2 -0
- package/dist/src/components/prompts/index.d.ts +4 -0
- package/dist/src/components/prompts/kinds/index.d.ts +22 -0
- package/dist/src/components/prompts/utils.d.ts +3 -0
- package/dist/src/components/reminders/index.d.ts +1 -0
- package/dist/src/components/reporter/index.d.ts +4 -0
- package/dist/src/components/resourceList/index.d.ts +1 -0
- package/dist/src/components/toaster/index.d.ts +2 -0
- package/dist/src/components/toolbar/index.d.ts +1 -0
- package/dist/src/components/webcam/index.d.ts +1 -0
- package/dist/src/components/wrapper/index.d.ts +1 -0
- package/dist/src/corredor/compose-ctx.d.ts +32 -0
- package/dist/src/corredor/compose-ui.d.ts +105 -0
- package/dist/src/corredor/index.d.ts +3 -0
- package/dist/src/corredor/webapp-ctx.d.ts +11 -0
- package/dist/src/filters/date.d.ts +2 -0
- package/dist/src/filters/index.d.ts +2 -0
- package/dist/src/filters/url.d.ts +1 -0
- package/dist/src/i18n.d.ts +40 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/libs/filter.d.ts +3 -0
- package/dist/src/libs/handle.d.ts +4 -0
- package/dist/src/libs/url.d.ts +12 -0
- package/dist/src/libs/websocket.d.ts +23 -0
- package/dist/src/mixins/index.d.ts +2 -0
- package/dist/src/plugins/auth.d.ts +217 -0
- package/dist/src/plugins/corteza-api.d.ts +15 -0
- package/dist/src/plugins/eventbus.d.ts +3 -0
- package/dist/src/plugins/index.d.ts +7 -0
- package/dist/src/plugins/ui-hooks.d.ts +74 -0
- package/dist/src/store/RBAC.d.ts +15 -0
- package/dist/src/store/index.d.ts +3 -0
- package/dist/src/store/notifications/index.d.ts +16 -0
- package/dist/src/store/wf-prompts/index.d.ts +21 -0
- package/package.json +17 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'prosemirror-state';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CExtendSession } from './CExtendSession.vue';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
interface Handler {
|
|
3
|
+
value(props: object): unknown;
|
|
4
|
+
update(props: object, value: unknown): void;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
[_: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
interface Control extends Handler {
|
|
10
|
+
component: Component;
|
|
11
|
+
props?: Props;
|
|
12
|
+
}
|
|
13
|
+
interface Specs {
|
|
14
|
+
handler: string | Handler;
|
|
15
|
+
props?: Props;
|
|
16
|
+
}
|
|
17
|
+
export declare function generic(component: Component, { handler, props }: Specs): Control;
|
|
18
|
+
export declare function input(label: string, handler: string | Handler): Control;
|
|
19
|
+
export declare function textarea(label: string, handler: string | Handler): Control;
|
|
20
|
+
export declare function checkbox(label: string, handler: string | Handler): Control;
|
|
21
|
+
export declare function select(label: string, handler: string | Handler, options: object): Control;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface CatalogueItem {
|
|
2
|
+
group?: Array<string>;
|
|
3
|
+
name?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Catalogue {
|
|
6
|
+
[_: string]: CatalogueItem;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Extract subgroups from the given groups
|
|
10
|
+
* @param groups
|
|
11
|
+
* @param path Array of groups that represent the path
|
|
12
|
+
*/
|
|
13
|
+
export declare function extractGroups(groups: Array<Array<string>>, ...path: Array<string>): Array<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Extract subgroups from the catalogue that match the given path
|
|
16
|
+
*
|
|
17
|
+
* @param cat Catalogue
|
|
18
|
+
* @param path Array of groups that represent the path
|
|
19
|
+
* @constructor
|
|
20
|
+
*/
|
|
21
|
+
export declare function ExtractSubgroups(cat: Catalogue, ...path: Array<string>): Array<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns all components that match the given path
|
|
24
|
+
*
|
|
25
|
+
* @param cat Catalogue
|
|
26
|
+
* @param path Array of groups that represent the path
|
|
27
|
+
|
|
28
|
+
*/
|
|
29
|
+
export declare function ExtractComponents(cat: Catalogue, ...path: Array<string>): Array<CatalogueItem>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import View from './C3.vue';
|
|
2
|
+
import * as controls from './Controls';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
View: import("vue").VueConstructor<View<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => View>>;
|
|
5
|
+
controls: typeof controls;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CChart } from './CChart.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CCorredorManualButtons } from './CCorredorManualButtons.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CHint } from './CHint.vue';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { CExtendSession, } from './auth';
|
|
2
|
+
export { CCorredorManualButtons, } from './corredor';
|
|
3
|
+
export { CPreviewInline, CPreviewLightbox, canPreview, } from './filePreview';
|
|
4
|
+
export { CInputConfirm, CInputProcessing, CInputDateTime, CInputPresort, CInputSearch, CRichTextInput, CInputCheckbox, CInputColorPicker, CAceEditor, CInputExpression, CButtonSubmit, CInputSelect, CInputRole, CInputUser, CInputUserGroup, } from './input';
|
|
5
|
+
export { CLightbox, } from './lightbox';
|
|
6
|
+
export { CPermissionsButton, CPermissionsModal, } from './permissions';
|
|
7
|
+
export * from './prompts';
|
|
8
|
+
export { CLoaderLogo, } from './loader';
|
|
9
|
+
export { CTopbar, CSidebar, CSidebarNavItems, } from './navigation';
|
|
10
|
+
export { CToaster, CToasterLink, } from './toaster';
|
|
11
|
+
export { CReminderSidebar, } from './reminders';
|
|
12
|
+
export { CItemPicker, CItemPickerItem, } from './itemPicker';
|
|
13
|
+
export { CReportChart, CReportMetric, CReportTable, CReportText, } from './reporter';
|
|
14
|
+
export { CSensitivityLevelPicker, } from './privacy';
|
|
15
|
+
export { CResourceList, } from './resourceList';
|
|
16
|
+
export { CChart, } from './chart';
|
|
17
|
+
export { CProgress, } from './progress';
|
|
18
|
+
export { CToolbar, } from './toolbar';
|
|
19
|
+
export { CHint, } from './hint';
|
|
20
|
+
export { CMap, } from './map';
|
|
21
|
+
export { CFormTableWrapper, } from './wrapper';
|
|
22
|
+
export { CWebcam, } from './webcam';
|
|
23
|
+
export { CNotificationButton, CNotificationSidebar, } from './notifications';
|
|
24
|
+
export { default as C3 } from './c3';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function getDate(value: string | undefined): string | undefined;
|
|
2
|
+
export declare function getTime(value: string | undefined): string | undefined;
|
|
3
|
+
export declare function setDate(date: string | undefined, value: string | undefined, noDate?: boolean, noTime?: boolean): string | undefined;
|
|
4
|
+
export declare function setTime(time: string | undefined, value: string | undefined, noDate?: boolean, noTime?: boolean): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CButtonSubmit } from './CButtonSubmit.vue';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as CInputConfirm } from './CInputConfirm.vue';
|
|
2
|
+
export { default as CInputProcessing } from './CInputProcessing.vue';
|
|
3
|
+
export { default as CInputDateTime } from './CInputDateTime/index.vue';
|
|
4
|
+
export { default as CInputPresort } from './CInputPresort.vue';
|
|
5
|
+
export { default as CInputSearch } from './CInputSearch.vue';
|
|
6
|
+
export { default as CRichTextInput } from './CRichTextInput/index.vue';
|
|
7
|
+
export { default as CInputCheckbox } from './CInputCheckbox.vue';
|
|
8
|
+
export { default as CInputColorPicker } from './CInputColorPicker.vue';
|
|
9
|
+
export { default as CAceEditor } from './CAceEditor.vue';
|
|
10
|
+
export { default as CInputExpression } from './CInputExpression.vue';
|
|
11
|
+
export { CButtonSubmit, } from './button';
|
|
12
|
+
export { default as CInputSelect } from './CInputSelect.vue';
|
|
13
|
+
export { default as CInputRole } from './CInputRole.vue';
|
|
14
|
+
export { default as CInputUser } from './CInputUser.vue';
|
|
15
|
+
export { default as CInputUserGroup } from './CInputUserGroup.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CLightbox } from './CLightbox.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CLoaderLogo } from './CLoaderLogo.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CMap } from './CMap.vue';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import NotificationSimple from './NotificationSimple.vue';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
NotificationSimple: import("vue").VueConstructor<NotificationSimple<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => NotificationSimple>>;
|
|
4
|
+
NotificationRecord: import("vue").VueConstructor<NotificationSimple<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => NotificationSimple>>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const modalOpenEventName = "c-permissions-modal-open";
|
|
2
|
+
interface ResourceParts {
|
|
3
|
+
component: string;
|
|
4
|
+
resourceType?: string;
|
|
5
|
+
references: Array<string>;
|
|
6
|
+
i18nPrefix: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Splitting strings:
|
|
10
|
+
* - corteza::compose:moduleField/42/21/12
|
|
11
|
+
* - corteza::compose/42/21/12
|
|
12
|
+
*/
|
|
13
|
+
export declare function split(input: string): ResourceParts;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CSensitivityLevelPicker } from './CSensitivityLevelPicker.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CProgress } from './CProgress.vue';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { automation } from '@cortezaproject/corteza-js';
|
|
3
|
+
interface Handler {
|
|
4
|
+
(this: Component, input: automation.Vars): void | Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
interface PromptDefinition {
|
|
7
|
+
component?: Component;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
handler?: Handler;
|
|
12
|
+
/**
|
|
13
|
+
* Passive prompt, will not be listed
|
|
14
|
+
*
|
|
15
|
+
* Also, when displaying toasts, we'll display all
|
|
16
|
+
* passive toasts first and then, at the and one single
|
|
17
|
+
* non-passive toast
|
|
18
|
+
*/
|
|
19
|
+
passive?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const definitions: Record<string, PromptDefinition>;
|
|
22
|
+
export default definitions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CReminderSidebar } from './CReminderSidebar.vue';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as CReportChart } from './Viewers/CReportChart.vue';
|
|
2
|
+
export { default as CReportMetric } from './Viewers/CReportMetric.vue';
|
|
3
|
+
export { default as CReportTable } from './Viewers/CReportTable.vue';
|
|
4
|
+
export { default as CReportText } from './Viewers/CReportText.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CResourceList } from './CResourceList.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CToolbar } from './CToolbar.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CWebcam } from './CWebcam.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CFormTableWrapper } from './CFormTableWrapper.vue';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { compose, apiClients, corredor } from '@cortezaproject/corteza-js';
|
|
2
|
+
import ComposeUIHelper from './compose-ui';
|
|
3
|
+
interface Vue {
|
|
4
|
+
$SystemAPI: apiClients.System;
|
|
5
|
+
$ComposeAPI: apiClients.Compose;
|
|
6
|
+
$store: {
|
|
7
|
+
getters: {
|
|
8
|
+
[_: string]: Array<compose.Page>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
$emit: unknown;
|
|
12
|
+
$router: {
|
|
13
|
+
push: unknown;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Extends corredor exec context with compose UI helper
|
|
18
|
+
*/
|
|
19
|
+
export default class ComposeCtx extends corredor.Ctx {
|
|
20
|
+
protected emitter: unknown;
|
|
21
|
+
protected routePusher: unknown;
|
|
22
|
+
protected pages: Array<compose.Page>;
|
|
23
|
+
protected composeUI: ComposeUIHelper;
|
|
24
|
+
protected vue: Vue;
|
|
25
|
+
constructor(args: corredor.BaseArgs, vue: Vue);
|
|
26
|
+
/**
|
|
27
|
+
* Clones context and uses new arguments
|
|
28
|
+
*/
|
|
29
|
+
withArgs(args: corredor.BaseArgs): ComposeCtx;
|
|
30
|
+
get ComposeUI(): ComposeUIHelper;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { compose } from '@cortezaproject/corteza-js';
|
|
2
|
+
interface ComposeUIContext {
|
|
3
|
+
$namespace?: compose.Namespace;
|
|
4
|
+
$module?: compose.Module;
|
|
5
|
+
$record?: compose.Record;
|
|
6
|
+
pages: Array<compose.Page>;
|
|
7
|
+
emitter: (...a: any) => any;
|
|
8
|
+
routePusher: (...a: any) => any;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* ComposeUIHelper provides helpers for accessing Compose's UI
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export default class ComposeUIHelper {
|
|
15
|
+
readonly $namespace?: compose.Namespace;
|
|
16
|
+
readonly $module?: compose.Module;
|
|
17
|
+
readonly $record?: compose.Record;
|
|
18
|
+
readonly pages?: Array<compose.Page>;
|
|
19
|
+
readonly emitter: (...a: any) => any;
|
|
20
|
+
readonly routePusher: (...a: any) => any;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {Namespace} ctx.$namespace - Current namespace
|
|
24
|
+
* @param {Module} ctx.$module - Current module
|
|
25
|
+
* @param {Record} ctx.$record - Current record
|
|
26
|
+
* @param {Page[]} ctx.pages - Array of Page objects
|
|
27
|
+
* @param {Function} ctx.emitter - Event emitter (vm.$emit)
|
|
28
|
+
* @param {Function} ctx.routePusher - Route pusher (vm.$route.push)
|
|
29
|
+
*/
|
|
30
|
+
constructor(ctx: ComposeUIContext);
|
|
31
|
+
/**
|
|
32
|
+
* Open record viewer page
|
|
33
|
+
*
|
|
34
|
+
* It searches for page that matches record's module and redirects
|
|
35
|
+
* user to the view mode on that page
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* // Edit current record
|
|
39
|
+
* ComposeUI.gotoRecordViewer($record)
|
|
40
|
+
*
|
|
41
|
+
* // Edit current record ($record can be omitted)
|
|
42
|
+
* ComposeUI.gotoRecordViewer()
|
|
43
|
+
*
|
|
44
|
+
* @param {Record} record
|
|
45
|
+
*/
|
|
46
|
+
gotoRecordViewer(record?: compose.Record | undefined): void;
|
|
47
|
+
/**
|
|
48
|
+
* Open record editor page
|
|
49
|
+
*
|
|
50
|
+
* It searches for page that matches record's module and redirects
|
|
51
|
+
* user to the edit mode on that page.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Edit current record
|
|
55
|
+
* ComposeUI.gotoRecordEditor($record)
|
|
56
|
+
*
|
|
57
|
+
* // Edit current record ($record can be omitted)
|
|
58
|
+
* ComposeUI.gotoRecordEditor()
|
|
59
|
+
*
|
|
60
|
+
* @param {Record} record
|
|
61
|
+
*/
|
|
62
|
+
gotoRecordEditor(record?: compose.Record | undefined): void;
|
|
63
|
+
/**
|
|
64
|
+
* Open record page
|
|
65
|
+
*
|
|
66
|
+
* @private
|
|
67
|
+
* @param {string} name
|
|
68
|
+
* @param {Record} record
|
|
69
|
+
* @param {string} record.recordID
|
|
70
|
+
* @param {string} record.moduleID
|
|
71
|
+
*/
|
|
72
|
+
gotoRecordPage(name: string, record?: compose.Record | undefined): void;
|
|
73
|
+
/**
|
|
74
|
+
* Returns record page
|
|
75
|
+
*
|
|
76
|
+
*/
|
|
77
|
+
private getRecordPage;
|
|
78
|
+
/**
|
|
79
|
+
* Go to a specific route
|
|
80
|
+
*
|
|
81
|
+
* @private
|
|
82
|
+
* @param {string} name
|
|
83
|
+
* @param {Object} params for $router.push
|
|
84
|
+
*/
|
|
85
|
+
goto(name: string, params: object): void;
|
|
86
|
+
/**
|
|
87
|
+
* Show a success alert
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ComposeUI.success('Change was successful')
|
|
91
|
+
*
|
|
92
|
+
* @param message
|
|
93
|
+
*/
|
|
94
|
+
success(message: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* Show a warning alert
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ComposeUI.warning('Could not save your changes')
|
|
100
|
+
*
|
|
101
|
+
* @param message
|
|
102
|
+
*/
|
|
103
|
+
warning(message: string): void;
|
|
104
|
+
}
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { corredor } from '@cortezaproject/corteza-js';
|
|
2
|
+
/**
|
|
3
|
+
* Bare-minimum webapp helper
|
|
4
|
+
*/
|
|
5
|
+
export default class WebappCtx extends corredor.Ctx {
|
|
6
|
+
constructor(args: corredor.BaseArgs);
|
|
7
|
+
/**
|
|
8
|
+
* Clones context and uses new arguments
|
|
9
|
+
*/
|
|
10
|
+
withArgs(args: corredor.BaseArgs): WebappCtx;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkValidURL(url: string): string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { VueConstructor } from 'vue';
|
|
2
|
+
import VueI18Next from '@panter/vue-i18next';
|
|
3
|
+
interface Options {
|
|
4
|
+
app: string;
|
|
5
|
+
resources: object;
|
|
6
|
+
lng: string;
|
|
7
|
+
fallbackLng: string | false;
|
|
8
|
+
/**
|
|
9
|
+
* Namespace(s) to preload
|
|
10
|
+
*/
|
|
11
|
+
ns: string | Array<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Where too look for keys that are not found in the default namespace,
|
|
14
|
+
*/
|
|
15
|
+
fallbackNS: string | false;
|
|
16
|
+
/**
|
|
17
|
+
* What namespace to use when not explicitly defined
|
|
18
|
+
* When empty, default is set to the value of (the first item in) ns
|
|
19
|
+
*/
|
|
20
|
+
defaultNS: string;
|
|
21
|
+
baseURL: string;
|
|
22
|
+
pseudo: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Initializes i18n options, registers plugin on a given Vue instance and returns the options
|
|
26
|
+
*
|
|
27
|
+
* To be used as:
|
|
28
|
+
* import { i18n } from '@cortezaproject/corteza-vue'
|
|
29
|
+
* new Vue({
|
|
30
|
+
* i18n: i18n(Vue, {
|
|
31
|
+
* app: 'corteza-webapp-....'
|
|
32
|
+
* namespaces: [ .... ]
|
|
33
|
+
* }),
|
|
34
|
+
* })
|
|
35
|
+
*
|
|
36
|
+
* The most convenient way to use it:
|
|
37
|
+
* i18n(Vue, 'app name', 'namespace...', 'additional namespace...')
|
|
38
|
+
*/
|
|
39
|
+
declare const _default: (Vue: VueConstructor, app: string | Partial<Options>, ...namespaces: Array<string>) => VueI18Next;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as plugins from './plugins';
|
|
2
|
+
import * as mixins from './mixins';
|
|
3
|
+
import * as components from './components';
|
|
4
|
+
import * as corredor from './corredor';
|
|
5
|
+
import * as filters from './filters';
|
|
6
|
+
import * as store from './store';
|
|
7
|
+
import * as url from './libs/url';
|
|
8
|
+
import * as filter from './libs/filter';
|
|
9
|
+
import * as handle from './libs/handle';
|
|
10
|
+
import * as websocket from './libs/websocket';
|
|
11
|
+
import i18n from './i18n';
|
|
12
|
+
export { plugins, mixins, components, corredor, filters, store, url, filter, handle, websocket, i18n, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function AssertStrict(obj: any, query: string, field?: string, ...fields: Array<string>): boolean;
|
|
2
|
+
export declare function AssertFuzzy(obj: any, query: string, field?: string, ...fields: Array<string>): boolean;
|
|
3
|
+
export declare function Assert(obj: any, query: string, field?: string, ...fields: Array<string>): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Little URL helper
|
|
3
|
+
*
|
|
4
|
+
* We need it to handle relative URLs, especially ones w/o schema
|
|
5
|
+
*/
|
|
6
|
+
export declare function Make({ url, query, hash, ref, config }: {
|
|
7
|
+
url?: string | undefined;
|
|
8
|
+
query?: {} | undefined;
|
|
9
|
+
hash?: string | undefined;
|
|
10
|
+
ref?: string | undefined;
|
|
11
|
+
config?: {} | undefined;
|
|
12
|
+
}): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default websocket configuration
|
|
3
|
+
*/
|
|
4
|
+
import { Vue } from 'vue/types/vue';
|
|
5
|
+
export declare const config: {
|
|
6
|
+
format: string;
|
|
7
|
+
reconnection: boolean;
|
|
8
|
+
reconnectionAttempts: number;
|
|
9
|
+
reconnectionDelay: number;
|
|
10
|
+
connectManually: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Extract websocket endpoint from window props (set via config.js)
|
|
14
|
+
*/
|
|
15
|
+
export declare function endpoint(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Binds auth and websocket events so that we can pass current access token
|
|
18
|
+
* - when ws connection opens
|
|
19
|
+
* - when auth token in fetched/renewed
|
|
20
|
+
*
|
|
21
|
+
* @todo get rid of ts-ignore lines
|
|
22
|
+
*/
|
|
23
|
+
export declare function init(vue: Vue): void;
|