phanterpwa 13.14.6__py3-none-any.whl → 13.14.8__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 -12
- phanterpwa/tools.py +14 -1
- {phanterpwa-13.14.6.dist-info → phanterpwa-13.14.8.dist-info}/METADATA +1 -1
- {phanterpwa-13.14.6.dist-info → phanterpwa-13.14.8.dist-info}/RECORD +10 -10
- {phanterpwa-13.14.6.dist-info → phanterpwa-13.14.8.dist-info}/LICENSE +0 -0
- {phanterpwa-13.14.6.dist-info → phanterpwa-13.14.8.dist-info}/WHEEL +0 -0
- {phanterpwa-13.14.6.dist-info → phanterpwa-13.14.8.dist-info}/dependency_links.txt +0 -0
- {phanterpwa-13.14.6.dist-info → phanterpwa-13.14.8.dist-info}/entry_points.txt +0 -0
- {phanterpwa-13.14.6.dist-info → phanterpwa-13.14.8.dist-info}/top_level.txt +0 -0
phanterpwa/__init__.py
CHANGED
|
@@ -111,6 +111,10 @@ class Widget(helpers.XmlConstructor):
|
|
|
111
111
|
if window.PhanterPWA.DEBUG:
|
|
112
112
|
console.info("the start not used")
|
|
113
113
|
|
|
114
|
+
def set_value(self, value):
|
|
115
|
+
self._value = value
|
|
116
|
+
self.reload()
|
|
117
|
+
|
|
114
118
|
def validate(self):
|
|
115
119
|
if callable(self._validator):
|
|
116
120
|
error = self._validator(self)
|
|
@@ -144,6 +148,7 @@ class Input(Widget):
|
|
|
144
148
|
self._icon_on_click = parameters.get("icon_on_click", None)
|
|
145
149
|
self._onload = parameters.get("onLoad", None)
|
|
146
150
|
self._checker = parameters.get("checker", True)
|
|
151
|
+
self._tabindex = parameters.get("_tabindex", True)
|
|
147
152
|
self._disabled = parameters.get("disabled", None)
|
|
148
153
|
self._on_date_datetime_choice = parameters.get("onDateorDatetimeChoice", None)
|
|
149
154
|
wrapper_attr = {
|
|
@@ -173,10 +178,9 @@ class Input(Widget):
|
|
|
173
178
|
parameters["_class"] = "{0}{1}".format(parameters["_class"], " e-display_hidden")
|
|
174
179
|
else:
|
|
175
180
|
self._type = "text"
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
# self._maks = masks.phanterCurrency()
|
|
181
|
+
if "_tabindex" in parameters:
|
|
182
|
+
del parameters["_tabindex"]
|
|
183
|
+
|
|
180
184
|
label = ""
|
|
181
185
|
if self._label is not None:
|
|
182
186
|
wrapper_attr["_class"] = "{0}{1}".format(wrapper_attr["_class"], " has_label")
|
|
@@ -221,6 +225,7 @@ class Input(Widget):
|
|
|
221
225
|
"_type": self._type,
|
|
222
226
|
"_data-validators": data_validators,
|
|
223
227
|
"_data-form": self._form,
|
|
228
|
+
"_tabindex": self._tabindex
|
|
224
229
|
}),
|
|
225
230
|
label,
|
|
226
231
|
checker,
|
|
@@ -425,6 +430,7 @@ class Select(Widget):
|
|
|
425
430
|
self._icon_confirm = parameters.get("icon_confirm", I(_class="fas fa-check"))
|
|
426
431
|
self._icon_check = parameters.get("icon_check", I(_class="fas fa-check"))
|
|
427
432
|
self._on_click_new = parameters.get("on_click_new_button", None)
|
|
433
|
+
self._on_change = parameters.get("on_change", None)
|
|
428
434
|
self.set_z_index(parameters.get("z_index", None))
|
|
429
435
|
self.set_recalc_on_scroll(parameters.get("recalc_on_scroll", True))
|
|
430
436
|
xml_icon = ""
|
|
@@ -679,6 +685,8 @@ class Select(Widget):
|
|
|
679
685
|
p.removeClass("has_value")
|
|
680
686
|
p.find("input").trigger("keyup")
|
|
681
687
|
self.validate()
|
|
688
|
+
if callable(self._on_change):
|
|
689
|
+
self._on_change(self)
|
|
682
690
|
|
|
683
691
|
def _on_click_label(self, el):
|
|
684
692
|
el = jQuery(el)
|
|
@@ -2941,7 +2949,7 @@ class Textarea(Widget):
|
|
|
2941
2949
|
text = jQuery(el).val()
|
|
2942
2950
|
split_ = text.split("\n")
|
|
2943
2951
|
if text == "":
|
|
2944
|
-
jQuery(el).css("height",
|
|
2952
|
+
jQuery(el).css("height", 31)
|
|
2945
2953
|
elif len(split_) == 2:
|
|
2946
2954
|
s = 50
|
|
2947
2955
|
if jQuery(el).prop("scrollHeight") > s:
|
|
@@ -2951,7 +2959,7 @@ class Textarea(Widget):
|
|
|
2951
2959
|
elif len(split_) > 2:
|
|
2952
2960
|
jQuery(el).css("height", "auto").css("height", jQuery(el).prop("scrollHeight"))
|
|
2953
2961
|
else:
|
|
2954
|
-
jQuery(el).css("height",
|
|
2962
|
+
jQuery(el).css("height", 31)
|
|
2955
2963
|
# this.style.height = (this.scrollHeight) + 'px';
|
|
2956
2964
|
|
|
2957
2965
|
def _binds(self):
|
|
@@ -2979,13 +2987,13 @@ class Textarea(Widget):
|
|
|
2979
2987
|
"input.textarea_autoresize",
|
|
2980
2988
|
lambda: self._autoresize(this)
|
|
2981
2989
|
)
|
|
2982
|
-
size = target.find("textarea").css("height", 31)
|
|
2990
|
+
size = target.find("textarea").css("height", 31)
|
|
2991
|
+
target.find("textarea").prop('scrollHeight')
|
|
2983
2992
|
target.find("textarea").css("height", size)
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
# });
|
|
2993
|
+
self._autoresize(target.find("textarea"))
|
|
2994
|
+
|
|
2995
|
+
def reload(self):
|
|
2996
|
+
self.start()
|
|
2989
2997
|
|
|
2990
2998
|
def start(self):
|
|
2991
2999
|
self._binds()
|
|
@@ -2997,6 +3005,12 @@ class Textarea(Widget):
|
|
|
2997
3005
|
self._value = jQuery("#phanterpwa-widget-textarea-textarea-{0}".format(self.identifier)).val()
|
|
2998
3006
|
return self._value
|
|
2999
3007
|
|
|
3008
|
+
def set_value(self, value):
|
|
3009
|
+
el = jQuery("#phanterpwa-widget-textarea-textarea-{0}".format(self.identifier))
|
|
3010
|
+
el.val(value)
|
|
3011
|
+
self._value = value
|
|
3012
|
+
el.css("height", 31).height(31)
|
|
3013
|
+
setTimeout(lambda: (self._check_value(el), self.reload()), 100)
|
|
3000
3014
|
|
|
3001
3015
|
class Inert(Widget):
|
|
3002
3016
|
def __init__(self, identifier, **parameters):
|
phanterpwa/tools.py
CHANGED
|
@@ -677,6 +677,19 @@ def text_normalize(text: str, upper: bool = True) -> str:
|
|
|
677
677
|
return normalize('NFKD', text).encode('ascii', 'ignore').decode('ascii')
|
|
678
678
|
|
|
679
679
|
|
|
680
|
+
def filter_for_a_valid_filename(value):
|
|
681
|
+
texto = str(value)
|
|
682
|
+
mini = "ÁÉÍÓÚÀÈÌÒÙÂÊÎÔÛÃÕÄËÏÖÜÇABCDEFGHIJKLMNOPQRSTUVWXYZ áéíóúàèìòùâêîôûãõäëïöüabçcdefghijlmnopqrstuvxzwyk0123456789ªº°[{()}]"
|
|
683
|
+
novo_texto = ""
|
|
684
|
+
for x in texto:
|
|
685
|
+
if x in mini:
|
|
686
|
+
novo_texto = "".join([novo_texto, x])
|
|
687
|
+
else:
|
|
688
|
+
novo_texto = "".join([novo_texto, " "])
|
|
689
|
+
texto = one_space(novo_texto)
|
|
690
|
+
return texto
|
|
691
|
+
|
|
692
|
+
|
|
680
693
|
def string_escape(value):
|
|
681
694
|
r"""Escapes the <,>, ", 'and & characters of a string, when adding an interactable object such as a list,
|
|
682
695
|
a dictionary, tuples and a set it cycles through the values in search of strings recursively, remembering
|
|
@@ -1199,4 +1212,4 @@ class WatchingFiles():
|
|
|
1199
1212
|
else:
|
|
1200
1213
|
del files_delete[ff]
|
|
1201
1214
|
del self._files[ff]
|
|
1202
|
-
time.sleep(1)
|
|
1215
|
+
time.sleep(1)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
phanterpwa/__init__.py,sha256=
|
|
1
|
+
phanterpwa/__init__.py,sha256=Nf2G65z7eZbMC4J9xTw_qQ2BRhWDhWgaPBebIga5bxY,397
|
|
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=O0IO5rf-hwFNdBjcz94OF-fqXKTWbqPElTsfS5V2beY,26327
|
|
@@ -7,7 +7,7 @@ phanterpwa/mail.py,sha256=YrsiIQY_SpqySIc7mi6MfyY881DIsoYAJ5dPAz8vorE,5741
|
|
|
7
7
|
phanterpwa/reversexml.py,sha256=YJeI8VuzEPw0D2z0Cz-HLt2n27WyJawZh6HRNZX5Ujg,10764
|
|
8
8
|
phanterpwa/server.py,sha256=jXqnSfk4fLEgXKaRqiZ3fimcZNbvThKVSbTbJJZYb0E,12247
|
|
9
9
|
phanterpwa/sms.py,sha256=XUULyDSk5gPjBqupchIcaGv-C6kX66XxrXpmzfnSp_A,1313
|
|
10
|
-
phanterpwa/tools.py,sha256=
|
|
10
|
+
phanterpwa/tools.py,sha256=SKwqx_suix-b1DP72a7z98jlnSWDmtGNWgCQq_ogB1I,46173
|
|
11
11
|
phanterpwa/xmlconstructor.py,sha256=DMtc9BXI2NMGGmLszZXh2A63Iv0D1qgoWtn0aKyrmoo,162695
|
|
12
12
|
phanterpwa/backend/__init__.py,sha256=zB8rm2I9O3f448YsuaupgBlAoqZAiVM5vEoWnOOGvdw,68
|
|
13
13
|
phanterpwa/backend/dataforms.py,sha256=HwR8D-4vBNXdN5MSpZmjelo-Az92lVvOTIzpbHnPpsg,64543
|
|
@@ -109,7 +109,7 @@ 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=cSwlwjWtl03bGv645prLAzhpQW3ZJ8-bCt2YsccLUSA,263040
|
|
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
|
|
@@ -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-13.14.
|
|
439
|
-
phanterpwa-13.14.
|
|
440
|
-
phanterpwa-13.14.
|
|
441
|
-
phanterpwa-13.14.
|
|
442
|
-
phanterpwa-13.14.
|
|
443
|
-
phanterpwa-13.14.
|
|
444
|
-
phanterpwa-13.14.
|
|
438
|
+
phanterpwa-13.14.8.dist-info/LICENSE,sha256=lGEW1PRSZOkug2-d0IJgryCjqt6zhxN5x9pFgy3lx2E,1087
|
|
439
|
+
phanterpwa-13.14.8.dist-info/METADATA,sha256=9QblNQBa3_2br8g4LBYEbVP1FZYi6_ki4ZQIGjfWVbY,1939
|
|
440
|
+
phanterpwa-13.14.8.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
441
|
+
phanterpwa-13.14.8.dist-info/dependency_links.txt,sha256=Pslekmz-4l1SpBO0x2aYkYZPCScmbrB9HUq1YvXYUzM,40
|
|
442
|
+
phanterpwa-13.14.8.dist-info/entry_points.txt,sha256=siJH2lFXIdsUBDRgcXV4blOb2_iku1vcbqxJ-trIQrw,56
|
|
443
|
+
phanterpwa-13.14.8.dist-info/top_level.txt,sha256=nF1WJ8AByxBv3bLKp3xySR2l2Twrj5n5n7C404lULSk,5319
|
|
444
|
+
phanterpwa-13.14.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|