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AqBC,EAAuB,CAAGC,CAAAA,EAAAA,EAAAA,QAAAA,EAAS,IAEzD,CAACxE,EAASyE,EAAW,CAAGD,CAAAA,EAAAA,EAAAA,QAAAA,EAAmB,EAAE,EAC7CE,EAAoBC,CAAAA,EAAAA,EAAAA,EAAAA,EAAqBP,EAAW,CACxDpE,QAASA,CACX,GAEM4E,EAAeC,CAAAA,EAAAA,EAAAA,EAAAA,IAErBC,CAAAA,EAAAA,EAAAA,SAAAA,EAAU,KACR,GAAIF,EAGF,OAFAV,EAAca,SAAS,CAACC,GAAG,CAAC,IAErB,KACLd,EAAca,SAAS,CAACC,GAAG,CAAC,GAC9B,CAGJ,EAAG,CAACd,EAAeU,EAAa,EAEhC,IAAMK,EAAIC,CAAAA,EAAAA,EAAAA,EAAAA,IAEV,MACE,uB,UACE,UAACC,EAAAA,EAASA,CAAAA,CAACC,MAAOH,CAAC,CAAC,YAAY,E,GAChC,UAACI,EAAAA,EAAQA,CAAAA,CAACC,KAAK,S,GACf,UAACC,EAAAA,EAAUA,CAAAA,C,SACT,UAACxD,EAAaA,CACZC,cAAe,CAACsC,EAChBtE,QAASA,EACTC,gBAAiBwE,C,KAGrB,UAACe,EAAAA,EAAQA,CAAAA,C,SACP,WAACtE,MAAAA,CAAIC,UDjEK,Y,UCkER,UAACpB,EAAeA,CAACC,QAASA,EAASC,gBAAiBwE,C,GACnDC,EAAkBzD,MAAM,CAAG,EAC1B,UAACwE,EAAAA,EAAmBA,CAAAA,CAClBC,2BAA4BnB,EAC5BvE,QAASA,C,GAGX,UAAC2F,EAAAA,EAAaA,CAAAA,CACZC,KAAK,MACLC,QAAS,UAACC,EAAAA,EAAcA,CAAAA,CAAAA,GACxBtE,cAAetB,EAAiBsB,aAAa,G,OAO3D,EAEauE,EAAY,KACvBC,EAAAA,EAAuBA,CAACC,KAAK,CAAC,WAEvB,UAAChC,EAAAA,CAAAA,G","sources":["webpack://@affine/web/../core/src/pages/workspace/all-page/all-page-filter.tsx","webpack://@affine/web/../core/src/components/filter-container.css.ts","webpack://@affine/web/../core/src/pages/workspace/all-page/all-page-header.tsx","webpack://@affine/web/../core/src/pages/workspace/all-page/all-page.css.ts","webpack://@affine/web/../core/src/pages/workspace/all-page/all-page.tsx"],"sourcesContent":["import { CollectionService } from '@affine/core/modules/collection';\nimport type { Collection, Filter } from '@affine/env/filter';\nimport { useService, WorkspaceService } from '@toeverything/infra';\nimport { useCallback } from 'react';\n\nimport { filterContainerStyle } from '../../../components/filter-container.css';\nimport {\n FilterList,\n SaveAsCollectionButton,\n} from '../../../components/page-list';\nimport { useNavigateHelper } from '../../../hooks/use-navigate-helper';\n\nexport const FilterContainer = ({\n filters,\n onChangeFilters,\n}: {\n filters: Filter[];\n onChangeFilters: (filters: Filter[]) => void;\n}) => {\n const currentWorkspace = useService(WorkspaceService).workspace;\n const navigateHelper = useNavigateHelper();\n const collectionService = useService(CollectionService);\n const saveToCollection = useCallback(\n (collection: Collection) => {\n collectionService.addCollection({\n ...collection,\n filterList: filters,\n });\n navigateHelper.jumpToCollection(currentWorkspace.id, collection.id);\n },\n [collectionService, filters, navigateHelper, currentWorkspace.id]\n );\n\n if (!filters.length) {\n return null;\n }\n\n return (\n
\n
\n \n
\n
\n {filters.length > 0 ? (\n \n ) : null}\n
\n
\n );\n};\n","import \"../core/src/components/filter-container.css.ts.vanilla.css!=!../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/components/filter-container.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll8xY3EycDljMCB7CiAgcGFkZGluZzogMCAxNnB4OwogIGRpc3BsYXk6IGZsZXg7CiAgcG9zaXRpb246IHJlbGF0aXZlOwp9\\\"}!../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var filterContainerStyle = '_1cq2p9c0';","import { usePageHelper } from '@affine/core/components/blocksuite/block-suite-page-list/utils';\nimport {\n AllPageListOperationsMenu,\n PageDisplayMenu,\n PageListNewPageButton,\n} from '@affine/core/components/page-list';\nimport { Header } from '@affine/core/components/pure/header';\nimport { WorkspaceModeFilterTab } from '@affine/core/components/pure/workspace-mode-filter-tab';\nimport { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';\nimport { track } from '@affine/core/mixpanel';\nimport { isNewTabTrigger } from '@affine/core/utils';\nimport type { Filter } from '@affine/env/filter';\nimport { PlusIcon } from '@blocksuite/icons/rc';\nimport { useService, WorkspaceService } from '@toeverything/infra';\nimport clsx from 'clsx';\n\nimport * as styles from './all-page.css';\n\nexport const AllPageHeader = ({\n showCreateNew,\n filters,\n onChangeFilters,\n}: {\n showCreateNew: boolean;\n filters: Filter[];\n onChangeFilters: (filters: Filter[]) => void;\n}) => {\n const workspace = useService(WorkspaceService).workspace;\n const { importFile, createEdgeless, createPage } = usePageHelper(\n workspace.docCollection\n );\n\n const onImportFile = useAsyncCallback(async () => {\n const options = await importFile();\n if (options.isWorkspaceFile) {\n track.allDocs.header.actions.createWorkspace({\n control: 'import',\n });\n } else {\n track.allDocs.header.actions.createDoc({\n control: 'import',\n });\n }\n }, [importFile]);\n\n return (\n \n }\n right={\n <>\n \n createEdgeless(isNewTabTrigger(e) ? 'new-tab' : true)\n }\n onCreatePage={e =>\n createPage(isNewTabTrigger(e) ? 'new-tab' : true)\n }\n onImportFile={onImportFile}\n >\n \n \n \n \n }\n center={}\n />\n );\n};\n","import \"../core/src/pages/workspace/all-page/all-page.css.ts.vanilla.css!=!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/virtualFileLoader/dist/vanilla-extract-webpack-plugin-virtualFileLoader.cjs.js?{\\\"fileName\\\":\\\"../core/src/pages/workspace/all-page/all-page.css.ts.vanilla.css\\\",\\\"source\\\":\\\"Ll8xNHIwbmsyMCB7CiAgZmxleDogMTsKICB3aWR0aDogMTAwJTsKICBwYWRkaW5nLWJvdHRvbTogMzJweDsKfQouXzE0cjBuazIxIHsKICB0cmFuc2l0aW9uOiBvcGFjaXR5IDAuMXMgZWFzZS1pbi1vdXQ7Cn0KLl8xNHIwbmsyMiB7CiAgcGFkZGluZzogNHB4IDhweDsKICBmb250LXNpemU6IDE2cHg7CiAgd2lkdGg6IDMycHg7CiAgaGVpZ2h0OiAyOHB4OwogIGJvcmRlci1yYWRpdXM6IDhweDsKfQouXzE0cjBuazIzIHsKICBvcGFjaXR5OiAwOwogIHBvaW50ZXItZXZlbnRzOiBub25lOwp9Ci5fMTRyMG5rMjQgewogIGRpc3BsYXk6IGZsZXg7CiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICBmbGV4OiAxOwogIGhlaWdodDogMTAwJTsKICB3aWR0aDogMTAwJTsKfQ==\\\"}!../../../../../../../node_modules/@vanilla-extract/webpack-plugin/extracted.js\"\nexport var body = '_14r0nk24';\nexport var headerCreateNewButton = '_14r0nk21';\nexport var headerCreateNewButtonHidden = '_14r0nk23';\nexport var headerCreateNewCollectionIconButton = '_14r0nk22';\nexport var scrollContainer = '_14r0nk20';","import {\n PageListHeader,\n useFilteredPageMetas,\n VirtualizedPageList,\n} from '@affine/core/components/page-list';\nimport { useBlockSuiteDocMeta } from '@affine/core/hooks/use-block-suite-page-meta';\nimport { performanceRenderLogger } from '@affine/core/shared';\nimport type { Filter } from '@affine/env/filter';\nimport { useI18n } from '@affine/i18n';\nimport {\n GlobalContextService,\n useService,\n WorkspaceService,\n} from '@toeverything/infra';\nimport { useEffect, useState } from 'react';\n\nimport {\n useIsActiveView,\n ViewBody,\n ViewHeader,\n ViewIcon,\n ViewTitle,\n} from '../../../modules/workbench';\nimport { EmptyPageList } from '../page-list-empty';\nimport * as styles from './all-page.css';\nimport { FilterContainer } from './all-page-filter';\nimport { AllPageHeader } from './all-page-header';\n\nexport const AllPage = () => {\n const currentWorkspace = useService(WorkspaceService).workspace;\n const globalContext = useService(GlobalContextService).globalContext;\n const pageMetas = useBlockSuiteDocMeta(currentWorkspace.docCollection);\n const [hideHeaderCreateNew, setHideHeaderCreateNew] = useState(true);\n\n const [filters, setFilters] = useState([]);\n const filteredPageMetas = useFilteredPageMetas(pageMetas, {\n filters: filters,\n });\n\n const isActiveView = useIsActiveView();\n\n useEffect(() => {\n if (isActiveView) {\n globalContext.isAllDocs.set(true);\n\n return () => {\n globalContext.isAllDocs.set(false);\n };\n }\n return;\n }, [globalContext, isActiveView]);\n\n const t = useI18n();\n\n return (\n <>\n \n \n \n \n \n \n
\n \n {filteredPageMetas.length > 0 ? (\n \n ) : (\n }\n docCollection={currentWorkspace.docCollection}\n />\n )}\n
\n
\n \n );\n};\n\nexport const Component = () => {\n performanceRenderLogger.debug('AllPage');\n\n return ;\n};\n"],"names":["FilterContainer","filters","onChangeFilters","currentWorkspace","useService","WorkspaceService","workspace","navigateHelper","useNavigateHelper","collectionService","CollectionService","saveToCollection","useCallback","addCollection","collection","filterList","jumpToCollection","id","length","div","className","style","flex","FilterList","propertiesMeta","docCollection","meta","properties","value","onChange","SaveAsCollectionButton","onConfirm","AllPageHeader","showCreateNew","importFile","createEdgeless","createPage","usePageHelper","onImportFile","useAsyncCallback","options","isWorkspaceFile","track","allDocs","header","actions","createWorkspace","control","createDoc","Header","left","AllPageListOperationsMenu","onChangeFilterList","right","PageListNewPageButton","size","clsx","onCreateEdgeless","e","isNewTabTrigger","onCreatePage","PlusIcon","PageDisplayMenu","center","WorkspaceModeFilterTab","activeFilter","AllPage","globalContext","GlobalContextService","pageMetas","useBlockSuiteDocMeta","hideHeaderCreateNew","setHideHeaderCreateNew","useState","setFilters","filteredPageMetas","useFilteredPageMetas","isActiveView","useIsActiveView","useEffect","isAllDocs","set","t","useI18n","ViewTitle","title","ViewIcon","icon","ViewHeader","ViewBody","VirtualizedPageList","setHideHeaderCreateNewPage","EmptyPageList","type","heading","PageListHeader","Component","performanceRenderLogger","debug"],"sourceRoot":""}