Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fba62c8
feat: add dialog to delete raster layer
Eliav-Maimon Jun 23, 2026
0cafec9
fix: disable delete button, prettier
Eliav-Maimon Jun 24, 2026
a95f8bd
fix: scaffold
Eliav-Maimon Jun 25, 2026
663f481
fix: css
Eliav-Maimon Jun 25, 2026
824e3a1
fix: predicate
Eliav-Maimon Jun 25, 2026
05d4243
fix: change files location, disable button on search and cr
Eliav-Maimon Jun 26, 2026
21c6add
fix: remove unnecessary ts-ignore and prettier
Eliav-Maimon Jun 26, 2026
7df5f3f
fix: change disableActionByPredicate location and pr
Eliav-Maimon Jun 28, 2026
ce2bd13
Merge branch 'master' of https://github.com/MapColonies/catalog-app i…
Eliav-Maimon Jul 1, 2026
70c887e
fix: remove comment
Eliav-Maimon Jul 1, 2026
36c7e43
fix: refresh catalog after deletion, and fly to footprint
Eliav-Maimon Jul 8, 2026
7e1a3b3
fix: show image layer in open layer
Eliav-Maimon Jul 8, 2026
b908a70
fix: fly to footprint, and turn off base map on ol
Eliav-Maimon Jul 9, 2026
8973281
fix: prettier igonre
Eliav-Maimon Jul 9, 2026
2630d98
fix: using the same import path
Eliav-Maimon Jul 9, 2026
5173b3d
fix: prettier
Eliav-Maimon Jul 9, 2026
5f77f20
Merge branch 'master' of https://github.com/MapColonies/catalog-app i…
Eliav-Maimon Jul 12, 2026
d3e1d5a
fix: change 3d delete naming convention
Eliav-Maimon Jul 12, 2026
60ce02b
fix: refactor getActionsWithDisable function
Eliav-Maimon Jul 13, 2026
5891484
fix: change IAction interface
Eliav-Maimon Jul 13, 2026
234dc00
fix: add border in ol map and add tool tip on show base map button
Eliav-Maimon Jul 13, 2026
8fdb5a1
fix: add marker on exsiting pp, add zIndex
Eliav-Maimon Jul 15, 2026
341b0ab
fix: pr
Eliav-Maimon Jul 15, 2026
6b1fd41
fix: eslint
Eliav-Maimon Jul 15, 2026
ee4832e
fix: pr
Eliav-Maimon Jul 15, 2026
12e725f
fix: pr
Eliav-Maimon Jul 15, 2026
c4956c4
fix: pr
Eliav-Maimon Jul 15, 2026
dce7381
fix: pr
Eliav-Maimon Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ schemas/**
confd/**
helm/**
public/**
build
node_modules

# generated files
src/discrete-layer/models/**/*
Expand Down
20 changes: 10 additions & 10 deletions src/common/actions/context.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ export const isActionGroup = (
const DEFAULT_MINIMUM_ITEMS_IN_MENU = 2;

const defaultContextActionProps: IAction = {
action: '',
class: '',
action: '' as ContextActions,
symbol: {},
frequent: false,
icon: '',
titleTranslationId: '',
title: { translationId: '' },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
};

Expand Down Expand Up @@ -107,6 +106,7 @@ const CONTEXT_ACTIONS_CONFIG: IContextActions[] = [
...defaultContextActionProps,
templateId: ContextActionsTemplates.WFS_QUERY_FEATURES,
action: ContextActions.QUERY_WFS_FEATURE,
title: { translationId: '' },
},
],
},
Expand All @@ -121,7 +121,7 @@ const CONTEXT_ACTIONS_CONFIG: IContextActions[] = [
actions: [
{
...defaultContextActionProps,
titleTranslationId: 'map-context-menu.query-dem-height.title',
title: { translationId: 'map-context-menu.query-dem-height.title' },
action: ContextActions.QUERY_DEM_HEIGHT,
},
],
Expand All @@ -147,28 +147,28 @@ const CONTEXT_ACTIONS_CONFIG: IContextActions[] = [
actions: [
{
...defaultContextActionProps,
titleTranslationId: 'map-context-menu.polygon-parts.title',
title: { translationId: 'map-context-menu.polygon-parts.title' },
action: ContextActions.QUERY_POLYGON_PARTS,
separator: 'AFTER',
},
{
...defaultContextActionProps,
titleTranslationId: 'map-context-menu.layer-up.title',
title: { translationId: 'map-context-menu.layer-up.title' },
action: ContextActions.MOVE_LAYER_UP,
},
{
...defaultContextActionProps,
titleTranslationId: 'map-context-menu.layer-down.title',
title: { translationId: 'map-context-menu.layer-down.title' },
action: ContextActions.MOVE_LAYER_DOWN,
},
{
...defaultContextActionProps,
titleTranslationId: 'map-context-menu.layer-to-top.title',
title: { translationId: 'map-context-menu.layer-to-top.title' },
action: ContextActions.MOVE_LAYER_TO_TOP,
},
{
...defaultContextActionProps,
titleTranslationId: 'map-context-menu.layer-to-bottom.title',
title: { translationId: 'map-context-menu.layer-to-bottom.title' },
action: ContextActions.MOVE_LAYER_TO_BOTTOM,
},
],
Expand Down
181 changes: 113 additions & 68 deletions src/common/actions/entity.actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { TabViews } from '../../discrete-layer/views/tab-views';
import { UserAction } from '../../discrete-layer/models/userStore';
import { RecordStatus } from '../../discrete-layer/models';
import { ExportActions } from '../../discrete-layer/components/export-layer/hooks/useDomainExportActionsConfig';
import { ContextActions } from './context.actions';

interface DependentFieldWithValue {
field: string;
Expand All @@ -8,13 +11,38 @@ interface DependentFieldWithValue {
}
export type DependentField = string | DependentFieldWithValue;

export enum GeneralAction {
flyTo = 'flyTo',
viewer = 'viewer',
export = 'export',
}

export enum JobAction {
restore = 'restore',
abort = 'abort',
retry = 'retry',
download_details = 'download_details',
}

export enum CRUDAction {
delete = 'delete',
update = 'update',
edit = 'edit',
}

export interface IAction {
action: string;
action: ContextActions | UserAction | ExportActions | GeneralAction | JobAction | CRUDAction;
frequent: boolean;
icon: string;
class: string;
titleTranslationId: string;
symbol: {
icon?: string;
class?: string;
};
title: {
translationId: string;
class?: string;
};
views: TabViews[];
disabled?: boolean;
dependentField?: DependentField;
}

Expand Down Expand Up @@ -49,25 +77,50 @@ export const isDependentFieldWithValue = (
);
};

export const getActionsWithDisable = (
entityActions: IActionGroup[],
disabledActions: Array<[string, boolean]>
): IActionGroup[] => {
const actions = structuredClone(entityActions);

for (const actionGroup of actions) {
for (const [actionName, isDisabled] of disabledActions) {
const action = actionGroup.group.find((action) => action.action === actionName);

if (action) {
action.disabled = isDisabled;
}
}
}

return actions;
};

const GENERAL_ACTIONS_GROUP: IActionGroup = {
id: 0,
titleTranslationId: 'layerCatalogToMap',
type: EntityActionsTypes.GENERAL_ACTIONS,
group: [
{
action: 'flyTo',
action: GeneralAction.flyTo,
frequent: true,
icon: '',
class: 'mc-icon-Fly-to',
titleTranslationId: 'action.flyTo.tooltip',
symbol: {
class: 'mc-icon-Fly-to',
},
title: {
translationId: 'action.flyTo.tooltip',
},
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
{
action: 'viewer',
action: GeneralAction.viewer,
frequent: false,
icon: '',
class: 'mc-icon-Earth',
titleTranslationId: 'action.viewer.tooltip',
symbol: {
class: 'mc-icon-Earth',
},
title: {
translationId: 'action.viewer.tooltip',
},
dependentField: {
field: 'productStatus',
expectedValue: RecordStatus.BEING_DELETED,
Expand All @@ -76,11 +129,14 @@ const GENERAL_ACTIONS_GROUP: IActionGroup = {
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
{
action: 'export',
action: GeneralAction.export,
frequent: false,
icon: '',
class: 'mc-icon-Export',
titleTranslationId: 'action.export.tooltip',
symbol: {
class: 'mc-icon-Export',
},
title: {
translationId: 'action.export.tooltip',
},
dependentField: { field: 'layerURLMissing', expectedValue: false },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
Expand All @@ -98,20 +154,26 @@ const ACTIONS_CONFIG: IEntityActions[] = [
type: EntityActionsTypes.CRUD,
group: [
{
action: 'edit',
action: CRUDAction.edit,
frequent: true,
icon: '',
class: 'mc-icon-Edit1',
titleTranslationId: 'action.edit.tooltip',
symbol: { class: 'mc-icon-Edit1' },
title: { translationId: 'action.edit.tooltip' },
dependentField: { field: 'layerURLMissing', expectedValue: false },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
{
action: CRUDAction.update,
frequent: false,
symbol: { class: 'mc-icon-Update' },
title: { translationId: 'action.update.tooltip' },
dependentField: { field: 'layerURLMissing', expectedValue: false },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
{
action: 'update',
action: CRUDAction.delete,
frequent: false,
icon: '',
class: 'mc-icon-Update',
titleTranslationId: 'action.update.tooltip',
symbol: { class: 'mc-icon-Delete error' },
title: { translationId: 'action.delete.tooltip', class: 'error' },
dependentField: { field: 'layerURLMissing', expectedValue: false },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
Expand All @@ -129,11 +191,10 @@ const ACTIONS_CONFIG: IEntityActions[] = [
type: EntityActionsTypes.CRUD,
group: [
{
action: 'edit',
action: CRUDAction.edit,
frequent: true,
icon: '',
class: 'mc-icon-Edit1',
titleTranslationId: 'action.edit.tooltip',
symbol: { class: 'mc-icon-Edit1' },
title: { translationId: 'action.edit.tooltip' },
dependentField: {
field: 'productStatus',
expectedValue: RecordStatus.BEING_DELETED,
Expand All @@ -142,11 +203,10 @@ const ACTIONS_CONFIG: IEntityActions[] = [
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
{
action: 'delete',
action: CRUDAction.delete,
frequent: false,
icon: '',
class: 'mc-icon-Delete',
titleTranslationId: 'action.delete.tooltip',
symbol: { class: 'mc-icon-Delete error' },
title: { translationId: 'action.delete.tooltip', class: 'error' },
dependentField: {
field: 'productStatus',
expectedValue: RecordStatus.BEING_DELETED,
Expand All @@ -168,11 +228,10 @@ const ACTIONS_CONFIG: IEntityActions[] = [
type: EntityActionsTypes.CRUD,
group: [
{
action: 'edit',
action: CRUDAction.edit,
frequent: true,
icon: '',
class: 'mc-icon-Edit1',
titleTranslationId: 'action.edit.tooltip',
symbol: { class: 'mc-icon-Edit1' },
title: { translationId: 'action.edit.tooltip' },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
],
Expand All @@ -189,11 +248,10 @@ const ACTIONS_CONFIG: IEntityActions[] = [
type: EntityActionsTypes.CRUD,
group: [
{
action: 'edit',
action: CRUDAction.edit,
frequent: true,
icon: '',
class: 'mc-icon-Edit1',
titleTranslationId: 'action.edit.tooltip',
symbol: { class: 'mc-icon-Edit1' },
title: { translationId: 'action.edit.tooltip' },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
],
Expand All @@ -210,21 +268,12 @@ const ACTIONS_CONFIG: IEntityActions[] = [
type: EntityActionsTypes.CRUD,
group: [
{
action: 'edit',
action: CRUDAction.edit,
frequent: true,
icon: '',
class: 'mc-icon-Edit1',
titleTranslationId: 'action.edit.tooltip',
symbol: { class: 'mc-icon-Edit1' },
title: { translationId: 'action.edit.tooltip' },
views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS],
},
// {
// action: 'delete',
// frequent: false,
// icon: '',
// class: 'mc-icon-Delete',
// titleTranslationId: 'action.delete.tooltip',
// views: [TabViews.CATALOG, TabViews.SEARCH_RESULTS]
// },
],
},
],
Expand All @@ -238,11 +287,10 @@ const ACTIONS_CONFIG: IEntityActions[] = [
type: EntityActionsTypes.JOB_ACTIONS,
group: [
{
action: 'download_details',
action: JobAction.download_details,
frequent: false,
icon: '',
class: 'mc-icon-Download',
titleTranslationId: 'action.job.download_details',
symbol: { class: 'mc-icon-Download' },
title: { translationId: 'action.job.download_details' },
views: [],
},
],
Expand All @@ -253,29 +301,26 @@ const ACTIONS_CONFIG: IEntityActions[] = [
type: EntityActionsTypes.JOB_ACTIONS,
group: [
{
action: 'retry',
action: JobAction.retry,
frequent: false,
icon: '',
class: 'mc-icon-Job-Resume',
titleTranslationId: 'action.job.retry',
symbol: { class: 'mc-icon-Job-Resume' },
title: { translationId: 'action.job.retry' },
dependentField: 'availableActions.isResumable',
views: [],
},
{
action: 'abort',
action: JobAction.abort,
frequent: false,
icon: '',
class: 'mc-icon-Job-Abort',
titleTranslationId: 'action.job.abort',
symbol: { class: 'mc-icon-Job-Abort' },
title: { translationId: 'action.job.abort' },
dependentField: 'availableActions.isAbortable',
views: [],
},
{
action: 'restore',
action: JobAction.restore,
frequent: false,
icon: '',
class: 'mc-icon-Upload',
titleTranslationId: 'action.job.restore',
symbol: { class: 'mc-icon-Upload' },
title: { translationId: 'action.job.restore' },
dependentField: 'availableActions.isRestorable',
views: [],
},
Expand Down
1 change: 1 addition & 0 deletions src/common/components/error/error-presentor.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
height: 60px;
min-width: 264px;
overflow-y: auto;
overflow-x: hidden;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it, act differently

}

body[dir='rtl'] .errorsList {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,8 @@ body[dir='rtl'] #gridActionsCellRenderer .actionMenuItemTitle {
.actionMenuItemContainer:hover {
background: var(--mdc-theme-gc-alternative-surface);
}

#gridActionsCellRenderer .disabled {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably class should be defined globally

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened an issue

opacity: 0.5;
pointer-events: none;
}
Loading
Loading