Compare commits

...

120 Commits

Author SHA1 Message Date
jf-cbd
e1bd815094 WIP Tom Select options 2025-11-25 17:46:18 +01:00
Eric Espie
a19472cfd1 🎨 N°8772 - CS Fixer 2025-11-20 10:55:10 +01:00
Eric Espie
7b29d562c8 N°8772 - wip 2025-11-20 10:31:18 +01:00
Eric Espie
3e471edefd 🎨 N°8772 - Moved DI under Service 2025-11-19 15:27:18 +01:00
Eric Espie
bd44f971e4 🎨 N°8772 - CS Fixer 2025-11-19 14:49:20 +01:00
Eric Espie
65bd6d9fd0 Add ModelReflection Service as dependency injection + tests 2025-11-19 14:42:32 +01:00
jf-cbd
6678689b77 Fix wrong path for turbo 2025-11-19 11:04:36 +01:00
jf-cbd
8f05c2bcba Fix CI error (cf. 2651) 2025-11-19 10:52:33 +01:00
jf-cbd
4169e10eec Fix wrong path for turbo 2025-11-19 10:49:01 +01:00
Eric Espie
e95ce21188 Add sAPPROOTURL to the data of the twig 2025-11-19 10:06:16 +01:00
Eric Espie
24d78df21d 🎨 N°8772 - CS Fixer 2025-11-19 09:21:34 +01:00
Eric Espie
546912ad77 N°8772 - 2025-11-18 18:08:50 +01:00
jf-cbd
f93926528f Add Tom-Select lib 2025-11-18 17:18:46 +01:00
Eric Espie
0cb7c7359f N°8772 - AbstractFormIO tests 2025-11-18 16:45:11 +01:00
Eric Espie
7c0f454936 Runtime Model Reflection & namespace 2025-11-18 15:36:22 +01:00
Eric Espie
11973d61ec 🎨 CS Fixer 2025-11-18 14:52:10 +01:00
Eric Espie
e08835c1a2 N°8772 - AbstractFormIO tests 2025-11-18 14:00:41 +01:00
Eric Espie
8ecb36b1fe N°8772 - FormBinding tests 2025-11-18 11:24:05 +01:00
Eric Espie
6a4ed98299 Merge remote-tracking branch 'origin/develop' into feature/8772_form_dependencies_manager 2025-11-18 09:54:29 +01:00
Eric Espie
2a8ed931e9 N°8772 - AbstractFormIO and FormBinding tests 2025-11-18 09:25:37 +01:00
Eric Espie
07a61d5f0d N°8772 - AbstractFormIO and FormBinding tests 2025-11-17 17:26:47 +01:00
Eric Espie
047c820466 N°8772 - AbstractFormIO and FormBinding tests 2025-11-17 17:26:12 +01:00
jf-cbd
bc4d50dd0b ✏️ fix a typo 2025-11-17 17:14:15 +01:00
Vincent Dumas
e21a541b70 N°8533 - Impact Analysis, add icons and tooltips in shortcut_actions (#767)
* N°8533 - Impact Analysis, add icons and tooltips in shortcut_actions
2025-11-17 15:55:05 +01:00
v-dumas
ed360edb83 Fix PHP CS 2025-11-17 15:04:19 +01:00
Benjamin Dalsass
753d0acce4 N°8772 - dynamic form 2025-11-17 14:51:11 +01:00
Vincent Dumas
53de040934 N°8534 - Prevent Admin, SuperUser from loose of rights (#774)
* N°8534 - Prevent Admin & SuperUser from suicide
Prevent creation/modification of Administrator, SuperUser, REST User, combined with a Profile denying access to the backoffice
2025-11-17 14:17:18 +01:00
odain
b8345de553 Merge branch 'support/3.2' into develop 2025-11-16 08:15:29 +01:00
odain
fd10887849 N°8306 - ci fixes
php code style
2025-11-16 08:15:03 +01:00
odain
e09987e442 Merge branch 'support/3.2' into develop 2025-11-15 21:29:52 +01:00
odain
6d5660ca67 fix code style 2025-11-15 21:28:38 +01:00
odain
0013b8cfee Merge branch 'designer-3.2.1' into support/3.2 2025-11-15 21:27:37 +01:00
odain
7fb0ae48f9 Fix deprecated warning
<b>Deprecated</b>:  Return type of Combodo\iTop\DesignDocument::loadXML(string $source, int $options = 0) should either be compatible with DOMDocument::loadXML(string $source, int $options = 0): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in <b>/var/www/html/iTop/core/designdocument.class.inc.php</b> on line <b>73</b><br />
2025-11-15 21:26:36 +01:00
odain
e89a8edae0 N°8306 - fix MFEException use 2025-11-15 21:19:01 +01:00
Vincent Dumas
262cc3c206 N°5882 - AuditRule: Add Owner and Process (#775)
* N°5882 - Audit Rule: Add "Owner" and "Correction Process" fields
* Fix PHP CS
2025-11-14 17:04:25 +01:00
Eric Espie
51ebbc4274 N°8772 - Refactor 2025-11-14 16:42:42 +01:00
Eric Espie
3085023267 N°8772 - Error message 2025-11-14 16:24:18 +01:00
Eric Espie
e02fc9cb44 Merge dicos... 2025-11-14 16:14:34 +01:00
Eric Espie
ea95ae60a6 Merge remote-tracking branch 'origin/develop' into feature/8772_form_dependencies_manager 2025-11-14 16:08:37 +01:00
Eric Espie
b9d905ad1b N°8772 - refactor 2025-11-14 15:57:17 +01:00
Eric Espie
5b114285cc N°8772 - Error message 2025-11-14 15:39:16 +01:00
Eric Espie
b34566076e N°8772 - Form Expressions using iTop Expressions 2025-11-14 15:33:47 +01:00
Benjamin Dalsass
750b2b9cfa Merge remote-tracking branch 'origin/feature/8772_form_dependencies_manager' into feature/8772_form_dependencies_manager 2025-11-14 14:32:56 +01:00
Benjamin Dalsass
bdde63a39c N°8772 - dynamic form 2025-11-14 14:30:50 +01:00
Eric Espie
891df6ab1c N°8772 - Expressions inputs are now :input instead of [[input]] (and quotes are added automatically) 2025-11-14 14:05:22 +01:00
Benjamin Dalsass
dc1ce2dc64 Merge remote-tracking branch 'origin/feature/8772_form_dependencies_manager' into feature/8772_form_dependencies_manager
# Conflicts:
#	lib/composer/autoload_classmap.php
#	lib/composer/autoload_static.php
#	sources/Forms/Block/Base/ChoiceFormBlock.php
#	sources/Forms/IO/Format/StringIOFormat.php
2025-11-14 10:53:42 +01:00
Benjamin Dalsass
e5058fb8f7 N°8772 - dynamic form 2025-11-14 10:50:57 +01:00
Eric Espie
f68082da96 N°8772 - Dashlet group by 2025-11-13 17:10:39 +01:00
jf-cbd
7733f13d14 Add Tom-Select lib 2025-11-13 16:43:49 +01:00
Eric Espie
cef8fbc859 N°8772 - Dashlet group by 2025-11-13 16:42:04 +01:00
Eric Espie
36d49d3550 N°8772 - wip 2025-11-13 15:02:09 +01:00
Eric Espie
c2ec3a9f02 N°8772 - remove unused class 2025-11-13 09:36:36 +01:00
Benjamin Dalsass
4d159ea3f1 Merge remote-tracking branch 'origin/feature/8772_form_dependencies_manager' into feature/8772_form_dependencies_manager 2025-11-12 17:11:29 +01:00
Benjamin Dalsass
5cacfcb754 N°8772 - dynamic form 2025-11-12 17:09:40 +01:00
Eric Espie
101b1b217e N°8772 - remove debug if not wanted like in config edition 2025-11-12 14:23:19 +01:00
Eric Espie
5af8adf7ce N°8772 - fix debug display 2025-11-12 13:07:37 +01:00
Benjamin Dalsass
3d2485a004 N°8772 - dynamic form 2025-11-12 09:33:29 +01:00
Benjamin Dalsass
cbb0e2ef7e N°8772 - dynamic form 2025-11-12 08:33:28 +01:00
Benjamin Dalsass
7095e5e959 Merge remote-tracking branch 'origin/feature/8772_form_dependencies_manager' into feature/8772_form_dependencies_manager 2025-11-12 08:24:04 +01:00
Benjamin Dalsass
7fd27913f4 N°8772 - dynamic form 2025-11-12 08:20:17 +01:00
Eric Espie
cfdf4121d3 N°8772 - Dynamic debug and error 2025-11-07 11:24:31 +01:00
Benjamin Dalsass
a448f668bc N°8772 - dynamic form 2025-11-07 11:00:15 +01:00
Eric Espie
b6ec29c6ec N°8772 - ExpressionFormBlock WIP 2025-11-06 17:12:25 +01:00
Eric Espie
03c37f2021 N°8772 - Fix IO tests 2025-11-05 16:54:18 +01:00
Benjamin Dalsass
5b7a1ee44f N°8772 - dynamic form 2025-11-05 15:52:23 +01:00
Eric Espie
9ea546ebf6 N°8772 - Turbo + Collections WIP 2025-11-05 11:19:03 +01:00
Eric Espie
8fdad7997e N°8772 - Turbo Ok 2025-11-05 10:15:58 +01:00
Eric Espie
b3ed7f4f5b N°8772 - UIBlocks 2025-11-04 17:36:44 +01:00
jf-cbd
4f4ba7167d WIP 2025-11-04 17:02:56 +01:00
Eric Espie
a092b65be7 N°8772 - WIP dependencies - Does not work yet 2025-11-04 15:22:14 +01:00
Eric Espie
5a1f6ffde9 N°8772 - WIP dependencies - Does not work yet 2025-11-04 09:05:29 +01:00
Benjamin Dalsass
0909ddfb3a N°8772 - dynamic form 2025-11-03 14:01:32 +01:00
Benjamin Dalsass
20da9664c2 N°8772 - dynamic form 2025-11-03 13:50:07 +01:00
Benjamin Dalsass
68d2038488 N°8772 - dynamic form 2025-11-03 13:47:07 +01:00
Eric Espie
4c9373d034 N°8772 - Fix error 2025-11-03 10:07:49 +01:00
Eric Espie
0d7ccd7d82 N°8772 - Moved debug forms 2025-10-31 16:48:06 +01:00
jf-cbd
077c48870f Merge remote-tracking branch 'origin/feature/8772_form_dependencies_manager' into feature/8772_form_dependencies_manager 2025-10-31 16:44:03 +01:00
jf-cbd
5df44b8a18 Remove .compilation-symlinks 2025-10-31 16:42:30 +01:00
Eric Espie
d4415d6c3a N°8772 - some tests 2025-10-31 14:35:44 +01:00
Eric Espie
0196765eb6 N°8772 - automatic dependency in controller WIP 2025-10-31 08:58:50 +01:00
Eric Espie
45e4d9239c N°8772 - automatic dependency in controller WIP 2025-10-31 08:55:45 +01:00
Eric Espie
0df54413b3 N°8772 - cleanup code 2025-10-30 14:24:09 +01:00
Eric Espie
601cde0e2d N°8772 - Traditional parameters declaration 2025-10-30 14:16:36 +01:00
Eric Espie
4c10cfee60 N°8772 - Errors & turbo 2025-10-30 11:53:29 +01:00
Eric Espie
7a6f36b395 N°8772 - Debug & turbo 2025-10-30 10:00:12 +01:00
Eric Espie
06dbdcb5cd N°8772 - Turbo WIP 2025-10-29 16:52:19 +01:00
Benjamin Dalsass
c00bcbcd81 Merge remote-tracking branch 'origin/feature/8772_form_dependencies_manager' into feature/8772_form_dependencies_manager 2025-10-29 14:00:08 +01:00
Eric Espie
1394edc111 N°8772 - Turbo WIP
N°8772 - Twig factorization
2025-10-29 13:59:35 +01:00
Benjamin Dalsass
8582e89b8c Merge remote-tracking branch 'origin/feature/8772_form_dependencies_manager' into feature/8772_form_dependencies_manager
# Conflicts:
#	sources/Forms/Block/AbstractFormBlock.php
#	sources/Forms/Block/DataModel/AttributeValueChoiceFormBlock.php
#	templates/application/forms/itop_console_layout.html.twig
2025-10-29 13:31:02 +01:00
Benjamin Dalsass
6952bfa978 N°8771 - Add Symfony form component to iTop core
- IO debug
2025-10-29 13:14:15 +01:00
Eric Espie
98048219e7 N°8772 - Twig factorization 2025-10-29 09:31:40 +01:00
Eric Espie
8134d9a592 N°8772 - Form turbo stream WIP 2025-10-28 16:41:59 +01:00
Eric Espie
2a3de68652 N°8772 - Form turbo stream WIP 2025-10-28 15:34:19 +01:00
Benjamin Dalsass
5d335b39d2 N°8771 - Add Symfony form component to iTop core
- IO debug
2025-10-28 15:22:29 +01:00
Eric Espie
c2fcf4144b N°8772 - Sub-forms WIP 2025-10-24 16:56:45 +02:00
Eric Espie
675db85131 N°8772 - log for exception 2025-10-24 15:44:41 +02:00
Benjamin Dalsass
212309e938 N°8771 - Add Symfony form component to iTop core
- IO debug
2025-10-24 15:42:33 +02:00
Benjamin Dalsass
a4fbe90579 N°8771 - Add Symfony form component to iTop core
- IO debug
2025-10-24 15:36:51 +02:00
Benjamin Dalsass
eb3c5e4eee N°8771 - Add Symfony form component to iTop core
- IO debug
2025-10-24 14:46:59 +02:00
Benjamin Dalsass
33c03f9493 N°8771 - Add Symfony form component to iTop core
- IO debug
2025-10-24 09:29:53 +02:00
Benjamin Dalsass
243a525e15 N°8771 - Add Symfony form component to iTop core
- IO debug
2025-10-24 08:56:04 +02:00
Benjamin Dalsass
a1025ac837 N°8771 - Add Symfony form component to iTop core
- IO
2025-10-24 08:35:10 +02:00
Benjamin Dalsass
7708f8e00e N°8771 - Add Symfony form component to iTop core
- IO
2025-10-24 07:54:51 +02:00
Benjamin Dalsass
a51272f107 N°8771 - Add Symfony form component to iTop core
- IO
2025-10-24 07:15:35 +02:00
Benjamin Dalsass
5582afe5ae N°8771 - Add Symfony form component to iTop core
- add licence info
2025-10-24 06:37:22 +02:00
Eric Espie
21b786e0fa N°8772 - Form dependencies manager implementation - WIP 2025-10-23 16:57:35 +02:00
Eric Espie
fd449d195d N°8772 - Form dependencies manager implementation - WIP 2025-10-23 15:11:14 +02:00
Eric Espie
98c0b11db7 N°8772 - Form dependencies manager implementation - WIP 2025-10-23 13:51:24 +02:00
Benjamin Dalsass
8c3543363e N°8771 - Add Symfony form component to iTop core
- WIP
2025-10-23 13:29:04 +02:00
Benjamin Dalsass
5dea3f5299 N°8771 - Add Symfony form component to iTop core
- WIP
2025-10-23 12:11:02 +02:00
Benjamin Dalsass
239814a38c N°8771 - Add Symfony form component to iTop core
- restore branch
2025-10-23 11:28:01 +02:00
Benjamin Dalsass
c4e2cc6c1c Merge remote-tracking branch 'origin/develop' into feature/8772_form_dependencies_manager
# Conflicts:
#	sources/Application/TwigBase/Controller/Controller.php
2025-10-23 11:14:24 +02:00
Benjamin Dalsass
ee745f8be9 N°8772 - Form dependencies manager implementation
- turbo implementation
2025-10-23 11:11:51 +02:00
Benjamin Dalsass
1a4a64cec1 N°8772 - Form dependencies manager implementation 2025-10-23 11:11:39 +02:00
Benjamin Dalsass
834d4d461b N°8771 - Add Symfony form component to iTop core
- restore $aAdditionalPaths missing parameter
2025-10-23 11:10:59 +02:00
Eric Espie
5df73f5820 N°8781 - Improve twig base controller render error report 2025-10-23 11:10:54 +02:00
odain
c83d998924 N°4058 - fix PHP Deprecated base64_decodestrlen : Passing nul 2025-10-23 11:10:17 +02:00
Stephen Abello
ccdfbbe0bf N°8701 - Fix class icon alt text displaying in portal tile when there's no icon defined 2025-10-23 11:10:17 +02:00
Benjamin Dalsass
0dae7346d1 N°8772 - Form dependencies manager implementation
- turbo implementation
2025-10-20 15:16:44 +02:00
Benjamin Dalsass
cdfded766f N°8772 - Form dependencies manager implementation 2025-10-17 09:03:45 +02:00
483 changed files with 59439 additions and 428 deletions

View File

@@ -9,7 +9,7 @@ Any PRs not following the guidelines or with missing information will not be con
## Base information
| Question | Answer
|---------------------------------------------------------------|--------
| Related to a SourceForge thead / Another PR / Combodo ticket? | <!-- Put the URL -->
| Related to a SourceForge thread / Another PR / Combodo ticket? | <!-- Put the URL -->
| Type of change? | Bug fix / Enhancement / Translations

View File

@@ -536,6 +536,7 @@ class UserRightsProfile extends UserRightsAddOnAPI
// Cache
$this->m_aObjectActionGrants = [];
$this->m_aAdministrators = null;
$this->aUsersProfilesList = [];
}
public function LoadCache()

View File

@@ -48,7 +48,7 @@ class AuditCategory extends cmdbAbstractObject
MetaModel::Init_AddAttribute(new AttributeString("name", ["description" => "Short name for this category", "allowed_values" => null, "sql" => "name", "default_value" => "", "is_null_allowed" => false, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeString("description", ["allowed_values" => null, "sql" => "description", "default_value" => "", "is_null_allowed" => true, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeOQL("definition_set", ["allowed_values" => null, "sql" => "definition_set", "default_value" => "", "is_null_allowed" => false, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeLinkedSet("rules_list", ["linked_class" => "AuditRule", "ext_key_to_me" => "category_id", "allowed_values" => null, "count_min" => 0, "count_max" => 0, "depends_on" => [], "edit_mode" => LINKSET_EDITMODE_INPLACE, "tracking_level" => LINKSET_TRACKING_ALL]));
MetaModel::Init_AddAttribute(new AttributeLinkedSet("rules_list", ["linked_class" => "AuditRule", "ext_key_to_me" => "category_id", "allowed_values" => null, "count_min" => 0, "count_max" => 0, "depends_on" => [], "edit_mode" => LINKSET_EDITMODE_INPLACE, "edit_when" => LINKSET_EDITWHEN_ALWAYS, "tracking_level" => LINKSET_TRACKING_ALL]));
MetaModel::Init_AddAttribute(new AttributeInteger("ok_error_tolerance", ["allowed_values" => null, "sql" => "ok_error_tolerance", "default_value" => 5, "is_null_allowed" => true, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeInteger("warning_error_tolerance", ["allowed_values" => null, "sql" => "warning_error_tolerance", "default_value" => 25, "is_null_allowed" => true, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect(

View File

@@ -52,13 +52,14 @@ class AuditRule extends cmdbAbstractObject
MetaModel::Init_AddAttribute(new AttributeEnum("valid_flag", ["allowed_values" => new ValueSetEnum('true,false'), "sql" => "valid_flag", "default_value" => "true", "is_null_allowed" => false, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeExternalKey("category_id", ["allowed_values" => null, "sql" => "category_id", "targetclass" => "AuditCategory", "is_null_allowed" => false, "on_target_delete" => DEL_MANUAL, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeExternalField("category_name", ["allowed_values" => null, "extkey_attcode" => 'category_id', "target_attcode" => "name"]));
MetaModel::Init_AddAttribute(new AttributeExternalKey("contact_id", ["allowed_values" => null, "sql" => "contact_id", "targetclass" => "Contact", "is_null_allowed" => true, "on_target_delete" => DEL_MANUAL, "depends_on" => []]));
MetaModel::Init_AddAttribute(new AttributeHTML("process", ["allowed_values" => null, "sql" => "process", "default_value" => "", "is_null_allowed" => true, "depends_on" => []]));
// Display lists
MetaModel::Init_SetZListItems('details', ['category_id', 'name', 'description', 'query', 'valid_flag']); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', ['category_id', 'description', 'valid_flag']); // Attributes to be displayed for a list
MetaModel::Init_SetZListItems('details', ['category_id', 'name', 'description', 'query', 'valid_flag', 'process', 'contact_id']); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', ['category_id', 'description', 'query']); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', ['category_id', 'name', 'description', 'valid_flag', 'query']); // Criteria of the std search form
MetaModel::Init_SetZListItems('default_search', ['name', 'description', 'category_id']); // Criteria of the advanced search form
MetaModel::Init_SetZListItems('default_search', ['name', 'description', 'category_id', 'contact_id', 'query']); // Criteria of the advanced search form
}
public static function GetShortcutActions($sFinalClass)

View File

@@ -2000,13 +2000,13 @@ class MenuBlock extends DisplayBlock
$this->AddMenuSeparator($aRegularActions);
foreach ($aRelations as $sRelationCode => $aRelationInfo) {
if (array_key_exists('down', $aRelationInfo)) {
$aRegularActions[$sRelationCode.'_down'] = [
$aRegularActions['UI:Menu:'.$sRelationCode.'_down'] = [
'label' => $aRelationInfo['down'],
'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=down&class=$sClass&id=$id{$sContext}",
] + $aActionParams;
}
if (array_key_exists('up', $aRelationInfo)) {
$aRegularActions[$sRelationCode.'_up'] = [
$aRegularActions['UI:Menu:'.$sRelationCode.'_up'] = [
'label' => $aRelationInfo['up'],
'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=up&class=$sClass&id=$id{$sContext}",
] + $aActionParams;
@@ -2251,6 +2251,16 @@ class MenuBlock extends DisplayBlock
$sIconClass = 'fas fa-file-pdf fa-lg';
$sLabel = '';
break;
case 'UI:Menu:impacts_up':
$sIconClass = 'fas fa-sitemap fa-rotate-180';
$sLabel = '';
$aAction['tooltip'] = Dict::S('Relation:impacts/UpStream');
break;
case 'UI:Menu:impacts_down':
$sIconClass = 'fas fa-sitemap';
$sLabel = '';
$aAction['tooltip'] = Dict::S('Relation:impacts/DownStream');
break;
default:
if (isset($aAction['icon_class']) && (strlen($aAction['icon_class']) > 0)) {

View File

@@ -1,4 +1,5 @@
<?php
/*
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
@@ -9,5 +10,4 @@
*/
class CoreOqlException extends CoreException
{
}

View File

@@ -1,4 +1,5 @@
<?php
/*
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
@@ -9,5 +10,4 @@
*/
class CoreOqlMultipleResultsForbiddenException extends CoreOqlException
{
}

View File

@@ -71,12 +71,9 @@ class DesignDocument extends DOMDocument
}
/**
* @param string $source
* @param int $options
*
* @return bool|\DOMDocument
* @inheritDoc
*/
public function loadXML(string $source, int $options = 0): bool|DOMDocument
public function loadXML(string $source, int $options = 0): bool
{
return parent::loadXML($source, $options | LIBXML_BIGLINES);
}

View File

@@ -691,6 +691,13 @@ abstract class LogAPI
static::$m_oMockMetaModelConfig = $oMetaModelConfig;
}
public static function Exception(string $sMessage, throwable $previous, string $sChannel = null, array $aContext = []): void
{
$aContext['Error Message'] = $previous->getMessage();
$aContext['Stack Trace'] = $previous->getTraceAsString();
static::Error($sMessage, $sChannel, $aContext);
}
public static function Error($sMessage, $sChannel = null, $aContext = [])
{
static::Log(self::LEVEL_ERROR, $sMessage, $sChannel, $aContext);

View File

@@ -148,7 +148,7 @@ class ModelReflectionRuntime extends ModelReflection
$sAttributeClass = get_class($oAttDef);
if ($aScope != null) {
foreach ($aScope as $sScopeClass) {
if (($sAttributeClass == $sScopeClass) || is_subclass_of($sAttributeClass, $sScopeClass)) {
if (is_a($sAttributeClass, $sScopeClass, true)) {
$aAttributes[$sAttCode] = $sAttributeClass;
break;
}

View File

@@ -2103,12 +2103,18 @@ class VariableExpression extends UnaryExpression
/**
* Evaluate the value of the expression
*
* @param array $aArgs
* @throws \Exception if terms cannot be evaluated as scalars
*/
*
* @return mixed
* @throws \MissingQueryArgument
*/
public function Evaluate(array $aArgs)
{
throw new Exception('not implemented yet');
if (!isset($aArgs[$this->m_sName])) {
throw new MissingQueryArgument('Missing variable expression argument', array('expecting'=>$this->m_sName));
}
return $aArgs[$this->m_sName];
}
/**

View File

@@ -57,15 +57,15 @@ class OqlName
{
return $this->m_iPos;
}
public function __toString()
{
return $this->m_sValue;
}
}
}
/**
*
*
* Store hexadecimal values as strings so that we can support 64-bit values
*
*/
@@ -77,12 +77,12 @@ class OqlHexValue
{
$this->m_sValue = $sValue;
}
public function __toString()
{
return $this->m_sValue;
}
}
class OqlJoinSpec
@@ -109,6 +109,7 @@ class OqlJoinSpec
{
return $this->m_oClass->GetValue();
}
public function GetClassAlias()
{
return $this->m_oClassAlias->GetValue();
@@ -118,6 +119,7 @@ class OqlJoinSpec
{
return $this->m_oClass;
}
public function GetClassAliasDetails()
{
return $this->m_oClassAlias;
@@ -127,10 +129,12 @@ class OqlJoinSpec
{
return $this->m_oLeftField;
}
public function GetRightField()
{
return $this->m_oRightField;
}
public function GetOperator()
{
return $this->m_sOperator;
@@ -146,8 +150,9 @@ interface CheckableExpression
* @param ModelReflection $oModelReflection MetaModel to consider
* @param array $aAliases Aliases to class names (for the current query)
* @param string $sSourceQuery For the reporting
*
* @throws OqlNormalizeException
*/
*/
public function Check(ModelReflection $oModelReflection, $aAliases, $sSourceQuery);
}
@@ -168,13 +173,11 @@ class MatchOqlExpression extends MatchExpression implements CheckableExpression
$this->m_oRightExpr->Check($oModelReflection, $aAliases, $sSourceQuery);
// Only field MATCHES scalar is allowed
if (!$this->m_oLeftExpr instanceof FieldExpression)
{
if (!$this->m_oLeftExpr instanceof FieldExpression) {
throw new OqlNormalizeException('Only "field MATCHES string" syntax is allowed', $sSourceQuery, new OqlName($this->m_oLeftExpr->RenderExpression(true), 0));
}
// Only field MATCHES scalar is allowed
if (!$this->m_oRightExpr instanceof ScalarExpression && !$this->m_oRightExpr instanceof VariableOqlExpression)
{
if (!$this->m_oRightExpr instanceof ScalarExpression && !$this->m_oRightExpr instanceof VariableOqlExpression) {
throw new OqlNormalizeException('Only "field MATCHES string" syntax is allowed', $sSourceQuery, new OqlName($this->m_oRightExpr->RenderExpression(true), 0));
}
}
@@ -198,7 +201,7 @@ class NestedQueryOqlExpression extends NestedQueryExpression implements Checkabl
*
* @param OQLObjectQuery $oOQLObjectQuery
*/
public function __construct($oOQLObjectQuery )
public function __construct($oOQLObjectQuery)
{
parent::__construct($oOQLObjectQuery->ToDBSearch(""));
$this->m_oOQLObjectQuery = $oOQLObjectQuery;
@@ -232,8 +235,7 @@ class FieldOqlExpression extends FieldExpression implements CheckableExpression
public function __construct($oName, $oParent = null)
{
if (is_null($oParent))
{
if (is_null($oParent)) {
$oParent = new OqlName('', 0);
}
$this->m_oParent = $oParent;
@@ -256,37 +258,28 @@ class FieldOqlExpression extends FieldExpression implements CheckableExpression
{
$sClassAlias = $this->GetParent();
$sFltCode = $this->GetName();
if (empty($sClassAlias))
{
if (empty($sClassAlias)) {
// Try to find an alias
// Build an array of field => array of aliases
$aFieldClasses = array();
foreach($aAliases as $sAlias => $sReal)
{
foreach($oModelReflection->GetFiltersList($sReal) as $sAnFltCode)
{
foreach ($aAliases as $sAlias => $sReal) {
foreach ($oModelReflection->GetFiltersList($sReal) as $sAnFltCode) {
$aFieldClasses[$sAnFltCode][] = $sAlias;
}
}
if (!array_key_exists($sFltCode, $aFieldClasses))
{
if (!array_key_exists($sFltCode, $aFieldClasses)) {
throw new OqlNormalizeException('Unknown filter code', $sSourceQuery, $this->GetNameDetails(), array_keys($aFieldClasses));
}
if (count($aFieldClasses[$sFltCode]) > 1)
{
if (count($aFieldClasses[$sFltCode]) > 1) {
throw new OqlNormalizeException('Ambiguous filter code', $sSourceQuery, $this->GetNameDetails());
}
$sClassAlias = $aFieldClasses[$sFltCode][0];
}
else
{
if (!array_key_exists($sClassAlias, $aAliases))
{
} else {
if (!array_key_exists($sClassAlias, $aAliases)) {
throw new OqlNormalizeException('Unknown class [alias]', $sSourceQuery, $this->GetParentDetails(), array_keys($aAliases));
}
$sClass = $aAliases[$sClassAlias];
if (!$oModelReflection->IsValidFilterCode($sClass, $sFltCode))
{
if (!$oModelReflection->IsValidFilterCode($sClass, $sFltCode)) {
throw new OqlNormalizeException('Unknown filter code', $sSourceQuery, $this->GetNameDetails(), $oModelReflection->GetFiltersList($sClass));
}
}
@@ -305,8 +298,7 @@ class ListOqlExpression extends ListExpression implements CheckableExpression
{
public function Check(ModelReflection $oModelReflection, $aAliases, $sSourceQuery)
{
foreach ($this->GetItems() as $oItemExpression)
{
foreach ($this->GetItems() as $oItemExpression) {
$oItemExpression->Check($oModelReflection, $aAliases, $sSourceQuery);
}
}
@@ -316,8 +308,7 @@ class FunctionOqlExpression extends FunctionExpression implements CheckableExpre
{
public function Check(ModelReflection $oModelReflection, $aAliases, $sSourceQuery)
{
foreach ($this->GetArgs() as $oArgExpression)
{
foreach ($this->GetArgs() as $oArgExpression) {
$oArgExpression->Check($oModelReflection, $aAliases, $sSourceQuery);
}
}
@@ -350,6 +341,7 @@ abstract class OqlQuery
* Determine the class
*
* @param ModelReflection $oModelReflection MetaModel to consider
*
* @return string
* @throws Exception
*/
@@ -392,6 +384,7 @@ class OqlObjectQuery extends OqlQuery
* Determine the class
*
* @param ModelReflection $oModelReflection MetaModel to consider
*
* @return string
* @throws Exception
*/
@@ -415,6 +408,7 @@ class OqlObjectQuery extends OqlQuery
{
return $this->m_oClass;
}
public function GetClassAliasDetails()
{
return $this->m_oClassAlias;
@@ -424,6 +418,7 @@ class OqlObjectQuery extends OqlQuery
{
return $this->m_aJoins;
}
public function GetCondition()
{
return $this->m_oCondition;
@@ -432,44 +427,37 @@ class OqlObjectQuery extends OqlQuery
/**
* Recursively check the validity of the expression with regard to the data model
* and the query in which it is used
*
* @param ModelReflection $oModelReflection MetaModel to consider
*
* @param ModelReflection $oModelReflection MetaModel to consider
*
* @throws OqlNormalizeException
*/
*/
public function Check(ModelReflection $oModelReflection, $sSourceQuery, $aParentAliases = array())
{
$sClass = $this->GetClass($oModelReflection);
$sClassAlias = $this->GetClassAlias();
if (!$oModelReflection->IsValidClass($sClass))
{
if (!$oModelReflection->IsValidClass($sClass)) {
throw new UnknownClassOqlException($sSourceQuery, $this->GetClassDetails(), $oModelReflection->GetClasses());
}
$aAliases = array_merge(array($sClassAlias => $sClass),$aParentAliases);
$aAliases = array_merge(array($sClassAlias => $sClass), $aParentAliases);
$aJoinSpecs = $this->GetJoins();
if (is_array($aJoinSpecs))
{
foreach ($aJoinSpecs as $oJoinSpec)
{
if (is_array($aJoinSpecs)) {
foreach ($aJoinSpecs as $oJoinSpec) {
$sJoinClass = $oJoinSpec->GetClass();
$sJoinClassAlias = $oJoinSpec->GetClassAlias();
if (!$oModelReflection->IsValidClass($sJoinClass))
{
if (!$oModelReflection->IsValidClass($sJoinClass)) {
throw new UnknownClassOqlException($sSourceQuery, $oJoinSpec->GetClassDetails(), $oModelReflection->GetClasses());
}
if (array_key_exists($sJoinClassAlias, $aAliases))
{
if ($sJoinClassAlias != $sJoinClass)
{
if (array_key_exists($sJoinClassAlias, $aAliases)) {
if ($sJoinClassAlias != $sJoinClass) {
throw new OqlNormalizeException('Duplicate class alias', $sSourceQuery, $oJoinSpec->GetClassAliasDetails());
}
else
{
} else {
throw new OqlNormalizeException('Duplicate class name', $sSourceQuery, $oJoinSpec->GetClassDetails());
}
}
}
// Assumption: ext key on the left only !!!
// normalization should take care of this
@@ -480,85 +468,74 @@ class OqlObjectQuery extends OqlQuery
$oRightField = $oJoinSpec->GetRightField();
$sToClass = $oRightField->GetParent();
$sPKeyDescriptor = $oRightField->GetName();
if ($sPKeyDescriptor != 'id')
{
if ($sPKeyDescriptor != 'id') {
throw new OqlNormalizeException('Wrong format for Join clause (right hand), expecting an id', $sSourceQuery, $oRightField->GetNameDetails(), array('id'));
}
$aAliases[$sJoinClassAlias] = $sJoinClass;
if (!array_key_exists($sFromClass, $aAliases))
{
if (!array_key_exists($sFromClass, $aAliases)) {
throw new OqlNormalizeException('Unknown class in join condition (left expression)', $sSourceQuery, $oLeftField->GetParentDetails(), array_keys($aAliases));
}
if (!array_key_exists($sToClass, $aAliases))
{
if (!array_key_exists($sToClass, $aAliases)) {
throw new OqlNormalizeException('Unknown class in join condition (right expression)', $sSourceQuery, $oRightField->GetParentDetails(), array_keys($aAliases));
}
$aExtKeys = $oModelReflection->ListAttributes($aAliases[$sFromClass], \Combodo\iTop\Core\AttributeDefinition\AttributeExternalKey::class);
$aObjKeys = $oModelReflection->ListAttributes($aAliases[$sFromClass], \Combodo\iTop\Core\AttributeDefinition\AttributeObjectKey::class);
$aAllKeys = array_merge($aExtKeys, $aObjKeys);
if (!array_key_exists($sExtKeyAttCode, $aAllKeys))
{
if (!array_key_exists($sExtKeyAttCode, $aAllKeys)) {
throw new OqlNormalizeException('Unknown key in join condition (left expression)', $sSourceQuery, $oLeftField->GetNameDetails(), array_keys($aAllKeys));
}
if ($sFromClass == $sJoinClassAlias)
{
if ($sFromClass == $sJoinClassAlias) {
if (array_key_exists($sExtKeyAttCode, $aExtKeys)) // Skip that check for object keys
{
$sTargetClass = $oModelReflection->GetAttributeProperty($aAliases[$sFromClass], $sExtKeyAttCode, 'targetclass');
if(!$oModelReflection->IsSameFamilyBranch($aAliases[$sToClass], $sTargetClass))
{
if (!$oModelReflection->IsSameFamilyBranch($aAliases[$sToClass], $sTargetClass)) {
throw new OqlNormalizeException("The joined class ($aAliases[$sFromClass]) is not compatible with the external key, which is pointing to $sTargetClass", $sSourceQuery, $oLeftField->GetNameDetails());
}
}
}
else
{
} else {
$sOperator = $oJoinSpec->GetOperator();
switch($sOperator)
{
switch ($sOperator) {
case '=':
$iOperatorCode = TREE_OPERATOR_EQUALS;
break;
$iOperatorCode = TREE_OPERATOR_EQUALS;
break;
case 'BELOW':
$iOperatorCode = TREE_OPERATOR_BELOW;
break;
$iOperatorCode = TREE_OPERATOR_BELOW;
break;
case 'BELOW_STRICT':
$iOperatorCode = TREE_OPERATOR_BELOW_STRICT;
break;
$iOperatorCode = TREE_OPERATOR_BELOW_STRICT;
break;
case 'NOT_BELOW':
$iOperatorCode = TREE_OPERATOR_NOT_BELOW;
break;
$iOperatorCode = TREE_OPERATOR_NOT_BELOW;
break;
case 'NOT_BELOW_STRICT':
$iOperatorCode = TREE_OPERATOR_NOT_BELOW_STRICT;
break;
$iOperatorCode = TREE_OPERATOR_NOT_BELOW_STRICT;
break;
case 'ABOVE':
$iOperatorCode = TREE_OPERATOR_ABOVE;
break;
$iOperatorCode = TREE_OPERATOR_ABOVE;
break;
case 'ABOVE_STRICT':
$iOperatorCode = TREE_OPERATOR_ABOVE_STRICT;
break;
$iOperatorCode = TREE_OPERATOR_ABOVE_STRICT;
break;
case 'NOT_ABOVE':
$iOperatorCode = TREE_OPERATOR_NOT_ABOVE;
break;
$iOperatorCode = TREE_OPERATOR_NOT_ABOVE;
break;
case 'NOT_ABOVE_STRICT':
$iOperatorCode = TREE_OPERATOR_NOT_ABOVE_STRICT;
break;
$iOperatorCode = TREE_OPERATOR_NOT_ABOVE_STRICT;
break;
}
if (array_key_exists($sExtKeyAttCode, $aExtKeys)) // Skip that check for object keys
{
$sTargetClass = $oModelReflection->GetAttributeProperty($aAliases[$sFromClass], $sExtKeyAttCode, 'targetclass');
if(!$oModelReflection->IsSameFamilyBranch($aAliases[$sToClass], $sTargetClass))
{
if (!$oModelReflection->IsSameFamilyBranch($aAliases[$sToClass], $sTargetClass)) {
throw new OqlNormalizeException("The joined class ($aAliases[$sToClass]) is not compatible with the external key, which is pointing to $sTargetClass", $sSourceQuery, $oLeftField->GetNameDetails());
}
}
$aAttList = $oModelReflection->ListAttributes($aAliases[$sFromClass]);
$sAttType = $aAttList[$sExtKeyAttCode];
if(($iOperatorCode != TREE_OPERATOR_EQUALS) && !is_subclass_of($sAttType, \Combodo\iTop\Core\AttributeDefinition\AttributeHierarchicalKey::class) && ($sAttType != \Combodo\iTop\Core\AttributeDefinition\AttributeHierarchicalKey::class))
{
if (($iOperatorCode != TREE_OPERATOR_EQUALS) && !is_a($sAttType, \Combodo\iTop\Core\AttributeDefinition\AttributeHierarchicalKey::class, true)) {
throw new OqlNormalizeException("The specified tree operator $sOperator is not applicable to the key", $sSourceQuery, $oLeftField->GetNameDetails());
}
}
@@ -567,26 +544,23 @@ class OqlObjectQuery extends OqlQuery
// Check the select information
//
foreach ($this->GetSelectedClasses() as $oClassDetails)
{
foreach ($this->GetSelectedClasses() as $oClassDetails) {
$sClassToSelect = $oClassDetails->GetValue();
if (!array_key_exists($sClassToSelect, $aAliases))
{
if (!array_key_exists($sClassToSelect, $aAliases)) {
throw new OqlNormalizeException('Unknown class [alias]', $sSourceQuery, $oClassDetails, array_keys($aAliases));
}
}
// Check the condition tree
//
if ($this->m_oCondition instanceof Expression)
{
if ($this->m_oCondition instanceof Expression) {
$this->m_oCondition->Check($oModelReflection, $aAliases, $sSourceQuery);
}
}
/**
* Make the relevant DBSearch instance (FromOQL)
*/
*/
public function ToDBSearch($sQuery)
{
$sClass = $this->GetClass(new ModelReflectionRuntime());
@@ -594,6 +568,7 @@ class OqlObjectQuery extends OqlQuery
$oSearch = new DBObjectSearch($sClass, $sClassAlias);
$oSearch->InitFromOqlQuery($this, $sQuery);
return $oSearch;
}
}
@@ -606,19 +581,15 @@ class OqlUnionQuery extends OqlQuery
{
parent::__construct();
$this->aQueries[] = $oLeftQuery;
if ($oRightQueryOrUnion instanceof OqlUnionQuery)
{
foreach ($oRightQueryOrUnion->GetQueries() as $oSingleQuery)
{
if ($oRightQueryOrUnion instanceof OqlUnionQuery) {
foreach ($oRightQueryOrUnion->GetQueries() as $oSingleQuery) {
$this->aQueries[] = $oSingleQuery;
}
}
else
{
} else {
$this->aQueries[] = $oRightQueryOrUnion;
}
}
public function GetQueries()
{
return $this->aQueries;
@@ -627,66 +598,54 @@ class OqlUnionQuery extends OqlQuery
/**
* Check the validity of the expression with regard to the data model
* and the query in which it is used
*
* @param ModelReflection $oModelReflection MetaModel to consider
*
* @param ModelReflection $oModelReflection MetaModel to consider
*
* @throws OqlNormalizeException
*/
*/
public function Check(ModelReflection $oModelReflection, $sSourceQuery)
{
$aColumnToClasses = array();
foreach ($this->aQueries as $iQuery => $oQuery)
{
foreach ($this->aQueries as $iQuery => $oQuery) {
$oQuery->Check($oModelReflection, $sSourceQuery);
$aAliasToClass = array($oQuery->GetClassAlias() => $oQuery->GetClass($oModelReflection));
$aJoinSpecs = $oQuery->GetJoins();
if (is_array($aJoinSpecs))
{
foreach ($aJoinSpecs as $oJoinSpec)
{
if (is_array($aJoinSpecs)) {
foreach ($aJoinSpecs as $oJoinSpec) {
$aAliasToClass[$oJoinSpec->GetClassAlias()] = $oJoinSpec->GetClass();
}
}
$aSelectedClasses = $oQuery->GetSelectedClasses();
if ($iQuery != 0)
{
if (count($aSelectedClasses) < count($aColumnToClasses))
{
if ($iQuery != 0) {
if (count($aSelectedClasses) < count($aColumnToClasses)) {
$oLastClass = end($aSelectedClasses);
throw new OqlNormalizeException('Too few selected classes in the subquery', $sSourceQuery, $oLastClass);
}
if (count($aSelectedClasses) > count($aColumnToClasses))
{
if (count($aSelectedClasses) > count($aColumnToClasses)) {
$oLastClass = end($aSelectedClasses);
throw new OqlNormalizeException('Too many selected classes in the subquery', $sSourceQuery, $oLastClass);
}
}
foreach ($aSelectedClasses as $iColumn => $oClassDetails)
{
foreach ($aSelectedClasses as $iColumn => $oClassDetails) {
$sAlias = $oClassDetails->GetValue();
$sClass = $aAliasToClass[$sAlias];
$aColumnToClasses[$iColumn][] = array(
'alias' => $sAlias,
'class' => $sClass,
'alias' => $sAlias,
'class' => $sClass,
'class_name' => $oClassDetails,
);
}
}
foreach ($aColumnToClasses as $iColumn => $aClasses)
{
foreach ($aColumnToClasses as $iColumn => $aClasses) {
$sRootClass = null;
foreach ($aClasses as $iQuery => $aData)
{
if ($iQuery == 0)
{
foreach ($aClasses as $iQuery => $aData) {
if ($iQuery == 0) {
// Establish the reference
$sRootClass = $oModelReflection->GetRootClass($aData['class']);
}
else
{
if ($oModelReflection->GetRootClass($aData['class']) != $sRootClass)
{
} else {
if ($oModelReflection->GetRootClass($aData['class']) != $sRootClass) {
$aSubclasses = $oModelReflection->EnumChildClasses($sRootClass, ENUM_CHILD_CLASSES_ALL);
throw new OqlNormalizeException('Incompatible classes: could not find a common ancestor', $sSourceQuery, $aData['class_name'], $aSubclasses);
}
@@ -699,21 +658,21 @@ class OqlUnionQuery extends OqlQuery
* Determine the class
*
* @param ModelReflection $oModelReflection MetaModel to consider
*
* @return string
* @throws Exception
*/
public function GetClass(ModelReflection $oModelReflection)
{
$aFirstColClasses = array();
foreach ($this->aQueries as $iQuery => $oQuery)
{
foreach ($this->aQueries as $iQuery => $oQuery) {
$aFirstColClasses[] = $oQuery->GetClass($oModelReflection);
}
$sClass = self::GetLowestCommonAncestor($oModelReflection, $aFirstColClasses);
if (is_null($sClass))
{
if (is_null($sClass)) {
throw new Exception('Could not determine the class of the union query. This issue should have been detected earlier by calling OqlQuery::Check()');
}
return $sClass;
}
@@ -726,6 +685,7 @@ class OqlUnionQuery extends OqlQuery
public function GetClassAlias()
{
$sAlias = $this->aQueries[0]->GetClassAlias();
return $sAlias;
}
@@ -735,29 +695,25 @@ class OqlUnionQuery extends OqlQuery
*
* @param ModelReflection $oModelReflection MetaModel to consider
* @param array $aClasses Flat list of classes
*
* @return string the lowest common ancestor amongst classes, null if none has been found
* @throws Exception
*/
public static function GetLowestCommonAncestor(ModelReflection $oModelReflection, $aClasses)
{
$sAncestor = null;
foreach($aClasses as $sClass)
{
if (is_null($sAncestor))
{
foreach ($aClasses as $sClass) {
if (is_null($sAncestor)) {
// first loop
$sAncestor = $sClass;
}
elseif ($oModelReflection->GetRootClass($sClass) != $oModelReflection->GetRootClass($sAncestor))
{
} elseif ($oModelReflection->GetRootClass($sClass) != $oModelReflection->GetRootClass($sAncestor)) {
$sAncestor = null;
break;
}
else
{
} else {
$sAncestor = self::LowestCommonAncestor($oModelReflection, $sAncestor, $sClass);
}
}
return $sAncestor;
}
@@ -766,37 +722,32 @@ class OqlUnionQuery extends OqlQuery
*/
protected static function LowestCommonAncestor(ModelReflection $oModelReflection, $sClassA, $sClassB)
{
if ($sClassA == $sClassB)
{
if ($sClassA == $sClassB) {
$sRet = $sClassA;
}
elseif (in_array($sClassA, $oModelReflection->EnumChildClasses($sClassB)))
{
} elseif (in_array($sClassA, $oModelReflection->EnumChildClasses($sClassB))) {
$sRet = $sClassB;
}
elseif (in_array($sClassB, $oModelReflection->EnumChildClasses($sClassA)))
{
} elseif (in_array($sClassB, $oModelReflection->EnumChildClasses($sClassA))) {
$sRet = $sClassA;
}
else
{
} else {
// Recurse
$sRet = self::LowestCommonAncestor($oModelReflection, $sClassA, $oModelReflection->GetParentClass($sClassB));
}
return $sRet;
}
/**
* Make the relevant DBSearch instance (FromOQL)
*/
*/
public function ToDBSearch($sQuery)
{
$aSearches = array();
foreach ($this->aQueries as $oQuery)
{
foreach ($this->aQueries as $oQuery) {
$aSearches[] = $oQuery->ToDBSearch($sQuery);
}
$oSearch = new DBUnionSearch($aSearches);
return $oSearch;
}
}

View File

@@ -404,14 +404,14 @@ abstract class User extends cmdbAbstractObject
}
if (!in_array(ADMIN_PROFILE_NAME, $aProfiles)) {
// Check if the user is yet allowed to modify Users
// Prevent a User to lose the right to modify Users
if (method_exists($oAddon, 'ResetCache')) {
$aCurrentProfiles = Session::Get('profile_list');
// Set the current profiles into a session variable (not yet in the database)
Session::Set('profile_list', $aProfiles);
$oAddon->ResetCache();
if (!$oAddon->IsActionAllowed($this, 'User', UR_ACTION_MODIFY, null)) {
if (!$oAddon->IsActionAllowed($this, get_class($this), UR_ACTION_MODIFY, null)) {
$this->m_aCheckIssues[] = Dict::S('Class:User/Error:CurrentProfilesHaveInsufficientRights');
}
$oAddon->ResetCache();
@@ -422,6 +422,19 @@ abstract class User extends cmdbAbstractObject
Session::Set('profile_list', $aCurrentProfiles);
}
}
// Prevent an administrator to remove their own admin profile
if (UserRights::IsAdministrator($this)) {
$this->m_aCheckIssues[] = Dict::S('Class:User/Error:AdminProfileCannotBeRemovedBySelf');
}
}
} elseif ($this->IsPrivilegedUser()) {
// Prevent Privileged User to be saved with profiles denying the access to the backoffice
$oSet->Rewind();
while ($oUserProfile = $oSet->Fetch()) {
$sProfile = $oUserProfile->Get('profile');
if (in_array($sProfile, $aForbiddenProfiles)) {
$this->m_aCheckIssues[] = Dict::Format('Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice', $sProfile);
}
}
}
}
@@ -635,6 +648,21 @@ abstract class User extends cmdbAbstractObject
}
return UserRights::GetUserId() == $this->GetKey();
}
private function IsPrivilegedUser(): bool
{
$aPrivilegedProfiles = ['Administrator' => '1', 'REST Services User' => '1024', 'SuperUser' => '117'];
$oSet = $this->Get('profile_list');
$oSet->Rewind();
while ($oUserProfile = $oSet->Fetch()) {
$iProfile = $oUserProfile->Get('profileid');
if (in_array($iProfile, $aPrivilegedProfiles)) {
return true;
}
}
return false;
}
}
/**

View File

@@ -6,4 +6,51 @@
.ibo-prop-header {
@extend %ibo-font-size-150;
padding-bottom: 14px;
}
.help-text{
padding: 1px 5px;
background-color: #d7e3f8;
border: 1px solid #c6e7f5;
border-radius: 5px;
margin: 5px 0;
font-size: 0.9em;
}
.form-error ul{
padding: 1px 5px;
background-color: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: 5px;
margin: 5px 0;
font-size: 0.9em;
}
.subform{
background-color: #efefef;
border-radius: 5px;
padding: 10px;
}
.form-buttons{
margin: 20px 0;
}
.form select{
padding: 0;
overflow-y: auto;
}
.form select option{
height: 30px;
display: flex;
align-items: center;
}
.form[aria-busy="true"] {
opacity: .5;
}
.ibo-field legend{
margin-top: 24px;
}

View File

@@ -0,0 +1,3 @@
@import "../../../node_modules/tom-select/dist/scss/tom-select.scss";
$select-color-item-active-border: $ibo-input--focus--border-color;

View File

@@ -28,6 +28,7 @@ class ConfigEditorController extends Controller
public function __construct()
{
parent::__construct(MODULESROOT.static::MODULE_NAME.'/templates', static::MODULE_NAME);
$this->SetDebugAllowed(false);
}
public function OperationEdit(): void

View File

@@ -40,6 +40,8 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', [
'Class:AuditRule/Attribute:name+' => 'Krátký název pro toto pravidlo',
'Class:AuditRule/Attribute:description' => 'Popis pravidla',
'Class:AuditRule/Attribute:description+' => 'Dlouhý popis tohoto pravidla auditu',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Dotaz ke spuštění',
'Class:AuditRule/Attribute:query+' => 'OQL výraz ke spuštění',
'Class:AuditRule/Attribute:valid_flag' => 'Interpretace',
@@ -52,7 +54,9 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', [
'Class:AuditRule/Attribute:category_id+' => 'Kategorie pro toto pravidlo',
'Class:AuditRule/Attribute:category_name' => 'Kategorie',
'Class:AuditRule/Attribute:category_name+' => 'Název kategorie pro toto pravidlo',
]);
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
// Class: AuditDomain
@@ -164,9 +168,11 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', [
'Class:User/Attribute:status/Value:disabled' => 'Neaktivní',
'Class:User/Error:LoginMustBeUnique' => 'Uživatelské jméno musí být jedinečné - "%1s" je již použito.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Uživateli musí být přidělen alespoň jeden profil.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profil "%1$s" nemůže být přidán, byl by mu odepřen přístup do backoffice',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Změna není povolena pro vašeho vlastního uživatele',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Přístupné organizace musí obsahovat organizaci uživatele.',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'Aktuální seznam profilů neposkytuje dostatečná přístupová práva (uživatele již nelze upravovat)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'Profil Portal power user neposkytuje dostatečná přístupová práva (je třeba přidat jiný profil)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'Uživatel musí být přiřazen minimálně do jedné organizace.',

View File

@@ -40,6 +40,8 @@ Dict::Add('DA DA', 'Danish', 'Dansk', [
'Class:AuditRule/Attribute:name+' => 'Kort navn for denne regel',
'Class:AuditRule/Attribute:description' => 'Audit-regel beskrivelse',
'Class:AuditRule/Attribute:description+' => 'Udførlig beskrivelse af denne Audit-regel',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Søgning at udføre',
'Class:AuditRule/Attribute:query+' => 'Den OQL forespørgsel, der skal udføres',
'Class:AuditRule/Attribute:valid_flag' => 'Gyldige objekter?',
@@ -52,6 +54,8 @@ Dict::Add('DA DA', 'Danish', 'Dansk', [
'Class:AuditRule/Attribute:category_id+' => 'Kategori for denne regel',
'Class:AuditRule/Attribute:category_name' => 'Kategori',
'Class:AuditRule/Attribute:category_name+' => 'Kategorinavn for denne regel',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,10 +168,12 @@ Dict::Add('DA DA', 'Danish', 'Dansk', [
'Class:User/Attribute:status/Value:disabled' => 'Disabled~~',
'Class:User/Error:LoginMustBeUnique' => 'Login skal være entydig - "%1s" er allerede i brug.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Mindst en profil skal knyttes til denne bruger.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profile "%1$s" cannot be added it will deny the access to backoffice~~',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Changing status is not allowed for your own User~~',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Allowed organizations must contain User organization~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'The current list of profiles does not give sufficient access rights (Users are not modifiable anymore)~~',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'You cannot remove your own rights to edit Users~~',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'At least one organization must be assigned to this user.~~',
'Class:User/Error:OrganizationNotAllowed' => 'Organization not allowed.~~',

View File

@@ -40,6 +40,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', [
'Class:AuditRule/Attribute:name+' => 'Kurzname für diese Regel',
'Class:AuditRule/Attribute:description' => 'Beschreibung der Audit-Regel',
'Class:AuditRule/Attribute:description+' => 'Ausführliche Beschreibung dieser Audit-Regel',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Durchzuführende Abfrage',
'Class:AuditRule/Attribute:query+' => 'Die auszuführende OQL-Abfrage',
'Class:AuditRule/Attribute:valid_flag' => 'Gültiges Objekt?',
@@ -52,6 +54,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', [
'Class:AuditRule/Attribute:category_id+' => 'Kategorie für diese Regel',
'Class:AuditRule/Attribute:category_name' => 'Kategorie',
'Class:AuditRule/Attribute:category_name+' => 'Kategoriename für diese Regel',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -163,9 +167,11 @@ Dict::Add('DE DE', 'German', 'Deutsch', [
'Class:User/Attribute:status/Value:disabled' => 'Inaktiv',
'Class:User/Error:LoginMustBeUnique' => 'Login-Namen müssen unterschiedlich sein - "%1s" benutzt diesen Login-Name bereits.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Mindestens ein Profil muss diesem Benutzer zugewiesen sein.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profil "%1$s" kann nicht hinzugefügt werde, es verhindert den Zugriff auf das Backoffice.',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Statusänderungen sind für den eigenen Benutzer nicht erlaubt.',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Die Organisation des Benutzers muss in den erlaubten Organisationen enthalten sein.',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'Die aktuelle Liste an Profilen vergibt unzureichende Berechtigungen (Benutzer können nicht mehr geändert werden)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'Das Profil des Portal-Power-Benutzers hat nicht ausreichend Zugriffsrechte (ein weiteres Profil muss hinzugefügt werden)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'Mindestens eine Organisation muss diesem Benutzer zugewiesen sein.',

View File

@@ -50,7 +50,9 @@ It is applied on the scope of objects defined by the audit category',
'Class:AuditRule/Attribute:name' => 'Rule name',
'Class:AuditRule/Attribute:name+' => 'Short name for this rule',
'Class:AuditRule/Attribute:description' => 'Description',
'Class:AuditRule/Attribute:description+' => 'What is checked? How should it be fixed? Who should do it? ...',
'Class:AuditRule/Attribute:description+' => 'What is checked?',
'Class:AuditRule/Attribute:process' => 'Correction process',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...',
'Class:AuditRule/Attribute:query' => 'Query to run',
'Class:AuditRule/Attribute:query+' => 'The OQL expression to run. Returned classes must be aligned with those of the category\'s scope',
'Class:AuditRule/Attribute:valid_flag' => 'Returned objects: ',
@@ -65,6 +67,8 @@ It is applied on the scope of objects defined by the audit category',
'Class:AuditRule/Attribute:category_id+' => 'The category of this rule',
'Class:AuditRule/Attribute:category_name' => 'Category name',
'Class:AuditRule/Attribute:category_name+' => 'Name of the category of this rule',
'Class:AuditRule/Attribute:contact_id' => 'Owner',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule',
]);
//
@@ -173,15 +177,17 @@ Dict::Add('EN US', 'English', 'English', [
'Class:User/Attribute:allowed_org_list+' => 'The end user is allowed to see data belonging to the following organizations. If no organization is specified, there is no restriction.',
'Class:User/Attribute:status' => 'Status',
'Class:User/Attribute:status+' => 'Whether the user account is enabled or disabled.',
'Class:User/Attribute:status/Value:enabled' => 'Enabled',
'Class:User/Attribute:status/Value:enabled' => 'Enabled',
'Class:User/Attribute:status/Value:disabled' => 'Disabled',
'Class:User/Error:LoginMustBeUnique' => 'Login must be unique - "%1$s" is already being used.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'At least one profile must be assigned to this user.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)',
'Class:User/Error:ProfileNotAllowed' => 'Profile "%1$s" cannot be added it will deny the access to backoffice',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Changing status is not allowed for your own User',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Allowed organizations must contain User organization',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'The current list of profiles does not give sufficient access rights (Users are not modifiable anymore)',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'You cannot remove your own rights to edit Users',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'At least one organization must be assigned to this user.',
'Class:User/Error:OrganizationNotAllowed' => 'Organization not allowed.',
@@ -1327,6 +1333,7 @@ When associated with a trigger, each action is given an "order" number, specifyi
'UI:DashletGroupBy:Prop-GroupBy:DayOfMonth' => 'Day of month for %1$s',
'UI:DashletGroupBy:Prop-GroupBy:Select-Hour' => '%1$s (hour)',
'UI:DashletGroupBy:Prop-GroupBy:Select-Month' => '%1$s (month)',
'UI:DashletGroupBy:Prop-GroupBy:Select-Year' => '%1$s (year)',
'UI:DashletGroupBy:Prop-GroupBy:Select-DayOfWeek' => '%1$s (day of week)',
'UI:DashletGroupBy:Prop-GroupBy:Select-DayOfMonth' => '%1$s (day of month)',
'UI:DashletGroupBy:MissingGroupBy' => 'Please select the field on which the objects will be grouped together',

View File

@@ -50,7 +50,9 @@ It is applied on the scope of objects defined by the audit category',
'Class:AuditRule/Attribute:name' => 'Rule name',
'Class:AuditRule/Attribute:name+' => 'Short name for this rule',
'Class:AuditRule/Attribute:description' => 'Description',
'Class:AuditRule/Attribute:description+' => 'What is checked? How should it be fixed? Who should do it? ...',
'Class:AuditRule/Attribute:description+' => 'What is checked?~~',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Query to run',
'Class:AuditRule/Attribute:query+' => 'The OQL expression to run. Returned classes must be aligned with those of the category\'s scope',
'Class:AuditRule/Attribute:valid_flag' => 'Returned objects: ',
@@ -65,6 +67,8 @@ It is applied on the scope of objects defined by the audit category',
'Class:AuditRule/Attribute:category_id+' => 'The category of this rule',
'Class:AuditRule/Attribute:category_name' => 'Category name',
'Class:AuditRule/Attribute:category_name+' => 'Name of the category of this rule',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -178,9 +182,11 @@ Dict::Add('EN GB', 'British English', 'British English', [
'Class:User/Error:LoginMustBeUnique' => 'Login must be unique - "%1$s" is already being used.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'At least one profile must be assigned to this user.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profile "%1$s" cannot be added as it will deny access to the back office.',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Changing status is not allowed for your own User',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Allowed organisations must contain User organisation',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'The current list of profiles does not give sufficient access rights (Users are not modifiable any more)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'At least one organisation must be assigned to this user.',

View File

@@ -38,6 +38,8 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
'Class:AuditRule/Attribute:name+' => 'Nombre corto para esta regla',
'Class:AuditRule/Attribute:description' => 'Descripción de regla de auditoría',
'Class:AuditRule/Attribute:description+' => 'Descripción larga para esta regla de auditoría',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Consulta a Ejecutar',
'Class:AuditRule/Attribute:query+' => 'Expresión OQL a ejecutar',
'Class:AuditRule/Attribute:valid_flag' => '¿Objetos Válidos?',
@@ -50,6 +52,8 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
'Class:AuditRule/Attribute:category_id+' => 'La categoría para esta regla',
'Class:AuditRule/Attribute:category_name' => 'Categoría',
'Class:AuditRule/Attribute:category_name+' => 'Nombre de la categoría para esta regla',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -162,9 +166,11 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
'Class:User/Attribute:status/Value:disabled' => 'Deshabilitado',
'Class:User/Error:LoginMustBeUnique' => 'Usuario debe ser único - "%1s" ya se encuentra en uso.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Al menos un Perfil debe ser asignado a este usuario.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'No se puede agregar el perfil "%1$s"; denegará el acceso al backoffice',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Cambiar estatus no está permitido para su propio usuario',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Las organizaciones permitidas deben contener una organización de usuario',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'La lista actual de perfiles no otorga suficientes permisos de acceso (los usuarios ya no son modificables)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'El perfil de usuario avanzado del Portal no otorga suficientes derechos de acceso (se debe agregar otro perfil)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'Al menos una organización debe ser asignada a este usuario.',

View File

@@ -41,7 +41,9 @@ Elle s\'applique à tous les objets dans le périmètre de sa catégorie d\'audi
'Class:AuditRule/Attribute:name' => 'Nom',
'Class:AuditRule/Attribute:name+' => 'Une vérification particulière',
'Class:AuditRule/Attribute:description' => 'Description',
'Class:AuditRule/Attribute:description+' => 'Qu\'est ce qu\'on vérifie ? Comment le corriger ? Qui doit le faire ? ...',
'Class:AuditRule/Attribute:description+' => 'Qu\'est ce qu\'on vérifie ?',
'Class:AuditRule/Attribute:process' => 'Processus de correction',
'Class:AuditRule/Attribute:process+' => 'Comment le corriger ? Qui doit le faire ? ...',
'Class:AuditRule/Attribute:query' => 'Requête',
'Class:AuditRule/Attribute:query+' => 'Requête OQL à executer. Les classes retournées doivent être cohérentes avec celles définies dans le périmètre de la catégorie',
'Class:AuditRule/Attribute:valid_flag' => 'Objets retournés :',
@@ -56,6 +58,8 @@ Elle s\'applique à tous les objets dans le périmètre de sa catégorie d\'audi
'Class:AuditRule/Attribute:category_id+' => '',
'Class:AuditRule/Attribute:category_name' => 'Nom de la catégorie',
'Class:AuditRule/Attribute:category_name+' => '',
'Class:AuditRule/Attribute:contact_id' => 'Responsable',
'Class:AuditRule/Attribute:contact_id+' => 'Personne ou équipe responsable de la correction des erreurs détectées par cette règle',
]);
//
@@ -164,15 +168,17 @@ Dict::Add('FR FR', 'French', 'Français', [
'Class:User/Attribute:allowed_org_list' => 'Organisations permises',
'Class:User/Attribute:allowed_org_list+' => 'L\'utilisateur a le droit de voir les données des organisations listées ici. Si aucune organisation n\'est spécifiée, alors aucune restriction ne s\'applique.',
'Class:User/Attribute:status' => 'Etat',
'Class:User/Attribute:status+' => 'Est-ce que ce compte utilisateur est actif, ou non?',
'Class:User/Attribute:status+' => 'Est-ce que ce compte utilisateur est actif, ou non ?',
'Class:User/Attribute:status/Value:enabled' => 'Actif',
'Class:User/Attribute:status/Value:disabled' => 'Désactivé',
'Class:User/Error:LoginMustBeUnique' => 'Le login doit être unique - "%1s" est déjà utilisé.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'L\'utilisateur doit avoir au moins un profil.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Le profil "%1$s" ne peut pas être donné aux Administrateurs, SuperUsers et REST Services Users',
'Class:User/Error:ProfileNotAllowed' => 'Le profil "%1$s" ne peux pas être ajouté à son propre utilisateur, il interdit l\'accès à la console',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Impossible de changer l\'état de son propre utilisateur',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Les organisations permises doivent contenir l\'organisation de l\'utilisateur',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'Les profils existants ne permettent pas de modifier les utilisateurs',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'Vous ne pouvez pas supprimer votre propre profil Administrateur. Demandez à un autre Administrateur de le faire pour vous',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'Vous ne pouvez pas supprimer vos propres droits de modification des utilisateurs.',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'Le profil Portal power user ne donne pas suffisamment de droits à l\'utilisateur (un autre profil doit être ajouté)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'L\'utilisateur doit avoir au moins une organisation.',
'Class:User/Error:OrganizationNotAllowed' => 'Organisation non autorisée.',
@@ -1273,6 +1279,7 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
'UI:DashletGroupBy:Prop-GroupBy:DayOfMonth' => 'Jour du mois pour %1$s',
'UI:DashletGroupBy:Prop-GroupBy:Select-Hour' => '%1$s (heure)',
'UI:DashletGroupBy:Prop-GroupBy:Select-Month' => '%1$s (mois)',
'UI:DashletGroupBy:Prop-GroupBy:Select-Year' => '%1$s (année)',
'UI:DashletGroupBy:Prop-GroupBy:Select-DayOfWeek' => '%1$s (jour de la semaine)',
'UI:DashletGroupBy:Prop-GroupBy:Select-DayOfMonth' => '%1$s (jour du mois)',
'UI:DashletGroupBy:MissingGroupBy' => 'Veuillez sélectionner le champ sur lequel les objets seront groupés',

View File

@@ -40,6 +40,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', [
'Class:AuditRule/Attribute:name+' => '',
'Class:AuditRule/Attribute:description' => 'Leírás',
'Class:AuditRule/Attribute:description+' => '',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Lekérdezés',
'Class:AuditRule/Attribute:query+' => '',
'Class:AuditRule/Attribute:valid_flag' => 'Érvényes objektum?',
@@ -52,6 +54,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', [
'Class:AuditRule/Attribute:category_id+' => '',
'Class:AuditRule/Attribute:category_name' => 'Kategórianév',
'Class:AuditRule/Attribute:category_name+' => '',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,9 +168,11 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', [
'Class:User/Attribute:status/Value:disabled' => 'Letiltott',
'Class:User/Error:LoginMustBeUnique' => 'A felhasználónévnek egyedinek kell lennie - "%1s" már létezik.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Legalább egy profilt a felhasználóhoz kell rendelni.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'A "%1$s" profil nem adható hozzá, le lesz tiltva',
'Class:User/Error:StatusChangeIsNotAllowed' => 'A saját felhasználó státuszának cseréje nem engedélyezett',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Az engedélyezett szervezeteknek tartalmazniuk kell a felhasználói szervezetet',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'A profilok jelenlegi listája nem ad elegendő hozzáférési jogot (a felhasználók már nem módosíthatók)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'A felhasználóhoz legalább egy szervezeti egységet hozzá kell rendelni',

View File

@@ -40,6 +40,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', [
'Class:AuditRule/Attribute:name+' => '',
'Class:AuditRule/Attribute:description' => 'Descrizione della regola di Audit',
'Class:AuditRule/Attribute:description+' => 'Descrizione dettagliata per questa regola di audit ',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Query da eseguire',
'Class:AuditRule/Attribute:query+' => 'Espressio OQL da eseguire',
'Class:AuditRule/Attribute:valid_flag' => 'Oggetti validi?',
@@ -52,6 +54,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', [
'Class:AuditRule/Attribute:category_id+' => 'Categoria per questa regola',
'Class:AuditRule/Attribute:category_name' => 'Categoria',
'Class:AuditRule/Attribute:category_name+' => 'Nome della categoria per questa regola',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,9 +168,11 @@ Dict::Add('IT IT', 'Italian', 'Italiano', [
'Class:User/Attribute:status/Value:disabled' => 'Disabilitato',
'Class:User/Error:LoginMustBeUnique' => 'Il Login deve essere unico - "%1s" già in uso',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'È necessario almeno un profilo assegnato all\'utente.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Il profilo "%1$s" non può essere aggiunto poiché nega l\'accesso al back office.',
'Class:User/Error:StatusChangeIsNotAllowed' => 'La modifica dello stato non è consentita per il proprio utente.',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Le organizzazioni consentite devono includere l\'organizzazione dell\'utente.',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'L\'elenco attuale dei profili non conferisce diritti di accesso sufficienti (gli utenti non sono più modificabili).',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'Il profilo utente con poteri del portale non concede diritti di accesso sufficienti (deve essere aggiunto un altro profilo)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'È necessario assegnare almeno un\'organizzazione a questo utente.',

View File

@@ -40,6 +40,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', [
'Class:AuditRule/Attribute:name+' => 'ルールの短縮名',
'Class:AuditRule/Attribute:description' => '監査ルール説明',
'Class:AuditRule/Attribute:description+' => 'この監査ルールの長い説明',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => '実行するクエリ',
'Class:AuditRule/Attribute:query+' => '実行するOQL式',
'Class:AuditRule/Attribute:valid_flag' => '有効なオブジェクト',
@@ -52,6 +54,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', [
'Class:AuditRule/Attribute:category_id+' => 'このルールのカテゴリ',
'Class:AuditRule/Attribute:category_name' => 'カテゴリ',
'Class:AuditRule/Attribute:category_name+' => 'このルールのカテゴリ名',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,10 +168,12 @@ Dict::Add('JA JP', 'Japanese', '日本語', [
'Class:User/Attribute:status/Value:disabled' => 'Disabled~~',
'Class:User/Error:LoginMustBeUnique' => 'ログイン名は一意でないといけません。- "%1s" はすでに使われています。',
'Class:User/Error:AtLeastOneProfileIsNeeded' => '少なくとも1件のプロフィールがこのユーザに指定されなければなりません。',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profile "%1$s" cannot be added it will deny the access to backoffice~~',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Changing status is not allowed for your own User~~',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Allowed organizations must contain User organization~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'The current list of profiles does not give sufficient access rights (Users are not modifiable anymore)~~',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'You cannot remove your own rights to edit Users~~',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'At least one organization must be assigned to this user.~~',
'Class:User/Error:OrganizationNotAllowed' => 'Organization not allowed.~~',

View File

@@ -40,6 +40,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', [
'Class:AuditRule/Attribute:name+' => 'Naam van de regel',
'Class:AuditRule/Attribute:description' => 'Beschrijving',
'Class:AuditRule/Attribute:description+' => 'Uitgebreide beschrijving van deze Auditregel',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Query om uit te voeren',
'Class:AuditRule/Attribute:query+' => 'De OQL-expressie voor het uitvoeren',
'Class:AuditRule/Attribute:valid_flag' => 'Geldige objecten?',
@@ -52,6 +54,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', [
'Class:AuditRule/Attribute:category_id+' => 'De categorie voor deze regel',
'Class:AuditRule/Attribute:category_name' => 'Categorie',
'Class:AuditRule/Attribute:category_name+' => 'Naam van de categorie voor deze regel',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,9 +168,11 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', [
'Class:User/Attribute:status/Value:disabled' => 'Uitgeschakeld',
'Class:User/Error:LoginMustBeUnique' => 'Login moet uniek zijn - "%1s" is al in gebruik',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Minstens één profiel moet toegewezen zijn aan deze gebruiker',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profiel "%1$s" kan niet toegevoegd worden omdat het de toegang tot de backoffice zou ontzeggen.',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Je kan de status voor je eigen gebruikersaccount niet wijzigen.',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'De toegestande organisaties moeten minstens de organisatie bevatten waartoe de gebruikersaccount behoort.',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'De huidige lijst van profielen heeft niet voldoende toegangsrechten (gebruikersaccount zijn niet meer wijzigbaar).',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'Minstens één organisatie moet toegewezen zijn aan deze gebruiker',

View File

@@ -40,6 +40,8 @@ Dict::Add('PL PL', 'Polish', 'Polski', [
'Class:AuditRule/Attribute:name+' => 'Krótka nazwa reguły',
'Class:AuditRule/Attribute:description' => 'Opis reguły audytu',
'Class:AuditRule/Attribute:description+' => 'Długi opis reguły inspekcji',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Zapytanie do wykonania',
'Class:AuditRule/Attribute:query+' => 'Wyrażenie OQL do wykonania',
'Class:AuditRule/Attribute:valid_flag' => 'Prawidłowe obiekty?',
@@ -52,6 +54,8 @@ Dict::Add('PL PL', 'Polish', 'Polski', [
'Class:AuditRule/Attribute:category_id+' => 'Kategoria dla reguły',
'Class:AuditRule/Attribute:category_name' => 'Kategoria',
'Class:AuditRule/Attribute:category_name+' => 'Nazwa kategorii dla reguły',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,9 +168,11 @@ Dict::Add('PL PL', 'Polish', 'Polski', [
'Class:User/Attribute:status/Value:disabled' => 'Wyłączone',
'Class:User/Error:LoginMustBeUnique' => 'Login musi być unikatowy - "%1s" jest już używany.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Do użytkownika musi być przypisany co najmniej jeden profil.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Nie można dodać profilu "%1$s" nie ma on dostępu do zaplecza',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Zmiana statusu nie jest dozwolona dla własnego użytkownika',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Dozwolone organizacje muszą zawierać organizację użytkownika',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'Aktualna lista profili nie daje wystarczających praw dostępu (Użytkowników nie można już modyfikować)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'Profil użytkownika zaawansowanego Portalu nie zapewnia wystarczających praw dostępu (należy dodać kolejny profil)',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'Do użytkownika musi być przypisana co najmniej jedna organizacja.',

View File

@@ -40,6 +40,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
'Class:AuditRule/Attribute:name+' => 'Nome curto para esta regra',
'Class:AuditRule/Attribute:description' => 'Descrição',
'Class:AuditRule/Attribute:description+' => 'Descrição longa para essa regra',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Executar consulta',
'Class:AuditRule/Attribute:query+' => 'Executar a expressão OQL',
'Class:AuditRule/Attribute:valid_flag' => 'Objetos válidos?',
@@ -52,6 +54,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
'Class:AuditRule/Attribute:category_id+' => 'A categoria para esta regra',
'Class:AuditRule/Attribute:category_name' => 'Categoria',
'Class:AuditRule/Attribute:category_name+' => 'Nome da categoria para essa regra',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,9 +168,11 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
'Class:User/Attribute:status/Value:disabled' => 'Inativa',
'Class:User/Error:LoginMustBeUnique' => 'Login deve ser único - "%1s" já existe',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Pelo menos um perfil deve ser atribuído a esse usuário',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'O perfil "%1$s" não pôde ser adicionado, ele negará o acesso ao backoffice',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Alterar o status da conta não é permitido para o seu próprio usuário',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'As organizações permitidas devem conter apenas usuários pertencentes a organização',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'A lista atual de perfis não fornece permissões de acesso suficientes (os usuários não são mais modificáveis)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'Pelo menos uma organização deve ser atribuída a esse usuário',

View File

@@ -41,6 +41,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', [
'Class:AuditRule/Attribute:name+' => 'Краткое название этого правила',
'Class:AuditRule/Attribute:description' => 'Описание правила аудита',
'Class:AuditRule/Attribute:description+' => 'Полное описание этого правила аудита',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Запрос для выполнения',
'Class:AuditRule/Attribute:query+' => 'OQL выражение, выполняющее проверку набора объектов категории аудита',
'Class:AuditRule/Attribute:valid_flag' => 'Валидные объекты?',
@@ -53,6 +55,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', [
'Class:AuditRule/Attribute:category_id+' => 'Категория для этого правила',
'Class:AuditRule/Attribute:category_name' => 'Категория',
'Class:AuditRule/Attribute:category_name+' => 'Категория для этого правила',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -165,10 +169,12 @@ Dict::Add('RU RU', 'Russian', 'Русский', [
'Class:User/Attribute:status/Value:disabled' => 'Отключен',
'Class:User/Error:LoginMustBeUnique' => 'Логин должен быть уникальным - "%1s" уже используется.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Как минимум один профиль должен быть назначен данному пользователю.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profile "%1$s" cannot be added it will deny the access to backoffice~~',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Changing status is not allowed for your own User~~',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Allowed organizations must contain User organization~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'The current list of profiles does not give sufficient access rights (Users are not modifiable anymore)~~',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'You cannot remove your own rights to edit Users~~',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'Этому пользователю должна быть назначена хотя бы одна организация.',
'Class:User/Error:OrganizationNotAllowed' => 'Организация не разрешена.',

View File

@@ -41,7 +41,9 @@ It is applied on the scope of objects defined by the audit category~~',
'Class:AuditRule/Attribute:name' => 'Názov pravidla',
'Class:AuditRule/Attribute:name+' => 'Short name for this rule~~',
'Class:AuditRule/Attribute:description' => 'Popis pravidla auditu',
'Class:AuditRule/Attribute:description+' => 'What is checked? How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:description+' => 'What is checked?~~',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Spustenie dopytu',
'Class:AuditRule/Attribute:query+' => 'The OQL expression to run. Returned classes must be aligned with those of the category\'s scope~~',
'Class:AuditRule/Attribute:valid_flag' => 'Platný objekt?',
@@ -56,6 +58,8 @@ It is applied on the scope of objects defined by the audit category~~',
'Class:AuditRule/Attribute:category_id+' => 'The category of this rule~~',
'Class:AuditRule/Attribute:category_name' => 'Kategória',
'Class:AuditRule/Attribute:category_name+' => 'Name of the category of this rule~~',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -168,10 +172,12 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
'Class:User/Attribute:status/Value:disabled' => 'Disabled~~',
'Class:User/Error:LoginMustBeUnique' => 'Prihlasovacie meno musí byť jedinečné - "%1s" sa už používa.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'Aspoň jeden profil musí byť priradený k profilu.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profile "%1$s" cannot be added it will deny the access to backoffice~~',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Changing status is not allowed for your own User~~',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Allowed organizations must contain User organization~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'The current list of profiles does not give sufficient access rights (Users are not modifiable anymore)~~',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'You cannot remove your own rights to edit Users~~',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'At least one organization must be assigned to this user.~~',
'Class:User/Error:OrganizationNotAllowed' => 'Organization not allowed.~~',

View File

@@ -40,6 +40,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', [
'Class:AuditRule/Attribute:name+' => 'Kural Adı',
'Class:AuditRule/Attribute:description' => 'Kural tanımlaması',
'Class:AuditRule/Attribute:description+' => 'Kural tanımlaması',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => 'Çalıştırılacak Sorgu',
'Class:AuditRule/Attribute:query+' => 'Çalıştırılcak OQL ifadesi',
'Class:AuditRule/Attribute:valid_flag' => 'Geçerli nesneler?',
@@ -52,6 +54,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', [
'Class:AuditRule/Attribute:category_id+' => 'Kuralın kategorisi',
'Class:AuditRule/Attribute:category_name' => 'Kategori',
'Class:AuditRule/Attribute:category_name+' => 'Kural için kategori adı',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -164,10 +168,12 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', [
'Class:User/Attribute:status/Value:disabled' => 'Disabled~~',
'Class:User/Error:LoginMustBeUnique' => 'Kullanıcı adı tekil olmalı - "%1s" mevcut bir kullanıcıya ait.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => 'En az bir profil kullanıcıya atanmalı',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => 'Profile "%1$s" cannot be added it will deny the access to backoffice~~',
'Class:User/Error:StatusChangeIsNotAllowed' => 'Changing status is not allowed for your own User~~',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => 'Allowed organizations must contain User organization~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'The current list of profiles does not give sufficient access rights (Users are not modifiable anymore)~~',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => 'You cannot remove your own rights to edit Users~~',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => 'At least one organization must be assigned to this user.~~',
'Class:User/Error:OrganizationNotAllowed' => 'Organization not allowed.~~',

View File

@@ -19,8 +19,15 @@
*/
// Input
Dict::Add('EN US', 'English', 'English', [
'UI:Component:Input:ChangeNotAllowed' => 'This change is not allowed',
'UI:Component:Input:Password:DoesNotMatch' => 'Passwords do not match',
'UI:Component:Input:Set:MinimumItems' => 'Minimum %1$s item(s) required',
]);
Dict::Add(
'EN US',
'English',
'English',
[
'UI:Component:Input:ChangeNotAllowed' => 'This change is not allowed',
'UI:Component:Input:Password:DoesNotMatch' => 'Passwords do not match',
'UI:Component:Input:Set:MinimumItems' => 'Minimum %1$s item(s) required',
'UI:Component:Input:Select:Select_item' => 'Select an item...',
]
);

View File

@@ -10,8 +10,15 @@
/**
*
*/
Dict::Add('FR FR', 'French', 'Français', [
'UI:Component:Input:ChangeNotAllowed' => 'Cette modification n\'est pas autorisée',
'UI:Component:Input:Password:DoesNotMatch' => 'Les mots de passe ne correspondent pas',
'UI:Component:Input:Set:MinimumItems' => 'Minimum %1$s élément(s) requis',
]);
Dict::Add(
'FR FR',
'French',
'Français',
[
'UI:Component:Input:ChangeNotAllowed' => 'Cette modification n\'est pas autorisée',
'UI:Component:Input:Password:DoesNotMatch' => 'Les mots de passe ne correspondent pas',
'UI:Component:Input:Set:MinimumItems' => 'Minimum %1$s élément(s) requis',
'UI:Component:Input:Select:Select_item' => 'Sélectionnez un élément...',
]
);

View File

@@ -42,6 +42,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', [
'Class:AuditRule/Attribute:name+' => '规则名称',
'Class:AuditRule/Attribute:description' => '描述',
'Class:AuditRule/Attribute:description+' => '检查什么? 如何修复? 谁去做? ...',
'Class:AuditRule/Attribute:process' => 'Correction process~~',
'Class:AuditRule/Attribute:process+' => 'How should it be fixed? Who should do it? ...~~',
'Class:AuditRule/Attribute:query' => '要运行的查询',
'Class:AuditRule/Attribute:query+' => '要运行的OQL表达式',
'Class:AuditRule/Attribute:valid_flag' => '是否有效?',
@@ -54,6 +56,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', [
'Class:AuditRule/Attribute:category_id+' => '该规则对应的类别',
'Class:AuditRule/Attribute:category_name' => '类别',
'Class:AuditRule/Attribute:category_name+' => '该规则对应的类名称',
'Class:AuditRule/Attribute:contact_id' => 'Owner~~',
'Class:AuditRule/Attribute:contact_id+' => 'Team or person in charge of fixing the errors detected by this rule~~',
]);
//
@@ -166,9 +170,11 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', [
'Class:User/Attribute:status/Value:disabled' => '停用',
'Class:User/Error:LoginMustBeUnique' => '登录名必须唯一 - "%1s" 已经被使用.',
'Class:User/Error:AtLeastOneProfileIsNeeded' => '必须指定至少一个角色给此用户.',
'Class:User/Error:PrivilegedUserMustHaveAccessToBackOffice' => 'Profile "%1$s" cannot be given to privileged Users (Administrators, SuperUsers and REST Services Users)~~',
'Class:User/Error:ProfileNotAllowed' => '无法添加角色 "%1$s" 因为这将导致禁止访问后台',
'Class:User/Error:StatusChangeIsNotAllowed' => '不允许更改您自己用户的状态',
'Class:User/Error:AllowedOrgsMustContainUserOrg' => '允许访问组织必须包含用户组织',
'Class:User/Error:AdminProfileCannotBeRemovedBySelf' => 'You cannot remove your own Administrator profile. Ask another Administrator to do it for you~~',
'Class:User/Error:CurrentProfilesHaveInsufficientRights' => '当前指定的角色列表没有提供足够的访问权限 (用户将无法被修改)',
'Class:User/Error:PortalPowerUserHasInsufficientRights' => 'The Portal power user profile does not give sufficient access rights (another profile must be added)~~',
'Class:User/Error:AtLeastOneOrganizationIsNeeded' => '必须为此用户指定一个组织.',

View File

@@ -0,0 +1,33 @@
class TomSelectElement extends HTMLSelectElement {
plugins = [];
connectedCallback() {
if (this.getAttribute('data-tom-select-multiple')) {
this.plugins.push('remove_button');
}
const options = {
plugins: this.plugins,
wrapperClass: 'ts-wrapper ibo-input-wrapper ibo-input-select-wrapper--with-buttons ibo-input-select-autocomplete-wrapper',
controlClass: 'ts-control ibo-input ibo-input-select ibo-input-select-autocomplete',
render: {
dropdown: function (data, escape) {
return `<div class="selectize-dropdown"></div>`;
}
}
};
if (this.getAttribute('data-tom-select-disable-control-input')) {
options.controlInput = null;
}
if (this.getAttribute('data-tom-select-max-items-selected')) {
options.maxItems = parseInt(this.getAttribute('data-tom-select-max-items-selected'));
}
if (this.getAttribute('data-tom-select-placehelder')) {
options.placeholder = this.getAttribute('data-tom-select-placehelder');
}
new TomSelect(this, options);
}
}
customElements.define('tom-select-element', TomSelectElement, {extends: 'select'});

30
js/forms/forms.js Normal file
View File

@@ -0,0 +1,30 @@
/*
* @copyright Copyright (C) 2010-2025 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
function triggerTurbo(el) {
let sFormName = el.form.getAttribute("name");
el.form.querySelector(`[name="${sFormName}[_turbo_trigger]"]`).value = el.getAttribute('name');
el.form.setAttribute('novalidate', true);
el.form.requestSubmit();
console.log('Auto submitting form due to change in field ' + el.getAttribute('name'));
}
function addFormToCollection(e) {
const collectionHolder = document.querySelector('.' + e.currentTarget.dataset.collectionHolderClass);
const item = document.createElement('div');
item.style.marginTop = '20px';
item.innerHTML = collectionHolder
.dataset
.prototype
.replace(
/__name__/g,
collectionHolder.dataset.index
);
collectionHolder.appendChild(item);
collectionHolder.dataset.index++;
console.log(collectionHolder.dataset.index);
}

View File

@@ -244,6 +244,10 @@ return array(
'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacer' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacerUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacerUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/Toolbar/ToolbarUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboForm' => $baseDir . '/sources/Application/UI/Base/Component/TurboForm/TurboForm.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboFormUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/TurboForm/TurboFormUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboUpdate' => $baseDir . '/sources/Application/UI/Base/Component/TurboUpdate/TurboUpdate.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboUpdateUIBlockFactory' => $baseDir . '/sources/Application/UI/Base/Component/TurboUpdate/TurboUpdateUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntry' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php',
'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntryFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntryFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentAddedFactory' => $baseDir . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentAddedFactory.php',
@@ -473,6 +477,59 @@ return array(
'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => $baseDir . '/sources/Form/Validator/MultipleChoicesValidator.php',
'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => $baseDir . '/sources/Form/Validator/NotEmptyExtKeyValidator.php',
'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => $baseDir . '/sources/Form/Validator/SelectObjectValidator.php',
'Combodo\\iTop\\Forms\\Block\\AbstractFormBlock' => $baseDir . '/sources/Forms/Block/AbstractFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\AbstractTypeFormBlock' => $baseDir . '/sources/Forms/Block/AbstractTypeFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\CheckboxFormBlock' => $baseDir . '/sources/Forms/Block/Base/CheckboxFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFormBlock' => $baseDir . '/sources/Forms/Block/Base/ChoiceFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFromInputsBlock' => $baseDir . '/sources/Forms/Block/Base/ChoiceFromInputsBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\CollectionBlock' => $baseDir . '/sources/Forms/Block/Base/CollectionBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\DateFormBlock' => $baseDir . '/sources/Forms/Block/Base/DateFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\DateTimeFormBlock' => $baseDir . '/sources/Forms/Block/Base/DateTimeFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\FormBlock' => $baseDir . '/sources/Forms/Block/Base/FormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\IntegerFormBlock' => $baseDir . '/sources/Forms/Block/Base/IntegerFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\TextAreaFormBlock' => $baseDir . '/sources/Forms/Block/Base/TextAreaFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\TextFormBlock' => $baseDir . '/sources/Forms/Block/Base/TextFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeChoiceFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/AttributeChoiceFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeValueChoiceFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/AttributeValueChoiceFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\DataModel\\OqlFormBlock' => $baseDir . '/sources/Forms/Block/DataModel/OqlFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Expression\\ExpressionFormBlock' => $baseDir . '/sources/Forms/Block/Expression/ExpressionFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\FormBlockException' => $baseDir . '/sources/Forms/Block/FormBlockException.php',
'Combodo\\iTop\\Forms\\FormBuilder\\DependencyHandler' => $baseDir . '/sources/Forms/FormBuilder/DependencyHandler.php',
'Combodo\\iTop\\Forms\\FormBuilder\\DependencyMap' => $baseDir . '/sources/Forms/FormBuilder/DependencyMap.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilder' => $baseDir . '/sources/Forms/FormBuilder/FormBuilder.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilderException' => $baseDir . '/sources/Forms/FormBuilder/FormBuilderException.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormHelper' => $baseDir . '/sources/Forms/FormBuilder/FormHelper.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormTypeExtension' => $baseDir . '/sources/Forms/FormBuilder/FormTypeExtension.php',
'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormType' => $baseDir . '/sources/Forms/FormBuilder/ResolvedFormType.php',
'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormTypeFactory' => $baseDir . '/sources/Forms/FormBuilder/ResolvedFormTypeFactory.php',
'Combodo\\iTop\\Forms\\FormType\\Base\\ChoiceFormType' => $baseDir . '/sources/Forms/FormType/Base/ChoiceFormType.php',
'Combodo\\iTop\\Forms\\FormType\\Base\\CollectionFormType' => $baseDir . '/sources/Forms/FormType/Base/CollectionFormType.php',
'Combodo\\iTop\\Forms\\FormType\\Base\\FormType' => $baseDir . '/sources/Forms/FormType/Base/FormType.php',
'Combodo\\iTop\\Forms\\FormType\\DataModel\\OqlFormType' => $baseDir . '/sources/Forms/FormType/DataModel/OqlFormType.php',
'Combodo\\iTop\\Forms\\FormType\\FormTypeHelper' => $baseDir . '/sources/Forms/FormType/FormTypeHelper.php',
'Combodo\\iTop\\Forms\\Forms' => $baseDir . '/sources/Forms/Forms.php',
'Combodo\\iTop\\Forms\\FormsException' => $baseDir . '/sources/Forms/FormsException.php',
'Combodo\\iTop\\Forms\\IFormBlock' => $baseDir . '/sources/Forms/IFormBlock.php',
'Combodo\\iTop\\Forms\\IO\\AbstractFormIO' => $baseDir . '/sources/Forms/IO/AbstractFormIO.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\AbstractConverter' => $baseDir . '/sources/Forms/IO/Converter/AbstractConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\ChoiceValueToLabelConverter' => $baseDir . '/sources/Forms/IO/Converter/ChoiceValueToLabelConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\OqlToClassConverter' => $baseDir . '/sources/Forms/IO/Converter/OqlToClassConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\StringToAttributeConverter' => $baseDir . '/sources/Forms/IO/Converter/StringToAttributeConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\StringToBooleanConverter' => $baseDir . '/sources/Forms/IO/Converter/StringToBooleanConverter.php',
'Combodo\\iTop\\Forms\\IO\\FormBinding' => $baseDir . '/sources/Forms/IO/FormBinding.php',
'Combodo\\iTop\\Forms\\IO\\FormBlockIOException' => $baseDir . '/sources/Forms/IO/FormBlockIOException.php',
'Combodo\\iTop\\Forms\\IO\\FormInput' => $baseDir . '/sources/Forms/IO/FormInput.php',
'Combodo\\iTop\\Forms\\IO\\FormOutput' => $baseDir . '/sources/Forms/IO/FormOutput.php',
'Combodo\\iTop\\Forms\\IO\\Format\\AbstractIOFormat' => $baseDir . '/sources/Forms/IO/Format/AbstractIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\AttributeIOFormat' => $baseDir . '/sources/Forms/IO/Format/AttributeIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\BooleanIOFormat' => $baseDir . '/sources/Forms/IO/Format/BooleanIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\ClassIOFormat' => $baseDir . '/sources/Forms/IO/Format/ClassIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\NumberIOFormat' => $baseDir . '/sources/Forms/IO/Format/NumberIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\RawFormat' => $baseDir . '/sources/Forms/IO/Format/RawFormat.php',
'Combodo\\iTop\\Forms\\Register\\IORegister' => $baseDir . '/sources/Forms/Register/IORegister.php',
'Combodo\\iTop\\Forms\\Register\\Option' => $baseDir . '/sources/Forms/Register/Option.php',
'Combodo\\iTop\\Forms\\Register\\OptionsRegister' => $baseDir . '/sources/Forms/Register/OptionsRegister.php',
'Combodo\\iTop\\Forms\\Register\\RegisterException' => $baseDir . '/sources/Forms/Register/RegisterException.php',
'Combodo\\iTop\\Forms\\Twig\\Extension\\FormCompatibilityExtension' => $baseDir . '/sources/Forms/Twig/Extension/FormCompatibilityExtension.php',
'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => $baseDir . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php',
'Combodo\\iTop\\Renderer\\BlockRenderer' => $baseDir . '/sources/Renderer/BlockRenderer.php',
@@ -497,6 +554,8 @@ return array(
'Combodo\\iTop\\Service\\Base\\ObjectRepository' => $baseDir . '/sources/Service/Base/ObjectRepository.php',
'Combodo\\iTop\\Service\\Base\\iDataPostProcessor' => $baseDir . '/sources/Service/Base/iDataPostProcessor.php',
'Combodo\\iTop\\Service\\Cache\\DataModelDependantCache' => $baseDir . '/sources/Service/Cache/DataModelDependantCache.php',
'Combodo\\iTop\\Service\\DependencyInjection\\DIException' => $baseDir . '/sources/Service/DependencyInjection/DIException.php',
'Combodo\\iTop\\Service\\DependencyInjection\\DIService' => $baseDir . '/sources/Service/DependencyInjection/DIService.php',
'Combodo\\iTop\\Service\\Events\\Description\\EventDataDescription' => $baseDir . '/sources/Service/Events/Description/EventDataDescription.php',
'Combodo\\iTop\\Service\\Events\\Description\\EventDescription' => $baseDir . '/sources/Service/Events/Description/EventDescription.php',
'Combodo\\iTop\\Service\\Events\\EventData' => $baseDir . '/sources/Service/Events/EventData.php',

View File

@@ -625,6 +625,10 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacer' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacer.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarSpacer\\ToolbarSpacerUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarSpacer/ToolbarSpacerUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\Toolbar\\ToolbarUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/Toolbar/ToolbarUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboForm' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboForm/TurboForm.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboForm\\TurboFormUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboForm/TurboFormUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboUpdate' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboUpdate/TurboUpdate.php',
'Combodo\\iTop\\Application\\UI\\Base\\Component\\TurboUpdate\\TurboUpdateUIBlockFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Component/TurboUpdate/TurboUpdateUIBlockFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntry' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntry.php',
'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\ActivityEntryFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/ActivityEntryFactory.php',
'Combodo\\iTop\\Application\\UI\\Base\\Layout\\ActivityPanel\\ActivityEntry\\CMDBChangeOp\\CMDBChangeOpAttachmentAddedFactory' => __DIR__ . '/../..' . '/sources/Application/UI/Base/Layout/ActivityPanel/ActivityEntry/CMDBChangeOp/CMDBChangeOpAttachmentAddedFactory.php',
@@ -854,6 +858,59 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'Combodo\\iTop\\Form\\Validator\\MultipleChoicesValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/MultipleChoicesValidator.php',
'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/NotEmptyExtKeyValidator.php',
'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/SelectObjectValidator.php',
'Combodo\\iTop\\Forms\\Block\\AbstractFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/AbstractFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\AbstractTypeFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/AbstractTypeFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\CheckboxFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/CheckboxFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/ChoiceFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\ChoiceFromInputsBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/ChoiceFromInputsBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\CollectionBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/CollectionBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\DateFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/DateFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\DateTimeFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/DateTimeFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\FormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/FormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\IntegerFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/IntegerFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\TextAreaFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/TextAreaFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Base\\TextFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Base/TextFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeChoiceFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/AttributeChoiceFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\DataModel\\AttributeValueChoiceFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/AttributeValueChoiceFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\DataModel\\OqlFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/DataModel/OqlFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\Expression\\ExpressionFormBlock' => __DIR__ . '/../..' . '/sources/Forms/Block/Expression/ExpressionFormBlock.php',
'Combodo\\iTop\\Forms\\Block\\FormBlockException' => __DIR__ . '/../..' . '/sources/Forms/Block/FormBlockException.php',
'Combodo\\iTop\\Forms\\FormBuilder\\DependencyHandler' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/DependencyHandler.php',
'Combodo\\iTop\\Forms\\FormBuilder\\DependencyMap' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/DependencyMap.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilder' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormBuilder.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormBuilderException' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormBuilderException.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormHelper' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormHelper.php',
'Combodo\\iTop\\Forms\\FormBuilder\\FormTypeExtension' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/FormTypeExtension.php',
'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormType' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/ResolvedFormType.php',
'Combodo\\iTop\\Forms\\FormBuilder\\ResolvedFormTypeFactory' => __DIR__ . '/../..' . '/sources/Forms/FormBuilder/ResolvedFormTypeFactory.php',
'Combodo\\iTop\\Forms\\FormType\\Base\\ChoiceFormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/Base/ChoiceFormType.php',
'Combodo\\iTop\\Forms\\FormType\\Base\\CollectionFormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/Base/CollectionFormType.php',
'Combodo\\iTop\\Forms\\FormType\\Base\\FormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/Base/FormType.php',
'Combodo\\iTop\\Forms\\FormType\\DataModel\\OqlFormType' => __DIR__ . '/../..' . '/sources/Forms/FormType/DataModel/OqlFormType.php',
'Combodo\\iTop\\Forms\\FormType\\FormTypeHelper' => __DIR__ . '/../..' . '/sources/Forms/FormType/FormTypeHelper.php',
'Combodo\\iTop\\Forms\\Forms' => __DIR__ . '/../..' . '/sources/Forms/Forms.php',
'Combodo\\iTop\\Forms\\FormsException' => __DIR__ . '/../..' . '/sources/Forms/FormsException.php',
'Combodo\\iTop\\Forms\\IFormBlock' => __DIR__ . '/../..' . '/sources/Forms/IFormBlock.php',
'Combodo\\iTop\\Forms\\IO\\AbstractFormIO' => __DIR__ . '/../..' . '/sources/Forms/IO/AbstractFormIO.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\AbstractConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/AbstractConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\ChoiceValueToLabelConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/ChoiceValueToLabelConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\OqlToClassConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/OqlToClassConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\StringToAttributeConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/StringToAttributeConverter.php',
'Combodo\\iTop\\Forms\\IO\\Converter\\StringToBooleanConverter' => __DIR__ . '/../..' . '/sources/Forms/IO/Converter/StringToBooleanConverter.php',
'Combodo\\iTop\\Forms\\IO\\FormBinding' => __DIR__ . '/../..' . '/sources/Forms/IO/FormBinding.php',
'Combodo\\iTop\\Forms\\IO\\FormBlockIOException' => __DIR__ . '/../..' . '/sources/Forms/IO/FormBlockIOException.php',
'Combodo\\iTop\\Forms\\IO\\FormInput' => __DIR__ . '/../..' . '/sources/Forms/IO/FormInput.php',
'Combodo\\iTop\\Forms\\IO\\FormOutput' => __DIR__ . '/../..' . '/sources/Forms/IO/FormOutput.php',
'Combodo\\iTop\\Forms\\IO\\Format\\AbstractIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/AbstractIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\AttributeIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/AttributeIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\BooleanIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/BooleanIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\ClassIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/ClassIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\NumberIOFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/NumberIOFormat.php',
'Combodo\\iTop\\Forms\\IO\\Format\\RawFormat' => __DIR__ . '/../..' . '/sources/Forms/IO/Format/RawFormat.php',
'Combodo\\iTop\\Forms\\Register\\IORegister' => __DIR__ . '/../..' . '/sources/Forms/Register/IORegister.php',
'Combodo\\iTop\\Forms\\Register\\Option' => __DIR__ . '/../..' . '/sources/Forms/Register/Option.php',
'Combodo\\iTop\\Forms\\Register\\OptionsRegister' => __DIR__ . '/../..' . '/sources/Forms/Register/OptionsRegister.php',
'Combodo\\iTop\\Forms\\Register\\RegisterException' => __DIR__ . '/../..' . '/sources/Forms/Register/RegisterException.php',
'Combodo\\iTop\\Forms\\Twig\\Extension\\FormCompatibilityExtension' => __DIR__ . '/../..' . '/sources/Forms/Twig/Extension/FormCompatibilityExtension.php',
'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => __DIR__ . '/../..' . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php',
'Combodo\\iTop\\Renderer\\BlockRenderer' => __DIR__ . '/../..' . '/sources/Renderer/BlockRenderer.php',
@@ -878,6 +935,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'Combodo\\iTop\\Service\\Base\\ObjectRepository' => __DIR__ . '/../..' . '/sources/Service/Base/ObjectRepository.php',
'Combodo\\iTop\\Service\\Base\\iDataPostProcessor' => __DIR__ . '/../..' . '/sources/Service/Base/iDataPostProcessor.php',
'Combodo\\iTop\\Service\\Cache\\DataModelDependantCache' => __DIR__ . '/../..' . '/sources/Service/Cache/DataModelDependantCache.php',
'Combodo\\iTop\\Service\\DependencyInjection\\DIException' => __DIR__ . '/../..' . '/sources/Service/DependencyInjection/DIException.php',
'Combodo\\iTop\\Service\\DependencyInjection\\DIService' => __DIR__ . '/../..' . '/sources/Service/DependencyInjection/DIService.php',
'Combodo\\iTop\\Service\\Events\\Description\\EventDataDescription' => __DIR__ . '/../..' . '/sources/Service/Events/Description/EventDataDescription.php',
'Combodo\\iTop\\Service\\Events\\Description\\EventDescription' => __DIR__ . '/../..' . '/sources/Service/Events/Description/EventDescription.php',
'Combodo\\iTop\\Service\\Events\\EventData' => __DIR__ . '/../..' . '/sources/Service/Events/EventData.php',

View File

@@ -3,7 +3,7 @@
'name' => 'combodo/itop',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '19d062aa830b6d6c7d17ac4046fc9ee2c5e3fab1',
'reference' => '2c6c084a0f4dc7b999db805c75aa3314fa297d33',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -22,7 +22,7 @@
'combodo/itop' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '19d062aa830b6d6c7d17ac4046fc9ee2c5e3fab1',
'reference' => '2c6c084a0f4dc7b999db805c75aa3314fa297d33',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),

View File

@@ -0,0 +1,7 @@
parameters:
level: 6
errorFormat: raw
editorUrl: '%%file%% %%line%% %%column%%: %%error%%'
paths:
- src
- tests

19
lib/symfony/mime/LICENSE Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2010-present Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

37
node_modules/.package-lock.json generated vendored
View File

@@ -13,6 +13,27 @@
"resolved": "https://registry.npmjs.org/@fontsource/raleway/-/raleway-4.5.0.tgz",
"integrity": "sha512-Rzj90wbZQnNzazqzoiu5HzMEMdqMJLUVFOo699sinTXrZRm1aB5iX2HTiK2VlPnH4M6u8yYnJ7CebOyamfWlqw=="
},
"node_modules/@hotwired/turbo": {
"version": "8.0.5",
"resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.5.tgz",
"integrity": "sha512-TdZDA7fxVQ2ZycygvpnzjGPmFq4sO/E2QVg+2em/sJ3YTSsIWVEis8HmWlumz+c9DjWcUkcCuB+muF08TInpAQ==",
"engines": {
"node": ">= 14"
}
},
"node_modules/@orchidjs/sifter": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@orchidjs/sifter/-/sifter-1.1.0.tgz",
"integrity": "sha512-mYwHCfr736cIWWdhhSZvDbf90AKt2xyrJspKFC3qyIJG1LtrJeJunYEqCGG4Aq2ijENbc4WkOjszcvNaIAS/pQ==",
"dependencies": {
"@orchidjs/unicode-variants": "^1.1.2"
}
},
"node_modules/@orchidjs/unicode-variants": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@orchidjs/unicode-variants/-/unicode-variants-1.1.2.tgz",
"integrity": "sha512-5DobW1CHgnBROOEpFlEXytED5OosEWESFvg/VYmH0143oXcijYTprRYJTs+55HzGM4IqxiLFSuqEzu9mPNwVsA=="
},
"node_modules/@popperjs/core": {
"version": "2.11.8",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
@@ -275,6 +296,22 @@
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/toastify-js/-/toastify-js-1.12.0.tgz",
"integrity": "sha512-HeMHCO9yLPvP9k0apGSdPUWrUbLnxUKNFzgUoZp1PHCLploIX/4DSQ7V8H25ef+h4iO9n0he7ImfcndnN6nDrQ=="
},
"node_modules/tom-select": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/tom-select/-/tom-select-2.4.3.tgz",
"integrity": "sha512-MFFrMxP1bpnAMPbdvPCZk0KwYxLqhYZso39torcdoefeV/NThNyDu8dV96/INJ5XQVTL3O55+GqQ78Pkj5oCfw==",
"dependencies": {
"@orchidjs/sifter": "^1.1.0",
"@orchidjs/unicode-variants": "^1.1.2"
},
"engines": {
"node": "*"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/tom-select"
}
}
}
}

18
node_modules/@hotwired/turbo/README.md generated vendored Normal file
View File

@@ -0,0 +1,18 @@
# Turbo
Turbo uses complementary techniques to dramatically reduce the amount of custom JavaScript that most web applications will need to write:
* Turbo Drive accelerates links and form submissions by negating the need for full page reloads.
* Turbo Frames decompose pages into independent contexts, which scope navigation and can be lazily loaded.
* Turbo Streams deliver page changes over WebSocket or in response to form submissions using just HTML and a set of CRUD-like actions.
* Turbo Native lets your majestic monolith form the center of your native iOS and Android apps, with seamless transitions between web and native sections.
It's all done by sending HTML over the wire. And for those instances when that's not enough, you can reach for the other side of Hotwire, and finish the job with [Stimulus](https://github.com/hotwired/stimulus).
Read more on [turbo.hotwired.dev](https://turbo.hotwired.dev).
## Contributing
Please read [CONTRIBUTING.md](./CONTRIBUTING.md).
© 2024 37signals LLC.

6580
node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

6618
node_modules/@hotwired/turbo/dist/turbo.es2017-umd.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

68
node_modules/@hotwired/turbo/package.json generated vendored Normal file
View File

@@ -0,0 +1,68 @@
{
"name": "@hotwired/turbo",
"version": "8.0.5",
"description": "The speed of a single-page web application without having to write any JavaScript",
"module": "dist/turbo.es2017-esm.js",
"main": "dist/turbo.es2017-umd.js",
"files": [
"dist/*.js",
"dist/*.js.map"
],
"repository": {
"type": "git",
"url": "git+https://github.com/hotwired/turbo.git"
},
"keywords": [
"hotwire",
"turbo",
"browser",
"pushstate"
],
"author": "37signals LLC",
"contributors": [
"Jeffrey Hardy <jeff@basecamp.com>",
"Javan Makhmali <javan@javan.us>",
"Sam Stephenson <sstephenson@gmail.com>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/hotwired/turbo/issues"
},
"homepage": "https://turbo.hotwired.dev",
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@open-wc/testing": "^3.1.7",
"@playwright/test": "^1.28.0",
"@rollup/plugin-node-resolve": "13.1.3",
"@web/dev-server-esbuild": "^0.3.3",
"@web/test-runner": "^0.15.0",
"@web/test-runner-playwright": "^0.9.0",
"arg": "^5.0.1",
"body-parser": "^1.20.1",
"chai": "~4.3.4",
"eslint": "^8.13.0",
"express": "^4.18.2",
"idiomorph": "https://github.com/bigskysoftware/idiomorph.git",
"multer": "^1.4.2",
"rollup": "^2.35.1"
},
"scripts": {
"clean": "rm -fr dist",
"clean:win": "rmdir /s /q dist",
"build": "rollup -c",
"build:win": "rollup -c",
"watch": "rollup -wc",
"start": "node src/tests/server.mjs",
"test": "yarn test:unit && yarn test:browser",
"test:browser": "playwright test",
"test:unit": "NODE_OPTIONS=--inspect web-test-runner",
"test:unit:win": "SET NODE_OPTIONS=--inspect & web-test-runner",
"release": "yarn build && npm publish",
"lint": "eslint . --ext .js"
},
"engines": {
"node": ">= 14"
}
}

202
node_modules/tom-select/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 20132015 Brian Reavis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

104
node_modules/tom-select/README.md generated vendored Normal file
View File

@@ -0,0 +1,104 @@
<p align="center">
<h1 align="center">Tom Select</h1>
</p>
<p align="center">
<a href="https://github.com/orchidjs/tom-select" class="m-1 d-inline-block"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/orchidjs/tom-select?label=GitHub%20stars&color=007ec6"></a>
<a href="https://www.jsdelivr.com/package/npm/tom-select" class="m-1 d-inline-block"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/tom-select?label=jsDelivr%20hits&color=007ec6"></a>
<a href="https://www.npmjs.com/package/tom-select" class="m-1 d-inline-block"><img alt="npmjs.org" src="https://img.shields.io/npm/v/tom-select.svg?color=007ec6"></a>
<a href="https://github.com/orchidjs/tom-select/actions/workflows/tests.yml" class="m-1 d-inline-block"><img alt="tests" src="https://github.com/orchidjs/tom-select/actions/workflows/tests.yml/badge.svg"></a>
<a href="https://coveralls.io/github/orchidjs/tom-select" class="m-1 d-inline-block"><img alt="Coveralls Coverage" src="https://img.shields.io/coveralls/github/orchidjs/tom-select?color=4c1"></a>
<a href="https://github.com/orchidjs/tom-select/issues" class="m-1 d-inline-block"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/orchidjs/tom-select"></a>
</p>
Tom Select is a dynamic, framework agnostic, and lightweight (~16kb gzipped) &lt;select&gt; UI control.
With autocomplete and native-feeling keyboard navigation, it's useful for tagging, contact lists, country selectors, and so on.
Tom Select was forked from [selectize.js](https://tom-select.js.org/docs/selectize.js/) with the goal of modernizing the code base, decoupling from jQuery, and expanding functionality.
### Features
- **Smart Option Searching / Ranking**<br>Options are efficiently scored and sorted on-the-fly (using [sifter](https://github.com/orchidjs/sifter.js)). Want to search an item's title *and* description? No problem.
- **Caret between items**<br>Order matters sometimes. With the <a href="https://tom-select.js.org/plugins/caret-position">Caret Position Plugin</a>, you can use the <kbd>&larr;</kbd> and <kbd>&rarr;</kbd> arrow keys to move between selected items</li>
- **Select &amp; delete multiple items at once**<br>Hold down <kbd>command</kbd> on Mac or <kbd>ctrl</kbd> on Windows to select more than one item to delete.
- **Díåcritîçs supported**<br>Great for international environments.
- **Item creation**<br>Allow users to create items on the fly (async saving is supported; the control locks until the callback is fired).
- **Remote data loading**<br>For when you have thousands of options and want them provided by the server as the user types.
- **Extensible**<br> [Plugin API](https://tom-select.js.org/docs/plugins/) for developing custom features (uses [microplugin](https://github.com/brianreavis/microplugin.js)).
- **Accessible**, **Touch Support**, **Clean API**, ...
## Usage
```html
<input id="tom-select-it" />
<link rel="stylesheet" href="/css/tom-select.default.css">
<script src="/js/tom-select.complete.js"></script>
<script>
var config = {};
new TomSelect('#tom-select-it',config);
</script>
```
Available configuration settings are [documented here](https://tom-select.js.org/docs)
## Installation
All pre-built files needed to use Tom Select can be found in the "dist" folder via any of these sources:
<table class="table mt-5">
<tr>
<th class="border-top-0">Source</th>
<th class="border-top-0"></th>
</tr>
<tr>
<td><a href="https://www.jsdelivr.com/package/npm/tom-select?path=dist">jsDelivr</a></td>
<td>
The fastest way to add Tom Select into your project is to just include the js and css from jsDelivr.
<pre>
&lt;link href="https://cdn.jsdelivr.net/npm/tom-select/dist/css/tom-select.css" rel="stylesheet"&gt;
&lt;script src="https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.complete.min.js"&gt;&lt;/script&gt;
</pre>
</td>
</tr>
<tr>
<td><a href="https://www.npmjs.com/package/tom-select">npm</a></td>
<td><pre><code>npm i tom-select</code></pre>
<div><a href="https://tom-select.js.org/docs/contribute/">Additional CLI usage</a></div>
</td>
</tr>
<tr>
<td><a href="https://github.com/orchidjs/tom-select/">GitHub</a></td>
<td>Clone or <a href="https://github.com/orchidjs/tom-select/archive/master.zip">download</a> the full repo.
Use <code>npm run build</code> <a href="/docs/contribute">and other commands</a> to build from source, test and start the doc server.
</td>
</tr>
</table>
## Files
- [tom-select.complete.js](https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.complete.js) — Includes dependencies and plugins
- [tom-select.base.js](https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.base.js) — Does not include any plugins
- [CSS](https://www.jsdelivr.com/package/npm/tom-select?path=dist%2Fcss) — Compiled themes
- [SCSS](https://www.jsdelivr.com/package/npm/tom-select?path=dist%2Fscss) — Uncompiled theme sources
## Sponsors
<p>
Many thanks to all our sponsors who help make development possible. <a href="https://opencollective.com/tom-select">Become a sponsor</a>.
</p>
<p>
<a href="https://opencollective.com/tom-select/sponsor/0/website"><img src="https://opencollective.com/tom-select/sponsor/0/avatar.svg" alt="Trust My Paper Logo"></a>
<a href="https://opencollective.com/tom-select/sponsor/2/website"><img src="https://opencollective.com/tom-select/sponsor/2/avatar.svg" alt="WiseEssays.com"></a>
</p>
<br>
## License
Copyright &copy; 20132023 [Contributors](https://github.com/orchidjs/tom-select/graphs/contributors)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

12
node_modules/tom-select/dist/cjs/constants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export declare const KEY_A = 65;
export declare const KEY_RETURN = 13;
export declare const KEY_ESC = 27;
export declare const KEY_LEFT = 37;
export declare const KEY_UP = 38;
export declare const KEY_RIGHT = 39;
export declare const KEY_DOWN = 40;
export declare const KEY_BACKSPACE = 8;
export declare const KEY_DELETE = 46;
export declare const KEY_TAB = 9;
export declare const IS_MAC: boolean;
export declare const KEY_SHORTCUT: string;

16
node_modules/tom-select/dist/cjs/constants.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KEY_SHORTCUT = exports.IS_MAC = exports.KEY_TAB = exports.KEY_DELETE = exports.KEY_BACKSPACE = exports.KEY_DOWN = exports.KEY_RIGHT = exports.KEY_UP = exports.KEY_LEFT = exports.KEY_ESC = exports.KEY_RETURN = exports.KEY_A = void 0;
exports.KEY_A = 65;
exports.KEY_RETURN = 13;
exports.KEY_ESC = 27;
exports.KEY_LEFT = 37;
exports.KEY_UP = 38;
exports.KEY_RIGHT = 39;
exports.KEY_DOWN = 40;
exports.KEY_BACKSPACE = 8;
exports.KEY_DELETE = 46;
exports.KEY_TAB = 9;
exports.IS_MAC = typeof navigator === 'undefined' ? false : /Mac/.test(navigator.userAgent);
exports.KEY_SHORTCUT = exports.IS_MAC ? 'metaKey' : 'ctrlKey'; // ctrl key or apple key for ma
//# sourceMappingURL=constants.js.map

1
node_modules/tom-select/dist/cjs/constants.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAAM,EAAE,CAAC;AACd,QAAA,UAAU,GAAK,EAAE,CAAC;AAClB,QAAA,OAAO,GAAK,EAAE,CAAC;AACf,QAAA,QAAQ,GAAK,EAAE,CAAC;AAChB,QAAA,MAAM,GAAM,EAAE,CAAC;AACf,QAAA,SAAS,GAAK,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAK,EAAE,CAAC;AAChB,QAAA,aAAa,GAAI,CAAC,CAAC;AACnB,QAAA,UAAU,GAAK,EAAE,CAAC;AAClB,QAAA,OAAO,GAAK,CAAC,CAAC;AAEd,QAAA,MAAM,GAAU,OAAO,SAAS,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AAC3F,QAAA,YAAY,GAAI,cAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,+BAA+B"}

View File

@@ -0,0 +1,13 @@
/**
* highlight v3 | MIT license | Johann Burkard <jb@eaio.com>
* Highlights arbitrary terms in a node.
*
* - Modified by Marshal <beatgates@gmail.com> 2011-6-24 (added regex)
* - Modified by Brian Reavis <brian@thirdroute.com> 2012-8-27 (cleanup)
*/
export declare const highlight: (element: HTMLElement, regex: string | RegExp) => void;
/**
* removeHighlight fn copied from highlight v5 and
* edited to remove with(), pass js strict mode, and use without jquery
*/
export declare const removeHighlight: (el: HTMLElement) => void;

69
node_modules/tom-select/dist/cjs/contrib/highlight.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
"use strict";
/**
* highlight v3 | MIT license | Johann Burkard <jb@eaio.com>
* Highlights arbitrary terms in a node.
*
* - Modified by Marshal <beatgates@gmail.com> 2011-6-24 (added regex)
* - Modified by Brian Reavis <brian@thirdroute.com> 2012-8-27 (cleanup)
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeHighlight = exports.highlight = void 0;
const vanilla_ts_1 = require("../vanilla.js");
const highlight = (element, regex) => {
if (regex === null)
return;
// convet string to regex
if (typeof regex === 'string') {
if (!regex.length)
return;
regex = new RegExp(regex, 'i');
}
// Wrap matching part of text node with highlighting <span>, e.g.
// Soccer -> <span class="highlight">Soc</span>cer for regex = /soc/i
const highlightText = (node) => {
var match = node.data.match(regex);
if (match && node.data.length > 0) {
var spannode = document.createElement('span');
spannode.className = 'highlight';
var middlebit = node.splitText(match.index);
middlebit.splitText(match[0].length);
var middleclone = middlebit.cloneNode(true);
spannode.appendChild(middleclone);
(0, vanilla_ts_1.replaceNode)(middlebit, spannode);
return 1;
}
return 0;
};
// Recurse element node, looking for child text nodes to highlight, unless element
// is childless, <script>, <style>, or already highlighted: <span class="hightlight">
const highlightChildren = (node) => {
if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName) && (node.className !== 'highlight' || node.tagName !== 'SPAN')) {
Array.from(node.childNodes).forEach(element => {
highlightRecursive(element);
});
}
};
const highlightRecursive = (node) => {
if (node.nodeType === 3) {
return highlightText(node);
}
highlightChildren(node);
return 0;
};
highlightRecursive(element);
};
exports.highlight = highlight;
/**
* removeHighlight fn copied from highlight v5 and
* edited to remove with(), pass js strict mode, and use without jquery
*/
const removeHighlight = (el) => {
var elements = el.querySelectorAll("span.highlight");
Array.prototype.forEach.call(elements, function (el) {
var parent = el.parentNode;
parent.replaceChild(el.firstChild, el);
parent.normalize();
});
};
exports.removeHighlight = removeHighlight;
//# sourceMappingURL=highlight.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../src/contrib/highlight.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,8CAA0C;AAGnC,MAAM,SAAS,GAAG,CAAC,OAAmB,EAAE,KAAmB,EAAE,EAAE;IAErE,IAAI,KAAK,KAAK,IAAI;QAAG,OAAO;IAE5B,yBAAyB;IACzB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAE/B,IAAI,CAAC,KAAK,CAAC,MAAM;YAAG,OAAO;QAC3B,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IAGD,iEAAiE;IACjE,wEAAwE;IACxE,MAAM,aAAa,GAAG,CAAE,IAAS,EAAU,EAAE;QAE5C,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,IAAI,QAAQ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AC;IAEF,kBAAkB,CAAE,OAAO,CAAE,CAAC;AAC/B,CAAC,CAAC;AAxDW,QAAA,SAAS,aAwDpB;AAEF;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,EAAc,EAAE,EAAE;IACjD,IAAI,QAAQ,GAAG,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACrD,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAS,EAAc;QAC7D,IAAI,MAAM,GAAG,EAAE,CAAC,UAAkB,CAAC;QACnC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,UAAkB,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,CAAC,SAAS,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}

View File

@@ -0,0 +1,20 @@
/**
* MicroEvent - to make any js object an event emitter
*
* - pure javascript - server compatible, browser compatible
* - dont rely on the browser doms
* - super simple - you get it immediatly, no mistery, no magic involved
*
* @author Jerome Etienne (https://github.com/jeromeetienne)
*/
type TCallback = (...args: any) => any;
export default class MicroEvent {
_events: {
[key: string]: TCallback[];
};
constructor();
on(events: string, fct: TCallback): void;
off(events: string, fct: TCallback): void;
trigger(events: string, ...args: any): void;
}
export {};

64
node_modules/tom-select/dist/cjs/contrib/microevent.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
"use strict";
/**
* MicroEvent - to make any js object an event emitter
*
* - pure javascript - server compatible, browser compatible
* - dont rely on the browser doms
* - super simple - you get it immediatly, no mistery, no magic involved
*
* @author Jerome Etienne (https://github.com/jeromeetienne)
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Execute callback for each event in space separated list of event names
*
*/
function forEvents(events, callback) {
events.split(/\s+/).forEach((event) => {
callback(event);
});
}
class MicroEvent {
constructor() {
this._events = {};
}
on(events, fct) {
forEvents(events, (event) => {
const event_array = this._events[event] || [];
event_array.push(fct);
this._events[event] = event_array;
});
}
off(events, fct) {
var n = arguments.length;
if (n === 0) {
this._events = {};
return;
}
forEvents(events, (event) => {
if (n === 1) {
delete this._events[event];
return;
}
const event_array = this._events[event];
if (event_array === undefined)
return;
event_array.splice(event_array.indexOf(fct), 1);
this._events[event] = event_array;
});
}
trigger(events, ...args) {
var self = this;
forEvents(events, (event) => {
const event_array = self._events[event];
if (event_array === undefined)
return;
event_array.forEach(fct => {
fct.apply(self, args);
});
});
}
}
exports.default = MicroEvent;
;
//# sourceMappingURL=microevent.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"microevent.js","sourceRoot":"","sources":["../../../src/contrib/microevent.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAIH;;;GAGG;AACH,SAAS,SAAS,CAAC,MAAa,EAAC,QAA4B;IAC5D,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACrC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,MAAqB,UAAU;IAI9B;QACC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACnB,CAAC;IAED,EAAE,CAAC,MAAa,EAAE,GAAa;QAC9B,SAAS,CAAC,MAAM,EAAC,CAAC,KAAK,EAAE,EAAE;YAC1B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC9C,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;QACnC,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,MAAa,EAAE,GAAa;QAC/B,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACb,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,OAAO;QACR,CAAC;QAED,SAAS,CAAC,MAAM,EAAC,CAAC,KAAK,EAAE,EAAE;YAE1B,IAAI,CAAC,KAAK,CAAC,EAAC,CAAC;gBACZ,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC3B,OAAM;YACP,CAAC;YAED,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACxC,IAAI,WAAW,KAAK,SAAS;gBAAG,OAAO;YAEvC,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;QACnC,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,MAAa,EAAE,GAAG,IAAQ;QACjC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,SAAS,CAAC,MAAM,EAAC,CAAC,KAAK,EAAE,EAAE;YAC1B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACxC,IAAI,WAAW,KAAK,SAAS;gBAAG,OAAO;YACvC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACzB,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAE,CAAC;YACxB,CAAC,CAAC,CAAC;QAEJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAlDD,6BAkDC;AAAA,CAAC"}

View File

@@ -0,0 +1,71 @@
/**
* microplugin.js
* Copyright (c) 2013 Brian Reavis & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
type TSettings = {
[key: string]: any;
};
type TPlugins = {
names: string[];
settings: TSettings;
requested: {
[key: string]: boolean;
};
loaded: {
[key: string]: any;
};
};
export type TPluginItem = {
name: string;
options: {};
};
export type TPluginHash = {
[key: string]: {};
};
export default function MicroPlugin(Interface: any): {
new (): {
[x: string]: any;
plugins: TPlugins;
/**
* Initializes the listed plugins (with options).
* Acceptable formats:
*
* List (without options):
* ['a', 'b', 'c']
*
* List (with options):
* [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
*
* Hash (with options):
* {'a': { ... }, 'b': { ... }, 'c': { ... }}
*
* @param {array|object} plugins
*/
initializePlugins(plugins: string[] | TPluginItem[] | TPluginHash): void;
loadPlugin(name: string): void;
/**
* Initializes a plugin.
*
*/
require(name: string): any;
};
[x: string]: any;
/**
* Registers a plugin.
*
* @param {function} fn
*/
define(name: string, fn: (this: any, settings: TSettings) => any): void;
};
export {};

112
node_modules/tom-select/dist/cjs/contrib/microplugin.js generated vendored Normal file
View File

@@ -0,0 +1,112 @@
"use strict";
/**
* microplugin.js
* Copyright (c) 2013 Brian Reavis & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = MicroPlugin;
function MicroPlugin(Interface) {
Interface.plugins = {};
return class extends Interface {
constructor() {
super(...arguments);
this.plugins = {
names: [],
settings: {},
requested: {},
loaded: {}
};
}
/**
* Registers a plugin.
*
* @param {function} fn
*/
static define(name, fn) {
Interface.plugins[name] = {
'name': name,
'fn': fn
};
}
/**
* Initializes the listed plugins (with options).
* Acceptable formats:
*
* List (without options):
* ['a', 'b', 'c']
*
* List (with options):
* [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
*
* Hash (with options):
* {'a': { ... }, 'b': { ... }, 'c': { ... }}
*
* @param {array|object} plugins
*/
initializePlugins(plugins) {
var key, name;
const self = this;
const queue = [];
if (Array.isArray(plugins)) {
plugins.forEach((plugin) => {
if (typeof plugin === 'string') {
queue.push(plugin);
}
else {
self.plugins.settings[plugin.name] = plugin.options;
queue.push(plugin.name);
}
});
}
else if (plugins) {
for (key in plugins) {
if (plugins.hasOwnProperty(key)) {
self.plugins.settings[key] = plugins[key];
queue.push(key);
}
}
}
while (name = queue.shift()) {
self.require(name);
}
}
loadPlugin(name) {
var self = this;
var plugins = self.plugins;
var plugin = Interface.plugins[name];
if (!Interface.plugins.hasOwnProperty(name)) {
throw new Error('Unable to find "' + name + '" plugin');
}
plugins.requested[name] = true;
plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
plugins.names.push(name);
}
/**
* Initializes a plugin.
*
*/
require(name) {
var self = this;
var plugins = self.plugins;
if (!self.plugins.loaded.hasOwnProperty(name)) {
if (plugins.requested[name]) {
throw new Error('Plugin has circular dependency ("' + name + '")');
}
self.loadPlugin(name);
}
return plugins.loaded[name];
}
};
}
//# sourceMappingURL=microplugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"microplugin.js","sourceRoot":"","sources":["../../../src/contrib/microplugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAmBH,8BAuGC;AAvGD,SAAwB,WAAW,CAAC,SAAc;IAEjD,SAAS,CAAC,OAAO,GAAG,EAAE,CAAC;IAEvB,OAAO,KAAM,SAAQ,SAAS;QAAvB;;YAEC,YAAO,GAAY;gBACzB,KAAK,EAAO,EAAE;gBACd,QAAQ,EAAI,EAAE;gBACd,SAAS,EAAG,EAAE;gBACd,MAAM,EAAM,EAAE;aACd,CAAC;QA0FH,CAAC;QAxFA;;;;WAI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0,0 +1,52 @@
declare const _default: {
options: never[];
optgroups: never[];
plugins: never[];
delimiter: string;
splitOn: null;
persist: boolean;
diacritics: boolean;
create: null;
createOnBlur: boolean;
createFilter: null;
highlight: boolean;
openOnFocus: boolean;
shouldOpen: null;
maxOptions: number;
maxItems: null;
hideSelected: null;
duplicates: boolean;
addPrecedence: boolean;
selectOnTab: boolean;
preload: null;
allowEmptyOption: boolean;
refreshThrottle: number;
loadThrottle: number;
loadingClass: string;
dataAttr: null;
optgroupField: string;
valueField: string;
labelField: string;
disabledField: string;
optgroupLabelField: string;
optgroupValueField: string;
lockOptgroupOrder: boolean;
sortField: string;
searchField: string[];
searchConjunction: string;
mode: null;
wrapperClass: string;
controlClass: string;
dropdownClass: string;
dropdownContentClass: string;
itemClass: string;
optionClass: string;
dropdownParent: null;
controlInput: string;
copyClassesToDropdown: boolean;
placeholder: null;
hidePlaceholder: null;
shouldLoad: (query: string) => boolean;
render: {};
};
export default _default;

84
node_modules/tom-select/dist/cjs/defaults.js generated vendored Normal file
View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
options: [],
optgroups: [],
plugins: [],
delimiter: ',',
splitOn: null, // regexp or string for splitting up values from a paste command
persist: true,
diacritics: true,
create: null,
createOnBlur: false,
createFilter: null,
highlight: true,
openOnFocus: true,
shouldOpen: null,
maxOptions: 50,
maxItems: null,
hideSelected: null,
duplicates: false,
addPrecedence: false,
selectOnTab: false,
preload: null,
allowEmptyOption: false,
//closeAfterSelect: false,
refreshThrottle: 300,
loadThrottle: 300,
loadingClass: 'loading',
dataAttr: null, //'data-data',
optgroupField: 'optgroup',
valueField: 'value',
labelField: 'text',
disabledField: 'disabled',
optgroupLabelField: 'label',
optgroupValueField: 'value',
lockOptgroupOrder: false,
sortField: '$order',
searchField: ['text'],
searchConjunction: 'and',
mode: null,
wrapperClass: 'ts-wrapper',
controlClass: 'ts-control',
dropdownClass: 'ts-dropdown',
dropdownContentClass: 'ts-dropdown-content',
itemClass: 'item',
optionClass: 'option',
dropdownParent: null,
controlInput: '<input type="text" autocomplete="off" size="1" />',
copyClassesToDropdown: false,
placeholder: null,
hidePlaceholder: null,
shouldLoad: function (query) {
return query.length > 0;
},
/*
load : null, // function(query, callback) { ... }
score : null, // function(search) { ... }
onInitialize : null, // function() { ... }
onChange : null, // function(value) { ... }
onItemAdd : null, // function(value, $item) { ... }
onItemRemove : null, // function(value) { ... }
onClear : null, // function() { ... }
onOptionAdd : null, // function(value, data) { ... }
onOptionRemove : null, // function(value) { ... }
onOptionClear : null, // function() { ... }
onOptionGroupAdd : null, // function(id, data) { ... }
onOptionGroupRemove : null, // function(id) { ... }
onOptionGroupClear : null, // function() { ... }
onDropdownOpen : null, // function(dropdown) { ... }
onDropdownClose : null, // function(dropdown) { ... }
onType : null, // function(str) { ... }
onDelete : null, // function(values) { ... }
*/
render: {
/*
item: null,
optgroup: null,
optgroup_header: null,
option: null,
option_create: null
*/
}
};
//# sourceMappingURL=defaults.js.map

1
node_modules/tom-select/dist/cjs/defaults.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/defaults.ts"],"names":[],"mappings":";;AACA,kBAAe;IACd,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;IAEb,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,GAAG;IACd,OAAO,EAAE,IAAI,EAAE,gEAAgE;IAC/E,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,KAAK;IACvB,0BAA0B;IAC1B,eAAe,EAAE,GAAG;IAGpB,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,SAAS;IAEvB,QAAQ,EAAE,IAAI,EAAE,cAAc;IAC9B,aAAa,EAAE,UAAU;IACzB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,UAAU;IACzB,kBAAkB,EAAE,OAAO;IAC3B,kBAAkB,EAAE,OAAO;IAC3B,iBAAiB,EAAE,KAAK;IAExB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,iBAAiB,EAAE,KAAK;IAExB,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,YAAY;IAC1B,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,oBAAoB,EAAE,qBAAqB;IAC3C,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,QAAQ;IAErB,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,mDAAmD;IAEjE,qBAAqB,EAAE,KAAK;IAE5B,WAAW,EAAE,IAAI;IACjB,eAAe,EAAE,IAAI;IAErB,UAAU,EAAE,UAAS,KAAY;QAChC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;;;;;;MAkBE;IAEF,MAAM,EAAE;IACP;;;;;;MAME;KACF;CACD,CAAC"}

3
node_modules/tom-select/dist/cjs/getSettings.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import { TomSettings, RecursivePartial } from './types/index.ts';
import { TomInput } from './types/index.ts';
export default function getSettings(input: TomInput, settings_user: RecursivePartial<TomSettings>): TomSettings;

146
node_modules/tom-select/dist/cjs/getSettings.js generated vendored Normal file
View File

@@ -0,0 +1,146 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = getSettings;
const defaults_ts_1 = require("./defaults.js");
const utils_ts_1 = require("./utils.js");
function getSettings(input, settings_user) {
var settings = Object.assign({}, defaults_ts_1.default, settings_user);
var attr_data = settings.dataAttr;
var field_label = settings.labelField;
var field_value = settings.valueField;
var field_disabled = settings.disabledField;
var field_optgroup = settings.optgroupField;
var field_optgroup_label = settings.optgroupLabelField;
var field_optgroup_value = settings.optgroupValueField;
var tag_name = input.tagName.toLowerCase();
var placeholder = input.getAttribute('placeholder') || input.getAttribute('data-placeholder');
if (!placeholder && !settings.allowEmptyOption) {
let option = input.querySelector('option[value=""]');
if (option) {
placeholder = option.textContent;
}
}
var settings_element = {
placeholder: placeholder,
options: [],
optgroups: [],
items: [],
maxItems: null,
};
/**
* Initialize from a <select> element.
*
*/
var init_select = () => {
var tagName;
var options = settings_element.options;
var optionsMap = {};
var group_count = 1;
let $order = 0;
var readData = (el) => {
var data = Object.assign({}, el.dataset); // get plain object from DOMStringMap
var json = attr_data && data[attr_data];
if (typeof json === 'string' && json.length) {
data = Object.assign(data, JSON.parse(json));
}
return data;
};
var addOption = (option, group) => {
var value = (0, utils_ts_1.hash_key)(option.value);
if (value == null)
return;
if (!value && !settings.allowEmptyOption)
return;
// if the option already exists, it's probably been
// duplicated in another optgroup. in this case, push
// the current group to the "optgroup" property on the
// existing option so that it's rendered in both places.
if (optionsMap.hasOwnProperty(value)) {
if (group) {
var arr = optionsMap[value][field_optgroup];
if (!arr) {
optionsMap[value][field_optgroup] = group;
}
else if (!Array.isArray(arr)) {
optionsMap[value][field_optgroup] = [arr, group];
}
else {
arr.push(group);
}
}
}
else {
var option_data = readData(option);
option_data[field_label] = option_data[field_label] || option.textContent;
option_data[field_value] = option_data[field_value] || value;
option_data[field_disabled] = option_data[field_disabled] || option.disabled;
option_data[field_optgroup] = option_data[field_optgroup] || group;
option_data.$option = option;
option_data.$order = option_data.$order || ++$order;
optionsMap[value] = option_data;
options.push(option_data);
}
if (option.selected) {
settings_element.items.push(value);
}
};
var addGroup = (optgroup) => {
var id, optgroup_data;
optgroup_data = readData(optgroup);
optgroup_data[field_optgroup_label] = optgroup_data[field_optgroup_label] || optgroup.getAttribute('label') || '';
optgroup_data[field_optgroup_value] = optgroup_data[field_optgroup_value] || group_count++;
optgroup_data[field_disabled] = optgroup_data[field_disabled] || optgroup.disabled;
optgroup_data.$order = optgroup_data.$order || ++$order;
settings_element.optgroups.push(optgroup_data);
id = optgroup_data[field_optgroup_value];
(0, utils_ts_1.iterate)(optgroup.children, (option) => {
addOption(option, id);
});
};
settings_element.maxItems = input.hasAttribute('multiple') ? null : 1;
(0, utils_ts_1.iterate)(input.children, (child) => {
tagName = child.tagName.toLowerCase();
if (tagName === 'optgroup') {
addGroup(child);
}
else if (tagName === 'option') {
addOption(child);
}
});
};
/**
* Initialize from a <input type="text"> element.
*
*/
var init_textbox = () => {
const data_raw = input.getAttribute(attr_data);
if (!data_raw) {
var value = input.value.trim() || '';
if (!settings.allowEmptyOption && !value.length)
return;
const values = value.split(settings.delimiter);
(0, utils_ts_1.iterate)(values, (value) => {
const option = {};
option[field_label] = value;
option[field_value] = value;
settings_element.options.push(option);
});
settings_element.items = values;
}
else {
settings_element.options = JSON.parse(data_raw);
(0, utils_ts_1.iterate)(settings_element.options, (opt) => {
settings_element.items.push(opt[field_value]);
});
}
};
if (tag_name === 'select') {
init_select();
}
else {
init_textbox();
}
return Object.assign({}, defaults_ts_1.default, settings_element, settings_user);
}
;
//# sourceMappingURL=getSettings.js.map

1
node_modules/tom-select/dist/cjs/getSettings.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/tom-select/dist/cjs/package.json generated vendored Normal file
View File

@@ -0,0 +1 @@
{"type":"commonjs"}

View File

@@ -0,0 +1,16 @@
/**
* Plugin: "dropdown_input" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
export default function (this: TomSelect): void;

View File

@@ -0,0 +1,66 @@
"use strict";
/**
* Plugin: "dropdown_input" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const vanilla_ts_1 = require("../../vanilla.js");
function default_1() {
var self = this;
/**
* Moves the caret to the specified index.
*
* The input must be moved by leaving it in place and moving the
* siblings, due to the fact that focus cannot be restored once lost
* on mobile webkit devices
*
*/
self.hook('instead', 'setCaret', (new_pos) => {
if (self.settings.mode === 'single' || !self.control.contains(self.control_input)) {
new_pos = self.items.length;
}
else {
new_pos = Math.max(0, Math.min(self.items.length, new_pos));
if (new_pos != self.caretPos && !self.isPending) {
self.controlChildren().forEach((child, j) => {
if (j < new_pos) {
self.control_input.insertAdjacentElement('beforebegin', child);
}
else {
self.control.appendChild(child);
}
});
}
}
self.caretPos = new_pos;
});
self.hook('instead', 'moveCaret', (direction) => {
if (!self.isFocused)
return;
// move caret before or after selected items
const last_active = self.getLastActive(direction);
if (last_active) {
const idx = (0, vanilla_ts_1.nodeIndex)(last_active);
self.setCaret(direction > 0 ? idx + 1 : idx);
self.setActiveItem();
(0, vanilla_ts_1.removeClasses)(last_active, 'last-active');
// move caret left or right of current position
}
else {
self.setCaret(self.caretPos + direction);
}
});
}
;
//# sourceMappingURL=plugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins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AA4C;QAC5C,MAAM,WAAW,GAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,WAAW,EAAE,CAAC;YACjB,MAAM,GAAG,GAAG,IAAA,sBAAS,EAAC,WAAW,CAAC,CAAC;YACnC,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA,CAAC,CAAC,GAAG,CAAC,CAAC;YAC5C,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAA,0BAAa,EAAC,WAA0B,EAAC,aAAa,CAAC,CAAC;YAEzD,+CAA+C;QAC/C,CAAC;aAAI,CAAC;YACL,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;QAE1C,CAAC;IAEF,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}

View File

@@ -0,0 +1,16 @@
/**
* Plugin: "change_listener" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
export default function (this: TomSelect): void;

View File

@@ -0,0 +1,25 @@
"use strict";
/**
* Plugin: "change_listener" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const utils_ts_1 = require("../../utils.js");
function default_1() {
(0, utils_ts_1.addEvent)(this.input, 'change', () => {
this.sync();
});
}
;
//# sourceMappingURL=plugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/change_listener/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAKH,4BAIC;AAND,6CAA0C;AAE1C;IACC,IAAA,mBAAQ,EAAC,IAAI,CAAC,KAAK,EAAC,QAAQ,EAAC,GAAE,EAAE;QAChC,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC,CAAC,CAAC;AACJ,CAAC;AAAA,CAAC"}

View File

@@ -0,0 +1,17 @@
/**
* Plugin: "checkbox_options" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
import { CBOptions } from './types.ts';
export default function (this: TomSelect, userOptions: CBOptions): void;

View File

@@ -0,0 +1,108 @@
"use strict";
/**
* Plugin: "checkbox_options" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const utils_ts_1 = require("../../utils.js");
const vanilla_ts_1 = require("../../vanilla.js");
function default_1(userOptions) {
var self = this;
var orig_onOptionSelect = self.onOptionSelect;
self.settings.hideSelected = false;
const cbOptions = Object.assign({
// so that the user may add different ones as well
className: "tomselect-checkbox",
// the following default to the historic plugin's values
checkedClassNames: undefined,
uncheckedClassNames: undefined,
}, userOptions);
var UpdateChecked = function (checkbox, toCheck) {
if (toCheck) {
checkbox.checked = true;
if (cbOptions.uncheckedClassNames) {
checkbox.classList.remove(...cbOptions.uncheckedClassNames);
}
if (cbOptions.checkedClassNames) {
checkbox.classList.add(...cbOptions.checkedClassNames);
}
}
else {
checkbox.checked = false;
if (cbOptions.checkedClassNames) {
checkbox.classList.remove(...cbOptions.checkedClassNames);
}
if (cbOptions.uncheckedClassNames) {
checkbox.classList.add(...cbOptions.uncheckedClassNames);
}
}
};
// update the checkbox for an option
var UpdateCheckbox = function (option) {
setTimeout(() => {
var checkbox = option.querySelector('input.' + cbOptions.className);
if (checkbox instanceof HTMLInputElement) {
UpdateChecked(checkbox, option.classList.contains('selected'));
}
}, 1);
};
// add checkbox to option template
self.hook('after', 'setupTemplates', () => {
var orig_render_option = self.settings.render.option;
self.settings.render.option = ((data, escape_html) => {
var rendered = (0, vanilla_ts_1.getDom)(orig_render_option.call(self, data, escape_html));
var checkbox = document.createElement('input');
if (cbOptions.className) {
checkbox.classList.add(cbOptions.className);
}
checkbox.addEventListener('click', function (evt) {
(0, utils_ts_1.preventDefault)(evt);
});
checkbox.type = 'checkbox';
const hashed = (0, utils_ts_1.hash_key)(data[self.settings.valueField]);
UpdateChecked(checkbox, !!(hashed && self.items.indexOf(hashed) > -1));
rendered.prepend(checkbox);
return rendered;
});
});
// uncheck when item removed
self.on('item_remove', (value) => {
var option = self.getOption(value);
if (option) { // if dropdown hasn't been opened yet, the option won't exist
option.classList.remove('selected'); // selected class won't be removed yet
UpdateCheckbox(option);
}
});
// check when item added
self.on('item_add', (value) => {
var option = self.getOption(value);
if (option) { // if dropdown hasn't been opened yet, the option won't exist
UpdateCheckbox(option);
}
});
// remove items when selected option is clicked
self.hook('instead', 'onOptionSelect', (evt, option) => {
if (option.classList.contains('selected')) {
option.classList.remove('selected');
self.removeItem(option.dataset.value);
self.refreshOptions();
(0, utils_ts_1.preventDefault)(evt, true);
return;
}
orig_onOptionSelect.call(self, evt, option);
UpdateCheckbox(option);
});
}
;
//# sourceMappingURL=plugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/checkbox_options/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AASH,4BA2GC;AAhHD,6CAA0D;AAC1D,iDAA0C;AAI1C,mBAAwC,WAAqB;IAC5D,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC;IAE9C,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,KAAK,CAAC;IAEnC,MAAM,SAAS,GAAe,MAAM,CAAC,MAAM,CAAC;QAC3C,kDAAkD;QAClD,SAAS,EAAe,oBAAoB;QAE5C,wDAAwD;QACxD,iBAAiB,EAAO,SAAS;QACjC,mBAAmB,EAAK,SAAS;KACjC,EAAE,WAAW,CAAC,CAAC;IAGhB,IAAI,aAAa,GAAG,UAAS,QAAyB,EAAE,OAAiB;QACxE,IAAI,OAAO,EAAE,CAAC;YACb,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;YACxB,IAAI,SAAS,CAAC,mBAAmB,EAAE,CAAC;gBACnC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAC;YAC7D,CAAC;YACD,IAAI,SAAS,CAAC,iBAAiB,EAAE,CAAC;gBACjC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;YACxD,CAAC;QACF,CAAC;aAAI,CAAC;YACL,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;YACzB,IAAI,SAAS,CAAC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AC,CAAE,GAAiB,EAAE,MAAkB,EAAE,EAAE;QAE/E,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;YACnC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACtC,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAA,yBAAc,EAAC,GAAG,EAAC,IAAI,CAAC,CAAC;YACzB,OAAO;QACF,CAAC;QAEP,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAE5C,cAAc,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}

View File

@@ -0,0 +1,14 @@
export type CBOptions = {
/**
* a unique class name for the checkbox to find the input
*/
className?: string;
/**
* class name to add if checkbox is checked and remove otherwise
*/
checkedClassNames?: string[];
/**
* class name to add if checkbox was not checked and remove otherwise
*/
uncheckedClassNames?: string[];
};

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/checkbox_options/types.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,17 @@
/**
* Plugin: "dropdown_header" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
import { CBOptions } from './types.ts';
export default function (this: TomSelect, userOptions: CBOptions): void;

View File

@@ -0,0 +1,44 @@
"use strict";
/**
* Plugin: "dropdown_header" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const vanilla_ts_1 = require("../../vanilla.js");
function default_1(userOptions) {
const self = this;
const options = Object.assign({
className: 'clear-button',
title: 'Clear All',
html: (data) => {
return `<div class="${data.className}" title="${data.title}">&#10799;</div>`;
}
}, userOptions);
self.on('initialize', () => {
var button = (0, vanilla_ts_1.getDom)(options.html(options));
button.addEventListener('click', (evt) => {
if (self.isLocked)
return;
self.clear();
if (self.settings.mode === 'single' && self.settings.allowEmptyOption) {
self.addItem('');
}
evt.preventDefault();
evt.stopPropagation();
});
self.control.appendChild(button);
});
}
;
//# sourceMappingURL=plugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/clear_button/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAMH,4BA6BC;AAhCD,iDAA0C;AAG1C,mBAAwC,WAAqB;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,CAAC,IAAc,EAAE,EAAE;YACxB,OAAO,eAAe,IAAI,CAAC,SAAS,YAAY,IAAI,CAAC,KAAK,kBAAkB,CAAC;QAC9E,CAAC;KACD,EAAE,WAAW,CAAC,CAAC;IAEhB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QACxB,IAAI,MAAM,GAAG,IAAA,mBAAM,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,GAAG,EAAC,EAAE;YAEtC,IAAI,IAAI,CAAC,QAAQ;gBAAG,OAAO;YAE3B,IAAI,CAAC,KAAK,EAAE,CAAC;YAEb,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBACvE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAClB,CAAC;YAED,GAAG,CAAC,cAAc,EAAE,CAAC;YACrB,GAAG,CAAC,eAAe,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}

View File

@@ -0,0 +1,5 @@
export type CBOptions = {
className?: string;
title?: string;
html?: (data: CBOptions) => string;
};

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/clear_button/types.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,16 @@
/**
* Plugin: "drag_drop" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
export default function (this: TomSelect): void;

View File

@@ -0,0 +1,117 @@
"use strict";
/**
* Plugin: "drag_drop" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const utils_ts_1 = require("../../utils.js");
const vanilla_ts_1 = require("../../vanilla.js");
const insertAfter = (referenceNode, newNode) => {
var _a;
(_a = referenceNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, referenceNode.nextSibling);
};
const insertBefore = (referenceNode, newNode) => {
var _a;
(_a = referenceNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, referenceNode);
};
const isBefore = (referenceNode, newNode) => {
do {
newNode = newNode === null || newNode === void 0 ? void 0 : newNode.previousElementSibling;
if (referenceNode == newNode) {
return true;
}
} while (newNode && newNode.previousElementSibling);
return false;
};
function default_1() {
var self = this;
if (self.settings.mode !== 'multi')
return;
var orig_lock = self.lock;
var orig_unlock = self.unlock;
let sortable = true;
let drag_item;
/**
* Add draggable attribute to item
*/
self.hook('after', 'setupTemplates', () => {
var orig_render_item = self.settings.render.item;
self.settings.render.item = (data, escape) => {
const item = (0, vanilla_ts_1.getDom)(orig_render_item.call(self, data, escape));
(0, vanilla_ts_1.setAttr)(item, { 'draggable': 'true' });
// prevent doc_mousedown (see tom-select.ts)
const mousedown = (evt) => {
if (!sortable)
(0, utils_ts_1.preventDefault)(evt);
evt.stopPropagation();
};
const dragStart = (evt) => {
drag_item = item;
setTimeout(() => {
item.classList.add('ts-dragging');
}, 0);
};
const dragOver = (evt) => {
evt.preventDefault();
item.classList.add('ts-drag-over');
moveitem(item, drag_item);
};
const dragLeave = () => {
item.classList.remove('ts-drag-over');
};
const moveitem = (targetitem, dragitem) => {
if (dragitem === undefined)
return;
if (isBefore(dragitem, item)) {
insertAfter(targetitem, dragitem);
}
else {
insertBefore(targetitem, dragitem);
}
};
const dragend = () => {
document.querySelectorAll('.ts-drag-over').forEach(el => el.classList.remove('ts-drag-over'));
drag_item === null || drag_item === void 0 ? void 0 : drag_item.classList.remove('ts-dragging');
drag_item = undefined;
var values = [];
self.control.querySelectorAll(`[data-value]`).forEach((el) => {
if (el.dataset.value) {
let value = el.dataset.value;
if (value) {
values.push(value);
}
}
});
self.setValue(values);
};
(0, utils_ts_1.addEvent)(item, 'mousedown', mousedown);
(0, utils_ts_1.addEvent)(item, 'dragstart', dragStart);
(0, utils_ts_1.addEvent)(item, 'dragenter', dragOver);
(0, utils_ts_1.addEvent)(item, 'dragover', dragOver);
(0, utils_ts_1.addEvent)(item, 'dragleave', dragLeave);
(0, utils_ts_1.addEvent)(item, 'dragend', dragend);
return item;
};
});
self.hook('instead', 'lock', () => {
sortable = false;
return orig_lock.call(self);
});
self.hook('instead', 'unlock', () => {
sortable = true;
return orig_unlock.call(self);
});
}
;
//# sourceMappingURL=plugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/drag_drop/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AA8BH,4BAmGC;AA7HD,6CAAuE;AACvE,iDAAmD;AAGnD,MAAM,WAAW,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,EAAE;;IAC9D,MAAA,aAAa,CAAC,UAAU,0CAAE,YAAY,CAAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;AAC5E,CAAC,CAAA;AAED,MAAM,YAAY,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,EAAE;;IAC/D,MAAA,aAAa,CAAC,UAAU,0CAAE,YAAY,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAChE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IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}

View File

@@ -0,0 +1,17 @@
/**
* Plugin: "dropdown_header" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
import { DHOptions } from './types.ts';
export default function (this: TomSelect, userOptions: DHOptions): void;

View File

@@ -0,0 +1,50 @@
"use strict";
/**
* Plugin: "dropdown_header" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const vanilla_ts_1 = require("../../vanilla.js");
const utils_ts_1 = require("../../utils.js");
function default_1(userOptions) {
const self = this;
const options = Object.assign({
title: 'Untitled',
headerClass: 'dropdown-header',
titleRowClass: 'dropdown-header-title',
labelClass: 'dropdown-header-label',
closeClass: 'dropdown-header-close',
html: (data) => {
return ('<div class="' + data.headerClass + '">' +
'<div class="' + data.titleRowClass + '">' +
'<span class="' + data.labelClass + '">' + data.title + '</span>' +
'<a class="' + data.closeClass + '">&times;</a>' +
'</div>' +
'</div>');
}
}, userOptions);
self.on('initialize', () => {
var header = (0, vanilla_ts_1.getDom)(options.html(options));
var close_link = header.querySelector('.' + options.closeClass);
if (close_link) {
close_link.addEventListener('click', (evt) => {
(0, utils_ts_1.preventDefault)(evt, true);
self.close();
});
}
self.dropdown.insertBefore(header, self.dropdown.firstChild);
});
}
;
//# sourceMappingURL=plugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_header/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAOH,4BAoCC;AAxCD,iDAA0C;AAC1C,6CAAgD;AAGhD,mBAAwC,WAAqB;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,KAAK,EAAW,UAAU;QAC1B,WAAW,EAAK,iBAAiB;QACjC,aAAa,EAAG,uBAAuB;QACvC,UAAU,EAAM,uBAAuB;QACvC,UAAU,EAAM,uBAAuB;QAEvC,IAAI,EAAE,CAAC,IAAc,EAAE,EAAE;YACxB,OAAO,CACN,cAAc,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI;gBACvC,cAAc,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI;gBACzC,eAAe,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,SAAS;gBACjE,YAAY,GAAG,IAAI,CAAC,UAAU,GAAG,eAAe;gBACjD,QAAQ;gBACT,QAAQ,CACR,CAAC;QACH,CAAC;KACD,EAAE,WAAW,CAAC,CAAC;IAEhB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QACxB,IAAI,MAAM,GAAG,IAAA,mBAAM,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAE3C,IAAI,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,GAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC9D,IAAI,UAAU,EAAE,CAAC;YAChB,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,GAAG,EAAC,EAAE;gBAC1C,IAAA,yBAAc,EAAC,GAAG,EAAC,IAAI,CAAC,CAAC;gBACzB,IAAI,CAAC,KAAK,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}

View File

@@ -0,0 +1,8 @@
export type DHOptions = {
title?: string;
headerClass?: string;
titleRowClass?: string;
labelClass?: string;
closeClass?: string;
html?: (data: DHOptions) => string;
};

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_header/types.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,16 @@
/**
* Plugin: "dropdown_input" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
export default function (this: TomSelect): void;

View File

@@ -0,0 +1,77 @@
"use strict";
/**
* Plugin: "dropdown_input" (Tom Select)
* Copyright (c) contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const constants = require("../../constants.js");
const vanilla_ts_1 = require("../../vanilla.js");
const utils_ts_1 = require("../../utils.js");
function default_1() {
const self = this;
self.settings.shouldOpen = true; // make sure the input is shown even if there are no options to display in the dropdown
self.hook('before', 'setup', () => {
self.focus_node = self.control;
(0, vanilla_ts_1.addClasses)(self.control_input, 'dropdown-input');
const div = (0, vanilla_ts_1.getDom)('<div class="dropdown-input-wrap">');
div.append(self.control_input);
self.dropdown.insertBefore(div, self.dropdown.firstChild);
// set a placeholder in the select control
const placeholder = (0, vanilla_ts_1.getDom)('<input class="items-placeholder" tabindex="-1" />');
placeholder.placeholder = self.settings.placeholder || '';
self.control.append(placeholder);
});
self.on('initialize', () => {
// set tabIndex on control to -1, otherwise [shift+tab] will put focus right back on control_input
self.control_input.addEventListener('keydown', (evt) => {
//addEvent(self.control_input,'keydown' as const,(evt:KeyboardEvent) =>{
switch (evt.keyCode) {
case constants.KEY_ESC:
if (self.isOpen) {
(0, utils_ts_1.preventDefault)(evt, true);
self.close();
}
self.clearActiveItems();
return;
case constants.KEY_TAB:
self.focus_node.tabIndex = -1;
break;
}
return self.onKeyDown.call(self, evt);
});
self.on('blur', () => {
self.focus_node.tabIndex = self.isDisabled ? -1 : self.tabIndex;
});
// give the control_input focus when the dropdown is open
self.on('dropdown_open', () => {
self.control_input.focus();
});
// prevent onBlur from closing when focus is on the control_input
const orig_onBlur = self.onBlur;
self.hook('instead', 'onBlur', (evt) => {
if (evt && evt.relatedTarget == self.control_input)
return;
return orig_onBlur.call(self);
});
(0, utils_ts_1.addEvent)(self.control_input, 'blur', () => self.onBlur());
// return focus to control to allow further keyboard input
self.hook('before', 'close', () => {
if (!self.isOpen)
return;
self.focus_node.focus({ preventScroll: true });
});
});
}
;
//# sourceMappingURL=plugin.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_input/plugin.ts"],"names":[],"mappings":";AAAA;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CAAC,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IAEJ,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}

View File

@@ -0,0 +1,15 @@
/**
* Plugin: "input_autogrow" (Tom Select)
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
import type TomSelect from '../../tom-select.ts';
export default function (this: TomSelect): void;

View File

@@ -0,0 +1,47 @@
"use strict";
/**
* Plugin: "input_autogrow" (Tom Select)
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const utils_ts_1 = require("../../utils.js");
function default_1() {
var self = this;
self.on('initialize', () => {
var test_input = document.createElement('span');
var control = self.control_input;
test_input.style.cssText = 'position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ';
self.wrapper.appendChild(test_input);
var transfer_styles = ['letterSpacing', 'fontSize', 'fontFamily', 'fontWeight', 'textTransform'];
for (const style_name of transfer_styles) {
// @ts-ignore TS7015 https://stackoverflow.com/a/50506154/697576
test_input.style[style_name] = control.style[style_name];
}
/**
* Set the control width
*
*/
var resize = () => {
test_input.textContent = control.value;
control.style.width = test_input.clientWidth + 'px';
};
resize();
self.on('update item_add item_remove', resize);
(0, utils_ts_1.addEvent)(control, 'input', resize);
(0, utils_ts_1.addEvent)(control, 'keyup', resize);
(0, utils_ts_1.addEvent)(control, 'blur', resize);
(0, utils_ts_1.addEvent)(control, 'update', resize);
});
}
;
//# sourceMappingURL=plugin.js.map

Some files were not shown because too many files have changed in this diff Show More