@ynput/ayon-frontend-shared 0.3.1 → 0.3.3
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/dist/node_modules/web-namespaces/index.cjs.js +1 -1
- package/dist/node_modules/web-namespaces/index.cjs.js.map +1 -1
- package/dist/node_modules/web-namespaces/index.es.js +3 -8
- package/dist/node_modules/web-namespaces/index.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.cjs.js +12 -8
- package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.es.js +11 -7
- package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.es.js.map +1 -1
- package/dist/shared/src/api/queries/entities/updateEntity.cjs.js +1 -1
- package/dist/shared/src/api/queries/entities/updateEntity.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/entities/updateEntity.es.js +125 -120
- package/dist/shared/src/api/queries/entities/updateEntity.es.js.map +1 -1
- package/dist/shared/src/api/queries/views/updateViews.cjs.js +1 -1
- package/dist/shared/src/api/queries/views/updateViews.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/views/updateViews.es.js +68 -63
- package/dist/shared/src/api/queries/views/updateViews.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js +30 -28
- package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.es.js +74 -56
- package/dist/shared/src/components/LinksManager/LinksManager.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.styled.cjs.js +2 -1
- package/dist/shared/src/components/LinksManager/LinksManager.styled.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.styled.es.js +5 -4
- package/dist/shared/src/components/LinksManager/LinksManager.styled.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js +2 -2
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js +66 -61
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/Feed.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/Feed.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/Feed.es.js +123 -113
- package/dist/shared/src/containers/Feed/Feed.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.es.js +6 -6
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js +3 -3
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js +178 -172
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js +42 -41
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.cjs.js +2 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.es.js +10 -10
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js +26 -26
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js.map +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.es.js +53 -51
- package/dist/shared/src/containers/Views/context/ViewsContext.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js +95 -52
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js +13 -13
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js.map +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js +38 -37
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js.map +1 -1
- package/dist/shared/src/hooks/useLoadModules.cjs.js +1 -1
- package/dist/shared/src/hooks/useLoadModules.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useLoadModules.es.js +86 -80
- package/dist/shared/src/hooks/useLoadModules.es.js.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +2 -1
- package/dist/types/api/generated/graphqlLinks.d.ts +1 -0
- package/dist/types/components/LinksManager/LinkManagerItem.d.ts +1 -0
- package/dist/types/containers/Views/context/ViewsContext.d.ts +1 -0
- package/dist/types/containers/Views/hooks/useBaseViewMutations.d.ts +5 -2
- package/package.json +2 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js +0 -63
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/index.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/index.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/index.es.js +0 -12
- package/dist/node_modules/@ungap/structured-clone/esm/index.es.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js +0 -107
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/types.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/types.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/types.es.js +0 -14
- package/dist/node_modules/@ungap/structured-clone/esm/types.es.js.map +0 -1
- package/dist/node_modules/devlop/lib/default.cjs.js +0 -2
- package/dist/node_modules/devlop/lib/default.cjs.js.map +0 -1
- package/dist/node_modules/devlop/lib/default.es.js +0 -6
- package/dist/node_modules/devlop/lib/default.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode-codepoint.cjs.js +0 -2
- package/dist/node_modules/entities/dist/esm/decode-codepoint.cjs.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode-codepoint.es.js +0 -39
- package/dist/node_modules/entities/dist/esm/decode-codepoint.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode.cjs.js +0 -2
- package/dist/node_modules/entities/dist/esm/decode.cjs.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode.es.js +0 -246
- package/dist/node_modules/entities/dist/esm/decode.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.cjs.js +0 -2
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.cjs.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.es.js +0 -8
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/lib/index.es.js +0 -218
- package/dist/node_modules/hast-util-raw/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.es.js +0 -146
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js +0 -21
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.es.js +0 -113
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.es.js +0 -9
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.es.js +0 -45
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.es.js +0 -26
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.es.js +0 -99
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.es.js +0 -8
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.es.js +0 -211
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.es.js +0 -251
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.es.js +0 -15
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.es.js +0 -74
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.es.js +0 -85
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.es.js +0 -2272
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.es.js +0 -241
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.es.js +0 -3
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.es.js +0 -1941
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.es.js +0 -89
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.es.js +0 -163
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.es.js +0 -13
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.es.js +0 -62
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.es.js +0 -34
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.es.js +0 -369
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.es.js +0 -7
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.es.js +0 -567
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.es.js +0 -8
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.es.js +0 -7
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.es.js +0 -20
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.es.js +0 -37
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.es.js +0 -29
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.es.js +0 -11
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.es.js +0 -22
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.es.js +0 -15
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.es.js +0 -20
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.es.js +0 -12
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.es.js +0 -12
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.cjs.js +0 -3
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.es.js +0 -43
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.es.js +0 -119
- package/dist/node_modules/hast-util-to-parse5/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.es.js +0 -13
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.es.js +0 -62
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.es.js +0 -34
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.es.js +0 -369
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.es.js +0 -7
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.es.js +0 -567
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.es.js +0 -8
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.es.js +0 -7
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.es.js +0 -20
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.es.js +0 -37
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.es.js +0 -29
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.es.js +0 -11
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.es.js +0 -22
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.es.js +0 -15
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.es.js +0 -20
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.es.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.es.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.es.js.map +0 -1
- package/dist/node_modules/rehype-raw/lib/index.cjs.js +0 -2
- package/dist/node_modules/rehype-raw/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/rehype-raw/lib/index.es.js +0 -13
- package/dist/node_modules/rehype-raw/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-is/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-is/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-is/lib/index.es.js +0 -92
- package/dist/node_modules/unist-util-is/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-position/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-position/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-position/lib/index.es.js +0 -18
- package/dist/node_modules/unist-util-position/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-visit/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-visit/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-visit/lib/index.es.js +0 -17
- package/dist/node_modules/unist-util-visit/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/color.cjs.js +0 -2
- package/dist/node_modules/unist-util-visit-parents/lib/color.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/color.es.js +0 -7
- package/dist/node_modules/unist-util-visit-parents/lib/color.es.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-visit-parents/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.es.js +0 -57
- package/dist/node_modules/unist-util-visit-parents/lib/index.es.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkManagerItem.cjs.js","sources":["../../../../../src/components/LinksManager/LinkManagerItem.tsx"],"sourcesContent":["import { FC, Fragment } from 'react'\nimport { Button, Icon } from '@ynput/ayon-react-components'\nimport { getEntityTypeIcon } from '@shared/util'\nimport { detailsPanelEntityTypes } from '@shared/api'\nimport * as Styled from './LinksManager.styled'\nimport { LinkEntity } from './LinksManager'\nimport clsx from 'clsx'\n\nexport interface LinkManagerItemProps {\n link: LinkEntity\n isSelected?: boolean\n onEntityClick?: (entityId: string, entityType: string) => void\n onRemove: (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => void\n}\n\nexport const LinkManagerItem: FC<LinkManagerItemProps> = ({\n link,\n isSelected = false,\n onEntityClick,\n onRemove,\n}) => {\n const entityTypeSupported = detailsPanelEntityTypes.includes(link.entityType as any)\n const isClickable = entityTypeSupported && !link.isRestricted\n\n return (\n <Styled.LinkItem\n key={link.linkId}\n onClick={() => isClickable && onEntityClick?.(link.entityId, link.entityType)}\n data-tooltip={\n link.isRestricted\n ? \
|
|
1
|
+
{"version":3,"file":"LinkManagerItem.cjs.js","sources":["../../../../../src/components/LinksManager/LinkManagerItem.tsx"],"sourcesContent":["import { FC, Fragment } from 'react'\nimport { Button, Icon } from '@ynput/ayon-react-components'\nimport { getEntityTypeIcon } from '@shared/util'\nimport { detailsPanelEntityTypes } from '@shared/api'\nimport * as Styled from './LinksManager.styled'\nimport { LinkEntity } from './LinksManager'\nimport clsx from 'clsx'\n\nexport interface LinkManagerItemProps {\n link: LinkEntity\n isSelected?: boolean\n onEntityClick?: (entityId: string, entityType: string) => void\n onRemove: (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => void\n isManager?: boolean\n}\n\nexport const LinkManagerItem: FC<LinkManagerItemProps> = ({\n link,\n isSelected = false,\n onEntityClick,\n onRemove,\n isManager = false,\n}) => {\n const entityTypeSupported = detailsPanelEntityTypes.includes(link.entityType as any)\n const isClickable = entityTypeSupported && !link.isRestricted\n\n return (\n <Styled.LinkItem\n key={link.linkId}\n onClick={() => isClickable && onEntityClick?.(link.entityId, link.entityType)}\n data-tooltip={\n link.isRestricted\n ? isManager\n ? 'Unknown Link - Entity not found'\n : 'Access Restricted - Insufficient Permissions to Entity'\n : link.parents.join('/') + '/' + link.label\n }\n className={clsx({\n clickable: isClickable,\n selected: isSelected,\n restricted: link.isRestricted && !isManager,\n unknown: link.isRestricted && isManager,\n })}\n >\n {link.icon ? <Icon icon={link.icon} /> : <Icon icon={getEntityTypeIcon(link.entityType)} />}\n\n <span className=\"title\">\n {link.isRestricted ? (\n <span className=\"label\">{isManager ? 'Unknown' : 'Access Restricted'}</span>\n ) : (\n <>\n {link.parents?.map((part, index) => (\n <Fragment key={index}>\n <span key={index + '-path'}>{part}</span>\n <span key={index + '-separator'}>/</span>\n </Fragment>\n ))}\n <span className=\"label\">{link.label}</span>\n </>\n )}\n </span>\n {(!link.isRestricted || isManager) && (\n <Button\n icon={'link_off'}\n variant=\"text\"\n className=\"remove\"\n onClick={(e) => onRemove(e, link)}\n data-tooltip={'Remove link'}\n />\n )}\n </Styled.LinkItem>\n )\n}\n"],"names":["LinkManagerItem","link","isSelected","onEntityClick","onRemove","isManager","isClickable","detailsPanelEntityTypes","jsxs","Styled.LinkItem","clsx","jsx","Icon","getEntityTypeIcon","Fragment","part","index","Button","e"],"mappings":"o3JAgBaA,EAA4C,CAAC,CACxD,KAAAC,EACA,WAAAC,EAAa,GACb,cAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,EACd,IAAM,CAEJ,MAAMC,EADsBC,EAAAA,wBAAwB,SAASN,EAAK,UAAiB,GACxC,CAACA,EAAK,aAEjD,OACEO,EAAAA,kBAAAA,KAACC,EAAAA,SAAA,CAEC,QAAS,IAAMH,GAAeH,IAAgBF,EAAK,SAAUA,EAAK,UAAU,EAC5E,eACEA,EAAK,aACDI,EACE,kCACA,yDACFJ,EAAK,QAAQ,KAAK,GAAG,EAAI,IAAMA,EAAK,MAE1C,UAAWS,EAAK,CACd,UAAWJ,EACX,SAAUJ,EACV,WAAYD,EAAK,cAAgB,CAACI,EAClC,QAASJ,EAAK,cAAgBI,CAAA,CAC/B,EAEA,SAAA,CAAAJ,EAAK,KAAOU,EAAAA,kBAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMX,EAAK,IAAA,CAAM,EAAKU,EAAAA,kBAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMC,EAAAA,kBAAkBZ,EAAK,UAAU,EAAG,EAEzFU,wBAAC,OAAA,CAAK,UAAU,QACb,WAAK,aACJA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAU,QAAS,SAAAN,EAAY,UAAY,mBAAA,CAAoB,EAErEG,EAAAA,kBAAAA,KAAAM,6BAAA,CACG,SAAA,CAAAb,EAAK,SAAS,IAAI,CAACc,EAAMC,IACxBR,EAAAA,kBAAAA,KAACM,WAAA,CACC,SAAA,CAAAH,EAAAA,kBAAAA,IAAC,OAAA,CAA4B,SAAAI,CAAA,EAAlBC,EAAQ,OAAe,EAClCL,EAAAA,kBAAAA,IAAC,OAAA,CAAgC,SAAA,GAAA,EAAtBK,EAAQ,YAAe,CAAA,CAAA,EAFrBA,CAGf,CACD,EACDL,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAU,QAAS,WAAK,KAAA,CAAM,CAAA,CAAA,CACtC,CAAA,CAEJ,GACE,CAACV,EAAK,cAAgBI,IACtBM,EAAAA,kBAAAA,IAACM,EAAAA,OAAA,CACC,KAAM,WACN,QAAQ,OACR,UAAU,SACV,QAAUC,GAAMd,EAASc,EAAGjB,CAAI,EAChC,eAAc,aAAA,CAAA,CAChB,CAAA,EAxCGA,EAAK,MAAA,CA4ChB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as o } from "../../../../_virtual/jsx-runtime.es.js";
|
|
2
2
|
import { Fragment as a } from "react";
|
|
3
|
-
import { Icon as
|
|
3
|
+
import { Icon as e, Button as d } from "@ynput/ayon-react-components";
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "react-toastify";
|
|
6
|
-
import { getEntityTypeIcon as
|
|
6
|
+
import { getEntityTypeIcon as l } from "../../util/getEntityTypeIcon.es.js";
|
|
7
7
|
import "uuid";
|
|
8
8
|
import "../../util/pubsub.es.js";
|
|
9
9
|
import "../../api/base/client.es.js";
|
|
@@ -60,7 +60,7 @@ import "../../api/queries/config/getConfig.es.js";
|
|
|
60
60
|
import "../../api/queries/config/updateConfig.es.js";
|
|
61
61
|
import "../../api/queries/entities/getEntity.es.js";
|
|
62
62
|
import "../../api/queries/entities/getEntityPanel.es.js";
|
|
63
|
-
import { detailsPanelEntityTypes as
|
|
63
|
+
import { detailsPanelEntityTypes as y } from "../../api/queries/entities/transformDetailsPanelData.es.js";
|
|
64
64
|
import "../../api/queries/entities/updateEntity.es.js";
|
|
65
65
|
import "../../api/queries/entityLists/getLists.es.js";
|
|
66
66
|
import "../../api/queries/entityLists/updateLists.es.js";
|
|
@@ -92,41 +92,43 @@ import "../../api/queries/views/getViews.es.js";
|
|
|
92
92
|
import "../../api/queries/views/updateViews.es.js";
|
|
93
93
|
import "../../api/queries/watchers/getWatchers.es.js";
|
|
94
94
|
import "../../api/queries/uris/getUris.es.js";
|
|
95
|
-
import { LinkItem as
|
|
95
|
+
import { LinkItem as f } from "./LinksManager.styled.es.js";
|
|
96
96
|
import j from "clsx";
|
|
97
|
-
const
|
|
97
|
+
const mo = ({
|
|
98
98
|
link: t,
|
|
99
|
-
isSelected:
|
|
100
|
-
onEntityClick:
|
|
101
|
-
onRemove:
|
|
99
|
+
isSelected: s = !1,
|
|
100
|
+
onEntityClick: c,
|
|
101
|
+
onRemove: n,
|
|
102
|
+
isManager: i = !1
|
|
102
103
|
}) => {
|
|
103
|
-
const
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
|
|
104
|
+
const m = y.includes(t.entityType) && !t.isRestricted;
|
|
105
|
+
return /* @__PURE__ */ o.jsxs(
|
|
106
|
+
f,
|
|
106
107
|
{
|
|
107
|
-
onClick: () =>
|
|
108
|
-
"data-tooltip": t.isRestricted ? "Access Restricted - Insufficient Permissions to Entity" : t.parents.join("/") + "/" + t.label,
|
|
108
|
+
onClick: () => m && c?.(t.entityId, t.entityType),
|
|
109
|
+
"data-tooltip": t.isRestricted ? i ? "Unknown Link - Entity not found" : "Access Restricted - Insufficient Permissions to Entity" : t.parents.join("/") + "/" + t.label,
|
|
109
110
|
className: j({
|
|
110
|
-
clickable:
|
|
111
|
-
selected:
|
|
112
|
-
restricted: t.isRestricted
|
|
111
|
+
clickable: m,
|
|
112
|
+
selected: s,
|
|
113
|
+
restricted: t.isRestricted && !i,
|
|
114
|
+
unknown: t.isRestricted && i
|
|
113
115
|
}),
|
|
114
116
|
children: [
|
|
115
|
-
t.icon ? /* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
t.parents?.map((
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
] },
|
|
121
|
-
/* @__PURE__ */
|
|
117
|
+
t.icon ? /* @__PURE__ */ o.jsx(e, { icon: t.icon }) : /* @__PURE__ */ o.jsx(e, { icon: l(t.entityType) }),
|
|
118
|
+
/* @__PURE__ */ o.jsx("span", { className: "title", children: t.isRestricted ? /* @__PURE__ */ o.jsx("span", { className: "label", children: i ? "Unknown" : "Access Restricted" }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
119
|
+
t.parents?.map((r, p) => /* @__PURE__ */ o.jsxs(a, { children: [
|
|
120
|
+
/* @__PURE__ */ o.jsx("span", { children: r }, p + "-path"),
|
|
121
|
+
/* @__PURE__ */ o.jsx("span", { children: "/" }, p + "-separator")
|
|
122
|
+
] }, p)),
|
|
123
|
+
/* @__PURE__ */ o.jsx("span", { className: "label", children: t.label })
|
|
122
124
|
] }) }),
|
|
123
|
-
!t.isRestricted && /* @__PURE__ */
|
|
124
|
-
|
|
125
|
+
(!t.isRestricted || i) && /* @__PURE__ */ o.jsx(
|
|
126
|
+
d,
|
|
125
127
|
{
|
|
126
128
|
icon: "link_off",
|
|
127
129
|
variant: "text",
|
|
128
130
|
className: "remove",
|
|
129
|
-
onClick: (
|
|
131
|
+
onClick: (r) => n(r, t),
|
|
130
132
|
"data-tooltip": "Remove link"
|
|
131
133
|
}
|
|
132
134
|
)
|
|
@@ -136,6 +138,6 @@ const pr = ({
|
|
|
136
138
|
);
|
|
137
139
|
};
|
|
138
140
|
export {
|
|
139
|
-
|
|
141
|
+
mo as LinkManagerItem
|
|
140
142
|
};
|
|
141
143
|
//# sourceMappingURL=LinkManagerItem.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkManagerItem.es.js","sources":["../../../../../src/components/LinksManager/LinkManagerItem.tsx"],"sourcesContent":["import { FC, Fragment } from 'react'\nimport { Button, Icon } from '@ynput/ayon-react-components'\nimport { getEntityTypeIcon } from '@shared/util'\nimport { detailsPanelEntityTypes } from '@shared/api'\nimport * as Styled from './LinksManager.styled'\nimport { LinkEntity } from './LinksManager'\nimport clsx from 'clsx'\n\nexport interface LinkManagerItemProps {\n link: LinkEntity\n isSelected?: boolean\n onEntityClick?: (entityId: string, entityType: string) => void\n onRemove: (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => void\n}\n\nexport const LinkManagerItem: FC<LinkManagerItemProps> = ({\n link,\n isSelected = false,\n onEntityClick,\n onRemove,\n}) => {\n const entityTypeSupported = detailsPanelEntityTypes.includes(link.entityType as any)\n const isClickable = entityTypeSupported && !link.isRestricted\n\n return (\n <Styled.LinkItem\n key={link.linkId}\n onClick={() => isClickable && onEntityClick?.(link.entityId, link.entityType)}\n data-tooltip={\n link.isRestricted\n ? \
|
|
1
|
+
{"version":3,"file":"LinkManagerItem.es.js","sources":["../../../../../src/components/LinksManager/LinkManagerItem.tsx"],"sourcesContent":["import { FC, Fragment } from 'react'\nimport { Button, Icon } from '@ynput/ayon-react-components'\nimport { getEntityTypeIcon } from '@shared/util'\nimport { detailsPanelEntityTypes } from '@shared/api'\nimport * as Styled from './LinksManager.styled'\nimport { LinkEntity } from './LinksManager'\nimport clsx from 'clsx'\n\nexport interface LinkManagerItemProps {\n link: LinkEntity\n isSelected?: boolean\n onEntityClick?: (entityId: string, entityType: string) => void\n onRemove: (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => void\n isManager?: boolean\n}\n\nexport const LinkManagerItem: FC<LinkManagerItemProps> = ({\n link,\n isSelected = false,\n onEntityClick,\n onRemove,\n isManager = false,\n}) => {\n const entityTypeSupported = detailsPanelEntityTypes.includes(link.entityType as any)\n const isClickable = entityTypeSupported && !link.isRestricted\n\n return (\n <Styled.LinkItem\n key={link.linkId}\n onClick={() => isClickable && onEntityClick?.(link.entityId, link.entityType)}\n data-tooltip={\n link.isRestricted\n ? isManager\n ? 'Unknown Link - Entity not found'\n : 'Access Restricted - Insufficient Permissions to Entity'\n : link.parents.join('/') + '/' + link.label\n }\n className={clsx({\n clickable: isClickable,\n selected: isSelected,\n restricted: link.isRestricted && !isManager,\n unknown: link.isRestricted && isManager,\n })}\n >\n {link.icon ? <Icon icon={link.icon} /> : <Icon icon={getEntityTypeIcon(link.entityType)} />}\n\n <span className=\"title\">\n {link.isRestricted ? (\n <span className=\"label\">{isManager ? 'Unknown' : 'Access Restricted'}</span>\n ) : (\n <>\n {link.parents?.map((part, index) => (\n <Fragment key={index}>\n <span key={index + '-path'}>{part}</span>\n <span key={index + '-separator'}>/</span>\n </Fragment>\n ))}\n <span className=\"label\">{link.label}</span>\n </>\n )}\n </span>\n {(!link.isRestricted || isManager) && (\n <Button\n icon={'link_off'}\n variant=\"text\"\n className=\"remove\"\n onClick={(e) => onRemove(e, link)}\n data-tooltip={'Remove link'}\n />\n )}\n </Styled.LinkItem>\n )\n}\n"],"names":["LinkManagerItem","link","isSelected","onEntityClick","onRemove","isManager","isClickable","detailsPanelEntityTypes","jsxs","Styled.LinkItem","clsx","jsx","Icon","getEntityTypeIcon","Fragment","part","index","Button","e"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAMA,KAA4C,CAAC;AAAA,EACxD,MAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;AACd,MAAM;AAEJ,QAAMC,IADsBC,EAAwB,SAASN,EAAK,UAAiB,KACxC,CAACA,EAAK;AAEjD,SACEO,gBAAAA,EAAAA;AAAAA,IAACC;AAAAA,IAAA;AAAA,MAEC,SAAS,MAAMH,KAAeH,IAAgBF,EAAK,UAAUA,EAAK,UAAU;AAAA,MAC5E,gBACEA,EAAK,eACDI,IACE,oCACA,2DACFJ,EAAK,QAAQ,KAAK,GAAG,IAAI,MAAMA,EAAK;AAAA,MAE1C,WAAWS,EAAK;AAAA,QACd,WAAWJ;AAAA,QACX,UAAUJ;AAAA,QACV,YAAYD,EAAK,gBAAgB,CAACI;AAAA,QAClC,SAASJ,EAAK,gBAAgBI;AAAA,MAAA,CAC/B;AAAA,MAEA,UAAA;AAAA,QAAAJ,EAAK,OAAOU,gBAAAA,EAAAA,IAACC,GAAA,EAAK,MAAMX,EAAK,KAAA,CAAM,IAAKU,gBAAAA,EAAAA,IAACC,GAAA,EAAK,MAAMC,EAAkBZ,EAAK,UAAU,GAAG;AAAA,QAEzFU,gBAAAA,MAAC,QAAA,EAAK,WAAU,SACb,YAAK,eACJA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,SAAS,UAAAN,IAAY,YAAY,oBAAA,CAAoB,IAErEG,gBAAAA,EAAAA,KAAAM,YAAA,EACG,UAAA;AAAA,UAAAb,EAAK,SAAS,IAAI,CAACc,GAAMC,MACxBR,gBAAAA,EAAAA,KAACM,GAAA,EACC,UAAA;AAAA,YAAAH,gBAAAA,EAAAA,IAAC,QAAA,EAA4B,UAAAI,EAAA,GAAlBC,IAAQ,OAAe;AAAA,YAClCL,gBAAAA,EAAAA,IAAC,QAAA,EAAgC,UAAA,IAAA,GAAtBK,IAAQ,YAAe;AAAA,UAAA,EAAA,GAFrBA,CAGf,CACD;AAAA,UACDL,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,SAAS,YAAK,MAAA,CAAM;AAAA,QAAA,EAAA,CACtC,EAAA,CAEJ;AAAA,SACE,CAACV,EAAK,gBAAgBI,MACtBM,gBAAAA,EAAAA;AAAAA,UAACM;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAAS,CAACC,MAAMd,EAASc,GAAGjB,CAAI;AAAA,YAChC,gBAAc;AAAA,UAAA;AAAA,QAAA;AAAA,MAChB;AAAA,IAAA;AAAA,IAxCGA,EAAK;AAAA,EAAA;AA4ChB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs.js"),I=require("react"),i=require("./LinksManager.styled.cjs.js"),S=require("lodash");require("react-toastify");const q=require("../../util/getEntityId.cjs.js");require("../../util/pubsub.cjs.js");const L=require("./hooks/useUpdateLinks.cjs.js"),M=require("./AddNewLinks.cjs.js"),v=require("../../containers/EntityPickerDialog/EntityPickerDialog.cjs.js"),b=require("./LinkManagerItem.cjs.js"),C=require("@ynput/ayon-react-components");require("../../context/RemoteModulesContext.cjs.js");require("../../context/DetailsPanelContext.cjs.js");require("../../context/ThumbnailUploaderContext.cjs.js");require("../../context/SettingsPanelContext.cjs.js");require("../../context/pip/PiPProvider.cjs.js");require("react-dom");require("../../context/pip/PiPWrapper.cjs.js");require("../../context/AddonProjectContext.cjs.js");require("../../context/AddonContext.cjs.js");require("../../context/PowerpackContext.cjs.js");require("../../context/MoveEntityContext.cjs.js");require("../../context/MenuContext.cjs.js");require("../../context/WebsocketContext.cjs.js");const T=require("../../context/GlobalContext.cjs.js");require("../../context/ProjectContext.cjs.js");require("../../context/ProjectFoldersContext.cjs.js");require("../../context/UriContext.cjs.js");const P=({linkTypeLabel:p,direction:u,links:a=[],projectName:n,entityId:m,entityType:y,linkType:g,targetEntityType:s,folderId:d,selectedEntityIds:j=[],onClose:c,onEntityClick:E})=>{const{user:l}=T.useGlobalContext(),R=l?.data?.isAdmin||l?.data?.isManager,o=L({projectName:n,direction:u,entityId:m,entityType:y,targetEntityType:s,linkType:g}),[k,x]=I.useState(null),h=(t,r)=>{t.stopPropagation(),o.remove([{id:r.linkId,target:{entityId:r.entityId,entityType:r.entityType}}])};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(i.Container,{children:[e.jsxRuntimeExports.jsxs(i.Header,{children:[S.upperFirst(p)," links (",u,")",e.jsxRuntimeExports.jsx(C.Button,{icon:"close",variant:"text",className:"remove",onClick:c,"data-shortcut":"Escape","data-tooltip-delay":500})]}),e.jsxRuntimeExports.jsxs(i.LinksList,{children:[a?.map(t=>e.jsxRuntimeExports.jsx(b.LinkManagerItem,{link:t,isSelected:j.includes(t.entityId),onEntityClick:E,onRemove:h,isManager:R},t.linkId)),a.length===0&&e.jsxRuntimeExports.jsx(i.SubHeader,{children:"No links yet"})]}),e.jsxRuntimeExports.jsx(M,{targetEntityType:s,projectName:n,onClose:c,onAdd:t=>o.add([{targetEntityId:t,linkId:q.getEntityId()}]),onSearchTypeChange:x})]}),k==="picker"&&e.jsxRuntimeExports.jsx(v.EntityPickerDialog,{onClose:()=>x(null),projectName:n,entityType:s,initialSelection:d?{folder:{[d]:!0}}:void 0,onSubmit:t=>o.add(t.map(r=>({targetEntityId:r,linkId:q.getEntityId()}))),isMultiSelect:!0})]})};exports.LinksManager=P;
|
|
2
2
|
//# sourceMappingURL=LinksManager.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinksManager.cjs.js","sources":["../../../../../src/components/LinksManager/LinksManager.tsx"],"sourcesContent":["import { FC, useState } from 'react'\nimport * as Styled from './LinksManager.styled'\nimport { getEntityId } from '@shared/util'\nimport useUpdateLinks from './hooks/useUpdateLinks'\nimport AddNewLinks, { LinkSearchType } from './AddNewLinks'\nimport { EntityPickerDialog, PickerEntityType } from '@shared/containers/EntityPickerDialog'\nimport { upperFirst } from 'lodash'\nimport { LinkManagerItem } from './LinkManagerItem'\nimport { Button } from '@ynput/ayon-react-components'\n\nexport type LinkEntity = {\n linkId: string\n entityId: string\n label: string\n parents: string[]\n entityType: string\n icon: string\n isRestricted?: boolean // flag to indicate if this link is restricted (node is null from API)\n}\n\nexport interface LinksManagerProps {\n linkTypeLabel: string\n direction?: 'in' | 'out'\n links: LinkEntity[] // used to display basic info about the links entity\n projectName: string\n entityId: string // the entity id of the entity that has these links\n linkType: string // full link type e.g. workflow|task|task\n entityType: string // the entity type of the entity that has these links\n targetEntityType: string // the entity type of the out links\n folderId?: string | null // the folder selected or the parent folder of the selected (used in EntityPickerDialog)\n selectedEntityIds?: string[] // list of selected entity IDs to highlight\n onClose?: () => void\n onEntityClick?: (entityId: string, entityType: string) => void // a click on an linked entity\n}\n\nexport const LinksManager: FC<LinksManagerProps> = ({\n linkTypeLabel,\n direction,\n links = [],\n projectName,\n entityId,\n entityType,\n linkType,\n targetEntityType,\n folderId,\n selectedEntityIds = [],\n onClose,\n onEntityClick,\n}) => {\n const linksUpdater = useUpdateLinks({\n projectName,\n direction,\n entityId,\n entityType,\n targetEntityType,\n linkType,\n })\n\n const [searchType, setSearchType] = useState<LinkSearchType>(null)\n\n const handleRemove = (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => {\n // prevent clicks higher up\n e.stopPropagation()\n\n linksUpdater.remove([\n {\n id: link.linkId,\n target: { entityId: link.entityId, entityType: link.entityType },\n },\n ])\n }\n\n return (\n <>\n <Styled.Container>\n <Styled.Header>\n {upperFirst(linkTypeLabel)} links ({direction})\n <Button\n icon={'close'}\n variant=\"text\"\n className=\"remove\"\n onClick={onClose}\n data-shortcut={'Escape'}\n data-tooltip-delay={500}\n />\n </Styled.Header>\n <Styled.LinksList>\n {links?.map((link) => (\n <LinkManagerItem\n key={link.linkId}\n link={link}\n isSelected={selectedEntityIds.includes(link.entityId)}\n onEntityClick={onEntityClick}\n onRemove={handleRemove}\n />\n ))}\n {links.length === 0 && <Styled.SubHeader>No links yet</Styled.SubHeader>}\n </Styled.LinksList>\n <AddNewLinks\n targetEntityType={targetEntityType}\n projectName={projectName}\n onClose={onClose}\n onAdd={(id) => linksUpdater.add([{ targetEntityId: id, linkId: getEntityId() }])}\n onSearchTypeChange={setSearchType}\n />\n </Styled.Container>\n {searchType === 'picker' && (\n <EntityPickerDialog\n onClose={() => setSearchType(null)}\n projectName={projectName}\n entityType={targetEntityType as PickerEntityType} // the type of entity to pick\n initialSelection={folderId ? { folder: { [folderId]: true } } : undefined} // preselect current folder\n onSubmit={(s) =>\n linksUpdater.add(s.map((id) => ({ targetEntityId: id, linkId: getEntityId() })))\n }\n isMultiSelect\n />\n )}\n </>\n )\n}\n"],"names":["LinksManager","linkTypeLabel","direction","links","projectName","entityId","entityType","linkType","targetEntityType","folderId","selectedEntityIds","onClose","onEntityClick","linksUpdater","useUpdateLinks","searchType","setSearchType","useState","handleRemove","e","link","jsxs","Fragment","Styled.Container","Styled.Header","upperFirst","jsx","Button","Styled.LinksList","LinkManagerItem","Styled.SubHeader","AddNewLinks","id","getEntityId","EntityPickerDialog","s"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinksManager.cjs.js","sources":["../../../../../src/components/LinksManager/LinksManager.tsx"],"sourcesContent":["import { FC, useState } from 'react'\nimport * as Styled from './LinksManager.styled'\nimport { getEntityId } from '@shared/util'\nimport useUpdateLinks from './hooks/useUpdateLinks'\nimport AddNewLinks, { LinkSearchType } from './AddNewLinks'\nimport { EntityPickerDialog, PickerEntityType } from '@shared/containers/EntityPickerDialog'\nimport { upperFirst } from 'lodash'\nimport { LinkManagerItem } from './LinkManagerItem'\nimport { Button } from '@ynput/ayon-react-components'\nimport { useGlobalContext } from '@shared/context'\n\nexport type LinkEntity = {\n linkId: string\n entityId: string\n label: string\n parents: string[]\n entityType: string\n icon: string\n isRestricted?: boolean // flag to indicate if this link is restricted (node is null from API)\n}\n\nexport interface LinksManagerProps {\n linkTypeLabel: string\n direction?: 'in' | 'out'\n links: LinkEntity[] // used to display basic info about the links entity\n projectName: string\n entityId: string // the entity id of the entity that has these links\n linkType: string // full link type e.g. workflow|task|task\n entityType: string // the entity type of the entity that has these links\n targetEntityType: string // the entity type of the out links\n folderId?: string | null // the folder selected or the parent folder of the selected (used in EntityPickerDialog)\n selectedEntityIds?: string[] // list of selected entity IDs to highlight\n onClose?: () => void\n onEntityClick?: (entityId: string, entityType: string) => void // a click on an linked entity\n}\n\nexport const LinksManager: FC<LinksManagerProps> = ({\n linkTypeLabel,\n direction,\n links = [],\n projectName,\n entityId,\n entityType,\n linkType,\n targetEntityType,\n folderId,\n selectedEntityIds = [],\n onClose,\n onEntityClick,\n}) => {\n const { user } = useGlobalContext()\n const isManager = user?.data?.isAdmin || user?.data?.isManager\n\n const linksUpdater = useUpdateLinks({\n projectName,\n direction,\n entityId,\n entityType,\n targetEntityType,\n linkType,\n })\n\n const [searchType, setSearchType] = useState<LinkSearchType>(null)\n\n const handleRemove = (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => {\n // prevent clicks higher up\n e.stopPropagation()\n\n linksUpdater.remove([\n {\n id: link.linkId,\n target: { entityId: link.entityId, entityType: link.entityType },\n },\n ])\n }\n\n return (\n <>\n <Styled.Container>\n <Styled.Header>\n {upperFirst(linkTypeLabel)} links ({direction})\n <Button\n icon={'close'}\n variant=\"text\"\n className=\"remove\"\n onClick={onClose}\n data-shortcut={'Escape'}\n data-tooltip-delay={500}\n />\n </Styled.Header>\n <Styled.LinksList>\n {links?.map((link) => (\n <LinkManagerItem\n key={link.linkId}\n link={link}\n isSelected={selectedEntityIds.includes(link.entityId)}\n onEntityClick={onEntityClick}\n onRemove={handleRemove}\n isManager={isManager}\n />\n ))}\n {links.length === 0 && <Styled.SubHeader>No links yet</Styled.SubHeader>}\n </Styled.LinksList>\n <AddNewLinks\n targetEntityType={targetEntityType}\n projectName={projectName}\n onClose={onClose}\n onAdd={(id) => linksUpdater.add([{ targetEntityId: id, linkId: getEntityId() }])}\n onSearchTypeChange={setSearchType}\n />\n </Styled.Container>\n {searchType === 'picker' && (\n <EntityPickerDialog\n onClose={() => setSearchType(null)}\n projectName={projectName}\n entityType={targetEntityType as PickerEntityType} // the type of entity to pick\n initialSelection={folderId ? { folder: { [folderId]: true } } : undefined} // preselect current folder\n onSubmit={(s) =>\n linksUpdater.add(s.map((id) => ({ targetEntityId: id, linkId: getEntityId() })))\n }\n isMultiSelect\n />\n )}\n </>\n )\n}\n"],"names":["LinksManager","linkTypeLabel","direction","links","projectName","entityId","entityType","linkType","targetEntityType","folderId","selectedEntityIds","onClose","onEntityClick","user","useGlobalContext","isManager","linksUpdater","useUpdateLinks","searchType","setSearchType","useState","handleRemove","e","link","jsxs","Fragment","Styled.Container","Styled.Header","upperFirst","jsx","Button","Styled.LinksList","LinkManagerItem","Styled.SubHeader","AddNewLinks","id","getEntityId","EntityPickerDialog","s"],"mappings":"22CAoCO,MAAMA,EAAsC,CAAC,CAClD,cAAAC,EACA,UAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,YAAAC,EACA,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,kBAAAC,EAAoB,CAAA,EACpB,QAAAC,EACA,cAAAC,CACF,IAAM,CACJ,KAAM,CAAE,KAAAC,CAAA,EAASC,mBAAA,EACXC,EAAYF,GAAM,MAAM,SAAWA,GAAM,MAAM,UAE/CG,EAAeC,EAAe,CAClC,YAAAb,EACA,UAAAF,EACA,SAAAG,EACA,WAAAC,EACA,iBAAAE,EACA,SAAAD,CAAA,CACD,EAEK,CAACW,EAAYC,CAAa,EAAIC,EAAAA,SAAyB,IAAI,EAE3DC,EAAe,CAACC,EAAwCC,IAAqB,CAEjFD,EAAE,gBAAA,EAEFN,EAAa,OAAO,CAClB,CACE,GAAIO,EAAK,OACT,OAAQ,CAAE,SAAUA,EAAK,SAAU,WAAYA,EAAK,UAAA,CAAW,CACjE,CACD,CACH,EAEA,OACEC,EAAAA,kBAAAA,KAAAC,6BAAA,CACE,SAAA,CAAAD,yBAACE,EAAAA,UAAA,CACC,SAAA,CAAAF,yBAACG,EAAAA,OAAA,CACE,SAAA,CAAAC,EAAAA,WAAW3B,CAAa,EAAE,WAASC,EAAU,IAC9C2B,EAAAA,kBAAAA,IAACC,EAAAA,OAAA,CACC,KAAM,QACN,QAAQ,OACR,UAAU,SACV,QAASnB,EACT,gBAAe,SACf,qBAAoB,GAAA,CAAA,CACtB,EACF,EACAa,yBAACO,EAAAA,UAAA,CACE,SAAA,CAAA5B,GAAO,IAAKoB,GACXM,EAAAA,kBAAAA,IAACG,EAAAA,gBAAA,CAEC,KAAAT,EACA,WAAYb,EAAkB,SAASa,EAAK,QAAQ,EACpD,cAAAX,EACA,SAAUS,EACV,UAAAN,CAAA,EALKQ,EAAK,MAAA,CAOb,EACApB,EAAM,SAAW,2BAAM8B,EAAAA,UAAA,CAAiB,SAAA,cAAA,CAAY,CAAA,EACvD,EACAJ,EAAAA,kBAAAA,IAACK,EAAA,CACC,iBAAA1B,EACA,YAAAJ,EACA,QAAAO,EACA,MAAQwB,GAAOnB,EAAa,IAAI,CAAC,CAAE,eAAgBmB,EAAI,OAAQC,EAAAA,YAAA,CAAY,CAAG,CAAC,EAC/E,mBAAoBjB,CAAA,CAAA,CACtB,EACF,EACCD,IAAe,UACdW,EAAAA,kBAAAA,IAACQ,EAAAA,mBAAA,CACC,QAAS,IAAMlB,EAAc,IAAI,EACjC,YAAAf,EACA,WAAYI,EACZ,iBAAkBC,EAAW,CAAE,OAAQ,CAAE,CAACA,CAAQ,EAAG,EAAA,CAAK,EAAM,OAChE,SAAW6B,GACTtB,EAAa,IAAIsB,EAAE,IAAKH,IAAQ,CAAE,eAAgBA,EAAI,OAAQC,EAAAA,YAAA,CAAY,EAAI,CAAC,EAEjF,cAAa,EAAA,CAAA,CACf,EAEJ,CAEJ"}
|
|
@@ -1,101 +1,119 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Container as
|
|
2
|
+
import { useState as S } from "react";
|
|
3
|
+
import { Container as v, Header as L, LinksList as M, SubHeader as C } from "./LinksManager.styled.es.js";
|
|
4
4
|
import { upperFirst as E } from "lodash";
|
|
5
5
|
import "react-toastify";
|
|
6
|
-
import { getEntityId as
|
|
6
|
+
import { getEntityId as c } from "../../util/getEntityId.es.js";
|
|
7
7
|
import "../../util/pubsub.es.js";
|
|
8
8
|
import T from "./hooks/useUpdateLinks.es.js";
|
|
9
|
-
import
|
|
10
|
-
import { EntityPickerDialog as
|
|
9
|
+
import b from "./AddNewLinks.es.js";
|
|
10
|
+
import { EntityPickerDialog as A } from "../../containers/EntityPickerDialog/EntityPickerDialog.es.js";
|
|
11
11
|
import { LinkManagerItem as R } from "./LinkManagerItem.es.js";
|
|
12
|
-
import { Button as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
import { Button as F } from "@ynput/ayon-react-components";
|
|
13
|
+
import "../../context/RemoteModulesContext.es.js";
|
|
14
|
+
import "../../context/DetailsPanelContext.es.js";
|
|
15
|
+
import "../../context/ThumbnailUploaderContext.es.js";
|
|
16
|
+
import "../../context/SettingsPanelContext.es.js";
|
|
17
|
+
import "../../context/pip/PiPProvider.es.js";
|
|
18
|
+
import "react-dom";
|
|
19
|
+
import "../../context/pip/PiPWrapper.es.js";
|
|
20
|
+
import "../../context/AddonProjectContext.es.js";
|
|
21
|
+
import "../../context/AddonContext.es.js";
|
|
22
|
+
import "../../context/PowerpackContext.es.js";
|
|
23
|
+
import "../../context/MoveEntityContext.es.js";
|
|
24
|
+
import "../../context/MenuContext.es.js";
|
|
25
|
+
import "../../context/WebsocketContext.es.js";
|
|
26
|
+
import { useGlobalContext as H } from "../../context/GlobalContext.es.js";
|
|
27
|
+
import "../../context/ProjectContext.es.js";
|
|
28
|
+
import "../../context/ProjectFoldersContext.es.js";
|
|
29
|
+
import "../../context/UriContext.es.js";
|
|
30
|
+
const at = ({
|
|
31
|
+
linkTypeLabel: u,
|
|
32
|
+
direction: m,
|
|
33
|
+
links: s = [],
|
|
34
|
+
projectName: o,
|
|
35
|
+
entityId: x,
|
|
19
36
|
entityType: y,
|
|
20
|
-
linkType:
|
|
21
|
-
targetEntityType:
|
|
22
|
-
folderId:
|
|
23
|
-
selectedEntityIds:
|
|
24
|
-
onClose:
|
|
25
|
-
onEntityClick:
|
|
37
|
+
linkType: h,
|
|
38
|
+
targetEntityType: e,
|
|
39
|
+
folderId: p,
|
|
40
|
+
selectedEntityIds: f = [],
|
|
41
|
+
onClose: a,
|
|
42
|
+
onEntityClick: g
|
|
26
43
|
}) => {
|
|
27
|
-
const n = T({
|
|
28
|
-
projectName:
|
|
29
|
-
direction:
|
|
30
|
-
entityId:
|
|
44
|
+
const { user: d } = H(), k = d?.data?.isAdmin || d?.data?.isManager, n = T({
|
|
45
|
+
projectName: o,
|
|
46
|
+
direction: m,
|
|
47
|
+
entityId: x,
|
|
31
48
|
entityType: y,
|
|
32
|
-
targetEntityType:
|
|
33
|
-
linkType:
|
|
34
|
-
}), [
|
|
35
|
-
|
|
49
|
+
targetEntityType: e,
|
|
50
|
+
linkType: h
|
|
51
|
+
}), [I, l] = S(null), j = (i, r) => {
|
|
52
|
+
i.stopPropagation(), n.remove([
|
|
36
53
|
{
|
|
37
|
-
id:
|
|
38
|
-
target: { entityId:
|
|
54
|
+
id: r.linkId,
|
|
55
|
+
target: { entityId: r.entityId, entityType: r.entityType }
|
|
39
56
|
}
|
|
40
57
|
]);
|
|
41
58
|
};
|
|
42
59
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
43
|
-
/* @__PURE__ */ t.jsxs(
|
|
44
|
-
/* @__PURE__ */ t.jsxs(
|
|
45
|
-
E(
|
|
60
|
+
/* @__PURE__ */ t.jsxs(v, { children: [
|
|
61
|
+
/* @__PURE__ */ t.jsxs(L, { children: [
|
|
62
|
+
E(u),
|
|
46
63
|
" links (",
|
|
47
|
-
|
|
64
|
+
m,
|
|
48
65
|
")",
|
|
49
66
|
/* @__PURE__ */ t.jsx(
|
|
50
|
-
|
|
67
|
+
F,
|
|
51
68
|
{
|
|
52
69
|
icon: "close",
|
|
53
70
|
variant: "text",
|
|
54
71
|
className: "remove",
|
|
55
|
-
onClick:
|
|
72
|
+
onClick: a,
|
|
56
73
|
"data-shortcut": "Escape",
|
|
57
74
|
"data-tooltip-delay": 500
|
|
58
75
|
}
|
|
59
76
|
)
|
|
60
77
|
] }),
|
|
61
|
-
/* @__PURE__ */ t.jsxs(
|
|
62
|
-
|
|
78
|
+
/* @__PURE__ */ t.jsxs(M, { children: [
|
|
79
|
+
s?.map((i) => /* @__PURE__ */ t.jsx(
|
|
63
80
|
R,
|
|
64
81
|
{
|
|
65
|
-
link:
|
|
66
|
-
isSelected:
|
|
67
|
-
onEntityClick:
|
|
68
|
-
onRemove:
|
|
82
|
+
link: i,
|
|
83
|
+
isSelected: f.includes(i.entityId),
|
|
84
|
+
onEntityClick: g,
|
|
85
|
+
onRemove: j,
|
|
86
|
+
isManager: k
|
|
69
87
|
},
|
|
70
|
-
|
|
88
|
+
i.linkId
|
|
71
89
|
)),
|
|
72
|
-
|
|
90
|
+
s.length === 0 && /* @__PURE__ */ t.jsx(C, { children: "No links yet" })
|
|
73
91
|
] }),
|
|
74
92
|
/* @__PURE__ */ t.jsx(
|
|
75
|
-
|
|
93
|
+
b,
|
|
76
94
|
{
|
|
77
|
-
targetEntityType:
|
|
78
|
-
projectName:
|
|
79
|
-
onClose:
|
|
80
|
-
onAdd: (
|
|
81
|
-
onSearchTypeChange:
|
|
95
|
+
targetEntityType: e,
|
|
96
|
+
projectName: o,
|
|
97
|
+
onClose: a,
|
|
98
|
+
onAdd: (i) => n.add([{ targetEntityId: i, linkId: c() }]),
|
|
99
|
+
onSearchTypeChange: l
|
|
82
100
|
}
|
|
83
101
|
)
|
|
84
102
|
] }),
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
I === "picker" && /* @__PURE__ */ t.jsx(
|
|
104
|
+
A,
|
|
87
105
|
{
|
|
88
|
-
onClose: () =>
|
|
89
|
-
projectName:
|
|
90
|
-
entityType:
|
|
91
|
-
initialSelection:
|
|
92
|
-
onSubmit: (
|
|
106
|
+
onClose: () => l(null),
|
|
107
|
+
projectName: o,
|
|
108
|
+
entityType: e,
|
|
109
|
+
initialSelection: p ? { folder: { [p]: !0 } } : void 0,
|
|
110
|
+
onSubmit: (i) => n.add(i.map((r) => ({ targetEntityId: r, linkId: c() }))),
|
|
93
111
|
isMultiSelect: !0
|
|
94
112
|
}
|
|
95
113
|
)
|
|
96
114
|
] });
|
|
97
115
|
};
|
|
98
116
|
export {
|
|
99
|
-
|
|
117
|
+
at as LinksManager
|
|
100
118
|
};
|
|
101
119
|
//# sourceMappingURL=LinksManager.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinksManager.es.js","sources":["../../../../../src/components/LinksManager/LinksManager.tsx"],"sourcesContent":["import { FC, useState } from 'react'\nimport * as Styled from './LinksManager.styled'\nimport { getEntityId } from '@shared/util'\nimport useUpdateLinks from './hooks/useUpdateLinks'\nimport AddNewLinks, { LinkSearchType } from './AddNewLinks'\nimport { EntityPickerDialog, PickerEntityType } from '@shared/containers/EntityPickerDialog'\nimport { upperFirst } from 'lodash'\nimport { LinkManagerItem } from './LinkManagerItem'\nimport { Button } from '@ynput/ayon-react-components'\n\nexport type LinkEntity = {\n linkId: string\n entityId: string\n label: string\n parents: string[]\n entityType: string\n icon: string\n isRestricted?: boolean // flag to indicate if this link is restricted (node is null from API)\n}\n\nexport interface LinksManagerProps {\n linkTypeLabel: string\n direction?: 'in' | 'out'\n links: LinkEntity[] // used to display basic info about the links entity\n projectName: string\n entityId: string // the entity id of the entity that has these links\n linkType: string // full link type e.g. workflow|task|task\n entityType: string // the entity type of the entity that has these links\n targetEntityType: string // the entity type of the out links\n folderId?: string | null // the folder selected or the parent folder of the selected (used in EntityPickerDialog)\n selectedEntityIds?: string[] // list of selected entity IDs to highlight\n onClose?: () => void\n onEntityClick?: (entityId: string, entityType: string) => void // a click on an linked entity\n}\n\nexport const LinksManager: FC<LinksManagerProps> = ({\n linkTypeLabel,\n direction,\n links = [],\n projectName,\n entityId,\n entityType,\n linkType,\n targetEntityType,\n folderId,\n selectedEntityIds = [],\n onClose,\n onEntityClick,\n}) => {\n const linksUpdater = useUpdateLinks({\n projectName,\n direction,\n entityId,\n entityType,\n targetEntityType,\n linkType,\n })\n\n const [searchType, setSearchType] = useState<LinkSearchType>(null)\n\n const handleRemove = (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => {\n // prevent clicks higher up\n e.stopPropagation()\n\n linksUpdater.remove([\n {\n id: link.linkId,\n target: { entityId: link.entityId, entityType: link.entityType },\n },\n ])\n }\n\n return (\n <>\n <Styled.Container>\n <Styled.Header>\n {upperFirst(linkTypeLabel)} links ({direction})\n <Button\n icon={'close'}\n variant=\"text\"\n className=\"remove\"\n onClick={onClose}\n data-shortcut={'Escape'}\n data-tooltip-delay={500}\n />\n </Styled.Header>\n <Styled.LinksList>\n {links?.map((link) => (\n <LinkManagerItem\n key={link.linkId}\n link={link}\n isSelected={selectedEntityIds.includes(link.entityId)}\n onEntityClick={onEntityClick}\n onRemove={handleRemove}\n />\n ))}\n {links.length === 0 && <Styled.SubHeader>No links yet</Styled.SubHeader>}\n </Styled.LinksList>\n <AddNewLinks\n targetEntityType={targetEntityType}\n projectName={projectName}\n onClose={onClose}\n onAdd={(id) => linksUpdater.add([{ targetEntityId: id, linkId: getEntityId() }])}\n onSearchTypeChange={setSearchType}\n />\n </Styled.Container>\n {searchType === 'picker' && (\n <EntityPickerDialog\n onClose={() => setSearchType(null)}\n projectName={projectName}\n entityType={targetEntityType as PickerEntityType} // the type of entity to pick\n initialSelection={folderId ? { folder: { [folderId]: true } } : undefined} // preselect current folder\n onSubmit={(s) =>\n linksUpdater.add(s.map((id) => ({ targetEntityId: id, linkId: getEntityId() })))\n }\n isMultiSelect\n />\n )}\n </>\n )\n}\n"],"names":["LinksManager","linkTypeLabel","direction","links","projectName","entityId","entityType","linkType","targetEntityType","folderId","selectedEntityIds","onClose","onEntityClick","linksUpdater","useUpdateLinks","searchType","setSearchType","useState","handleRemove","link","jsxs","Fragment","Styled.Container","Styled.Header","upperFirst","jsx","Button","Styled.LinksList","LinkManagerItem","Styled.SubHeader","AddNewLinks","id","getEntityId","EntityPickerDialog","s"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinksManager.es.js","sources":["../../../../../src/components/LinksManager/LinksManager.tsx"],"sourcesContent":["import { FC, useState } from 'react'\nimport * as Styled from './LinksManager.styled'\nimport { getEntityId } from '@shared/util'\nimport useUpdateLinks from './hooks/useUpdateLinks'\nimport AddNewLinks, { LinkSearchType } from './AddNewLinks'\nimport { EntityPickerDialog, PickerEntityType } from '@shared/containers/EntityPickerDialog'\nimport { upperFirst } from 'lodash'\nimport { LinkManagerItem } from './LinkManagerItem'\nimport { Button } from '@ynput/ayon-react-components'\nimport { useGlobalContext } from '@shared/context'\n\nexport type LinkEntity = {\n linkId: string\n entityId: string\n label: string\n parents: string[]\n entityType: string\n icon: string\n isRestricted?: boolean // flag to indicate if this link is restricted (node is null from API)\n}\n\nexport interface LinksManagerProps {\n linkTypeLabel: string\n direction?: 'in' | 'out'\n links: LinkEntity[] // used to display basic info about the links entity\n projectName: string\n entityId: string // the entity id of the entity that has these links\n linkType: string // full link type e.g. workflow|task|task\n entityType: string // the entity type of the entity that has these links\n targetEntityType: string // the entity type of the out links\n folderId?: string | null // the folder selected or the parent folder of the selected (used in EntityPickerDialog)\n selectedEntityIds?: string[] // list of selected entity IDs to highlight\n onClose?: () => void\n onEntityClick?: (entityId: string, entityType: string) => void // a click on an linked entity\n}\n\nexport const LinksManager: FC<LinksManagerProps> = ({\n linkTypeLabel,\n direction,\n links = [],\n projectName,\n entityId,\n entityType,\n linkType,\n targetEntityType,\n folderId,\n selectedEntityIds = [],\n onClose,\n onEntityClick,\n}) => {\n const { user } = useGlobalContext()\n const isManager = user?.data?.isAdmin || user?.data?.isManager\n\n const linksUpdater = useUpdateLinks({\n projectName,\n direction,\n entityId,\n entityType,\n targetEntityType,\n linkType,\n })\n\n const [searchType, setSearchType] = useState<LinkSearchType>(null)\n\n const handleRemove = (e: React.MouseEvent<HTMLButtonElement>, link: LinkEntity) => {\n // prevent clicks higher up\n e.stopPropagation()\n\n linksUpdater.remove([\n {\n id: link.linkId,\n target: { entityId: link.entityId, entityType: link.entityType },\n },\n ])\n }\n\n return (\n <>\n <Styled.Container>\n <Styled.Header>\n {upperFirst(linkTypeLabel)} links ({direction})\n <Button\n icon={'close'}\n variant=\"text\"\n className=\"remove\"\n onClick={onClose}\n data-shortcut={'Escape'}\n data-tooltip-delay={500}\n />\n </Styled.Header>\n <Styled.LinksList>\n {links?.map((link) => (\n <LinkManagerItem\n key={link.linkId}\n link={link}\n isSelected={selectedEntityIds.includes(link.entityId)}\n onEntityClick={onEntityClick}\n onRemove={handleRemove}\n isManager={isManager}\n />\n ))}\n {links.length === 0 && <Styled.SubHeader>No links yet</Styled.SubHeader>}\n </Styled.LinksList>\n <AddNewLinks\n targetEntityType={targetEntityType}\n projectName={projectName}\n onClose={onClose}\n onAdd={(id) => linksUpdater.add([{ targetEntityId: id, linkId: getEntityId() }])}\n onSearchTypeChange={setSearchType}\n />\n </Styled.Container>\n {searchType === 'picker' && (\n <EntityPickerDialog\n onClose={() => setSearchType(null)}\n projectName={projectName}\n entityType={targetEntityType as PickerEntityType} // the type of entity to pick\n initialSelection={folderId ? { folder: { [folderId]: true } } : undefined} // preselect current folder\n onSubmit={(s) =>\n linksUpdater.add(s.map((id) => ({ targetEntityId: id, linkId: getEntityId() })))\n }\n isMultiSelect\n />\n )}\n </>\n )\n}\n"],"names":["LinksManager","linkTypeLabel","direction","links","projectName","entityId","entityType","linkType","targetEntityType","folderId","selectedEntityIds","onClose","onEntityClick","user","useGlobalContext","isManager","linksUpdater","useUpdateLinks","searchType","setSearchType","useState","handleRemove","e","link","jsxs","Fragment","Styled.Container","Styled.Header","upperFirst","jsx","Button","Styled.LinksList","LinkManagerItem","Styled.SubHeader","AddNewLinks","id","getEntityId","EntityPickerDialog","s"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAMA,KAAsC,CAAC;AAAA,EAClD,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,mBAAAC,IAAoB,CAAA;AAAA,EACpB,SAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACJ,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA,GACXC,IAAYF,GAAM,MAAM,WAAWA,GAAM,MAAM,WAE/CG,IAAeC,EAAe;AAAA,IAClC,aAAAb;AAAA,IACA,WAAAF;AAAA,IACA,UAAAG;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAE;AAAA,IACA,UAAAD;AAAA,EAAA,CACD,GAEK,CAACW,GAAYC,CAAa,IAAIC,EAAyB,IAAI,GAE3DC,IAAe,CAACC,GAAwCC,MAAqB;AAEjF,IAAAD,EAAE,gBAAA,GAEFN,EAAa,OAAO;AAAA,MAClB;AAAA,QACE,IAAIO,EAAK;AAAA,QACT,QAAQ,EAAE,UAAUA,EAAK,UAAU,YAAYA,EAAK,WAAA;AAAA,MAAW;AAAA,IACjE,CACD;AAAA,EACH;AAEA,SACEC,gBAAAA,EAAAA,KAAAC,YAAA,EACE,UAAA;AAAA,IAAAD,gBAAAA,OAACE,GAAA,EACC,UAAA;AAAA,MAAAF,gBAAAA,OAACG,GAAA,EACE,UAAA;AAAA,QAAAC,EAAW3B,CAAa;AAAA,QAAE;AAAA,QAASC;AAAA,QAAU;AAAA,QAC9C2B,gBAAAA,EAAAA;AAAAA,UAACC;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAASnB;AAAA,YACT,iBAAe;AAAA,YACf,sBAAoB;AAAA,UAAA;AAAA,QAAA;AAAA,MACtB,GACF;AAAA,MACAa,gBAAAA,OAACO,GAAA,EACE,UAAA;AAAA,QAAA5B,GAAO,IAAI,CAACoB,MACXM,gBAAAA,EAAAA;AAAAA,UAACG;AAAA,UAAA;AAAA,YAEC,MAAAT;AAAA,YACA,YAAYb,EAAkB,SAASa,EAAK,QAAQ;AAAA,YACpD,eAAAX;AAAA,YACA,UAAUS;AAAA,YACV,WAAAN;AAAA,UAAA;AAAA,UALKQ,EAAK;AAAA,QAAA,CAOb;AAAA,QACApB,EAAM,WAAW,2BAAM8B,GAAA,EAAiB,UAAA,eAAA,CAAY;AAAA,MAAA,GACvD;AAAA,MACAJ,gBAAAA,EAAAA;AAAAA,QAACK;AAAA,QAAA;AAAA,UACC,kBAAA1B;AAAA,UACA,aAAAJ;AAAA,UACA,SAAAO;AAAA,UACA,OAAO,CAACwB,MAAOnB,EAAa,IAAI,CAAC,EAAE,gBAAgBmB,GAAI,QAAQC,EAAA,EAAY,CAAG,CAAC;AAAA,UAC/E,oBAAoBjB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,GACF;AAAA,IACCD,MAAe,YACdW,gBAAAA,EAAAA;AAAAA,MAACQ;AAAA,MAAA;AAAA,QACC,SAAS,MAAMlB,EAAc,IAAI;AAAA,QACjC,aAAAf;AAAA,QACA,YAAYI;AAAA,QACZ,kBAAkBC,IAAW,EAAE,QAAQ,EAAE,CAACA,CAAQ,GAAG,GAAA,EAAK,IAAM;AAAA,QAChE,UAAU,CAAC6B,MACTtB,EAAa,IAAIsB,EAAE,IAAI,CAACH,OAAQ,EAAE,gBAAgBA,GAAI,QAAQC,EAAA,EAAY,EAAI,CAAC;AAAA,QAEjF,eAAa;AAAA,MAAA;AAAA,IAAA;AAAA,EACf,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinksManager.styled.cjs.js","sources":["../../../../../src/components/LinksManager/LinksManager.styled.ts"],"sourcesContent":["import { Button, InputText } from '@ynput/ayon-react-components'\nimport styled from 'styled-components'\n\nexport const Container = styled.div`\n padding: var(--padding-m);\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-l);\n display: flex;\n flex-direction: column;\n height: 100%; /* Use height instead of max-height to enforce constraints */\n overflow: hidden;\n flex-grow: 1;\n min-height: 0; /* Allow flex child to shrink below content size */\n`\n\nexport const Header = styled.h4`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n .remove {\n padding: 2px;\n background: none;\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest);\n }\n }\n`\n\nexport const SubHeader = styled.h5`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n\n color: var(--md-sys-color-outline);\n`\n\nexport const LinksList = styled.ul`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n overflow-y: auto;\n flex: 1;\n min-height: 0;\n`\n\nexport const LinkItem = styled.li`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n\n /* card styling */\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-m);\n padding: 4px 4px;\n\n &.clickable {\n cursor: pointer;\n &:hover {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n }\n\n &.restricted {\n opacity: 0.5;\n font-style: italic;\n }\n\n &.selected {\n background-color: var(--md-sys-color-primary-container);\n &,\n .icon {\n color: var(--md-sys-color-on-primary-container);\n }\n\n &:hover {\n background-color: var(--md-sys-color-primary-container-hover);\n }\n\n .remove {\n /* show remove icon when selected */\n visibility: visible;\n /* use selected hover */\n &:hover {\n background-color: var(--md-sys-color-on-primary);\n color: var(--md-sys-color-primary);\n }\n }\n }\n\n .title {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--base-gap-small);\n flex: 1;\n }\n\n .path {\n color: var(--md-sys-color-outline);\n }\n\n .label {\n font-weight: bold;\n }\n\n /* show remove icon when hovering item */\n &:hover {\n .remove {\n visibility: visible;\n }\n }\n\n .remove {\n padding: 2px;\n visibility: hidden;\n\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest-hover);\n }\n }\n`\n\nexport const AddLinksContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* hack for search border cutoff */\n padding: 2px;\n margin: -2px;\n padding-top: var(--padding-m);\n flex-shrink: 0; /* Don't shrink this section */\n min-height: 0; /* Allow internal scrolling */\n overflow: hidden; /* Prevent this section from expanding beyond bounds */\n\n /* Set a reasonable max-height that allows for search functionality */\n max-height: 250px;\n`\n\n// wraps the picker and search input\nexport const SearchButtons = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--base-gap-small);\n`\n\nexport const Search = styled.div`\n position: relative;\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n padding-top: var(--padding-s);\n\n .input-search {\n position: absolute;\n left: 4px;\n }\n`\n\nexport const PickerButton = styled(Button)`\n min-width: 110px;\n flex: 1;\n width: 100%;\n`\n\nexport const SearchInput = styled(InputText)`\n flex: 1;\n border: none;\n background-color: var(--md-sys-color-surface-container);\n padding-left: 28px;\n width: 100%;\n min-width: 224px;\n`\n\nexport const Error = styled.div`\n color: var(--md-sys-color-error);\n margin-top: var(--base-gap-small);\n`\n\nexport const SearchItems = styled.ul`\n list-style: none;\n padding: 0;\n margin: 0;\n overflow-y: auto;\n padding: var(--padding-m) 0;\n flex: 1; /* Take available space instead of height: 100% */\n min-height: 0; /* Allow shrinking */\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n`\n\nexport const SearchItem = styled.li`\n padding: var(--padding-s);\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n border-radius: var(--border-radius-m);\n cursor: pointer;\n overflow: hidden;\n min-height: min-content;\n\n &:hover,\n &:focus,\n &.selected {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n\n &.loading {\n cursor: default;\n opacity: 0.6;\n\n .icon,\n .label,\n .type {\n background-color: var(--md-sys-color-outline);\n color: transparent;\n border-radius: var(--border-radius-s);\n animation: shimmer 1.5s infinite;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n }\n\n .label {\n height: 16px;\n flex: 1;\n }\n\n .type {\n width: 60px;\n height: 14px;\n }\n }\n\n @keyframes shimmer {\n 0% {\n opacity: 0.6;\n }\n 50% {\n opacity: 0.3;\n }\n 100% {\n opacity: 0.6;\n }\n }\n\n .icon {\n flex-shrink: 0;\n }\n\n .label {\n flex: 1;\n display: flex;\n column-gap: var(--base-gap-small);\n flex-wrap: wrap;\n\n & > * {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .type {\n margin-left: 8px;\n color: var(--md-sys-color-outline);\n }\n`\n"],"names":["Container","styled","Header","SubHeader","LinksList","LinkItem","AddLinksContainer","SearchButtons","Search","PickerButton","Button","SearchInput","InputText","Error","SearchItems","SearchItem"],"mappings":"+JAGaA,EAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYnBC,EAASD,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBhBE,EAAYF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASnBG,EAAYH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcnBI,EAAWJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"LinksManager.styled.cjs.js","sources":["../../../../../src/components/LinksManager/LinksManager.styled.ts"],"sourcesContent":["import { Button, InputText } from '@ynput/ayon-react-components'\nimport styled from 'styled-components'\n\nexport const Container = styled.div`\n padding: var(--padding-m);\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-l);\n display: flex;\n flex-direction: column;\n height: 100%; /* Use height instead of max-height to enforce constraints */\n overflow: hidden;\n flex-grow: 1;\n min-height: 0; /* Allow flex child to shrink below content size */\n`\n\nexport const Header = styled.h4`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n .remove {\n padding: 2px;\n background: none;\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest);\n }\n }\n`\n\nexport const SubHeader = styled.h5`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n\n color: var(--md-sys-color-outline);\n`\n\nexport const LinksList = styled.ul`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n overflow-y: auto;\n flex: 1;\n min-height: 0;\n`\n\nexport const LinkItem = styled.li`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n\n /* card styling */\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-m);\n padding: 4px 4px;\n\n &.clickable {\n cursor: pointer;\n &:hover {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n }\n\n &.restricted,\n &.unknown {\n opacity: 0.5;\n font-style: italic;\n }\n\n &.selected {\n background-color: var(--md-sys-color-primary-container);\n &,\n .icon {\n color: var(--md-sys-color-on-primary-container);\n }\n\n &:hover {\n background-color: var(--md-sys-color-primary-container-hover);\n }\n\n .remove {\n /* show remove icon when selected */\n visibility: visible;\n /* use selected hover */\n &:hover {\n background-color: var(--md-sys-color-on-primary);\n color: var(--md-sys-color-primary);\n }\n }\n }\n\n .title {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--base-gap-small);\n flex: 1;\n }\n\n .path {\n color: var(--md-sys-color-outline);\n }\n\n .label {\n font-weight: bold;\n }\n\n /* show remove icon when hovering item */\n &:hover {\n .remove {\n visibility: visible;\n }\n }\n\n .remove {\n padding: 2px;\n visibility: hidden;\n\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest-hover);\n }\n }\n`\n\nexport const AddLinksContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* hack for search border cutoff */\n padding: 2px;\n margin: -2px;\n padding-top: var(--padding-m);\n flex-shrink: 0; /* Don't shrink this section */\n min-height: 0; /* Allow internal scrolling */\n overflow: hidden; /* Prevent this section from expanding beyond bounds */\n\n /* Set a reasonable max-height that allows for search functionality */\n max-height: 250px;\n`\n\n// wraps the picker and search input\nexport const SearchButtons = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--base-gap-small);\n`\n\nexport const Search = styled.div`\n position: relative;\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n padding-top: var(--padding-s);\n\n .input-search {\n position: absolute;\n left: 4px;\n }\n`\n\nexport const PickerButton = styled(Button)`\n min-width: 110px;\n flex: 1;\n width: 100%;\n`\n\nexport const SearchInput = styled(InputText)`\n flex: 1;\n border: none;\n background-color: var(--md-sys-color-surface-container);\n padding-left: 28px;\n width: 100%;\n min-width: 224px;\n`\n\nexport const Error = styled.div`\n color: var(--md-sys-color-error);\n margin-top: var(--base-gap-small);\n`\n\nexport const SearchItems = styled.ul`\n list-style: none;\n padding: 0;\n margin: 0;\n overflow-y: auto;\n padding: var(--padding-m) 0;\n flex: 1; /* Take available space instead of height: 100% */\n min-height: 0; /* Allow shrinking */\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n`\n\nexport const SearchItem = styled.li`\n padding: var(--padding-s);\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n border-radius: var(--border-radius-m);\n cursor: pointer;\n overflow: hidden;\n min-height: min-content;\n\n &:hover,\n &:focus,\n &.selected {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n\n &.loading {\n cursor: default;\n opacity: 0.6;\n\n .icon,\n .label,\n .type {\n background-color: var(--md-sys-color-outline);\n color: transparent;\n border-radius: var(--border-radius-s);\n animation: shimmer 1.5s infinite;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n }\n\n .label {\n height: 16px;\n flex: 1;\n }\n\n .type {\n width: 60px;\n height: 14px;\n }\n }\n\n @keyframes shimmer {\n 0% {\n opacity: 0.6;\n }\n 50% {\n opacity: 0.3;\n }\n 100% {\n opacity: 0.6;\n }\n }\n\n .icon {\n flex-shrink: 0;\n }\n\n .label {\n flex: 1;\n display: flex;\n column-gap: var(--base-gap-small);\n flex-wrap: wrap;\n\n & > * {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .type {\n margin-left: 8px;\n color: var(--md-sys-color-outline);\n }\n`\n"],"names":["Container","styled","Header","SubHeader","LinksList","LinkItem","AddLinksContainer","SearchButtons","Search","PickerButton","Button","SearchInput","InputText","Error","SearchItems","SearchItem"],"mappings":"+JAGaA,EAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYnBC,EAASD,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBhBE,EAAYF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASnBG,EAAYH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcnBI,EAAWJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmFlBK,EAAoBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB3BM,EAAgBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAOvBO,EAASP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchBQ,EAAeR,EAAOS,QAAM;AAAA;AAAA;AAAA;AAAA,EAM5BC,EAAcV,EAAOW,WAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS9BC,EAAQZ,EAAO;AAAA;AAAA;AAAA,EAKfa,EAAcb,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAarBc,EAAad,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button as
|
|
1
|
+
import { Button as o, InputText as r } from "@ynput/ayon-react-components";
|
|
2
2
|
import e from "styled-components";
|
|
3
3
|
const n = e.div`
|
|
4
4
|
padding: var(--padding-m);
|
|
@@ -66,7 +66,8 @@ const n = e.div`
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
&.restricted
|
|
69
|
+
&.restricted,
|
|
70
|
+
&.unknown {
|
|
70
71
|
opacity: 0.5;
|
|
71
72
|
font-style: italic;
|
|
72
73
|
}
|
|
@@ -154,11 +155,11 @@ const n = e.div`
|
|
|
154
155
|
position: absolute;
|
|
155
156
|
left: 4px;
|
|
156
157
|
}
|
|
157
|
-
`, g = e(
|
|
158
|
+
`, g = e(o)`
|
|
158
159
|
min-width: 110px;
|
|
159
160
|
flex: 1;
|
|
160
161
|
width: 100%;
|
|
161
|
-
`, m = e(
|
|
162
|
+
`, m = e(r)`
|
|
162
163
|
flex: 1;
|
|
163
164
|
border: none;
|
|
164
165
|
background-color: var(--md-sys-color-surface-container);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinksManager.styled.es.js","sources":["../../../../../src/components/LinksManager/LinksManager.styled.ts"],"sourcesContent":["import { Button, InputText } from '@ynput/ayon-react-components'\nimport styled from 'styled-components'\n\nexport const Container = styled.div`\n padding: var(--padding-m);\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-l);\n display: flex;\n flex-direction: column;\n height: 100%; /* Use height instead of max-height to enforce constraints */\n overflow: hidden;\n flex-grow: 1;\n min-height: 0; /* Allow flex child to shrink below content size */\n`\n\nexport const Header = styled.h4`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n .remove {\n padding: 2px;\n background: none;\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest);\n }\n }\n`\n\nexport const SubHeader = styled.h5`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n\n color: var(--md-sys-color-outline);\n`\n\nexport const LinksList = styled.ul`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n overflow-y: auto;\n flex: 1;\n min-height: 0;\n`\n\nexport const LinkItem = styled.li`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n\n /* card styling */\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-m);\n padding: 4px 4px;\n\n &.clickable {\n cursor: pointer;\n &:hover {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n }\n\n &.restricted {\n opacity: 0.5;\n font-style: italic;\n }\n\n &.selected {\n background-color: var(--md-sys-color-primary-container);\n &,\n .icon {\n color: var(--md-sys-color-on-primary-container);\n }\n\n &:hover {\n background-color: var(--md-sys-color-primary-container-hover);\n }\n\n .remove {\n /* show remove icon when selected */\n visibility: visible;\n /* use selected hover */\n &:hover {\n background-color: var(--md-sys-color-on-primary);\n color: var(--md-sys-color-primary);\n }\n }\n }\n\n .title {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--base-gap-small);\n flex: 1;\n }\n\n .path {\n color: var(--md-sys-color-outline);\n }\n\n .label {\n font-weight: bold;\n }\n\n /* show remove icon when hovering item */\n &:hover {\n .remove {\n visibility: visible;\n }\n }\n\n .remove {\n padding: 2px;\n visibility: hidden;\n\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest-hover);\n }\n }\n`\n\nexport const AddLinksContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* hack for search border cutoff */\n padding: 2px;\n margin: -2px;\n padding-top: var(--padding-m);\n flex-shrink: 0; /* Don't shrink this section */\n min-height: 0; /* Allow internal scrolling */\n overflow: hidden; /* Prevent this section from expanding beyond bounds */\n\n /* Set a reasonable max-height that allows for search functionality */\n max-height: 250px;\n`\n\n// wraps the picker and search input\nexport const SearchButtons = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--base-gap-small);\n`\n\nexport const Search = styled.div`\n position: relative;\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n padding-top: var(--padding-s);\n\n .input-search {\n position: absolute;\n left: 4px;\n }\n`\n\nexport const PickerButton = styled(Button)`\n min-width: 110px;\n flex: 1;\n width: 100%;\n`\n\nexport const SearchInput = styled(InputText)`\n flex: 1;\n border: none;\n background-color: var(--md-sys-color-surface-container);\n padding-left: 28px;\n width: 100%;\n min-width: 224px;\n`\n\nexport const Error = styled.div`\n color: var(--md-sys-color-error);\n margin-top: var(--base-gap-small);\n`\n\nexport const SearchItems = styled.ul`\n list-style: none;\n padding: 0;\n margin: 0;\n overflow-y: auto;\n padding: var(--padding-m) 0;\n flex: 1; /* Take available space instead of height: 100% */\n min-height: 0; /* Allow shrinking */\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n`\n\nexport const SearchItem = styled.li`\n padding: var(--padding-s);\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n border-radius: var(--border-radius-m);\n cursor: pointer;\n overflow: hidden;\n min-height: min-content;\n\n &:hover,\n &:focus,\n &.selected {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n\n &.loading {\n cursor: default;\n opacity: 0.6;\n\n .icon,\n .label,\n .type {\n background-color: var(--md-sys-color-outline);\n color: transparent;\n border-radius: var(--border-radius-s);\n animation: shimmer 1.5s infinite;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n }\n\n .label {\n height: 16px;\n flex: 1;\n }\n\n .type {\n width: 60px;\n height: 14px;\n }\n }\n\n @keyframes shimmer {\n 0% {\n opacity: 0.6;\n }\n 50% {\n opacity: 0.3;\n }\n 100% {\n opacity: 0.6;\n }\n }\n\n .icon {\n flex-shrink: 0;\n }\n\n .label {\n flex: 1;\n display: flex;\n column-gap: var(--base-gap-small);\n flex-wrap: wrap;\n\n & > * {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .type {\n margin-left: 8px;\n color: var(--md-sys-color-outline);\n }\n`\n"],"names":["Container","styled","Header","SubHeader","LinksList","LinkItem","AddLinksContainer","SearchButtons","Search","PickerButton","Button","SearchInput","InputText","Error","SearchItems","SearchItem"],"mappings":";;AAGO,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYnBC,IAASD,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAiBhBE,IAAYF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASnBG,IAAYH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAcnBI,IAAWJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"LinksManager.styled.es.js","sources":["../../../../../src/components/LinksManager/LinksManager.styled.ts"],"sourcesContent":["import { Button, InputText } from '@ynput/ayon-react-components'\nimport styled from 'styled-components'\n\nexport const Container = styled.div`\n padding: var(--padding-m);\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-l);\n display: flex;\n flex-direction: column;\n height: 100%; /* Use height instead of max-height to enforce constraints */\n overflow: hidden;\n flex-grow: 1;\n min-height: 0; /* Allow flex child to shrink below content size */\n`\n\nexport const Header = styled.h4`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n .remove {\n padding: 2px;\n background: none;\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest);\n }\n }\n`\n\nexport const SubHeader = styled.h5`\n margin: 0;\n padding: 0;\n padding-bottom: var(--padding-s);\n flex-shrink: 0;\n\n color: var(--md-sys-color-outline);\n`\n\nexport const LinksList = styled.ul`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n overflow-y: auto;\n flex: 1;\n min-height: 0;\n`\n\nexport const LinkItem = styled.li`\n /* reset any defaults */\n list-style: none;\n padding: 0;\n margin: 0;\n\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n\n /* card styling */\n background-color: var(--md-sys-color-surface-container-high);\n border-radius: var(--border-radius-m);\n padding: 4px 4px;\n\n &.clickable {\n cursor: pointer;\n &:hover {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n }\n\n &.restricted,\n &.unknown {\n opacity: 0.5;\n font-style: italic;\n }\n\n &.selected {\n background-color: var(--md-sys-color-primary-container);\n &,\n .icon {\n color: var(--md-sys-color-on-primary-container);\n }\n\n &:hover {\n background-color: var(--md-sys-color-primary-container-hover);\n }\n\n .remove {\n /* show remove icon when selected */\n visibility: visible;\n /* use selected hover */\n &:hover {\n background-color: var(--md-sys-color-on-primary);\n color: var(--md-sys-color-primary);\n }\n }\n }\n\n .title {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--base-gap-small);\n flex: 1;\n }\n\n .path {\n color: var(--md-sys-color-outline);\n }\n\n .label {\n font-weight: bold;\n }\n\n /* show remove icon when hovering item */\n &:hover {\n .remove {\n visibility: visible;\n }\n }\n\n .remove {\n padding: 2px;\n visibility: hidden;\n\n &:hover {\n background-color: var(--md-sys-color-surface-container-highest-hover);\n }\n }\n`\n\nexport const AddLinksContainer = styled.div`\n display: flex;\n flex-direction: column;\n /* hack for search border cutoff */\n padding: 2px;\n margin: -2px;\n padding-top: var(--padding-m);\n flex-shrink: 0; /* Don't shrink this section */\n min-height: 0; /* Allow internal scrolling */\n overflow: hidden; /* Prevent this section from expanding beyond bounds */\n\n /* Set a reasonable max-height that allows for search functionality */\n max-height: 250px;\n`\n\n// wraps the picker and search input\nexport const SearchButtons = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--base-gap-small);\n`\n\nexport const Search = styled.div`\n position: relative;\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n padding-top: var(--padding-s);\n\n .input-search {\n position: absolute;\n left: 4px;\n }\n`\n\nexport const PickerButton = styled(Button)`\n min-width: 110px;\n flex: 1;\n width: 100%;\n`\n\nexport const SearchInput = styled(InputText)`\n flex: 1;\n border: none;\n background-color: var(--md-sys-color-surface-container);\n padding-left: 28px;\n width: 100%;\n min-width: 224px;\n`\n\nexport const Error = styled.div`\n color: var(--md-sys-color-error);\n margin-top: var(--base-gap-small);\n`\n\nexport const SearchItems = styled.ul`\n list-style: none;\n padding: 0;\n margin: 0;\n overflow-y: auto;\n padding: var(--padding-m) 0;\n flex: 1; /* Take available space instead of height: 100% */\n min-height: 0; /* Allow shrinking */\n display: flex;\n flex-direction: column;\n gap: var(--base-gap-small);\n`\n\nexport const SearchItem = styled.li`\n padding: var(--padding-s);\n display: flex;\n align-items: center;\n gap: var(--base-gap-small);\n border-radius: var(--border-radius-m);\n cursor: pointer;\n overflow: hidden;\n min-height: min-content;\n\n &:hover,\n &:focus,\n &.selected {\n background-color: var(--md-sys-color-surface-container-high-hover);\n }\n\n &.loading {\n cursor: default;\n opacity: 0.6;\n\n .icon,\n .label,\n .type {\n background-color: var(--md-sys-color-outline);\n color: transparent;\n border-radius: var(--border-radius-s);\n animation: shimmer 1.5s infinite;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n }\n\n .label {\n height: 16px;\n flex: 1;\n }\n\n .type {\n width: 60px;\n height: 14px;\n }\n }\n\n @keyframes shimmer {\n 0% {\n opacity: 0.6;\n }\n 50% {\n opacity: 0.3;\n }\n 100% {\n opacity: 0.6;\n }\n }\n\n .icon {\n flex-shrink: 0;\n }\n\n .label {\n flex: 1;\n display: flex;\n column-gap: var(--base-gap-small);\n flex-wrap: wrap;\n\n & > * {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .type {\n margin-left: 8px;\n color: var(--md-sys-color-outline);\n }\n`\n"],"names":["Container","styled","Header","SubHeader","LinksList","LinkItem","AddLinksContainer","SearchButtons","Search","PickerButton","Button","SearchInput","InputText","Error","SearchItems","SearchItem"],"mappings":";;AAGO,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYnBC,IAASD,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAiBhBE,IAAYF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASnBG,IAAYH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAcnBI,IAAWJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAmFlBK,IAAoBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgB3BM,IAAgBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOvBO,IAASP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAchBQ,IAAeR,EAAOS,CAAM;AAAA;AAAA;AAAA;AAAA,GAM5BC,IAAcV,EAAOW,CAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS9BC,IAAQZ,EAAO;AAAA;AAAA;AAAA,GAKfa,IAAcb,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAarBc,IAAad,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("../../../../_virtual/jsx-runtime.cjs.js"),a=require("react"),N=require("styled-components"),A=require("./TableSettings.styled.cjs.js"),
|
|
1
|
+
"use strict";const l=require("../../../../_virtual/jsx-runtime.cjs.js"),a=require("react"),N=require("styled-components"),A=require("./TableSettings.styled.cjs.js"),ve=require("../../containers/ProjectTreeTable/context/ColumnSettingsContext.cjs.js"),xe=require("./ColumnItem.cjs.js"),L=require("./SortableColumnItem.cjs.js"),p=require("@dnd-kit/core"),P=require("@dnd-kit/sortable"),me=require("react-toastify"),pe=({columns:E,highlighted:v})=>{const{columnVisibility:r,updateColumnVisibility:z,columnPinning:c,updateColumnPinning:ee,columnOrder:f,setColumnsConfig:R,columnSizing:ne,groupBy:S,sorting:ie,rowHeight:se}=ve.useColumnSettingsContext(),[F,_]=a.useState(null),[te,$]=a.useState(!1),[le,G]=a.useState(!1),[J,K]=a.useState(!1),[oe,H]=a.useState(!1),[re,D]=a.useState(!1),ae=p.useSensors(p.useSensor(p.PointerSensor,{activationConstraint:{distance:5}})),w=a.useRef(null);a.useEffect(()=>{if(w.current&&v){const e=w.current.querySelector(`#column-settings-${v}`);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}},[v]);const{visibleColumns:b,hiddenColumns:j,pinnedColumns:m}=a.useMemo(()=>{const e=E.filter(s=>r[s.value]!==!1),n=E.filter(s=>r[s.value]===!1),i=e.filter(s=>c.left?.includes(s.value));return{visibleColumns:e.filter(s=>!c.left?.includes(s.value)),hiddenColumns:n,pinnedColumns:i}},[E,r,c]),y=a.useMemo(()=>{const e=[...b];return f.length>0&&e.sort((n,i)=>{const d=f.indexOf(n.value),s=f.indexOf(i.value);return d===-1?1:s===-1?-1:d-s}),e},[b,f]),O=a.useMemo(()=>{const e=[...m];return f.length>0&&e.sort((n,i)=>{const d=f.indexOf(n.value),s=f.indexOf(i.value);return d===-1?1:s===-1?-1:d-s}),e},[m,f]),Q=a.useMemo(()=>y.map(e=>e.value),[y]),U=a.useMemo(()=>O.map(e=>e.value),[O]),I=e=>{const n={...r};n[e]!==!1?n[e]=!1:n[e]=!0,z(n)},q=e=>{const n={...c},i={...r};n.left?.includes(e)?n.left=n.left.filter(d=>d!==e):(n.left=[...n.left||[],e],i[e]===!1&&(i[e]=!0,z(i))),ee(n)},de=e=>{const n=e.active.id;_(n),K(c.left?.includes(n)||!1)},ue=e=>{const{active:n,over:i}=e;if(i&&n.id!==i.id){const d=r[n.id]===!1,s=r[i.id]!==!1,t=c.left?.includes(i.id)||!1,x=r[i.id]===!1;$(d&&s&&!t),G(s&&t),D(x),H(s&&!t)}else H(!1),D(!1)},ce=e=>{$(!1),G(!1),K(!1),H(!1),D(!1);const{active:n,over:i}=e;if(i&&n.id!==i.id){const d=[...b,...j,...m].find(t=>t.value===n.id),s=[...b,...j,...m].find(t=>t.value===i.id);if(d&&s){const t=n.id,x=i.id,M=r[t]!==!1,W=r[x]!==!1,V=c.left?.includes(t)||!1,h=c.left?.includes(x)||!1,fe=r[x]===!1,o={columnVisibility:{...r},columnOrder:[...f],columnPinning:{...c},columnSizing:{...ne},groupBy:S,sorting:ie,rowHeight:se};if(M&&W){let u=[...o.columnPinning.left||[]];V!==h&&(V&&!h?u=u.filter(T=>T!==t):!V&&h&&(u=[...u,t]));const g=[...U,...Q],X=g.indexOf(t),Y=g.indexOf(x);if(X===-1||Y===-1){console.error("Invalid column order state"),me.toast.error("Invalid column order state");return}const Z=P.arrayMove(g,X,Y),ge=Z.filter(T=>u.includes(T));o.columnOrder=Z,o.columnPinning={...o.columnPinning,left:ge},R(o)}else if(!M&&W){if(o.columnVisibility[t]=!0,h){const g=[...o.columnPinning.left||[],t];o.columnPinning.left=g}const u=[...U,...Q];if(!u.includes(t)){const g=u.indexOf(x);u.splice(g,0,t)}o.columnOrder=u,R(o)}else if(M&&fe){if(o.columnVisibility[t]=!1,V){const u=(o.columnPinning.left||[]).filter(g=>g!==t);o.columnPinning.left=u}R(o)}}}_(null)},C=F?[...b,...j,...m].find(e=>e.value===F):null;return l.jsxRuntimeExports.jsx(p.DndContext,{sensors:ae,collisionDetection:p.closestCenter,onDragStart:de,onDragOver:ue,onDragEnd:ce,children:l.jsxRuntimeExports.jsxs(be,{children:[m.length>0&&l.jsxRuntimeExports.jsxs(k,{className:le&&!J?"drop-target":"",children:[l.jsxRuntimeExports.jsx(B,{children:"Pinned Columns"}),l.jsxRuntimeExports.jsx(P.SortableContext,{items:O.map(e=>e.value),strategy:P.verticalListSortingStrategy,children:l.jsxRuntimeExports.jsx(A.Menu,{children:O.map(e=>l.jsxRuntimeExports.jsx(L,{id:e.value,column:e,isPinned:!0,isHidden:!1,isDisabled:!!S&&e.value==="name",isHighlighted:v===e.value,onTogglePinning:q,onToggleVisibility:I},e.value))})})]}),l.jsxRuntimeExports.jsxs(k,{className:te||J&&oe?"drop-target":"",children:[l.jsxRuntimeExports.jsx(B,{children:"Visible Columns"}),l.jsxRuntimeExports.jsx(P.SortableContext,{items:y.map(e=>e.value),strategy:P.verticalListSortingStrategy,children:l.jsxRuntimeExports.jsx(A.Menu,{children:y.map(e=>l.jsxRuntimeExports.jsx(L,{id:e.value,column:e,isPinned:!1,isHidden:!1,isHighlighted:v===e.value,isDisabled:!!S&&e.value==="name",onTogglePinning:q,onToggleVisibility:I},e.value))})})]}),j.length>0&&l.jsxRuntimeExports.jsxs(k,{className:re?"drop-target":"",children:[l.jsxRuntimeExports.jsx(B,{children:"Hidden Columns"}),l.jsxRuntimeExports.jsx(A.Menu,{ref:w,children:j.map(e=>l.jsxRuntimeExports.jsx(L,{id:e.value,column:e,isPinned:c.left?.includes(e.value)||!1,isHidden:!0,isHighlighted:v===e.value,isDisabled:!!S&&e.value==="name",onTogglePinning:q,onToggleVisibility:I},e.value))})]}),l.jsxRuntimeExports.jsx(p.DragOverlay,{children:C&&l.jsxRuntimeExports.jsx(xe,{column:C,isPinned:c.left?.includes(C.value)||!1,isHidden:r[C.value]===!1,isHighlighted:v===C.value,dragOverlay:!0})})]})})},be=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--base-gap-large);
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
font-weight: 500;
|
|
19
19
|
color: var(--md-sys-color-outline);
|
|
20
20
|
padding: 4px 0;
|
|
21
|
-
`;module.exports=
|
|
21
|
+
`;module.exports=pe;
|
|
22
22
|
//# sourceMappingURL=ColumnsSettings.cjs.js.map
|