memorial-ui-component-library 1.0.4-dev.2396 → 1.1.0

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.
@@ -1,33 +1,33 @@
1
- import { MemorialUIPluginComponent } from './component';
2
-
3
- export type SdDividerOrientation = 'horizontal' | 'vertical';
4
- export type SdDividerMargin = {
5
- top?: number;
6
- right?: number;
7
- bottom?: number;
8
- left?: number;
9
- };
10
-
11
- /** Divider component */
12
- export declare class SdDivider extends MemorialUIPluginComponent {
13
- /**
14
- * The line thickness in pixels.
15
- * @default 2
16
- */
17
- thickness: number;
18
-
19
- /**
20
- * The orientation of the divider line.
21
- * @default 'horizontal'
22
- */
23
- orientation: SdDividerOrientation;
24
-
25
- /**
26
- * Overrides the margin around the divider. The number provided is the space in pixels.
27
- * @default 'horizontal'
28
- */
29
- margin: number | SdDividerMargin;
30
- }
31
-
32
- declare const plugin: SdDivider;
33
- export default plugin;
1
+ import { MemorialUIPluginComponent } from './component';
2
+
3
+ export type SdDividerOrientation = 'horizontal' | 'vertical';
4
+ export type SdDividerMargin = {
5
+ top?: number;
6
+ right?: number;
7
+ bottom?: number;
8
+ left?: number;
9
+ };
10
+
11
+ /** Divider component */
12
+ export declare class SdDivider extends MemorialUIPluginComponent {
13
+ /**
14
+ * The line thickness in pixels.
15
+ * @default 2
16
+ */
17
+ thickness: number;
18
+
19
+ /**
20
+ * The orientation of the divider line.
21
+ * @default 'horizontal'
22
+ */
23
+ orientation: SdDividerOrientation;
24
+
25
+ /**
26
+ * Overrides the margin around the divider. The number provided is the space in pixels.
27
+ * @default 'horizontal'
28
+ */
29
+ margin: number | SdDividerMargin;
30
+ }
31
+
32
+ declare const plugin: SdDivider;
33
+ export default plugin;
@@ -1,2 +1,2 @@
1
- declare module 'element-ui/lib/locale/lang/en' {
1
+ declare module 'element-ui/lib/locale/lang/en' {
2
2
  }
package/types/form.d.ts CHANGED
@@ -1,122 +1,122 @@
1
- import { MemorialUIComponent, MemorialUIPluginComponent } from './component';
2
- import {
3
- ValidationResult,
4
- SchemaDescriptor,
5
- RuleProperty
6
- } from './async-validator';
7
-
8
- export type SdValidationTriggerType = 'blur' | 'change' | 'input';
9
- export type SdValidationTrigger =
10
- | SdValidationTriggerType
11
- | SdValidationTriggerType[];
12
-
13
- export type SdFormValidationState = 'success' | 'error' | 'validating' | '';
14
-
15
- export declare class SdValidationResult {
16
- valid: boolean;
17
- result?: ValidationResult;
18
- }
19
-
20
- /** Form Item component */
21
- export declare abstract class SdFormWidget extends MemorialUIComponent {
22
- /** The parent form if nested within one. */
23
- form: SdForm | null;
24
-
25
- /** The the containing form item if nested within one. */
26
- formItem: SdFormItem | null;
27
-
28
- /** The widgets name. */
29
- name: string;
30
-
31
- /** Computed name attribute, takes into account the FormItem's label if it exists. */
32
- nameAttr: string;
33
-
34
- /** The widgets current validation state within the context of its form. */
35
- validationState: SdFormValidationState;
36
-
37
- /**
38
- * Broadcasts an event to the parent form.
39
- * @param {String} type the type of event associated to the triggering action.
40
- * @param {Any} value the value to emit to the form.
41
- * @param {Event} event the Event to propagate
42
- */
43
- protected broadcastFormEvent(
44
- type: SdValidationTrigger,
45
- value: any,
46
- event: Event | undefined
47
- ): void;
48
- }
49
-
50
- /** Form component */
51
- export declare class SdForm extends MemorialUIPluginComponent {
52
- /** Object model to bind the form to. */
53
- model?: { [field: string]: any };
54
-
55
- /** The form validation rules to apply to the specified model properties. */
56
- rules?: SchemaDescriptor;
57
-
58
- /** Collection of form items active within the form. */
59
- fields: SdFormItem[];
60
-
61
- /**
62
- * The event types which should trigger validation.
63
- * @default ['blur', 'change']
64
- * */
65
- triggers: SdValidationTrigger;
66
-
67
- /** Whether the form is currently being reset. */
68
- resetting: boolean;
69
-
70
- /** Reset the form model to its original value and clear all validation errors/messages. */
71
- reset(): void;
72
-
73
- /** Clear all form validation errors and messages. */
74
- clearErrors(...props: string[]): void;
75
-
76
- /**
77
- * Validates all properties on the form model.
78
- */
79
- validateAsync(): Promise<SdValidationResult>;
80
-
81
- /**
82
- * Validates a single property on the form model.
83
- * @property {String} prop the property name of the field to validate.
84
- */
85
- validateItemAsync(prop: string): Promise<SdValidationResult>;
86
- }
87
-
88
- /** Form Item component */
89
- export declare class SdFormItem extends MemorialUIComponent {
90
- /** The form items display label. */
91
- label: string;
92
-
93
- /** The of the associated property name on the forms model in which the form item is bound to. Only needs to be set if the form item needs to be included in validation. */
94
- prop?: string;
95
-
96
- /** Whether this item is a required validation field. */
97
- required?: boolean;
98
-
99
- /** Extended validation properties to include for the form item. */
100
- rules?: RuleProperty | RuleProperty[];
101
-
102
- /** The widgets current validation state within the context of its form. */
103
- validationState: SdFormValidationState;
104
-
105
- /** The validation error message if the form item is in an **error** state.*/
106
- validationMessage: string;
107
-
108
- /** The initial value of the form items property within the form model.*/
109
- initialValue?: any;
110
-
111
- /** All instances of SdFormWidget components within the form item. */
112
- widgets: SdFormWidget[];
113
-
114
- /** The parent form. */
115
- form: SdForm;
116
-
117
- /** The value of the form items field within the model bound to the form. */
118
- fieldValue: any;
119
- }
120
-
121
- declare const plugin: SdForm;
122
- export default plugin;
1
+ import { MemorialUIComponent, MemorialUIPluginComponent } from './component';
2
+ import {
3
+ ValidationResult,
4
+ SchemaDescriptor,
5
+ RuleProperty
6
+ } from './async-validator';
7
+
8
+ export type SdValidationTriggerType = 'blur' | 'change' | 'input';
9
+ export type SdValidationTrigger =
10
+ | SdValidationTriggerType
11
+ | SdValidationTriggerType[];
12
+
13
+ export type SdFormValidationState = 'success' | 'error' | 'validating' | '';
14
+
15
+ export declare class SdValidationResult {
16
+ valid: boolean;
17
+ result?: ValidationResult;
18
+ }
19
+
20
+ /** Form Item component */
21
+ export declare abstract class SdFormWidget extends MemorialUIComponent {
22
+ /** The parent form if nested within one. */
23
+ form: SdForm | null;
24
+
25
+ /** The the containing form item if nested within one. */
26
+ formItem: SdFormItem | null;
27
+
28
+ /** The widgets name. */
29
+ name: string;
30
+
31
+ /** Computed name attribute, takes into account the FormItem's label if it exists. */
32
+ nameAttr: string;
33
+
34
+ /** The widgets current validation state within the context of its form. */
35
+ validationState: SdFormValidationState;
36
+
37
+ /**
38
+ * Broadcasts an event to the parent form.
39
+ * @param {String} type the type of event associated to the triggering action.
40
+ * @param {Any} value the value to emit to the form.
41
+ * @param {Event} event the Event to propagate
42
+ */
43
+ protected broadcastFormEvent(
44
+ type: SdValidationTrigger,
45
+ value: any,
46
+ event: Event | undefined
47
+ ): void;
48
+ }
49
+
50
+ /** Form component */
51
+ export declare class SdForm extends MemorialUIPluginComponent {
52
+ /** Object model to bind the form to. */
53
+ model?: { [field: string]: any };
54
+
55
+ /** The form validation rules to apply to the specified model properties. */
56
+ rules?: SchemaDescriptor;
57
+
58
+ /** Collection of form items active within the form. */
59
+ fields: SdFormItem[];
60
+
61
+ /**
62
+ * The event types which should trigger validation.
63
+ * @default ['blur', 'change']
64
+ * */
65
+ triggers: SdValidationTrigger;
66
+
67
+ /** Whether the form is currently being reset. */
68
+ resetting: boolean;
69
+
70
+ /** Reset the form model to its original value and clear all validation errors/messages. */
71
+ reset(): void;
72
+
73
+ /** Clear all form validation errors and messages. */
74
+ clearErrors(...props: string[]): void;
75
+
76
+ /**
77
+ * Validates all properties on the form model.
78
+ */
79
+ validateAsync(): Promise<SdValidationResult>;
80
+
81
+ /**
82
+ * Validates a single property on the form model.
83
+ * @property {String} prop the property name of the field to validate.
84
+ */
85
+ validateItemAsync(prop: string): Promise<SdValidationResult>;
86
+ }
87
+
88
+ /** Form Item component */
89
+ export declare class SdFormItem extends MemorialUIComponent {
90
+ /** The form items display label. */
91
+ label: string;
92
+
93
+ /** The of the associated property name on the forms model in which the form item is bound to. Only needs to be set if the form item needs to be included in validation. */
94
+ prop?: string;
95
+
96
+ /** Whether this item is a required validation field. */
97
+ required?: boolean;
98
+
99
+ /** Extended validation properties to include for the form item. */
100
+ rules?: RuleProperty | RuleProperty[];
101
+
102
+ /** The widgets current validation state within the context of its form. */
103
+ validationState: SdFormValidationState;
104
+
105
+ /** The validation error message if the form item is in an **error** state.*/
106
+ validationMessage: string;
107
+
108
+ /** The initial value of the form items property within the form model.*/
109
+ initialValue?: any;
110
+
111
+ /** All instances of SdFormWidget components within the form item. */
112
+ widgets: SdFormWidget[];
113
+
114
+ /** The parent form. */
115
+ form: SdForm;
116
+
117
+ /** The value of the form items field within the model bound to the form. */
118
+ fieldValue: any;
119
+ }
120
+
121
+ declare const plugin: SdForm;
122
+ export default plugin;
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './memorial-ui-component-library';
2
-
3
- import * as MemorialUI from './memorial-ui-component-library';
4
- export default MemorialUI;
1
+ export * from './memorial-ui-component-library';
2
+
3
+ import * as MemorialUI from './memorial-ui-component-library';
4
+ export default MemorialUI;
package/types/input.d.ts CHANGED
@@ -1,53 +1,53 @@
1
- import { MemorialUIFormPluginComponent } from './component';
2
-
3
- export type SdInputType =
4
- | 'date'
5
- | 'datetime-local'
6
- | 'email'
7
- | 'month'
8
- | 'number'
9
- | 'password'
10
- | 'range'
11
- | 'search'
12
- | 'tel'
13
- | 'phone'
14
- | 'text'
15
- | 'time'
16
- | 'url'
17
- | 'week'
18
- | 'textarea'
19
- | 'image'
20
- | 'file'
21
- | 'color'
22
- | 'hidden';
23
-
24
- /** Input component */
25
- export declare class SdInput extends MemorialUIFormPluginComponent {
26
- /** The inputs value. */
27
- value?: any;
28
-
29
- /**
30
- * The type of the input.
31
- * @default 'text'
32
- */
33
- type: SdInputType;
34
-
35
- /**
36
- * Whether to display a clear button that will reset the components value.
37
- * @default false
38
- */
39
- clearable: boolean;
40
-
41
- /**
42
- * Disables spinkit controls like numeric arrows in the number type and dropdown calendar in date type.
43
- * Compatible with Chrome/Firefox.
44
- * @default false
45
- */
46
- disableSpinkit: boolean;
47
-
48
- /** Resets the components value. */
49
- clear(): void;
50
- }
51
-
52
- declare const plugin: SdInput;
53
- export default plugin;
1
+ import { MemorialUIFormPluginComponent } from './component';
2
+
3
+ export type SdInputType =
4
+ | 'date'
5
+ | 'datetime-local'
6
+ | 'email'
7
+ | 'month'
8
+ | 'number'
9
+ | 'password'
10
+ | 'range'
11
+ | 'search'
12
+ | 'tel'
13
+ | 'phone'
14
+ | 'text'
15
+ | 'time'
16
+ | 'url'
17
+ | 'week'
18
+ | 'textarea'
19
+ | 'image'
20
+ | 'file'
21
+ | 'color'
22
+ | 'hidden';
23
+
24
+ /** Input component */
25
+ export declare class SdInput extends MemorialUIFormPluginComponent {
26
+ /** The inputs value. */
27
+ value?: any;
28
+
29
+ /**
30
+ * The type of the input.
31
+ * @default 'text'
32
+ */
33
+ type: SdInputType;
34
+
35
+ /**
36
+ * Whether to display a clear button that will reset the components value.
37
+ * @default false
38
+ */
39
+ clearable: boolean;
40
+
41
+ /**
42
+ * Disables spinkit controls like numeric arrows in the number type and dropdown calendar in date type.
43
+ * Compatible with Chrome/Firefox.
44
+ * @default false
45
+ */
46
+ disableSpinkit: boolean;
47
+
48
+ /** Resets the components value. */
49
+ clear(): void;
50
+ }
51
+
52
+ declare const plugin: SdInput;
53
+ export default plugin;
package/types/loader.d.ts CHANGED
@@ -1,28 +1,28 @@
1
- import { MemorialUIPluginComponent } from './component';
2
-
3
- export type SdLoaderType = 'elipse' | 'circle';
4
-
5
- /** Loader component */
6
- export declare class SdLoader extends MemorialUIPluginComponent {
7
- /**
8
- * The type of loader.
9
- * **NOTE:** Currently only supports 'elipse'
10
- * @default 'elipse'
11
- */
12
- type: SdLoaderType;
13
-
14
- /**
15
- * The loader's color.
16
- * @default '#ee3224'
17
- */
18
- color: string;
19
-
20
- /**
21
- * The loader's size.
22
- * @default '16px'
23
- */
24
- size: string;
25
- }
26
-
27
- declare const plugin: SdLoader;
28
- export default plugin;
1
+ import { MemorialUIPluginComponent } from './component';
2
+
3
+ export type SdLoaderType = 'elipse' | 'circle';
4
+
5
+ /** Loader component */
6
+ export declare class SdLoader extends MemorialUIPluginComponent {
7
+ /**
8
+ * The type of loader.
9
+ * **NOTE:** Currently only supports 'elipse'
10
+ * @default 'elipse'
11
+ */
12
+ type: SdLoaderType;
13
+
14
+ /**
15
+ * The loader's color.
16
+ * @default '#ee3224'
17
+ */
18
+ color: string;
19
+
20
+ /**
21
+ * The loader's size.
22
+ * @default '16px'
23
+ */
24
+ size: string;
25
+ }
26
+
27
+ declare const plugin: SdLoader;
28
+ export default plugin;
@@ -1,41 +1,41 @@
1
- import Vue, { DirectiveOptions } from 'vue';
2
- import { MemorialLib, MemorialLibComponentOptions } from './options';
3
-
4
- declare global {
5
- interface Window {
6
- $memorial: MemorialLib;
7
- }
8
- }
9
-
10
- export declare const $memorial: MemorialLib;
11
-
12
- export declare const Directives: {
13
- /**
14
- * Executes a callback whenever the user clicks outside of the element the directive is attached to.
15
- */
16
- ClickOutside: DirectiveOptions;
17
- };
18
- /**
19
- * Install all memorial-ui-component-library components into Vue.
20
- * Please do not invoke this method directly.
21
- * Call `Vue.use(MemorialUI)` to install.
22
- */
23
- export function install(
24
- vue: typeof Vue,
25
- options?: MemorialLibComponentOptions
26
- ): void;
27
-
28
- export * from './autocomplete';
29
- export * from './button';
30
- export * from './card';
31
- export * from './checkbox';
32
- export * from './component';
33
- export * from './dialog';
34
- export * from './divider';
35
- export * from './form';
36
- export * from './input';
37
- export * from './loader';
38
- export * from './popout-menu';
39
- export * from './radio';
40
- export * from './rater';
41
- export * from './select';
1
+ import Vue, { DirectiveOptions } from 'vue';
2
+ import { MemorialLib, MemorialLibComponentOptions } from './options';
3
+
4
+ declare global {
5
+ interface Window {
6
+ $memorial: MemorialLib;
7
+ }
8
+ }
9
+
10
+ export declare const $memorial: MemorialLib;
11
+
12
+ export declare const Directives: {
13
+ /**
14
+ * Executes a callback whenever the user clicks outside of the element the directive is attached to.
15
+ */
16
+ ClickOutside: DirectiveOptions;
17
+ };
18
+ /**
19
+ * Install all memorial-ui-component-library components into Vue.
20
+ * Please do not invoke this method directly.
21
+ * Call `Vue.use(MemorialUI)` to install.
22
+ */
23
+ export function install(
24
+ vue: typeof Vue,
25
+ options?: MemorialLibComponentOptions
26
+ ): void;
27
+
28
+ export * from './autocomplete';
29
+ export * from './button';
30
+ export * from './card';
31
+ export * from './checkbox';
32
+ export * from './component';
33
+ export * from './dialog';
34
+ export * from './divider';
35
+ export * from './form';
36
+ export * from './input';
37
+ export * from './loader';
38
+ export * from './popout-menu';
39
+ export * from './radio';
40
+ export * from './rater';
41
+ export * from './select';
@@ -1,20 +1,20 @@
1
- export interface MemorialLibComponentOptions {
2
- button: SdButtonPluginOptions;
3
- dialog: SdDialogPluginOptions;
4
- }
5
-
6
- export interface MemorialLib {
7
- version: string;
8
- options: MemorialLibComponentOptions;
9
- }
10
-
11
- export interface SdButtonPluginOptions {
12
- size: 'mini' | 'small' | 'medium' | 'large';
13
- }
14
-
15
- export interface SdDialogPluginOptions {
16
- /**
17
- * Whether to reject or resolve the promise on cancel.
18
- */
19
- rejectOnCancel: boolean;
20
- }
1
+ export interface MemorialLibComponentOptions {
2
+ button: SdButtonPluginOptions;
3
+ dialog: SdDialogPluginOptions;
4
+ }
5
+
6
+ export interface MemorialLib {
7
+ version: string;
8
+ options: MemorialLibComponentOptions;
9
+ }
10
+
11
+ export interface SdButtonPluginOptions {
12
+ size: 'mini' | 'small' | 'medium' | 'large';
13
+ }
14
+
15
+ export interface SdDialogPluginOptions {
16
+ /**
17
+ * Whether to reject or resolve the promise on cancel.
18
+ */
19
+ rejectOnCancel: boolean;
20
+ }
@@ -1,14 +1,14 @@
1
- import { MemorialUIPluginComponent } from './component';
2
-
3
- export declare class SdPopoutMenu extends MemorialUIPluginComponent {
4
- /**
5
- * Whether the menu is open.
6
- */
7
- open: boolean;
8
-
9
- /**
10
- * Sets the visibility state of the menu, being either *open* or *closed*.
11
- * @param state The visibility state of the menu
12
- */
13
- setState(state: 'open' | 'closed'): void;
14
- }
1
+ import { MemorialUIPluginComponent } from './component';
2
+
3
+ export declare class SdPopoutMenu extends MemorialUIPluginComponent {
4
+ /**
5
+ * Whether the menu is open.
6
+ */
7
+ open: boolean;
8
+
9
+ /**
10
+ * Sets the visibility state of the menu, being either *open* or *closed*.
11
+ * @param state The visibility state of the menu
12
+ */
13
+ setState(state: 'open' | 'closed'): void;
14
+ }