phanterpwa 14.0.10__py3-none-any.whl → 14.1.1__py3-none-any.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.
- phanterpwa/__init__.py +1 -1
- phanterpwa/frontend/components/widgets.py +26 -11
- phanterpwa/frontend/forms.py +11 -8
- phanterpwa/frontend/validations.py +2 -1
- phanterpwa/i18n/__init__.py +5 -2
- phanterpwa/usual_sass/components/buttons.sass +2 -2
- phanterpwa/usual_sass/components/widgets.sass +2 -2
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.1.dist-info}/METADATA +1 -1
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.1.dist-info}/RECORD +14 -14
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.1.dist-info}/LICENSE +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.1.dist-info}/WHEEL +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.1.dist-info}/dependency_links.txt +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.1.dist-info}/entry_points.txt +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.1.dist-info}/top_level.txt +0 -0
phanterpwa/__init__.py
CHANGED
@@ -528,13 +528,18 @@ class Select(Widget):
|
|
528
528
|
self._alias_value = vdata
|
529
529
|
self._data_dict[vdata] = vdata
|
530
530
|
new_data.append([vdata, vdata])
|
531
|
-
elif
|
532
|
-
|
533
|
-
|
531
|
+
elif isinstance(vdata, int):
|
532
|
+
if self._value == vdata:
|
533
|
+
self._alias_value = vdata
|
534
|
+
self._data_dict[vdata] = vdata
|
535
|
+
new_data.append([vdata, vdata])
|
536
|
+
elif isinstance(vdata, list) and len(vdata) == 2:
|
534
537
|
if self._value == vdata[0]:
|
535
538
|
self._alias_value = vdata[1]
|
536
539
|
self._data_dict[vdata[0]] = vdata[1]
|
537
540
|
new_data.append([vdata[0], vdata[1]])
|
541
|
+
else:
|
542
|
+
valid_data = False
|
538
543
|
if not valid_data:
|
539
544
|
raise ValueError("The data parameter of widget \"{0}\" is invalid!".format(
|
540
545
|
self.identifier
|
@@ -5927,14 +5932,24 @@ class Button(Widget):
|
|
5927
5932
|
default_disabled = None
|
5928
5933
|
if self._disabled is True:
|
5929
5934
|
default_disabled = "disabled"
|
5930
|
-
|
5931
|
-
|
5932
|
-
|
5933
|
-
|
5934
|
-
|
5935
|
-
|
5936
|
-
|
5937
|
-
|
5935
|
+
if parameters.get("use_div_tag", None) is not None:
|
5936
|
+
html = DIV(
|
5937
|
+
label,
|
5938
|
+
DIV(_class="loading1"),
|
5939
|
+
DIV(_class="loading2"),
|
5940
|
+
_class="btn wave_on_click",
|
5941
|
+
_id=self._id_button,
|
5942
|
+
_disabled=default_disabled
|
5943
|
+
)
|
5944
|
+
else:
|
5945
|
+
html = BUTTON(
|
5946
|
+
label,
|
5947
|
+
DIV(_class="loading1"),
|
5948
|
+
DIV(_class="loading2"),
|
5949
|
+
_class="btn wave_on_click",
|
5950
|
+
_id=self._id_button,
|
5951
|
+
_disabled=default_disabled
|
5952
|
+
)
|
5938
5953
|
self._has_href = None
|
5939
5954
|
if "_href" in parameters:
|
5940
5955
|
self._has_href = parameters["_href"]
|
phanterpwa/frontend/forms.py
CHANGED
@@ -253,6 +253,7 @@ class CaptchaContainer(helpers.XmlConstructor):
|
|
253
253
|
class FormButton(helpers.XmlConstructor):
|
254
254
|
def __init__(self, name, label, **attributes):
|
255
255
|
self.label = label
|
256
|
+
self.name = name
|
256
257
|
initial_class = "phanterpwa-widget-form-form_button-container"
|
257
258
|
if ["_id"] not in attributes:
|
258
259
|
attributes["_id"] = "phanterpwa-widget-form-form_button-{0}".format(name)
|
@@ -260,9 +261,9 @@ class FormButton(helpers.XmlConstructor):
|
|
260
261
|
if "_class" in self.button_attributes:
|
261
262
|
self.button_attributes["_class"] = " ".join([
|
262
263
|
self.button_attributes['_class'].strip(),
|
263
|
-
"
|
264
|
+
"phanterpwa-widget-form-form_button"])
|
264
265
|
else:
|
265
|
-
self.button_attributes["_class"] = "
|
266
|
+
self.button_attributes["_class"] = "phanterpwa-widget-form-form_button"
|
266
267
|
if "_title" not in self.button_attributes:
|
267
268
|
if isinstance(self.label, str):
|
268
269
|
self.button_attributes["_title"] = self.label
|
@@ -271,10 +272,13 @@ class FormButton(helpers.XmlConstructor):
|
|
271
272
|
|
272
273
|
def _update_content(self):
|
273
274
|
attributes = self.button_attributes
|
275
|
+
attributes["use_div_tag"] = True
|
276
|
+
uni = window.PhanterPWA.get_id()
|
274
277
|
self.content = [
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
+
widgets.Button("button_{}".format(uni), self.label, **attributes)
|
279
|
+
# DIV(
|
280
|
+
# DIV(self.label, **attributes),
|
281
|
+
# _class="button-form containeeeer")
|
278
282
|
]
|
279
283
|
|
280
284
|
|
@@ -892,10 +896,9 @@ class ValidateForm():
|
|
892
896
|
validate_test_pass.append(False)
|
893
897
|
if validate_name.startswith("IS_IN_SET:"):
|
894
898
|
res = False
|
895
|
-
list_options =
|
896
|
-
|
899
|
+
list_options = [str(x[1]) for x in widget_instance._data]
|
897
900
|
if list_options is not None or list_options is not js_undefined:
|
898
|
-
if list_options.indexOf(value_for_validate) > -1:
|
901
|
+
if list_options.indexOf(str(value_for_validate)) > -1:
|
899
902
|
res = True
|
900
903
|
validate_test_pass.append(res)
|
901
904
|
|
@@ -180,7 +180,8 @@ class Valider():
|
|
180
180
|
list_options = JSON.parse(validate_name[10:])
|
181
181
|
if list_options is not None or list_options is not js_undefined:
|
182
182
|
list_options = JSON.parse(list_options)
|
183
|
-
|
183
|
+
new_list_options = [str(x[1]) for x in list_options]
|
184
|
+
if new_list_options.indexOf(value_for_validate) > -1:
|
184
185
|
res = True
|
185
186
|
validate_test_pass.append(res)
|
186
187
|
|
phanterpwa/i18n/__init__.py
CHANGED
@@ -47,8 +47,11 @@ class Translator(object):
|
|
47
47
|
self.keys = set(json.load(f))
|
48
48
|
else:
|
49
49
|
basename = os.path.basename(g)[0:-5]
|
50
|
-
|
51
|
-
|
50
|
+
try:
|
51
|
+
with open(g, 'r', encoding='utf-8') as f:
|
52
|
+
self._languages[basename] = json.load(f)
|
53
|
+
except json.decoder.JSONDecodeError as e:
|
54
|
+
raise Exception(e, "file: {g}")
|
52
55
|
for l in self._languages:
|
53
56
|
for w in self._languages[l]:
|
54
57
|
if w not in self.keys:
|
@@ -2242,7 +2242,7 @@ table
|
|
2242
2242
|
|
2243
2243
|
.phanterpwa-widget
|
2244
2244
|
&.phanterpwa-widget-button
|
2245
|
-
button
|
2245
|
+
button, div, a
|
2246
2246
|
.loading2, .loading1
|
2247
2247
|
display: none
|
2248
2248
|
transform: rotate(29deg)
|
@@ -2254,7 +2254,7 @@ table
|
|
2254
2254
|
left: -50%
|
2255
2255
|
|
2256
2256
|
&.loading
|
2257
|
-
button
|
2257
|
+
button, div, a
|
2258
2258
|
&.btn
|
2259
2259
|
background-image: linear-gradient(#9d9d9d, #d0d0d0)
|
2260
2260
|
&:hover
|
@@ -1,4 +1,4 @@
|
|
1
|
-
phanterpwa/__init__.py,sha256=
|
1
|
+
phanterpwa/__init__.py,sha256=gV55QPtxJKIIRicDh1Qzmy-fenDmMRguO5DrTaxYmbM,396
|
2
2
|
phanterpwa/__main__.py,sha256=1vSHtv6-sgAgpZiklf9bwarXX1b-fmKx1rjwJw4h78o,4017
|
3
3
|
phanterpwa/compiler.py,sha256=Je3qtVO_cZ69_PPWcXKyBgnRfQ-Ev-zkZ3UTN-ddOTQ,47478
|
4
4
|
phanterpwa/configer.py,sha256=PFO_nVy9r6yt5iDso1amDIR0Ge2UYYK3h-ae9M0Ezyk,26359
|
@@ -86,7 +86,7 @@ phanterpwa/frontend/__init__.py,sha256=KjlnaINX8_d_4AFmWE_ZRzG8_rcxJXqUcf-FVy3fv
|
|
86
86
|
phanterpwa/frontend/application.py,sha256=6EoTCcbl03gRbRTRYYIxjWEdLYvyfpq7qeNeKQfFpOY,57208
|
87
87
|
phanterpwa/frontend/decorators.py,sha256=Qrwqnk8-4N5xZCpDrcya6H1b5yFEHhUMOWT3H63p4KQ,4042
|
88
88
|
phanterpwa/frontend/fmasks.py,sha256=SgjJUlwFP927GYNeVaGPeZuH8p8KN8ipQzn-DKZd-6w,42522
|
89
|
-
phanterpwa/frontend/forms.py,sha256=
|
89
|
+
phanterpwa/frontend/forms.py,sha256=_NCS6GWsyDU7d4DW3P1joz5LkT9SfPtCDCxAfCFoq2o,42785
|
90
90
|
phanterpwa/frontend/gallery.py,sha256=9r3WlnQgRnDDWT74Gl03avQAR4MWWHonvjXUnZuEUA4,33833
|
91
91
|
phanterpwa/frontend/gatehandler.py,sha256=KjM4LRstq6P4COEfe3ZptNFQKxHoIEC-LtaFGzoe7wY,14753
|
92
92
|
phanterpwa/frontend/helpers.py,sha256=8XLVDPPz8ugyT84cAUqskqST-t9qH08zPvbFG2x8ncE,9861
|
@@ -96,7 +96,7 @@ phanterpwa/frontend/preloaders.py,sha256=FUGp7AyWvT5FVJPlGYfZtu9O-lK80Er0uSKOWvf
|
|
96
96
|
phanterpwa/frontend/progressbar.py,sha256=W80gkqghnCTDquyzNlMfiISHVWS5FAbYWbGeBsbtoyM,1798
|
97
97
|
phanterpwa/frontend/selects.py,sha256=Vx0gEUyIs6J3b6tRk-3srXQfdZkgeNovwW_pQl8Od2s,5467
|
98
98
|
phanterpwa/frontend/server.py,sha256=dMybJ_S8002PhuVvfeU-CYqDnQtWsvqyRIUCMdNZrNc,20671
|
99
|
-
phanterpwa/frontend/validations.py,sha256=
|
99
|
+
phanterpwa/frontend/validations.py,sha256=QVCJ9844zWXVaxIjQmmR4V0Z_JXY4DH923eyOLj3I5M,10578
|
100
100
|
phanterpwa/frontend/websocket.py,sha256=AqM1HiWTjHWLKXYXjzgEsNROgKKTZwfUgCKmpIGpIJQ,4381
|
101
101
|
phanterpwa/frontend/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
102
102
|
phanterpwa/frontend/components/admin.py,sha256=nSUxhLm1Ow5mrSHyvFBk4msHnfWwajyqEKj0_Guv0es,69794
|
@@ -109,12 +109,12 @@ phanterpwa/frontend/components/modal.py,sha256=q4v2z3HUS58lJ49E6ZWCEkSRVXy7kMiy5
|
|
109
109
|
phanterpwa/frontend/components/pagination.py,sha256=IJIyReYbKRj4OTVsZbNiCMfSOIq7qSLpFTF9qQdPbFM,791
|
110
110
|
phanterpwa/frontend/components/snippets.py,sha256=fm-QPIJ_Mv8fSHsS3UK8Bq8Iw_ziaECwEr-VjcaiPQw,4060
|
111
111
|
phanterpwa/frontend/components/top_slide.py,sha256=ReB0z63I9HjT8iq6ZfNB56KoZLzBxdfcFCIw7QjRQvU,3175
|
112
|
-
phanterpwa/frontend/components/widgets.py,sha256=
|
112
|
+
phanterpwa/frontend/components/widgets.py,sha256=fkX69HpzD2B85j1_DE60jnLWk5r4GsGIunLTCtL9yQ4,264227
|
113
113
|
phanterpwa/frontend/plugins/client.py,sha256=0x1HmGq6-WAap9RGl2szQj1GXClyGVtnznuYMwpUdb8,27481
|
114
114
|
phanterpwa/gallery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
115
|
phanterpwa/gallery/cutter.py,sha256=0-VnFa3aQ5XgNmA4P3BsL-_04IwkjrgHImKIrL3qViM,7789
|
116
116
|
phanterpwa/gallery/integrationDAL.py,sha256=Mik9BtkFD7fR_RngJh-srMMDwmQxd5idierQYCcucDI,11711
|
117
|
-
phanterpwa/i18n/__init__.py,sha256=
|
117
|
+
phanterpwa/i18n/__init__.py,sha256=q_-lyegqdE19B0Hpotfl6xPjznOkQiXCwzDNYaMj0xY,8824
|
118
118
|
phanterpwa/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
119
119
|
phanterpwa/interface/admin_tk.py,sha256=Wlpqx24e-GFXmYvP55gl_v2PXOU1zoEkP6Fks8tb2Jw,7015
|
120
120
|
phanterpwa/interface/cli.py,sha256=xEt3zgfYI3VZbuoRmSoE1IDM6LLGOXRzAqe7iIq-VH4,50861
|
@@ -395,7 +395,7 @@ phanterpwa/usual_sass/phanterpwa.sass,sha256=Imu7z3EXvMrq6mG_XyE72CQK8yshfefHGe8
|
|
395
395
|
phanterpwa/usual_sass/variables.sass,sha256=F1nL2hAfzleskeyC3VKOXv_fOPwvumOsZrrPMHshwjY,8645
|
396
396
|
phanterpwa/usual_sass/components/alert_top_activation.sass,sha256=0zj9UW6TOrSkfy_2_8MO_x0Ht78Iqa8N1bk22jiZhu8,1794
|
397
397
|
phanterpwa/usual_sass/components/breascrumbs.sass,sha256=m5dFrAz3FLk8PPG6WilnuXQZQjxXjScnbuwEgjlJyM8,1551
|
398
|
-
phanterpwa/usual_sass/components/buttons.sass,sha256=
|
398
|
+
phanterpwa/usual_sass/components/buttons.sass,sha256=ySLqvg4En1yTx88n8oBI1kE3hVNZVy755u9Cf5UdIUU,3689
|
399
399
|
phanterpwa/usual_sass/components/capcha_preload.sass,sha256=yX1mZx7a3lkV3WCaFi1bxIaH2USdOFrDOIGByIH7BV8,8191
|
400
400
|
phanterpwa/usual_sass/components/captcha.sass,sha256=Do3goTI1R5dycmYAcGxqHBS8ou4i8wtjUDZmc9fn-l4,7323
|
401
401
|
phanterpwa/usual_sass/components/captcha_preload_image_3x4.sass,sha256=VpgPsyM9XKMD17JYD4I0svF9lPfG5_rk3E2kpH-e6JI,5213
|
@@ -417,7 +417,7 @@ phanterpwa/usual_sass/components/pseudomodal.sass,sha256=Z6uYVGhdbE5sIvMwLmEEPRI
|
|
417
417
|
phanterpwa/usual_sass/components/run_points.sass,sha256=TOT-nxwirb2bl-s3pXMHPB8YHcpmp0vyihBydqOfAw4,3491
|
418
418
|
phanterpwa/usual_sass/components/sections.sass,sha256=OuicHuoa-OBEfQc-yPROAf-NjNj8IIp62tJ2Lr8FSBM,1536
|
419
419
|
phanterpwa/usual_sass/components/snippet.sass,sha256=jFzpE1G0HvN6Gr74saBS8Me5-9hC1t0XesYoytaEtNY,811
|
420
|
-
phanterpwa/usual_sass/components/widgets.sass,sha256=
|
420
|
+
phanterpwa/usual_sass/components/widgets.sass,sha256=s6TFOQBcAxrTfLjKw6lfstWEduPkj26eN-RtbbGINKM,85574
|
421
421
|
phanterpwa/usual_sass/components/xtable.sass,sha256=veuTpQ_KquwV0JNgG9BoSVo_s8McfCfFU4tIZhgoS2A,5243
|
422
422
|
phanterpwa/usual_sass/display/grid.sass,sha256=3GKRGsdHJuynVxa5sP3Wpo4y0jhT3QeVUIkDNPwAJK0,42388
|
423
423
|
phanterpwa/usual_sass/display/media_print.sass,sha256=OQB6xntrN5NQLaQwcam340MS7WZsldOIHlYW46EG2Mc,3962
|
@@ -435,10 +435,10 @@ phanterpwa/usual_sass/preloaders/indefined_text.sass,sha256=z4JuUtBrzoqH3HuNFXvN
|
|
435
435
|
phanterpwa/usual_sass/preloaders/run_points.sass,sha256=EYl93ljfgAc-ZLJ0VScrCoIlHP7Nr6NLdxj1zk2wm_E,3367
|
436
436
|
phanterpwa/usual_sass/preloaders/square.sass,sha256=TOsh9muP4zkYLUJcw4i1LeRs60NrtgRWBk_1oMt2_58,1348
|
437
437
|
phanterpwa/usual_sass/preloaders/squares.sass,sha256=kH1I89qEfmbvYxCtKFVNcxP5bWIjnqbheXVnyGF0VNo,3862
|
438
|
-
phanterpwa-14.
|
439
|
-
phanterpwa-14.
|
440
|
-
phanterpwa-14.
|
441
|
-
phanterpwa-14.
|
442
|
-
phanterpwa-14.
|
443
|
-
phanterpwa-14.
|
444
|
-
phanterpwa-14.
|
438
|
+
phanterpwa-14.1.1.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
|
439
|
+
phanterpwa-14.1.1.dist-info/METADATA,sha256=LOVrqmqYq66yiVdeKzRUegkwWSiYpg9aN3dK4KxTOMI,1938
|
440
|
+
phanterpwa-14.1.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
441
|
+
phanterpwa-14.1.1.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
|
442
|
+
phanterpwa-14.1.1.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
|
443
|
+
phanterpwa-14.1.1.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
|
444
|
+
phanterpwa-14.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|