@quickflo/quickforms-quasar 1.0.3 → 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.
- package/README.md +190 -0
- package/dist/components/QuasarArrayField.vue.d.ts.map +1 -1
- package/dist/components/QuasarDateField.vue.d.ts.map +1 -1
- package/dist/components/QuasarDateTimeField.vue.d.ts.map +1 -1
- package/dist/components/QuasarEnumField.vue.d.ts.map +1 -1
- package/dist/components/QuasarMultiEnumField.vue.d.ts.map +1 -1
- package/dist/components/QuasarNumberField.vue.d.ts.map +1 -1
- package/dist/components/QuasarStringField.vue.d.ts.map +1 -1
- package/dist/components/QuasarTimeField.vue.d.ts.map +1 -1
- package/dist/index.js +4025 -3967
- package/dist/types.d.ts +78 -103
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +12 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormOptions as VueFormOptions } from '@quickflo/quickforms-vue';
|
|
2
|
+
import { QInputProps, QSelectProps, QCheckboxProps, QDateProps, QCardProps, QExpansionItemProps, QBtnProps } from 'quasar';
|
|
2
3
|
|
|
3
4
|
interface VueComponentDefaults {
|
|
4
5
|
select?: {
|
|
@@ -14,130 +15,104 @@ interface VueComponentDefaults {
|
|
|
14
15
|
suffix?: string;
|
|
15
16
|
};
|
|
16
17
|
hints?: {
|
|
17
|
-
showMode?:
|
|
18
|
+
showMode?: "always" | "focus" | "hover";
|
|
18
19
|
};
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* QuickForms convenience features for Quasar components
|
|
23
|
+
* These are NOT native Quasar props - they're convenience shortcuts we provide
|
|
24
|
+
* Use via x-quickforms-quasar in schema or quickformsDefaults in form options
|
|
25
|
+
*/
|
|
26
|
+
export interface QuickFormsQuasarFeatures {
|
|
27
|
+
/** Icon to display in prepend slot (left side of input) */
|
|
28
|
+
prependIcon?: string;
|
|
29
|
+
/** Icon to display in append slot (right side of input) */
|
|
30
|
+
appendIcon?: string;
|
|
31
|
+
/** Color for icons. Default: 'grey-7' */
|
|
32
|
+
iconColor?: string;
|
|
33
|
+
/** Size for icons. Default: 'sm' */
|
|
34
|
+
iconSize?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* QuickForms features specific to array fields
|
|
38
|
+
* Customize buttons and layout for array item management
|
|
39
|
+
*/
|
|
40
|
+
export interface QuickFormsQuasarArrayFeatures {
|
|
41
|
+
/** Position of the "Add Item" button. Default: 'bottom-left' */
|
|
42
|
+
addButtonPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
43
|
+
/**
|
|
44
|
+
* Native Quasar QBtn props for the "Add Item" button
|
|
45
|
+
* Passed directly via v-bind - supports ALL QBtn properties
|
|
46
|
+
* Defaults: { outline: true, color: 'primary', icon: 'add', label: 'Add item' }
|
|
47
|
+
*/
|
|
48
|
+
addButton?: Partial<QBtnProps>;
|
|
49
|
+
/**
|
|
50
|
+
* Native Quasar QBtn props for the "Remove" button
|
|
51
|
+
* Passed directly via v-bind - supports ALL QBtn properties
|
|
52
|
+
* Defaults: { flat: true, round: true, dense: true, size: 'sm', icon: 'close', color: 'negative' }
|
|
53
|
+
*/
|
|
54
|
+
removeButton?: Partial<QBtnProps>;
|
|
55
|
+
}
|
|
20
56
|
/**
|
|
21
57
|
* Quasar-specific component defaults
|
|
22
|
-
*
|
|
58
|
+
* Uses native Quasar component prop types - these get passed through via v-bind
|
|
59
|
+
* All properties here are NATIVE Quasar props from the official Quasar type definitions
|
|
23
60
|
*/
|
|
24
61
|
export interface QuasarComponentDefaults extends VueComponentDefaults {
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/** Use filled style for inputs. Default: false */
|
|
34
|
-
filled?: boolean;
|
|
35
|
-
/** Use dense mode for all components. Default: false */
|
|
36
|
-
dense?: boolean;
|
|
37
|
-
/** Use square borders. Default: false */
|
|
38
|
-
square?: boolean;
|
|
39
|
-
/** Use rounded borders. Default: false */
|
|
40
|
-
rounded?: boolean;
|
|
41
|
-
/** Global color for all components. Default: undefined */
|
|
42
|
-
color?: string;
|
|
43
|
-
/** Show bottom border only. Default: false */
|
|
44
|
-
borderless?: boolean;
|
|
45
|
-
/** Hide bottom space reserved for hint/error. Default: false */
|
|
46
|
-
hideBottomSpace?: boolean;
|
|
47
|
-
};
|
|
48
|
-
/** QInput-specific defaults */
|
|
49
|
-
input?: {
|
|
50
|
-
/** CSS class(es) for input fields */
|
|
51
|
-
class?: string | string[];
|
|
52
|
-
/** Inline styles for input fields */
|
|
53
|
-
style?: string | Record<string, string>;
|
|
54
|
-
/** Default outlined style. Default: false */
|
|
55
|
-
outlined?: boolean;
|
|
56
|
-
/** Default dense mode. Default: false */
|
|
57
|
-
dense?: boolean;
|
|
58
|
-
/** Show clear button. Default: false */
|
|
59
|
-
clearable?: boolean;
|
|
60
|
-
/** Input color. Default: undefined */
|
|
61
|
-
color?: string;
|
|
62
|
-
};
|
|
63
|
-
/** QSelect-specific defaults */
|
|
62
|
+
/**
|
|
63
|
+
* Global defaults applied to ALL Quasar field components (QInput, QSelect, etc)
|
|
64
|
+
* Uses common props that exist across multiple Quasar components
|
|
65
|
+
*/
|
|
66
|
+
global?: Partial<Pick<QInputProps, "outlined" | "filled" | "dense" | "square" | "rounded" | "color" | "borderless" | "hideBottomSpace">>;
|
|
67
|
+
/** QInput-specific defaults (for string/number fields) */
|
|
68
|
+
input?: Partial<QInputProps>;
|
|
69
|
+
/** QSelect-specific defaults (for enum fields) */
|
|
64
70
|
select?: {
|
|
65
|
-
/** Enable/disable autocomplete filtering. Default: true (
|
|
71
|
+
/** Enable/disable autocomplete filtering. Default: true (QuickForms feature, not Quasar) */
|
|
66
72
|
autocomplete?: boolean;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
outlined?: boolean;
|
|
73
|
-
/** Default dense mode. Default: false */
|
|
74
|
-
dense?: boolean;
|
|
75
|
-
/** Use chips for multiple selection. Default: false */
|
|
76
|
-
useChips?: boolean;
|
|
77
|
-
/** Select color. Default: undefined */
|
|
78
|
-
color?: string;
|
|
79
|
-
};
|
|
80
|
-
/** QCheckbox-specific defaults */
|
|
81
|
-
checkbox?: {
|
|
82
|
-
/** CSS class(es) for checkboxes */
|
|
83
|
-
class?: string | string[];
|
|
84
|
-
/** Inline styles for checkboxes */
|
|
85
|
-
style?: string | Record<string, string>;
|
|
86
|
-
/** Checkbox color. Default: 'primary' */
|
|
87
|
-
color?: string;
|
|
88
|
-
/** Keep color when unchecked. Default: false */
|
|
89
|
-
keepColor?: boolean;
|
|
90
|
-
/** Use dense mode. Default: false */
|
|
91
|
-
dense?: boolean;
|
|
92
|
-
};
|
|
93
|
-
/** QDate/QTime-specific defaults */
|
|
94
|
-
datetime?: {
|
|
95
|
-
/** CSS class(es) for datetime fields */
|
|
96
|
-
class?: string | string[];
|
|
97
|
-
/** Inline styles for datetime fields */
|
|
98
|
-
style?: string | Record<string, string>;
|
|
73
|
+
} & Partial<QSelectProps>;
|
|
74
|
+
/** QCheckbox-specific defaults (for boolean fields) */
|
|
75
|
+
checkbox?: Partial<QCheckboxProps>;
|
|
76
|
+
/** QDate/QTime-specific defaults (for date/datetime fields) */
|
|
77
|
+
datetime?: Partial<QDateProps> & {
|
|
99
78
|
/** Date mask format. Default: 'YYYY-MM-DD' */
|
|
100
79
|
dateMask?: string;
|
|
101
80
|
/** Time mask format. Default: 'HH:mm:ss' */
|
|
102
81
|
timeMask?: string;
|
|
103
82
|
/** DateTime mask format. Default: 'YYYY-MM-DD HH:mm:ss' */
|
|
104
83
|
dateTimeMask?: string;
|
|
105
|
-
/** Color for date/time picker. Default: 'primary' */
|
|
106
|
-
color?: string;
|
|
107
|
-
};
|
|
108
|
-
/** QCard-specific defaults for arrays/objects */
|
|
109
|
-
card?: {
|
|
110
|
-
/** CSS class(es) for cards */
|
|
111
|
-
class?: string | string[];
|
|
112
|
-
/** Inline styles for cards */
|
|
113
|
-
style?: string | Record<string, string>;
|
|
114
|
-
/** Use flat style. Default: true */
|
|
115
|
-
flat?: boolean;
|
|
116
|
-
/** Show border. Default: true */
|
|
117
|
-
bordered?: boolean;
|
|
118
|
-
/** Use square borders. Default: false */
|
|
119
|
-
square?: boolean;
|
|
120
|
-
};
|
|
121
|
-
/** QExpansionItem-specific defaults for objects */
|
|
122
|
-
expansion?: {
|
|
123
|
-
/** CSS class(es) for expansion items */
|
|
124
|
-
class?: string | string[];
|
|
125
|
-
/** Inline styles for expansion items */
|
|
126
|
-
style?: string | Record<string, string>;
|
|
127
|
-
/** Start expanded. Default: true */
|
|
128
|
-
defaultOpened?: boolean;
|
|
129
|
-
/** Expansion icon. Default: undefined */
|
|
130
|
-
icon?: string;
|
|
131
|
-
/** Use dense mode. Default: false */
|
|
132
|
-
dense?: boolean;
|
|
133
84
|
};
|
|
85
|
+
/** QCard-specific defaults (for arrays/objects) */
|
|
86
|
+
card?: Partial<QCardProps>;
|
|
87
|
+
/** QExpansionItem-specific defaults (for objects) */
|
|
88
|
+
expansion?: Partial<QExpansionItemProps>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* QuickForms Quasar-specific convenience defaults
|
|
92
|
+
* These are convenience features we provide on top of native Quasar
|
|
93
|
+
* Use via x-quickforms-quasar in schema
|
|
94
|
+
*/
|
|
95
|
+
export interface QuickFormsQuasarDefaults {
|
|
96
|
+
/** Global QuickForms features for all components */
|
|
97
|
+
global?: QuickFormsQuasarFeatures;
|
|
98
|
+
/** Input-specific QuickForms features */
|
|
99
|
+
input?: QuickFormsQuasarFeatures;
|
|
100
|
+
/** Select-specific QuickForms features (no appendIcon since dropdown uses it) */
|
|
101
|
+
select?: Omit<QuickFormsQuasarFeatures, "appendIcon">;
|
|
102
|
+
/** DateTime-specific QuickForms features */
|
|
103
|
+
datetime?: QuickFormsQuasarFeatures;
|
|
104
|
+
/** Array-specific QuickForms features */
|
|
105
|
+
array?: QuickFormsQuasarArrayFeatures;
|
|
134
106
|
}
|
|
135
107
|
/**
|
|
136
108
|
* Quasar-specific form options
|
|
137
109
|
* Extends Vue FormOptions with Quasar-specific componentDefaults
|
|
138
110
|
*/
|
|
139
|
-
export interface QuasarFormOptions extends Omit<VueFormOptions,
|
|
111
|
+
export interface QuasarFormOptions extends Omit<VueFormOptions, "componentDefaults"> {
|
|
112
|
+
/** Native Quasar component defaults (passed via v-bind) */
|
|
140
113
|
componentDefaults?: QuasarComponentDefaults;
|
|
114
|
+
/** QuickForms convenience features (interpreted by our components) */
|
|
115
|
+
quickformsDefaults?: QuickFormsQuasarDefaults;
|
|
141
116
|
}
|
|
142
117
|
export {};
|
|
143
118
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,SAAS,EACV,MAAM,QAAQ,CAAC;AAGhB,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC,CAAC;IACF,KAAK,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,gBAAgB,CAAC,EAAE,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AAO,CAAC,cAAc,CAAC,CAAC;IAEnC,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG;QAC/B,8CAA8C;QAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,4CAA4C;QAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,2DAA2D;QAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3B,qDAAqD;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,oDAAoD;IACpD,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,yCAAyC;IACzC,KAAK,CAAC,EAAE,wBAAwB,CAAC;IACjC,iFAAiF;IACjF,MAAM,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,YAAY,CAAC,CAAC;IACtD,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,yCAAyC;IACzC,KAAK,CAAC,EAAE,6BAA6B,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,mBAAmB,CAAC;IACjD,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAC5C,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,wBAAwB,CAAC;CAC/C"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import { QuasarComponentDefaults } from './types';
|
|
1
|
+
import { QuasarComponentDefaults, QuickFormsQuasarDefaults, QuickFormsQuasarFeatures } from './types';
|
|
2
2
|
import { JSONSchema } from '@quickflo/quickforms';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Merges Quasar component defaults with schema-level props
|
|
6
6
|
* Priority (lowest to highest): global defaults -> component-specific defaults -> x-component-props -> x-quasar-props
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This only handles NATIVE Quasar props that get passed via v-bind
|
|
9
|
+
* For QuickForms convenience features (icons, etc), use mergeQuickFormsQuasarFeatures
|
|
7
10
|
*/
|
|
8
11
|
export declare function mergeQuasarProps(schema: JSONSchema, componentDefaults: QuasarComponentDefaults | undefined, componentType: 'input' | 'select' | 'checkbox' | 'datetime' | 'card' | 'expansion'): Record<string, any>;
|
|
12
|
+
/**
|
|
13
|
+
* Merges QuickForms convenience features from defaults and schema
|
|
14
|
+
* Priority (lowest to highest): global defaults -> component-specific defaults -> x-quickforms-quasar
|
|
15
|
+
*
|
|
16
|
+
* These are NOT native Quasar props - they're convenience features we interpret
|
|
17
|
+
* and render (e.g. icons into slots)
|
|
18
|
+
*/
|
|
19
|
+
export declare function mergeQuickFormsQuasarFeatures(schema: JSONSchema, quickformsDefaults: QuickFormsQuasarDefaults | undefined, componentType: 'input' | 'select' | 'datetime'): QuickFormsQuasarFeatures;
|
|
9
20
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,UAAU,EAClB,iBAAiB,EAAE,uBAAuB,GAAG,SAAS,EACtD,aAAa,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GACjF,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAarB;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,UAAU,EAClB,kBAAkB,EAAE,wBAAwB,GAAG,SAAS,EACxD,aAAa,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,GAC7C,wBAAwB,CAW1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quickflo/quickforms-quasar",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Quasar UI components for QuickForms - JSON Schema form generator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"vee-validate": "^4.12.0",
|
|
34
|
-
"@quickflo/quickforms": "1.0
|
|
35
|
-
"@quickflo/quickforms
|
|
34
|
+
"@quickflo/quickforms-vue": "1.1.0",
|
|
35
|
+
"@quickflo/quickforms": "1.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@quasar/extras": "^1.17.0",
|