Skip to content

Commit

Permalink
resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeriaMaltseva committed Nov 28, 2024
2 parents b18249c + 5cf6475 commit 3a68a20
Show file tree
Hide file tree
Showing 82 changed files with 5,884 additions and 351 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
name: "CLA Assistant"
name: CLA check

on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]
types: [opened, closed, synchronize]

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: cla-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: 'signatures/version1/cla.json'
path-to-document: 'https://github.com/pimcore/pimcore/blob/master/CLA.md' # e.g. a CLA or a DCO document
# branch should not be protected
branch: 'main'
allowlist: user1,bot*

#below are the optional inputs - If the optional inputs are not given, then default values will be taken
remote-organization-name: 'pimcore' #enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
remote-repository-name: 'cla'
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
cla-workflow:
uses: pimcore/workflows-collection-public/.github/workflows/[email protected]
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
secrets:
CLA_ACTION_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion assets/build/api/docs.jsonopenapi.json

Large diffs are not rendered by default.

20 changes: 8 additions & 12 deletions assets/js/src/core/app/config/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,14 @@ import { DynamicTypeObjectDataGeoPoint } from '@Pimcore/modules/element/dynamic-
import { DynamicTypeObjectDataGeoBounds } from '@Pimcore/modules/element/dynamic-types/defintinitions/objects/data-related/types/dynamic-type-object-data-geobounds'
import { DynamicTypeObjectDataGeoPolygon } from '@Pimcore/modules/element/dynamic-types/defintinitions/objects/data-related/types/dynamic-type-object-data-geopolygon'
import { DynamicTypeObjectDataGeoPolyLine } from '@Pimcore/modules/element/dynamic-types/defintinitions/objects/data-related/types/dynamic-type-object-data-geopolyline'
import { DynamicTypeObjectDataManyToManyRelation } from '@Pimcore/modules/element/dynamic-types/defintinitions/objects/data-related/types/dynamic-type-object-data-many-to-many-relation'
import { DynamicTypeObjectDataBlock } from '@Pimcore/modules/element/dynamic-types/defintinitions/objects/data-related/types/dynamic-type-object-data-block'
import { DynamicTypeObjectDataLocalizedFields } from '@Pimcore/modules/element/dynamic-types/defintinitions/objects/data-related/types/dynamic-type-object-data-localized-fields'
import { DynamicTypeGridCellAsset } from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/asset/dynamic-type-grid-cell-asset'
import { DynamicTypeGridCellObject } from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/object/dynamic-type-grid-cell-object'
import { DynamicTypeGridCellDocument } from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/document/dynamic-type-grid-cell-document'
import { DynamicTypeGridCellLanguageSelect } from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/language-select/dynamic-type-grid-cell-language-select'
import { DynamicTypeGridCellTranslate } from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/translate/dynamic-type-grid-cell-translate'
import {
DynamicTypeBatchEditRegistry
} from '@Pimcore/modules/element/dynamic-types/defintinitions/batch-edits/dynamic-type-batch-edit-registry'
Expand All @@ -114,18 +120,6 @@ import {
import {
DynamicTypeBatchEditTextArea
} from '@Pimcore/modules/element/dynamic-types/defintinitions/batch-edits/types/text/dynamic-type-batch-edit-text-area'
import {
DynamicTypeGridCellAsset
} from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/asset/dynamic-type-grid-cell-asset'
import {
DynamicTypeGridCellObject
} from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/object/dynamic-type-grid-cell-object'
import {
DynamicTypeGridCellDocument
} from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/document/dynamic-type-grid-cell-document'
import {
DynamicTypeGridCellLanguageSelect
} from '@Pimcore/modules/element/dynamic-types/defintinitions/grid-cell/types/language-select/dynamic-type-grid-cell-language-select'

// Widget manager
container.bind(serviceIds.widgetManager).to(WidgetRegistry).inSingletonScope()
Expand Down Expand Up @@ -189,6 +183,7 @@ container.bind(serviceIds['DynamicTypes/GridCell/Asset']).to(DynamicTypeGridCell
container.bind(serviceIds['DynamicTypes/GridCell/Object']).to(DynamicTypeGridCellObject).inSingletonScope()
container.bind(serviceIds['DynamicTypes/GridCell/Document']).to(DynamicTypeGridCellDocument).inSingletonScope()
container.bind(serviceIds['DynamicTypes/GridCell/LanguageSelect']).to(DynamicTypeGridCellLanguageSelect).inSingletonScope()
container.bind(serviceIds['DynamicTypes/GridCell/Translate']).to(DynamicTypeGridCellTranslate).inSingletonScope()

// dynamic types listing
container.bind(serviceIds['DynamicTypes/ListingRegistry']).to(DynamicTypeListingRegistry).inSingletonScope()
Expand Down Expand Up @@ -245,6 +240,7 @@ container.bind(serviceIds['DynamicTypes/ObjectData/GeoPoint']).to(DynamicTypeObj
container.bind(serviceIds['DynamicTypes/ObjectData/GeoBounds']).to(DynamicTypeObjectDataGeoBounds).inSingletonScope()
container.bind(serviceIds['DynamicTypes/ObjectData/GeoPolygon']).to(DynamicTypeObjectDataGeoPolygon).inSingletonScope()
container.bind(serviceIds['DynamicTypes/ObjectData/GeoPolyLine']).to(DynamicTypeObjectDataGeoPolyLine).inSingletonScope()
container.bind(serviceIds['DynamicTypes/ObjectData/ManyToManyRelation']).to(DynamicTypeObjectDataManyToManyRelation).inSingletonScope()
container.bind(serviceIds['DynamicTypes/ObjectData/Block']).to(DynamicTypeObjectDataBlock).inSingletonScope()
container.bind(serviceIds['DynamicTypes/ObjectData/LocalizedFields']).to(DynamicTypeObjectDataLocalizedFields).inSingletonScope()

Expand Down
2 changes: 2 additions & 0 deletions assets/js/src/core/app/config/services/service-ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const serviceIds = {
'DynamicTypes/GridCell/Object': 'DynamicTypes/GridCell/Object',
'DynamicTypes/GridCell/Document': 'DynamicTypes/GridCell/Document',
'DynamicTypes/GridCell/LanguageSelect': 'DynamicTypes/GridCell/LanguageSelect',
'DynamicTypes/GridCell/Translate': 'DynamicTypes/GridCell/Translate',

'DynamicTypes/Listing/Text': 'DynamicTypes/Listing/Text',
'DynamicTypes/Listing/AssetLink': 'DynamicTypes/Listing/AssetLink',
Expand Down Expand Up @@ -137,6 +138,7 @@ export const serviceIds = {
'DynamicTypes/ObjectData/GeoBounds': 'DynamicTypes/ObjectData/GeoBounds',
'DynamicTypes/ObjectData/GeoPolygon': 'DynamicTypes/ObjectData/GeoPolygon',
'DynamicTypes/ObjectData/GeoPolyLine': 'DynamicTypes/ObjectData/GeoPolyLine',
'DynamicTypes/ObjectData/ManyToManyRelation': 'DynamicTypes/ObjectData/ManyToManyRelation',
'DynamicTypes/ObjectData/Block': 'DynamicTypes/ObjectData/Block',
'DynamicTypes/ObjectData/LocalizedFields': 'DynamicTypes/ObjectData/LocalizedFields',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const AccordionTimeline = ({ items }: AccordionTimelineProps): React.JSX.
items={ [item] }
/>
)
}
}
</div>
)
})
Expand Down
6 changes: 3 additions & 3 deletions assets/js/src/core/components/date-picker/time-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ export type TimePickerProps = GenericTimePickerProps & {
}

export const TimePicker = (props: TimePickerProps): React.JSX.Element => {
const outputFormat = props?.outputFormat
const outputFormat = props?.outputFormat ?? 'HH:mm:ss'

const [value, setValue] = React.useState<Dayjs | null>(toDayJs(props.value))
const [value, setValue] = React.useState<Dayjs | null>(toDayJs(props.value, outputFormat))

useEffect(() => {
if (props.onChange !== undefined) {
props.onChange(fromDayJs(value, props.outputType, props.outputFormat ?? 'HH:mm:ss'))
props.onChange(fromDayJs(value, props.outputType, outputFormat))
}
}, [value, props.outputType, outputFormat])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import dayjs, { type Dayjs } from 'dayjs'

export type DatePickerValueType = string | number | Dayjs | null
export type OutputType = 'dateString' | 'timestamp' | 'dayjs'
export const toDayJs = (value?: DatePickerValueType | any): Dayjs | null => {
export const toDayJs = (value?: DatePickerValueType | any, format?: string): Dayjs | null => {
if (dayjs.isDayjs(value)) {
return value
}
if (typeof value === 'number') {
return dayjs.unix(value)
}
if (typeof value === 'string') {
return dayjs(value)
return dayjs(value, format)
}
return null
}
Expand Down
22 changes: 17 additions & 5 deletions assets/js/src/core/components/drag-and-drop/droppable.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,36 @@ import { createStyles } from 'antd-style'

export const useStyle = createStyles(({ token, css }) => {
return {
droppable: css`
default: css`
& .dnd--drag-active {
background: ${token.colorBgContainerDisabled};
border: 1px dashed ${token.colorBorder};
border-radius: ${token.borderRadius}px;
}
& .dnd--drag-valid {
background: ${token.colorBgTextActive};
border: 1px dashed ${token.colorInfoBorder};
border-radius: ${token.borderRadius}px;
}
& .dnd--drag-error {
background: ${token.colorErrorBg};
border: 1px dashed ${token.colorErrorActive};
border-radius: ${token.borderRadius}px;
}
`,
outline: css`
& .dnd--drag-valid {
outline: 1px dashed ${token.colorInfoBorder};
}
& .dnd--drag-error {
outline: 1px dashed ${token.colorErrorActive};
}
`,
round: css`
& .dnd--drag-active, & .dnd--drag-valid, & .dnd--drag-error {
border-radius: ${token.borderRadius}px;
}
`
}
})
5 changes: 4 additions & 1 deletion assets/js/src/core/components/drag-and-drop/droppable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { useDroppable } from '@dnd-kit/core'
import { useStyle } from './droppable.styles'
import { DroppableContextProvider } from './droppable-context-provider'
import { uuid } from '@Pimcore/utils/uuid'
import cn from 'classnames'

export interface DroppableContentProps {
isDragActive: boolean
Expand All @@ -27,6 +28,8 @@ export interface DroppableContentProps {
export interface DroppableProps {
className?: string
children: ReactNode
variant?: 'default' | 'outline'
shape?: 'round' | 'angular'
isValidContext: boolean | ((info: DragAndDropInfo) => boolean)
isValidData?: ((info: DragAndDropInfo) => boolean)
onDrop: (info: DragAndDropInfo) => void
Expand Down Expand Up @@ -80,7 +83,7 @@ export const Droppable = (props: DroppableProps): React.JSX.Element => {
const Component = Child.type

return (
<div className={ [props.className, styles.droppable].join(' ') }>
<div className={ cn(props.className, styles[props.variant ?? 'default'], props.shape !== 'angular' ? styles.round : undefined) }>
<DroppableContextProvider value={ { isDragActive: isValidContext, isOver: isOver && isValidContext, isValid: isValidData && isValidContext } }>
<Component
{ ...Child.props }
Expand Down
8 changes: 2 additions & 6 deletions assets/js/src/core/components/geo-map/geo-map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,16 @@ const GeoMap = forwardRef<GeoMapAPI, GeoMapProps>((props, ref): React.JSX.Elemen
return () => {
if (containerRef.current !== null) {
observer.unobserve(containerRef.current)
observer.disconnect()
}
}
}, [])

useEffect(() => {
if (isVisible) {
geoMapApi.forceRerender()
}
}, [isVisible])

useEffect(() => {
if (!isVisible) {
return
}

const map = initializeMap()
return () => {
if (map !== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { type GeoBounds } from '@Pimcore/components/geo-map/types/geo-types'
export const addGeoBoundsToolbar = (leafletMap: L.Map, featureGroup: L.FeatureGroup, geoBounds?: GeoBounds, onChange?: (geoBounds: GeoBounds | undefined) => void, disabled?: boolean): void => {
leafletMap.addLayer(featureGroup)

const bounds = geoBounds !== undefined ? L.latLngBounds(L.latLng(geoBounds.NElatitude, geoBounds.NElongitude), L.latLng(geoBounds.SWlatitude, geoBounds.SWlongitude)) : undefined
const bounds = geoBounds !== undefined ? L.latLngBounds(L.latLng(geoBounds.northEast.latitude, geoBounds.northEast.longitude), L.latLng(geoBounds.southWest.latitude, geoBounds.southWest.longitude)) : undefined
let rectangle: L.Rectangle | undefined

if (bounds !== undefined) {
Expand Down Expand Up @@ -61,10 +61,14 @@ export const addGeoBoundsToolbar = (leafletMap: L.Map, featureGroup: L.FeatureGr
const ne = layer.getBounds().getNorthEast()
const sw = layer.getBounds().getSouthWest()
onChange({
NElatitude: ne.lat,
NElongitude: ne.lng,
SWlatitude: sw.lat,
SWlongitude: sw.lng
northEast: {
latitude: ne.lat,
longitude: ne.lng
},
southWest: {
latitude: sw.lat,
longitude: sw.lng
}
})
}
}
Expand All @@ -82,10 +86,14 @@ export const addGeoBoundsToolbar = (leafletMap: L.Map, featureGroup: L.FeatureGr
const sw = e.layer.getBounds().getSouthWest()

onChange({
NElatitude: ne.lat,
NElongitude: ne.lng,
SWlatitude: sw.lat,
SWlongitude: sw.lng
northEast: {
latitude: ne.lat,
longitude: ne.lng
},
southWest: {
latitude: sw.lat,
longitude: sw.lng
}
})
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const addGeoPolyLineToolbar = (leafletMap: L.Map, featureGroup: L.Feature
const polyLine = geoPolyLine !== undefined ? L.polyline(convertPolyLineToLatLngs(geoPolyLine), { stroke: true, color: '#3388ff', opacity: 0.5, fillOpacity: 0.2, weight: 4 }) : undefined
if (polyLine !== undefined) {
featureGroup.addLayer(polyLine)
leafletMap.fitBounds(polyLine.getBounds())
}

if (disabled === true) {
Expand Down Expand Up @@ -65,8 +66,6 @@ export const addGeoPolyLineToolbar = (leafletMap: L.Map, featureGroup: L.Feature
})

leafletMap.on(L.Draw.Event.EDITSTOP, function (e) {
this.dirty = true
this.data = []
for (const layerId in e.target._layers) {
if (Object.prototype.hasOwnProperty.call(e.target._layers, layerId) === true) {
const layer = e.target._layers[layerId]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const addGeoPolygonToolbar = (leafletMap: L.Map, featureGroup: L.FeatureG
const polygon = geoPolygon !== undefined ? L.polygon(convertPolyLineToLatLngs(geoPolygon), { stroke: true, color: '#3388ff', opacity: 0.5, fillOpacity: 0.2, weight: 4 }) : undefined
if (polygon !== undefined) {
featureGroup.addLayer(polygon)
leafletMap.fitBounds(polygon.getBounds())
}

if (disabled === true) {
Expand Down Expand Up @@ -65,8 +66,6 @@ export const addGeoPolygonToolbar = (leafletMap: L.Map, featureGroup: L.FeatureG
})

leafletMap.on(L.Draw.Event.EDITSTOP, function (e) {
this.dirty = true
this.data = []
for (const layerId in e.target._layers) {
if (Object.prototype.hasOwnProperty.call(e.target._layers, layerId) === true) {
const layer = e.target._layers[layerId]
Expand Down
6 changes: 2 additions & 4 deletions assets/js/src/core/components/geo-map/types/geo-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ export interface GeoPoint {
export type GeoPoints = GeoPoint[]

export interface GeoBounds {
NElongitude: number
NElatitude: number
SWlongitude: number
SWlatitude: number
northEast: GeoPoint
southWest: GeoPoint
}

export type GeoType = GeoPoint | GeoPoints | GeoBounds
Loading

0 comments on commit 3a68a20

Please sign in to comment.