@riboseinc/paneron-registry-kit 2.0.0 → 2.0.1
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/LICENSE +21 -0
- package/README.adoc +35 -0
- package/compiled/common.js +2 -0
- package/compiled/index.js +21 -0
- package/compiled/migrations/initial.js +8 -0
- package/compiled/types/cr.js +131 -0
- package/compiled/types/index.js +8 -0
- package/compiled/types/item.js +22 -0
- package/compiled/types/proposal.js +21 -0
- package/compiled/types/register.js +25 -0
- package/compiled/types/registry.js +10 -0
- package/compiled/types/stakeholder.js +34 -0
- package/compiled/types/util.js +3 -0
- package/compiled/types/views.js +2 -0
- package/compiled/views/AnnotatedChange.js +57 -0
- package/compiled/views/BrowserCtx.js +19 -0
- package/compiled/views/FilterCriteria/CRITERIA_CONFIGURATION.js +110 -0
- package/compiled/views/FilterCriteria/criteriaGroupToQueryExpression.js +40 -0
- package/compiled/views/FilterCriteria/criteriaGroupToSummary.js +47 -0
- package/compiled/views/FilterCriteria/criteriaToNodes.js +89 -0
- package/compiled/views/FilterCriteria/index.js +75 -0
- package/compiled/views/FilterCriteria/models.js +28 -0
- package/compiled/views/FilterCriteria/mutateGroup.js +53 -0
- package/compiled/views/GenericRelatedItemView.js +147 -0
- package/compiled/views/RegisterStakeholder.js +19 -0
- package/compiled/views/RegisterVersion.js +20 -0
- package/compiled/views/SearchQuery.js +58 -0
- package/compiled/views/change-request/ChangeRequestContext.js +30 -0
- package/compiled/views/change-request/Proposals.js +185 -0
- package/compiled/views/change-request/objectChangeset.js +189 -0
- package/compiled/views/detail/ChangeRequest/Proposal.js +144 -0
- package/compiled/views/detail/ChangeRequest/index.js +140 -0
- package/compiled/views/detail/ChangeRequest/transitions.js +418 -0
- package/compiled/views/detail/CustomView/index.js +32 -0
- package/compiled/views/detail/RegisterHome/index.js +70 -0
- package/compiled/views/detail/RegisterItem/RelatedItems.d.ts +14 -0
- package/compiled/views/detail/RegisterItem/RelatedItems.js +28 -0
- package/compiled/views/detail/RegisterItem/RelatedItems.js.map +1 -0
- package/compiled/views/detail/RegisterItem/SupersedingItemMenu.js +27 -0
- package/compiled/views/detail/RegisterItem/index.js +277 -0
- package/compiled/views/detail/RegisterItem/index.js.map +1 -0
- package/compiled/views/detail/RegisterMeta/RegisterMetaForm.js +135 -0
- package/compiled/views/detail/RegisterMeta/index.js +61 -0
- package/compiled/views/detail/index.js +11 -0
- package/compiled/views/diffing/InlineDiff.js +20 -0
- package/compiled/views/diffing/StructuredDiff.js +38 -0
- package/compiled/views/hooks/useCustomView.js +14 -0
- package/compiled/views/hooks/useItemClassConfig.js +14 -0
- package/compiled/views/hooks/useItemRef.js +26 -0
- package/compiled/views/hooks/useSingleRegisterItemData.js +21 -0
- package/compiled/views/index.js +142 -0
- package/compiled/views/itemPathUtils.js +115 -0
- package/compiled/views/itemQueryUtils.js +42 -0
- package/compiled/views/protocolRegistry.js +24 -0
- package/compiled/views/sidebar/Browse/index.js +278 -0
- package/compiled/views/sidebar/Export/index.js +47 -0
- package/compiled/views/sidebar/ListItem.js +23 -0
- package/compiled/views/sidebar/Registration/index.js +114 -0
- package/compiled/views/sidebar/Search/index.js +100 -0
- package/compiled/views/sidebar/index.js +73 -0
- package/compiled/views/util.js +63 -0
- package/dependencies-local/extension-kit/SettingsContext.d.ts +8 -0
- package/dependencies-local/extension-kit/SettingsContext.js +19 -0
- package/dependencies-local/extension-kit/SettingsContext.js.map +1 -0
- package/dependencies-local/extension-kit/context.d.ts +11 -0
- package/dependencies-local/extension-kit/context.js +133 -0
- package/dependencies-local/extension-kit/context.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/ContextProvider.d.ts +9 -0
- package/dependencies-local/extension-kit/i18n/ContextProvider.js +33 -0
- package/dependencies-local/extension-kit/i18n/ContextProvider.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/context.d.ts +9 -0
- package/dependencies-local/extension-kit/i18n/context.js +23 -0
- package/dependencies-local/extension-kit/i18n/context.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/types.d.ts +10 -0
- package/dependencies-local/extension-kit/i18n/types.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/widgets.d.ts +16 -0
- package/dependencies-local/extension-kit/i18n/widgets.js +56 -0
- package/dependencies-local/extension-kit/i18n/widgets.js.map +1 -0
- package/dependencies-local/extension-kit/index.d.ts +3 -0
- package/dependencies-local/extension-kit/index.js +78 -0
- package/dependencies-local/extension-kit/index.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/index.d.ts +2 -0
- package/dependencies-local/extension-kit/object-specs/index.js +22 -0
- package/dependencies-local/extension-kit/object-specs/index.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/paneron-object.d.ts +6 -0
- package/dependencies-local/extension-kit/object-specs/paneron-object.js +161 -0
- package/dependencies-local/extension-kit/object-specs/paneron-object.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/ser-des.d.ts +31 -0
- package/dependencies-local/extension-kit/object-specs/ser-des.js +187 -0
- package/dependencies-local/extension-kit/object-specs/ser-des.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.d.ts +2 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.js +42 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.d.ts +3 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.js +110 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/index.d.ts +9 -0
- package/dependencies-local/extension-kit/object-specs/yaml/index.js +36 -0
- package/dependencies-local/extension-kit/object-specs/yaml/index.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/schema.d.ts +3 -0
- package/dependencies-local/extension-kit/object-specs/yaml/schema.js +26 -0
- package/dependencies-local/extension-kit/object-specs/yaml/schema.js.map +1 -0
- package/dependencies-local/extension-kit/package.json +53 -0
- package/dependencies-local/extension-kit/settings.d.ts +6 -0
- package/dependencies-local/extension-kit/settings.js +11 -0
- package/dependencies-local/extension-kit/settings.js.map +1 -0
- package/dependencies-local/extension-kit/types/binary-invocation.d.ts +31 -0
- package/dependencies-local/extension-kit/types/binary-invocation.js.map +1 -0
- package/dependencies-local/extension-kit/types/buffers.d.ts +17 -0
- package/dependencies-local/extension-kit/types/buffers.js +5 -0
- package/dependencies-local/extension-kit/types/buffers.js.map +1 -0
- package/dependencies-local/extension-kit/types/changes.d.ts +37 -0
- package/dependencies-local/extension-kit/types/changes.js +5 -0
- package/dependencies-local/extension-kit/types/changes.js.map +1 -0
- package/dependencies-local/extension-kit/types/data.d.ts +54 -0
- package/dependencies-local/extension-kit/types/data.js +5 -0
- package/dependencies-local/extension-kit/types/data.js.map +1 -0
- package/dependencies-local/extension-kit/types/dialogs.d.ts +15 -0
- package/dependencies-local/extension-kit/types/dialogs.js +5 -0
- package/dependencies-local/extension-kit/types/dialogs.js.map +1 -0
- package/dependencies-local/extension-kit/types/extension-maker.d.ts +17 -0
- package/dependencies-local/extension-kit/types/extension-maker.js +5 -0
- package/dependencies-local/extension-kit/types/extension-maker.js.map +1 -0
- package/dependencies-local/extension-kit/types/extension.d.ts +27 -0
- package/dependencies-local/extension-kit/types/extension.js +5 -0
- package/dependencies-local/extension-kit/types/extension.js.map +1 -0
- package/dependencies-local/extension-kit/types/index.d.ts +3 -0
- package/dependencies-local/extension-kit/types/index.js +41 -0
- package/dependencies-local/extension-kit/types/index.js.map +1 -0
- package/dependencies-local/extension-kit/types/indexes.d.ts +6 -0
- package/dependencies-local/extension-kit/types/indexes.js +15 -0
- package/dependencies-local/extension-kit/types/indexes.js.map +1 -0
- package/dependencies-local/extension-kit/types/migrations.d.ts +15 -0
- package/dependencies-local/extension-kit/types/migrations.js +5 -0
- package/dependencies-local/extension-kit/types/migrations.js.map +1 -0
- package/dependencies-local/extension-kit/types/object-spec.d.ts +108 -0
- package/dependencies-local/extension-kit/types/object-spec.js +23 -0
- package/dependencies-local/extension-kit/types/object-spec.js.map +1 -0
- package/dependencies-local/extension-kit/types/objects.d.ts +18 -0
- package/dependencies-local/extension-kit/types/objects.js +5 -0
- package/dependencies-local/extension-kit/types/objects.js.map +1 -0
- package/dependencies-local/extension-kit/types/progress.d.ts +5 -0
- package/dependencies-local/extension-kit/types/progress.js +5 -0
- package/dependencies-local/extension-kit/types/progress.js.map +1 -0
- package/dependencies-local/extension-kit/types/renderer.d.ts +495 -0
- package/dependencies-local/extension-kit/types/renderer.js +5 -0
- package/dependencies-local/extension-kit/types/renderer.js.map +1 -0
- package/dependencies-local/extension-kit/useDebounce.d.ts +2 -0
- package/dependencies-local/extension-kit/useDebounce.js +27 -0
- package/dependencies-local/extension-kit/useDebounce.js.map +1 -0
- package/dependencies-local/extension-kit/usePersistentStateReducer.d.ts +35 -0
- package/dependencies-local/extension-kit/usePersistentStateReducer.js +91 -0
- package/dependencies-local/extension-kit/usePersistentStateReducer.js.map +1 -0
- package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.d.ts +48 -0
- package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.js +116 -0
- package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.js.map +1 -0
- package/dependencies-local/extension-kit/util.d.ts +8 -0
- package/dependencies-local/extension-kit/util.js +21 -0
- package/dependencies-local/extension-kit/util.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/ErrorState.d.ts +8 -0
- package/dependencies-local/extension-kit/widgets/ErrorState.js +44 -0
- package/dependencies-local/extension-kit/widgets/ErrorState.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Grid.d.ts +41 -0
- package/dependencies-local/extension-kit/widgets/Grid.js +213 -0
- package/dependencies-local/extension-kit/widgets/Grid.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/HelpTooltip.d.ts +18 -0
- package/dependencies-local/extension-kit/widgets/HelpTooltip.js +84 -0
- package/dependencies-local/extension-kit/widgets/HelpTooltip.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/ItemCount.d.ts +19 -0
- package/dependencies-local/extension-kit/widgets/ItemCount.js +78 -0
- package/dependencies-local/extension-kit/widgets/ItemCount.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/List.d.ts +40 -0
- package/dependencies-local/extension-kit/widgets/List.js +191 -0
- package/dependencies-local/extension-kit/widgets/List.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Navbar.d.ts +20 -0
- package/dependencies-local/extension-kit/widgets/Navbar.js +75 -0
- package/dependencies-local/extension-kit/widgets/Navbar.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/SearchResultList.d.ts +24 -0
- package/dependencies-local/extension-kit/widgets/SearchResultList.js +201 -0
- package/dependencies-local/extension-kit/widgets/SearchResultList.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/Block.d.ts +21 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/Block.js +94 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/Block.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.d.ts +6 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.js +22 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.d.ts +28 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.js +148 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/index.d.ts +27 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/index.js +178 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/index.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.d.ts +13 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.js +82 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.d.ts +10 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.js +168 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.d.ts +9 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.js +66 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.d.ts +33 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.js +204 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.d.ts +74 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.js +5 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.d.ts +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.js +14 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Workspace.d.ts +38 -0
- package/dependencies-local/extension-kit/widgets/Workspace.js +99 -0
- package/dependencies-local/extension-kit/widgets/Workspace.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.d.ts +12 -0
- package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.js +57 -0
- package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/panels/index.d.ts +28 -0
- package/dependencies-local/extension-kit/widgets/panels/index.js +169 -0
- package/dependencies-local/extension-kit/widgets/panels/index.js.map +1 -0
- package/dist/common.d.ts +1 -0
- package/dist/common.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/initial.d.ts +3 -0
- package/dist/migrations/initial.js.map +1 -0
- package/dist/package.json +56 -0
- package/dist/types/cr.d.ts +216 -0
- package/dist/types/cr.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/item.d.ts +59 -0
- package/dist/types/item.js.map +1 -0
- package/dist/types/proposal.d.ts +64 -0
- package/dist/types/proposal.js.map +1 -0
- package/dist/types/register.d.ts +18 -0
- package/dist/types/register.js.map +1 -0
- package/dist/types/registry.d.ts +15 -0
- package/dist/types/registry.js.map +1 -0
- package/dist/types/stakeholder.d.ts +58 -0
- package/dist/types/stakeholder.js.map +1 -0
- package/dist/types/util.d.ts +21 -0
- package/dist/types/util.js +5 -0
- package/dist/types/util.js.map +1 -0
- package/dist/types/views.d.ts +157 -0
- package/dist/types/views.js +5 -0
- package/dist/types/views.js.map +1 -0
- package/dist/views/AnnotatedChange.d.ts +7 -0
- package/dist/views/AnnotatedChange.js.map +1 -0
- package/dist/views/BrowserCtx.d.ts +73 -0
- package/dist/views/BrowserCtx.js.map +1 -0
- package/dist/views/FilterCriteria/CRITERIA_CONFIGURATION.d.ts +17 -0
- package/dist/views/FilterCriteria/CRITERIA_CONFIGURATION.js.map +1 -0
- package/dist/views/FilterCriteria/criteriaGroupToQueryExpression.d.ts +6 -0
- package/dist/views/FilterCriteria/criteriaGroupToQueryExpression.js.map +1 -0
- package/dist/views/FilterCriteria/criteriaGroupToSummary.d.ts +5 -0
- package/dist/views/FilterCriteria/criteriaGroupToSummary.js.map +1 -0
- package/dist/views/FilterCriteria/criteriaToNodes.d.ts +24 -0
- package/dist/views/FilterCriteria/criteriaToNodes.js.map +1 -0
- package/dist/views/FilterCriteria/index.d.ts +23 -0
- package/dist/views/FilterCriteria/index.js.map +1 -0
- package/dist/views/FilterCriteria/models.d.ts +68 -0
- package/dist/views/FilterCriteria/models.js.map +1 -0
- package/dist/views/FilterCriteria/mutateGroup.d.ts +17 -0
- package/dist/views/FilterCriteria/mutateGroup.js.map +1 -0
- package/dist/views/GenericRelatedItemView.d.ts +6 -0
- package/dist/views/GenericRelatedItemView.js.map +1 -0
- package/dist/views/RegisterStakeholder.d.ts +9 -0
- package/dist/views/RegisterStakeholder.js.map +1 -0
- package/dist/views/RegisterVersion.d.ts +9 -0
- package/dist/views/RegisterVersion.js.map +1 -0
- package/dist/views/SearchQuery.d.ts +13 -0
- package/dist/views/SearchQuery.js.map +1 -0
- package/dist/views/change-request/ChangeRequestContext.d.ts +20 -0
- package/dist/views/change-request/ChangeRequestContext.js.map +1 -0
- package/dist/views/change-request/Proposals.d.ts +21 -0
- package/dist/views/change-request/Proposals.js.map +1 -0
- package/dist/views/change-request/objectChangeset.d.ts +31 -0
- package/dist/views/change-request/objectChangeset.js.map +1 -0
- package/dist/views/detail/ChangeRequest/Proposal.d.ts +0 -0
- package/dist/views/detail/ChangeRequest/Proposal.js.map +1 -0
- package/dist/views/detail/ChangeRequest/index.d.ts +13 -0
- package/dist/views/detail/ChangeRequest/index.js.map +1 -0
- package/dist/views/detail/ChangeRequest/transitions.d.ts +28 -0
- package/dist/views/detail/ChangeRequest/transitions.js.map +1 -0
- package/dist/views/detail/CustomView/index.d.ts +13 -0
- package/dist/views/detail/CustomView/index.js.map +1 -0
- package/dist/views/detail/RegisterHome/index.d.ts +5 -0
- package/dist/views/detail/RegisterHome/index.js.map +1 -0
- package/dist/views/detail/RegisterItem/RelatedItems.d.ts +14 -0
- package/{views → dist/views}/detail/RegisterItem/RelatedItems.js +5 -5
- package/dist/views/detail/RegisterItem/RelatedItems.js.map +1 -0
- package/dist/views/detail/RegisterItem/SupersedingItemMenu.js.map +1 -0
- package/dist/views/detail/RegisterItem/index.d.ts +13 -0
- package/{views → dist/views}/detail/RegisterItem/index.js +3 -2
- package/dist/views/detail/RegisterItem/index.js.map +1 -0
- package/dist/views/detail/RegisterMeta/RegisterMetaForm.d.ts +10 -0
- package/dist/views/detail/RegisterMeta/RegisterMetaForm.js.map +1 -0
- package/dist/views/detail/RegisterMeta/index.d.ts +10 -0
- package/dist/views/detail/RegisterMeta/index.js.map +1 -0
- package/dist/views/detail/index.d.ts +1 -0
- package/dist/views/detail/index.js.map +1 -0
- package/dist/views/diffing/InlineDiff.d.ts +12 -0
- package/dist/views/diffing/InlineDiff.js.map +1 -0
- package/dist/views/diffing/StructuredDiff.d.ts +11 -0
- package/dist/views/diffing/StructuredDiff.js.map +1 -0
- package/dist/views/hooks/useCustomView.d.ts +3 -0
- package/dist/views/hooks/useCustomView.js.map +1 -0
- package/dist/views/hooks/useItemClassConfig.d.ts +3 -0
- package/dist/views/hooks/useItemClassConfig.js.map +1 -0
- package/dist/views/hooks/useItemRef.d.ts +3 -0
- package/dist/views/hooks/useItemRef.js.map +1 -0
- package/dist/views/hooks/useSingleRegisterItemData.d.ts +3 -0
- package/dist/views/hooks/useSingleRegisterItemData.js.map +1 -0
- package/dist/views/index.d.ts +7 -0
- package/dist/views/index.js.map +1 -0
- package/dist/views/itemPathUtils.d.ts +52 -0
- package/dist/views/itemPathUtils.js.map +1 -0
- package/dist/views/itemQueryUtils.d.ts +11 -0
- package/dist/views/itemQueryUtils.js.map +1 -0
- package/dist/views/protocolRegistry.d.ts +12 -0
- package/dist/views/protocolRegistry.js.map +1 -0
- package/dist/views/sidebar/Browse/index.d.ts +11 -0
- package/dist/views/sidebar/Browse/index.js.map +1 -0
- package/dist/views/sidebar/Export/index.d.ts +5 -0
- package/dist/views/sidebar/Export/index.js.map +1 -0
- package/dist/views/sidebar/ListItem.d.ts +10 -0
- package/dist/views/sidebar/ListItem.js.map +1 -0
- package/dist/views/sidebar/Registration/index.d.ts +5 -0
- package/dist/views/sidebar/Registration/index.js.map +1 -0
- package/dist/views/sidebar/Search/index.d.ts +18 -0
- package/dist/views/sidebar/Search/index.js.map +1 -0
- package/dist/views/sidebar/index.d.ts +6 -0
- package/dist/views/sidebar/index.js.map +1 -0
- package/dist/views/util.d.ts +36 -0
- package/dist/views/util.js.map +1 -0
- package/package.json +2 -1
- package/react-visual-diff.d.ts +9 -0
- package/views/detail/RegisterItem/RelatedItems.js.map +0 -1
- package/views/detail/RegisterItem/index.js.map +0 -1
- /package/{common.d.ts → compiled/common.d.ts} +0 -0
- /package/{common.js.map → compiled/common.js.map} +0 -0
- /package/{index.d.ts → compiled/index.d.ts} +0 -0
- /package/{index.js.map → compiled/index.js.map} +0 -0
- /package/{migrations → compiled/migrations}/initial.d.ts +0 -0
- /package/{migrations → compiled/migrations}/initial.js.map +0 -0
- /package/{types → compiled/types}/cr.d.ts +0 -0
- /package/{types → compiled/types}/cr.js.map +0 -0
- /package/{types → compiled/types}/index.d.ts +0 -0
- /package/{types → compiled/types}/index.js.map +0 -0
- /package/{types → compiled/types}/item.d.ts +0 -0
- /package/{types → compiled/types}/item.js.map +0 -0
- /package/{types → compiled/types}/proposal.d.ts +0 -0
- /package/{types → compiled/types}/proposal.js.map +0 -0
- /package/{types → compiled/types}/register.d.ts +0 -0
- /package/{types → compiled/types}/register.js.map +0 -0
- /package/{types → compiled/types}/registry.d.ts +0 -0
- /package/{types → compiled/types}/registry.js.map +0 -0
- /package/{types → compiled/types}/stakeholder.d.ts +0 -0
- /package/{types → compiled/types}/stakeholder.js.map +0 -0
- /package/{types → compiled/types}/util.d.ts +0 -0
- /package/{types → compiled/types}/util.js.map +0 -0
- /package/{types → compiled/types}/views.d.ts +0 -0
- /package/{types → compiled/types}/views.js.map +0 -0
- /package/{views → compiled/views}/AnnotatedChange.d.ts +0 -0
- /package/{views → compiled/views}/AnnotatedChange.js.map +0 -0
- /package/{views → compiled/views}/BrowserCtx.d.ts +0 -0
- /package/{views → compiled/views}/BrowserCtx.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/CRITERIA_CONFIGURATION.d.ts +0 -0
- /package/{views → compiled/views}/FilterCriteria/CRITERIA_CONFIGURATION.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/criteriaGroupToQueryExpression.d.ts +0 -0
- /package/{views → compiled/views}/FilterCriteria/criteriaGroupToQueryExpression.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/criteriaGroupToSummary.d.ts +0 -0
- /package/{views → compiled/views}/FilterCriteria/criteriaGroupToSummary.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/criteriaToNodes.d.ts +0 -0
- /package/{views → compiled/views}/FilterCriteria/criteriaToNodes.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/index.d.ts +0 -0
- /package/{views → compiled/views}/FilterCriteria/index.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/models.d.ts +0 -0
- /package/{views → compiled/views}/FilterCriteria/models.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/mutateGroup.d.ts +0 -0
- /package/{views → compiled/views}/FilterCriteria/mutateGroup.js.map +0 -0
- /package/{views → compiled/views}/GenericRelatedItemView.d.ts +0 -0
- /package/{views → compiled/views}/GenericRelatedItemView.js.map +0 -0
- /package/{views → compiled/views}/RegisterStakeholder.d.ts +0 -0
- /package/{views → compiled/views}/RegisterStakeholder.js.map +0 -0
- /package/{views → compiled/views}/RegisterVersion.d.ts +0 -0
- /package/{views → compiled/views}/RegisterVersion.js.map +0 -0
- /package/{views → compiled/views}/SearchQuery.d.ts +0 -0
- /package/{views → compiled/views}/SearchQuery.js.map +0 -0
- /package/{views → compiled/views}/change-request/ChangeRequestContext.d.ts +0 -0
- /package/{views → compiled/views}/change-request/ChangeRequestContext.js.map +0 -0
- /package/{views → compiled/views}/change-request/Proposals.d.ts +0 -0
- /package/{views → compiled/views}/change-request/Proposals.js.map +0 -0
- /package/{views → compiled/views}/change-request/objectChangeset.d.ts +0 -0
- /package/{views → compiled/views}/change-request/objectChangeset.js.map +0 -0
- /package/{views → compiled/views}/detail/ChangeRequest/Proposal.d.ts +0 -0
- /package/{views → compiled/views}/detail/ChangeRequest/Proposal.js.map +0 -0
- /package/{views → compiled/views}/detail/ChangeRequest/index.d.ts +0 -0
- /package/{views → compiled/views}/detail/ChangeRequest/index.js.map +0 -0
- /package/{views → compiled/views}/detail/ChangeRequest/transitions.d.ts +0 -0
- /package/{views → compiled/views}/detail/ChangeRequest/transitions.js.map +0 -0
- /package/{views → compiled/views}/detail/CustomView/index.d.ts +0 -0
- /package/{views → compiled/views}/detail/CustomView/index.js.map +0 -0
- /package/{views → compiled/views}/detail/RegisterHome/index.d.ts +0 -0
- /package/{views → compiled/views}/detail/RegisterHome/index.js.map +0 -0
- /package/{views → compiled/views}/detail/RegisterItem/SupersedingItemMenu.d.ts +0 -0
- /package/{views → compiled/views}/detail/RegisterItem/SupersedingItemMenu.js.map +0 -0
- /package/{views → compiled/views}/detail/RegisterItem/index.d.ts +0 -0
- /package/{views → compiled/views}/detail/RegisterMeta/RegisterMetaForm.d.ts +0 -0
- /package/{views → compiled/views}/detail/RegisterMeta/RegisterMetaForm.js.map +0 -0
- /package/{views → compiled/views}/detail/RegisterMeta/index.d.ts +0 -0
- /package/{views → compiled/views}/detail/RegisterMeta/index.js.map +0 -0
- /package/{views → compiled/views}/detail/index.d.ts +0 -0
- /package/{views → compiled/views}/detail/index.js.map +0 -0
- /package/{views → compiled/views}/diffing/InlineDiff.d.ts +0 -0
- /package/{views → compiled/views}/diffing/InlineDiff.js.map +0 -0
- /package/{views → compiled/views}/diffing/StructuredDiff.d.ts +0 -0
- /package/{views → compiled/views}/diffing/StructuredDiff.js.map +0 -0
- /package/{views → compiled/views}/hooks/useCustomView.d.ts +0 -0
- /package/{views → compiled/views}/hooks/useCustomView.js.map +0 -0
- /package/{views → compiled/views}/hooks/useItemClassConfig.d.ts +0 -0
- /package/{views → compiled/views}/hooks/useItemClassConfig.js.map +0 -0
- /package/{views → compiled/views}/hooks/useItemRef.d.ts +0 -0
- /package/{views → compiled/views}/hooks/useItemRef.js.map +0 -0
- /package/{views → compiled/views}/hooks/useSingleRegisterItemData.d.ts +0 -0
- /package/{views → compiled/views}/hooks/useSingleRegisterItemData.js.map +0 -0
- /package/{views → compiled/views}/index.d.ts +0 -0
- /package/{views → compiled/views}/index.js.map +0 -0
- /package/{views → compiled/views}/itemPathUtils.d.ts +0 -0
- /package/{views → compiled/views}/itemPathUtils.js.map +0 -0
- /package/{views → compiled/views}/itemQueryUtils.d.ts +0 -0
- /package/{views → compiled/views}/itemQueryUtils.js.map +0 -0
- /package/{views → compiled/views}/protocolRegistry.d.ts +0 -0
- /package/{views → compiled/views}/protocolRegistry.js.map +0 -0
- /package/{views → compiled/views}/sidebar/Browse/index.d.ts +0 -0
- /package/{views → compiled/views}/sidebar/Browse/index.js.map +0 -0
- /package/{views → compiled/views}/sidebar/Export/index.d.ts +0 -0
- /package/{views → compiled/views}/sidebar/Export/index.js.map +0 -0
- /package/{views → compiled/views}/sidebar/ListItem.d.ts +0 -0
- /package/{views → compiled/views}/sidebar/ListItem.js.map +0 -0
- /package/{views → compiled/views}/sidebar/Registration/index.d.ts +0 -0
- /package/{views → compiled/views}/sidebar/Registration/index.js.map +0 -0
- /package/{views → compiled/views}/sidebar/Search/index.d.ts +0 -0
- /package/{views → compiled/views}/sidebar/Search/index.js.map +0 -0
- /package/{views → compiled/views}/sidebar/index.d.ts +0 -0
- /package/{views → compiled/views}/sidebar/index.js.map +0 -0
- /package/{views → compiled/views}/util.d.ts +0 -0
- /package/{views → compiled/views}/util.js.map +0 -0
- /package/{types/util.js → dependencies-local/extension-kit/i18n/types.js} +0 -0
- /package/{types/views.js → dependencies-local/extension-kit/types/binary-invocation.js} +0 -0
- /package/{common.js → dist/common.js} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{migrations → dist/migrations}/initial.js +0 -0
- /package/{types → dist/types}/cr.js +0 -0
- /package/{types → dist/types}/index.js +0 -0
- /package/{types → dist/types}/item.js +0 -0
- /package/{types → dist/types}/proposal.js +0 -0
- /package/{types → dist/types}/register.js +0 -0
- /package/{types → dist/types}/registry.js +0 -0
- /package/{types → dist/types}/stakeholder.js +0 -0
- /package/{views → dist/views}/AnnotatedChange.js +0 -0
- /package/{views → dist/views}/BrowserCtx.js +0 -0
- /package/{views → dist/views}/FilterCriteria/CRITERIA_CONFIGURATION.js +0 -0
- /package/{views → dist/views}/FilterCriteria/criteriaGroupToQueryExpression.js +0 -0
- /package/{views → dist/views}/FilterCriteria/criteriaGroupToSummary.js +0 -0
- /package/{views → dist/views}/FilterCriteria/criteriaToNodes.js +0 -0
- /package/{views → dist/views}/FilterCriteria/index.js +0 -0
- /package/{views → dist/views}/FilterCriteria/models.js +0 -0
- /package/{views → dist/views}/FilterCriteria/mutateGroup.js +0 -0
- /package/{views → dist/views}/GenericRelatedItemView.js +0 -0
- /package/{views → dist/views}/RegisterStakeholder.js +0 -0
- /package/{views → dist/views}/RegisterVersion.js +0 -0
- /package/{views → dist/views}/SearchQuery.js +0 -0
- /package/{views → dist/views}/change-request/ChangeRequestContext.js +0 -0
- /package/{views → dist/views}/change-request/Proposals.js +0 -0
- /package/{views → dist/views}/change-request/objectChangeset.js +0 -0
- /package/{views → dist/views}/detail/ChangeRequest/Proposal.js +0 -0
- /package/{views → dist/views}/detail/ChangeRequest/index.js +0 -0
- /package/{views → dist/views}/detail/ChangeRequest/transitions.js +0 -0
- /package/{views → dist/views}/detail/CustomView/index.js +0 -0
- /package/{views → dist/views}/detail/RegisterHome/index.js +0 -0
- /package/{views/detail/RegisterItem/RelatedItems.d.ts → dist/views/detail/RegisterItem/SupersedingItemMenu.d.ts} +0 -0
- /package/{views → dist/views}/detail/RegisterItem/SupersedingItemMenu.js +0 -0
- /package/{views → dist/views}/detail/RegisterMeta/RegisterMetaForm.js +0 -0
- /package/{views → dist/views}/detail/RegisterMeta/index.js +0 -0
- /package/{views → dist/views}/detail/index.js +0 -0
- /package/{views → dist/views}/diffing/InlineDiff.js +0 -0
- /package/{views → dist/views}/diffing/StructuredDiff.js +0 -0
- /package/{views → dist/views}/hooks/useCustomView.js +0 -0
- /package/{views → dist/views}/hooks/useItemClassConfig.js +0 -0
- /package/{views → dist/views}/hooks/useItemRef.js +0 -0
- /package/{views → dist/views}/hooks/useSingleRegisterItemData.js +0 -0
- /package/{views → dist/views}/index.js +0 -0
- /package/{views → dist/views}/itemPathUtils.js +0 -0
- /package/{views → dist/views}/itemQueryUtils.js +0 -0
- /package/{views → dist/views}/protocolRegistry.js +0 -0
- /package/{views → dist/views}/sidebar/Browse/index.js +0 -0
- /package/{views → dist/views}/sidebar/Export/index.js +0 -0
- /package/{views → dist/views}/sidebar/ListItem.js +0 -0
- /package/{views → dist/views}/sidebar/Registration/index.js +0 -0
- /package/{views → dist/views}/sidebar/Search/index.js +0 -0
- /package/{views → dist/views}/sidebar/index.js +0 -0
- /package/{views → dist/views}/util.js +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _context = require("./context");
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
const I18nContextProvider = function (props) {
|
|
17
|
+
const [langConfig, setLangConfig] = (0, _react.useState)({
|
|
18
|
+
available: props.available,
|
|
19
|
+
default: props.default,
|
|
20
|
+
selected: props.selected,
|
|
21
|
+
select: langId => {
|
|
22
|
+
setLangConfig(langConfig => Object.assign({}, langConfig, {
|
|
23
|
+
selected: langId
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return _react.default.createElement(_context.I18nConfigContext.Provider, {
|
|
28
|
+
value: langConfig
|
|
29
|
+
}, props.children);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var _default = I18nContextProvider;
|
|
33
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextProvider.js","sourceRoot":"","sources":["../../src/i18n/ContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAU9C,MAAM,mBAAmB,GAA4C,UAAU,KAAK;IAClF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC;QAC3C,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,OAAO,EAAE,KAAK,CAAC,OAAiB;QAChC,QAAQ,EAAE,KAAK,CAAC,QAAkB;QAClC,MAAM,EAAE,CAAC,MAAoC,EAAE,EAAE;YAC/C,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACnF,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,IAC1C,KAAK,CAAC,QAAQ,CACY,CAC9B,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,mBAAmB,CAAC","sourcesContent":["import React, { useState } from 'react';\n\nimport { SupportedLanguages } from './types';\nimport { I18nConfigContext } from './context';\n\n\nexport type I18nContextProviderProps<Languages extends SupportedLanguages> = {\n available: Languages\n default: keyof Languages\n selected: keyof Languages\n};\n\n\nconst I18nContextProvider: React.FC<I18nContextProviderProps<any>> = function (props) {\n const [langConfig, setLangConfig] = useState({\n available: props.available,\n default: props.default as string,\n selected: props.selected as string,\n select: (langId: keyof typeof props.available) => {\n setLangConfig(langConfig => Object.assign({}, langConfig, { selected: langId }));\n },\n });\n\n return (\n <I18nConfigContext.Provider value={langConfig}>\n {props.children}\n </I18nConfigContext.Provider>\n );\n};\n\n\nexport default I18nContextProvider;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SupportedLanguages, LangConfig } from './types';
|
|
3
|
+
export interface I18nConfigContextSpec extends LangConfig {
|
|
4
|
+
available: SupportedLanguages;
|
|
5
|
+
default: keyof SupportedLanguages & string;
|
|
6
|
+
selected: keyof SupportedLanguages & string;
|
|
7
|
+
select(id: string): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const I18nConfigContext: React.Context<I18nConfigContextSpec>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.I18nConfigContext = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const I18nConfigContext = _react.default.createContext({
|
|
13
|
+
available: {
|
|
14
|
+
en: 'English',
|
|
15
|
+
zh: 'Chinese',
|
|
16
|
+
ru: 'Russian'
|
|
17
|
+
},
|
|
18
|
+
default: 'en',
|
|
19
|
+
selected: 'en',
|
|
20
|
+
select: id => {}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
exports.I18nConfigContext = I18nConfigContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/i18n/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAwB;IAC1E,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE;IAC1D,OAAO,EAAE,IAAa;IACtB,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,CAAC,EAAU,EAAE,EAAE,GAAE,CAAC;CAC3B,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { SupportedLanguages, LangConfig } from './types';\n\n\nexport interface I18nConfigContextSpec extends LangConfig {\n available: SupportedLanguages,\n default: keyof SupportedLanguages & string,\n selected: keyof SupportedLanguages & string,\n select(id: string): void,\n}\n\n\nexport const I18nConfigContext = React.createContext<I18nConfigContextSpec>({\n available: { en: 'English', zh: 'Chinese', ru: 'Russian' },\n default: 'en' as const,\n selected: 'en',\n select: (id: string) => {},\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface SupportedLanguages { [id: string]: string }\nexport interface LangConfig { default: string, selected: string }\nexport interface Translatable<T> { [id: string]: T; }\n\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IButtonGroupProps, IButtonProps } from '@blueprintjs/core';
|
|
3
|
+
import { Translatable } from './types';
|
|
4
|
+
interface TranslatableComponentProps {
|
|
5
|
+
what: Translatable<string>;
|
|
6
|
+
}
|
|
7
|
+
export declare const Trans: React.FC<TranslatableComponentProps>;
|
|
8
|
+
interface LangSelectorProps {
|
|
9
|
+
value?: Translatable<any>;
|
|
10
|
+
groupProps?: IButtonGroupProps;
|
|
11
|
+
exclude?: string[];
|
|
12
|
+
untranslatedProps?: IButtonProps;
|
|
13
|
+
translatedProps?: IButtonProps;
|
|
14
|
+
}
|
|
15
|
+
export declare const LangSelector: React.FC<LangSelectorProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LangSelector = exports.Trans = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _core = require("@blueprintjs/core");
|
|
11
|
+
|
|
12
|
+
var _context = require("./context");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
const Trans = function ({
|
|
19
|
+
what
|
|
20
|
+
}) {
|
|
21
|
+
const i18n = (0, _react.useContext)(_context.I18nConfigContext);
|
|
22
|
+
const translated = what[i18n.selected];
|
|
23
|
+
const untranslated = what[i18n.default];
|
|
24
|
+
return _react.default.createElement("span", null, translated || untranslated || '(malformed translatable string)');
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.Trans = Trans;
|
|
28
|
+
|
|
29
|
+
const LangSelector = function ({
|
|
30
|
+
exclude,
|
|
31
|
+
value,
|
|
32
|
+
untranslatedProps,
|
|
33
|
+
translatedProps,
|
|
34
|
+
groupProps
|
|
35
|
+
}) {
|
|
36
|
+
const i18n = (0, _react.useContext)(_context.I18nConfigContext);
|
|
37
|
+
return _react.default.createElement(_core.ButtonGroup, Object.assign({}, groupProps), Object.keys(i18n.available).filter(langID => (exclude || []).indexOf(langID) < 0).map(langId => _react.default.createElement(LangSelectorButton, {
|
|
38
|
+
key: langId,
|
|
39
|
+
id: langId,
|
|
40
|
+
title: i18n.available[langId],
|
|
41
|
+
isSelected: langId === i18n.selected,
|
|
42
|
+
onSelect: () => i18n.select(langId),
|
|
43
|
+
untranslatedProps: untranslatedProps,
|
|
44
|
+
translatedProps: translatedProps,
|
|
45
|
+
hasTranslation: value !== undefined ? value[langId] !== undefined : undefined
|
|
46
|
+
})));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.LangSelector = LangSelector;
|
|
50
|
+
|
|
51
|
+
const LangSelectorButton = function (props) {
|
|
52
|
+
return _react.default.createElement(_core.Button, Object.assign({
|
|
53
|
+
active: props.isSelected,
|
|
54
|
+
onClick: props.onSelect
|
|
55
|
+
}, !props.hasTranslation ? props.untranslatedProps : {}, props.hasTranslation ? props.translatedProps : {}), props.id);
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgets.js","sourceRoot":"","sources":["../../src/i18n/widgets.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAmC,MAAM,mBAAmB,CAAC;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAM9C,MAAM,CAAC,MAAM,KAAK,GAAyC,UAAU,EAAE,IAAI,EA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AO,CACL,oBAAC,MAAM,kBACH,MAAM,EAAE,KAAK,CAAC,UAAU,EACxB,OAAO,EAAE,KAAK,CAAC,QAAQ,IACnB,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,EACtD,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,GACxD,KAAK,CAAC,EAAE,CACF,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useContext } from 'react';\nimport { Button, ButtonGroup, IButtonGroupProps, IButtonProps } from '@blueprintjs/core';\nimport { Translatable } from './types';\nimport { I18nConfigContext } from './context';\n\n\ninterface TranslatableComponentProps {\n what: Translatable<string>\n}\nexport const Trans: React.FC<TranslatableComponentProps> = function ({ what }) {\n const i18n = useContext(I18nConfigContext);\n const translated = what[i18n.selected];\n const untranslated = what[i18n.default];\n\n return <span>{translated || untranslated || '(malformed translatable string)'}</span>;\n};\n\n\ninterface LangSelectorProps {\n value?: Translatable<any>\n groupProps?: IButtonGroupProps\n exclude?: string[]\n untranslatedProps?: IButtonProps\n translatedProps?: IButtonProps\n}\nexport const LangSelector: React.FC<LangSelectorProps> =\nfunction ({ exclude, value, untranslatedProps, translatedProps, groupProps }) {\n const i18n = useContext(I18nConfigContext);\n\n return (\n <ButtonGroup {...groupProps}>\n {Object.keys(i18n.available).\n filter(langID => (exclude || []).indexOf(langID) < 0).\n map(langId =>\n <LangSelectorButton\n key={langId}\n id={langId}\n title={i18n.available[langId]}\n isSelected={langId === i18n.selected}\n onSelect={() => i18n.select(langId)}\n untranslatedProps={untranslatedProps}\n translatedProps={translatedProps}\n hasTranslation={(value !== undefined) ? (value[langId] !== undefined) : undefined}\n />\n )}\n </ButtonGroup>\n );\n};\n\n\ninterface LangSelectorButtonProps {\n id: string\n title: string\n isSelected: boolean\n onSelect: () => void\n hasTranslation?: boolean\n untranslatedProps?: IButtonProps\n translatedProps?: IButtonProps\n}\nconst LangSelectorButton: React.FC<LangSelectorButtonProps> = function (props) {\n return (\n <Button\n active={props.isSelected}\n onClick={props.onSelect}\n {...(!props.hasTranslation ? props.untranslatedProps : {})}\n {...(props.hasTranslation ? props.translatedProps : {})}>\n {props.id}\n </Button>\n );\n};\n"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.makeExtension = void 0;
|
|
7
|
+
|
|
8
|
+
var _semver = _interopRequireDefault(require("semver"));
|
|
9
|
+
|
|
10
|
+
require("electron");
|
|
11
|
+
|
|
12
|
+
var _electronLog = _interopRequireDefault(require("electron-log"));
|
|
13
|
+
|
|
14
|
+
var _context = require("./context");
|
|
15
|
+
|
|
16
|
+
var _objectSpecs = require("./object-specs");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
/* The default export of Paneron extension’s extension.ts entry file
|
|
21
|
+
should be the result of calling this function. */
|
|
22
|
+
const makeExtension = async options => {
|
|
23
|
+
var _a;
|
|
24
|
+
|
|
25
|
+
let plugin;
|
|
26
|
+
const objectSpecs = (_a = options.objects) !== null && _a !== void 0 ? _a : [];
|
|
27
|
+
|
|
28
|
+
if (process.type === 'browser') {
|
|
29
|
+
const migration = options.datasetInitializer ? (await options.datasetInitializer()).default : async () => ({
|
|
30
|
+
bufferChangeset: {},
|
|
31
|
+
versionAfter: '1.0'
|
|
32
|
+
});
|
|
33
|
+
plugin = {
|
|
34
|
+
isCompatible: hostAppVersion => options.requiredHostAppVersion !== undefined && _semver.default.satisfies(hostAppVersion, options.requiredHostAppVersion),
|
|
35
|
+
getObjectSpecs: () => {
|
|
36
|
+
return objectSpecs;
|
|
37
|
+
},
|
|
38
|
+
getMigration: datasetVersion => Object.entries(options.datasetMigrations || {}).filter(([migrationVersionSpec, _]) => _semver.default.satisfies(datasetVersion, migrationVersionSpec)).map(([versionSpec, migration]) => ({
|
|
39
|
+
versionSpec,
|
|
40
|
+
migration
|
|
41
|
+
}))[0],
|
|
42
|
+
initialMigration: migration
|
|
43
|
+
};
|
|
44
|
+
} else if (process.type === 'renderer') {
|
|
45
|
+
const mainViewImportResult = options.mainView || options.repoView ? await (options.mainView ||
|
|
46
|
+
/* Deprecated */
|
|
47
|
+
options.repoView)() : undefined;
|
|
48
|
+
const objectSpecsWithCachedViews = await Promise.all(objectSpecs.filter(spec => spec.views !== undefined).map(async spec => Object.assign(Object.assign({}, spec), {
|
|
49
|
+
_viewCache: (await spec.views()).default
|
|
50
|
+
})));
|
|
51
|
+
plugin = {
|
|
52
|
+
mainView: mainViewImportResult ? (0, _context.withDatasetContext)(mainViewImportResult.default) : undefined,
|
|
53
|
+
getObjectView: ({
|
|
54
|
+
objectPath,
|
|
55
|
+
viewID
|
|
56
|
+
}) => {
|
|
57
|
+
const spec = Object.values(objectSpecsWithCachedViews).find(c => (0, _objectSpecs.matchesPath)(objectPath, c.matches));
|
|
58
|
+
|
|
59
|
+
if (spec) {
|
|
60
|
+
const view = spec._viewCache[viewID];
|
|
61
|
+
return view;
|
|
62
|
+
} else {
|
|
63
|
+
_electronLog.default.error("Unable to find object view for object path", objectPath, viewID);
|
|
64
|
+
|
|
65
|
+
throw new Error("Cannot find object view");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
} else {
|
|
70
|
+
_electronLog.default.error("Paneron extension: Unsupported process type", options.name);
|
|
71
|
+
|
|
72
|
+
throw new Error("Unsupported process type");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return plugin;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.makeExtension = makeExtension;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":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GAAG,CAAC,KAAK,CAAC,4CAA4C,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;oBAC5E,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;iBAC5C;YACH,CAAC;SACF,CAAC;KAEH;SAAM;QACL,GAAG,CAAC,KAAK,CAAC,6CAA6C,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;KAC7C;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAA","sourcesContent":["import semver from 'semver';\nimport 'electron';\nimport log from 'electron-log';\nimport type { Extension } from './types/extension';\nimport type { ExtensionMaker } from './types/extension-maker';\nimport type { DatasetMigrationFunction } from './types/migrations';\nimport { withDatasetContext } from './context';\nimport { matchesPath } from './object-specs';\n\n\n/* The default export of Paneron extension’s extension.ts entry file\n should be the result of calling this function. */\nexport const makeExtension: ExtensionMaker = async (options) => {\n let plugin: Extension;\n\n const objectSpecs = options.objects ?? [];\n\n if (process.type === 'browser') {\n const migration: DatasetMigrationFunction = options.datasetInitializer\n ? (await options.datasetInitializer()).default\n : async () => ({\n bufferChangeset: {},\n versionAfter: '1.0',\n });\n\n plugin = {\n\n isCompatible: (hostAppVersion: string) => (\n options.requiredHostAppVersion !== undefined &&\n semver.satisfies(hostAppVersion, options.requiredHostAppVersion)\n ),\n\n getObjectSpecs: () => {\n return objectSpecs;\n },\n\n getMigration: (datasetVersion) => (\n Object.entries(options.datasetMigrations || {}).\n filter(([migrationVersionSpec, _]) =>\n semver.satisfies(datasetVersion, migrationVersionSpec)\n ).\n map(([versionSpec, migration]) =>\n ({ versionSpec, migration })\n )[0]\n ),\n\n initialMigration: migration,\n };\n\n } else if (process.type === 'renderer') {\n const mainViewImportResult = (options.mainView || (options as any).repoView)\n ? await (\n options.mainView ||\n /* Deprecated */(options as any).repoView\n )()\n : undefined;\n\n const objectSpecsWithCachedViews = (await Promise.all(objectSpecs.\n filter(spec => spec.views !== undefined).\n map(async (spec) => ({ ...spec, _viewCache: (await spec.views!()).default }))));\n\n plugin = {\n mainView: mainViewImportResult\n ? withDatasetContext(mainViewImportResult.default)\n : undefined,\n\n getObjectView: ({ objectPath, viewID }) => {\n const spec = Object.values(objectSpecsWithCachedViews).\n find(c => matchesPath(objectPath, c.matches));\n if (spec) {\n const view = spec._viewCache[viewID];\n return view;\n } else {\n log.error(\"Unable to find object view for object path\", objectPath, viewID);\n throw new Error(\"Cannot find object view\");\n }\n },\n };\n\n } else {\n log.error(\"Paneron extension: Unsupported process type\", options.name);\n throw new Error(\"Unsupported process type\");\n }\n\n return plugin;\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.matchesPath = matchesPath;
|
|
7
|
+
|
|
8
|
+
function matchesPath(p, rule) {
|
|
9
|
+
// Match by default
|
|
10
|
+
let matched = true; // Narrow by path prefix
|
|
11
|
+
|
|
12
|
+
if (rule.pathPrefix) {
|
|
13
|
+
matched = p.startsWith(rule.pathPrefix);
|
|
14
|
+
} // Narrow by path-matching function
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
if (matched && rule.path) {
|
|
18
|
+
matched = matched && rule.path(p);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return matched;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/object-specs/index.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,WAAW,CAAC,CAAS,EAAE,IAAiB;IACtD,mBAAmB;IACnB,IAAI,OAAO,GAAY,IAAI,CAAC;IAE5B,wBAAwB;IACxB,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,OAAO,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACzC;IAED,mCAAmC;IACnC,IAAI,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE;QACxB,OAAO,GAAG,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACnC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import type { PathMatcher } from '../types/object-spec';\n\n\nexport function matchesPath(p: string, rule: PathMatcher): boolean {\n // Match by default\n let matched: boolean = true;\n\n // Narrow by path prefix\n if (rule.pathPrefix) {\n matched = p.startsWith(rule.pathPrefix);\n }\n\n // Narrow by path-matching function\n if (matched && rule.path) {\n matched = matched && rule.path(p);\n }\n\n return matched;\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SerDesRule } from '../types/object-spec';
|
|
2
|
+
import { OnlyJSON } from '../util';
|
|
3
|
+
export declare const utf8Decoder: TextDecoder;
|
|
4
|
+
export declare function makePaneronObjectCompositeSerDesRule<T extends Record<string, any> & OnlyJSON<Record<string, any>> = any>(): SerDesRule<T>;
|
|
5
|
+
export declare function unflattenObject<T extends Record<string, any>>(parts: Record<string, any>): T;
|
|
6
|
+
export declare function flattenObject(obj: Record<string, any>, _prefix?: false | string, _result?: Record<string, any> | null): Record<string, any>;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.makePaneronObjectCompositeSerDesRule = makePaneronObjectCompositeSerDesRule;
|
|
7
|
+
exports.unflattenObject = unflattenObject;
|
|
8
|
+
exports.flattenObject = flattenObject;
|
|
9
|
+
exports.utf8Decoder = void 0;
|
|
10
|
+
|
|
11
|
+
var _path = _interopRequireDefault(require("path"));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
const utf8Decoder = new TextDecoder('utf-8');
|
|
16
|
+
exports.utf8Decoder = utf8Decoder;
|
|
17
|
+
const stringSerDes = {
|
|
18
|
+
deserialize: buf => utf8Decoder.decode(buf),
|
|
19
|
+
serialize: val => Buffer.from(val, 'utf-8')
|
|
20
|
+
};
|
|
21
|
+
const numberSerDes = {
|
|
22
|
+
deserialize: buf => parseInt(utf8Decoder.decode(buf), 10),
|
|
23
|
+
serialize: val => Buffer.from(val.toString(), 'utf-8')
|
|
24
|
+
};
|
|
25
|
+
const partSerDes = {
|
|
26
|
+
'text': stringSerDes,
|
|
27
|
+
'number': numberSerDes
|
|
28
|
+
}; //const EXT = '.pan';
|
|
29
|
+
|
|
30
|
+
/* Creates a spec for objects where a serialized object
|
|
31
|
+
is represented as a tree of buffers.
|
|
32
|
+
|
|
33
|
+
An object is represented as comprised from “parts”,
|
|
34
|
+
where each part corresponds to a buffer (e.g., file).
|
|
35
|
+
|
|
36
|
+
The default behavior is such that e.g.
|
|
37
|
+
|
|
38
|
+
{ title: "Hello world", foo: { bar: baz } }
|
|
39
|
+
|
|
40
|
+
after disassembly (basic flattening) would be represented as:
|
|
41
|
+
|
|
42
|
+
{ "/title": "Hello world", "/foo/bar": "baz" }
|
|
43
|
+
|
|
44
|
+
(On disk, title and foo/bar would be paths to files
|
|
45
|
+
relative to object root path.)
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
function makePaneronObjectCompositeSerDesRule() {
|
|
49
|
+
const assemble = unflattenObject;
|
|
50
|
+
const disassemble = flattenObject;
|
|
51
|
+
return {
|
|
52
|
+
deserialize: (rawData, opts) => {
|
|
53
|
+
function deserializePart(buf, partPath) {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
|
|
56
|
+
return partSerDes[(_b = (_a = opts.parts[partPath]) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : 'text'].deserialize(buf);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const parts = deserializeParts(rawData, deserializePart);
|
|
60
|
+
return assemble(parts);
|
|
61
|
+
},
|
|
62
|
+
serialize: (obj, opts) => {
|
|
63
|
+
function serializePart(data, partPath) {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
|
|
66
|
+
return partSerDes[(_b = (_a = opts.parts[partPath]) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : 'text'].serialize(data);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const parts = disassemble(obj);
|
|
70
|
+
return serializeParts(parts, serializePart);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
} // Object flattening and unflattening is based
|
|
74
|
+
// on original implementation from Tofandel’s answer: https://stackoverflow.com/a/59787588/247441
|
|
75
|
+
|
|
76
|
+
/* Aggregates parts (mapped to slash-separated paths) into a nested object.
|
|
77
|
+
|
|
78
|
+
E.g.:
|
|
79
|
+
|
|
80
|
+
{ /some/path: A, /foo: B, /some/other/path: C }
|
|
81
|
+
|
|
82
|
+
gets turned into:
|
|
83
|
+
|
|
84
|
+
{ foo: B, some: { path: A, other: { path: C } } }
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
function unflattenObject(parts) {
|
|
89
|
+
const result = {}; // Ideally should be typed as Partial<T>, but that causes problems down the line
|
|
90
|
+
|
|
91
|
+
for (const partPath of Object.keys(parts)) {
|
|
92
|
+
if (Object.prototype.hasOwnProperty.call(parts, partPath)) {
|
|
93
|
+
const keys = partPath.match(/^\/+[^\/]*|[^\/]*\/+$|(?:\/{2,}|[^\/])+(?:\/+$)?/g); // Matches a standalone slash in a key
|
|
94
|
+
//const keys = partPath.match(/^\.+[^.]*|[^.]*\.+$|(?:\.{2,}|[^.])+(?:\.+$)?/g);
|
|
95
|
+
|
|
96
|
+
if (keys) {
|
|
97
|
+
keys.reduce((accumulator, val, idx) => {
|
|
98
|
+
return accumulator[val] || (accumulator[val] = isNaN(Number(keys[idx + 1])) ? keys.length - 1 === idx ? parts[partPath] : {} : []);
|
|
99
|
+
}, result);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
/* Recursively decomposes an arbitrarily nested object into a flat record
|
|
107
|
+
of slash-separated part paths mapped to respective structures.
|
|
108
|
+
|
|
109
|
+
E.g.:
|
|
110
|
+
|
|
111
|
+
{ foo: B, some: { path: A, other: { path: C } } }
|
|
112
|
+
|
|
113
|
+
gets turned into:
|
|
114
|
+
|
|
115
|
+
{ /some/path: A, /foo: B, /some/other/path: C }
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
function flattenObject(obj, _prefix = false, _result = null) {
|
|
120
|
+
const result = _result || {}; // Preserve empty objects and arrays, they are lost otherwise
|
|
121
|
+
|
|
122
|
+
if (_prefix !== false && typeof obj === 'object' && obj !== null && Object.keys(obj).length === 0) {
|
|
123
|
+
result[_prefix] = Array.isArray(obj) ? [] : {};
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const prefix = _prefix !== false ? _prefix + _path.default.posix.sep : _path.default.posix.sep;
|
|
128
|
+
|
|
129
|
+
for (const i in obj) {
|
|
130
|
+
if (Object.prototype.hasOwnProperty.call(obj, i)) {
|
|
131
|
+
if (typeof obj[i] === 'object' && obj[i] !== null) {
|
|
132
|
+
// Recursion on deeper objects
|
|
133
|
+
flattenObject(obj[i], prefix + i, result);
|
|
134
|
+
} else {
|
|
135
|
+
result[prefix + i] = obj[i];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function deserializeParts(buffers, partFromBuffer) {
|
|
144
|
+
const result = {};
|
|
145
|
+
|
|
146
|
+
for (const [p, buffer] of Object.entries(buffers)) {
|
|
147
|
+
result[p] = partFromBuffer(buffer, p);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return result;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function serializeParts(parts, partToBuffer) {
|
|
154
|
+
const result = {};
|
|
155
|
+
|
|
156
|
+
for (const [p, part] of Object.entries(parts)) {
|
|
157
|
+
result[p] = partToBuffer(part, p);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paneron-object.js","sourceRoot":"","sources":["../../src/object-specs/paneron-object.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAKxB,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;AASpD,MAAM,YAAY,GAAuB;IACvC,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC;IAC7C,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC;CAC9C,CAAC;AAEF,MAAM,YAAY,GAAuB;IACvC,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;IAC3D,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC;CACzD,CAAC;AAEF,MAAM,UAAU,GAA2C;IACzD,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,YAAY;CACvB,CAAC;AAeF,qBAAqB;AAGrB;;;;;;;;;;;;;;;;EAgBE;AACF,MAAM,UAAU,oCAAoC;IAIlD,MAAM,QAAQ,GAAqB,eAAe,CAAC;IACnD,MAAM,WAAW,GAAoC,aAAa,CAAC;IAEnE,OAAO;QACL,WAAW,EAAE,CAAC,OAAO,EAAE,IAAmB,EAAE,EAAE;YAC5C,SAAS,eAAe,CAAC,GAAe,EAAE,QAAgB;;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AI,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;gBACjD,8BAA8B;gBAC9B,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;aAC3C;iBAAM;gBACL,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;aAC7B;SACF;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAGD,SAAS,gBAAgB,CACvB,OAAmC,EACnC,cAAyD;IAEzD,MAAM,MAAM,GAAwB,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACjD,MAAM,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;KACvC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAGD,SAAS,cAAc,CACrB,KAA0B,EAC1B,YAAqD;IAErD,MAAM,MAAM,GAA+B,EAAE,CAAC;IAC9C,KAAK,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC7C,MAAM,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;KACnC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import path from 'path';\nimport { SerDesRule } from '../types/object-spec';\nimport { OnlyJSON } from '../util';\n\n\nexport const utf8Decoder = new TextDecoder('utf-8');\n\n\ninterface PartSerDes<T> {\n deserialize: (buf: Uint8Array) => T\n serialize: (obj: T) => Uint8Array\n}\n\n\nconst stringSerDes: PartSerDes<string> = {\n deserialize: (buf) => utf8Decoder.decode(buf),\n serialize: (val) => Buffer.from(val, 'utf-8'),\n};\n\nconst numberSerDes: PartSerDes<number> = {\n deserialize: (buf) => parseInt(utf8Decoder.decode(buf), 10),\n serialize: (val) => Buffer.from(val.toString(), 'utf-8'),\n};\n\nconst partSerDes: { [key in DataType]: PartSerDes<any> } = {\n 'text': stringSerDes,\n 'number': numberSerDes,\n};\n\n\ninterface PartSerDesOptions {\n dataType: DataType\n}\n\ninterface SerDesOptions {\n parts: {\n [propertyPath: string]: PartSerDesOptions\n }\n}\n\ntype DataType = 'text' | 'number';\n\n//const EXT = '.pan';\n\n\n/* Creates a spec for objects where a serialized object\n is represented as a tree of buffers.\n\n An object is represented as comprised from “parts”,\n where each part corresponds to a buffer (e.g., file).\n\n The default behavior is such that e.g.\n\n { title: \"Hello world\", foo: { bar: baz } }\n\n after disassembly (basic flattening) would be represented as:\n\n { \"/title\": \"Hello world\", \"/foo/bar\": \"baz\" }\n\n (On disk, title and foo/bar would be paths to files\n relative to object root path.)\n*/\nexport function makePaneronObjectCompositeSerDesRule\n<T extends Record<string, any> & OnlyJSON<Record<string, any>> = any>\n():\nSerDesRule<T> {\n const assemble: (data: any) => T = unflattenObject;\n const disassemble: (obj: T) => Record<string, any> = flattenObject;\n\n return {\n deserialize: (rawData, opts: SerDesOptions) => {\n function deserializePart(buf: Uint8Array, partPath: string): any {\n return partSerDes[opts.parts[partPath]?.dataType ?? 'text'].deserialize(buf);\n }\n const parts = deserializeParts(rawData, deserializePart);\n return assemble(parts);\n },\n serialize: (obj, opts: SerDesOptions) => {\n function serializePart(data: any, partPath: string): Uint8Array {\n return partSerDes[opts.parts[partPath]?.dataType ?? 'text'].serialize(data);\n }\n const parts = disassemble(obj);\n return serializeParts(parts, serializePart);\n },\n };\n}\n\n\n// Object flattening and unflattening is based\n// on original implementation from Tofandel’s answer: https://stackoverflow.com/a/59787588/247441\n\n/* Aggregates parts (mapped to slash-separated paths) into a nested object.\n\n E.g.:\n\n { /some/path: A, /foo: B, /some/other/path: C }\n \n gets turned into:\n\n { foo: B, some: { path: A, other: { path: C } } }\n*/\n\nexport function unflattenObject<T extends Record<string, any>>\n(parts: Record<string, any>): T {\n const result: Record<string, any> = {};\n // Ideally should be typed as Partial<T>, but that causes problems down the line\n\n for (const partPath of Object.keys(parts)) {\n if (Object.prototype.hasOwnProperty.call(parts, partPath)) {\n\n const keys = partPath.match(/^\\/+[^\\/]*|[^\\/]*\\/+$|(?:\\/{2,}|[^\\/])+(?:\\/+$)?/g);\n // Matches a standalone slash in a key\n //const keys = partPath.match(/^\\.+[^.]*|[^.]*\\.+$|(?:\\.{2,}|[^.])+(?:\\.+$)?/g);\n\n if (keys) {\n keys.reduce((accumulator, val, idx) => {\n return accumulator[val] || (\n (accumulator[val] = isNaN(Number(keys[idx + 1]))\n ? (keys.length - 1 === idx\n ? parts[partPath]\n : {})\n : [])\n );\n }, result);\n }\n }\n }\n\n return result as T;\n}\n\n\n/* Recursively decomposes an arbitrarily nested object into a flat record\n of slash-separated part paths mapped to respective structures.\n\n E.g.:\n\n { foo: B, some: { path: A, other: { path: C } } }\n \n gets turned into:\n\n { /some/path: A, /foo: B, /some/other/path: C }\n*/\nexport function flattenObject(\n obj: Record<string, any>,\n _prefix: false | string = false,\n _result: Record<string, any> | null = null,\n): Record<string, any> {\n const result: Record<string, any> = _result || {};\n\n // Preserve empty objects and arrays, they are lost otherwise\n if (_prefix !== false &&\n typeof obj === 'object' &&\n obj !== null &&\n Object.keys(obj).length === 0) {\n result[_prefix] = Array.isArray(obj) ? [] : {};\n return result;\n }\n\n const prefix = _prefix !== false\n ? (_prefix + path.posix.sep)\n : path.posix.sep;\n\n for (const i in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\n if (typeof obj[i] === 'object' && obj[i] !== null) {\n // Recursion on deeper objects\n flattenObject(obj[i], prefix + i, result);\n } else {\n result[prefix + i] = obj[i];\n }\n }\n }\n return result;\n}\n\n\nfunction deserializeParts(\n buffers: Record<string, Uint8Array>,\n partFromBuffer: (buffer: Uint8Array, path: string) => any,\n): Record<string, any> {\n const result: Record<string, any> = {};\n for (const [p, buffer] of Object.entries(buffers)) {\n result[p] = partFromBuffer(buffer, p);\n }\n return result;\n}\n\n\nfunction serializeParts(\n parts: Record<string, any>,\n partToBuffer: (data: any, path: string) => Uint8Array,\n): Record<string, Uint8Array> {\n const result: Record<string, Uint8Array> = {};\n for (const [p, part] of Object.entries(parts)) {\n result[p] = partToBuffer(part, p);\n }\n return result;\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialization/deserialization rules describe how physical buffers
|
|
3
|
+
* are represented as JS structures at runtime.
|
|
4
|
+
*
|
|
5
|
+
* This is Node-only code due to use of Buffer API.
|
|
6
|
+
*/
|
|
7
|
+
import { PointerInfo as LFSPointerInfo } from '@riboseinc/isogit-lfs/pointers';
|
|
8
|
+
import { SerDesRule, SerDesRuleName, SerDesRuleNameExtensionMap } from '../types/object-spec';
|
|
9
|
+
import type { OnlyJSON } from '../util';
|
|
10
|
+
import type { BufferDataset } from '../types/buffers';
|
|
11
|
+
/** Returns serialization/deserialization rule that works for given object. */
|
|
12
|
+
export declare function findSerDesRuleForObject(objPath: string, obj: Record<string, any>, overrides?: {
|
|
13
|
+
extensions?: SerDesRuleNameExtensionMap;
|
|
14
|
+
}): SerDesRule;
|
|
15
|
+
/** Returns serialization/deserialization rule that works for given buffer dataset. */
|
|
16
|
+
export declare function findSerDesRuleForBuffers(objPath: string, buffers: BufferDataset, overrides?: {
|
|
17
|
+
extensions?: SerDesRuleNameExtensionMap;
|
|
18
|
+
}): SerDesRule;
|
|
19
|
+
export declare function getSerDesRuleByName(ruleName: SerDesRuleName): SerDesRule;
|
|
20
|
+
export declare const lfsPointer: SerDesRule<{
|
|
21
|
+
lfsPointerInfo: LFSPointerInfo;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const textFile: SerDesRule<{
|
|
24
|
+
asText: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const jsonFile: SerDesRule<OnlyJSON<Record<string, any>>>;
|
|
27
|
+
export declare const yamlFile: SerDesRule<OnlyJSON<Record<string, any>>>;
|
|
28
|
+
export declare const binaryFile: SerDesRule<{
|
|
29
|
+
binaryData: Uint8Array;
|
|
30
|
+
asBase64: string;
|
|
31
|
+
}>;
|