@allthings/structured-ticket-form 6.0.2-dev.0 → 6.0.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.
|
@@ -47,43 +47,43 @@ var styles = {
|
|
|
47
47
|
visibility: 'hidden',
|
|
48
48
|
}),
|
|
49
49
|
};
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
visibility: 'hidden',
|
|
57
|
-
},
|
|
50
|
+
var mainComponentsTheme = {
|
|
51
|
+
MuiDivider: {
|
|
52
|
+
styleOverrides: {
|
|
53
|
+
root: {
|
|
54
|
+
height: 0,
|
|
55
|
+
visibility: 'hidden',
|
|
58
56
|
},
|
|
59
57
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
},
|
|
59
|
+
MuiFormControl: {
|
|
60
|
+
styleOverrides: {
|
|
61
|
+
root: {
|
|
62
|
+
overflow: 'hidden',
|
|
65
63
|
},
|
|
66
64
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
},
|
|
66
|
+
MuiFormLabel: {
|
|
67
|
+
styleOverrides: {
|
|
68
|
+
root: {
|
|
69
|
+
fontSize: 14,
|
|
72
70
|
},
|
|
73
71
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
},
|
|
73
|
+
MuiInputLabel: {
|
|
74
|
+
styleOverrides: {
|
|
75
|
+
formControl: {
|
|
76
|
+
position: 'static',
|
|
79
77
|
},
|
|
80
78
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
},
|
|
80
|
+
MuiTextField: {
|
|
81
|
+
defaultProps: {
|
|
82
|
+
variant: 'standard',
|
|
85
83
|
},
|
|
86
84
|
},
|
|
85
|
+
};
|
|
86
|
+
var mainTheme = {
|
|
87
87
|
typography: {
|
|
88
88
|
fontSize: 14,
|
|
89
89
|
h5: {
|
|
@@ -93,9 +93,9 @@ var mainTheme = {
|
|
|
93
93
|
};
|
|
94
94
|
var Form = (0, core_1.withTheme)(mui_1.Theme);
|
|
95
95
|
var CustomForm = function (properties) {
|
|
96
|
-
var schema = properties.schema, languageSchema = properties.languageSchema, currentLanguage = properties.currentLanguage, _a = properties.theme, theme = _a === void 0 ? {} : _a, restProperties = __rest(properties, ["schema", "languageSchema", "currentLanguage", "theme"]);
|
|
97
|
-
var
|
|
98
|
-
var muiTheme = (0, styles_1.createTheme)(__assign(__assign({}, mainTheme), theme));
|
|
96
|
+
var schema = properties.schema, languageSchema = properties.languageSchema, currentLanguage = properties.currentLanguage, _a = properties.theme, theme = _a === void 0 ? {} : _a, _b = properties.componentsTheme, componentsTheme = _b === void 0 ? {} : _b, restProperties = __rest(properties, ["schema", "languageSchema", "currentLanguage", "theme", "componentsTheme"]);
|
|
97
|
+
var _c = (0, react_2.useState)((0, translator_1.translateSchema)(schema, currentLanguage, languageSchema)), translatedSchema = _c[0], setTranslatedSchema = _c[1];
|
|
98
|
+
var muiTheme = (0, styles_1.createTheme)(__assign(__assign(__assign({}, mainTheme), { components: __assign(__assign({}, mainComponentsTheme), componentsTheme) }), theme));
|
|
99
99
|
(0, react_2.useEffect)(function () {
|
|
100
100
|
setTranslatedSchema((0, translator_1.translateSchema)(schema, currentLanguage, languageSchema));
|
|
101
101
|
}, [languageSchema, schema, currentLanguage]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomForm.js","sourceRoot":"","sources":["../../../src/components/molecules/CustomForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,wCAAyC;AACzC,+CAAiE;AACjE,mCAAsC;AACtC,iCAAoD;AAEpD,+BAA2C;AAG3C,+CAA8C;AAE9C,IAAM,MAAM,GAAG;IACb,aAAa,EAAE,IAAA,WAAG,EAAC;QACjB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,MAAM;QACjB,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,MAAM;KACd,CAAC;IACF,YAAY,EAAE,IAAA,WAAG,EAAC;QAChB,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,QAAQ;KACrB,CAAC;CACH,CAAA;AAED,IAAM,
|
|
1
|
+
{"version":3,"file":"CustomForm.js","sourceRoot":"","sources":["../../../src/components/molecules/CustomForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,wCAAyC;AACzC,+CAAiE;AACjE,mCAAsC;AACtC,iCAAoD;AAEpD,+BAA2C;AAG3C,+CAA8C;AAE9C,IAAM,MAAM,GAAG;IACb,aAAa,EAAE,IAAA,WAAG,EAAC;QACjB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,MAAM;QACjB,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,MAAM;KACd,CAAC;IACF,YAAY,EAAE,IAAA,WAAG,EAAC;QAChB,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,QAAQ;KACrB,CAAC;CACH,CAAA;AAED,IAAM,mBAAmB,GAAG;IAC1B,UAAU,EAAE;QACV,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC;gBACT,UAAU,EAAE,QAAiB;aAC9B;SACF;KACF;IACD,cAAc,EAAE;QACd,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,QAAiB;aAC5B;SACF;KACF;IACD,YAAY,EAAE;QACZ,cAAc,EAAE;YACd,IAAI,EAA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EAAE,QAAQ,YAC5B,uBAAC,IAAI,aAAC,MAAM,EAAE,gBAAgB,IAAM,cAAc,cAChD,mCAAQ,GAAG,EAAE,MAAM,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAC,QAAQ,GAAG,IAC7D,GACO,GACZ,CACP,CAAA;AACH,CAAC,CAAA;AAlCY,QAAA,UAAU,cAkCtB"}
|
package/lib/models.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export interface ISchemaContainerProperties extends ISchemaHeaderProperties {
|
|
|
64
64
|
setCurrentEditorValue: (value: React.SetStateAction<IEditorState>) => void;
|
|
65
65
|
}
|
|
66
66
|
export interface ICustomFormProperties extends FormProps {
|
|
67
|
+
componentsTheme?: object;
|
|
67
68
|
currentLanguage: string;
|
|
68
69
|
languageSchema: Record<string, string>;
|
|
69
70
|
theme?: object;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/structured-ticket-form",
|
|
3
|
-
"version": "6.0.2
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Simple component to create and edit jsonSchemaForm with possibility to adding translated fields and custom UISchema.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"targets": {
|