@wix/auto-patterns 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/collectionData/CollectionData.js +4 -0
- package/dist/cjs/collectionData/CollectionData.js.map +1 -0
- package/dist/cjs/collectionData/CollectionDataFactory.js +12 -0
- package/dist/cjs/collectionData/CollectionDataFactory.js.map +1 -0
- package/dist/cjs/collectionData/SchemaFactory.js +12 -0
- package/dist/cjs/collectionData/SchemaFactory.js.map +1 -0
- package/dist/cjs/{config/cms/CmsCompositeConfig.js → collectionData/cms/CmsCollectionData.js} +27 -10
- package/dist/cjs/collectionData/cms/CmsCollectionData.js.map +1 -0
- package/dist/cjs/{config → collectionData}/cms/filterUtils.js +24 -10
- package/dist/cjs/collectionData/cms/filterUtils.js.map +1 -0
- package/dist/cjs/collectionData/cms/sortUtils.js.map +1 -0
- package/dist/cjs/collectionData/constants.js +13 -0
- package/dist/cjs/collectionData/constants.js.map +1 -0
- package/dist/cjs/collectionData/index.js +10 -0
- package/dist/cjs/collectionData/index.js.map +1 -0
- package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js +47 -0
- package/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -0
- package/dist/cjs/components/AutoPatternsApp/index.js +10 -0
- package/dist/cjs/components/AutoPatternsApp/index.js.map +1 -0
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +22 -33
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +33 -143
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +164 -0
- package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -0
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/Checkbox.js +33 -0
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/Checkbox.js.map +1 -0
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/FormFieldInput.js +50 -0
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/FormFieldInput.js.map +1 -0
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/ShortText.js +60 -0
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/ShortText.js.map +1 -0
- package/dist/cjs/components/AutoPatternsEntityPage/index.js +10 -0
- package/dist/cjs/components/AutoPatternsEntityPage/index.js.map +1 -0
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js +35 -0
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -0
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGridContent.js +44 -0
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGridContent.js.map +1 -0
- package/dist/cjs/components/AutoPatternsGrid/index.js +10 -0
- package/dist/cjs/components/AutoPatternsGrid/index.js.map +1 -0
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.js +61 -0
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.js.map +1 -0
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js +35 -0
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -0
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTableContent.js +55 -0
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTableContent.js.map +1 -0
- package/dist/cjs/components/AutoPatternsTable/index.js +10 -0
- package/dist/cjs/components/AutoPatternsTable/index.js.map +1 -0
- package/dist/cjs/exports/react.js +7 -0
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/hooks/index.js +16 -4
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useColumns.js +2 -5
- package/dist/cjs/hooks/useColumns.js.map +1 -1
- package/dist/cjs/hooks/useCommonCollectionFeatures.js +109 -0
- package/dist/cjs/hooks/useCommonCollectionFeatures.js.map +1 -0
- package/dist/cjs/hooks/useEmptyStates.js +2 -7
- package/dist/cjs/hooks/useEmptyStates.js.map +1 -1
- package/dist/cjs/hooks/useFetchData.js +7 -8
- package/dist/cjs/hooks/useFetchData.js.map +1 -1
- package/dist/cjs/hooks/useFilters.js +72 -76
- package/dist/cjs/hooks/useFilters.js.map +1 -1
- package/dist/cjs/hooks/useGridFeatures.js +77 -0
- package/dist/cjs/hooks/useGridFeatures.js.map +1 -0
- package/dist/cjs/hooks/useTableFeatures.js +69 -0
- package/dist/cjs/hooks/useTableFeatures.js.map +1 -0
- package/dist/cjs/providers/CollectionDataContext.js +44 -0
- package/dist/cjs/providers/CollectionDataContext.js.map +1 -0
- package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/cjs/providers/{ConfigContext.js → SchemaContext.js} +21 -20
- package/dist/cjs/providers/SchemaContext.js.map +1 -0
- package/dist/cjs/providers/index.js +4 -4
- package/dist/cjs/providers/index.js.map +1 -1
- package/dist/cjs/react.js +4 -4
- package/dist/cjs/react.js.map +1 -1
- package/dist/cjs/{types.js → types/CollectionPageConfig.js} +3 -9
- package/dist/cjs/types/CollectionPageConfig.js.map +1 -0
- package/dist/cjs/types/EntityPageConfig.js +4 -0
- package/dist/cjs/types/EntityPageConfig.js.map +1 -0
- package/dist/cjs/types/index.js +22 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/types/types.js +4 -0
- package/dist/cjs/types/types.js.map +1 -0
- package/dist/cjs/utils/filters.js +53 -0
- package/dist/cjs/utils/filters.js.map +1 -0
- package/dist/esm/collectionData/CollectionData.js +2 -0
- package/dist/esm/collectionData/CollectionData.js.map +1 -0
- package/dist/esm/collectionData/CollectionDataFactory.js +8 -0
- package/dist/esm/collectionData/CollectionDataFactory.js.map +1 -0
- package/dist/esm/collectionData/SchemaFactory.js +8 -0
- package/dist/esm/collectionData/SchemaFactory.js.map +1 -0
- package/dist/esm/{config/cms/CmsCompositeConfig.js → collectionData/cms/CmsCollectionData.js} +26 -9
- package/dist/esm/collectionData/cms/CmsCollectionData.js.map +1 -0
- package/dist/esm/{config → collectionData}/cms/filterUtils.js +25 -11
- package/dist/esm/collectionData/cms/filterUtils.js.map +1 -0
- package/dist/esm/collectionData/cms/sortUtils.js.map +1 -0
- package/dist/esm/collectionData/constants.js +9 -0
- package/dist/esm/collectionData/constants.js.map +1 -0
- package/dist/esm/collectionData/index.js +2 -0
- package/dist/esm/collectionData/index.js.map +1 -0
- package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js +22 -0
- package/dist/esm/components/AutoPatternsApp/AutoPatternsApp.js.map +1 -0
- package/dist/esm/components/AutoPatternsApp/index.js +2 -0
- package/dist/esm/components/AutoPatternsApp/index.js.map +1 -0
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +11 -13
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +31 -110
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +82 -0
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -0
- package/dist/esm/components/AutoPatternsEntityPage/Fields/Checkbox.js +19 -0
- package/dist/esm/components/AutoPatternsEntityPage/Fields/Checkbox.js.map +1 -0
- package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js +37 -0
- package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js.map +1 -0
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js +40 -0
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js.map +1 -0
- package/dist/esm/components/AutoPatternsEntityPage/index.js +2 -0
- package/dist/esm/components/AutoPatternsEntityPage/index.js.map +1 -0
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js +16 -0
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -0
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGridContent.js +32 -0
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGridContent.js.map +1 -0
- package/dist/esm/components/AutoPatternsGrid/index.js +2 -0
- package/dist/esm/components/AutoPatternsGrid/index.js.map +1 -0
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsPage.js +37 -0
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsPage.js.map +1 -0
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js +16 -0
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -0
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTableContent.js +43 -0
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTableContent.js.map +1 -0
- package/dist/esm/components/AutoPatternsTable/index.js +2 -0
- package/dist/esm/components/AutoPatternsTable/index.js.map +1 -0
- package/dist/esm/exports/react.js +1 -0
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/hooks/index.js +3 -1
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useColumns.js +3 -6
- package/dist/esm/hooks/useColumns.js.map +1 -1
- package/dist/esm/hooks/useCommonCollectionFeatures.js +72 -0
- package/dist/esm/hooks/useCommonCollectionFeatures.js.map +1 -0
- package/dist/esm/hooks/useEmptyStates.js +2 -7
- package/dist/esm/hooks/useEmptyStates.js.map +1 -1
- package/dist/esm/hooks/useFetchData.js +8 -9
- package/dist/esm/hooks/useFetchData.js.map +1 -1
- package/dist/esm/hooks/useFilters.js +63 -75
- package/dist/esm/hooks/useFilters.js.map +1 -1
- package/dist/esm/hooks/useGridFeatures.js +75 -0
- package/dist/esm/hooks/useGridFeatures.js.map +1 -0
- package/dist/esm/hooks/useTableFeatures.js +58 -0
- package/dist/esm/hooks/useTableFeatures.js.map +1 -0
- package/dist/esm/providers/CollectionDataContext.js +30 -0
- package/dist/esm/providers/CollectionDataContext.js.map +1 -0
- package/dist/esm/providers/PatternsWizardOverridesContext.js +1 -1
- package/dist/esm/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/esm/providers/SchemaContext.js +30 -0
- package/dist/esm/providers/SchemaContext.js.map +1 -0
- package/dist/esm/providers/index.js +1 -1
- package/dist/esm/providers/index.js.map +1 -1
- package/dist/esm/react.js +1 -1
- package/dist/esm/react.js.map +1 -1
- package/dist/esm/{types.js → types/CollectionPageConfig.js} +1 -9
- package/dist/esm/types/CollectionPageConfig.js.map +1 -0
- package/dist/esm/types/EntityPageConfig.js +2 -0
- package/dist/esm/types/EntityPageConfig.js.map +1 -0
- package/dist/esm/types/index.js +4 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/types.js +2 -0
- package/dist/esm/types/types.js.map +1 -0
- package/dist/esm/utils/filters.js +49 -0
- package/dist/esm/utils/filters.js.map +1 -0
- package/dist/types/collectionData/CollectionData.d.ts +9 -0
- package/dist/types/collectionData/CollectionData.d.ts.map +1 -0
- package/dist/types/collectionData/CollectionDataFactory.d.ts +4 -0
- package/dist/types/collectionData/CollectionDataFactory.d.ts.map +1 -0
- package/dist/types/collectionData/SchemaFactory.d.ts +3 -0
- package/dist/types/collectionData/SchemaFactory.d.ts.map +1 -0
- package/dist/types/collectionData/cms/CmsCollectionData.d.ts +8 -0
- package/dist/types/collectionData/cms/CmsCollectionData.d.ts.map +1 -0
- package/dist/types/{config → collectionData}/cms/filterUtils.d.ts +3 -3
- package/dist/types/collectionData/cms/filterUtils.d.ts.map +1 -0
- package/dist/types/collectionData/cms/sortUtils.d.ts.map +1 -0
- package/dist/types/{config → collectionData}/constants.d.ts +4 -0
- package/dist/types/collectionData/constants.d.ts.map +1 -0
- package/dist/types/collectionData/index.d.ts +2 -0
- package/dist/types/collectionData/index.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts +7 -0
- package/dist/types/components/AutoPatternsApp/AutoPatternsApp.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsApp/index.d.ts +2 -0
- package/dist/types/components/AutoPatternsApp/index.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts +2 -2
- package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.d.ts +5 -1
- package/dist/types/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts +7 -0
- package/dist/types/components/AutoPatternsEntityPage/AutoPatternsEntityPage.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsEntityPage/Fields/Checkbox.d.ts +6 -0
- package/dist/types/components/AutoPatternsEntityPage/Fields/Checkbox.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsEntityPage/Fields/FormFieldInput.d.ts +14 -0
- package/dist/types/components/AutoPatternsEntityPage/Fields/FormFieldInput.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsEntityPage/Fields/ShortText.d.ts +13 -0
- package/dist/types/components/AutoPatternsEntityPage/Fields/ShortText.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsEntityPage/index.d.ts +2 -0
- package/dist/types/components/AutoPatternsEntityPage/index.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsGrid/AutoPatternsGrid.d.ts +7 -0
- package/dist/types/components/AutoPatternsGrid/AutoPatternsGrid.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsGrid/AutoPatternsGridContent.d.ts +7 -0
- package/dist/types/components/AutoPatternsGrid/AutoPatternsGridContent.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsGrid/index.d.ts +2 -0
- package/dist/types/components/AutoPatternsGrid/index.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsRoute/AutoPatternsPage.d.ts +7 -0
- package/dist/types/components/AutoPatternsRoute/AutoPatternsPage.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsTable/AutoPatternsTable.d.ts +7 -0
- package/dist/types/components/AutoPatternsTable/AutoPatternsTable.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsTable/AutoPatternsTableContent.d.ts +7 -0
- package/dist/types/components/AutoPatternsTable/AutoPatternsTableContent.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsTable/index.d.ts +2 -0
- package/dist/types/components/AutoPatternsTable/index.d.ts.map +1 -0
- package/dist/types/exports/react.d.ts +1 -0
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +3 -1
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/useColumns.d.ts +2 -1
- package/dist/types/hooks/useColumns.d.ts.map +1 -1
- package/dist/types/hooks/useCommonCollectionFeatures.d.ts +15 -0
- package/dist/types/hooks/useCommonCollectionFeatures.d.ts.map +1 -0
- package/dist/types/hooks/useEmptyStates.d.ts +2 -1
- package/dist/types/hooks/useEmptyStates.d.ts.map +1 -1
- package/dist/types/hooks/useFetchData.d.ts +2 -1
- package/dist/types/hooks/useFetchData.d.ts.map +1 -1
- package/dist/types/hooks/useFilters.d.ts +7 -2
- package/dist/types/hooks/useFilters.d.ts.map +1 -1
- package/dist/types/hooks/useGridFeatures.d.ts +25 -0
- package/dist/types/hooks/useGridFeatures.d.ts.map +1 -0
- package/dist/types/hooks/useTableFeatures.d.ts +19 -0
- package/dist/types/hooks/useTableFeatures.d.ts.map +1 -0
- package/dist/types/providers/CollectionDataContext.d.ts +12 -0
- package/dist/types/providers/CollectionDataContext.d.ts.map +1 -0
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts +2 -2
- package/dist/types/providers/SchemaContext.d.ts +11 -0
- package/dist/types/providers/SchemaContext.d.ts.map +1 -0
- package/dist/types/providers/index.d.ts +1 -1
- package/dist/types/providers/index.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/types/CollectionPageConfig.d.ts +166 -0
- package/dist/types/types/CollectionPageConfig.d.ts.map +1 -0
- package/dist/types/types/EntityPageConfig.d.ts +17 -0
- package/dist/types/types/EntityPageConfig.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/types.d.ts +49 -0
- package/dist/types/types/types.d.ts.map +1 -0
- package/dist/types/utils/filters.d.ts +7 -0
- package/dist/types/utils/filters.d.ts.map +1 -0
- package/package.json +24 -23
- package/dist/cjs/config/CompositeConfig.js +0 -4
- package/dist/cjs/config/CompositeConfig.js.map +0 -1
- package/dist/cjs/config/ConfigFactory.js +0 -12
- package/dist/cjs/config/ConfigFactory.js.map +0 -1
- package/dist/cjs/config/cms/CmsCompositeConfig.js.map +0 -1
- package/dist/cjs/config/cms/filterUtils.js.map +0 -1
- package/dist/cjs/config/cms/sortUtils.js.map +0 -1
- package/dist/cjs/config/constants.js +0 -9
- package/dist/cjs/config/constants.js.map +0 -1
- package/dist/cjs/config/index.js +0 -10
- package/dist/cjs/config/index.js.map +0 -1
- package/dist/cjs/hooks/useFeatures.js +0 -50
- package/dist/cjs/hooks/useFeatures.js.map +0 -1
- package/dist/cjs/hooks/useTableProps.js +0 -34
- package/dist/cjs/hooks/useTableProps.js.map +0 -1
- package/dist/cjs/providers/ConfigContext.js.map +0 -1
- package/dist/cjs/types.js.map +0 -1
- package/dist/esm/config/CompositeConfig.js +0 -2
- package/dist/esm/config/CompositeConfig.js.map +0 -1
- package/dist/esm/config/ConfigFactory.js +0 -8
- package/dist/esm/config/ConfigFactory.js.map +0 -1
- package/dist/esm/config/cms/CmsCompositeConfig.js.map +0 -1
- package/dist/esm/config/cms/filterUtils.js.map +0 -1
- package/dist/esm/config/cms/sortUtils.js.map +0 -1
- package/dist/esm/config/constants.js +0 -5
- package/dist/esm/config/constants.js.map +0 -1
- package/dist/esm/config/index.js +0 -2
- package/dist/esm/config/index.js.map +0 -1
- package/dist/esm/hooks/useFeatures.js +0 -22
- package/dist/esm/hooks/useFeatures.js.map +0 -1
- package/dist/esm/hooks/useTableProps.js +0 -29
- package/dist/esm/hooks/useTableProps.js.map +0 -1
- package/dist/esm/providers/ConfigContext.js +0 -29
- package/dist/esm/providers/ConfigContext.js.map +0 -1
- package/dist/esm/types.js.map +0 -1
- package/dist/types/config/CompositeConfig.d.ts +0 -8
- package/dist/types/config/CompositeConfig.d.ts.map +0 -1
- package/dist/types/config/ConfigFactory.d.ts +0 -4
- package/dist/types/config/ConfigFactory.d.ts.map +0 -1
- package/dist/types/config/cms/CmsCompositeConfig.d.ts +0 -7
- package/dist/types/config/cms/CmsCompositeConfig.d.ts.map +0 -1
- package/dist/types/config/cms/filterUtils.d.ts.map +0 -1
- package/dist/types/config/cms/sortUtils.d.ts.map +0 -1
- package/dist/types/config/constants.d.ts.map +0 -1
- package/dist/types/config/index.d.ts +0 -2
- package/dist/types/config/index.d.ts.map +0 -1
- package/dist/types/hooks/useFeatures.d.ts +0 -8
- package/dist/types/hooks/useFeatures.d.ts.map +0 -1
- package/dist/types/hooks/useTableProps.d.ts +0 -13
- package/dist/types/hooks/useTableProps.d.ts.map +0 -1
- package/dist/types/providers/ConfigContext.d.ts +0 -11
- package/dist/types/providers/ConfigContext.d.ts.map +0 -1
- package/dist/types/types.d.ts +0 -215
- package/dist/types/types.d.ts.map +0 -1
- /package/dist/cjs/{config → collectionData}/cms/sortUtils.js +0 -0
- /package/dist/esm/{config → collectionData}/cms/sortUtils.js +0 -0
- /package/dist/types/{config → collectionData}/cms/sortUtils.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useColumns","useFetchData","CustomColumns","useTableCollection","useCommonCollectionFeatures","useFilters","useCollectionData","useTableFeatures","configuration","_configuration$custom","collectionId","limit","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","collection","commonFeatures","filterComponent","filtersObject","filters","columns","fetchData","entityIdKey","entityNameKey","state","queryName","itemKey","item","itemName","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","customColumns","enabled","createElement","undefined"],"sources":["../../../src/hooks/useTableFeatures.tsx"],"sourcesContent":["import React from 'react';\nimport { TableConfig } from '../types';\nimport { useColumns } from './useColumns';\nimport { useFetchData } from './useFetchData';\nimport { CustomColumns, useTableCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useCollectionData } from '../providers';\n\nexport const useTableFeatures = (configuration: TableConfig) => {\n const {\n collectionId,\n limit,\n persistQueryToUrl,\n disableAutoSelectAllCount,\n selectionConsistencyMode,\n } = configuration.collection;\n\n const commonFeatures = useCommonCollectionFeatures({\n ...configuration,\n });\n\n const { filterComponent, filtersObject } = useFilters(configuration.filters);\n const columns = useColumns(configuration.columns);\n const { fetchData } = useFetchData(configuration.collection);\n\n const { entityIdKey, entityNameKey } = useCollectionData();\n\n const state = useTableCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[entityIdKey],\n itemName: (item) => item[entityNameKey],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData,\n limit,\n persistQueryToUrl,\n disableAutoSelectAllCount,\n selectionConsistencyMode,\n });\n\n return {\n ...commonFeatures,\n state,\n columns,\n filters: filterComponent,\n customColumns: configuration.customColumns?.enabled ? (\n <CustomColumns />\n ) : undefined,\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,eAAe;AACjE,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,iBAAiB,QAAQ,cAAc;AAEhD,OAAO,MAAMC,gBAAgB,GAAIC,aAA0B,IAAK;EAAA,IAAAC,qBAAA;EAC9D,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,yBAAyB;IACzBC;EACF,CAAC,GAAGN,aAAa,CAACO,UAAU;EAE5B,MAAMC,cAAc,GAAGZ,2BAA2B,CAAC;IACjD,GAAGI;EACL,CAAC,CAAC;EAEF,MAAM;IAAES,eAAe;IAAEC;EAAc,CAAC,GAAGb,UAAU,CAACG,aAAa,CAACW,OAAO,CAAC;EAC5E,MAAMC,OAAO,GAAGpB,UAAU,CAACQ,aAAa,CAACY,OAAO,CAAC;EACjD,MAAM;IAAEC;EAAU,CAAC,GAAGpB,YAAY,CAACO,aAAa,CAACO,UAAU,CAAC;EAE5D,MAAM;IAAEO,WAAW;IAAEC;EAAc,CAAC,GAAGjB,iBAAiB,CAAC,CAAC;EAE1D,MAAMkB,KAAK,GAAGrB,kBAAkB,CAAM;IACpCsB,SAAS,EAAE,GAAGf,YAAY,EAAE;IAC5BgB,OAAO,EAAGC,IAAI,IAAKA,IAAI,CAACL,WAAW,CAAC;IACpCM,QAAQ,EAAGD,IAAI,IAAKA,IAAI,CAACJ,aAAa,CAAC;IACvCJ,OAAO,EAAED,aAAa;IACtBW,gBAAgB,EAAGF,IAAI,IAAKA,IAAI,CAACG,cAAc;IAC/CC,iBAAiB,EAAEC,IAAA;MAAA,IAAC;QAAEC;MAAI,CAAC,GAAAD,IAAA;MAAA,OAAKE,MAAM,CAACD,GAAG,CAAC;IAAA;IAC3CZ,SAAS;IACTV,KAAK;IACLC,iBAAiB;IACjBC,yBAAyB;IACzBC;EACF,CAAC,CAAC;EAEF,OAAO;IACL,GAAGE,cAAc;IACjBQ,KAAK;IACLJ,OAAO;IACPD,OAAO,EAAEF,eAAe;IACxBkB,aAAa,EAAE,CAAA1B,qBAAA,GAAAD,aAAa,CAAC2B,aAAa,aAA3B1B,qBAAA,CAA6B2B,OAAO,gBACjDrC,KAAA,CAAAsC,aAAA,CAACnC,aAAa,MAAE,CAAC,GACfoC;EACN,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
2
|
+
import { getCollectionData } from '../collectionData/CollectionDataFactory';
|
|
3
|
+
const CollectionDataContext = /*#__PURE__*/createContext(null);
|
|
4
|
+
export const CollectionDataProvider = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
collectionConfig,
|
|
7
|
+
visibleFieldIds,
|
|
8
|
+
children
|
|
9
|
+
} = _ref;
|
|
10
|
+
const [collectionData, setCollectionData] = useState(null);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
getCollectionData(collectionConfig, visibleFieldIds).then(setCollectionData).catch(error => {
|
|
13
|
+
console.error('Error fetching config:', error);
|
|
14
|
+
});
|
|
15
|
+
}, [collectionConfig, visibleFieldIds]);
|
|
16
|
+
if (!collectionConfig || !collectionData) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/React.createElement(CollectionDataContext.Provider, {
|
|
20
|
+
value: collectionData
|
|
21
|
+
}, children);
|
|
22
|
+
};
|
|
23
|
+
export const useCollectionData = () => {
|
|
24
|
+
const context = useContext(CollectionDataContext);
|
|
25
|
+
if (!context) {
|
|
26
|
+
throw new Error('useCollectionData must be used within a CollectionDataProvider');
|
|
27
|
+
}
|
|
28
|
+
return context;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=CollectionDataContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","useEffect","useState","getCollectionData","CollectionDataContext","CollectionDataProvider","_ref","collectionConfig","visibleFieldIds","children","collectionData","setCollectionData","then","catch","error","console","createElement","Provider","value","useCollectionData","context","Error"],"sources":["../../../src/providers/CollectionDataContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n useEffect,\n useState,\n ReactNode,\n} from 'react';\nimport { getCollectionData } from '../collectionData/CollectionDataFactory';\nimport { CollectionConfig } from '../types/CollectionPageConfig';\nimport { CollectionData } from '../collectionData/CollectionData';\n\nconst CollectionDataContext = createContext<CollectionData | null>(null);\n\ninterface CollectionDataProviderProps {\n collectionConfig: CollectionConfig;\n visibleFieldIds: string[];\n children: ReactNode;\n}\n\nexport const CollectionDataProvider = ({\n collectionConfig,\n visibleFieldIds,\n children,\n}: CollectionDataProviderProps) => {\n const [collectionData, setCollectionData] = useState<CollectionData | null>(\n null,\n );\n\n useEffect(() => {\n getCollectionData(collectionConfig, visibleFieldIds)\n .then(setCollectionData)\n .catch((error) => {\n console.error('Error fetching config:', error);\n });\n }, [collectionConfig, visibleFieldIds]);\n\n if (!collectionConfig || !collectionData) {\n return null;\n }\n\n return (\n <CollectionDataContext.Provider value={collectionData}>\n {children}\n </CollectionDataContext.Provider>\n );\n};\n\nexport const useCollectionData = (): CollectionData => {\n const context = useContext(CollectionDataContext);\n if (!context) {\n throw new Error(\n 'useCollectionData must be used within a CollectionDataProvider',\n );\n }\n return context;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IACVC,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QAEH,OAAO;AACd,SAASC,iBAAiB,QAAQ,yCAAyC;AAI3E,MAAMC,qBAAqB,gBAAGL,aAAa,CAAwB,IAAI,CAAC;AAQxE,OAAO,MAAMM,sBAAsB,GAAGC,IAAA,IAIH;EAAA,IAJI;IACrCC,gBAAgB;IAChBC,eAAe;IACfC;EAC2B,CAAC,GAAAH,IAAA;EAC5B,MAAM,CAACI,cAAc,EAAEC,iBAAiB,CAAC,GAAGT,QAAQ,CAClD,IACF,CAAC;EAEDD,SAAS,CAAC,MAAM;IACdE,iBAAiB,CAACI,gBAAgB,EAAEC,eAAe,CAAC,CACjDI,IAAI,CAACD,iBAAiB,CAAC,CACvBE,KAAK,CAAEC,KAAK,IAAK;MAChBC,OAAO,CAACD,KAAK,CAAC,wBAAwB,EAAEA,KAAK,CAAC;IAChD,CAAC,CAAC;EACN,CAAC,EAAE,CAACP,gBAAgB,EAAEC,eAAe,CAAC,CAAC;EAEvC,IAAI,CAACD,gBAAgB,IAAI,CAACG,cAAc,EAAE;IACxC,OAAO,IAAI;EACb;EAEA,oBACEZ,KAAA,CAAAkB,aAAA,CAACZ,qBAAqB,CAACa,QAAQ;IAACC,KAAK,EAAER;EAAe,GACnDD,QAC6B,CAAC;AAErC,CAAC;AAED,OAAO,MAAMU,iBAAiB,GAAGA,CAAA,KAAsB;EACrD,MAAMC,OAAO,GAAGpB,UAAU,CAACI,qBAAqB,CAAC;EACjD,IAAI,CAACgB,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CACb,gEACF,CAAC;EACH;EACA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","useContext","PatternsWizardOverridesContext","undefined","PatternsWizardOverridesProvider","_ref","children","value","createElement","Provider","usePatternsWizardOverridesContext"],"sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","PatternsWizardOverridesContext","undefined","PatternsWizardOverridesProvider","_ref","children","value","createElement","Provider","usePatternsWizardOverridesContext"],"sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from 'react';\nimport {\n IColumnValue,\n IMenuItem,\n PagePrimaryActionProps,\n PageSecondaryActionProps,\n} from '../types';\nimport { CollectionConfig } from '@wix/patterns';\n\nexport interface PatternsWizardOverridesContextProps {\n actions?: Record<string, (props: IMenuItem<any>) => void>;\n columns?: Record<string, (props: IColumnValue<any>) => void>;\n HeaderAddon?: React.FC;\n emptyState?: Record<string, () => void>;\n usePagePrimaryAction?: () => PagePrimaryActionProps;\n usePageSecondaryAction?: () => PageSecondaryActionProps;\n fetchData?: Record<string, CollectionConfig<any, any>['fetchData']>;\n}\n\nconst PatternsWizardOverridesContext = createContext<\n PatternsWizardOverridesContextProps | undefined\n>(undefined);\n\nexport const PatternsWizardOverridesProvider: React.FC<{\n children: ReactNode;\n value: PatternsWizardOverridesContextProps;\n}> = ({ children, value }) => {\n return (\n <PatternsWizardOverridesContext.Provider value={value}>\n {children}\n </PatternsWizardOverridesContext.Provider>\n );\n};\n\nexport const usePatternsWizardOverridesContext = ():\n | PatternsWizardOverridesContextProps\n | undefined => {\n return useContext(PatternsWizardOverridesContext);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAmB,OAAO;AAmBnE,MAAMC,8BAA8B,gBAAGF,aAAa,CAElDG,SAAS,CAAC;AAEZ,OAAO,MAAMC,+BAGX,GAAGC,IAAA,IAAyB;EAAA,IAAxB;IAAEC,QAAQ;IAAEC;EAAM,CAAC,GAAAF,IAAA;EACvB,oBACEN,KAAA,CAAAS,aAAA,CAACN,8BAA8B,CAACO,QAAQ;IAACF,KAAK,EAAEA;EAAM,GACnDD,QACsC,CAAC;AAE9C,CAAC;AAED,OAAO,MAAMI,iCAAiC,GAAGA,CAAA,KAEhC;EACf,OAAOT,UAAU,CAACC,8BAA8B,CAAC;AACnD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
2
|
+
import { getSchema } from '../collectionData/SchemaFactory';
|
|
3
|
+
const SchemaContext = /*#__PURE__*/createContext(null);
|
|
4
|
+
export const SchemaProvider = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
collectionId,
|
|
7
|
+
entityTypeSource,
|
|
8
|
+
children
|
|
9
|
+
} = _ref;
|
|
10
|
+
const [schema, setSchema] = useState(null);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
getSchema(collectionId, entityTypeSource).then(setSchema).catch(error => {
|
|
13
|
+
console.error('Error fetching schema config:', error);
|
|
14
|
+
});
|
|
15
|
+
}, [collectionId, entityTypeSource]);
|
|
16
|
+
if (!schema) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/React.createElement(SchemaContext.Provider, {
|
|
20
|
+
value: schema
|
|
21
|
+
}, children);
|
|
22
|
+
};
|
|
23
|
+
export const useSchema = () => {
|
|
24
|
+
const context = useContext(SchemaContext);
|
|
25
|
+
if (!context) {
|
|
26
|
+
throw new Error('useSchema must be used within a SchemaProvider');
|
|
27
|
+
}
|
|
28
|
+
return context;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=SchemaContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","useEffect","useState","getSchema","SchemaContext","SchemaProvider","_ref","collectionId","entityTypeSource","children","schema","setSchema","then","catch","error","console","createElement","Provider","value","useSchema","context","Error"],"sources":["../../../src/providers/SchemaContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n useEffect,\n useState,\n ReactNode,\n} from 'react';\nimport { getSchema } from '../collectionData/SchemaFactory';\nimport { SchemaConfig } from '../types';\n\nconst SchemaContext = createContext<SchemaConfig | null>(null);\n\ninterface SchemaProviderProps {\n collectionId: string;\n entityTypeSource: string;\n children: ReactNode;\n}\n\nexport const SchemaProvider = ({\n collectionId,\n entityTypeSource,\n children,\n}: SchemaProviderProps) => {\n const [schema, setSchema] = useState<SchemaConfig | null>(null);\n\n useEffect(() => {\n getSchema(collectionId, entityTypeSource)\n .then(setSchema)\n .catch((error) => {\n console.error('Error fetching schema config:', error);\n });\n }, [collectionId, entityTypeSource]);\n\n if (!schema) {\n return null;\n }\n\n return (\n <SchemaContext.Provider value={schema}>{children}</SchemaContext.Provider>\n );\n};\n\nexport const useSchema = (): SchemaConfig => {\n const context = useContext(SchemaContext);\n if (!context) {\n throw new Error('useSchema must be used within a SchemaProvider');\n }\n return context;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IACVC,aAAa,EACbC,UAAU,EACVC,SAAS,EACTC,QAAQ,QAEH,OAAO;AACd,SAASC,SAAS,QAAQ,iCAAiC;AAG3D,MAAMC,aAAa,gBAAGL,aAAa,CAAsB,IAAI,CAAC;AAQ9D,OAAO,MAAMM,cAAc,GAAGC,IAAA,IAIH;EAAA,IAJI;IAC7BC,YAAY;IACZC,gBAAgB;IAChBC;EACmB,CAAC,GAAAH,IAAA;EACpB,MAAM,CAACI,MAAM,EAAEC,SAAS,CAAC,GAAGT,QAAQ,CAAsB,IAAI,CAAC;EAE/DD,SAAS,CAAC,MAAM;IACdE,SAAS,CAACI,YAAY,EAAEC,gBAAgB,CAAC,CACtCI,IAAI,CAACD,SAAS,CAAC,CACfE,KAAK,CAAEC,KAAK,IAAK;MAChBC,OAAO,CAACD,KAAK,CAAC,+BAA+B,EAAEA,KAAK,CAAC;IACvD,CAAC,CAAC;EACN,CAAC,EAAE,CAACP,YAAY,EAAEC,gBAAgB,CAAC,CAAC;EAEpC,IAAI,CAACE,MAAM,EAAE;IACX,OAAO,IAAI;EACb;EAEA,oBACEZ,KAAA,CAAAkB,aAAA,CAACZ,aAAa,CAACa,QAAQ;IAACC,KAAK,EAAER;EAAO,GAAED,QAAiC,CAAC;AAE9E,CAAC;AAED,OAAO,MAAMU,SAAS,GAAGA,CAAA,KAAoB;EAC3C,MAAMC,OAAO,GAAGpB,UAAU,CAACI,aAAa,CAAC;EACzC,IAAI,CAACgB,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,gDAAgD,CAAC;EACnE;EACA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/providers/index.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/providers/index.ts"],"sourcesContent":["export * from './CollectionDataContext';\nexport * from './PatternsWizardOverridesContext';\n"],"mappings":"AAAA,cAAc,yBAAyB;AACvC,cAAc,kCAAkC","ignoreList":[]}
|
package/dist/esm/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components/
|
|
1
|
+
export * from './components/AutoPatternsApp';
|
|
2
2
|
//# sourceMappingURL=react.js.map
|
package/dist/esm/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/react.tsx"],"sourcesContent":["export * from './components/
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/react.tsx"],"sourcesContent":["export * from './components/AutoPatternsApp';\n"],"mappings":"AAAA,cAAc,8BAA8B","ignoreList":[]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export let CollectionTypeEnum = /*#__PURE__*/function (CollectionTypeEnum) {
|
|
2
|
-
CollectionTypeEnum["TABLE"] = "Table";
|
|
3
|
-
CollectionTypeEnum["GRID"] = "Grid";
|
|
4
|
-
CollectionTypeEnum["TABLE_GRID_SWITCH"] = "TableGridSwitch";
|
|
5
|
-
return CollectionTypeEnum;
|
|
6
|
-
}({});
|
|
7
1
|
export let ComponentTypeEnum = /*#__PURE__*/function (ComponentTypeEnum) {
|
|
8
2
|
ComponentTypeEnum["SINGLE"] = "single";
|
|
9
3
|
ComponentTypeEnum["MULTI_SELECT"] = "multi-select";
|
|
@@ -12,6 +6,4 @@ export let ComponentTypeEnum = /*#__PURE__*/function (ComponentTypeEnum) {
|
|
|
12
6
|
ComponentTypeEnum["DATE_RANGE"] = "date-range";
|
|
13
7
|
return ComponentTypeEnum;
|
|
14
8
|
}({});
|
|
15
|
-
|
|
16
|
-
// TODO: fill this out
|
|
17
|
-
//# sourceMappingURL=types.js.map
|
|
9
|
+
//# sourceMappingURL=CollectionPageConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ComponentTypeEnum"],"sources":["../../../src/types/CollectionPageConfig.ts"],"sourcesContent":["import { CollectionToolbarFiltersProps } from '@wix/patterns';\nimport { DateRangeFilterMode, DateRangeOptions } from '@wix/patterns/core';\n\nexport interface CollectionPageConfig {\n title: { text: string; hideTotal?: boolean };\n subtitle?: {\n text: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n components: ComponentConfig[];\n}\n\ninterface ComponentConfig {\n type: 'Table' | 'Grid' | 'TableGridSwitch';\n table?: TableConfig;\n grid?: GridConfig;\n}\n\nexport interface CollectionConfig {\n collectionId: string;\n entityTypeSource: 'cms';\n fetchData?: FetchData;\n limit?: number;\n persistQueryToUrl?: boolean;\n disableAutoSelectAllCount?: boolean;\n selectionConsistencyMode?: 'preserve' | 'clear';\n}\n\nexport interface BaseCollectionComponentConfig {\n collection: CollectionConfig;\n search?: { shown?: boolean };\n toolbarTitle?: ToolbarTitle;\n actions?: Action[];\n emptyState?: EmptyState;\n filters?: FiltersConfig;\n}\n\nexport interface TableConfig extends BaseCollectionComponentConfig {\n columns: Column[];\n customColumns?: {\n enabled: boolean;\n };\n}\n\nexport interface GridConfig extends BaseCollectionComponentConfig {\n item: GridItem;\n}\n\nexport interface ToolbarTitle {\n title: string;\n subtitle?: {\n text: string;\n info?: {\n content: {\n text: string;\n link?: {\n url: string;\n label: string;\n };\n };\n };\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n showTotal?: boolean;\n itemsLimit?: number;\n}\n\nexport interface Column {\n id: string;\n name: string;\n width?: string;\n sortable?: boolean;\n defaultSortOrder?: 'asc' | 'desc';\n sortMode?: 'asc' | 'desc';\n defaultHidden?: boolean;\n hiddenFromCustomColumnsSelection?: boolean;\n hideable?: boolean;\n reorderDisabled?: boolean;\n}\n\nexport interface GridItem {\n title: string;\n subtitle?: string;\n image?: string;\n preset?: 'full' | 'title' | 'empty';\n imagePlacement?: 'top' | 'side';\n}\n\nexport interface EmptyState {\n title?: string;\n subtitle?: string;\n image?: {\n id: string;\n };\n addNewCta?: {\n id?: string;\n text?: string;\n };\n customCta?: {\n id?: string;\n };\n}\n\ninterface FetchData {\n id: string;\n}\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport type FilterSelectionMode = 'single' | 'multiple';\nexport type EnumFilterOptionType =\n | 'checkbox'\n | 'inlineCheckbox'\n | 'radio'\n | 'select';\n\nexport enum ComponentTypeEnum {\n SINGLE = 'single',\n MULTI_SELECT = 'multi-select',\n RADIO_GROUP = 'radio-group',\n NUMBER = 'number',\n DATE_RANGE = 'date-range',\n}\n\nexport interface FiltersConfig {\n items: Filter[];\n maxToolbarFilters?: CollectionToolbarFiltersProps['inline'];\n panelTitle?: string;\n}\n\nexport interface DateFilterConfig {\n mode?: DateRangeFilterMode;\n dateRangeOptions?: DateRangeOptions;\n filterByTime?: boolean;\n}\n\nexport interface NumberFilterConfig {\n min?: number;\n max?: number;\n decimal?: boolean;\n}\n\nexport interface BooleanFilterConfig {\n checkedLabel?: string;\n uncheckedLabel?: string;\n}\n\nexport interface EnumFilterConfig {\n options: FilterOption[];\n selectionMode: FilterSelectionMode;\n optionType?: EnumFilterOptionType;\n}\n\nexport interface Filter {\n fieldId: string;\n displayName?: string;\n accordionItemProps?: {\n initiallyOpen?: boolean;\n sectionTitle?: string;\n };\n toolbarTagProps?: {\n label: string;\n };\n componentType?: ComponentTypeEnum;\n numberConfig?: NumberFilterConfig;\n dateConfig?: DateFilterConfig;\n booleanConfig?: BooleanFilterConfig;\n enumConfig?: EnumFilterConfig;\n}\n\ninterface Action {\n id: string;\n text: string;\n icon: string;\n}\n"],"mappings":"AA6HA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/EntityPageConfig.ts"],"sourcesContent":["export interface EntityPageConfig {\n title?: { text: string };\n subtitle?: {\n text: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n visibleFieldIds: string[];\n collectionId: string;\n entityTypeSource: string;\n collectionPagePath: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/index.ts"],"sourcesContent":["export * from './types';\nexport * from './CollectionPageConfig';\nexport * from './EntityPageConfig';\n"],"mappings":"AAAA,cAAc,SAAS;AACvB,cAAc,wBAAwB;AACtC,cAAc,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { PrimaryActions, SecondaryActions } from '@wix/patterns';\nimport { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\nimport { collections } from '@wix/data';\n\nexport type PatternsColumnType =\n | 'STRING'\n | 'NUMBER'\n | 'BOOLEAN'\n | 'DATE'\n | 'DATETIME'\n | 'ARRAY'\n | 'ENUM';\n\nexport interface AppConfig {\n pages: PageConfig[];\n}\n\nexport interface PageConfig {\n id: string;\n routePath: string;\n type: 'collectionPage' | 'entityPage';\n collectionPage?: CollectionPageConfig;\n entityPage?: EntityPageConfig;\n}\n\nexport type EntityProps = { [key: string]: any };\n\nexport interface IMenuItem<T extends EntityProps = {}> {\n item: T;\n}\nexport interface IColumnValue<T> {\n value: T;\n}\n\nexport type QueryOperator =\n | 'CONTAINS'\n | 'ENDS_WITH'\n | 'EQ'\n | 'EXISTS'\n | 'GT'\n | 'GTE'\n | 'HAS_ALL'\n | 'HAS_SOME'\n | 'LT'\n | 'LTE'\n | 'NE'\n | 'STARTS_WITH'\n | 'URLIZED';\n\nexport interface Field {\n id: string;\n displayName: string;\n type: PatternsColumnType;\n originalType: collections.Type;\n capabilities: {\n supportedQueryOperators: QueryOperator[];\n sortable: boolean;\n };\n}\n\nexport interface SchemaConfig {\n fields: Record<string, Field | undefined>;\n displayField: string;\n actions: {\n get: (entityId: string) => Promise<any>;\n create: (newEntity: Partial<any>) => Promise<any>;\n update: (updatedEntity: any) => Promise<any>;\n delete: (entityId: string) => Promise<any>;\n };\n}\n\nexport type PagePrimaryActionProps = React.ComponentProps<\n typeof PrimaryActions\n>;\n\nexport type PageSecondaryActionProps = React.ComponentProps<\n typeof SecondaryActions\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AutoCompleteFilter, RadioGroupFilter, MultiSelectCheckboxFilter, MultiInlineCheckboxFilter, MultiSelectCollectionFilter, idNameArrayFilter } from '@wix/patterns';
|
|
2
|
+
export const createEnumFilter = _ref => {
|
|
3
|
+
let {
|
|
4
|
+
filter,
|
|
5
|
+
commonFilterProps
|
|
6
|
+
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
enumConfig
|
|
9
|
+
} = filter;
|
|
10
|
+
const {
|
|
11
|
+
options,
|
|
12
|
+
selectionMode,
|
|
13
|
+
optionType
|
|
14
|
+
} = enumConfig || {};
|
|
15
|
+
const data = (options == null ? void 0 : options.map(option => ({
|
|
16
|
+
id: option.value,
|
|
17
|
+
name: option.label
|
|
18
|
+
}))) ?? [];
|
|
19
|
+
const inlineComponentThreshold = 5;
|
|
20
|
+
let component;
|
|
21
|
+
if (selectionMode === 'single') {
|
|
22
|
+
component = data.length > inlineComponentThreshold ? AutoCompleteFilter : RadioGroupFilter;
|
|
23
|
+
if (optionType === 'select') {
|
|
24
|
+
component = AutoCompleteFilter;
|
|
25
|
+
} else if (optionType === 'radio') {
|
|
26
|
+
component = RadioGroupFilter;
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
component = data.length > inlineComponentThreshold ? MultiSelectCheckboxFilter : MultiInlineCheckboxFilter;
|
|
30
|
+
if (optionType === 'select') {
|
|
31
|
+
component = MultiSelectCollectionFilter;
|
|
32
|
+
} else if (optionType === 'inlineCheckbox') {
|
|
33
|
+
component = MultiInlineCheckboxFilter;
|
|
34
|
+
} else if (optionType === 'checkbox') {
|
|
35
|
+
component = MultiSelectCheckboxFilter;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
key: filter.fieldId,
|
|
40
|
+
filter: idNameArrayFilter(),
|
|
41
|
+
component,
|
|
42
|
+
collectionData: data,
|
|
43
|
+
props: {
|
|
44
|
+
...commonFilterProps,
|
|
45
|
+
data
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AutoCompleteFilter","RadioGroupFilter","MultiSelectCheckboxFilter","MultiInlineCheckboxFilter","MultiSelectCollectionFilter","idNameArrayFilter","createEnumFilter","_ref","filter","commonFilterProps","enumConfig","options","selectionMode","optionType","data","map","option","id","value","name","label","inlineComponentThreshold","component","length","key","fieldId","collectionData","props"],"sources":["../../../src/utils/filters.ts"],"sourcesContent":["import {\n AutoCompleteFilter,\n RadioGroupFilter,\n MultiSelectCheckboxFilter,\n MultiInlineCheckboxFilter,\n MultiSelectCollectionFilter,\n idNameArrayFilter,\n} from '@wix/patterns';\nimport { FilterOptions } from '../hooks/useFilters';\nimport { Filter } from '../types';\n\nexport const createEnumFilter = ({\n filter,\n commonFilterProps,\n}: {\n filter: Filter;\n commonFilterProps: Record<string, any>;\n}): FilterOptions => {\n const { enumConfig } = filter;\n const { options, selectionMode, optionType } = enumConfig || {};\n const data =\n options?.map((option) => ({ id: option.value, name: option.label })) ?? [];\n\n const inlineComponentThreshold = 5;\n\n let component;\n\n if (selectionMode === 'single') {\n component =\n data.length > inlineComponentThreshold\n ? AutoCompleteFilter\n : RadioGroupFilter;\n if (optionType === 'select') {\n component = AutoCompleteFilter;\n } else if (optionType === 'radio') {\n component = RadioGroupFilter;\n }\n } else {\n component =\n data.length > inlineComponentThreshold\n ? MultiSelectCheckboxFilter\n : MultiInlineCheckboxFilter;\n if (optionType === 'select') {\n component = MultiSelectCollectionFilter;\n } else if (optionType === 'inlineCheckbox') {\n component = MultiInlineCheckboxFilter;\n } else if (optionType === 'checkbox') {\n component = MultiSelectCheckboxFilter;\n }\n }\n\n return {\n key: filter.fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionData: data,\n props: { ...commonFilterProps, data },\n };\n};\n"],"mappings":"AAAA,SACEA,kBAAkB,EAClBC,gBAAgB,EAChBC,yBAAyB,EACzBC,yBAAyB,EACzBC,2BAA2B,EAC3BC,iBAAiB,QACZ,eAAe;AAItB,OAAO,MAAMC,gBAAgB,GAAGC,IAAA,IAMX;EAAA,IANY;IAC/BC,MAAM;IACNC;EAIF,CAAC,GAAAF,IAAA;EACC,MAAM;IAAEG;EAAW,CAAC,GAAGF,MAAM;EAC7B,MAAM;IAAEG,OAAO;IAAEC,aAAa;IAAEC;EAAW,CAAC,GAAGH,UAAU,IAAI,CAAC,CAAC;EAC/D,MAAMI,IAAI,GACR,CAAAH,OAAO,oBAAPA,OAAO,CAAEI,GAAG,CAAEC,MAAM,KAAM;IAAEC,EAAE,EAAED,MAAM,CAACE,KAAK;IAAEC,IAAI,EAAEH,MAAM,CAACI;EAAM,CAAC,CAAC,CAAC,KAAI,EAAE;EAE5E,MAAMC,wBAAwB,GAAG,CAAC;EAElC,IAAIC,SAAS;EAEb,IAAIV,aAAa,KAAK,QAAQ,EAAE;IAC9BU,SAAS,GACPR,IAAI,CAACS,MAAM,GAAGF,wBAAwB,GAClCrB,kBAAkB,GAClBC,gBAAgB;IACtB,IAAIY,UAAU,KAAK,QAAQ,EAAE;MAC3BS,SAAS,GAAGtB,kBAAkB;IAChC,CAAC,MAAM,IAAIa,UAAU,KAAK,OAAO,EAAE;MACjCS,SAAS,GAAGrB,gBAAgB;IAC9B;EACF,CAAC,MAAM;IACLqB,SAAS,GACPR,IAAI,CAACS,MAAM,GAAGF,wBAAwB,GAClCnB,yBAAyB,GACzBC,yBAAyB;IAC/B,IAAIU,UAAU,KAAK,QAAQ,EAAE;MAC3BS,SAAS,GAAGlB,2BAA2B;IACzC,CAAC,MAAM,IAAIS,UAAU,KAAK,gBAAgB,EAAE;MAC1CS,SAAS,GAAGnB,yBAAyB;IACvC,CAAC,MAAM,IAAIU,UAAU,KAAK,UAAU,EAAE;MACpCS,SAAS,GAAGpB,yBAAyB;IACvC;EACF;EAEA,OAAO;IACLsB,GAAG,EAAEhB,MAAM,CAACiB,OAAO;IACnBjB,MAAM,EAAEH,iBAAiB,CAAC,CAAC;IAC3BiB,SAAS;IACTI,cAAc,EAAEZ,IAAI;IACpBa,KAAK,EAAE;MAAE,GAAGlB,iBAAiB;MAAEK;IAAK;EACtC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SchemaConfig } from '../types';
|
|
2
|
+
import { CollectionConfig } from '@wix/patterns';
|
|
3
|
+
export interface CollectionData {
|
|
4
|
+
schema: SchemaConfig;
|
|
5
|
+
collection: Pick<CollectionConfig<any, any>, 'fetchData'>;
|
|
6
|
+
entityIdKey: string;
|
|
7
|
+
entityNameKey: string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=CollectionData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionData.d.ts","sourceRoot":"","sources":["../../../src/collectionData/CollectionData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CollectionConfig } from '../types/CollectionPageConfig';
|
|
2
|
+
import { CollectionData } from './CollectionData';
|
|
3
|
+
export declare function getCollectionData(config: CollectionConfig, visibleFieldIds: string[]): Promise<CollectionData>;
|
|
4
|
+
//# sourceMappingURL=CollectionDataFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionDataFactory.d.ts","sourceRoot":"","sources":["../../../src/collectionData/CollectionDataFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,gBAAgB,EACxB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,cAAc,CAAC,CAKzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaFactory.d.ts","sourceRoot":"","sources":["../../../src/collectionData/SchemaFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,wBAAsB,SAAS,CAC7B,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,YAAY,CAAC,CAKvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SchemaConfig, PatternsColumnType } from '../../types';
|
|
2
|
+
import { collections } from '@wix/data';
|
|
3
|
+
import { CollectionData } from '../CollectionData';
|
|
4
|
+
import { CollectionConfig } from '../../types/CollectionPageConfig';
|
|
5
|
+
export declare const CmsColumnTypeToPatternsColumnType: Partial<Record<collections.Type, PatternsColumnType>>;
|
|
6
|
+
export declare function fetchCmsSchema(collectionId: CollectionConfig['collectionId']): Promise<SchemaConfig>;
|
|
7
|
+
export declare function getCmsCollectionData(config: CollectionConfig, visibleFieldIds: string[]): Promise<CollectionData>;
|
|
8
|
+
//# sourceMappingURL=CmsCollectionData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CmsCollectionData.d.ts","sourceRoot":"","sources":["../../../../src/collectionData/cms/CmsCollectionData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,WAAW,EAAS,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,eAAO,MAAM,iCAAiC,EAAE,OAAO,CACrD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAQ7C,CAAC;AAEF,wBAAsB,cAAc,CAClC,YAAY,EAAE,gBAAgB,CAAC,cAAc,CAAC,GAC7C,OAAO,CAAC,YAAY,CAAC,CAuCvB;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,gBAAgB,EACxB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,cAAc,CAAC,CAwCzB"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ComputedQuery } from '@wix/patterns';
|
|
2
2
|
import { items } from '@wix/data';
|
|
3
|
-
import {
|
|
3
|
+
import { SchemaConfig } from '../../types';
|
|
4
4
|
export type CmsOperatorMethod = 'ge' | 'le';
|
|
5
5
|
export declare function addFiltersToDataQuery({ dataQuery, query, schema, }: {
|
|
6
6
|
dataQuery: items.WixDataQuery;
|
|
7
7
|
query: ComputedQuery<any>;
|
|
8
8
|
schema: SchemaConfig;
|
|
9
9
|
}): items.WixDataQuery;
|
|
10
|
-
export declare function addSearchToDataQuery({ dataQuery, query, schema,
|
|
10
|
+
export declare function addSearchToDataQuery({ dataQuery, query, schema, visibleFieldIds, }: {
|
|
11
11
|
dataQuery: items.WixDataQuery;
|
|
12
12
|
query: ComputedQuery<any>;
|
|
13
13
|
schema: SchemaConfig;
|
|
14
|
-
|
|
14
|
+
visibleFieldIds: string[];
|
|
15
15
|
}): items.WixDataQuery;
|
|
16
16
|
//# sourceMappingURL=filterUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../../src/collectionData/cms/filterUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;AAqC5C,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,YAAY,CAAC;CACtB,sBA4CA;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,KAAK,EACL,MAAM,EACN,eAAe,GAChB,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,sBAwBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortUtils.d.ts","sourceRoot":"","sources":["../../../../src/collectionData/cms/sortUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,YAAY,CAAC;CACtB,sBAkBA"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { QueryOperator } from '../types';
|
|
2
2
|
export type FilterProp = 'from' | 'to';
|
|
3
3
|
export declare const FilterPropToOperator: Record<FilterProp, QueryOperator>;
|
|
4
|
+
export declare const BooleanFilters: {
|
|
5
|
+
checked: string;
|
|
6
|
+
unchecked: string;
|
|
7
|
+
};
|
|
4
8
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/collectionData/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;AAEvC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,UAAU,EAAE,aAAa,CAGlE,CAAC;AAEF,eAAO,MAAM,cAAc;;;CAG1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/collectionData/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsAppPageProps {
|
|
4
|
+
configuration: AppConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsApp: React.FC<AutoPatternsAppPageProps>;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsApp.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsApp/AutoPatternsApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,SAAS,CAAC;CAC1B;AAOD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAa9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsApp/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CollectionPageConfig } from '../../types/CollectionPageConfig';
|
|
3
3
|
export interface AutoPatternsCollectionPageProps {
|
|
4
|
-
configuration:
|
|
4
|
+
configuration: CollectionPageConfig;
|
|
5
5
|
}
|
|
6
6
|
export declare const AutoPatternsCollectionPage: React.FC<AutoPatternsCollectionPageProps>;
|
|
7
7
|
//# sourceMappingURL=AutoPatternsCollectionPage.d.ts.map
|
package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoPatternsCollectionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,+BAA+B,CA6BhC,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { CollectionPageConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsCollectionPageContentProps {
|
|
4
|
+
configuration: CollectionPageConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsCollectionPageContent: ({ configuration, }: AutoPatternsCollectionPageContentProps) => React.JSX.Element;
|
|
3
7
|
//# sourceMappingURL=AutoPatternsCollectionPageContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoPatternsCollectionPageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionPageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,WAAW,sCAAsC;IACrD,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,iCAAiC,uBAE3C,sCAAsC,sBA4BxC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EntityPageConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsEntityPageProps {
|
|
4
|
+
configuration: EntityPageConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsEntityPage: React.FC<AutoPatternsEntityPageProps>;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsEntityPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsEntityPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/AutoPatternsEntityPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAa/C,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAgFxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,OAAO,CAAC;CAAG;AAEjE,eAAO,MAAM,QAAQ,UAAW,aAAa,sBAgB5C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Field } from '../../../types';
|
|
3
|
+
import { collections } from '@wix/data';
|
|
4
|
+
export interface BaseInputProps<T> {
|
|
5
|
+
field: Field;
|
|
6
|
+
initialValue: T;
|
|
7
|
+
onChange: (newValue: T) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const EDITABLE_INPUT_ELEMENTS: Partial<Record<collections.Type, React.ComponentType<any>>>;
|
|
10
|
+
export interface FormFieldInputProps {
|
|
11
|
+
field?: Field;
|
|
12
|
+
}
|
|
13
|
+
export declare const FormFieldInput: (props: FormFieldInputProps) => React.JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=FormFieldInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/FormFieldInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,CAAC,CAAC;IAChB,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,uBAAuB,EAAE,OAAO,CAC3C,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAInD,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,eAAO,MAAM,cAAc,UAAW,mBAAmB,6BAgCxD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ChangeEvent } from 'react';
|
|
2
|
+
import { BaseInputProps } from './FormFieldInput';
|
|
3
|
+
export declare const useTextInput: ({ initialValue, onChange, }: {
|
|
4
|
+
initialValue: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
}) => {
|
|
7
|
+
value: string;
|
|
8
|
+
handleChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
9
|
+
};
|
|
10
|
+
export interface ShortTextProps extends BaseInputProps<string> {
|
|
11
|
+
}
|
|
12
|
+
export declare const ShortText: (props: ShortTextProps) => React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ShortText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShortText.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/ShortText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAY,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,YAAY;kBAIT,MAAM;sBACF,MAAM,KAAK,IAAI;;;sBAK5B,YAAY,gBAAgB,GAAG,mBAAmB,CAAC;CAYzD,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,MAAM,CAAC;CAAG;AAEjE,eAAO,MAAM,SAAS,UAAW,cAAc,sBAgB9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsEntityPage/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GridConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsGridProps {
|
|
4
|
+
configuration: GridConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsGrid: ({ configuration }: AutoPatternsGridProps) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsGrid/AutoPatternsGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,UAAU,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,sBAAuB,qBAAqB,sBAiBxE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GridConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsGridContentProps {
|
|
4
|
+
configuration: GridConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsGridContent: ({ configuration, }: AutoPatternsGridContentProps) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsGridContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsGridContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsGrid/AutoPatternsGridContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,UAAU,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,uBAEjC,4BAA4B,sBA2B9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsGrid/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PageConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsPageProps {
|
|
4
|
+
pageConfig: PageConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsPage: ({ pageConfig }: AutoPatternsPageProps) => React.JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,mBAAoB,qBAAqB,6BA0BrE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsTableProps {
|
|
4
|
+
configuration: TableConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsTable: ({ configuration, }: AutoPatternsTableProps) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsTable.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsTable/AutoPatternsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,WAAW,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,uBAE3B,sBAAsB,sBAcxB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableConfig } from '../../types';
|
|
3
|
+
export interface AutoPatternsTableContentProps {
|
|
4
|
+
configuration: TableConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare const AutoPatternsTableContent: ({ configuration, }: AutoPatternsTableContentProps) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsTableContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsTableContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsTable/AutoPatternsTableContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C,MAAM,WAAW,6BAA6B;IAC5C,aAAa,EAAE,WAAW,CAAC;CAC5B;AAED,eAAO,MAAM,wBAAwB,uBAElC,6BAA6B,sBAmC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsTable/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/exports/react.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/exports/react.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|