@hrbolek/uoisfrontend-template 0.6.0
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.
- package/index.html +104 -0
- package/package.json +24 -0
- package/src/Base/Components/Attribute.jsx +51 -0
- package/src/Base/Components/CardCapsule.jsx +353 -0
- package/src/Base/Components/Col.jsx +36 -0
- package/src/Base/Components/ConfirmEdit.jsx +61 -0
- package/src/Base/Components/CopyButton.jsx +33 -0
- package/src/Base/Components/LargeCard.jsx +22 -0
- package/src/Base/Components/Link.jsx +42 -0
- package/src/Base/Components/LiveEdit.jsx +64 -0
- package/src/Base/Components/MediumCard.jsx +30 -0
- package/src/Base/Components/MediumContent.jsx +74 -0
- package/src/Base/Components/MediumEditableContent.jsx +52 -0
- package/src/Base/Components/ProxyLink.jsx +132 -0
- package/src/Base/Components/Row.jsx +23 -0
- package/src/Base/Components/Table.jsx +275 -0
- package/src/Base/Components/index.js +14 -0
- package/src/Base/Components/style.js +278 -0
- package/src/Base/FormControls/Collapsible.jsx +46 -0
- package/src/Base/FormControls/Dialog.jsx +75 -0
- package/src/Base/FormControls/EntityLookup.jsx +175 -0
- package/src/Base/FormControls/Filter.jsx +834 -0
- package/src/Base/FormControls/Input.jsx +163 -0
- package/src/Base/FormControls/Label.jsx +40 -0
- package/src/Base/FormControls/Select.jsx +150 -0
- package/src/Base/FormControls/TextArea.jsx +86 -0
- package/src/Base/FormControls/index.js +8 -0
- package/src/Base/Helpers/AsyncStateIndicator.jsx +9 -0
- package/src/Base/Helpers/GQLEntityProvider.jsx +163 -0
- package/src/Base/Helpers/NavigationHistoryProvider.jsx +178 -0
- package/src/Base/Helpers/PlaceChild.jsx +13 -0
- package/src/Base/Helpers/generateQuery.js +508 -0
- package/src/Base/Helpers/index.js +5 -0
- package/src/Base/Mutations/Create.jsx +152 -0
- package/src/Base/Mutations/Delete.jsx +237 -0
- package/src/Base/Mutations/General.jsx +241 -0
- package/src/Base/Mutations/InteractiveMutations.jsx +32 -0
- package/src/Base/Mutations/Update.jsx +270 -0
- package/src/Base/Mutations/helpers.jsx +7 -0
- package/src/Base/Mutations/index.js +5 -0
- package/src/Base/Pages/Page.jsx +235 -0
- package/src/Base/Pages/PageCatch.jsx +235 -0
- package/src/Base/Pages/PageNavbar.jsx +70 -0
- package/src/Base/Pages/PageVector.jsx +229 -0
- package/src/Base/Pages/RouterSegment.jsx +66 -0
- package/src/Base/Pages/index.js +5 -0
- package/src/Base/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/Base/Queries/Fragments.jsx +101 -0
- package/src/Base/Queries/InsertAsyncAction.jsx +40 -0
- package/src/Base/Queries/ReadAsyncAction.jsx +44 -0
- package/src/Base/Queries/ReadPageAsyncAction.jsx +16 -0
- package/src/Base/Queries/SearchAsyncAction.jsx +16 -0
- package/src/Base/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/Base/Queries/index.js +6 -0
- package/src/Base/Scalars/ScalarAttribute.jsx +49 -0
- package/src/Base/Scalars/index.js +1 -0
- package/src/Base/Vectors/VectorAttribute.jsx +137 -0
- package/src/Base/Vectors/index.js +1 -0
- package/src/Base/index.js +32 -0
- package/src/GroupGQLModel/Components/CUDButton.jsx +128 -0
- package/src/GroupGQLModel/Components/CardCapsule.jsx +44 -0
- package/src/GroupGQLModel/Components/Children.jsx +31 -0
- package/src/GroupGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/GroupGQLModel/Components/Filter.jsx +14 -0
- package/src/GroupGQLModel/Components/LargeCard.jsx +68 -0
- package/src/GroupGQLModel/Components/Link.jsx +54 -0
- package/src/GroupGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/GroupGQLModel/Components/MediumCard.jsx +51 -0
- package/src/GroupGQLModel/Components/MediumContent.jsx +56 -0
- package/src/GroupGQLModel/Components/MediumEditableContent.jsx +52 -0
- package/src/GroupGQLModel/Components/Table.jsx +70 -0
- package/src/GroupGQLModel/Components/index.js +14 -0
- package/src/GroupGQLModel/Mutations/AddMembership.jsx +156 -0
- package/src/GroupGQLModel/Mutations/Create.jsx +67 -0
- package/src/GroupGQLModel/Mutations/Delete.jsx +81 -0
- package/src/GroupGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/GroupGQLModel/Mutations/Update.jsx +74 -0
- package/src/GroupGQLModel/Pages/PageBase.jsx +56 -0
- package/src/GroupGQLModel/Pages/PageCreateItem.jsx +27 -0
- package/src/GroupGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/GroupGQLModel/Pages/PageNavbar.jsx +264 -0
- package/src/GroupGQLModel/Pages/PageReadItem.jsx +12 -0
- package/src/GroupGQLModel/Pages/PageReadItemEx.jsx +57 -0
- package/src/GroupGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/GroupGQLModel/Pages/PageVector.jsx +80 -0
- package/src/GroupGQLModel/Pages/RouterSegment.jsx +85 -0
- package/src/GroupGQLModel/Pages/index.js +2 -0
- package/src/GroupGQLModel/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/GroupGQLModel/Queries/Fragments.jsx +129 -0
- package/src/GroupGQLModel/Queries/InsertAsyncAction.jsx +43 -0
- package/src/GroupGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/GroupGQLModel/Queries/ReadPageAsyncAction.jsx +18 -0
- package/src/GroupGQLModel/Queries/SearchAsyncAction.jsx +15 -0
- package/src/GroupGQLModel/Queries/UpdateAsyncAction.jsx +56 -0
- package/src/GroupGQLModel/Queries/index.js +6 -0
- package/src/GroupGQLModel/Scalars/GroupRoles.jsx +69 -0
- package/src/GroupGQLModel/Scalars/MasterGroup.jsx +15 -0
- package/src/GroupGQLModel/Scalars/RBACObject.jsx +233 -0
- package/src/GroupGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/GroupGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/GroupGQLModel/Scalars/index.js +1 -0
- package/src/GroupGQLModel/Vectors/GroupMemberships.jsx +115 -0
- package/src/GroupGQLModel/Vectors/GroupRoles.jsx +112 -0
- package/src/GroupGQLModel/Vectors/GroupRolesOn.jsx +113 -0
- package/src/GroupGQLModel/Vectors/GroupSubgroups.jsx +97 -0
- package/src/GroupGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/GroupGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/GroupGQLModel/Vectors/index.js +1 -0
- package/src/GroupGQLModel/index.js +7 -0
- package/src/GroupTypeGQLModel/Components/CUDButton.jsx +128 -0
- package/src/GroupTypeGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/GroupTypeGQLModel/Components/Children.jsx +31 -0
- package/src/GroupTypeGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/GroupTypeGQLModel/Components/Filter.jsx +14 -0
- package/src/GroupTypeGQLModel/Components/LargeCard.jsx +49 -0
- package/src/GroupTypeGQLModel/Components/Link.jsx +53 -0
- package/src/GroupTypeGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/GroupTypeGQLModel/Components/MediumCard.jsx +39 -0
- package/src/GroupTypeGQLModel/Components/MediumContent.jsx +97 -0
- package/src/GroupTypeGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/GroupTypeGQLModel/Components/Table.jsx +7 -0
- package/src/GroupTypeGQLModel/Components/index.js +14 -0
- package/src/GroupTypeGQLModel/Mutations/Create.jsx +67 -0
- package/src/GroupTypeGQLModel/Mutations/Delete.jsx +80 -0
- package/src/GroupTypeGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/GroupTypeGQLModel/Mutations/Update.jsx +74 -0
- package/src/GroupTypeGQLModel/Pages/Page.jsx +3 -0
- package/src/GroupTypeGQLModel/Pages/PageBase.jsx +26 -0
- package/src/GroupTypeGQLModel/Pages/PageCreateItem.jsx +21 -0
- package/src/GroupTypeGQLModel/Pages/PageDeleteItem.jsx +13 -0
- package/src/GroupTypeGQLModel/Pages/PageNavbar.jsx +148 -0
- package/src/GroupTypeGQLModel/Pages/PageReadItem.jsx +28 -0
- package/src/GroupTypeGQLModel/Pages/PageUpdateItem.jsx +25 -0
- package/src/GroupTypeGQLModel/Pages/PageVector.jsx +83 -0
- package/src/GroupTypeGQLModel/Pages/RouterSegment.jsx +68 -0
- package/src/GroupTypeGQLModel/Pages/index.js +10 -0
- package/src/GroupTypeGQLModel/Queries/DeleteAsyncAction.jsx +27 -0
- package/src/GroupTypeGQLModel/Queries/Fragments.jsx +96 -0
- package/src/GroupTypeGQLModel/Queries/InsertAsyncAction.jsx +41 -0
- package/src/GroupTypeGQLModel/Queries/ReadAsyncAction.jsx +45 -0
- package/src/GroupTypeGQLModel/Queries/ReadPageAsyncAction.jsx +14 -0
- package/src/GroupTypeGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/GroupTypeGQLModel/Queries/UpdateAsyncAction.jsx +42 -0
- package/src/GroupTypeGQLModel/Queries/index.js +6 -0
- package/src/GroupTypeGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/GroupTypeGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/GroupTypeGQLModel/Scalars/index.js +1 -0
- package/src/GroupTypeGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/GroupTypeGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/GroupTypeGQLModel/Vectors/index.js +1 -0
- package/src/GroupTypeGQLModel/index.js +6 -0
- package/src/MembershipGQLModel/Components/CUDButton.jsx +128 -0
- package/src/MembershipGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/MembershipGQLModel/Components/Children.jsx +31 -0
- package/src/MembershipGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/MembershipGQLModel/Components/Filter.jsx +14 -0
- package/src/MembershipGQLModel/Components/LargeCard.jsx +49 -0
- package/src/MembershipGQLModel/Components/Link.jsx +54 -0
- package/src/MembershipGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/MembershipGQLModel/Components/MediumCard.jsx +39 -0
- package/src/MembershipGQLModel/Components/MediumContent.jsx +97 -0
- package/src/MembershipGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/MembershipGQLModel/Components/Table.jsx +7 -0
- package/src/MembershipGQLModel/Components/index.js +14 -0
- package/src/MembershipGQLModel/Mutations/Create.jsx +67 -0
- package/src/MembershipGQLModel/Mutations/Delete.jsx +80 -0
- package/src/MembershipGQLModel/Mutations/InteractiveMutations.jsx +31 -0
- package/src/MembershipGQLModel/Mutations/Update.jsx +74 -0
- package/src/MembershipGQLModel/Mutations/helpers.jsx +7 -0
- package/src/MembershipGQLModel/Pages/PageBase.jsx +57 -0
- package/src/MembershipGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/MembershipGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/MembershipGQLModel/Pages/PageNavbar.jsx +110 -0
- package/src/MembershipGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/MembershipGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/MembershipGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/MembershipGQLModel/Pages/PageVector.jsx +80 -0
- package/src/MembershipGQLModel/Pages/RouterSegment.jsx +73 -0
- package/src/MembershipGQLModel/Pages/index.js +2 -0
- package/src/MembershipGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/MembershipGQLModel/Queries/Fragments.jsx +113 -0
- package/src/MembershipGQLModel/Queries/InsertAsyncAction.jsx +38 -0
- package/src/MembershipGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/MembershipGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/MembershipGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/MembershipGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/MembershipGQLModel/Queries/index.js +6 -0
- package/src/MembershipGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/MembershipGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/MembershipGQLModel/Scalars/index.js +1 -0
- package/src/MembershipGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/MembershipGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/MembershipGQLModel/Vectors/index.js +1 -0
- package/src/MembershipGQLModel/WhatToDo.md +44 -0
- package/src/MembershipGQLModel/index.js +6 -0
- package/src/RBACGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/RBACGQLModel/Components/Children.jsx +31 -0
- package/src/RBACGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/RBACGQLModel/Components/Filter.jsx +14 -0
- package/src/RBACGQLModel/Components/LargeCard.jsx +50 -0
- package/src/RBACGQLModel/Components/Link.jsx +54 -0
- package/src/RBACGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/RBACGQLModel/Components/MediumCard.jsx +39 -0
- package/src/RBACGQLModel/Components/MediumContent.jsx +96 -0
- package/src/RBACGQLModel/Components/MediumEditableContent.jsx +212 -0
- package/src/RBACGQLModel/Components/Table.jsx +7 -0
- package/src/RBACGQLModel/Components/index.js +13 -0
- package/src/RBACGQLModel/Mutations/Create.jsx +202 -0
- package/src/RBACGQLModel/Mutations/Delete.jsx +173 -0
- package/src/RBACGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/RBACGQLModel/Mutations/Update.jsx +147 -0
- package/src/RBACGQLModel/Mutations/helpers.jsx +7 -0
- package/src/RBACGQLModel/Pages/PageBase.jsx +56 -0
- package/src/RBACGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/RBACGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/RBACGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/RBACGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/RBACGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/RBACGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/RBACGQLModel/Pages/PageVector.jsx +80 -0
- package/src/RBACGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/RBACGQLModel/Pages/index.js +2 -0
- package/src/RBACGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/RBACGQLModel/Queries/Fragments.jsx +101 -0
- package/src/RBACGQLModel/Queries/InsertAsyncAction.jsx +40 -0
- package/src/RBACGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/RBACGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/RBACGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/RBACGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/RBACGQLModel/Queries/index.js +6 -0
- package/src/RBACGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/RBACGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/RBACGQLModel/Scalars/index.js +1 -0
- package/src/RBACGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/RBACGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/RBACGQLModel/Vectors/index.js +1 -0
- package/src/RBACGQLModel/WhatToDo.md +44 -0
- package/src/RBACGQLModel/index.js +71 -0
- package/src/RoleGQLModel/Components/CUDButton.jsx +128 -0
- package/src/RoleGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/RoleGQLModel/Components/Children.jsx +31 -0
- package/src/RoleGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/RoleGQLModel/Components/Filter.jsx +14 -0
- package/src/RoleGQLModel/Components/LargeCard.jsx +49 -0
- package/src/RoleGQLModel/Components/Link.jsx +55 -0
- package/src/RoleGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/RoleGQLModel/Components/MediumCard.jsx +39 -0
- package/src/RoleGQLModel/Components/MediumContent.jsx +97 -0
- package/src/RoleGQLModel/Components/MediumEditableContent.jsx +72 -0
- package/src/RoleGQLModel/Components/RBACObject.jsx +22 -0
- package/src/RoleGQLModel/Components/Table.jsx +82 -0
- package/src/RoleGQLModel/Components/index.js +14 -0
- package/src/RoleGQLModel/Mutations/AddRoleOnGroup.jsx +117 -0
- package/src/RoleGQLModel/Mutations/Create.jsx +67 -0
- package/src/RoleGQLModel/Mutations/Delete.jsx +80 -0
- package/src/RoleGQLModel/Mutations/InteractiveMutations.jsx +31 -0
- package/src/RoleGQLModel/Mutations/Update.jsx +74 -0
- package/src/RoleGQLModel/Pages/Page.jsx +3 -0
- package/src/RoleGQLModel/Pages/PageBase.jsx +26 -0
- package/src/RoleGQLModel/Pages/PageContent.jsx +31 -0
- package/src/RoleGQLModel/Pages/PageCreateItem.jsx +21 -0
- package/src/RoleGQLModel/Pages/PageDeleteItem.jsx +13 -0
- package/src/RoleGQLModel/Pages/PageNavbar.jsx +161 -0
- package/src/RoleGQLModel/Pages/PageReadItem.jsx +28 -0
- package/src/RoleGQLModel/Pages/PageUpdateItem.jsx +25 -0
- package/src/RoleGQLModel/Pages/PageVector.jsx +83 -0
- package/src/RoleGQLModel/Pages/RouterSegment.jsx +69 -0
- package/src/RoleGQLModel/Pages/index.js +10 -0
- package/src/RoleGQLModel/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/RoleGQLModel/Queries/Fragments.jsx +123 -0
- package/src/RoleGQLModel/Queries/InsertAsyncAction.jsx +45 -0
- package/src/RoleGQLModel/Queries/ReadAsyncAction.jsx +45 -0
- package/src/RoleGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/RoleGQLModel/Queries/UpdateAsyncAction.jsx +35 -0
- package/src/RoleGQLModel/Queries/index.js +6 -0
- package/src/RoleGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/RoleGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/RoleGQLModel/Scalars/index.js +1 -0
- package/src/RoleGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/RoleGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/RoleGQLModel/Vectors/index.js +1 -0
- package/src/RoleGQLModel/index.js +6 -0
- package/src/RoleTypeGQLModel/Components/CUDButton.jsx +128 -0
- package/src/RoleTypeGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/RoleTypeGQLModel/Components/Children.jsx +31 -0
- package/src/RoleTypeGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/RoleTypeGQLModel/Components/Filter.jsx +14 -0
- package/src/RoleTypeGQLModel/Components/LargeCard.jsx +49 -0
- package/src/RoleTypeGQLModel/Components/Link.jsx +55 -0
- package/src/RoleTypeGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/RoleTypeGQLModel/Components/MediumCard.jsx +39 -0
- package/src/RoleTypeGQLModel/Components/MediumContent.jsx +97 -0
- package/src/RoleTypeGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/RoleTypeGQLModel/Components/Table.jsx +7 -0
- package/src/RoleTypeGQLModel/Components/index.js +14 -0
- package/src/RoleTypeGQLModel/Mutations/Create.jsx +67 -0
- package/src/RoleTypeGQLModel/Mutations/Delete.jsx +80 -0
- package/src/RoleTypeGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/RoleTypeGQLModel/Mutations/Update.jsx +74 -0
- package/src/RoleTypeGQLModel/Pages/Page.jsx +3 -0
- package/src/RoleTypeGQLModel/Pages/PageBase.jsx +56 -0
- package/src/RoleTypeGQLModel/Pages/PageCreateItem.jsx +27 -0
- package/src/RoleTypeGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/RoleTypeGQLModel/Pages/PageNavbar.jsx +148 -0
- package/src/RoleTypeGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/RoleTypeGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/RoleTypeGQLModel/Pages/PageVector.jsx +79 -0
- package/src/RoleTypeGQLModel/Pages/RouterSegment.jsx +69 -0
- package/src/RoleTypeGQLModel/Pages/index.js +10 -0
- package/src/RoleTypeGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/RoleTypeGQLModel/Queries/Fragments.jsx +103 -0
- package/src/RoleTypeGQLModel/Queries/InsertAsyncAction.jsx +40 -0
- package/src/RoleTypeGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/RoleTypeGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/RoleTypeGQLModel/Queries/SearchAsyncAction.jsx +29 -0
- package/src/RoleTypeGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/RoleTypeGQLModel/Queries/index.js +6 -0
- package/src/RoleTypeGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/RoleTypeGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/RoleTypeGQLModel/Scalars/index.js +1 -0
- package/src/RoleTypeGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/RoleTypeGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/RoleTypeGQLModel/Vectors/index.js +1 -0
- package/src/RoleTypeGQLModel/index.js +6 -0
- package/src/StateGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/StateGQLModel/Components/Children.jsx +31 -0
- package/src/StateGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/StateGQLModel/Components/Filter.jsx +14 -0
- package/src/StateGQLModel/Components/LargeCard.jsx +50 -0
- package/src/StateGQLModel/Components/Link.jsx +54 -0
- package/src/StateGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/StateGQLModel/Components/MediumCard.jsx +39 -0
- package/src/StateGQLModel/Components/MediumContent.jsx +96 -0
- package/src/StateGQLModel/Components/MediumEditableContent.jsx +36 -0
- package/src/StateGQLModel/Components/Table.jsx +7 -0
- package/src/StateGQLModel/Components/index.js +13 -0
- package/src/StateGQLModel/Mutations/Create.jsx +79 -0
- package/src/StateGQLModel/Mutations/Delete.jsx +87 -0
- package/src/StateGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/StateGQLModel/Mutations/Update.jsx +76 -0
- package/src/StateGQLModel/Mutations/helpers.jsx +7 -0
- package/src/StateGQLModel/Pages/PageBase.jsx +56 -0
- package/src/StateGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/StateGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/StateGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/StateGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/StateGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/StateGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/StateGQLModel/Pages/PageVector.jsx +80 -0
- package/src/StateGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/StateGQLModel/Pages/index.js +2 -0
- package/src/StateGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/StateGQLModel/Queries/Fragments.jsx +109 -0
- package/src/StateGQLModel/Queries/InsertAsyncAction.jsx +104 -0
- package/src/StateGQLModel/Queries/ReadAsyncAction.jsx +48 -0
- package/src/StateGQLModel/Queries/ReadPageAsyncAction.jsx +23 -0
- package/src/StateGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/StateGQLModel/Queries/UpdateAsyncAction.jsx +106 -0
- package/src/StateGQLModel/Queries/index.js +6 -0
- package/src/StateGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/StateGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/StateGQLModel/Scalars/index.js +1 -0
- package/src/StateGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/StateGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/StateGQLModel/Vectors/index.js +1 -0
- package/src/StateGQLModel/index.js +71 -0
- package/src/StateMachineGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/StateMachineGQLModel/Components/Children.jsx +31 -0
- package/src/StateMachineGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/StateMachineGQLModel/Components/Filter.jsx +14 -0
- package/src/StateMachineGQLModel/Components/LargeCard.jsx +50 -0
- package/src/StateMachineGQLModel/Components/Link.jsx +54 -0
- package/src/StateMachineGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/StateMachineGQLModel/Components/MediumCard.jsx +39 -0
- package/src/StateMachineGQLModel/Components/MediumContent.jsx +96 -0
- package/src/StateMachineGQLModel/Components/MediumEditableContent.jsx +989 -0
- package/src/StateMachineGQLModel/Components/Table.jsx +7 -0
- package/src/StateMachineGQLModel/Components/index.js +13 -0
- package/src/StateMachineGQLModel/Mutations/Create.jsx +79 -0
- package/src/StateMachineGQLModel/Mutations/Delete.jsx +80 -0
- package/src/StateMachineGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/StateMachineGQLModel/Mutations/Update.jsx +74 -0
- package/src/StateMachineGQLModel/Mutations/helpers.jsx +7 -0
- package/src/StateMachineGQLModel/Pages/PageBase.jsx +56 -0
- package/src/StateMachineGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/StateMachineGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/StateMachineGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/StateMachineGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/StateMachineGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/StateMachineGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/StateMachineGQLModel/Pages/PageVector.jsx +80 -0
- package/src/StateMachineGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/StateMachineGQLModel/Pages/index.js +2 -0
- package/src/StateMachineGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/StateMachineGQLModel/Queries/Fragments.jsx +148 -0
- package/src/StateMachineGQLModel/Queries/InsertAsyncAction.jsx +44 -0
- package/src/StateMachineGQLModel/Queries/ReadAsyncAction.jsx +48 -0
- package/src/StateMachineGQLModel/Queries/ReadPageAsyncAction.jsx +23 -0
- package/src/StateMachineGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/StateMachineGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/StateMachineGQLModel/Queries/index.js +6 -0
- package/src/StateMachineGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/StateMachineGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/StateMachineGQLModel/Scalars/index.js +1 -0
- package/src/StateMachineGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/StateMachineGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/StateMachineGQLModel/Vectors/index.js +1 -0
- package/src/StateMachineGQLModel/WhatToDo.md +44 -0
- package/src/StateMachineGQLModel/index.js +71 -0
- package/src/StateTransitionGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/StateTransitionGQLModel/Components/Children.jsx +31 -0
- package/src/StateTransitionGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/StateTransitionGQLModel/Components/Filter.jsx +14 -0
- package/src/StateTransitionGQLModel/Components/LargeCard.jsx +50 -0
- package/src/StateTransitionGQLModel/Components/Link.jsx +54 -0
- package/src/StateTransitionGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/StateTransitionGQLModel/Components/MediumCard.jsx +39 -0
- package/src/StateTransitionGQLModel/Components/MediumContent.jsx +96 -0
- package/src/StateTransitionGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/StateTransitionGQLModel/Components/Table.jsx +7 -0
- package/src/StateTransitionGQLModel/Components/index.js +13 -0
- package/src/StateTransitionGQLModel/Mutations/Create.jsx +79 -0
- package/src/StateTransitionGQLModel/Mutations/Delete.jsx +80 -0
- package/src/StateTransitionGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/StateTransitionGQLModel/Mutations/Update.jsx +75 -0
- package/src/StateTransitionGQLModel/Mutations/helpers.jsx +7 -0
- package/src/StateTransitionGQLModel/Pages/PageBase.jsx +56 -0
- package/src/StateTransitionGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/StateTransitionGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/StateTransitionGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/StateTransitionGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/StateTransitionGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/StateTransitionGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/StateTransitionGQLModel/Pages/PageVector.jsx +80 -0
- package/src/StateTransitionGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/StateTransitionGQLModel/Pages/index.js +2 -0
- package/src/StateTransitionGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/StateTransitionGQLModel/Queries/Fragments.jsx +150 -0
- package/src/StateTransitionGQLModel/Queries/InsertAsyncAction.jsx +107 -0
- package/src/StateTransitionGQLModel/Queries/ReadAsyncAction.jsx +48 -0
- package/src/StateTransitionGQLModel/Queries/ReadPageAsyncAction.jsx +23 -0
- package/src/StateTransitionGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/StateTransitionGQLModel/Queries/UpdateAsyncAction.jsx +109 -0
- package/src/StateTransitionGQLModel/Queries/index.js +6 -0
- package/src/StateTransitionGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/StateTransitionGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/StateTransitionGQLModel/Scalars/index.js +1 -0
- package/src/StateTransitionGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/StateTransitionGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/StateTransitionGQLModel/Vectors/index.js +1 -0
- package/src/StateTransitionGQLModel/WhatToDo.md +44 -0
- package/src/StateTransitionGQLModel/index.js +71 -0
- package/src/Template/Attributes/TemplateTrivialAttribute.jsx +21 -0
- package/src/Template/Attributes/index.js +1 -0
- package/src/Template/Components/CUDButton.jsx +128 -0
- package/src/Template/Components/CardCapsule.jsx +43 -0
- package/src/Template/Components/Children.jsx +31 -0
- package/src/Template/Components/ConfirmEdit.jsx +61 -0
- package/src/Template/Components/LargeCard.jsx +48 -0
- package/src/Template/Components/Link.jsx +41 -0
- package/src/Template/Components/LiveEdit.jsx +111 -0
- package/src/Template/Components/MediumCard.jsx +39 -0
- package/src/Template/Components/MediumContent.jsx +97 -0
- package/src/Template/Components/MediumEditableContent.jsx +36 -0
- package/src/Template/Components/Table.jsx +7 -0
- package/src/Template/Components/index.js +14 -0
- package/src/Template/Pages/Page.jsx +28 -0
- package/src/Template/Pages/PageCapsule.jsx +13 -0
- package/src/Template/Pages/PageContent.jsx +34 -0
- package/src/Template/Pages/PageEdit.jsx +17 -0
- package/src/Template/Pages/PageNavbar.jsx +110 -0
- package/src/Template/Pages/RouterSegment.jsx +52 -0
- package/src/Template/Pages/VectorPage.jsx +133 -0
- package/src/Template/Pages/index.js +6 -0
- package/src/Template/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/Template/Queries/Fragments.jsx +92 -0
- package/src/Template/Queries/InsertAsyncAction.jsx +22 -0
- package/src/Template/Queries/ReadAsyncAction.jsx +45 -0
- package/src/Template/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/Template/Queries/UpdateAsyncAction.jsx +76 -0
- package/src/Template/Queries/index.js +6 -0
- package/src/Template/Scalars/ScalarAttribute.jsx +54 -0
- package/src/Template/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/Template/Scalars/index.js +1 -0
- package/src/Template/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/Template/Vectors/VectorAttribute.jsx +56 -0
- package/src/Template/Vectors/index.js +1 -0
- package/src/Template/index.js +71 -0
- package/src/UserGQLModel/Components/CUDButton.jsx +128 -0
- package/src/UserGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/UserGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/UserGQLModel/Components/Filter.jsx +15 -0
- package/src/UserGQLModel/Components/LargeCard.jsx +82 -0
- package/src/UserGQLModel/Components/Link.jsx +54 -0
- package/src/UserGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/UserGQLModel/Components/MediumCard.jsx +40 -0
- package/src/UserGQLModel/Components/MediumContent.jsx +43 -0
- package/src/UserGQLModel/Components/MediumEditableContent.jsx +57 -0
- package/src/UserGQLModel/Components/Table.jsx +7 -0
- package/src/UserGQLModel/Components/index.js +13 -0
- package/src/UserGQLModel/Mutations/AddMembership.jsx +136 -0
- package/src/UserGQLModel/Mutations/Create.jsx +68 -0
- package/src/UserGQLModel/Mutations/Delete.jsx +81 -0
- package/src/UserGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/UserGQLModel/Mutations/Update.jsx +68 -0
- package/src/UserGQLModel/Mutations/helpers.jsx +7 -0
- package/src/UserGQLModel/Pages/PageAddMembership.jsx +15 -0
- package/src/UserGQLModel/Pages/PageBase.jsx +56 -0
- package/src/UserGQLModel/Pages/PageCreateItem.jsx +27 -0
- package/src/UserGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/UserGQLModel/Pages/PageNavbar.jsx +146 -0
- package/src/UserGQLModel/Pages/PageReadItem.jsx +12 -0
- package/src/UserGQLModel/Pages/PageReadItemEx.jsx +62 -0
- package/src/UserGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/UserGQLModel/Pages/PageVector.jsx +78 -0
- package/src/UserGQLModel/Pages/RouterSegment.jsx +77 -0
- package/src/UserGQLModel/Pages/index.js +9 -0
- package/src/UserGQLModel/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/UserGQLModel/Queries/Fragments.jsx +114 -0
- package/src/UserGQLModel/Queries/InsertAsyncAction.jsx +22 -0
- package/src/UserGQLModel/Queries/ReadAsyncAction.jsx +45 -0
- package/src/UserGQLModel/Queries/ReadPageAsyncAction.jsx +17 -0
- package/src/UserGQLModel/Queries/SearchAsyncAction.jsx +15 -0
- package/src/UserGQLModel/Queries/UpdateAsyncAction.jsx +76 -0
- package/src/UserGQLModel/Queries/index.js +6 -0
- package/src/UserGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/UserGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/UserGQLModel/Scalars/index.js +1 -0
- package/src/UserGQLModel/Vectors/Roles.jsx +23 -0
- package/src/UserGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/UserGQLModel/Vectors/UserMemberships.jsx +56 -0
- package/src/UserGQLModel/Vectors/UserRoles.jsx +81 -0
- package/src/UserGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/UserGQLModel/Vectors/index.js +1 -0
- package/src/UserGQLModel/index.js +6 -0
- package/src/_Template/Components/CardCapsule.jsx +43 -0
- package/src/_Template/Components/Children.jsx +31 -0
- package/src/_Template/Components/ConfirmEdit.jsx +61 -0
- package/src/_Template/Components/Filter.jsx +14 -0
- package/src/_Template/Components/LargeCard.jsx +50 -0
- package/src/_Template/Components/Link.jsx +54 -0
- package/src/_Template/Components/LiveEdit.jsx +111 -0
- package/src/_Template/Components/MediumCard.jsx +39 -0
- package/src/_Template/Components/MediumContent.jsx +96 -0
- package/src/_Template/Components/MediumEditableContent.jsx +35 -0
- package/src/_Template/Components/Table.jsx +7 -0
- package/src/_Template/Components/index.js +13 -0
- package/src/_Template/Mutations/Create.jsx +202 -0
- package/src/_Template/Mutations/Delete.jsx +173 -0
- package/src/_Template/Mutations/InteractiveMutations.jsx +30 -0
- package/src/_Template/Mutations/Update.jsx +147 -0
- package/src/_Template/Mutations/helpers.jsx +7 -0
- package/src/_Template/Pages/PageBase.jsx +56 -0
- package/src/_Template/Pages/PageCreateItem.jsx +28 -0
- package/src/_Template/Pages/PageDeleteItem.jsx +16 -0
- package/src/_Template/Pages/PageNavbar.jsx +160 -0
- package/src/_Template/Pages/PageReadItem.jsx +11 -0
- package/src/_Template/Pages/PageReadItemEx.jsx +42 -0
- package/src/_Template/Pages/PageUpdateItem.jsx +14 -0
- package/src/_Template/Pages/PageVector.jsx +80 -0
- package/src/_Template/Pages/RouterSegment.jsx +72 -0
- package/src/_Template/Pages/index.js +2 -0
- package/src/_Template/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/_Template/Queries/Fragments.jsx +101 -0
- package/src/_Template/Queries/InsertAsyncAction.jsx +40 -0
- package/src/_Template/Queries/ReadAsyncAction.jsx +44 -0
- package/src/_Template/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/_Template/Queries/SearchAsyncAction.jsx +16 -0
- package/src/_Template/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/_Template/Queries/index.js +6 -0
- package/src/_Template/Scalars/ScalarAttribute.jsx +54 -0
- package/src/_Template/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/_Template/Scalars/index.js +1 -0
- package/src/_Template/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/_Template/Vectors/VectorAttribute.jsx +56 -0
- package/src/_Template/Vectors/index.js +1 -0
- package/src/_Template/WhatToDo.md +44 -0
- package/src/_Template/index.js +71 -0
- package/src/index.js +8 -0
- package/src/uriroot.js +158 -0
- package/vite.config.js +47 -0
package/index.html
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>GQL Model Viewer</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
8
|
+
<script>
|
|
9
|
+
// Node-like shim pro knihovny, které čekají process.env
|
|
10
|
+
globalThis.process = globalThis.process || { env: {} };
|
|
11
|
+
globalThis.process.env = globalThis.process.env || {};
|
|
12
|
+
globalThis.process.env.NODE_ENV = globalThis.process.env.NODE_ENV || "development" || "production";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
16
|
+
|
|
17
|
+
<!-- <script src="https://unpkg.com/react@19"></script>
|
|
18
|
+
<script src="https://unpkg.com/react-dom@19"></script> -->
|
|
19
|
+
|
|
20
|
+
<script src="https://unpkg.com/react@18.3.1/umd/react.development.js"></script>
|
|
21
|
+
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js"></script>
|
|
22
|
+
|
|
23
|
+
<script src="https://unpkg.com/@reduxjs/toolkit@1.9.3/dist/redux-toolkit.umd.js"></script>
|
|
24
|
+
|
|
25
|
+
<!-- Babel (modern verze) -->
|
|
26
|
+
<script src="https://unpkg.com/@babel/standalone@7.25.0/babel.min.js"></script>
|
|
27
|
+
|
|
28
|
+
<!-- HTM (React JSX alternativa) -->
|
|
29
|
+
<script src="https://unpkg.com/htm@3.1.1/dist/htm.umd.js" crossorigin></script>
|
|
30
|
+
|
|
31
|
+
</head>
|
|
32
|
+
|
|
33
|
+
<body>
|
|
34
|
+
|
|
35
|
+
<div id="log-root_"></div>
|
|
36
|
+
<div id="root"></div>
|
|
37
|
+
<div id="log-output"></div>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<script type="text/babel" data-type="module" data-presets="react">
|
|
42
|
+
const { useState, useMemo } = React;
|
|
43
|
+
import { CardCapsule, LeftColumn, MiddleColumn, Row } from "./dist/es"
|
|
44
|
+
|
|
45
|
+
function htmlLog(...args) {
|
|
46
|
+
const el = document.getElementById('log-output');
|
|
47
|
+
if (!el) return;
|
|
48
|
+
|
|
49
|
+
const line = document.createElement('div');
|
|
50
|
+
|
|
51
|
+
line.textContent = args
|
|
52
|
+
.map(arg => typeof arg === 'object'
|
|
53
|
+
? JSON.stringify(arg, null, 2)
|
|
54
|
+
: String(arg)
|
|
55
|
+
)
|
|
56
|
+
.join(' ');
|
|
57
|
+
|
|
58
|
+
el.appendChild(line);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const originalLog = console.log;
|
|
62
|
+
|
|
63
|
+
console.log = (...args) => {
|
|
64
|
+
originalLog(...args);
|
|
65
|
+
htmlLog(...args);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const Counter = () => {
|
|
69
|
+
const [counter, setCounter] = useState(0)
|
|
70
|
+
const Plus = () => {
|
|
71
|
+
console.log(counter, '=>', counter + 1)
|
|
72
|
+
setCounter(prev=>prev+1)
|
|
73
|
+
}
|
|
74
|
+
return (
|
|
75
|
+
<button className="btn btn-sm btn-outline-primary" onClick={Plus}>
|
|
76
|
+
{counter} + 1
|
|
77
|
+
</button>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const MyApp = () => {
|
|
82
|
+
console.log("MyApp")
|
|
83
|
+
return (
|
|
84
|
+
<CardCapsule title={<> demo <Counter /> </>}>
|
|
85
|
+
<Row>
|
|
86
|
+
<LeftColumn>
|
|
87
|
+
<CardCapsule title="Left">
|
|
88
|
+
Hello world <Counter />
|
|
89
|
+
</CardCapsule>
|
|
90
|
+
</LeftColumn>
|
|
91
|
+
<MiddleColumn>
|
|
92
|
+
<CardCapsule title="Middle">
|
|
93
|
+
Hello world <Counter />
|
|
94
|
+
</CardCapsule>
|
|
95
|
+
</MiddleColumn>
|
|
96
|
+
</Row>
|
|
97
|
+
</CardCapsule>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
// console.log("mount", mount)
|
|
101
|
+
ReactDOM.createRoot(document.getElementById("root")).render(<MyApp />);
|
|
102
|
+
</script>
|
|
103
|
+
</body>
|
|
104
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hrbolek/uoisfrontend-template",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"_main": "src/index.js",
|
|
9
|
+
"_module": "src/index.js",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "vite build"
|
|
14
|
+
},
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"description": "",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"react-bootstrap-icons": "^1.11.5",
|
|
20
|
+
"react-router": "^7.0.2",
|
|
21
|
+
"@hrbolek/uoisfrontend-shared": "*",
|
|
22
|
+
"@hrbolek/uoisfrontend-gql-shared": "*"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Col } from "./Col";
|
|
2
|
+
import { Row } from "./Row";
|
|
3
|
+
|
|
4
|
+
export const formatDateTime = (d) => {
|
|
5
|
+
const date = d instanceof Date ? d : new Date(d);
|
|
6
|
+
if (Number.isNaN(date.getTime())) return String(d); // fallback, když to není validní datum
|
|
7
|
+
return new Intl.DateTimeFormat("cs-CZ", {
|
|
8
|
+
dateStyle: "medium",
|
|
9
|
+
timeStyle: "short",
|
|
10
|
+
}).format(date);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export const Attribute = ({ item, label, attribute_name, attribute_value, children }) => {
|
|
15
|
+
const raw = attribute_value != null ? attribute_value : item?.[attribute_name];
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const renderValue = (v) => {
|
|
19
|
+
if (v == null) return ""; // nebo "—"
|
|
20
|
+
if (typeof v === "boolean") return v ? "Ano" : "Ne";
|
|
21
|
+
|
|
22
|
+
// DateTime: Date nebo ISO string (typicky obsahuje "T")
|
|
23
|
+
if (v instanceof Date) return formatDateTime(v);
|
|
24
|
+
if (typeof v === "string") {
|
|
25
|
+
// zkus parse jen u něčeho, co vypadá jako ISO datetime
|
|
26
|
+
if (v.includes("T")) return formatDateTime(v);
|
|
27
|
+
return v;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (typeof v === "object") return <pre className="mb-0">{JSON.stringify(v, null, 2)}</pre>;
|
|
31
|
+
|
|
32
|
+
return String(v);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const value = children || renderValue(raw);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Row className="Attribute_Row">
|
|
39
|
+
{label ? (
|
|
40
|
+
<>
|
|
41
|
+
<Col md={4} xs={12} className="Attribute_Col_Label">
|
|
42
|
+
<b>{label}</b>
|
|
43
|
+
</Col>
|
|
44
|
+
<Col md={8} xs={12} className="Attribute_Col_Value">{value}</Col>
|
|
45
|
+
</>
|
|
46
|
+
) : (
|
|
47
|
+
<Col md={12} className="Attribute_Col_Value">{value}</Col>
|
|
48
|
+
)}
|
|
49
|
+
</Row>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { Link } from "./Link"
|
|
2
|
+
import { cx } from "./style";
|
|
3
|
+
|
|
4
|
+
export const CardCapsuleBase = ({ title = null, header = null, children, item }) => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="card">
|
|
7
|
+
{(header || title) && <div className="card-header">{title || header}</div>}
|
|
8
|
+
<div className="card-body">{children}</div>
|
|
9
|
+
</div>
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Inline styly pro komponentu {@link SimpleCardCapsule}.
|
|
15
|
+
*
|
|
16
|
+
* @type {Object<string, React.CSSProperties>}
|
|
17
|
+
* @property {React.CSSProperties} capsuleContainer
|
|
18
|
+
* Kontejner “kapsle” se zaobleným rámečkem a vnitřním odsazením.
|
|
19
|
+
* - `position: relative` umožňuje absolutně pozicovat titulky na hraně rámečku.
|
|
20
|
+
* - Používá Bootstrap CSS proměnné pro barvu/šířku borderu.
|
|
21
|
+
*
|
|
22
|
+
* @property {React.CSSProperties} capsuleTitle
|
|
23
|
+
* Levý horní “štítek” umístěný přes horní hranu rámečku (absolutně pozicovaný).
|
|
24
|
+
* Typicky zobrazuje `title || header`.
|
|
25
|
+
*
|
|
26
|
+
* @property {React.CSSProperties} childrenWrapper
|
|
27
|
+
* Obal pro obsah; zajišťuje plnou šířku a zarovnání obsahu doleva.
|
|
28
|
+
*
|
|
29
|
+
* @property {React.CSSProperties} capsuleRightCorner
|
|
30
|
+
* Pravý horní “štítek” na hraně rámečku (zatím nepoužitý v renderu),
|
|
31
|
+
* vhodný např. pro akce, stav, badge, počty apod.
|
|
32
|
+
*/
|
|
33
|
+
const styles = {
|
|
34
|
+
capsuleContainer: {
|
|
35
|
+
position: "relative", // Allows positioning of the title
|
|
36
|
+
display: "flex",
|
|
37
|
+
flexDirection: "column",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
border: "var(--bs-border-width) solid var(--bs-border-color)", // Border around the component
|
|
40
|
+
|
|
41
|
+
borderRadius: "8px", // Rounded corners
|
|
42
|
+
|
|
43
|
+
// borderBottom: "2px solid #6c757d", // pouze dolní linka
|
|
44
|
+
// borderTop: "2px solid #6c757d",
|
|
45
|
+
// borderLeft: "none",
|
|
46
|
+
// borderRight: "none",
|
|
47
|
+
// borderRadius: "0", // žádné zaoblení
|
|
48
|
+
|
|
49
|
+
padding: "16px", // Padding inside the container
|
|
50
|
+
margin: "16px 0", // Margin around the container
|
|
51
|
+
color: "#6c757d",
|
|
52
|
+
backgroundColor: "white",
|
|
53
|
+
textAlign: "center",
|
|
54
|
+
width: "100%",
|
|
55
|
+
// minWidth: "200px",
|
|
56
|
+
// zIndex: 10
|
|
57
|
+
},
|
|
58
|
+
capsuleTitle: {
|
|
59
|
+
position: "absolute", // Position the title on the border
|
|
60
|
+
top: "-10px", // Move above the border
|
|
61
|
+
// left: "50%", // Center horizontally
|
|
62
|
+
// transform: "translateX(-50%)", // Adjust for horizontal centering
|
|
63
|
+
left: "16px", // Center horizontally
|
|
64
|
+
backgroundColor: "white", // Match background color to container
|
|
65
|
+
padding: "0 8px", // Add some padding around the text
|
|
66
|
+
textTransform: "uppercase",
|
|
67
|
+
fontSize: "0.85rem",
|
|
68
|
+
fontWeight: "bold",
|
|
69
|
+
letterSpacing: "0.05em",
|
|
70
|
+
color: "#6c757d",
|
|
71
|
+
},
|
|
72
|
+
childrenWrapper: {
|
|
73
|
+
width: "100%", // Ensure children fill the width of the container
|
|
74
|
+
textAlign: "left", // Align child content to the left
|
|
75
|
+
},
|
|
76
|
+
capsuleRightCorner: {
|
|
77
|
+
position: "absolute",
|
|
78
|
+
top: "-14px",
|
|
79
|
+
right: "16px",
|
|
80
|
+
backgroundColor: "white",
|
|
81
|
+
padding: "0 8px",
|
|
82
|
+
fontSize: "0.85rem",
|
|
83
|
+
fontWeight: "bold",
|
|
84
|
+
color: "#6c757d",
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
// NEW: footer label na spodní hraně (vlevo)
|
|
88
|
+
capsuleFooter: {
|
|
89
|
+
position: "absolute",
|
|
90
|
+
bottom: "-10px",
|
|
91
|
+
left: "16px",
|
|
92
|
+
backgroundColor: "white",
|
|
93
|
+
padding: "0 8px",
|
|
94
|
+
fontSize: "0.85rem",
|
|
95
|
+
fontWeight: "bold",
|
|
96
|
+
letterSpacing: "0.02em",
|
|
97
|
+
color: "#6c757d",
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
// NEW: footer corner (vpravo dole)
|
|
101
|
+
capsuleFooterCorner: {
|
|
102
|
+
position: "absolute",
|
|
103
|
+
bottom: "-10px",
|
|
104
|
+
right: "16px",
|
|
105
|
+
backgroundColor: "white",
|
|
106
|
+
padding: "0 8px",
|
|
107
|
+
fontSize: "0.85rem",
|
|
108
|
+
fontWeight: "bold",
|
|
109
|
+
color: "#6c757d",
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Jednoduchý “card/capsule” wrapper s titulkem umístěným přes horní okraj rámečku.
|
|
115
|
+
* Hodí se jako vizuální sekce pro bloky obsahu (formuláře, detail, skupiny polí).
|
|
116
|
+
*
|
|
117
|
+
* Pozn.: Komponenta slučuje základní styl ({@link styles.capsuleContainer})
|
|
118
|
+
* s `style` předaným zvenku.
|
|
119
|
+
*
|
|
120
|
+
* @component
|
|
121
|
+
* @param {Object} props
|
|
122
|
+
* @param {string} [props.id]
|
|
123
|
+
* ID atribut pro root element (např. pro anchor/scroll nebo testování).
|
|
124
|
+
* @param {string} [props.header]
|
|
125
|
+
* Alternativní text titulku (použije se, pokud není `title`).
|
|
126
|
+
* @param {string} [props.title]
|
|
127
|
+
* Primární text titulku. Pokud není uveden, použije se `header`.
|
|
128
|
+
* @param {React.ReactNode} [props.children]
|
|
129
|
+
* Vnitřní obsah kapsle.
|
|
130
|
+
* @param {React.CSSProperties} [props.style]
|
|
131
|
+
* Dodatečné inline styly sloučené do kontejneru kapsle.
|
|
132
|
+
* @param {Object<string, any>} [props.props]
|
|
133
|
+
* Další props (např. `className`, `data-*`, `onClick`), aktuálně se ale
|
|
134
|
+
* nepředávají na root element (viz poznámka níže).
|
|
135
|
+
*
|
|
136
|
+
* @returns {JSX.Element}
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* <SimpleCardCapsule
|
|
140
|
+
* id="basic-info"
|
|
141
|
+
* title="Základní údaje"
|
|
142
|
+
* style={{ marginTop: 24 }}
|
|
143
|
+
* >
|
|
144
|
+
* <FormFields />
|
|
145
|
+
* </SimpleCardCapsule>
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* - V ukázce kódu máš `id={{id}}`, správně má být `id={id}`.
|
|
149
|
+
* - Pokud chceš podporovat “zbytek props”, předej je na root: `<div {...props} ...>`.
|
|
150
|
+
*/
|
|
151
|
+
export const SimpleCardCapsule0 = ({ id, header, title, children, style, className, ...props }) => {
|
|
152
|
+
return (
|
|
153
|
+
<div id={id} style={{ ...styles.capsuleContainer, ...style }} className={className} >
|
|
154
|
+
<span style={styles.capsuleTitle}>{title || header}</span>
|
|
155
|
+
<div style={styles.childrenWrapper}>
|
|
156
|
+
{children}
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Bootstrap-first capsule/card wrapper.
|
|
165
|
+
* - Root je `card position-relative`
|
|
166
|
+
* - "Title badge" je absolutně přes horní hranu (`translate-middle-y`)
|
|
167
|
+
* - Obsah je `card-body`
|
|
168
|
+
* - Hook třídy jsou stabilní pro budoucí theme
|
|
169
|
+
*/
|
|
170
|
+
export const SimpleCardCapsule = ({
|
|
171
|
+
id,
|
|
172
|
+
header,
|
|
173
|
+
title,
|
|
174
|
+
children,
|
|
175
|
+
className,
|
|
176
|
+
style, // nechávám pro kompatibilitu, ale ideálně nepoužívat
|
|
177
|
+
...props
|
|
178
|
+
}) => {
|
|
179
|
+
const text = title || header;
|
|
180
|
+
|
|
181
|
+
return (
|
|
182
|
+
<div
|
|
183
|
+
id={id}
|
|
184
|
+
className={cx(
|
|
185
|
+
"CardCapsule", // hook
|
|
186
|
+
"card",
|
|
187
|
+
"position-relative",
|
|
188
|
+
"my-3",
|
|
189
|
+
className
|
|
190
|
+
)}
|
|
191
|
+
style={style}
|
|
192
|
+
{...props}
|
|
193
|
+
>
|
|
194
|
+
{text && (
|
|
195
|
+
<span
|
|
196
|
+
className={cx(
|
|
197
|
+
"CardCapsule__title", // hook
|
|
198
|
+
"position-absolute",
|
|
199
|
+
"top-0",
|
|
200
|
+
"start-0",
|
|
201
|
+
"translate-middle-y",
|
|
202
|
+
"ms-3",
|
|
203
|
+
"px-2",
|
|
204
|
+
"bg-white",
|
|
205
|
+
"text-uppercase",
|
|
206
|
+
"fw-bold",
|
|
207
|
+
"text-muted"
|
|
208
|
+
)}
|
|
209
|
+
>
|
|
210
|
+
{text}
|
|
211
|
+
</span>
|
|
212
|
+
)}
|
|
213
|
+
|
|
214
|
+
<div className={cx("CardCapsule__body", "card-body")}>
|
|
215
|
+
<div className={cx("CardCapsule__content", "text-start")}>
|
|
216
|
+
{children}
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export const CardCapsule = SimpleCardCapsule
|
|
224
|
+
|
|
225
|
+
export const SimpleCardCapsuleRightCorner0 = ({ children }) => {
|
|
226
|
+
return <span style={styles.capsuleRightCorner}>{children}</span>;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export const SimpleCardCapsuleRightCorner = ({ children, className, ...props }) => {
|
|
230
|
+
return (
|
|
231
|
+
<span
|
|
232
|
+
className={cx(
|
|
233
|
+
"CardCapsule__corner", // hook
|
|
234
|
+
"position-absolute",
|
|
235
|
+
"top-0",
|
|
236
|
+
"end-0",
|
|
237
|
+
"translate-middle-y",
|
|
238
|
+
"me-3",
|
|
239
|
+
"px-2",
|
|
240
|
+
"bg-white",
|
|
241
|
+
"text-muted",
|
|
242
|
+
className
|
|
243
|
+
)}
|
|
244
|
+
{...props}
|
|
245
|
+
>
|
|
246
|
+
{children}
|
|
247
|
+
</span>
|
|
248
|
+
);
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export const SimpleCardCapsuleTitle0 = ({ children, style, className, ...props }) => {
|
|
252
|
+
return (
|
|
253
|
+
<span
|
|
254
|
+
style={{ ...styles.capsuleTitle, ...style }}
|
|
255
|
+
className={className}
|
|
256
|
+
{...props}
|
|
257
|
+
>
|
|
258
|
+
{children}
|
|
259
|
+
</span>
|
|
260
|
+
);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export const SimpleCardCapsuleTitle = ({ children, className, ...props }) => {
|
|
264
|
+
return (
|
|
265
|
+
<span
|
|
266
|
+
className={cx(
|
|
267
|
+
"CardCapsule__title",
|
|
268
|
+
"position-absolute",
|
|
269
|
+
"top-0",
|
|
270
|
+
"start-0",
|
|
271
|
+
"translate-middle-y",
|
|
272
|
+
"ms-3",
|
|
273
|
+
"px-2",
|
|
274
|
+
"bg-white",
|
|
275
|
+
"text-uppercase",
|
|
276
|
+
"fw-bold",
|
|
277
|
+
"text-muted",
|
|
278
|
+
className
|
|
279
|
+
)}
|
|
280
|
+
{...props}
|
|
281
|
+
>
|
|
282
|
+
{children}
|
|
283
|
+
</span>
|
|
284
|
+
);
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export const SimpleCardCapsuleFooter0 = ({ children, style, className, ...props }) => {
|
|
288
|
+
return (
|
|
289
|
+
<span
|
|
290
|
+
style={{ ...styles.capsuleFooter, ...style }}
|
|
291
|
+
className={className}
|
|
292
|
+
{...props}
|
|
293
|
+
>
|
|
294
|
+
{children}
|
|
295
|
+
</span>
|
|
296
|
+
);
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
export const SimpleCardCapsuleFooter = ({ children, className, ...props }) => {
|
|
300
|
+
return (
|
|
301
|
+
<span
|
|
302
|
+
className={cx(
|
|
303
|
+
"CardCapsule__footer",
|
|
304
|
+
"position-absolute",
|
|
305
|
+
"bottom-0",
|
|
306
|
+
"start-0",
|
|
307
|
+
"ms-3",
|
|
308
|
+
"px-2",
|
|
309
|
+
"bg-white",
|
|
310
|
+
"text-muted",
|
|
311
|
+
"fw-bold",
|
|
312
|
+
className
|
|
313
|
+
)}
|
|
314
|
+
{...props}
|
|
315
|
+
>
|
|
316
|
+
{children}
|
|
317
|
+
</span>
|
|
318
|
+
);
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
export const SimpleCardCapsuleFooterCorner0 = ({ children, style, className, ...props }) => {
|
|
322
|
+
return (
|
|
323
|
+
<span
|
|
324
|
+
style={{ ...styles.capsuleFooterCorner, ...style }}
|
|
325
|
+
className={className}
|
|
326
|
+
{...props}
|
|
327
|
+
>
|
|
328
|
+
{children}
|
|
329
|
+
</span>
|
|
330
|
+
);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
export const SimpleCardCapsuleFooterCorner = ({ children, className, ...props }) => {
|
|
334
|
+
return (
|
|
335
|
+
<span
|
|
336
|
+
className={cx(
|
|
337
|
+
"CardCapsule__footerCorner",
|
|
338
|
+
"position-absolute",
|
|
339
|
+
"bottom-0",
|
|
340
|
+
"end-0",
|
|
341
|
+
"me-3",
|
|
342
|
+
"px-2",
|
|
343
|
+
"bg-white",
|
|
344
|
+
"text-muted",
|
|
345
|
+
"fw-bold",
|
|
346
|
+
className
|
|
347
|
+
)}
|
|
348
|
+
{...props}
|
|
349
|
+
>
|
|
350
|
+
{children}
|
|
351
|
+
</span>
|
|
352
|
+
);
|
|
353
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Col as Col_ } from "react-bootstrap"
|
|
2
|
+
import { bs, cx } from "./style";
|
|
3
|
+
|
|
4
|
+
export const Col0 = ({ children, className, ...props }) => {
|
|
5
|
+
return (
|
|
6
|
+
<div {...props} className={className ? className + " col" : "col"}>
|
|
7
|
+
{children}
|
|
8
|
+
</div>
|
|
9
|
+
)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function Col({ className, classNames, xs, sm, md, lg, xl, xxl, as: Tag = "div", ...props }) {
|
|
13
|
+
return (
|
|
14
|
+
<Tag
|
|
15
|
+
{...props}
|
|
16
|
+
className={cx(
|
|
17
|
+
"Col", // hook
|
|
18
|
+
bs.grid.col({ xs, sm, md, lg, xl, xxl }),
|
|
19
|
+
className,
|
|
20
|
+
classNames?.root
|
|
21
|
+
)}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const LeftColumn = ({children, ...props}) => {
|
|
27
|
+
return (
|
|
28
|
+
<Col xl={3} md={12} className="LeftColumn" {...props}>{children}</Col>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const MiddleColumn = ({children, ...props}) => {
|
|
33
|
+
return (
|
|
34
|
+
<Col xl={9} md={12} className="MiddleColumn" {...props}>{children}</Col>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { UpdateAsyncAction } from "../Queries";
|
|
2
|
+
import { MediumEditableContent } from "./MediumEditableContent";
|
|
3
|
+
import { useEditAction } from "../../../../dynamic/src/Hooks/useEditAction";
|
|
4
|
+
import { useCallback } from "react";
|
|
5
|
+
import { useGQLEntityContext } from "../../../../_template/src/Base/Helpers/GQLEntityProvider";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export const ConfirmEdit = ({ item, children }) => {
|
|
9
|
+
const { run , error, loading, entity, data, onChange: contextOnChange, onBlur: contextOnBlur } = useGQLEntityContext()
|
|
10
|
+
|
|
11
|
+
const localOnMutationEvent = useCallback((mutationHandler, notifyHandler) => async (e) => {
|
|
12
|
+
const newItem = { ...item, [e.target.id]: e.target.value }
|
|
13
|
+
const newEvent = { target: { value: newItem } }
|
|
14
|
+
|
|
15
|
+
await notifyHandler(newEvent)
|
|
16
|
+
return await mutationHandler(e)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
draft,
|
|
21
|
+
dirty,
|
|
22
|
+
onChange,
|
|
23
|
+
onBlur,
|
|
24
|
+
onCancel,
|
|
25
|
+
onConfirm,
|
|
26
|
+
} = useEditAction(UpdateAsyncAction, item, {mode: "confirm"})
|
|
27
|
+
|
|
28
|
+
const handleConfirm = useCallback(async () => {
|
|
29
|
+
const result = await onConfirm();
|
|
30
|
+
console.log("ConfirmEdit handleConfirm result", result, "draft", draft)
|
|
31
|
+
if (result) {
|
|
32
|
+
const event = { target: { value: result } };
|
|
33
|
+
// důležité: použij params z kontextu (provider si je drží jako "poslední vars")
|
|
34
|
+
await contextOnChange(event);
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}, [onConfirm, contextOnChange]);
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<MediumEditableContent item={item} onChange={onChange} onBlur={onBlur} >
|
|
42
|
+
{children}
|
|
43
|
+
<hr />
|
|
44
|
+
{/* <pre>{JSON.stringify(item, null, 2)}</pre> */}
|
|
45
|
+
<button
|
|
46
|
+
className="btn btn-warning form-control"
|
|
47
|
+
onClick={onCancel}
|
|
48
|
+
disabled={!dirty || loading}
|
|
49
|
+
>
|
|
50
|
+
Zrušit změny
|
|
51
|
+
</button>
|
|
52
|
+
<button
|
|
53
|
+
className="btn btn-primary form-control"
|
|
54
|
+
onClick={handleConfirm}
|
|
55
|
+
disabled={!dirty || loading}
|
|
56
|
+
>
|
|
57
|
+
Uložit změny
|
|
58
|
+
</button>
|
|
59
|
+
</MediumEditableContent>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
export const CopyButton = ({ text, className = "btn btn-sm btn-outline-secondary" }) => {
|
|
4
|
+
const [copied, setCopied] = useState(false);
|
|
5
|
+
|
|
6
|
+
const copy = async () => {
|
|
7
|
+
try {
|
|
8
|
+
await navigator.clipboard.writeText(text);
|
|
9
|
+
setCopied(true);
|
|
10
|
+
window.setTimeout(() => setCopied(false), 1200);
|
|
11
|
+
} catch (e) {
|
|
12
|
+
// fallback pro starší prohlížeče / blokované clipboard API
|
|
13
|
+
const ta = document.createElement("textarea");
|
|
14
|
+
ta.value = text;
|
|
15
|
+
ta.style.position = "fixed";
|
|
16
|
+
ta.style.left = "-9999px";
|
|
17
|
+
document.body.appendChild(ta);
|
|
18
|
+
ta.focus();
|
|
19
|
+
ta.select();
|
|
20
|
+
document.execCommand("copy");
|
|
21
|
+
document.body.removeChild(ta);
|
|
22
|
+
|
|
23
|
+
setCopied(true);
|
|
24
|
+
window.setTimeout(() => setCopied(false), 1200);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<button type="button" className={className} onClick={copy} title="Kopírovat">
|
|
30
|
+
{copied ? "Zkopírováno" : "Kopírovat"}
|
|
31
|
+
</button>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Col } from "./Col";
|
|
2
|
+
import { Row } from "./Row";
|
|
3
|
+
import { MediumCard } from "./MediumCard";
|
|
4
|
+
import { SimpleCardCapsuleRightCorner } from "./CardCapsule";
|
|
5
|
+
import { Link } from "./Link";
|
|
6
|
+
|
|
7
|
+
export const LargeCard = ({ item, children }) => {
|
|
8
|
+
return (
|
|
9
|
+
<Row>
|
|
10
|
+
<Col className="col-3">
|
|
11
|
+
<MediumCard item={item}>
|
|
12
|
+
<SimpleCardCapsuleRightCorner>
|
|
13
|
+
<Link className="btn btn-sm border-0" item={item} action="__def">Definice</Link>
|
|
14
|
+
</SimpleCardCapsuleRightCorner>
|
|
15
|
+
</MediumCard>
|
|
16
|
+
</Col>
|
|
17
|
+
<Col className="col-9">
|
|
18
|
+
{children}
|
|
19
|
+
</Col>
|
|
20
|
+
</Row>
|
|
21
|
+
);
|
|
22
|
+
}
|