collective.z3cform.jsonwidget 2.0.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.
Files changed (58) hide show
  1. collective/z3cform/jsonwidget/__init__.py +6 -0
  2. collective/z3cform/jsonwidget/browser/__init__.py +0 -0
  3. collective/z3cform/jsonwidget/browser/configure.zcml +35 -0
  4. collective/z3cform/jsonwidget/browser/json_widget_input.pt +17 -0
  5. collective/z3cform/jsonwidget/browser/static/dist/jsonwidget.min.css +5 -0
  6. collective/z3cform/jsonwidget/browser/static/dist/jsonwidget.min.css.map +1 -0
  7. collective/z3cform/jsonwidget/browser/static/dist/jsonwidget.min.js +3 -0
  8. collective/z3cform/jsonwidget/browser/static/dist/jsonwidget.min.js.LICENSE.txt +42 -0
  9. collective/z3cform/jsonwidget/browser/static/dist/jsonwidget.min.js.map +1 -0
  10. collective/z3cform/jsonwidget/browser/static/js/ArrayFieldContainer/index.js +17 -0
  11. collective/z3cform/jsonwidget/browser/static/js/EntryColumnContainer/index.js +46 -0
  12. collective/z3cform/jsonwidget/browser/static/js/WidgetContainer/index.js +135 -0
  13. collective/z3cform/jsonwidget/browser/static/js/WidgetDataContainer/index.js +153 -0
  14. collective/z3cform/jsonwidget/browser/static/js/WidgetDataContainer/index.scss +43 -0
  15. collective/z3cform/jsonwidget/browser/static/js/fields/LinesField.js +103 -0
  16. collective/z3cform/jsonwidget/browser/static/js/fields/LinesField.scss +23 -0
  17. collective/z3cform/jsonwidget/browser/static/js/fields/ReferenceField.js +313 -0
  18. collective/z3cform/jsonwidget/browser/static/js/fields/ReferenceField.scss +57 -0
  19. collective/z3cform/jsonwidget/browser/static/js/fields/SelectField.js +49 -0
  20. collective/z3cform/jsonwidget/browser/static/js/fields/TextAreaField.js +20 -0
  21. collective/z3cform/jsonwidget/browser/static/js/fields/TextLineField.js +38 -0
  22. collective/z3cform/jsonwidget/browser/static/js/index.js +35 -0
  23. collective/z3cform/jsonwidget/browser/static/js/utils/i18n.js +41 -0
  24. collective/z3cform/jsonwidget/browser/static/js/utils/widgetContext.js +14 -0
  25. collective/z3cform/jsonwidget/browser/widget.py +77 -0
  26. collective/z3cform/jsonwidget/configure.zcml +54 -0
  27. collective/z3cform/jsonwidget/interfaces.py +7 -0
  28. collective/z3cform/jsonwidget/locales/README.rst +37 -0
  29. collective/z3cform/jsonwidget/locales/__init__.py +0 -0
  30. collective/z3cform/jsonwidget/locales/collective.z3cform.jsonwidget.pot +67 -0
  31. collective/z3cform/jsonwidget/locales/it/LC_MESSAGES/collective.z3cform.jsonwidget.po +69 -0
  32. collective/z3cform/jsonwidget/locales/manual.pot +57 -0
  33. collective/z3cform/jsonwidget/locales/update.py +72 -0
  34. collective/z3cform/jsonwidget/locales/update.sh +12 -0
  35. collective/z3cform/jsonwidget/permissions.zcml +13 -0
  36. collective/z3cform/jsonwidget/profiles/default/browserlayer.xml +6 -0
  37. collective/z3cform/jsonwidget/profiles/default/catalog.xml +4 -0
  38. collective/z3cform/jsonwidget/profiles/default/metadata.xml +7 -0
  39. collective/z3cform/jsonwidget/profiles/default/registry.xml +15 -0
  40. collective/z3cform/jsonwidget/profiles/default/rolemap.xml +7 -0
  41. collective/z3cform/jsonwidget/profiles/to_2000/registry.xml +18 -0
  42. collective/z3cform/jsonwidget/profiles/uninstall/browserlayer.xml +6 -0
  43. collective/z3cform/jsonwidget/profiles/uninstall/registry.xml +18 -0
  44. collective/z3cform/jsonwidget/setuphandlers.py +23 -0
  45. collective/z3cform/jsonwidget/testing.py +51 -0
  46. collective/z3cform/jsonwidget/tests/__init__.py +0 -0
  47. collective/z3cform/jsonwidget/tests/test_setup.py +76 -0
  48. collective/z3cform/jsonwidget/upgrades.py +17 -0
  49. collective/z3cform/jsonwidget/upgrades.zcml +18 -0
  50. collective.z3cform.jsonwidget-2.0.0-py3.11-nspkg.pth +2 -0
  51. collective_z3cform_jsonwidget-2.0.0.dist-info/METADATA +259 -0
  52. collective_z3cform_jsonwidget-2.0.0.dist-info/RECORD +58 -0
  53. collective_z3cform_jsonwidget-2.0.0.dist-info/WHEEL +5 -0
  54. collective_z3cform_jsonwidget-2.0.0.dist-info/entry_points.txt +5 -0
  55. collective_z3cform_jsonwidget-2.0.0.dist-info/licenses/LICENSE.GPL +339 -0
  56. collective_z3cform_jsonwidget-2.0.0.dist-info/licenses/LICENSE.rst +15 -0
  57. collective_z3cform_jsonwidget-2.0.0.dist-info/namespace_packages.txt +2 -0
  58. collective_z3cform_jsonwidget-2.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,6 @@
1
+ """Init and utils."""
2
+
3
+ from zope.i18nmessageid import MessageFactory
4
+
5
+
6
+ _ = MessageFactory("collective.z3cform.jsonwidget")
File without changes
@@ -0,0 +1,35 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:browser="http://namespaces.zope.org/browser"
4
+ xmlns:plone="http://namespaces.plone.org/plone"
5
+ xmlns:z3c="http://namespaces.zope.org/z3c"
6
+ i18n_domain="collective.z3cform.jsonwidget"
7
+ >
8
+
9
+ <plone:static
10
+ directory="static"
11
+ name="collective.z3cform.jsonwidget"
12
+ type="plone"
13
+ />
14
+
15
+ <!-- define new widget -->
16
+ <class class=".widget.JSONWidget">
17
+ <require
18
+ permission="zope.Public"
19
+ interface=".widget.IJSONWidget"
20
+ />
21
+ </class>
22
+
23
+ <adapter
24
+ factory=".widget.JSONFieldWidget"
25
+ for="*
26
+ z3c.form.interfaces.IFormLayer"
27
+ />
28
+
29
+ <z3c:widgetTemplate
30
+ widget=".widget.IJSONWidget"
31
+ template="json_widget_input.pt"
32
+ layer="z3c.form.interfaces.IFormLayer"
33
+ mode="input"
34
+ />
35
+ </configure>
@@ -0,0 +1,17 @@
1
+ <html xmlns="http://www.w3.org/1999/xhtml"
2
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
3
+ tal:omit-tag=""
4
+ >
5
+ <div class="${view/klass}"
6
+ data-schema="${view/get_schema}"
7
+ >
8
+ <input class="widget-field"
9
+ id="${view/id}"
10
+ name="${view/name}"
11
+ type="hidden"
12
+ value="${view/value}"
13
+ />
14
+ <div class="widget-wrapper"></div>
15
+ </div>
16
+
17
+ </html>
@@ -0,0 +1,5 @@
1
+ .array-rows .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0}.array-rows .row input[type=text]{height:auto}.array-rows .row+.row{margin-top:1rem}.array-rows .row .column{margin-right:1rem}.array-rows button.context{margin-top:1rem;font-size:1.25rem}
2
+ .reference-field-wrapper .references{margin-bottom:1rem}.reference-field-wrapper .references .reference{margin-bottom:5px}.reference-field-wrapper .references .reference button{margin-right:.5rem}.ReactModalPortal button.close{float:right}.ReactModalPortal .modal-content-wrapper .modal-breadcrumbs{margin:.5rem 0}.ReactModalPortal .modal-content-wrapper .content-results-wrapper{max-height:calc(95vh - 300px);overflow:scroll;margin:2rem 0}.ReactModalPortal .modal-content-wrapper .content-results-wrapper .content-item{margin:.5rem 0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:36px;border-bottom:1px solid #ccc;padding:.5rem 0}.ReactModalPortal .modal-content-wrapper .content-results-wrapper .content-item .content-title{margin-right:auto;margin-left:.5rem}.ReactModalPortal .modal-content-wrapper .content-results-wrapper .content-item button{font-size:1.5rem;background:rgba(0,0,0,0);border:none}.ReactModalPortal .modal-content-wrapper .content-results-wrapper .content-item button:hover,.ReactModalPortal .modal-content-wrapper .content-results-wrapper .content-item button:focus{background-color:#ccc}
3
+ .json-textarea-widget .data-wrapper .json-row{margin:10px;background-color:#fff;border:1px solid #ccc}.json-textarea-widget .data-wrapper .json-row button{font-size:1.5rem}.json-textarea-widget .data-wrapper .json-row button+strong{margin-left:1.5rem}.json-textarea-widget .data-wrapper .json-row .row-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f3f3f3}.json-textarea-widget .data-wrapper .json-row .row-header strong{margin-right:auto}.json-textarea-widget .data-wrapper .json-row .row-header .actions button{margin-left:.5rem}.json-textarea-widget .data-wrapper .json-row .row-content{padding:0 1rem 1rem}.json-textarea-widget .data-wrapper .json-row .row-content .column.block{padding-top:1.5rem}.json-textarea-widget .data-wrapper .data-footer{padding:10px}.json-textarea-widget .data-wrapper .data-footer button.context{font-size:1.5rem}
4
+
5
+ /*# sourceMappingURL=jsonwidget.min.css.map*/
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonwidget.min.css","mappings":"AACI,iBACI,qDACA,kEACA,SAEA,kCACI,YAGJ,sBACI,gBAEJ,yBACI,kBAIR,2BACI,gBACA,kB;ACnBJ,qCACI,mBAEA,gDACI,kBACA,uDACI,mBAOZ,+BACI,YAIA,4DACI,eAGJ,kEACI,8BACA,gBACA,cAEA,gFACI,eACA,qDACA,kEACA,gBACA,6BACA,gBACA,+FACI,kBACA,kBAGJ,uFACI,iBACA,yBACA,YACA,0LAEI,sB;AC5ChB,8CACI,YACA,sBACA,sBACA,qDACI,iBAEA,4DACI,mBAGR,0DACI,qDACA,aACA,kEACA,yBAEA,iEACI,kBAEJ,0EACI,kBAGR,2DACI,oBACA,yEACI,mBAKZ,iDACI,aAEA,gEACI,iB","sources":["webpack://collective.z3cform.jsonwidget/./src/collective/z3cform/jsonwidget/browser/static/js/fields/LinesField.scss","webpack://collective.z3cform.jsonwidget/./src/collective/z3cform/jsonwidget/browser/static/js/fields/ReferenceField.scss","webpack://collective.z3cform.jsonwidget/./src/collective/z3cform/jsonwidget/browser/static/js/WidgetDataContainer/index.scss"],"sourcesContent":[".array-rows {\n .row {\n display: flex;\n align-items: center;\n margin: 0;\n\n input[type='text'] {\n height: auto;\n }\n\n + .row {\n margin-top: 1rem;\n }\n .column {\n margin-right: 1rem;\n }\n }\n\n button.context {\n margin-top: 1rem;\n font-size: 1.25rem;\n }\n}\n",".reference-field-wrapper {\n .references {\n margin-bottom: 1rem;\n\n .reference {\n margin-bottom: 5px;\n button {\n margin-right: 0.5rem;\n }\n }\n }\n}\n\n.ReactModalPortal {\n button.close {\n float: right;\n }\n\n .modal-content-wrapper {\n .modal-breadcrumbs {\n margin: 0.5rem 0;\n }\n\n .content-results-wrapper {\n max-height: calc(95vh - 300px);\n overflow: scroll;\n margin: 2rem 0;\n\n .content-item {\n margin: 0.5rem 0;\n display: flex;\n align-items: center;\n min-height: 36px;\n border-bottom: 1px solid #ccc;\n padding: 0.5rem 0;\n .content-title {\n margin-right: auto;\n margin-left: 0.5rem;\n }\n\n button {\n font-size: 1.5rem;\n background: transparent;\n border: none;\n &:hover,\n &:focus {\n background-color: #ccc;\n }\n }\n\n // &.selected-item {\n // background-color: #efefef;\n // }\n }\n }\n }\n}\n",".json-textarea-widget {\n .data-wrapper {\n .json-row {\n margin: 10px;\n background-color: #fff;\n border: 1px solid #ccc;\n button {\n font-size: 1.5rem;\n\n + strong {\n margin-left: 1.5rem;\n }\n }\n .row-header {\n display: flex;\n padding: 10px;\n align-items: center;\n background-color: #f3f3f3;\n\n strong {\n margin-right: auto;\n }\n .actions button {\n margin-left: 0.5rem;\n }\n }\n .row-content {\n padding: 0 1rem 1rem;\n .column.block {\n padding-top: 1.5rem;\n }\n }\n }\n\n .data-footer {\n padding: 10px;\n\n button.context {\n font-size: 1.5rem;\n }\n }\n }\n}\n"],"names":[],"sourceRoot":""}