-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
41 changed files
with
1,559 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"model": { | ||
"id": "ID", | ||
"phrase": "Phrase", | ||
"authorReplacement": "Replace by author", | ||
"type": "Type", | ||
"mode": "Mode", | ||
"position": "Position", | ||
"flags": { | ||
"wordBoundary": "Separate word" | ||
} | ||
}, | ||
"filter": { | ||
"id": "ID", | ||
"phrase": "Phrase", | ||
"type": "Type", | ||
"mode": "Mode" | ||
}, | ||
"button": { | ||
"create": "Create", | ||
"playground": "Playground" | ||
}, | ||
"meta": { | ||
"playground": "Phrase testing", | ||
"test": "Test" | ||
}, | ||
"dto": { | ||
"name": "Name", | ||
"authorNames": "Author strings", | ||
"authors": "Authors" | ||
}, | ||
"mode": { | ||
"split": "Split", | ||
"remove": "Remove", | ||
"replace": "Replace" | ||
}, | ||
"type": { | ||
"word": "Word", | ||
"regex": "Regular expression" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"error_invalid_key": "error_invalid_key error", | ||
"error_invalid_licence": "error_invalid_licence error" | ||
"error_invalid_licence": "error_invalid_licence error", | ||
"error_invalid_ext_system": "error_invalid_ext_system error" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"model": { | ||
"id": "ID", | ||
"phrase": "Fráza", | ||
"authorReplacement": "Nahraď autorom", | ||
"type": "Typ frázy", | ||
"mode": "Operácia frázy", | ||
"position": "Poradie", | ||
"flags": { | ||
"wordBoundary": "Samostatné slovo" | ||
} | ||
}, | ||
"filter": { | ||
"id": "ID", | ||
"phrase": "Fráza", | ||
"type": "Typ frázy", | ||
"mode": "Operácia frázy" | ||
}, | ||
"button": { | ||
"create": "Vytvoriť", | ||
"playground": "Ihrisko" | ||
}, | ||
"meta": { | ||
"playground": "Testovanie pravidiel", | ||
"test": "Testuj" | ||
}, | ||
"dto": { | ||
"name": "Text", | ||
"authorNames": "Reťazce autorov", | ||
"authors": "Autori" | ||
}, | ||
"mode": { | ||
"split": "Rozdelenie", | ||
"remove": "Odstránenie", | ||
"replace": "Nahradenie" | ||
}, | ||
"type": { | ||
"word": "Slovo", | ||
"regex": "Regulárny výraz" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"error_invalid_key": "Neplatný kľúč.", | ||
"error_invalid_licence": "Neplatná licencia." | ||
"error_invalid_licence": "Neplatná licencia.", | ||
"error_invalid_ext_system": "Neplatný externý systém" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import type { IntegerId } from '@anzusystems/common-admin' | ||
import { dateTimeNow } from '@anzusystems/common-admin' | ||
import { SYSTEM_CORE_DAM } from '@/model/systems' | ||
import type { AuthorCleanPhrase, AuthorCleanResultDto, AuthorNameDto } from '@/types/coreDam/AuthorCleanPhrase' | ||
import { ENTITY } from '@/services/api/coreDam/AuthorCleanPhraseApi' | ||
import { AuthorCleanPhraseModeDefault } from '@/model/coreDam/valueObject/AuthorCleanPhraseMode' | ||
import { AuthorCleanPhraseTypeDefault } from '@/model/coreDam/valueObject/AuthorCleanPhraseType' | ||
import { envConfig } from '@/services/EnvConfigService' | ||
|
||
const DEFAULT_POSITION = 100 | ||
|
||
export function useAuthorCleanPhraseFactory() { | ||
const createDefault = (extSystemId: IntegerId): AuthorCleanPhrase => { | ||
return { | ||
id: 0, | ||
authorReplacement: null, | ||
extSystem: extSystemId, | ||
phrase: '', | ||
position: DEFAULT_POSITION, | ||
flags: { | ||
wordBoundary: false, | ||
}, | ||
mode: AuthorCleanPhraseModeDefault, | ||
type: AuthorCleanPhraseTypeDefault, | ||
modifiedAt: dateTimeNow(), | ||
createdAt: dateTimeNow(), | ||
createdBy: 0, | ||
modifiedBy: 0, | ||
_resourceName: ENTITY, | ||
_system: SYSTEM_CORE_DAM, | ||
} | ||
} | ||
|
||
const createAuthorNameDto = (): AuthorNameDto => { | ||
return { | ||
name: envConfig.dam.authorCleanPhraseTestSample | ||
} | ||
} | ||
|
||
const createAuthorCleanResultDto = (): AuthorCleanResultDto => { | ||
return { | ||
name: '', | ||
authors: [], | ||
authorNames: [] | ||
} | ||
} | ||
|
||
return { | ||
createAuthorNameDto, | ||
createAuthorCleanResultDto, | ||
createDefault, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { reactive } from 'vue' | ||
import { makeFilterHelper } from '@anzusystems/common-admin' | ||
import { SYSTEM_CORE_DAM } from '@/model/systems' | ||
import { ENTITY } from '@/services/api/coreDam/AuthorCleanPhraseApi' | ||
|
||
const makeFilter = makeFilterHelper(SYSTEM_CORE_DAM, ENTITY) | ||
|
||
const filter = reactive({ | ||
id: { | ||
...makeFilter({ name: 'id' }), | ||
}, | ||
phrase: { | ||
...makeFilter({ name: 'phrase' }), | ||
}, | ||
mode: { | ||
...makeFilter({ name: 'mode' }), | ||
}, | ||
type: { | ||
...makeFilter({ name: 'type' }), | ||
}, | ||
}) | ||
|
||
export function useAuthorCleanPhraseListFilter() { | ||
return filter | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ref } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import type { ValueObjectOption } from '@anzusystems/common-admin' | ||
|
||
export const AuthorCleanPhraseMode = { | ||
Remove: 'remove', | ||
Replace: 'replace', | ||
Split: 'split', | ||
} as const | ||
|
||
export type AuthorCleanPhraseModeType = (typeof AuthorCleanPhraseMode)[keyof typeof AuthorCleanPhraseMode] | ||
export const AuthorCleanPhraseModeDefault = AuthorCleanPhraseMode.Remove | ||
|
||
export function useAuthorCleanPhraseModeTypes() { | ||
const { t } = useI18n() | ||
|
||
const authorCleanPhraseModeOptions = ref<ValueObjectOption<AuthorCleanPhraseModeType>[]>([ | ||
{ | ||
value: AuthorCleanPhraseMode.Remove, | ||
title: t('coreDam.authorCleanPhrase.mode.remove'), | ||
}, | ||
{ | ||
value: AuthorCleanPhraseMode.Replace, | ||
title: t('coreDam.authorCleanPhrase.mode.replace'), | ||
}, | ||
{ | ||
value: AuthorCleanPhraseMode.Split, | ||
title: t('coreDam.authorCleanPhrase.mode.split'), | ||
}, | ||
]) | ||
|
||
const getAuthorCleanPhraseModeOption = (value: AuthorCleanPhraseModeType) => { | ||
return authorCleanPhraseModeOptions.value.find((item) => item.value === value) | ||
} | ||
|
||
return { | ||
authorCleanPhraseModeOptions, | ||
getAuthorCleanPhraseModeOption, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ref } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
import type { ValueObjectOption } from '@anzusystems/common-admin' | ||
|
||
export const AuthorCleanPhraseType = { | ||
Word: 'word', | ||
Regex: 'regex', | ||
} as const | ||
|
||
export type AuthorCleanPhraseTypeType = (typeof AuthorCleanPhraseType)[keyof typeof AuthorCleanPhraseType] | ||
export const AuthorCleanPhraseTypeDefault = AuthorCleanPhraseType.Word | ||
|
||
export function useAuthorCleanPhraseTypeTypes() { | ||
const { t } = useI18n() | ||
|
||
const authorCleanPhraseTypeOptions = ref<ValueObjectOption<AuthorCleanPhraseTypeType>[]>([ | ||
{ | ||
value: AuthorCleanPhraseType.Word, | ||
title: t('coreDam.authorCleanPhrase.type.word'), | ||
}, | ||
{ | ||
value: AuthorCleanPhraseType.Regex, | ||
title: t('coreDam.authorCleanPhrase.type.regex'), | ||
}, | ||
]) | ||
|
||
const getAuthorCleanPhraseTypeOption = (value: AuthorCleanPhraseTypeType) => { | ||
return authorCleanPhraseTypeOptions.value.find((item) => item.value === value) | ||
} | ||
|
||
return { | ||
authorCleanPhraseTypeOptions, | ||
getAuthorCleanPhraseTypeOption, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.