@asoftwareworld/form-builder-pro
Version:
ASW Form Builder Pro helps you with rapid development and designed web forms which includes several controls. The key feature of Form Builder is to make your content attractive and effective. We can customize our control at run time and preview the same b
1,221 lines (1,213 loc) • 163 kB
JavaScript
import * as i0 from '@angular/core';
import { Injectable, EventEmitter, InjectionToken, Inject, Input, Directive, Pipe, NgModule } from '@angular/core';
import { of, isObservable, forkJoin, concat, defer } from 'rxjs';
import { isDefined, mergeDeep, equals, ObjectUtils } from '@asoftwareworld/form-builder-pro/utils';
import { take, shareReplay, map, concatMap, switchMap } from 'rxjs/operators';
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
class AswTranslateLoader {
}
/**
* This loader is just a placeholder that does nothing, in case you don't need a loader at all
*/
class AswTranslateFakeLoader extends AswTranslateLoader {
getTranslation(lang) {
return of({});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateFakeLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateFakeLoader });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateFakeLoader, decorators: [{
type: Injectable
}] });
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
class AswMissingTranslationHandler {
}
/**
* This handler is just a placeholder that does nothing, in case you don't need a missing translation handler at all
*/
class AswFakeMissingTranslationHandler {
handle(params) {
return params.key;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswFakeMissingTranslationHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswFakeMissingTranslationHandler });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswFakeMissingTranslationHandler, decorators: [{
type: Injectable
}] });
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
class AswTranslateParser {
}
class AswTranslateDefaultParser extends AswTranslateParser {
templateMatcher = /{{\s?([^{}\s]*)\s?}}/g;
interpolate(expr, params) {
let result;
if (typeof expr === 'string') {
result = this.interpolateString(expr, params);
}
else if (typeof expr === 'function') {
result = this.interpolateFunction(expr, params);
}
else {
// this should not happen, but an unrelated TranslateService test depends on it
result = expr;
}
return result;
}
getValue(target, key) {
const keys = typeof key === 'string' ? key.split('.') : [key];
key = '';
do {
key += keys.shift();
if (isDefined(target) && isDefined(target[key]) && (typeof target[key] === 'object' || !keys.length)) {
target = target[key];
key = '';
}
else if (!keys.length) {
target = undefined;
}
else {
key += '.';
}
} while (keys.length);
return target;
}
interpolateFunction(fn, params) {
return fn(params);
}
interpolateString(expr, params) {
if (!params) {
return expr;
}
return expr.replace(this.templateMatcher, (substring, b) => {
const r = this.getValue(params, b);
return isDefined(r) ? r : substring;
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateDefaultParser, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateDefaultParser });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateDefaultParser, decorators: [{
type: Injectable
}] });
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
class AswTranslateCompiler {
}
/**
* This compiler is just a placeholder that does nothing, in case you don't need a compiler at all
*/
class AswTranslateFakeCompiler extends AswTranslateCompiler {
compile(value, lang) {
return value;
}
compileTranslations(translations, lang) {
return translations;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateFakeCompiler, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateFakeCompiler });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswTranslateFakeCompiler, decorators: [{
type: Injectable
}] });
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
class AswTranslateStore {
/**
* The default lang to fallback when translations are missing on the current lang
*/
defaultLang;
/**
* The lang currently used
*/
currentLang = this.defaultLang;
/**
* a list of translations per lang
*/
translations = {};
/**
* an array of langs
*/
langs = [];
/**
* An EventEmitter to listen to translation change events
* onTranslationChange.subscribe((params: TranslationChangeEvent) => {
* // do something
* });
*/
onTranslationChange = new EventEmitter();
/**
* An EventEmitter to listen to lang change events
* onLangChange.subscribe((params: LangChangeEvent) => {
* // do something
* });
*/
onLangChange = new EventEmitter();
/**
* An EventEmitter to listen to default lang change events
* onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => {
* // do something
* });
*/
onDefaultLangChange = new EventEmitter();
}
function getLanguages() {
const en = {
FormBuilder: {
BasicControls: 'Basic controls',
ChoiceControls: 'Choice controls',
AdvancedControls: 'Advanced controls',
DigitalControls: 'Digital controls',
LayoutControls: 'Layout controls',
DragAndDrop: 'Drag and Drop a form component',
Preview: 'Preview',
JsonData: 'Json data',
Publish: 'Publish'
},
FormControl: {
Edit: 'Edit',
UniqueId: 'Unique Id',
Label: 'Label',
CustomCSSClass: 'Custom CSS class',
Tooltip: 'Tooltip',
InputMask: 'Input mask',
InputMaskCustomErrorMsg: 'Input mask custom error msg',
Value: 'Value',
Style: 'Style',
ColumnSize: 'Column size',
SelectColumnSize: 'Select column size',
SelectStyle: 'Select style',
MinLength: 'Min length',
MaxLength: 'Max length',
Required: 'Required',
NotRequired: 'Not required',
Disabled: 'Disabled',
Enabled: 'Enabled',
No: 'No',
Yes: 'Yes',
Properties: 'Properties',
API: 'API',
OptionValue: 'Option value',
OptionKey: 'Option key',
Add: 'Add',
Delete: 'Delete',
Duplicate: 'Duplicate',
Imageurl: 'Image url',
Width: 'Width',
Height: 'Height',
ClearPastRequests: 'Clear Past Requests',
Method: 'Method',
EnterRequestURL: 'Enter request URL',
Key: 'Key',
DataType: 'Data type',
SendRequest: 'Send Request',
Headers: 'Headers',
Body: 'Body',
UntitledRequest: 'Untitled Request',
MyWorkspace: 'My Workspace',
Response: 'Response',
IsRequired: 'is required.',
Color: 'Color',
SelectColor: 'Select color',
Type: 'Type',
SelectType: 'Select type',
Warning: 'Warning',
EditCalculation: 'Edit calculation',
SelectOperation: 'Select operation',
Operation: 'Operation',
Operator: 'Operator',
SelectOperator: 'Select operator',
MaxDate: 'Max date',
MinDate: 'Min date',
DrawImage: 'Draw image',
Latitude: 'Latitude',
Longitude: 'Longitude',
SearchLocation: 'Search location',
SelectImageShape: 'Select image shape',
LoadImage: 'Load image',
RemoveImage: 'Remove image',
LeftRotate: 'Left rotate',
RightRotate: 'Right rotate',
SwapHorizontal: 'Swap horizontal',
SwapVertical: 'Swap vertical',
ResetImage: 'Reset image',
ZoomOut: 'Zoom out',
ZoomIn: 'Zoom in',
Close: 'Close',
CopyData: 'Copy Data',
Signature: 'Signature',
SelectValue: 'Select value',
CenterImage: 'Center image',
CenterImageSize: 'Center image size',
ErrorCorrectionLevel: 'Error correction level',
SelectErrorCorrectionLevel: 'Select error correction level',
QRCodeSize: 'QR code size',
EditParagraph: 'Edit paragraph',
Save: 'Save',
Options: 'Options',
BrushSize: 'Brush size',
Colors: 'Colors',
ClearCanvas: 'Clear Canvas',
FillAspectRatio: 'Fill aspect ratio',
ContainWithinAspectRatio: 'Contain within the aspect ratio',
MoveLeft: 'Move left',
MoveRight: 'Move right',
MoveTop: 'Move top',
MoveBottom: 'Move bottom',
ImagePreview: 'Image preview',
ImageCrop: 'Image crop',
ImageSize: 'Image size',
CropType: 'Crop type',
Square: 'Square',
Circle: 'Circle',
Upload: 'Upload',
MaxSize: 'Maximum size (in KB = Kilobytes)',
MinSize: 'Minimum size (in KB = Kilobytes)',
AllowMultipleFile: 'Allow multiple files',
FileTypes: 'File types',
DisabledWeekend: 'Disabled weekend dates',
EnabledWeekend: 'Enabled weekend dates',
Readonly: 'Readonly',
CurrencySymbol: 'Choose currency symbol',
AddOption: 'Add option',
AddOperation: 'Add operation',
Copied: 'Copied',
UploadHide: 'Hide upload button',
UploadShow: 'Show upload button',
Data: 'Data',
DrawType: 'Draw type',
OuterMargin: 'Outer margin',
Density: 'Density',
TypeNumber: 'Type number',
Mode: 'Mode',
MiddleShape: 'Middle shape',
CornerInnerShape: 'Corner inner shape',
CornerOuterShape: 'Corner outer shape',
Logo: 'Logo',
LogoSize: 'Logo size',
LogoMargin: 'Logo margin',
Background: 'Background',
Format: 'Format',
CornerInner: 'Corner inner',
CornerOuter: 'Corner outer',
HideBackgroundDots: 'Hide background dots',
Size: 'Size',
AddColumn: 'Add Column',
LabelType: 'Label type',
SelectLabelType: 'Select label type',
DefaultView: 'Default view',
hideControl: 'Hide control',
hideControlInfo: 'Hide or show column controls dynamically based on the selected option'
},
editor: {
Undo: 'Undo',
Redo: 'Redo',
Bold: 'Bold',
Italic: 'Italic',
Underline: 'Underline',
Strikethrough: 'Strikethrough',
Subscript: 'Subscript',
Superscript: 'Superscript',
JustifyLeft: 'Justify left',
JustifyCenter: 'Justify center',
JustifyRight: 'Justify right',
JustifyFull: 'Justify full',
Indent: 'Indent',
Outdent: 'Outdent',
UnorderedList: 'Unordered list',
OrderedList: 'Ordered list',
TextColor: 'Text color',
BackgroundColor: 'Background color',
InsertLink: 'Insert link',
Unlink: 'Unlink',
InsertImage: 'Insert image',
InsertVideo: 'Insert video',
HorizontalLine: 'Horizontal line',
ClearFormatting: 'Clear formatting',
HTMLCode: 'HTML code'
},
Header: 'Header',
'Text field': 'Text Field',
'Text area': 'Text Area',
Number: 'Number',
Calculation: 'Calculation',
Paragraph: 'Paragraph',
Divider: 'Divider',
'Slide Toggle': 'Slide Toggle',
Button: 'Button',
Autocomplete: 'Autocomplete',
Select: 'Select',
'Multi select': 'Multi Select',
'Radio Button': 'Radio Button',
Radio: 'Radio',
Checkbox: 'Checkbox',
Datepicker: 'Datepicker',
GPS: 'GPS',
Email: 'Email',
'Phone number': 'Phone Number',
Url: 'URL',
Currency: 'Currency',
Image: 'Image',
Signature: 'Signature',
Drawing: 'Drawing',
'File Upload': 'File Upload',
'QR Code': 'QR Code',
Columns: 'Columns',
'2 Column': '2 Column',
'3 Column': '3 Column',
'4 Column': '4 Column',
'Left Split': 'Left Split',
'Right Split': 'Right Split',
'Label is required.': 'Label is required.',
'Label must be at least 2 characters long.': 'Label must be at least 2 characters long.',
'Minlength is required.': 'Minlength is required.',
'Minlength must contain only numbers.': 'Minlength must contain only numbers.',
'Option key is required.': 'Option key is required.',
'Sorry, your option key must be between 1 and 50 characters long.': 'Sorry, your option key must be between 1 and 50 characters long.',
'Sorry, only letters (a-z), numbers (0-9), and periods (- and _) are allowed.': 'Sorry, only letters (a-z), numbers (0-9), and periods (- and _) are allowed.',
'Option key already exists. Try another.': 'Option key already exists. Try another.',
'Option value is required.': 'Option value is required.',
'Sorry, your option value must be between 1 and 999 characters long.': 'Sorry, your option value must be between 1 and 999 characters long.',
'Unique id is required.': 'Unique id is required.',
'Operation is required.': 'Operation is required.',
'Operator is required.': 'Operator is required.',
'Api URL is required.': 'Api URL is required.',
'Are you sure you want to remove this field?': 'Are you sure you want to remove this field?',
'Searched address not found.': 'Searched address not found.',
Primary: 'Primary',
Secondary: 'Secondary',
Success: 'Success',
Danger: 'Danger',
Info: 'Info',
Light: 'Light',
Dark: 'Dark',
Link: 'link',
Submit: 'Submit',
Reset: 'Reset',
Basic: 'Basic',
Raised: 'Raised',
Stroked: 'Stroked',
Flat: 'Flat',
Warning: 'Warning',
Rose: 'Rose',
'Slide me!': 'Slide me!',
'Enter currency': 'Enter currency',
'Field 1 + Field 2 = ': 'Field 1 + Field 2 = ',
'Drag and drop files here or': 'Drag and drop files here or',
Browse: 'Browse',
'Please enter a valid email address': 'Please enter a valid email address',
Sorry: 'Sorry',
'must be at least': 'must be at least',
'characters long': 'characters long',
'Not a valid Phone Number': 'Not a valid Phone Number',
'Email format should be xyz@example.com': 'Email format should be xyz@example.com',
"Yikes! That's not a valid URL": "Yikes! That's not a valid URL"
};
const fr = {
FormBuilder: {
BasicControls: 'Commandes de base',
ChoiceControls: 'Commandes de choix',
AdvancedControls: 'Contrôles avancés',
DigitalControls: 'Commandes numériques',
LayoutControls: 'Commandes de mise en page',
DragAndDrop: 'Glisser-déposer un composant de formulaire',
Preview: 'Aperçu',
JsonData: 'Données Json',
Publish: 'Publier'
},
FormControl: {
Edit: 'Éditer',
UniqueId: 'Identifiant unique',
Label: 'Étiquette',
CustomCSSClass: 'Classe CSS personnalisée',
Tooltip: 'Info-bulle',
InputMask: 'Masque de saisie',
InputMaskCustomErrorMsg: "Message d'erreur personnalisé du masque de saisie",
Value: 'Évaluer',
Style: 'Style',
ColumnSize: 'Taille de la colonne',
SelectColumnSize: 'Sélectionnez la taille de la colonne',
SelectStyle: 'Sélectionnez le modèle',
MinLength: 'Longueur minimale',
MaxLength: 'longueur maximale',
Required: 'Obligatoire',
NotRequired: 'Non requis',
Disabled: 'désactivé',
Enabled: 'Activé',
No: 'Non',
Yes: 'Oui',
Properties: 'Propriétés',
API: 'API',
OptionValue: "Valeur d'option",
OptionKey: "Clé d'options",
Add: 'Ajouter',
Delete: 'Effacer',
Duplicate: 'Dupliquer',
Imageurl: "URL de l'image",
Width: 'Largeur',
Height: 'Hauteur',
ClearPastRequests: 'Effacer les demandes passées',
Method: 'Méthode',
EnterRequestURL: "Entrez l'URL de la demande",
Key: 'Clé',
DataType: 'Type de données',
SendRequest: 'Envoyer une demande',
Headers: 'En-têtes',
Body: 'Corps',
UntitledRequest: 'Demande sans titre',
MyWorkspace: 'Mon espace de travail',
Response: 'Réponse',
IsRequired: 'est requis.',
Color: 'Couleur',
SelectColor: 'Choisissez la couleur',
Type: 'Taper',
SelectType: 'Sélectionner le genre',
Warning: 'Avertissement',
EditCalculation: 'Modifier le calcul',
SelectOperation: "Sélectionnez l'opération",
Operation: 'Opération',
Operator: 'Opérateur',
SelectOperator: "Sélectionnez l'opérateur",
MaxDate: 'Date maximale',
MinDate: 'Date minimale',
DrawImage: 'Dessiner une image',
'Searched address not found.': 'Adresse recherchée introuvable.',
Latitude: 'Latitude',
Longitude: 'Longitude',
SearchLocation: 'Lieu de recherche',
SelectImageShape: "Sélectionnez la forme de l'image",
LoadImage: "Charger l'image",
RemoveImage: "Supprimer l'image",
LeftRotate: 'Rotation à gauche',
RightRotate: 'Rotation à droite',
SwapHorizontal: 'Permuter horizontalement',
SwapVertical: 'Permuter verticalement',
ResetImage: "Réinitialiser l'image",
ZoomOut: 'Dézoomer',
ZoomIn: 'Agrandir',
Close: 'proche',
CopyData: 'Copier les données',
Signature: 'Signature',
SelectValue: 'Sélectionnez la valeur',
CenterImage: "Centrer l'image",
CenterImageSize: "Taille de l'image centrale",
ErrorCorrectionLevel: "Niveau de correction d'erreur",
SelectErrorCorrectionLevel: "Sélectionnez le niveau de correction d'erreur",
QRCodeSize: 'Taille du code QR',
EditParagraph: 'Modifier le paragraphe',
Save: 'sauvegarder',
Options: 'Choix',
BrushSize: 'Taille de la brosse',
Colors: 'Couleurs',
ClearCanvas: 'Toile transparente',
FillAspectRatio: 'Remplir les proportions',
ContainWithinAspectRatio: "Contenir dans le rapport d'aspect",
MoveLeft: 'Se déplacer à gauche',
MoveRight: 'Déplacer vers la droite',
MoveTop: 'Déplacer vers le haut',
MoveBottom: 'Déplacer vers le bas',
ImagePreview: "Aperçu de l'image",
ImageCrop: "Recadrage de l'image",
ImageSize: "Taille de l'image",
CropType: 'Type de culture',
Square: 'Carré',
Circle: 'Cercle',
Upload: 'Télécharger',
MaxSize: 'Taille maximale (en Ko = Kilooctets)',
MinSize: 'Taille minimale (en Ko = Kilooctets)',
AllowMultipleFile: 'Autoriser plusieurs fichiers',
FileTypes: 'Types de fichier',
DisabledWeekend: 'Dates de week-end désactivées',
EnabledWeekend: 'Dates de week-end activées',
Readonly: 'Lecture seulement',
CurrencySymbol: 'Choisissez le symbole monétaire',
AddOption: 'Ajouter une option',
AddOperation: 'Ajouter une opération',
Copied: 'Copié',
UploadHide: 'Masquer le bouton de téléchargement',
UploadShow: 'Afficher le bouton de téléchargement',
Data: 'Données',
DrawType: 'Type de dessin',
OuterMargin: 'Marge extérieure',
Density: 'Densité',
TypeNumber: 'Numéro de type',
Mode: 'Mode',
MiddleShape: 'Forme moyenne',
CornerInnerShape: 'Forme intérieure du coin',
CornerOuterShape: 'Forme extérieure du coin',
Logo: 'Logo',
LogoSize: 'Taille du logo',
LogoMargin: 'Marge du logo',
Background: 'Arrière-plan',
Format: 'Format',
CornerInner: 'Coin intérieur',
CornerOuter: 'Coin extérieur',
HideBackgroundDots: "Masquer les points d'arrière-plan",
Size: 'Taille',
AddColumn: 'Ajouter une colonne',
LabelType: "Type d'étiquette",
SelectLabelType: "Sélectionnez le type d'étiquette",
DefaultView: 'Vue par défaut',
hideControl: 'Masquer le contrôle',
hideControlInfo: "Masquer ou afficher les contrôles de colonne de manière dynamique en fonction de l'option sélectionnée"
},
editor: {
Undo: 'annuler',
Redo: 'Refaire',
Bold: 'Audacieux',
Italic: 'Italique',
Underline: 'Souligner',
Strikethrough: 'Barré',
Subscript: 'Indice',
Superscript: 'Exposant',
JustifyLeft: 'Justifier à gauche',
JustifyCenter: 'Justifier le centre',
JustifyRight: 'Justifier à droite',
JustifyFull: 'Justifier complet',
Indent: 'Retrait',
Outdent: 'Retrait extérieur',
UnorderedList: 'Liste non ordonnée',
OrderedList: 'Liste ordonnée',
TextColor: 'Couleur du texte',
BackgroundColor: "Couleur de l'arrière plan",
InsertLink: 'Insérer un lien',
Unlink: 'Dissocier',
InsertImage: 'Insérer une image',
InsertVideo: 'Insérer une vidéo',
HorizontalLine: 'Ligne horizontale',
ClearFormatting: 'Supprimer le formattage',
HTMLCode: 'HTML code'
},
Header: 'Entête',
'Text field': 'Champ de texte',
'Text area': 'Zone de texte',
Number: 'Numéro',
Calculation: 'Calcul',
Paragraph: 'Paragraphe',
Divider: 'Diviseur',
'Slide Toggle': 'Bascule de diapositive',
Button: 'Bouton',
Autocomplete: 'Saisie automatique',
Select: 'Sélectionner',
'Multi select': 'Sélection multiple',
'Radio Button': 'Bouton radio',
Radio: 'radio',
Checkbox: 'Case à cocher',
Datepicker: 'Sélecteur de date',
GPS: 'GPS',
Email: 'E-mail',
'Phone number': 'Numéro de téléphone',
Url: 'URL',
Currency: 'Devise',
Image: 'Image',
Signature: 'Signature',
Drawing: 'Dessin',
'File Upload': 'Téléchargement de fichiers',
'QR Code': 'QR Code',
Columns: 'Colonnes',
'2 Column': '2 Colonne',
'3 Column': '3 Colonne',
'4 Column': '4 Colonne',
'Left Split': 'Division gauche',
'Right Split': 'Division à droite',
'Label is required.': "L'étiquette est obligatoire.",
'Label must be at least 2 characters long.': 'Le libellé doit comporter au moins 2 caractères.',
'Minlength is required.': 'Minlength est requis.',
'Minlength must contain only numbers.': 'Minlength ne doit contenir que des nombres.',
'Option key is required.': "La clé d'option est requise.",
'Sorry, your option key must be between 1 and 50 characters long.': "Désolé, votre clé d'option doit contenir entre 1 et 50 caractères.",
'Sorry, only letters (a-z), numbers (0-9), and periods (- and _) are allowed.': 'Désolé, seuls les lettres (a-z), les chiffres (0-9) et les points (- et _) sont autorisés.',
'Option key already exists. Try another.': "La clé d'option existe déjà. Essaie un autre.",
'Option value is required.': "La valeur de l'option est requise.",
'Sorry, your option value must be between 1 and 999 characters long.': 'Désolé, la valeur de votre option doit être comprise entre 1 et 999 caractères.',
'Unique id is required.': 'Un identifiant unique est requis.',
'Operation is required.': "L'opération est requise.",
'Operator is required.': "L'opérateur est requis.",
'Api URL is required.': "L'URL de l'API est requise.",
'Are you sure you want to remove this field?': 'Voulez-vous vraiment supprimer ce champ?',
Primary: 'Primary',
Secondary: 'Secondaire',
Success: 'Succès',
Danger: 'Danger',
Info: 'Info',
Light: 'Lumière',
Dark: 'Sombre',
Link: 'lien',
Submit: 'Soumettre',
Reset: 'Réinitialiser',
Basic: 'Basique',
Raised: 'Soulevé',
Stroked: 'Caressé',
Flat: 'Plat',
Warning: 'Avertissement',
Rose: 'Rose',
'Slide me!': 'Faites-moi glisser !',
'Enter currency': 'Saisir la devise',
'Field 1 + Field 2 = ': 'Champ 1 + Champ 2 = ',
'Drag and drop files here or': 'Faites glisser et déposez les fichiers ici ou',
Browse: 'Parcourir',
'Please enter a valid email address': "S'il vous plaît, mettez une adresse email valide",
Sorry: 'Désolé',
'must be at least': 'doit être au moins',
'characters long': 'caractères longs',
'Not a valid Phone Number': 'Pas un numéro de téléphone valide',
'Email format should be xyz@example.com': "Le format de l'e-mail doit être xyz@example.com",
"Yikes! That's not a valid URL": "Ouais ! Ce n'est pas une URL valide"
};
const es = {
FormBuilder: {
BasicControls: 'Controles básicos',
ChoiceControls: 'Controles de elección',
AdvancedControls: 'Controles avanzados',
DigitalControls: 'Controles digitales',
LayoutControls: 'Controles de diseño',
DragAndDrop: 'Arrastrar y soltar un componente de formulario',
Preview: 'Avance',
JsonData: 'datos json',
Publish: 'Publicar'
},
FormControl: {
Edit: 'Editar',
UniqueId: 'Identificación única',
Label: 'Etiqueta',
CustomCSSClass: 'Clase CSS personalizada',
Tooltip: 'Información sobre herramientas',
InputMask: 'Máscara de entrada',
InputMaskCustomErrorMsg: 'Mensaje de error personalizado de máscara de entrada',
Value: 'Valor',
Style: 'Estilo',
ColumnSize: 'Tamaño de columna',
SelectColumnSize: 'Seleccionar tamaño de columna',
SelectStyle: 'Seleccionar estilo',
MinLength: 'Longitud mínima',
MaxLength: 'longitud máxima',
Required: 'Requerido',
NotRequired: 'No requerido',
Disabled: 'Desactivado',
Enabled: 'Activado',
No: 'No',
Yes: 'Sí',
Properties: 'Propiedades',
API: 'API',
OptionValue: 'Valor de la opción',
OptionKey: 'tecla de opción',
Add: 'Agregar',
Delete: 'Borrar',
Duplicate: 'Duplicado',
Imageurl: 'URL de la imagen',
Width: 'Ancho',
Height: 'Altura',
ClearPastRequests: 'Borrar solicitudes anteriores',
Method: 'Método',
EnterRequestURL: 'Introduzca la URL de la solicitud',
Key: 'Llave',
DataType: 'Tipo de datos',
SendRequest: 'Enviar petición',
Headers: 'Encabezados',
Body: 'Cuerpo',
UntitledRequest: 'Solicitud sin título',
MyWorkspace: 'Mi espacio de trabajo',
Response: 'Respuesta',
IsRequired: 'es requerido.',
Color: 'Color',
SelectColor: 'Seleccionar el color',
Type: 'Escribe',
SelectType: 'Seleccione tipo',
Warning: 'Advertencia',
EditCalculation: 'Editar cálculo',
SelectOperation: 'Seleccionar operación',
Operation: 'Operación',
Operator: 'Operador',
SelectOperator: 'Seleccionar operador',
MaxDate: 'Fecha máxima',
MinDate: 'Fecha mínima',
DrawImage: 'Dibujar imagen',
Latitude: 'Latitud',
Longitude: 'Longitud',
SearchLocation: 'Buscar ubicación',
SelectImageShape: 'Seleccione la forma de la imagen',
LoadImage: 'Cargar imagen',
RemoveImage: 'Quita la imagen',
LeftRotate: 'Girar a la izquierda',
RightRotate: 'Rotar a la derecha',
SwapHorizontal: 'Intercambiar horizontales',
SwapVertical: 'Intercambiar verticales',
ResetImage: 'Restablecer imagen',
ZoomOut: 'Disminuir el zoom',
ZoomIn: 'Acercarse',
Close: 'Cerca',
CopyData: 'Copiar datos',
Signature: 'Firma',
SelectValue: 'Selecciona valor',
CenterImage: 'imagen central',
CenterImageSize: 'Tamaño de la imagen central',
ErrorCorrectionLevel: 'Nivel de corrección de errores',
SelectErrorCorrectionLevel: 'Seleccione el nivel de corrección de errores',
QRCodeSize: 'Tamaño del código QR',
EditParagraph: 'Editar párrafo',
Save: 'Ahorrar',
Options: 'Opciones',
BrushSize: 'Tamaño del pincel',
Colors: 'Colores',
ClearCanvas: 'lienzo transparente',
FillAspectRatio: 'relación de aspecto de relleno',
ContainWithinAspectRatio: 'Contener dentro de la relación de aspecto',
MoveLeft: 'Mover hacia la izquierda',
MoveRight: 'Mover a la derecha',
MoveTop: 'Mover arriba',
MoveBottom: 'Mover abajo',
ImagePreview: 'Vista previa de la imagen',
ImageCrop: 'Recorte de imagen',
ImageSize: 'Tamaño de la imagen',
CropType: 'tipo de cultivo',
Square: 'Cuadrado',
Circle: 'Circulo',
Upload: 'Subir',
MaxSize: 'Tamaño máximo (en KB = Kilobytes)',
MinSize: 'Tamaño mínimo (en KB = Kilobytes)',
AllowMultipleFile: 'Permitir múltiples archivos',
FileTypes: 'Tipos de archivo',
DisabledWeekend: 'Fechas de fin de semana deshabilitadas',
EnabledWeekend: 'Fechas de fin de semana habilitadas',
Readonly: 'Solo lectura',
CurrencySymbol: 'Elija el símbolo de moneda',
AddOption: 'Añadir opción',
AddOperation: 'Añadir operación',
Copied: 'Copiado',
UploadHide: 'Ocultar botón de carga',
UploadShow: 'Mostrar botón de carga',
Data: 'Datos',
DrawType: 'Tipo de sorteo',
OuterMargin: 'margen exterior',
Density: 'Densidad',
TypeNumber: 'Teclea un número',
Mode: 'Mode',
MiddleShape: 'Forma media',
CornerInnerShape: 'Forma interior de esquina',
CornerOuterShape: 'Forma exterior de la esquina',
Logo: 'Logo',
LogoSize: 'Tamaño del logotipo',
LogoMargin: 'Margen del logotipo',
Background: 'Fondo',
Format: 'Formato',
CornerInner: 'Esquina interior',
CornerOuter: 'Esquina exterior',
HideBackgroundDots: 'Ocultar puntos de fondo',
Size: 'Tamaño',
AddColumn: 'Añadir columna',
LabelType: 'Tipo de etiqueta',
SelectLabelType: 'Seleccionar tipo de etiqueta',
DefaultView: 'Vista predeterminada',
hideControl: 'Ocultar control',
hideControlInfo: 'Ocultar o mostrar controles de columna dinámicamente según la opción seleccionada'
},
editor: {
Undo: 'Deshacer',
Redo: 'Rehacer',
Bold: 'Negrito',
Italic: 'Itálico',
Underline: 'Subrayar',
Strikethrough: 'tachado',
Subscript: 'Subíndice',
Superscript: 'Sobrescrito',
JustifyLeft: 'Justificar a la izquierda',
JustifyCenter: 'Justificar centro',
JustifyRight: 'Justificar bien',
JustifyFull: 'Justificar completo',
Indent: 'Sangrar',
Outdent: 'anular la sangría',
UnorderedList: 'Lista desordenada',
OrderedList: 'Lista ordenada',
TextColor: 'Color de texto',
BackgroundColor: 'Color de fondo',
InsertLink: 'Insertar el link',
Unlink: 'Desconectar',
InsertImage: 'Insertar imagen',
InsertVideo: 'Insertar vídeo',
HorizontalLine: 'Linea horizontal',
ClearFormatting: 'Formato claro',
HTMLCode: 'Código HTML'
},
Header: 'Encabezamiento',
'Text field': 'Campo de texto',
'Text area': 'Área de texto',
Number: 'Número',
Calculation: 'Cálculo',
Paragraph: 'Párrafo',
Divider: 'Divisor',
'Slide Toggle': 'Alternar diapositiva',
Button: 'Botón',
Autocomplete: 'Autocompletar',
Select: 'Seleccione',
'Multi select': 'Selección múltiple',
'Radio Button': 'Boton de radio',
Radio: 'radio',
Checkbox: 'Caja',
Datepicker: 'Selector de fechas',
GPS: 'GPS',
Email: 'Correo electrónico',
'Phone number': 'Número de teléfono',
Url: 'URL',
Currency: 'Currency',
Image: 'Imagen',
Signature: 'Firma',
Drawing: 'Dibujo',
'File Upload': 'Subir archivo',
'QR Code': 'Código QR',
Columns: 'columnas',
'2 Column': '2 Columna',
'3 Column': '3 Columna',
'4 Column': '4 Columna',
'Left Split': 'División izquierda',
'Right Split': 'División derecha',
'Label is required.': 'Se requiere etiqueta.',
'Label must be at least 2 characters long.': 'La etiqueta debe tener al menos 2 caracteres.',
'Minlength is required.': 'Se requiere longitud mínima.',
'Minlength must contain only numbers.': 'Minlength debe contener solo números.',
'Option key is required.': 'Se requiere clave de opción.',
'Sorry, your option key must be between 1 and 50 characters long.': 'Lo sentimos, su clave de opción debe tener entre 1 y 50 caracteres.',
'Sorry, only letters (a-z), numbers (0-9), and periods (- and _) are allowed.': 'Lo sentimos, solo se permiten letras (a-z), números (0-9) y puntos (- y _).',
'Option key already exists. Try another.': 'Option key already exists. Try another.',
'Option value is required.': 'El valor de la opción es obligatorio.',
'Sorry, your option value must be between 1 and 999 characters long.': 'Lo sentimos, el valor de su opción debe tener entre 1 y 999 caracteres.',
'Unique id is required.': 'Se requiere identificación única.',
'Operation is required.': 'Se requiere operación.',
'Operator is required.': 'Se requiere operador.',
'Api URL is required.': 'Se requiere la URL de API.',
'Are you sure you want to remove this field?': '¿Estás seguro de que quieres eliminar este campo?',
'Searched address not found.': 'Dirección buscada no encontrada.',
Primary: 'Primario',
Secondary: 'Secundario',
Success: 'Éxito',
Danger: 'Peligro',
Info: 'Información',
Light: 'Ligero',
Dark: 'Oscuro',
Link: 'enlace',
Submit: 'Entregar',
Reset: 'Reiniciar',
Basic: 'Básico',
Raised: 'Aumentó',
Stroked: 'Acariciado',
Flat: 'Departamento',
Warning: 'Advertencia',
Rose: 'Rosa',
'Slide me!': '¡Deslízame!',
'Enter currency': 'Introducir moneda',
'Field 1 + Field 2 = ': 'Campo 1 + Campo 2 = ',
'Drag and drop files here or': 'Arrastre y suelte archivos aquí o',
Browse: 'Navegar',
'Please enter a valid email address': 'Por favor, introduce una dirección de correo electrónico válida',
Sorry: 'Lo siento',
'must be at least': 'debe ser al menos',
'characters long': 'Caracteres largos',
'Not a valid Phone Number': 'No es un número de teléfono válido',
'Email format should be xyz@example.com': 'El formato del correo electrónico debe ser xyz@example.com',
"Yikes! That's not a valid URL": '¡Ay! Esa no es una URL válida'
};
const ar = {
FormBuilder: {
BasicControls: 'ضوابط أساسية',
ChoiceControls: 'ضوابط الإختيار',
AdvancedControls: 'ضوابط متقدمة',
DigitalControls: 'ضوابط رقمية',
LayoutControls: 'ضوابط التخطيط',
DragAndDrop: 'سحب وإفلات مكونات الإستمارة',
Preview: 'معاينة',
JsonData: 'Json بيانات',
Publish: 'نشر'
},
FormControl: {
Edit: 'تعديل',
UniqueId: 'معرف فريد',
Label: 'اسم الحقل',
CustomCSSClass: 'فئة CSS مخصصة',
Tooltip: 'رسالة تعريف الأدوات',
InputMask: 'قناع الإدخال',
InputMaskCustomErrorMsg: 'رسالة خطأ مخصصة لقناع الإدخال',
Value: 'قيمة',
Style: 'تصميم',
ColumnSize: 'حجم العامود',
SelectColumnSize: 'إختر حجم العامود',
SelectStyle: 'إختر التصميم',
MinLength: 'الحد الأدنى للطول',
MaxLength: 'الحد الأقصى للطول',
Required: 'إلزامي',
NotRequired: 'غير إلزامي',
Disabled: 'معطل',
Enabled: 'ممكّن',
No: 'لا',
Yes: 'أجل',
Properties: 'خصائص',
API: 'API',
OptionValue: 'قيمة الخيار',
OptionKey: 'مفتاح الخيار',
Add: 'إضافة',
Delete: 'حذف',
Duplicate: 'استنسخ',
Imageurl: 'رابط الصورة',
Width: 'العرض',
Height: 'الطول',
ClearPastRequests: 'محو الطلبات السابقة',
Method: 'طريقة',
EnterRequestURL: 'أدخل رابط الطلب',
Key: 'مفتاح',
DataType: 'نوع البيانات',
SendRequest: 'إرسال الطلب',
Headers: 'العناوين',
Body: 'المحتوى الرئيسي',
UntitledRequest: 'طلب غير معنون',
MyWorkspace: 'مساحة العمل الخاصة بي',
Response: 'استجابة',
IsRequired: 'مطلوب',
Color: 'اللون',
SelectColor: 'إختر اللون',
Type: 'النوع',
SelectType: 'إختر النوع',
Warning: 'إنذار',
EditCalculation: 'تعديل الحساب',
SelectOperation: 'اختر العملية',
Operation: 'العملية',
Operator: 'العامل',
SelectOperator: 'اختر العامل',
MaxDate: 'الحد الأقصى للتاريخ',
MinDate: 'الحد الأدنى للتاريخ',
DrawImage: 'رسم صورة',
Latitude: 'خط العرض',
Longitude: 'خط الطول',
SearchLocation: 'ابحث عن موقع',
SelectImageShape: 'اختر شكل الصورة',
LoadImage: 'حمل الصورة',
RemoveImage: 'إزالة الصورة',
LeftRotate: 'تدوير لليسار',
RightRotate: 'تدوير لليمين',
SwapHorizontal: 'تبديل أفقي',
SwapVertical: 'تبديل عامودي',
ResetImage: 'إعادة تعيين الصورة',
ZoomOut: 'تصغير',
ZoomIn: 'تكبير',
Close: 'إغلاق',
CopyData: 'نسخ البيانات',
Signature: 'توقيع',
SelectValue: 'اختر القيمة',
CenterImage: 'توسيط الصورة',
CenterImageSize: 'توسيط حجم الصورة',
ErrorCorrectionLevel: 'مستوى تصحيح الخطأ',
SelectErrorCorrectionLevel: 'اختر مستوى تصحيح الخطأ',
QRCodeSize: 'حجم رمز QR',
EditParagraph: 'تعديل الفقرة',
Save: 'حفظ',
Options: 'الإحتمالات',
BrushSize: 'حجم الفرشاة',
Colors: 'الألوان',
ClearCanvas: 'محو محتويات لوح الرسم',
FillAspectRatio: 'ملء نسبة العرض إلى الارتفاع',
ContainWithinAspectRatio: 'احتواء ضمن نسبة العرض إلى الارتفاع',
MoveLeft: 'تحريك لليسار',
MoveRight: 'تحريك لليمين',
MoveTop: 'تحريك للأعلى',
MoveBottom: 'تحريك للأسفل',
ImagePreview: 'معاينة الصورة',
ImageCrop: 'اقتصاص الصورة',
ImageSize: 'حجم الصورة',
CropType: 'نوع الاقتصاص',
Square: 'مربع',
Circle: 'دائرة',
Upload: 'رفع',
MaxSize: 'الحجم الأقصى (بالكيلوبايت)',
MinSize: 'الحجم الأدنى (بالكيلوبايت)',
AllowMultipleFile: 'السماح بعدة ملفات',
FileTypes: 'أنواع الملفات',
DisabledWeekend: 'تعطيل تواريخ عطلة نهاية الأسبوع',
EnabledWeekend: 'تمكين تواريخ عطلة نهاية الأسبوع',
Readonly: 'للقراءة فقط',
CurrencySymbol: 'اختر رمز العملة',
AddOption: 'أضف احتمال',
AddOperation: 'أضف عملية',
Copied: 'تم النسخ',
UploadHide: 'إخفاء زر الرفع',
UploadShow: 'إظهار زر الرفع',
Data: 'البيانات',
DrawType: 'نوع الرسم',
OuterMargin: 'الهامش الخارجي',
Density: 'الكثافة',
TypeNumber: 'رقم النوع',
Mode: 'وضع',
MiddleShape: 'الشكل في الوسط',
CornerInnerShape: 'شكل الزاوية الداخلي',
CornerOuterShape: 'شكل الزاوية الخارجي',
Logo: 'شعار',
LogoSize: 'حجم الشعار',
LogoMargin: 'هامش الشعار',
Background: 'خلفية',
Format: 'نسق',
CornerInner: 'الزاوية الداخلية',
CornerOuter: 'الزاوية الخارجية',
HideBackgroundDots: 'إخفاء نقاط الخلفية',
Size: 'الحجم',
AddColumn: 'إضافة عامود',
LabelType: 'نوع الملصق',
SelectLabelType: 'اختر نوع الملصق',
DefaultView: 'طريقة العرض الافتراضية',
hideControl: 'إخفاء التحكم',
hideControlInfo: 'إخفاء أو إظهار عناصر التحكم في الأعمدة بشكل ديناميكي استنادًا إلى الخيار المحدد'
},
editor: {
Undo: 'تراجع',
Redo: 'إعادة',
Bold: 'خط عريض',
Italic: 'خط مائل',
Underline: 'تسطير',
Strikethrough: 'تخطيط (خط متوسط)',
Subscript: 'خط منخفض',
Superscript: 'خط مرتفع',
JustifyLeft: 'محاذاة النص يسارا',
JustifyCenter: 'محاذاة للوسط',
JustifyRight: 'محاذاة النص يمينا',
JustifyFull: 'محاذاة كاملة',
Indent: 'إزاحة عبر زيادة مستوى المسافة البادئة',
Outdent: 'إزاحة عبر إنقاص مستوى المسافة البادئة',
UnorderedList: 'قائمة غير مرتبة',
OrderedList: 'قائمة مرتبة',
TextColor: 'لون النص',
BackgroundColor: 'لون الخلفية',
InsertLink: 'أدخل الرابط',
Unlink: 'إلغاء الربط',
InsertImage: 'إدراج صورة',
InsertVideo: 'إدراج فيديو',
HorizontalLine: 'خط أفقي',
ClearFormatting: 'مسح التنسيقات',
HTMLCode: 'شفرة HTML'
},
Header: 'عنوان',
'Text field': 'حقل النص',
'Text area': 'منطقة النص',
Number: 'رقم',
Calculation: 'حساب',
Paragraph: 'فقرة',
Divider: 'فاصل',
'Slide Toggle': 'مفتاح التبديل',
Button: 'زر',
Autocomplete: 'الإكمال التلقائي',
Select: 'قائمة الإختيارات',
'Multi select': 'قائمة متعددة الإختيارات',
'Radio Button': 'زر انتقاء',
Radio: 'راديو',
Checkbox: 'خانة تأشير',
Datepicker: 'منتقي التاريخ',
GPS: 'نظام تحديد المواقع',
Email: 'بَريد الكتروني',
'Phone number': 'رقم الهاتف',
Url: 'عنوان URL',
Currency: 'عملة',
Image: 'صورة',
Signature: 'توقيع',
Drawing: 'رسم',
'File Upload': 'رفع ملف',
'QR Code': 'رمز الاستجابة السريعة(QR)',
Columns: 'أعمدة',
'2 Column': 'عامودين 2',
'3 Column': '3 أعمدة',
'4 Column': '4 أعمدة',
'Left Split': 'تقسيم أيسر',
'Right Split': 'تقسيم أيمن',
'Label is required.': 'اسم الحقل مطلوب.',
'Label must be at least 2 characters long.': 'اسم الحقل يجب أن يحتوي على حرفين على الأقل.',
'Minlength is required.': 'يجب إدخال الحد الأدنى للطول.',
'Minlength must contain only numbers.': 'حقل الحد الأدنى للطول يجب أن يحتوي على أرقام فقط.',
'Option key is required.': 'مفتاح الخيار مطلوب.',
'Sorry, your option key must be between 1 and 50 characters long.': 'عذرًا، يجب أن يكون مفتاح الخيار الخاص بك بين 1 و 50 حرفًا ',
'Sorry, only letters (a-z), numbers (0-9), and periods (- and _) are allowed.': ' (a-z) عذرًا، يُسمح فقط بالأحرف والأرقام (0-9) والنقاط (.) والشرطات (- و_). ',
'Option key already exists. Try another.': 'مفتاح الخيار موجود بالفعل. جرب مفتاحا آخر ',
'Option value is required.': 'قيمة الخيار مطلوبة.',
'Sorry, your option value must be between 1 and 999 characters long.': 'عذرًا، يجب أن يتراوح طول قيمة الخيار بين 1 و 999 حرفًا.',
'Unique id is required.': 'المعرف الفريد مطلوب.',
'Operation is required.': 'العملية مطلوبة.',
'Operator is required.': 'العامل مطلوب.',
'Api URL is required.': 'مطلوب عنوان الرابط API',
'Are you sure you want to remove this field?': 'هل أنت متأكد أنك تريد إزالة هذا الحقل؟',
'Searched address not found.': 'العنوان الذي تم البحث عنه غير موجود.',
Primary: 'أساسي',
Secondary: 'ثانوي',
Success: 'نجاح',
Danger: 'خطر',
Info: 'معلومات',
Light: 'ضوء',
Dark: 'مظلم',
Link: 'وصلة',
Submit: 'يُقدِّم',
Reset: 'إعادة ضبط',
Basic: 'أساسي',
Raised: 'نشأ',
Stroked: 'السكتة الدماغية',
Flat: 'مستوي',
Warning: 'إنذار',
Rose: 'وَردَة',
'Slide me!': 'حركني!',
'Enter currency': 'أدخل العملة',
'Field 1 + Field 2 = ': 'الحقل 1 + الحقل 2 =',
'Drag and drop files here or': 'قم بسحب وإسقاط الملفات هنا أو',
Browse: 'تصفح',
'Please enter a valid email address': 'يرجى إدخال عنوان بريد إلكتروني صالح',
Sorry: 'آسف',
'must be at least': 'يجب أن يكون على الأقل',
'characters long': 'الشخصيات طويلة',
'Not a valid Phone Number': 'رقم هاتف غير صالح',
'Email format should be xyz@example.com': 'يجب أن يكون تنسيق البريد الإلكتروني xyz@example.com',
"Yikes! That's not a valid URL": 'نعم! هذا ليس عنوان URL صالحًا'
};
const libraryLanguages = {
en,
es,
fr,
ar
};
return libraryLanguages;
}
const Languages = getLanguages();
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
class AswTranslateHttpLoader {
/**
* Gets the translations from the server
*/
getTranslation(lang) {
return of(Languages[lang]);
}
}
/**
* @license
* Copyright ASW (A S