@cortezaproject/corteza-vue 2021.9.0-dev.1 → 2021.9.0-dev.5
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/c3/Controls/index.d.ts +22 -0
- package/dist/components/c3/helpers.d.ts +29 -0
- package/dist/components/c3/index.d.ts +7 -0
- package/dist/components/index.d.ts +5 -3
- package/dist/components/input/CRichTextInput/RToolbar/TMark/loader.d.ts +10 -0
- package/dist/components/input/CRichTextInput/RToolbar/TNode/loader.d.ts +6 -0
- package/dist/components/input/CRichTextInput/RToolbar/TNodeAttr/loader.d.ts +6 -0
- package/dist/components/input/CRichTextInput/RToolbar/loader.d.ts +9 -0
- package/dist/components/input/CRichTextInput/extensions/heading.d.ts +12 -0
- package/dist/components/input/CRichTextInput/extensions/htmlPaster.d.ts +4 -0
- package/dist/components/input/CRichTextInput/extensions/index.d.ts +6 -0
- package/dist/components/input/CRichTextInput/extensions/link.d.ts +6 -0
- package/dist/components/input/CRichTextInput/extensions/paragraph.d.ts +9 -0
- package/dist/components/input/CRichTextInput/extensions/textBackground.d.ts +23 -0
- package/dist/components/input/CRichTextInput/extensions/textColor.d.ts +23 -0
- package/dist/components/input/CRichTextInput/extensions/utils.d.ts +15 -0
- package/dist/components/input/CRichTextInput/lib/formats.d.ts +85 -0
- package/dist/components/input/CRichTextInput/lib/index.d.ts +1 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/loader/index.d.ts +1 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/permissions/def.d.ts +13 -0
- package/dist/components/reminders/index.d.ts +1 -0
- package/dist/components/sidebar/index.d.ts +0 -1
- package/dist/filters/date.d.ts +2 -10
- package/dist/i18n.d.ts +40 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +29110 -19259
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +29113 -19261
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/settings.d.ts +1 -0
- package/package.json +15 -4
|
@@ -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 Catalogue {
|
|
2
|
+
[_: string]: CatalogueItem;
|
|
3
|
+
}
|
|
4
|
+
export interface CatalogueItem {
|
|
5
|
+
group?: Array<string>;
|
|
6
|
+
name?: string;
|
|
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>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export { CCorredorManualButtons, } from './corredor';
|
|
2
2
|
export { CPreviewInline, CPreviewLightbox, canPreview, } from './filePreview';
|
|
3
|
-
export { CInputConfirm, CInputDateTime, CInputInterval, } from './input';
|
|
3
|
+
export { CInputConfirm, CInputDateTime, CInputInterval, CRichTextInput, } from './input';
|
|
4
4
|
export { CLightbox, } from './lightbox';
|
|
5
5
|
export { CPermissionsButton, CPermissionsForm, CPermissionsModal, } from './permissions';
|
|
6
6
|
export * from './prompts';
|
|
7
|
-
export {
|
|
7
|
+
export { CLoaderLogo, } from './loader';
|
|
8
|
+
export { CTopbar, CSidebar, CSidebarNavItems, } from './navigation';
|
|
8
9
|
export { CToaster, CToasterLink, } from './toaster';
|
|
9
|
-
export {
|
|
10
|
+
export { CReminderSidebar, } from './reminders';
|
|
11
|
+
export { default as C3 } from './c3';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference path="../../../../../src/vue.shims.d.ts" />
|
|
2
|
+
declare namespace _default {
|
|
3
|
+
export { Color };
|
|
4
|
+
export { Item };
|
|
5
|
+
export { Link };
|
|
6
|
+
}
|
|
7
|
+
export default _default;
|
|
8
|
+
import Color from "*.vue";
|
|
9
|
+
import Item from "*.vue";
|
|
10
|
+
import Link from "*.vue";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extends original heading node to allow content alignment
|
|
3
|
+
*/
|
|
4
|
+
export default class Heading {
|
|
5
|
+
get defaultOptions(): any;
|
|
6
|
+
get baseP(): any;
|
|
7
|
+
get schema(): any;
|
|
8
|
+
commands({ type, schema }: {
|
|
9
|
+
type: any;
|
|
10
|
+
schema: any;
|
|
11
|
+
}): (attrs: any) => any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Paragraph } from "./paragraph";
|
|
2
|
+
export { default as Heading } from "./heading";
|
|
3
|
+
export { default as TextColor } from "./textColor";
|
|
4
|
+
export { default as TextBackground } from "./textBackground";
|
|
5
|
+
export { default as Link } from "./link";
|
|
6
|
+
export { default as HtmlPaster } from "./htmlPaster";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents text's background color
|
|
3
|
+
*/
|
|
4
|
+
export default class Background {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get schema(): {
|
|
7
|
+
attrs: {
|
|
8
|
+
color: {};
|
|
9
|
+
};
|
|
10
|
+
parseDOM: {
|
|
11
|
+
style: string;
|
|
12
|
+
getAttrs: (color: any) => {
|
|
13
|
+
color: any;
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
toDOM: (node: any) => (string | number | {
|
|
17
|
+
style: string;
|
|
18
|
+
})[];
|
|
19
|
+
};
|
|
20
|
+
commands({ type }: {
|
|
21
|
+
type: any;
|
|
22
|
+
}): (attr: any) => any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents text's color
|
|
3
|
+
*/
|
|
4
|
+
export default class Color {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get schema(): {
|
|
7
|
+
attrs: {
|
|
8
|
+
color: {};
|
|
9
|
+
};
|
|
10
|
+
parseDOM: {
|
|
11
|
+
style: string;
|
|
12
|
+
getAttrs: (color: any) => {
|
|
13
|
+
color: any;
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
toDOM: (node: any) => (string | number | {
|
|
17
|
+
style: string;
|
|
18
|
+
})[];
|
|
19
|
+
};
|
|
20
|
+
commands({ type }: {
|
|
21
|
+
type: any;
|
|
22
|
+
}): (attr: any) => any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function toAttrs(node: any): {
|
|
2
|
+
style: string;
|
|
3
|
+
} | {
|
|
4
|
+
style?: undefined;
|
|
5
|
+
};
|
|
6
|
+
export function alignmentParser(node: any): {
|
|
7
|
+
alignment: any;
|
|
8
|
+
};
|
|
9
|
+
export const qAlignments: {
|
|
10
|
+
'ql-align-right': string;
|
|
11
|
+
'ql-align-left': string;
|
|
12
|
+
'ql-align-center': string;
|
|
13
|
+
'ql-align-justify': string;
|
|
14
|
+
};
|
|
15
|
+
export function makeDOMParser(pd: any): any;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export function getFormats(): any[];
|
|
2
|
+
export function getToolbar(): ({
|
|
3
|
+
type: string;
|
|
4
|
+
mark: boolean;
|
|
5
|
+
icon: string;
|
|
6
|
+
component?: undefined;
|
|
7
|
+
node?: undefined;
|
|
8
|
+
label?: undefined;
|
|
9
|
+
attrs?: undefined;
|
|
10
|
+
nodeAttr?: undefined;
|
|
11
|
+
variants?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
type: string;
|
|
14
|
+
mark: boolean;
|
|
15
|
+
component: string;
|
|
16
|
+
icon?: undefined;
|
|
17
|
+
node?: undefined;
|
|
18
|
+
label?: undefined;
|
|
19
|
+
attrs?: undefined;
|
|
20
|
+
nodeAttr?: undefined;
|
|
21
|
+
variants?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
type: string;
|
|
24
|
+
node: boolean;
|
|
25
|
+
icon: string;
|
|
26
|
+
mark?: undefined;
|
|
27
|
+
component?: undefined;
|
|
28
|
+
label?: undefined;
|
|
29
|
+
attrs?: undefined;
|
|
30
|
+
nodeAttr?: undefined;
|
|
31
|
+
variants?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
type: string;
|
|
34
|
+
node: boolean;
|
|
35
|
+
label: string;
|
|
36
|
+
attrs: {
|
|
37
|
+
level: number;
|
|
38
|
+
href?: undefined;
|
|
39
|
+
};
|
|
40
|
+
mark?: undefined;
|
|
41
|
+
icon?: undefined;
|
|
42
|
+
component?: undefined;
|
|
43
|
+
nodeAttr?: undefined;
|
|
44
|
+
variants?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
type: string;
|
|
47
|
+
icon: string;
|
|
48
|
+
nodeAttr: boolean;
|
|
49
|
+
component: string;
|
|
50
|
+
variants: {
|
|
51
|
+
variant: string;
|
|
52
|
+
icon: string;
|
|
53
|
+
attrs: {
|
|
54
|
+
alignment: string;
|
|
55
|
+
};
|
|
56
|
+
}[];
|
|
57
|
+
mark?: undefined;
|
|
58
|
+
node?: undefined;
|
|
59
|
+
label?: undefined;
|
|
60
|
+
attrs?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
type: string;
|
|
63
|
+
mark: boolean;
|
|
64
|
+
component: string;
|
|
65
|
+
icon: string;
|
|
66
|
+
attrs: {
|
|
67
|
+
href: null;
|
|
68
|
+
level?: undefined;
|
|
69
|
+
};
|
|
70
|
+
node?: undefined;
|
|
71
|
+
label?: undefined;
|
|
72
|
+
nodeAttr?: undefined;
|
|
73
|
+
variants?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
type: string;
|
|
76
|
+
node: boolean;
|
|
77
|
+
label: string;
|
|
78
|
+
mark?: undefined;
|
|
79
|
+
icon?: undefined;
|
|
80
|
+
component?: undefined;
|
|
81
|
+
attrs?: undefined;
|
|
82
|
+
nodeAttr?: undefined;
|
|
83
|
+
variants?: undefined;
|
|
84
|
+
})[];
|
|
85
|
+
export const nodeTypes: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./formats";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CLoaderLogo } from './CLoaderLogo.vue';
|
|
@@ -1 +1,14 @@
|
|
|
1
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 CReminderSidebar } from './CReminderSidebar.vue';
|
package/dist/filters/date.d.ts
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function isoDateOnly(d: Moment | Date | string | number): string;
|
|
4
|
-
export declare function locDate(d: Moment | Date | string | number): string;
|
|
5
|
-
export declare function locLongDate(d: Moment | Date | string | number): string;
|
|
6
|
-
export declare function locDateOnly(d: Moment | Date | string | number): string;
|
|
7
|
-
export declare function locLongDateOnly(d: Moment | Date | string | number): string;
|
|
8
|
-
export declare function locTimeOnly(d: Moment | Date | string | number): string;
|
|
9
|
-
export declare function locLongTimeOnly(d: Moment | Date | string | number): string;
|
|
10
|
-
export declare function relTime(d: Moment | Date | string | number, s?: boolean): string;
|
|
1
|
+
export declare function locFullDateTime(d: unknown): string;
|
|
2
|
+
export declare function locDate(d: unknown): string;
|
package/dist/i18n.d.ts
ADDED
|
@@ -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
|
+
declare const _default: (Vue: VueConstructor<import("vue").default>, app: string | Partial<Options>, ...namespaces: string[]) => VueI18Next;
|
|
25
|
+
/**
|
|
26
|
+
* Initializes i18n options, registers plugin on a given Vue instance and returns the options
|
|
27
|
+
*
|
|
28
|
+
* To be used as:
|
|
29
|
+
* import { i18n } from '@cortezaproject/corteza-vue'
|
|
30
|
+
* new Vue({
|
|
31
|
+
* i18n: i18n(Vue, {
|
|
32
|
+
* app: 'corteza-webapp-....'
|
|
33
|
+
* namespaces: [ .... ]
|
|
34
|
+
* }),
|
|
35
|
+
* })
|
|
36
|
+
*
|
|
37
|
+
* The most convenient way to use it:
|
|
38
|
+
* i18n(Vue, 'app name', 'namespace...', 'additional namespace...')
|
|
39
|
+
*/
|
|
40
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ import * as filters from './filters';
|
|
|
6
6
|
import * as store from './store';
|
|
7
7
|
import * as url from './libs/url';
|
|
8
8
|
import * as websocket from './libs/websocket';
|
|
9
|
-
|
|
9
|
+
import i18n from './i18n';
|
|
10
|
+
export { plugins, mixins, components, corredor, filters, store, url, websocket, i18n, };
|