amsdal 0.1.0__cp310-cp310-macosx_10_9_universal2.whl → 0.1.2__cp310-cp310-macosx_10_9_universal2.whl
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.
Potentially problematic release.
This version of amsdal might be problematic. Click here for more details.
- amsdal/__about__.py +1 -1
- amsdal/__migrations__/0000_initial.py +203 -0
- amsdal/cloud/__init__.cpython-310-darwin.so +0 -0
- amsdal/cloud/client.cpython-310-darwin.so +0 -0
- amsdal/cloud/constants.cpython-310-darwin.so +0 -0
- amsdal/cloud/enums.cpython-310-darwin.so +0 -0
- amsdal/cloud/models/__init__.cpython-310-darwin.so +0 -0
- amsdal/cloud/models/base.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/__init__.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/__init__.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/add_dependency.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/add_secret.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/base.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/create_deploy.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/create_session.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/delete_dependency.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/delete_secret.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/destroy_deploy.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/expose_db.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/list_dependencies.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/list_deploys.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/list_secrets.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/manager.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/signup_action.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/actions/update_deploy.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/auth/__init__.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/auth/base.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/auth/credentials.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/auth/manager.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/auth/signup_service.cpython-310-darwin.so +0 -0
- amsdal/cloud/services/auth/token.cpython-310-darwin.so +0 -0
- amsdal/contrib/__init__.cpython-310-darwin.so +0 -0
- amsdal/contrib/auth/migrations/0000_initial.py +49 -0
- amsdal/contrib/auth/models/login_session/hooks/pre_init.py +51 -0
- amsdal/contrib/auth/models/login_session/model.json +23 -0
- amsdal/contrib/auth/models/login_session/modifiers/display_name.py +3 -0
- amsdal/contrib/auth/models/permission/fixtures/basic_permissions.json +62 -0
- amsdal/contrib/auth/models/permission/model.json +18 -0
- amsdal/contrib/auth/models/permission/modifiers/display_name.py +3 -0
- amsdal/contrib/auth/models/user/hooks/pre_create.py +2 -0
- amsdal/contrib/auth/models/user/hooks/pre_init.py +25 -0
- amsdal/contrib/auth/models/user/model.json +25 -0
- amsdal/contrib/auth/models/user/modifiers/display_name.py +11 -0
- amsdal/contrib/frontend_configs/migrations/0000_initial.py +255 -0
- amsdal/contrib/frontend_configs/models/frontend_activator_config/model.json +11 -0
- amsdal/contrib/frontend_configs/models/frontend_config_async_validator/model.json +11 -0
- amsdal/contrib/frontend_configs/models/frontend_config_group_validator/model.json +52 -0
- amsdal/contrib/frontend_configs/models/frontend_config_option/model.json +15 -0
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/model.json +6 -0
- amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/properties/model_dump.py +13 -0
- amsdal/contrib/frontend_configs/models/frontend_config_slider_option/model.json +19 -0
- amsdal/contrib/frontend_configs/models/frontend_config_text_mask/model.json +26 -0
- amsdal/contrib/frontend_configs/models/frontend_config_validator/model.json +41 -0
- amsdal/contrib/frontend_configs/models/frontend_control_config/model.json +250 -0
- amsdal/contrib/frontend_configs/models/frontend_model_config/model.json +17 -0
- amsdal/contrib/frontend_configs/models/frontent_config_control_action/model.json +54 -0
- amsdal/contrib/frontend_configs/models/frontent_config_control_action/properties/action_validate.py +17 -0
- amsdal/fixtures/__init__.cpython-310-darwin.so +0 -0
- amsdal/fixtures/manager.cpython-310-darwin.so +0 -0
- amsdal/manager.cpython-310-darwin.so +0 -0
- amsdal/migration/__init__.cpython-310-darwin.so +0 -0
- amsdal/migration/base_migration_schemas.cpython-310-darwin.so +0 -0
- amsdal/migration/base_migration_schemas.pyi +2 -2
- amsdal/migration/data_classes.cpython-310-darwin.so +0 -0
- amsdal/migration/executors/__init__.cpython-310-darwin.so +0 -0
- amsdal/migration/executors/base.cpython-310-darwin.so +0 -0
- amsdal/migration/executors/default_executor.cpython-310-darwin.so +0 -0
- amsdal/migration/executors/state_executor.cpython-310-darwin.so +0 -0
- amsdal/migration/file_migration_executor.cpython-310-darwin.so +0 -0
- amsdal/migration/file_migration_generator.cpython-310-darwin.so +0 -0
- amsdal/migration/file_migration_store.cpython-310-darwin.so +0 -0
- amsdal/migration/file_migration_writer.cpython-310-darwin.so +0 -0
- amsdal/migration/migrations.cpython-310-darwin.so +0 -0
- amsdal/migration/migrations_loader.cpython-310-darwin.so +0 -0
- amsdal/migration/schemas_loaders.cpython-310-darwin.so +0 -0
- amsdal/migration/templates/data_migration.tmpl +18 -0
- amsdal/migration/templates/dict_validator.tmpl +4 -0
- amsdal/migration/templates/migration.tmpl +6 -0
- amsdal/migration/templates/model_class.tmpl +8 -0
- amsdal/migration/templates/model_class_layout.tmpl +21 -0
- amsdal/migration/templates/options_validator.tmpl +4 -0
- amsdal/migration/utils.cpython-310-darwin.so +0 -0
- amsdal/mixins/__init__.cpython-310-darwin.so +0 -0
- amsdal/mixins/build_mixin.cpython-310-darwin.so +0 -0
- amsdal/mixins/class_versions_mixin.cpython-310-darwin.so +0 -0
- amsdal/operations/__init__.cpython-310-darwin.so +0 -0
- amsdal/operations/manager.cpython-310-darwin.so +0 -0
- amsdal/schemas/manager.cpython-310-darwin.so +0 -0
- amsdal/services/__init__.cpython-310-darwin.so +0 -0
- amsdal/services/transaction_execution.cpython-310-darwin.so +0 -0
- {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/METADATA +1 -1
- {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/RECORD +95 -63
- {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/LICENSE.txt +0 -0
- {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/WHEEL +0 -0
- {amsdal-0.1.0.dist-info → amsdal-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
from amsdal_utils.models.enums import SchemaTypes
|
|
2
|
+
|
|
3
|
+
from amsdal.migration import migrations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
operations: list[migrations.Operation] = [
|
|
8
|
+
migrations.CreateClass(
|
|
9
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
10
|
+
class_name='FrontendConfigSkipNoneBase',
|
|
11
|
+
new_schema={
|
|
12
|
+
'title': 'FrontendConfigSkipNoneBase',
|
|
13
|
+
'properties': {},
|
|
14
|
+
'meta_class': 'TypeMeta',
|
|
15
|
+
'custom_code': "from typing import Any\n\n\ndef model_dump(self, **kwargs: Any) -> dict[str, Any]: # type: ignore[no-untyped-def] # noqa: ARG001\n kwargs['exclude_none'] = True\n\n return super().model_dump(**kwargs) # type: ignore[misc]\n\n\ndef model_dump_json(self, **kwargs: Any) -> str: # type: ignore[no-untyped-def] # noqa: ARG001\n kwargs['exclude_none'] = True\n\n return super().model_dump_json(**kwargs) # type: ignore[misc]",
|
|
16
|
+
},
|
|
17
|
+
),
|
|
18
|
+
migrations.CreateClass(
|
|
19
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
20
|
+
class_name='FrontendConfigGroupValidator',
|
|
21
|
+
new_schema={
|
|
22
|
+
'title': 'FrontendConfigGroupValidator',
|
|
23
|
+
'type': 'FrontendConfigSkipNoneBase',
|
|
24
|
+
'properties': {
|
|
25
|
+
'mainControl': {'type': 'string', 'title': 'Main Control'},
|
|
26
|
+
'dependentControls': {'type': 'array', 'items': {'type': 'string'}, 'title': 'Dependent Controls'},
|
|
27
|
+
'condition': {
|
|
28
|
+
'type': 'string',
|
|
29
|
+
'title': 'Condition',
|
|
30
|
+
'options': [
|
|
31
|
+
{'key': 'Less Than', 'value': 'lt'},
|
|
32
|
+
{'key': 'Less Than or Equal', 'value': 'lte'},
|
|
33
|
+
{'key': 'Greater Than', 'value': 'gt'},
|
|
34
|
+
{'key': 'Greater Than or Equal', 'value': 'gte'},
|
|
35
|
+
{'key': 'Equal', 'value': 'eq'},
|
|
36
|
+
{'key': 'Not Equal', 'value': 'neq'},
|
|
37
|
+
{'key': 'Exist', 'value': 'exist'},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
'meta_class': 'TypeMeta',
|
|
42
|
+
},
|
|
43
|
+
),
|
|
44
|
+
migrations.CreateClass(
|
|
45
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
46
|
+
class_name='FrontendActivatorConfig',
|
|
47
|
+
new_schema={
|
|
48
|
+
'title': 'FrontendActivatorConfig',
|
|
49
|
+
'type': 'FrontendConfigGroupValidator',
|
|
50
|
+
'properties': {'value': {'type': 'anything', 'title': 'Value'}},
|
|
51
|
+
'meta_class': 'TypeMeta',
|
|
52
|
+
},
|
|
53
|
+
),
|
|
54
|
+
migrations.CreateClass(
|
|
55
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
56
|
+
class_name='FrontendConfigTextMask',
|
|
57
|
+
new_schema={
|
|
58
|
+
'title': 'FrontendConfigTextMask',
|
|
59
|
+
'type': 'FrontendConfigSkipNoneBase',
|
|
60
|
+
'required': ['mask_string'],
|
|
61
|
+
'properties': {
|
|
62
|
+
'mask_string': {'type': 'string', 'title': 'Mask String'},
|
|
63
|
+
'prefix': {'type': 'string', 'title': 'Prefix'},
|
|
64
|
+
'suffix': {'type': 'string', 'title': 'Suffix'},
|
|
65
|
+
'thousands_separator': {'type': 'string', 'title': 'Thousands Separator'},
|
|
66
|
+
},
|
|
67
|
+
'meta_class': 'TypeMeta',
|
|
68
|
+
},
|
|
69
|
+
),
|
|
70
|
+
migrations.CreateClass(
|
|
71
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
72
|
+
class_name='FrontendConfigSliderOption',
|
|
73
|
+
new_schema={
|
|
74
|
+
'title': 'FrontendConfigSliderOption',
|
|
75
|
+
'type': 'FrontendConfigSkipNoneBase',
|
|
76
|
+
'properties': {
|
|
77
|
+
'min': {'type': 'number', 'title': 'Minimum'},
|
|
78
|
+
'max': {'type': 'number', 'title': 'Maximum'},
|
|
79
|
+
'range': {'type': 'boolean', 'title': 'Range'},
|
|
80
|
+
},
|
|
81
|
+
'meta_class': 'TypeMeta',
|
|
82
|
+
},
|
|
83
|
+
),
|
|
84
|
+
migrations.CreateClass(
|
|
85
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
86
|
+
class_name='FrontendConfigValidator',
|
|
87
|
+
new_schema={
|
|
88
|
+
'title': 'FrontendConfigValidator',
|
|
89
|
+
'type': 'FrontendConfigGroupValidator',
|
|
90
|
+
'properties': {
|
|
91
|
+
'function': {
|
|
92
|
+
'type': 'string',
|
|
93
|
+
'title': 'Function',
|
|
94
|
+
'options': [
|
|
95
|
+
{'key': 'Minimum', 'value': 'min'},
|
|
96
|
+
{'key': 'Maximum', 'value': 'max'},
|
|
97
|
+
{'key': 'Minimum Length', 'value': 'minLength'},
|
|
98
|
+
{'key': 'Maximum Length', 'value': 'maxLength'},
|
|
99
|
+
{'key': 'Required', 'value': 'required'},
|
|
100
|
+
{'key': 'Pattern', 'value': 'pattern'},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
'value': {'type': 'string', 'title': 'Value'},
|
|
104
|
+
},
|
|
105
|
+
'meta_class': 'TypeMeta',
|
|
106
|
+
},
|
|
107
|
+
),
|
|
108
|
+
migrations.CreateClass(
|
|
109
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
110
|
+
class_name='FrontendConfigAsyncValidator',
|
|
111
|
+
new_schema={
|
|
112
|
+
'title': 'FrontendConfigAsyncValidator',
|
|
113
|
+
'type': 'FrontendConfigSkipNoneBase',
|
|
114
|
+
'properties': {'endpoint': {'type': 'string', 'title': 'Endpoint'}},
|
|
115
|
+
'meta_class': 'TypeMeta',
|
|
116
|
+
},
|
|
117
|
+
),
|
|
118
|
+
migrations.CreateClass(
|
|
119
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
120
|
+
class_name='FrontendConfigControlAction',
|
|
121
|
+
new_schema={
|
|
122
|
+
'title': 'FrontendConfigControlAction',
|
|
123
|
+
'type': 'FrontendConfigSkipNoneBase',
|
|
124
|
+
'required': ['action', 'text', 'type'],
|
|
125
|
+
'properties': {
|
|
126
|
+
'action': {'type': 'string', 'title': 'Action'},
|
|
127
|
+
'text': {'type': 'string', 'title': 'Text'},
|
|
128
|
+
'type': {
|
|
129
|
+
'type': 'string',
|
|
130
|
+
'title': 'Type',
|
|
131
|
+
'options': [
|
|
132
|
+
{'key': 'Arrow Next', 'value': 'arrow-next'},
|
|
133
|
+
{'key': 'Arrow Prev', 'value': 'arrow-prev'},
|
|
134
|
+
{'key': 'Action Button', 'value': 'action-button'},
|
|
135
|
+
{'key': 'Text Next', 'value': 'text-next'},
|
|
136
|
+
{'key': 'Text Prev', 'value': 'text-prev'},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
'dataLayerEvent': {'type': 'string', 'title': 'Data Layer Event'},
|
|
140
|
+
'activator': {'type': 'string', 'title': 'Activator'},
|
|
141
|
+
'icon': {'type': 'string', 'title': 'Icon'},
|
|
142
|
+
},
|
|
143
|
+
'meta_class': 'TypeMeta',
|
|
144
|
+
'custom_code': "from pydantic import field_validator\n\n\n@field_validator('action', mode='after') # type: ignore[misc]\n@classmethod\ndef validate_action(cls, v: str) -> str: # type: ignore[no-untyped-def] # noqa: ARG001\n if not v.startswith('navigate::') and v not in [\n 'goPrev',\n 'goNext',\n 'goNextWithSubmit',\n 'submit',\n 'submitWithDataLayer',\n ]:\n msg = 'Action must be one of: goPrev, goNext, goNextWithSubmit, submit, submitWithDataLayer, navigate::{string}'\n raise ValueError(msg)\n\n return v",
|
|
145
|
+
},
|
|
146
|
+
),
|
|
147
|
+
migrations.CreateClass(
|
|
148
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
149
|
+
class_name='FrontendConfigOption',
|
|
150
|
+
new_schema={
|
|
151
|
+
'title': 'FrontendConfigOption',
|
|
152
|
+
'type': 'FrontendConfigSkipNoneBase',
|
|
153
|
+
'properties': {
|
|
154
|
+
'label': {'type': 'string', 'title': 'Label'},
|
|
155
|
+
'value': {'type': 'string', 'title': 'Value'},
|
|
156
|
+
},
|
|
157
|
+
'meta_class': 'TypeMeta',
|
|
158
|
+
},
|
|
159
|
+
),
|
|
160
|
+
migrations.CreateClass(
|
|
161
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
162
|
+
class_name='FrontendControlConfig',
|
|
163
|
+
new_schema={
|
|
164
|
+
'title': 'FrontendControlConfig',
|
|
165
|
+
'type': 'FrontendConfigSkipNoneBase',
|
|
166
|
+
'required': ['type', 'name'],
|
|
167
|
+
'properties': {
|
|
168
|
+
'type': {
|
|
169
|
+
'type': 'string',
|
|
170
|
+
'title': 'Type',
|
|
171
|
+
'options': [
|
|
172
|
+
{'key': 'Infoscreen', 'value': 'infoscreen'},
|
|
173
|
+
{'key': 'Info Group', 'value': 'info-group'},
|
|
174
|
+
{'key': 'Text', 'value': 'text'},
|
|
175
|
+
{'key': 'Number', 'value': 'number'},
|
|
176
|
+
{'key': 'Select', 'value': 'select'},
|
|
177
|
+
{'key': 'Object Group', 'value': 'object_group'},
|
|
178
|
+
{'key': 'Group', 'value': 'group'},
|
|
179
|
+
{'key': 'Group Toggle', 'value': 'group_toggle'},
|
|
180
|
+
{'key': 'Group Switch', 'value': 'group_switch'},
|
|
181
|
+
{'key': 'Password', 'value': 'password'},
|
|
182
|
+
{'key': 'Email', 'value': 'email'},
|
|
183
|
+
{'key': 'Phone', 'value': 'phone'},
|
|
184
|
+
{'key': 'textarea', 'value': 'textarea'},
|
|
185
|
+
{'key': 'Multiselect', 'value': 'multiselect'},
|
|
186
|
+
{'key': 'number_initial', 'value': 'number_initial'},
|
|
187
|
+
{'key': 'number_plus', 'value': 'number_plus'},
|
|
188
|
+
{'key': 'number_minus', 'value': 'number_minus'},
|
|
189
|
+
{'key': 'number_equals', 'value': 'number_equals'},
|
|
190
|
+
{'key': 'toggle', 'value': 'toggle'},
|
|
191
|
+
{'key': 'radio', 'value': 'radio'},
|
|
192
|
+
{'key': 'checkbox', 'value': 'checkbox'},
|
|
193
|
+
{'key': 'number-slider', 'value': 'number-slider'},
|
|
194
|
+
{'key': 'number-operations', 'value': 'number-operations'},
|
|
195
|
+
{'key': 'date', 'value': 'date'},
|
|
196
|
+
{'key': 'dateTriplet', 'value': 'dateTriplet'},
|
|
197
|
+
{'key': 'array', 'value': 'array'},
|
|
198
|
+
{'key': 'object', 'value': 'object'},
|
|
199
|
+
{'key': 'file', 'value': 'file'},
|
|
200
|
+
{'key': 'dropzone', 'value': 'dropzone'},
|
|
201
|
+
{'key': 'object_latest', 'value': 'object_latest'},
|
|
202
|
+
{'key': 'Dictionary', 'value': 'dict'},
|
|
203
|
+
{'key': 'Time', 'value': 'time'},
|
|
204
|
+
{'key': 'Datetime', 'value': 'datetime'},
|
|
205
|
+
{'key': 'Bytes', 'value': 'Bytes'},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
'name': {'type': 'string', 'title': 'Name'},
|
|
209
|
+
'label': {'type': 'string', 'title': 'Label'},
|
|
210
|
+
'required': {'type': 'boolean', 'title': 'Required'},
|
|
211
|
+
'hideLabel': {'type': 'boolean', 'title': 'Hide Label'},
|
|
212
|
+
'actions': {'type': 'array', 'items': {'type': 'FrontendConfigControlAction'}, 'title': 'Actions'},
|
|
213
|
+
'validators': {
|
|
214
|
+
'type': 'array',
|
|
215
|
+
'items': {'type': 'FrontendConfigValidator'},
|
|
216
|
+
'title': 'Validators',
|
|
217
|
+
},
|
|
218
|
+
'asyncValidators': {
|
|
219
|
+
'type': 'array',
|
|
220
|
+
'items': {'type': 'FrontendConfigAsyncValidator'},
|
|
221
|
+
'title': 'Async Validators',
|
|
222
|
+
},
|
|
223
|
+
'activators': {
|
|
224
|
+
'type': 'array',
|
|
225
|
+
'items': {'type': 'FrontendActivatorConfig'},
|
|
226
|
+
'title': 'Activators',
|
|
227
|
+
},
|
|
228
|
+
'additionalText': {'type': 'string', 'title': 'Additional Text'},
|
|
229
|
+
'value': {'type': 'anything', 'title': 'Value'},
|
|
230
|
+
'placeholder': {'type': 'string', 'title': 'Placeholder'},
|
|
231
|
+
'options': {'type': 'array', 'items': {'type': 'FrontendConfigOption'}, 'title': 'Options'},
|
|
232
|
+
'mask': {'type': 'FrontendConfigTextMask', 'title': 'Mask'},
|
|
233
|
+
'controls': {'type': 'array', 'items': {'type': 'FrontendControlConfig'}, 'title': 'Controls'},
|
|
234
|
+
'showSearch': {'type': 'boolean', 'title': 'Show Search'},
|
|
235
|
+
'sliderOptions': {'type': 'FrontendConfigSliderOption', 'title': 'Slider Option'},
|
|
236
|
+
'customLabel': {'type': 'array', 'items': {'type': 'string'}, 'title': 'Custom Label'},
|
|
237
|
+
'control': {'type': 'FrontendControlConfig', 'title': 'Control'},
|
|
238
|
+
'entityType': {'type': 'string', 'title': 'Entity Type'},
|
|
239
|
+
},
|
|
240
|
+
'meta_class': 'TypeMeta',
|
|
241
|
+
},
|
|
242
|
+
),
|
|
243
|
+
migrations.CreateClass(
|
|
244
|
+
schema_type=SchemaTypes.CONTRIB,
|
|
245
|
+
class_name='FrontendModelConfig',
|
|
246
|
+
new_schema={
|
|
247
|
+
'title': 'FrontendModelConfig',
|
|
248
|
+
'required': ['class_name'],
|
|
249
|
+
'properties': {
|
|
250
|
+
'class_name': {'type': 'string', 'title': 'Class Name'},
|
|
251
|
+
'control': {'type': 'FrontendControlConfig', 'title': 'Control'},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
),
|
|
255
|
+
]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "FrontendConfigGroupValidator",
|
|
3
|
+
"type": "FrontendConfigSkipNoneBase",
|
|
4
|
+
"properties": {
|
|
5
|
+
"mainControl": {
|
|
6
|
+
"title": "Main Control",
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"dependentControls": {
|
|
10
|
+
"title": "Dependent Controls",
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"condition": {
|
|
17
|
+
"title": "Condition",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"options": [
|
|
20
|
+
{
|
|
21
|
+
"key": "Less Than",
|
|
22
|
+
"value": "lt"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"key": "Less Than or Equal",
|
|
26
|
+
"value": "lte"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "Greater Than",
|
|
30
|
+
"value": "gt"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"key": "Greater Than or Equal",
|
|
34
|
+
"value": "gte"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"key": "Equal",
|
|
38
|
+
"value": "eq"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"key": "Not Equal",
|
|
42
|
+
"value": "neq"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "Exist",
|
|
46
|
+
"value": "exist"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"meta_class": "TypeMeta"
|
|
52
|
+
}
|
amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base/properties/model_dump.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def model_dump(self, **kwargs: Any) -> dict[str, Any]: # type: ignore[no-untyped-def] # noqa: ARG001
|
|
5
|
+
kwargs['exclude_none'] = True
|
|
6
|
+
|
|
7
|
+
return super().model_dump(**kwargs) # type: ignore[misc]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def model_dump_json(self, **kwargs: Any) -> str: # type: ignore[no-untyped-def] # noqa: ARG001
|
|
11
|
+
kwargs['exclude_none'] = True
|
|
12
|
+
|
|
13
|
+
return super().model_dump_json(**kwargs) # type: ignore[misc]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "FrontendConfigSliderOption",
|
|
3
|
+
"type": "FrontendConfigSkipNoneBase",
|
|
4
|
+
"properties": {
|
|
5
|
+
"min": {
|
|
6
|
+
"title": "Minimum",
|
|
7
|
+
"type": "number"
|
|
8
|
+
},
|
|
9
|
+
"max": {
|
|
10
|
+
"title": "Maximum",
|
|
11
|
+
"type": "number"
|
|
12
|
+
},
|
|
13
|
+
"range": {
|
|
14
|
+
"title": "Range",
|
|
15
|
+
"type": "boolean"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"meta_class": "TypeMeta"
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "FrontendConfigTextMask",
|
|
3
|
+
"type": "FrontendConfigSkipNoneBase",
|
|
4
|
+
"properties": {
|
|
5
|
+
"mask_string": {
|
|
6
|
+
"title": "Mask String",
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"prefix": {
|
|
10
|
+
"title": "Prefix",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"suffix": {
|
|
14
|
+
"title": "Suffix",
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"thousands_separator": {
|
|
18
|
+
"title": "Thousands Separator",
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": [
|
|
23
|
+
"mask_string"
|
|
24
|
+
],
|
|
25
|
+
"meta_class": "TypeMeta"
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "FrontendConfigValidator",
|
|
3
|
+
"type": "FrontendConfigGroupValidator",
|
|
4
|
+
"properties": {
|
|
5
|
+
"function": {
|
|
6
|
+
"title": "Function",
|
|
7
|
+
"type": "string",
|
|
8
|
+
"options": [
|
|
9
|
+
{
|
|
10
|
+
"key": "Minimum",
|
|
11
|
+
"value": "min"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"key": "Maximum",
|
|
15
|
+
"value": "max"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"key": "Minimum Length",
|
|
19
|
+
"value": "minLength"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"key": "Maximum Length",
|
|
23
|
+
"value": "maxLength"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"key": "Required",
|
|
27
|
+
"value": "required"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"key": "Pattern",
|
|
31
|
+
"value": "pattern"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"value": {
|
|
36
|
+
"title": "Value",
|
|
37
|
+
"type": "string"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"meta_class": "TypeMeta"
|
|
41
|
+
}
|