phanterpwa 14.0.10__py3-none-any.whl → 14.1.0__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 +8 -3
- phanterpwa/frontend/forms.py +10 -8
- phanterpwa/frontend/validations.py +2 -1
- phanterpwa/i18n/__init__.py +5 -2
- phanterpwa/usual_sass/components/buttons.sass +2 -2
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.0.dist-info}/METADATA +1 -1
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.0.dist-info}/RECORD +13 -13
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.0.dist-info}/LICENSE +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.0.dist-info}/WHEEL +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.0.dist-info}/dependency_links.txt +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.0.dist-info}/entry_points.txt +0 -0
- {phanterpwa-14.0.10.dist-info → phanterpwa-14.1.0.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
|
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,12 @@ class FormButton(helpers.XmlConstructor):
|
|
271
272
|
|
272
273
|
def _update_content(self):
|
273
274
|
attributes = self.button_attributes
|
275
|
+
uni = window.PhanterPWA.get_id()
|
274
276
|
self.content = [
|
275
|
-
|
276
|
-
|
277
|
-
|
277
|
+
widgets.Button("button_{}".format(uni), self.label, **attributes)
|
278
|
+
# DIV(
|
279
|
+
# DIV(self.label, **attributes),
|
280
|
+
# _class="button-form containeeeer")
|
278
281
|
]
|
279
282
|
|
280
283
|
|
@@ -892,10 +895,9 @@ class ValidateForm():
|
|
892
895
|
validate_test_pass.append(False)
|
893
896
|
if validate_name.startswith("IS_IN_SET:"):
|
894
897
|
res = False
|
895
|
-
list_options =
|
896
|
-
|
898
|
+
list_options = [str(x[1]) for x in widget_instance._data]
|
897
899
|
if list_options is not None or list_options is not js_undefined:
|
898
|
-
if list_options.indexOf(value_for_validate) > -1:
|
900
|
+
if list_options.indexOf(str(value_for_validate)) > -1:
|
899
901
|
res = True
|
900
902
|
validate_test_pass.append(res)
|
901
903
|
|
@@ -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:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
phanterpwa/__init__.py,sha256=
|
1
|
+
phanterpwa/__init__.py,sha256=qlWJKxWMf-3sGjEGHCCWcWW-420CatJnl1ViB2J4iC0,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=9cfoJgwHRJjtglS2PLDiRn6EFsrSL4B9q2U8YWBmTJw,42743
|
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=Jbji71iYHh8zgeqq-D0IW35AK0ki6PYDr5S9hrbo0ZY,263846
|
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
|
@@ -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.0.
|
439
|
-
phanterpwa-14.0.
|
440
|
-
phanterpwa-14.0.
|
441
|
-
phanterpwa-14.0.
|
442
|
-
phanterpwa-14.0.
|
443
|
-
phanterpwa-14.0.
|
444
|
-
phanterpwa-14.0.
|
438
|
+
phanterpwa-14.1.0.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
|
439
|
+
phanterpwa-14.1.0.dist-info/METADATA,sha256=m0ngyQ_M3BJKV0WohwKt3uH2kegf9PHKNj3BsRAhxnI,1938
|
440
|
+
phanterpwa-14.1.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
441
|
+
phanterpwa-14.1.0.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
|
442
|
+
phanterpwa-14.1.0.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
|
443
|
+
phanterpwa-14.1.0.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
|
444
|
+
phanterpwa-14.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|