Update
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
return [
|
||||
'controllers' => [
|
||||
'value' => [
|
||||
'namespaces' => [
|
||||
'\\Bitrix\\UI\\Avatar\\Controller' => 'avatar'
|
||||
'\\Bitrix\\UI\\Avatar\\Controller' => 'avatar',
|
||||
],
|
||||
'defaultNamespace' => '\\Bitrix\\UI\\Controller'
|
||||
'defaultNamespace' => '\\Bitrix\\UI\\Controller',
|
||||
],
|
||||
'readonly' => true,
|
||||
],
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<?
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
use Bitrix\Main\Localization\Loc;
|
||||
|
||||
Loc::loadMessages(__FILE__);
|
||||
|
||||
/**
|
||||
* Class UiButtonPanel
|
||||
*/
|
||||
class UiButtonPanel extends CBitrixComponent
|
||||
{
|
||||
/**
|
||||
* Execute component.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function executeComponent()
|
||||
{
|
||||
$this->includeComponentTemplate();
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<?
|
||||
@@ -1 +0,0 @@
|
||||
<?
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
.ui-block-wrapper {
|
||||
background-color: #fff;
|
||||
padding: 17px 20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
/**/
|
||||
.ui-block-title {
|
||||
padding: 0 2px 17px;
|
||||
border-bottom:1px solid rgba(82, 92, 105, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.ui-block-title-text {
|
||||
font: 18px "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.ui-block-title-actions-link {
|
||||
color: rgba(128, 134, 142, 0.5);
|
||||
font:13px/17px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
border-bottom:1px dashed;
|
||||
}
|
||||
/**/
|
||||
|
||||
.ui-block-content {
|
||||
}
|
||||
|
||||
.ui-block-field-container {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.ui-block-field-title {
|
||||
color: rgba(133, 140, 150, 0.7);
|
||||
font: 13px/18px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ui-block-field-content {
|
||||
font: 15px/21px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ui-block-content-actions {
|
||||
padding:14px 0 11px;
|
||||
}
|
||||
|
||||
.ui-block-content-actions-link {
|
||||
color: rgba(128, 134, 142, 0.5);
|
||||
font:13px/17px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
border-bottom:1px dashed;
|
||||
margin-right: 12px;
|
||||
}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.ui-block-wrapper{background-color:#fff;padding:17px 20px;margin-bottom:15px}.ui-block-title{padding:0 2px 17px;border-bottom:1px solid rgba(82,92,105,0.1);display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.ui-block-title-text{font:18px "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;color:#000}.ui-block-title-actions-link{color:rgba(128,134,142,0.5);font:13px/17px "Helvetica Neue",Helvetica,Arial,sans-serif;border-bottom:1px dashed}.ui-block-field-container{margin-bottom:12px}.ui-block-field-title{color:rgba(133,140,150,0.7);font:13px/18px "Helvetica Neue",Helvetica,Arial,sans-serif;display:block}.ui-block-field-content{font:15px/21px "Helvetica Neue",Helvetica,Arial,sans-serif;color:#333}.ui-block-content-actions{padding:14px 0 11px}.ui-block-content-actions-link{color:rgba(128,134,142,0.5);font:13px/17px "Helvetica Neue",Helvetica,Arial,sans-serif;border-bottom:1px dashed;margin-right:12px}
|
||||
-111
@@ -1,111 +0,0 @@
|
||||
<?
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
|
||||
|
||||
\Bitrix\Main\UI\Extension::load("ui.fonts.opensans");
|
||||
\Bitrix\Main\UI\Extension::load("ui.forms");
|
||||
|
||||
?>
|
||||
|
||||
<div class="ui-block-wrapper">
|
||||
<div class="ui-block-title">
|
||||
<div class="ui-block-title-text">Ęîíňŕęňíŕ˙ číôîđěŕöč˙</div>
|
||||
<div class="ui-block-title-actions">
|
||||
<a href="" class="ui-block-title-actions-link">Čçěĺíčňü</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-content">
|
||||
<div class="ui-block-field-container">
|
||||
<div class="ui-block-field-title">ÔČÎ</div>
|
||||
<div class="ui-block-field-content">Ŕëĺęńŕíäđŕ Ńŕíäđîâńęŕ˙ Ěčőŕéëîâíŕ</div>
|
||||
</div>
|
||||
<div class="ui-block-field-container">
|
||||
<div class="ui-block-field-title">Äîëćíîńňü</div>
|
||||
<div class="ui-block-field-content">Ěĺíĺäćĺđ ďî ěŕđęĺňčíăó</div>
|
||||
</div>
|
||||
<div class="ui-block-field-container">
|
||||
<div class="ui-block-field-title">Ďîäđŕçäĺëĺíč˙</div>
|
||||
<div class="ui-block-field-content">Ěî˙ ęîěďŕíč˙</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-content-actions">
|
||||
<a class="ui-block-content-actions-link" href="">Âűáđŕňü ďîëĺ</a>
|
||||
<a class="ui-block-content-actions-link" href="">Ńîçäŕňü ďîëĺ</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="ui-block-wrapper">
|
||||
<div class="ui-block-title">
|
||||
<div class="ui-block-title-text">Ęîíňŕęňíŕ˙ číôîđěŕöč˙</div>
|
||||
<div class="ui-block-title-actions">
|
||||
<a href="" class="ui-block-title-actions-link">Čçěĺíčňü</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-content">
|
||||
<div class="ui-block-field-container">
|
||||
<label for="" class="ui-block-field-title">input[type=text]</label>
|
||||
<div class="ui-block-field-editor">
|
||||
<div class="ui-ctl ui-ctl-textbox ui-ctl-w100">
|
||||
<input type="text" class="ui-ctl-element">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-field-container">
|
||||
<label for="" class="ui-block-field-title">select (custom div)</label>
|
||||
<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100">
|
||||
<div class="ui-ctl-after ui-ctl-icon-angle"></div>
|
||||
<div class="ui-ctl-element"> Âűáđŕííŕ˙ îďöč˙ </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-field-container">
|
||||
<label for="" class="ui-block-field-title">Select</label>
|
||||
<div class="ui-block-field-editor">
|
||||
<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100">
|
||||
<div class="ui-ctl-after ui-ctl-icon-angle"></div>
|
||||
<select class="ui-ctl-element">
|
||||
<option value="">Îďöč˙ #1</option>
|
||||
<option value="">Îďöč˙ #2</option>
|
||||
<option value="">Îďöč˙ #3</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-field-container">
|
||||
<label for="" class="ui-block-field-title">Input-Select</label>
|
||||
<div class="ui-block-field-editor">
|
||||
<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100">
|
||||
<div class="ui-ctl-after ui-ctl-icon-angle"></div>
|
||||
<input type="text" class="ui-ctl-element">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-field-container">
|
||||
<label for="" class="ui-block-field-title">Select[multiple]</label>
|
||||
<div class="ui-block-field-editor">
|
||||
<div class="ui-ctl ui-ctl-multiple-select ui-ctl-w100 ui-ctl-lg">
|
||||
<select class="ui-ctl-element" multiple size="3">
|
||||
<option value="">Îďöč˙ #1</option>
|
||||
<option value="">Îďöč˙ #2</option>
|
||||
<option value="">Îďöč˙ #3442</option>
|
||||
<option value="">Îďöč˙ #5434</option>
|
||||
<option value="">Îďöč˙ #6433</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-field-container">
|
||||
<label for="" class="ui-block-field-title">Select</label>
|
||||
<div class="ui-block-field-editor">
|
||||
<div class="ui-ctl ui-ctl-textarea ui-ctl-no-resize ui-ctl-w100">
|
||||
<textarea class="ui-ctl-element"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-block-content-actions">
|
||||
<a class="ui-block-content-actions-link" href="">Âűáđŕňü ďîëĺ</a>
|
||||
<a class="ui-block-content-actions-link" href="">Ńîçäŕňü ďîëĺ</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die;
|
||||
|
||||
use Bitrix\Main\Engine\Response\AjaxJson;
|
||||
use Bitrix\Main\Event;
|
||||
@@ -25,18 +25,26 @@ class UiFormConfigAjaxController extends \Bitrix\Main\Engine\Controller
|
||||
array $config,
|
||||
string $name = '',
|
||||
array $accessCodes = [],
|
||||
array $params = []
|
||||
)
|
||||
{
|
||||
array $params = [],
|
||||
) {
|
||||
if (
|
||||
($scopeAccess = ScopeAccess::getInstance($moduleId))
|
||||
&& $scopeAccess->canAddByEntityTypeId($entityTypeId)
|
||||
)
|
||||
{
|
||||
$result = Scope::getInstance()
|
||||
->setScopeConfig($moduleId, $entityTypeId, $name, $accessCodes, $config, $params);
|
||||
$preparedParams = [
|
||||
'forceSetToUsers' => $params['forceSetToUsers'] === 'true' ? 'Y' : 'N',
|
||||
'availableOnAdd' => $params['availableOnAdd'] === 'true' ? 'Y' : 'N',
|
||||
'availableOnUpdate' => $params['availableOnUpdate'] === 'true' ? 'Y' : 'N',
|
||||
'common' => ($params['common'] ?? 'Y') === 'Y' ? 'Y' : 'N',
|
||||
'categoryName' => (string)$params['categoryName'],
|
||||
];
|
||||
|
||||
return (is_int($result) ? $result : AjaxJson::createError(null, $result));
|
||||
$result = Scope::getInstance()
|
||||
->setScopeConfig($moduleId, $entityTypeId, $name, $accessCodes, $config, $preparedParams)
|
||||
;
|
||||
|
||||
return is_int($result) ? $result : AjaxJson::createError(null, $result);
|
||||
}
|
||||
|
||||
return $this->getAccessDenied();
|
||||
@@ -57,13 +65,20 @@ class UiFormConfigAjaxController extends \Bitrix\Main\Engine\Controller
|
||||
[
|
||||
'GUID' => $guid,
|
||||
'SCOPE' => $scope,
|
||||
'CATEGORY_NAME' => $categoryName
|
||||
]
|
||||
'CATEGORY_NAME' => $categoryName,
|
||||
],
|
||||
);
|
||||
$event->send();
|
||||
}
|
||||
|
||||
public function setScopeAction(string $moduleId, string $categoryName, string $guid, string $scope, int $userScopeId = 0)
|
||||
public function setScopeAction(
|
||||
string $moduleId,
|
||||
string $categoryName,
|
||||
string $guid,
|
||||
string $scope,
|
||||
int $userScopeId = 0,
|
||||
int $entityId = 0,
|
||||
): ?AjaxJson
|
||||
{
|
||||
if (
|
||||
$scope !== EntityEditorConfigScope::CUSTOM
|
||||
@@ -73,7 +88,14 @@ class UiFormConfigAjaxController extends \Bitrix\Main\Engine\Controller
|
||||
)
|
||||
)
|
||||
{
|
||||
Scope::getInstance()->setScope($categoryName, $guid, $scope, $userScopeId);
|
||||
if ($entityId > 0)
|
||||
{
|
||||
Scope::getInstance()->setEditScope($moduleId, $categoryName, $guid, $scope, $userScopeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
Scope::getInstance()->setCreateScope($moduleId, $categoryName, $guid, $scope, $userScopeId);
|
||||
}
|
||||
|
||||
$this->emitOnUIFormSetScope($guid, $scope, $categoryName);
|
||||
|
||||
@@ -91,6 +113,11 @@ class UiFormConfigAjaxController extends \Bitrix\Main\Engine\Controller
|
||||
*/
|
||||
public function updateScopeAccessCodesAction(string $moduleId, int $scopeId, array $accessCodes = [])
|
||||
{
|
||||
if (empty($accessCodes))
|
||||
{
|
||||
return AjaxJson::createError(null, [new \Bitrix\Main\Error('Invalid data')]);
|
||||
}
|
||||
|
||||
if (
|
||||
($scopeAccess = ScopeAccess::getInstance($moduleId))
|
||||
&& $scopeAccess->canUpdate($scopeId)
|
||||
@@ -102,12 +129,41 @@ class UiFormConfigAjaxController extends \Bitrix\Main\Engine\Controller
|
||||
return $this->getAccessDenied();
|
||||
}
|
||||
|
||||
public function copyScopeAction(string $moduleId, string $entityTypeId, int $scopeId): int|AjaxJson
|
||||
{
|
||||
if (
|
||||
($scopeAccess = ScopeAccess::getInstance($moduleId))
|
||||
&& $scopeAccess->canAddByEntityTypeId($entityTypeId)
|
||||
) {
|
||||
$result = Scope::getInstance()->copyScope($scopeId, $entityTypeId);
|
||||
|
||||
return is_int($result) ? $result : AjaxJson::createError(null, $result);
|
||||
}
|
||||
|
||||
return $this->getAccessDenied();
|
||||
}
|
||||
|
||||
public function removeScopeAction(string $moduleId, int $scopeId): bool|AjaxJson
|
||||
{
|
||||
if (
|
||||
($scopeAccess = ScopeAccess::getInstance($moduleId))
|
||||
&& $scopeAccess->canDelete($scopeId)
|
||||
) {
|
||||
Scope::getInstance()->removeByIds([$scopeId]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->getAccessDenied();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return AjaxJson
|
||||
*/
|
||||
private function getAccessDenied(): AjaxJson
|
||||
{
|
||||
$result = [new \Bitrix\Main\Error('Access denied')];
|
||||
|
||||
return AjaxJson::createError(null, $result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,15 @@
|
||||
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
|
||||
{
|
||||
die();
|
||||
die;
|
||||
}
|
||||
|
||||
use Bitrix\Main\Application;
|
||||
use Bitrix\Main\Grid\Options;
|
||||
use Bitrix\Main\Grid\Panel\Actions;
|
||||
use Bitrix\Main\Grid\Panel\Snippet;
|
||||
use Bitrix\Main\Grid\Panel\Snippet\Onchange;
|
||||
use Bitrix\Main\Loader;
|
||||
use Bitrix\Main\Localization\Loc;
|
||||
use Bitrix\Main\UI\Extension;
|
||||
use Bitrix\Main\UI\PageNavigation;
|
||||
use Bitrix\Ui\EntityForm\FormConfigData;
|
||||
use Bitrix\Ui\EntityForm\Scope;
|
||||
use Bitrix\Ui\EntityForm\ScopeAccess;
|
||||
|
||||
@@ -24,11 +21,8 @@ Extension::load(['ui.icons']);
|
||||
*/
|
||||
class UiFormConfig extends CBitrixComponent
|
||||
{
|
||||
protected
|
||||
$navParamName = 'page',
|
||||
$defaultGridSort = [
|
||||
'ID' => 'desc'
|
||||
];
|
||||
protected string $navParamName = 'page';
|
||||
protected array $defaultGridSort = ['ID' => 'desc'];
|
||||
|
||||
public function executeComponent()
|
||||
{
|
||||
@@ -48,21 +42,30 @@ class UiFormConfig extends CBitrixComponent
|
||||
{
|
||||
foreach ($request->getPost('FIELDS') as $scopeId => $row)
|
||||
{
|
||||
if (!empty($row['NAME']) && $scopeAccess->canUpdate($scopeId))
|
||||
if (!$scopeAccess->canUpdate($scopeId))
|
||||
{
|
||||
Scope::getInstance()->updateScopeName($scopeId, $row['NAME']);
|
||||
continue;
|
||||
}
|
||||
if (!empty($row['AUTO_APPLY_SCOPE']) && $scopeAccess->canUpdate($scopeId))
|
||||
|
||||
$fields = [];
|
||||
if (!empty($row['NAME']))
|
||||
{
|
||||
$autoApplyScope = ($row['AUTO_APPLY_SCOPE'] === 'Y');
|
||||
Scope::getInstance()->updateScopeAutoApplyScope($scopeId, $autoApplyScope);
|
||||
if ($row['AUTO_APPLY_SCOPE'] === 'Y')
|
||||
{
|
||||
Application::getInstance()->addBackgroundJob(
|
||||
static fn() => Scope::getInstance()->setScopeForEligibleUsers($scopeId)
|
||||
);
|
||||
}
|
||||
$fields['NAME'] = $row['NAME'];
|
||||
}
|
||||
if (!empty($row['AUTO_APPLY_SCOPE']))
|
||||
{
|
||||
$fields['AUTO_APPLY_SCOPE'] = ($row['AUTO_APPLY_SCOPE'] === 'Y') ? 'Y' : 'N';
|
||||
}
|
||||
if (!empty($row['ON_ADD']))
|
||||
{
|
||||
$fields['ON_ADD'] = ($row['ON_ADD'] === 'Y') ? 'Y' : 'N';
|
||||
}
|
||||
if (!empty($row['ON_UPDATE']))
|
||||
{
|
||||
$fields['ON_UPDATE'] = ($row['ON_UPDATE'] === 'Y') ? 'Y' : 'N';
|
||||
}
|
||||
|
||||
Scope::getInstance()->updateScope($scopeId, $fields);
|
||||
}
|
||||
}
|
||||
elseif ($request->getPost('action_button_editor_scopes') === 'delete')
|
||||
@@ -75,141 +78,19 @@ class UiFormConfig extends CBitrixComponent
|
||||
}
|
||||
}
|
||||
|
||||
$data = $this->prepareData();
|
||||
$data = FormConfigData::getInstance(
|
||||
$this->navParamName,
|
||||
preg_replace('/\W/', '', $this->arParams['MODULE_ID']),
|
||||
preg_replace('/\W/', '', $this->arParams['ENTITY_TYPE_ID']),
|
||||
)->prepare();
|
||||
|
||||
$this->arResult['grid'] = $data['grid'];
|
||||
$this->arResult['jsData'] = $data['jsData'];
|
||||
|
||||
$GLOBALS['APPLICATION']->setTitle(Loc::getMessage('UI_FORM_CONFIG_TITLE'));
|
||||
|
||||
$this->includeComponentTemplate();
|
||||
}
|
||||
|
||||
protected function prepareData(): array
|
||||
{
|
||||
$gridId = $this->getGridId();
|
||||
$grid['GRID_ID'] = $gridId;
|
||||
$grid['COLUMNS'] = $this->getColumns();
|
||||
|
||||
$gridOptions = new Options($gridId);
|
||||
$navParams = $gridOptions->getNavParams(['nPageSize' => 10]);
|
||||
$pageSize = (int)$navParams['nPageSize'];
|
||||
|
||||
$pageNavigation = new PageNavigation($this->navParamName);
|
||||
$pageNavigation->allowAllRecords(false)->setPageSize($pageSize)->initFromUri();
|
||||
|
||||
$entityTypeId = $this->arParams['ENTITY_TYPE_ID'] ?? null;
|
||||
|
||||
if ($entityTypeId)
|
||||
{
|
||||
$moduleId = $this->arParams['MODULE_ID'] ?? null;
|
||||
$list = Scope::getInstance()->getAllUserScopes($entityTypeId, $moduleId);
|
||||
}
|
||||
else
|
||||
{
|
||||
$list = [];
|
||||
}
|
||||
|
||||
$jsData = [];
|
||||
$grid['ROWS'] = [];
|
||||
|
||||
if (!empty($list))
|
||||
{
|
||||
foreach ($list as $scopeId => $scope)
|
||||
{
|
||||
$grid['ROWS'][] = [
|
||||
//'id' => $item->getId(),
|
||||
'data' => [
|
||||
'ID' => $scopeId,
|
||||
'NAME' => $scope['NAME'],
|
||||
'USERS' => '<div class="ui-editor-config" id="ui-editor-config-' . $scopeId . '"></div>',
|
||||
'AUTO_APPLY_SCOPE' => $scope['AUTO_APPLY_SCOPE'],
|
||||
]
|
||||
];
|
||||
$jsData[] = [
|
||||
'scopeId' => $scopeId,
|
||||
'members' => $scope['MEMBERS'],
|
||||
'moduleId' => $this->arParams['MODULE_ID']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$grid['NAV_PARAM_NAME'] = $this->navParamName;
|
||||
$grid['CURRENT_PAGE'] = $pageNavigation->getCurrentPage();
|
||||
$grid['NAV_OBJECT'] = $pageNavigation;
|
||||
$grid['AJAX_MODE'] = 'Y';
|
||||
$grid['ALLOW_ROWS_SORT'] = false;
|
||||
$grid['AJAX_OPTION_JUMP'] = 'N';
|
||||
$grid['AJAX_OPTION_STYLE'] = 'N';
|
||||
$grid['AJAX_OPTION_HISTORY'] = 'N';
|
||||
$grid['AJAX_ID'] = \CAjax::GetComponentID(
|
||||
'bitrix:main.ui.grid', '', ''
|
||||
);
|
||||
$grid['SHOW_PAGESIZE'] = true;
|
||||
$grid['PAGE_SIZES'] = [
|
||||
['NAME' => '10', 'VALUE' => '10'], ['NAME' => '20', 'VALUE' => '20'], ['NAME' => '50', 'VALUE' => '50']
|
||||
];
|
||||
$grid['DEFAULT_PAGE_SIZE'] = 20;
|
||||
$grid['SHOW_ROW_CHECKBOXES'] = true;
|
||||
$grid['SHOW_CHECK_ALL_CHECKBOXES'] = false;
|
||||
$grid['SHOW_ACTION_PANEL'] = true;
|
||||
|
||||
$snippet = new Snippet();
|
||||
$grid['ACTION_PANEL'] = [
|
||||
'GROUPS' => [
|
||||
'TYPE' => [
|
||||
'ITEMS' => [
|
||||
$snippet->getRemoveButton(),
|
||||
$snippet->getEditButton(),
|
||||
],
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
return [
|
||||
'grid' => $grid,
|
||||
'jsData' => $jsData
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function getGridId(): string
|
||||
{
|
||||
return 'editor_scopes';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function getColumns(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'id' => 'ID',
|
||||
'name' => 'ID',
|
||||
'default' => true,
|
||||
],
|
||||
[
|
||||
'id' => 'NAME',
|
||||
'name' => Loc::getMessage('UI_FORM_CONFIG_SCOPE_MSGVER_1'),
|
||||
'default' => true,
|
||||
'editable' => true,
|
||||
],
|
||||
[
|
||||
'id' => 'USERS',
|
||||
'name' => Loc::getMessage('UI_FORM_CONFIG_MEMBERS_MSGVER_1'),
|
||||
'default' => true,
|
||||
],
|
||||
[
|
||||
'id' => 'AUTO_APPLY_SCOPE',
|
||||
'name' => Loc::getMessage('UI_FORM_CONFIG_AUTO_APPLY_SCOPE'),
|
||||
'type' => \Bitrix\Main\Grid\Types::GRID_CHECKBOX,
|
||||
'default' => true,
|
||||
'editable' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Onchange
|
||||
*/
|
||||
@@ -222,9 +103,9 @@ class UiFormConfig extends CBitrixComponent
|
||||
'ACTION' => Actions::CALLBACK,
|
||||
'CONFIRM' => false,
|
||||
'DATA' => [
|
||||
['JS' => 'Grid.editSelectedSave()']
|
||||
]
|
||||
]
|
||||
['JS' => 'Grid.editSelectedSave()'],
|
||||
],
|
||||
],
|
||||
);
|
||||
|
||||
return $onchange;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
$MESS["UI_FORM_CONFIG_AUTO_APPLY_SCOPE"] = "Auto apply";
|
||||
$MESS["UI_FORM_CONFIG_CATEGORY"] = "Pipeline";
|
||||
$MESS["UI_FORM_CONFIG_MEMBERS_MSGVER_1"] = "Available to";
|
||||
$MESS["UI_FORM_CONFIG_ON_ADD"] = "Make layout available when creating an item";
|
||||
$MESS["UI_FORM_CONFIG_ON_UPDATE"] = "Make layout available when editing an item";
|
||||
$MESS["UI_FORM_CONFIG_SCOPE_MSGVER_1"] = "Layout";
|
||||
$MESS["UI_FORM_CONFIG_TITLE"] = "Layouts...";
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
$MESS["UI_FORM_CONFIG_AUTO_APPLY_SCOPE"] = "Автоматты түрде орнатыңыз";
|
||||
$MESS["UI_FORM_CONFIG_MEMBERS"] = "Таныстыруға қатыстылар";
|
||||
$MESS["UI_FORM_CONFIG_CATEGORY"] = "Иірім";
|
||||
$MESS["UI_FORM_CONFIG_MEMBERS_MSGVER_1"] = "Кімге қолжетімді";
|
||||
$MESS["UI_FORM_CONFIG_SCOPE"] = "Карточка";
|
||||
$MESS["UI_FORM_CONFIG_ON_ADD"] = "Жасау кезінде қолжетімді";
|
||||
$MESS["UI_FORM_CONFIG_ON_UPDATE"] = "Өңдеу кезінде қолжетімді";
|
||||
$MESS["UI_FORM_CONFIG_SCOPE_MSGVER_1"] = "Карточка түрі";
|
||||
$MESS["UI_FORM_CONFIG_TITLE"] = "Карточка түрінің баптаулары";
|
||||
|
||||
@@ -2,3 +2,7 @@
|
||||
$MESS["UI_FORM_CONFIG_SCOPE_MSGVER_1"] = "Вид карточки";
|
||||
$MESS["UI_FORM_CONFIG_MEMBERS_MSGVER_1"] = "Кому доступен";
|
||||
$MESS["UI_FORM_CONFIG_AUTO_APPLY_SCOPE"] = "Установить автоматически";
|
||||
$MESS["UI_FORM_CONFIG_ON_ADD"] = "Доступен при создании";
|
||||
$MESS["UI_FORM_CONFIG_ON_UPDATE"] = "Доступен при редактировании";
|
||||
$MESS["UI_FORM_CONFIG_CATEGORY"] = "Воронка";
|
||||
$MESS["UI_FORM_CONFIG_TITLE"] = "Настройки вида карточки";
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$MESS["UI_SCOPE_LIST_ALERT_EMPTY_CODES"] = "Select at least one item.";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_ACCEPT_COPY"] = "Yes";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_ACCEPT_DELETE"] = "Yes";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_CANCEL"] = "Cancel";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_TITLE_COPY"] = "Do you want to create a copy of this layout?";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_TITLE_DELETE"] = "Are you sure you want to delete this layout?";
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$MESS["UI_SCOPE_LIST_ALERT_EMPTY_CODES"] = "Кем дегенде бір элемент таңдалуы керек!";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_ACCEPT_COPY"] = "Иә, көшіру";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_ACCEPT_DELETE"] = "Иә, жою";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_CANCEL"] = "Болдырмау";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_TITLE_COPY"] = "Карточка түрін көшіру керек пе?";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_TITLE_DELETE"] = "Карточка түрін жою керек пе?";
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_TITLE_DELETE"] = "Удалить вид карточки?";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_ACCEPT_DELETE"] = "Да, удалить";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_CANCEL"] = "Отмена";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_TITLE_COPY"] = "Скопировать вид карточки?";
|
||||
$MESS["UI_SCOPE_LIST_CONFIRM_ACCEPT_COPY"] = "Да, скопировать";
|
||||
$MESS["UI_SCOPE_LIST_ALERT_EMPTY_CODES"] = "Должен быть выбран хотя бы один элемент!";
|
||||
+4
-239
@@ -1,243 +1,8 @@
|
||||
import { Dom, Runtime, Reflection, Tag, Text, Type } from 'main.core';
|
||||
import { EventEmitter } from 'main.core.events';
|
||||
import { Reflection } from 'main.core';
|
||||
import { ConfigItem } from './src/config-item.es6';
|
||||
import { Config } from './src/config.es6';
|
||||
|
||||
const namespace = Reflection.namespace('BX.Ui.Form');
|
||||
|
||||
class Config
|
||||
{
|
||||
isOpen = false;
|
||||
#items = [];
|
||||
popupContainer = null;
|
||||
|
||||
constructor(options: Object)
|
||||
{
|
||||
options.scopes.forEach(item => {
|
||||
item.config = this;
|
||||
this.#items.push(new BX.Ui.Form.ConfigItem(item));
|
||||
}, this);
|
||||
this.popupContainer = options.componentId;
|
||||
}
|
||||
}
|
||||
|
||||
class ConfigItem extends EventEmitter
|
||||
{
|
||||
#scopeId;
|
||||
#members;
|
||||
#node;
|
||||
#selectedItems;
|
||||
#moduleId;
|
||||
drawingIconsLimit;
|
||||
addToAccessCodesHandler;
|
||||
removeFromAccessCodesHandler;
|
||||
closePopupHandler;
|
||||
config;
|
||||
#openPopupEvent = 'BX.Ui.Form.ConfigItem:onComponentOpen';
|
||||
#reinitDialogEvent = 'BX.Main.SelectorV2:reInitDialog';
|
||||
|
||||
constructor(options: Array)
|
||||
{
|
||||
super();
|
||||
this.setEventNamespace('BX.Ui.Form');
|
||||
|
||||
this.#scopeId = (options['scopeId'] || null);
|
||||
this.#members = (options['members'] || null);
|
||||
this.#node = BX(`ui-editor-config-${this.#scopeId}`);
|
||||
this.#selectedItems = {};
|
||||
this.drawingIconsLimit = (options['drawingIconsLimit'] || 10);
|
||||
this.#moduleId = (options['moduleId'] || null);
|
||||
this.config = (options['config'] || null);
|
||||
|
||||
this.#drawMembers();
|
||||
|
||||
this.addToAccessCodesHandler = BX.delegate(this.onAddToAccessCodes, this);
|
||||
this.removeFromAccessCodesHandler = BX.delegate(this.onRemoveFromAccessCodes, this);
|
||||
this.closePopupHandler = BX.delegate(this.onClosePopup, this);
|
||||
|
||||
BX.addCustomEvent('Grid::updated', this.onGridUpdate.bind(this));
|
||||
|
||||
setTimeout(() => {
|
||||
BX.onCustomEvent('BX.Ui.Form.ConfigItem:onComponentLoad', [{openDialogWhenInit: false}])
|
||||
}, 100);
|
||||
}
|
||||
|
||||
onGridUpdate(params: Array): void
|
||||
{
|
||||
this.#adjust();
|
||||
}
|
||||
|
||||
#drawMembers(): void
|
||||
{
|
||||
if (this.#members)
|
||||
{
|
||||
let i = 0;
|
||||
for (let member in this.#members)
|
||||
{
|
||||
const item = this.#members[member];
|
||||
this.#node.appendChild(this.#createMember(item));
|
||||
if (i++ > this.drawingIconsLimit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.#node.appendChild(this.#createPlusButton());
|
||||
}
|
||||
|
||||
#createMember(member: Object): HTMLElement
|
||||
{
|
||||
const children = (member.avatar
|
||||
? Tag.render`<a href="${member.url}" class="ui-editor-config-item-avatar" title="${Text.encode(member.name)}" style="background-image: url('${member.avatar}')"></a>`
|
||||
: Tag.render`<a href="${member.url}" class="ui-icon ui-icon-xs ui-icon-common-user" title="${Text.encode(member.name)}"><i></i></a>`
|
||||
);
|
||||
|
||||
return Dom.create('div', {
|
||||
attrs: {
|
||||
class: 'ui-editor-config-item'
|
||||
},
|
||||
children: [
|
||||
children
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
#createPlusButton(): HTMLElement
|
||||
{
|
||||
return Dom.create('div', {
|
||||
events: {
|
||||
click: event => {
|
||||
if (!this.config.isOpen)
|
||||
{
|
||||
this.#showPopup();
|
||||
}
|
||||
},
|
||||
},
|
||||
attrs: {
|
||||
class: 'ui-editor-config-item ui-editor-config-item--add'
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
#showPopup(): void
|
||||
{
|
||||
this.config.isOpen = true;
|
||||
|
||||
this.#addEvents();
|
||||
|
||||
const selectorInstance = BX.Main.selectorManagerV2.controls[this.config.popupContainer].selectorInstance;
|
||||
selectorInstance.itemsSelected = {};
|
||||
|
||||
BX.onCustomEvent(this.#openPopupEvent, [{
|
||||
id: this.config.popupContainer,
|
||||
bindNode: this.#node
|
||||
}]);
|
||||
|
||||
BX.onCustomEvent(this.#reinitDialogEvent, [{
|
||||
selectorId: this.config.popupContainer,
|
||||
selectedItems: Runtime.clone(this.#getSelectedItems())
|
||||
}]);
|
||||
}
|
||||
|
||||
#addEvents(): void
|
||||
{
|
||||
EventEmitter.subscribe('BX.Ui.Form.ConfigItem:addToAccessCodes', this.addToAccessCodesHandler);
|
||||
EventEmitter.subscribe('BX.Ui.Form.ConfigItem:removeFromAccessCodes', this.removeFromAccessCodesHandler);
|
||||
EventEmitter.subscribe('BX.Ui.Form.ConfigItem:closePopup', this.closePopupHandler);
|
||||
}
|
||||
|
||||
#getSelectedItems(): Array
|
||||
{
|
||||
if (this.#members && !Type.isArrayFilled(Object.keys(this.#selectedItems)))
|
||||
{
|
||||
let items = {};
|
||||
for (let member in this.#members)
|
||||
{
|
||||
items[member] = this.#members[member].type.toUpperCase();
|
||||
}
|
||||
this.#selectedItems = items;
|
||||
}
|
||||
|
||||
return (this.#selectedItems || {});
|
||||
}
|
||||
|
||||
static onMemberSelect(params: Array): void
|
||||
{
|
||||
if (params.state === 'select')
|
||||
{
|
||||
//BX.onCustomEvent('BX.Ui.Form.ConfigItem:addToAccessCodes', params);
|
||||
EventEmitter.emit('BX.Ui.Form.ConfigItem:addToAccessCodes', params);
|
||||
}
|
||||
}
|
||||
|
||||
static onDialogClose(params: Array): void
|
||||
{
|
||||
//BX.onCustomEvent('BX.Ui.Form.ConfigItem:closePopup', params);
|
||||
EventEmitter.emit('BX.Ui.Form.ConfigItem:closePopup', params);
|
||||
}
|
||||
|
||||
onClosePopup(event: Object): void
|
||||
{
|
||||
this.config.isOpen = false;
|
||||
this.#removeEvents();
|
||||
}
|
||||
|
||||
#removeEvents(): void
|
||||
{
|
||||
EventEmitter.unsubscribe('BX.Ui.Form.ConfigItem:addToAccessCodes', this.addToAccessCodesHandler);
|
||||
EventEmitter.unsubscribe('BX.Ui.Form.ConfigItem:removeFromAccessCodes', this.removeFromAccessCodesHandler);
|
||||
EventEmitter.unsubscribe('BX.Ui.Form.ConfigItem:closePopup', this.closePopupHandler);
|
||||
}
|
||||
|
||||
onAddToAccessCodes(event: Object): void
|
||||
{
|
||||
if (event.data.state === 'select')
|
||||
{
|
||||
const itemId = event.data.item.id;
|
||||
this.#selectedItems[itemId] = event.data.entityType;
|
||||
}
|
||||
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'updateScopeAccessCodes', {
|
||||
'data': {
|
||||
moduleId: this.#moduleId,
|
||||
scopeId: this.#scopeId,
|
||||
accessCodes: this.#selectedItems
|
||||
}
|
||||
}).then(result => {
|
||||
this.#adjust(result.data);
|
||||
});
|
||||
}
|
||||
|
||||
#adjust(members: Array): void
|
||||
{
|
||||
this.#node = BX(`ui-editor-config-${this.#scopeId}`);
|
||||
|
||||
if (members)
|
||||
{
|
||||
this.#members = members;
|
||||
}
|
||||
|
||||
if (this.#node)
|
||||
{
|
||||
while (this.#node.firstChild)
|
||||
{
|
||||
this.#node.removeChild(this.#node.firstChild);
|
||||
}
|
||||
this.#drawMembers();
|
||||
}
|
||||
}
|
||||
|
||||
static onMemberUnselect(params: Array): void
|
||||
{
|
||||
EventEmitter.emit('BX.Ui.Form.ConfigItem:removeFromAccessCodes', params);
|
||||
//BX.onCustomEvent('BX.Ui.Form.ConfigItem:removeFromAccessCodes', params);
|
||||
}
|
||||
|
||||
onRemoveFromAccessCodes(event: Object): void
|
||||
{
|
||||
const itemId = event.data.item.id;
|
||||
delete this.#selectedItems[itemId]
|
||||
this.onAddToAccessCodes(event);
|
||||
}
|
||||
}
|
||||
|
||||
namespace.Config = Config;
|
||||
namespace.ConfigItem = ConfigItem;
|
||||
namespace.ConfigItem = ConfigItem;
|
||||
|
||||
+389
-175
@@ -1,180 +1,329 @@
|
||||
/* eslint-disable */
|
||||
(function (exports,main_core,main_core_events) {
|
||||
(function (exports,main_core_events,ui_entitySelector,main_core,ui_buttons,ui_dialogs_messagebox) {
|
||||
'use strict';
|
||||
|
||||
var _templateObject, _templateObject2;
|
||||
/**
|
||||
* @bxjs_lang_path template.php
|
||||
*/
|
||||
|
||||
var Config = /*#__PURE__*/function () {
|
||||
function Config() {
|
||||
babelHelpers.classCallCheck(this, Config);
|
||||
}
|
||||
babelHelpers.createClass(Config, null, [{
|
||||
key: "popupIsOpen",
|
||||
value: function popupIsOpen() {
|
||||
return this.isOpen;
|
||||
}
|
||||
}, {
|
||||
key: "setPopupClose",
|
||||
value: function setPopupClose() {
|
||||
this.isOpen = false;
|
||||
}
|
||||
}, {
|
||||
key: "setPopupOpen",
|
||||
value: function setPopupOpen() {
|
||||
this.isOpen = true;
|
||||
}
|
||||
}, {
|
||||
key: "isSubscribed",
|
||||
value: function isSubscribed(scopeId) {
|
||||
return Config.subscribedItems.includes(scopeId);
|
||||
}
|
||||
}, {
|
||||
key: "addSubscribed",
|
||||
value: function addSubscribed(scopeId) {
|
||||
Config.subscribedItems.push(scopeId);
|
||||
}
|
||||
}, {
|
||||
key: "showConfirmDialog",
|
||||
value: function showConfirmDialog(title, acceptButtonText, acceptFunc) {
|
||||
ui_dialogs_messagebox.MessageBox.confirm(title, acceptFunc, acceptButtonText, undefined, undefined, true);
|
||||
}
|
||||
}]);
|
||||
return Config;
|
||||
}();
|
||||
babelHelpers.defineProperty(Config, "isOpen", false);
|
||||
babelHelpers.defineProperty(Config, "subscribedItems", []);
|
||||
|
||||
var _templateObject, _templateObject2, _templateObject3;
|
||||
function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
|
||||
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
||||
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
||||
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
||||
var namespace = main_core.Reflection.namespace('BX.Ui.Form');
|
||||
var _items = /*#__PURE__*/new WeakMap();
|
||||
var Config = function Config(options) {
|
||||
var _this = this;
|
||||
babelHelpers.classCallCheck(this, Config);
|
||||
babelHelpers.defineProperty(this, "isOpen", false);
|
||||
_classPrivateFieldInitSpec(this, _items, {
|
||||
writable: true,
|
||||
value: []
|
||||
});
|
||||
babelHelpers.defineProperty(this, "popupContainer", null);
|
||||
options.scopes.forEach(function (item) {
|
||||
item.config = _this;
|
||||
babelHelpers.classPrivateFieldGet(_this, _items).push(new BX.Ui.Form.ConfigItem(item));
|
||||
}, this);
|
||||
this.popupContainer = options.componentId;
|
||||
};
|
||||
function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
|
||||
|
||||
/**
|
||||
* @bxjs_lang_path template.php
|
||||
*/
|
||||
|
||||
var MAX_SHOWN_MEMBERS = 3;
|
||||
var _scopeId = /*#__PURE__*/new WeakMap();
|
||||
var _members = /*#__PURE__*/new WeakMap();
|
||||
var _node = /*#__PURE__*/new WeakMap();
|
||||
var _selectedItems = /*#__PURE__*/new WeakMap();
|
||||
var _moduleId = /*#__PURE__*/new WeakMap();
|
||||
var _openPopupEvent = /*#__PURE__*/new WeakMap();
|
||||
var _reinitDialogEvent = /*#__PURE__*/new WeakMap();
|
||||
var _drawMembers = /*#__PURE__*/new WeakSet();
|
||||
var _createMember = /*#__PURE__*/new WeakSet();
|
||||
var _createPlusButton = /*#__PURE__*/new WeakSet();
|
||||
var _showPopup = /*#__PURE__*/new WeakSet();
|
||||
var _addEvents = /*#__PURE__*/new WeakSet();
|
||||
var _config = /*#__PURE__*/new WeakMap();
|
||||
var _entityTypeId = /*#__PURE__*/new WeakMap();
|
||||
var _memberSelector = /*#__PURE__*/new WeakMap();
|
||||
var _useHumanResourcesModule = /*#__PURE__*/new WeakMap();
|
||||
var _subscribeEvents = /*#__PURE__*/new WeakSet();
|
||||
var _getMemberSelector = /*#__PURE__*/new WeakSet();
|
||||
var _getSelectedItems = /*#__PURE__*/new WeakSet();
|
||||
var _removeEvents = /*#__PURE__*/new WeakSet();
|
||||
var _adjust = /*#__PURE__*/new WeakSet();
|
||||
var _drawMembers = /*#__PURE__*/new WeakSet();
|
||||
var _createMemberElement = /*#__PURE__*/new WeakSet();
|
||||
var _createPlusButton = /*#__PURE__*/new WeakSet();
|
||||
var _createNumberButton = /*#__PURE__*/new WeakSet();
|
||||
var _showPopup = /*#__PURE__*/new WeakSet();
|
||||
var _onMemberAdd = /*#__PURE__*/new WeakMap();
|
||||
var _onMemberRemove = /*#__PURE__*/new WeakMap();
|
||||
var _getMemberFromEvent = /*#__PURE__*/new WeakMap();
|
||||
var _onClosePopup = /*#__PURE__*/new WeakMap();
|
||||
var _showAlertDialog = /*#__PURE__*/new WeakSet();
|
||||
var _getItemIdByAccessCode = /*#__PURE__*/new WeakSet();
|
||||
var _getAccessCodeByItem = /*#__PURE__*/new WeakSet();
|
||||
var _onError = /*#__PURE__*/new WeakSet();
|
||||
var _updateScopeAccessCodes = /*#__PURE__*/new WeakMap();
|
||||
var _copyContextAction = /*#__PURE__*/new WeakMap();
|
||||
var _deleteContextAction = /*#__PURE__*/new WeakMap();
|
||||
var _responseAction = /*#__PURE__*/new WeakSet();
|
||||
var _notifyStatus = /*#__PURE__*/new WeakSet();
|
||||
var ConfigItem = /*#__PURE__*/function (_EventEmitter) {
|
||||
babelHelpers.inherits(ConfigItem, _EventEmitter);
|
||||
function ConfigItem(options) {
|
||||
var _this2;
|
||||
var _this;
|
||||
babelHelpers.classCallCheck(this, ConfigItem);
|
||||
_this2 = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(ConfigItem).call(this));
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _adjust);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _removeEvents);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _getSelectedItems);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _addEvents);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _showPopup);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _createPlusButton);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _createMember);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this2), _drawMembers);
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this2), _scopeId, {
|
||||
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(ConfigItem).call(this));
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _notifyStatus);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _responseAction);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _onError);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _getAccessCodeByItem);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _getItemIdByAccessCode);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _showAlertDialog);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _showPopup);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _createNumberButton);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _createPlusButton);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _createMemberElement);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _drawMembers);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _getSelectedItems);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _getMemberSelector);
|
||||
_classPrivateMethodInitSpec(babelHelpers.assertThisInitialized(_this), _subscribeEvents);
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _scopeId, {
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this2), _members, {
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _members, {
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this2), _node, {
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _node, {
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this2), _selectedItems, {
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _selectedItems, {
|
||||
writable: true,
|
||||
value: []
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _moduleId, {
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this2), _moduleId, {
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _config, {
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this2), _openPopupEvent, {
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _entityTypeId, {
|
||||
writable: true,
|
||||
value: 'BX.Ui.Form.ConfigItem:onComponentOpen'
|
||||
value: void 0
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this2), _reinitDialogEvent, {
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _memberSelector, {
|
||||
writable: true,
|
||||
value: 'BX.Main.SelectorV2:reInitDialog'
|
||||
value: void 0
|
||||
});
|
||||
_this2.setEventNamespace('BX.Ui.Form');
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this2), _scopeId, options['scopeId'] || null);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this2), _members, options['members'] || null);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this2), _node, BX("ui-editor-config-".concat(babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this2), _scopeId))));
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this2), _selectedItems, {});
|
||||
_this2.drawingIconsLimit = options['drawingIconsLimit'] || 10;
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this2), _moduleId, options['moduleId'] || null);
|
||||
_this2.config = options['config'] || null;
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this2), _drawMembers, _drawMembers2).call(babelHelpers.assertThisInitialized(_this2));
|
||||
_this2.addToAccessCodesHandler = BX.delegate(_this2.onAddToAccessCodes, babelHelpers.assertThisInitialized(_this2));
|
||||
_this2.removeFromAccessCodesHandler = BX.delegate(_this2.onRemoveFromAccessCodes, babelHelpers.assertThisInitialized(_this2));
|
||||
_this2.closePopupHandler = BX.delegate(_this2.onClosePopup, babelHelpers.assertThisInitialized(_this2));
|
||||
BX.addCustomEvent('Grid::updated', _this2.onGridUpdate.bind(babelHelpers.assertThisInitialized(_this2)));
|
||||
setTimeout(function () {
|
||||
BX.onCustomEvent('BX.Ui.Form.ConfigItem:onComponentLoad', [{
|
||||
openDialogWhenInit: false
|
||||
}]);
|
||||
}, 100);
|
||||
return _this2;
|
||||
}
|
||||
babelHelpers.createClass(ConfigItem, [{
|
||||
key: "onGridUpdate",
|
||||
value: function onGridUpdate(params) {
|
||||
_classPrivateMethodGet(this, _adjust, _adjust2).call(this);
|
||||
}
|
||||
}, {
|
||||
key: "onClosePopup",
|
||||
value: function onClosePopup(event) {
|
||||
this.config.isOpen = false;
|
||||
_classPrivateMethodGet(this, _removeEvents, _removeEvents2).call(this);
|
||||
}
|
||||
}, {
|
||||
key: "onAddToAccessCodes",
|
||||
value: function onAddToAccessCodes(event) {
|
||||
var _this3 = this;
|
||||
if (event.data.state === 'select') {
|
||||
var itemId = event.data.item.id;
|
||||
babelHelpers.classPrivateFieldGet(this, _selectedItems)[itemId] = event.data.entityType;
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _useHumanResourcesModule, {
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _onMemberAdd, {
|
||||
writable: true,
|
||||
value: function value(event) {
|
||||
var member = babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _getMemberFromEvent).call(babelHelpers.assertThisInitialized(_this), event);
|
||||
babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _selectedItems).push([member.type, member.id]);
|
||||
babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _members)[member.accessCode] = member;
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _drawMembers, _drawMembers2).call(babelHelpers.assertThisInitialized(_this), true);
|
||||
}
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'updateScopeAccessCodes', {
|
||||
'data': {
|
||||
moduleId: babelHelpers.classPrivateFieldGet(this, _moduleId),
|
||||
scopeId: babelHelpers.classPrivateFieldGet(this, _scopeId),
|
||||
accessCodes: babelHelpers.classPrivateFieldGet(this, _selectedItems)
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _onMemberRemove, {
|
||||
writable: true,
|
||||
value: function value(event) {
|
||||
var member = babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _getMemberFromEvent).call(babelHelpers.assertThisInitialized(_this), event);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _selectedItems, babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _memberSelector).getSelectedItems());
|
||||
delete babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _members)[member.accessCode];
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _drawMembers, _drawMembers2).call(babelHelpers.assertThisInitialized(_this), true);
|
||||
}
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _getMemberFromEvent, {
|
||||
writable: true,
|
||||
value: function value(event) {
|
||||
var _event$getData = event.getData(),
|
||||
item = _event$getData.item;
|
||||
return {
|
||||
id: item.id,
|
||||
accessCode: _classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _getAccessCodeByItem, _getAccessCodeByItem2).call(babelHelpers.assertThisInitialized(_this), item),
|
||||
type: item.entityId,
|
||||
name: item.title.text,
|
||||
avatar: main_core.Type.isStringFilled(item.avatar) ? item.avatar : null
|
||||
};
|
||||
}
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _onClosePopup, {
|
||||
writable: true,
|
||||
value: function value() {
|
||||
if (BX.type.isNotEmptyObject(babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _members))) {
|
||||
babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _updateScopeAccessCodes).call(babelHelpers.assertThisInitialized(_this));
|
||||
babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _config).setPopupClose();
|
||||
} else {
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _showAlertDialog, _showAlertDialog2).call(babelHelpers.assertThisInitialized(_this));
|
||||
}
|
||||
}).then(function (result) {
|
||||
_classPrivateMethodGet(_this3, _adjust, _adjust2).call(_this3, result.data);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "onRemoveFromAccessCodes",
|
||||
value: function onRemoveFromAccessCodes(event) {
|
||||
var itemId = event.data.item.id;
|
||||
delete babelHelpers.classPrivateFieldGet(this, _selectedItems)[itemId];
|
||||
this.onAddToAccessCodes(event);
|
||||
}
|
||||
}], [{
|
||||
key: "onMemberSelect",
|
||||
value: function onMemberSelect(params) {
|
||||
if (params.state === 'select') {
|
||||
//BX.onCustomEvent('BX.Ui.Form.ConfigItem:addToAccessCodes', params);
|
||||
main_core_events.EventEmitter.emit('BX.Ui.Form.ConfigItem:addToAccessCodes', params);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "onDialogClose",
|
||||
value: function onDialogClose(params) {
|
||||
//BX.onCustomEvent('BX.Ui.Form.ConfigItem:closePopup', params);
|
||||
main_core_events.EventEmitter.emit('BX.Ui.Form.ConfigItem:closePopup', params);
|
||||
}
|
||||
}, {
|
||||
key: "onMemberUnselect",
|
||||
value: function onMemberUnselect(params) {
|
||||
main_core_events.EventEmitter.emit('BX.Ui.Form.ConfigItem:removeFromAccessCodes', params);
|
||||
//BX.onCustomEvent('BX.Ui.Form.ConfigItem:removeFromAccessCodes', params);
|
||||
}
|
||||
}]);
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _updateScopeAccessCodes, {
|
||||
writable: true,
|
||||
value: function value() {
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'updateScopeAccessCodes', {
|
||||
data: {
|
||||
moduleId: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _moduleId),
|
||||
scopeId: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _scopeId),
|
||||
accessCodes: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _members)
|
||||
}
|
||||
}).then(function (result) {
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _responseAction, _responseAction2).call(babelHelpers.assertThisInitialized(_this));
|
||||
})["catch"](_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _onError, _onError2).bind(babelHelpers.assertThisInitialized(_this)));
|
||||
}
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _copyContextAction, {
|
||||
writable: true,
|
||||
value: function value(event) {
|
||||
if (event.data.scopeId !== main_core.Text.toInteger(babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _scopeId))) {
|
||||
return;
|
||||
}
|
||||
babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _config).showConfirmDialog(main_core.Loc.getMessage('UI_SCOPE_LIST_CONFIRM_TITLE_COPY'), main_core.Loc.getMessage('UI_SCOPE_LIST_CONFIRM_ACCEPT_COPY'), function () {
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'copyScope', {
|
||||
data: {
|
||||
moduleId: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _moduleId),
|
||||
entityTypeId: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _entityTypeId),
|
||||
scopeId: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _scopeId)
|
||||
}
|
||||
}).then(function (result) {
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _responseAction, _responseAction2).call(babelHelpers.assertThisInitialized(_this));
|
||||
})["catch"](_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _onError, _onError2).bind(babelHelpers.assertThisInitialized(_this)));
|
||||
return true;
|
||||
});
|
||||
}
|
||||
});
|
||||
_classPrivateFieldInitSpec(babelHelpers.assertThisInitialized(_this), _deleteContextAction, {
|
||||
writable: true,
|
||||
value: function value(event) {
|
||||
if (event.data.scopeId !== main_core.Text.toInteger(babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _scopeId))) {
|
||||
return;
|
||||
}
|
||||
babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _config).showConfirmDialog(main_core.Loc.getMessage('UI_SCOPE_LIST_CONFIRM_TITLE_DELETE'), main_core.Loc.getMessage('UI_SCOPE_LIST_CONFIRM_ACCEPT_DELETE'), function () {
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'removeScope', {
|
||||
data: {
|
||||
moduleId: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _moduleId),
|
||||
scopeId: babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _scopeId)
|
||||
}
|
||||
}).then(function (result) {
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _responseAction, _responseAction2).call(babelHelpers.assertThisInitialized(_this));
|
||||
})["catch"](_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _onError, _onError2).bind(babelHelpers.assertThisInitialized(_this)));
|
||||
return true;
|
||||
});
|
||||
}
|
||||
});
|
||||
_this.setEventNamespace('BX.Ui.Form');
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _scopeId, options.scopeId || null);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _members, options.members || null);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _node, BX("ui-editor-config-".concat(babelHelpers.classPrivateFieldGet(babelHelpers.assertThisInitialized(_this), _scopeId))));
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _moduleId, options.moduleId || null);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _config, Config);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _entityTypeId, options.entityTypeId || null);
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _useHumanResourcesModule, BX.prop.getBoolean(options, 'useHumanResourcesModule', false));
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _drawMembers, _drawMembers2).call(babelHelpers.assertThisInitialized(_this));
|
||||
babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(_this), _memberSelector, _classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _getMemberSelector, _getMemberSelector2).call(babelHelpers.assertThisInitialized(_this)));
|
||||
_classPrivateMethodGet(babelHelpers.assertThisInitialized(_this), _subscribeEvents, _subscribeEvents2).call(babelHelpers.assertThisInitialized(_this));
|
||||
return _this;
|
||||
}
|
||||
return ConfigItem;
|
||||
}(main_core_events.EventEmitter);
|
||||
function _drawMembers2() {
|
||||
if (babelHelpers.classPrivateFieldGet(this, _members)) {
|
||||
var i = 0;
|
||||
for (var member in babelHelpers.classPrivateFieldGet(this, _members)) {
|
||||
var item = babelHelpers.classPrivateFieldGet(this, _members)[member];
|
||||
babelHelpers.classPrivateFieldGet(this, _node).appendChild(_classPrivateMethodGet(this, _createMember, _createMember2).call(this, item));
|
||||
if (i++ > this.drawingIconsLimit) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
function _subscribeEvents2() {
|
||||
if (!babelHelpers.classPrivateFieldGet(this, _config).isSubscribed(babelHelpers.classPrivateFieldGet(this, _scopeId))) {
|
||||
main_core_events.EventEmitter.subscribe('BX.Ui.Form.ConfigItem:copyContextAction', babelHelpers.classPrivateFieldGet(this, _copyContextAction));
|
||||
main_core_events.EventEmitter.subscribe('BX.Ui.Form.ConfigItem:deleteContextAction', babelHelpers.classPrivateFieldGet(this, _deleteContextAction));
|
||||
babelHelpers.classPrivateFieldGet(this, _config).addSubscribed(babelHelpers.classPrivateFieldGet(this, _scopeId));
|
||||
}
|
||||
babelHelpers.classPrivateFieldGet(this, _node).appendChild(_classPrivateMethodGet(this, _createPlusButton, _createPlusButton2).call(this));
|
||||
}
|
||||
function _createMember2(member) {
|
||||
var children = member.avatar ? main_core.Tag.render(_templateObject || (_templateObject = babelHelpers.taggedTemplateLiteral(["<a href=\"", "\" class=\"ui-editor-config-item-avatar\" title=\"", "\" style=\"background-image: url('", "')\"></a>"])), member.url, main_core.Text.encode(member.name), member.avatar) : main_core.Tag.render(_templateObject2 || (_templateObject2 = babelHelpers.taggedTemplateLiteral(["<a href=\"", "\" class=\"ui-icon ui-icon-xs ui-icon-common-user\" title=\"", "\"><i></i></a>"])), member.url, main_core.Text.encode(member.name));
|
||||
function _getMemberSelector2() {
|
||||
return new ui_entitySelector.Dialog({
|
||||
targetNode: babelHelpers.classPrivateFieldGet(this, _node),
|
||||
enableSearch: true,
|
||||
context: 'EDITOR_CONFIG_USER_CONTEXT',
|
||||
preselectedItems: _classPrivateMethodGet(this, _getSelectedItems, _getSelectedItems2).call(this),
|
||||
items: [],
|
||||
entities: [{
|
||||
id: 'user'
|
||||
}, {
|
||||
id: 'project'
|
||||
}, {
|
||||
id: babelHelpers.classPrivateFieldGet(this, _useHumanResourcesModule) ? 'structure-node' : 'department',
|
||||
options: {
|
||||
selectMode: 'usersAndDepartments'
|
||||
}
|
||||
}],
|
||||
events: {
|
||||
'Item:onSelect': babelHelpers.classPrivateFieldGet(this, _onMemberAdd),
|
||||
'Item:onDeselect': babelHelpers.classPrivateFieldGet(this, _onMemberRemove),
|
||||
onHide: babelHelpers.classPrivateFieldGet(this, _onClosePopup)
|
||||
}
|
||||
});
|
||||
}
|
||||
function _getSelectedItems2() {
|
||||
var _this2 = this;
|
||||
if (babelHelpers.classPrivateFieldGet(this, _members) && !main_core.Type.isArrayFilled(Object.keys(babelHelpers.classPrivateFieldGet(this, _selectedItems)))) {
|
||||
var items = [];
|
||||
var members = babelHelpers.classPrivateFieldGet(this, _members);
|
||||
Object.entries(members).forEach(function (_ref) {
|
||||
var _ref2 = babelHelpers.slicedToArray(_ref, 2),
|
||||
key = _ref2[0],
|
||||
value = _ref2[1];
|
||||
items.push(_classPrivateMethodGet(_this2, _getItemIdByAccessCode, _getItemIdByAccessCode2).call(_this2, key));
|
||||
});
|
||||
babelHelpers.classPrivateFieldSet(this, _selectedItems, items);
|
||||
}
|
||||
return babelHelpers.classPrivateFieldGet(this, _selectedItems) || [];
|
||||
}
|
||||
function _drawMembers2(withClean) {
|
||||
var _this3 = this;
|
||||
if (!babelHelpers.classPrivateFieldGet(this, _members)) {
|
||||
return;
|
||||
}
|
||||
if (withClean) {
|
||||
main_core.Dom.clean(babelHelpers.classPrivateFieldGet(this, _node));
|
||||
}
|
||||
var shownMembers = babelHelpers.classPrivateFieldGet(this, _members);
|
||||
var notShownMembersCount = 0;
|
||||
if (Object.values(babelHelpers.classPrivateFieldGet(this, _members)).length > MAX_SHOWN_MEMBERS) {
|
||||
shownMembers = Object.values(babelHelpers.classPrivateFieldGet(this, _members)).slice(0, MAX_SHOWN_MEMBERS);
|
||||
notShownMembersCount = Object.values(babelHelpers.classPrivateFieldGet(this, _members)).length - MAX_SHOWN_MEMBERS;
|
||||
}
|
||||
Object.values(shownMembers).forEach(function (item) {
|
||||
main_core.Dom.append(_classPrivateMethodGet(_this3, _createMemberElement, _createMemberElement2).call(_this3, item), babelHelpers.classPrivateFieldGet(_this3, _node));
|
||||
});
|
||||
if (notShownMembersCount > 0) {
|
||||
main_core.Dom.append(_classPrivateMethodGet(this, _createNumberButton, _createNumberButton2).call(this, notShownMembersCount), babelHelpers.classPrivateFieldGet(this, _node));
|
||||
}
|
||||
main_core.Dom.append(_classPrivateMethodGet(this, _createPlusButton, _createPlusButton2).call(this), babelHelpers.classPrivateFieldGet(this, _node));
|
||||
}
|
||||
function _createMemberElement2(member) {
|
||||
var children = member.avatar ? main_core.Tag.render(_templateObject || (_templateObject = babelHelpers.taggedTemplateLiteral(["<a href=\"", "\" class=\"ui-editor-config-item-avatar\" title=\"", "\" style=\"background-image: url('", "')\"></a>"])), member.url, main_core.Text.encode(member.name), encodeURI(main_core.Text.encode(member.avatar))) : main_core.Tag.render(_templateObject2 || (_templateObject2 = babelHelpers.taggedTemplateLiteral(["<a href=\"", "\" class=\"ui-icon ui-icon-xs ui-icon-common-user\" title=\"", "\"><i></i></a>"])), member.url, main_core.Text.encode(member.name));
|
||||
return main_core.Dom.create('div', {
|
||||
attrs: {
|
||||
"class": 'ui-editor-config-item'
|
||||
@@ -187,7 +336,7 @@
|
||||
return main_core.Dom.create('div', {
|
||||
events: {
|
||||
click: function click(event) {
|
||||
if (!_this4.config.isOpen) {
|
||||
if (!babelHelpers.classPrivateFieldGet(_this4, _config).popupIsOpen()) {
|
||||
_classPrivateMethodGet(_this4, _showPopup, _showPopup2).call(_this4);
|
||||
}
|
||||
}
|
||||
@@ -197,54 +346,119 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function _createNumberButton2(number) {
|
||||
return main_core.Tag.render(_templateObject3 || (_templateObject3 = babelHelpers.taggedTemplateLiteral(["<div class=\"ui-editor-config-item\"><span href=\"#\" class=\"ui-editor-config-item--number\">+", "</span></div>"])), number);
|
||||
}
|
||||
function _showPopup2() {
|
||||
this.config.isOpen = true;
|
||||
_classPrivateMethodGet(this, _addEvents, _addEvents2).call(this);
|
||||
var selectorInstance = BX.Main.selectorManagerV2.controls[this.config.popupContainer].selectorInstance;
|
||||
selectorInstance.itemsSelected = {};
|
||||
BX.onCustomEvent(babelHelpers.classPrivateFieldGet(this, _openPopupEvent), [{
|
||||
id: this.config.popupContainer,
|
||||
bindNode: babelHelpers.classPrivateFieldGet(this, _node)
|
||||
}]);
|
||||
BX.onCustomEvent(babelHelpers.classPrivateFieldGet(this, _reinitDialogEvent), [{
|
||||
selectorId: this.config.popupContainer,
|
||||
selectedItems: main_core.Runtime.clone(_classPrivateMethodGet(this, _getSelectedItems, _getSelectedItems2).call(this))
|
||||
}]);
|
||||
babelHelpers.classPrivateFieldGet(this, _config).setPopupOpen();
|
||||
babelHelpers.classPrivateFieldGet(this, _memberSelector).show();
|
||||
}
|
||||
function _addEvents2() {
|
||||
main_core_events.EventEmitter.subscribe('BX.Ui.Form.ConfigItem:addToAccessCodes', this.addToAccessCodesHandler);
|
||||
main_core_events.EventEmitter.subscribe('BX.Ui.Form.ConfigItem:removeFromAccessCodes', this.removeFromAccessCodesHandler);
|
||||
main_core_events.EventEmitter.subscribe('BX.Ui.Form.ConfigItem:closePopup', this.closePopupHandler);
|
||||
}
|
||||
function _getSelectedItems2() {
|
||||
if (babelHelpers.classPrivateFieldGet(this, _members) && !main_core.Type.isArrayFilled(Object.keys(babelHelpers.classPrivateFieldGet(this, _selectedItems)))) {
|
||||
var items = {};
|
||||
for (var member in babelHelpers.classPrivateFieldGet(this, _members)) {
|
||||
items[member] = babelHelpers.classPrivateFieldGet(this, _members)[member].type.toUpperCase();
|
||||
function _showAlertDialog2() {
|
||||
var _this5 = this;
|
||||
var alert = ui_dialogs_messagebox.MessageBox.create({
|
||||
message: main_core.Loc.getMessage('UI_SCOPE_LIST_ALERT_EMPTY_CODES'),
|
||||
useAirDesign: true,
|
||||
buttons: ui_dialogs_messagebox.MessageBoxButtons.OK,
|
||||
onOk: function onOk(messagebox) {
|
||||
messagebox.close();
|
||||
babelHelpers.classPrivateFieldGet(_this5, _memberSelector).show();
|
||||
}
|
||||
babelHelpers.classPrivateFieldSet(this, _selectedItems, items);
|
||||
}
|
||||
return babelHelpers.classPrivateFieldGet(this, _selectedItems) || {};
|
||||
});
|
||||
alert.show();
|
||||
}
|
||||
function _removeEvents2() {
|
||||
main_core_events.EventEmitter.unsubscribe('BX.Ui.Form.ConfigItem:addToAccessCodes', this.addToAccessCodesHandler);
|
||||
main_core_events.EventEmitter.unsubscribe('BX.Ui.Form.ConfigItem:removeFromAccessCodes', this.removeFromAccessCodesHandler);
|
||||
main_core_events.EventEmitter.unsubscribe('BX.Ui.Form.ConfigItem:closePopup', this.closePopupHandler);
|
||||
}
|
||||
function _adjust2(members) {
|
||||
babelHelpers.classPrivateFieldSet(this, _node, BX("ui-editor-config-".concat(babelHelpers.classPrivateFieldGet(this, _scopeId))));
|
||||
if (members) {
|
||||
babelHelpers.classPrivateFieldSet(this, _members, members);
|
||||
function _getItemIdByAccessCode2(accessCode) {
|
||||
if (/^I?U(\d+)$/.test(accessCode)) {
|
||||
var match = accessCode.match(/^I?U(\d+)$/) || null;
|
||||
var userId = match ? match[1] : null;
|
||||
return ['user', userId];
|
||||
}
|
||||
if (babelHelpers.classPrivateFieldGet(this, _node)) {
|
||||
while (babelHelpers.classPrivateFieldGet(this, _node).firstChild) {
|
||||
babelHelpers.classPrivateFieldGet(this, _node).removeChild(babelHelpers.classPrivateFieldGet(this, _node).firstChild);
|
||||
if (/^DR(\d+)$/.test(accessCode)) {
|
||||
var _match = accessCode.match(/^DR(\d+)$/) || null;
|
||||
var departmentId = _match ? _match[1] : null;
|
||||
return ['department', departmentId];
|
||||
}
|
||||
if (/^D(\d+)$/.test(accessCode)) {
|
||||
var _match2 = accessCode.match(/^D(\d+)$/) || null;
|
||||
var _departmentId = _match2 ? _match2[1] : null;
|
||||
return ['department', "".concat(_departmentId, ":F")];
|
||||
}
|
||||
if (/^G(\d+)$/.test(accessCode)) {
|
||||
var _match3 = accessCode.match(/^G(\d+)$/) || null;
|
||||
var groupId = _match3 ? _match3[1] : null;
|
||||
return ['site-groups', groupId];
|
||||
}
|
||||
if (accessCode.at(0) === 'A') {
|
||||
return ['user-groups', accessCode];
|
||||
}
|
||||
if (/^SG(\d+)_([AEK])$/.test(accessCode)) {
|
||||
return ['project-access-codes', accessCode];
|
||||
}
|
||||
if (/^SND(\d+)$/.test(accessCode)) {
|
||||
var _match4 = accessCode.match(/^SND(\d+)$/) || null;
|
||||
var structureNodeId = _match4 ? _match4[1] : null;
|
||||
return ['structure-node', "".concat(structureNodeId, ":F")];
|
||||
}
|
||||
if (/^SNDR(\d+)$/.test(accessCode)) {
|
||||
var _match5 = accessCode.match(/^SNDR(\d+)$/) || null;
|
||||
var _structureNodeId = _match5 ? _match5[1] : null;
|
||||
return ['structure-node', _structureNodeId];
|
||||
}
|
||||
return ['unknown', accessCode];
|
||||
}
|
||||
function _getAccessCodeByItem2(item) {
|
||||
var entityId = item.entityId;
|
||||
if (entityId === 'user') {
|
||||
return "U".concat(item.id);
|
||||
}
|
||||
if (entityId === 'department') {
|
||||
if (main_core.Type.isString(item.id) && item.id.endsWith(':F')) {
|
||||
var match = item.id.match(/^(\d+):F$/);
|
||||
var originalId = match ? match[1] : null;
|
||||
|
||||
// only members of the department itself
|
||||
return "D".concat(originalId);
|
||||
}
|
||||
_classPrivateMethodGet(this, _drawMembers, _drawMembers2).call(this);
|
||||
|
||||
// whole department recursively
|
||||
return "DR".concat(item.id);
|
||||
}
|
||||
if (entityId === 'structure-node') {
|
||||
if (main_core.Type.isString(item.id) && item.id.endsWith(':F')) {
|
||||
var _match6 = item.id.match(/^(\d+):F$/);
|
||||
var _originalId = _match6 ? _match6[1] : null;
|
||||
return "SND".concat(_originalId);
|
||||
}
|
||||
return "SNDR".concat(item.id);
|
||||
}
|
||||
if (entityId === 'site-groups') {
|
||||
return "G".concat(item.id);
|
||||
}
|
||||
if (entityId === 'user-groups') {
|
||||
return item.id;
|
||||
}
|
||||
if (entityId === 'project-access-codes') {
|
||||
return item.id;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
function _onError2(response) {
|
||||
if (response.status === 'error') {
|
||||
_classPrivateMethodGet(this, _notifyStatus, _notifyStatus2).call(this, response.data[0]);
|
||||
}
|
||||
}
|
||||
function _responseAction2(result) {
|
||||
BX.Main.gridManager.getInstanceById('editor_scopes').reload();
|
||||
}
|
||||
function _notifyStatus2(err) {
|
||||
BX.UI.Notification.Center.notify({
|
||||
content: err === null || err === void 0 ? void 0 : err.message,
|
||||
autoHideDelay: 5000
|
||||
});
|
||||
}
|
||||
|
||||
var namespace = main_core.Reflection.namespace('BX.Ui.Form');
|
||||
namespace.Config = Config;
|
||||
namespace.ConfigItem = ConfigItem;
|
||||
|
||||
}((this.window = this.window || {}),BX,BX.Event));
|
||||
}((this.window = this.window || {}),BX.Event,BX.UI.EntitySelector,BX,BX.UI,BX.UI.Dialogs));
|
||||
//# sourceMappingURL=script.js.map
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+443
@@ -0,0 +1,443 @@
|
||||
import { Dom, Event, Loc, Tag, Text, Type } from 'main.core';
|
||||
import { BaseEvent, EventEmitter } from 'main.core.events';
|
||||
import { Button } from 'ui.buttons';
|
||||
import { Dialog, type Item, type ItemId } from 'ui.entity-selector';
|
||||
import { MessageBox, MessageBoxButtons } from 'ui.dialogs.messagebox';
|
||||
import { Config } from './config.es6';
|
||||
|
||||
/**
|
||||
* @bxjs_lang_path template.php
|
||||
*/
|
||||
|
||||
type Member = {
|
||||
id: string,
|
||||
accessCode: ?string,
|
||||
type: string,
|
||||
name: string,
|
||||
avatar: ?string,
|
||||
};
|
||||
|
||||
const MAX_SHOWN_MEMBERS = 3;
|
||||
|
||||
export class ConfigItem extends EventEmitter
|
||||
{
|
||||
#scopeId;
|
||||
#members;
|
||||
#node;
|
||||
#selectedItems: ItemId[] = [];
|
||||
#moduleId;
|
||||
#config: Config;
|
||||
#entityTypeId: ?number;
|
||||
#memberSelector: Dialog;
|
||||
#useHumanResourcesModule;
|
||||
|
||||
constructor(options: Object)
|
||||
{
|
||||
super();
|
||||
this.setEventNamespace('BX.Ui.Form');
|
||||
|
||||
this.#scopeId = (options.scopeId || null);
|
||||
this.#members = (options.members || null);
|
||||
this.#node = BX(`ui-editor-config-${this.#scopeId}`);
|
||||
this.#moduleId = (options.moduleId || null);
|
||||
this.#config = Config;
|
||||
this.#entityTypeId = (options.entityTypeId || null);
|
||||
this.#useHumanResourcesModule = BX.prop.getBoolean(options, 'useHumanResourcesModule', false);
|
||||
|
||||
this.#drawMembers();
|
||||
this.#memberSelector = this.#getMemberSelector();
|
||||
|
||||
this.#subscribeEvents();
|
||||
}
|
||||
|
||||
#subscribeEvents()
|
||||
{
|
||||
if (!this.#config.isSubscribed(this.#scopeId))
|
||||
{
|
||||
EventEmitter.subscribe('BX.Ui.Form.ConfigItem:copyContextAction', this.#copyContextAction);
|
||||
EventEmitter.subscribe('BX.Ui.Form.ConfigItem:deleteContextAction', this.#deleteContextAction);
|
||||
this.#config.addSubscribed(this.#scopeId);
|
||||
}
|
||||
}
|
||||
|
||||
#getMemberSelector(): Dialog
|
||||
{
|
||||
return new Dialog({
|
||||
targetNode: this.#node,
|
||||
enableSearch: true,
|
||||
context: 'EDITOR_CONFIG_USER_CONTEXT',
|
||||
preselectedItems: this.#getSelectedItems(),
|
||||
items: [],
|
||||
entities: [
|
||||
{
|
||||
id: 'user',
|
||||
},
|
||||
{
|
||||
id: 'project',
|
||||
},
|
||||
{
|
||||
id: this.#useHumanResourcesModule ? 'structure-node' : 'department',
|
||||
options: {
|
||||
selectMode: 'usersAndDepartments',
|
||||
},
|
||||
},
|
||||
],
|
||||
events: {
|
||||
'Item:onSelect': this.#onMemberAdd,
|
||||
'Item:onDeselect': this.#onMemberRemove,
|
||||
onHide: this.#onClosePopup,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
#getSelectedItems(): Array
|
||||
{
|
||||
if (this.#members && !Type.isArrayFilled(Object.keys(this.#selectedItems)))
|
||||
{
|
||||
const items = [];
|
||||
const members = this.#members;
|
||||
Object.entries(members).forEach(([key: string, value: string]): void => {
|
||||
items.push(this.#getItemIdByAccessCode(key));
|
||||
});
|
||||
|
||||
this.#selectedItems = items;
|
||||
}
|
||||
|
||||
return (this.#selectedItems || []);
|
||||
}
|
||||
|
||||
#drawMembers(withClean: boolean): void
|
||||
{
|
||||
if (!this.#members)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (withClean)
|
||||
{
|
||||
Dom.clean(this.#node);
|
||||
}
|
||||
|
||||
let shownMembers = this.#members;
|
||||
let notShownMembersCount = 0;
|
||||
if (Object.values(this.#members).length > MAX_SHOWN_MEMBERS)
|
||||
{
|
||||
shownMembers = Object.values(this.#members).slice(0, MAX_SHOWN_MEMBERS);
|
||||
|
||||
notShownMembersCount = Object.values(this.#members).length - MAX_SHOWN_MEMBERS;
|
||||
}
|
||||
|
||||
Object.values(shownMembers).forEach((item) => {
|
||||
Dom.append(this.#createMemberElement(item), this.#node);
|
||||
});
|
||||
|
||||
if (notShownMembersCount > 0)
|
||||
{
|
||||
Dom.append(this.#createNumberButton(notShownMembersCount), this.#node);
|
||||
}
|
||||
|
||||
Dom.append(this.#createPlusButton(), this.#node);
|
||||
}
|
||||
|
||||
#createMemberElement(member: Object): HTMLElement
|
||||
{
|
||||
const children = (member.avatar
|
||||
? Tag.render`<a href="${member.url}" class="ui-editor-config-item-avatar" title="${Text.encode(member.name)}" style="background-image: url('${encodeURI(Text.encode(member.avatar))}')"></a>`
|
||||
: Tag.render`<a href="${member.url}" class="ui-icon ui-icon-xs ui-icon-common-user" title="${Text.encode(member.name)}"><i></i></a>`
|
||||
);
|
||||
|
||||
return Dom.create('div', {
|
||||
attrs: {
|
||||
class: 'ui-editor-config-item',
|
||||
},
|
||||
children: [
|
||||
children,
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
#createPlusButton(): HTMLElement
|
||||
{
|
||||
return Dom.create('div', {
|
||||
events: {
|
||||
click: (event) => {
|
||||
if (!this.#config.popupIsOpen())
|
||||
{
|
||||
this.#showPopup();
|
||||
}
|
||||
},
|
||||
},
|
||||
attrs: {
|
||||
class: 'ui-editor-config-item ui-editor-config-item--add',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
#createNumberButton(number: number): HTMLElement
|
||||
{
|
||||
return Tag.render`<div class="ui-editor-config-item"><span href="#" class="ui-editor-config-item--number">+${number}</span></div>`;
|
||||
}
|
||||
|
||||
#showPopup(): void
|
||||
{
|
||||
this.#config.setPopupOpen();
|
||||
this.#memberSelector.show();
|
||||
}
|
||||
|
||||
#onMemberAdd = (event: BaseEvent): void => {
|
||||
const member = this.#getMemberFromEvent(event);
|
||||
|
||||
this.#selectedItems.push([member.type, member.id]);
|
||||
this.#members[member.accessCode] = member;
|
||||
|
||||
this.#drawMembers(true);
|
||||
};
|
||||
|
||||
#onMemberRemove = (event: BaseEvent): void => {
|
||||
const member = this.#getMemberFromEvent(event);
|
||||
|
||||
this.#selectedItems = this.#memberSelector.getSelectedItems();
|
||||
delete this.#members[member.accessCode];
|
||||
|
||||
this.#drawMembers(true);
|
||||
};
|
||||
|
||||
#getMemberFromEvent = (event: BaseEvent): ?Member => {
|
||||
const { item } = event.getData();
|
||||
|
||||
return {
|
||||
id: item.id,
|
||||
accessCode: this.#getAccessCodeByItem(item),
|
||||
type: item.entityId,
|
||||
name: item.title.text,
|
||||
avatar: Type.isStringFilled(item.avatar) ? item.avatar : null,
|
||||
};
|
||||
};
|
||||
|
||||
#onClosePopup = (): void => {
|
||||
if (BX.type.isNotEmptyObject(this.#members))
|
||||
{
|
||||
this.#updateScopeAccessCodes();
|
||||
this.#config.setPopupClose();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.#showAlertDialog();
|
||||
}
|
||||
};
|
||||
|
||||
#showAlertDialog(): void
|
||||
{
|
||||
const alert = MessageBox.create({
|
||||
message: Loc.getMessage('UI_SCOPE_LIST_ALERT_EMPTY_CODES'),
|
||||
useAirDesign: true,
|
||||
buttons: MessageBoxButtons.OK,
|
||||
onOk: (messagebox) => {
|
||||
messagebox.close();
|
||||
this.#memberSelector.show();
|
||||
},
|
||||
});
|
||||
|
||||
alert.show();
|
||||
}
|
||||
|
||||
#getItemIdByAccessCode(accessCode: string): ItemId
|
||||
{
|
||||
if (/^I?U(\d+)$/.test(accessCode))
|
||||
{
|
||||
const match = accessCode.match(/^I?U(\d+)$/) || null;
|
||||
const userId = match ? match[1] : null;
|
||||
|
||||
return ['user', userId];
|
||||
}
|
||||
|
||||
if (/^DR(\d+)$/.test(accessCode))
|
||||
{
|
||||
const match = accessCode.match(/^DR(\d+)$/) || null;
|
||||
const departmentId = match ? match[1] : null;
|
||||
|
||||
return ['department', departmentId];
|
||||
}
|
||||
|
||||
if (/^D(\d+)$/.test(accessCode))
|
||||
{
|
||||
const match = accessCode.match(/^D(\d+)$/) || null;
|
||||
const departmentId = match ? match[1] : null;
|
||||
|
||||
return ['department', `${departmentId}:F`];
|
||||
}
|
||||
|
||||
if (/^G(\d+)$/.test(accessCode))
|
||||
{
|
||||
const match = accessCode.match(/^G(\d+)$/) || null;
|
||||
const groupId = match ? match[1] : null;
|
||||
|
||||
return ['site-groups', groupId];
|
||||
}
|
||||
|
||||
if (accessCode.at(0) === 'A')
|
||||
{
|
||||
return ['user-groups', accessCode];
|
||||
}
|
||||
|
||||
if (/^SG(\d+)_([AEK])$/.test(accessCode))
|
||||
{
|
||||
return ['project-access-codes', accessCode];
|
||||
}
|
||||
|
||||
if (/^SND(\d+)$/.test(accessCode))
|
||||
{
|
||||
const match = accessCode.match(/^SND(\d+)$/) || null;
|
||||
const structureNodeId = match ? match[1] : null;
|
||||
|
||||
return ['structure-node', `${structureNodeId}:F`];
|
||||
}
|
||||
|
||||
if (/^SNDR(\d+)$/.test(accessCode))
|
||||
{
|
||||
const match = accessCode.match(/^SNDR(\d+)$/) || null;
|
||||
const structureNodeId = match ? match[1] : null;
|
||||
|
||||
return ['structure-node', structureNodeId];
|
||||
}
|
||||
|
||||
return ['unknown', accessCode];
|
||||
}
|
||||
|
||||
#getAccessCodeByItem(item: Item): string
|
||||
{
|
||||
const entityId = item.entityId;
|
||||
|
||||
if (entityId === 'user')
|
||||
{
|
||||
return `U${item.id}`;
|
||||
}
|
||||
|
||||
if (entityId === 'department')
|
||||
{
|
||||
if (Type.isString(item.id) && item.id.endsWith(':F'))
|
||||
{
|
||||
const match = item.id.match(/^(\d+):F$/);
|
||||
const originalId = match ? match[1] : null;
|
||||
|
||||
// only members of the department itself
|
||||
return `D${originalId}`;
|
||||
}
|
||||
|
||||
// whole department recursively
|
||||
return `DR${item.id}`;
|
||||
}
|
||||
|
||||
if (entityId === 'structure-node')
|
||||
{
|
||||
if (Type.isString(item.id) && item.id.endsWith(':F'))
|
||||
{
|
||||
const match = item.id.match(/^(\d+):F$/);
|
||||
const originalId = match ? match[1] : null;
|
||||
|
||||
return `SND${originalId}`;
|
||||
}
|
||||
|
||||
return `SNDR${item.id}`;
|
||||
}
|
||||
|
||||
if (entityId === 'site-groups')
|
||||
{
|
||||
return `G${item.id}`;
|
||||
}
|
||||
|
||||
if (entityId === 'user-groups')
|
||||
{
|
||||
return item.id;
|
||||
}
|
||||
|
||||
if (entityId === 'project-access-codes')
|
||||
{
|
||||
return item.id;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
#onError(response): void
|
||||
{
|
||||
if (response.status === 'error')
|
||||
{
|
||||
this.#notifyStatus(response.data[0]);
|
||||
}
|
||||
}
|
||||
|
||||
#updateScopeAccessCodes = (): void => {
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'updateScopeAccessCodes', {
|
||||
data: {
|
||||
moduleId: this.#moduleId,
|
||||
scopeId: this.#scopeId,
|
||||
accessCodes: this.#members,
|
||||
},
|
||||
}).then((result) => {
|
||||
this.#responseAction();
|
||||
}).catch(this.#onError.bind(this));
|
||||
};
|
||||
|
||||
#copyContextAction = (event: Object): void => {
|
||||
if (event.data.scopeId !== Text.toInteger(this.#scopeId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.#config.showConfirmDialog(
|
||||
Loc.getMessage('UI_SCOPE_LIST_CONFIRM_TITLE_COPY'),
|
||||
Loc.getMessage('UI_SCOPE_LIST_CONFIRM_ACCEPT_COPY'),
|
||||
() => {
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'copyScope', {
|
||||
data: {
|
||||
moduleId: this.#moduleId,
|
||||
entityTypeId: this.#entityTypeId,
|
||||
scopeId: this.#scopeId,
|
||||
},
|
||||
}).then((result) => {
|
||||
this.#responseAction();
|
||||
}).catch(this.#onError.bind(this));
|
||||
|
||||
return true;
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
#deleteContextAction = (event: Object): void => {
|
||||
if (event.data.scopeId !== Text.toInteger(this.#scopeId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.#config.showConfirmDialog(
|
||||
Loc.getMessage('UI_SCOPE_LIST_CONFIRM_TITLE_DELETE'),
|
||||
Loc.getMessage('UI_SCOPE_LIST_CONFIRM_ACCEPT_DELETE'),
|
||||
() => {
|
||||
BX.ajax.runComponentAction('bitrix:ui.form.config', 'removeScope', {
|
||||
data: {
|
||||
moduleId: this.#moduleId,
|
||||
scopeId: this.#scopeId,
|
||||
},
|
||||
}).then((result) => {
|
||||
this.#responseAction();
|
||||
}).catch(this.#onError.bind(this));
|
||||
|
||||
return true;
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
#responseAction(result)
|
||||
{
|
||||
BX.Main.gridManager.getInstanceById('editor_scopes').reload();
|
||||
}
|
||||
|
||||
#notifyStatus(err: { code: string, message: string, customData: any }): void
|
||||
{
|
||||
BX.UI.Notification.Center.notify({
|
||||
content: err?.message,
|
||||
autoHideDelay: 5000,
|
||||
});
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
import { Loc } from 'main.core';
|
||||
import { Button } from 'ui.buttons';
|
||||
import { MessageBox } from 'ui.dialogs.messagebox';
|
||||
/**
|
||||
* @bxjs_lang_path template.php
|
||||
*/
|
||||
|
||||
export class Config
|
||||
{
|
||||
static isOpen = false;
|
||||
static subscribedItems = [];
|
||||
|
||||
static popupIsOpen(): boolean
|
||||
{
|
||||
return this.isOpen;
|
||||
}
|
||||
|
||||
static setPopupClose(): void
|
||||
{
|
||||
this.isOpen = false;
|
||||
}
|
||||
|
||||
static setPopupOpen(): void
|
||||
{
|
||||
this.isOpen = true;
|
||||
}
|
||||
|
||||
static isSubscribed(scopeId): boolean
|
||||
{
|
||||
return Config.subscribedItems.includes(scopeId);
|
||||
}
|
||||
|
||||
static addSubscribed(scopeId): void
|
||||
{
|
||||
Config.subscribedItems.push(scopeId);
|
||||
}
|
||||
|
||||
static showConfirmDialog(title, acceptButtonText, acceptFunc): void
|
||||
{
|
||||
MessageBox.confirm(
|
||||
title,
|
||||
acceptFunc,
|
||||
acceptButtonText,
|
||||
undefined,
|
||||
undefined,
|
||||
true,
|
||||
);
|
||||
}
|
||||
}
|
||||
+15
-3
@@ -1,11 +1,11 @@
|
||||
.ui-editor-config {
|
||||
display: block;
|
||||
display: inline-flex;
|
||||
position: relative;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.ui-editor-config-item {
|
||||
display: inline-block;
|
||||
display: inline-grid;
|
||||
margin-left: -9px;
|
||||
position: relative;
|
||||
width: 26px;
|
||||
@@ -26,11 +26,12 @@
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
position: relative;
|
||||
border: none;
|
||||
display: none;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,.14);
|
||||
border-radius: 100%;
|
||||
cursor: pointer;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.ui-editor-config-item--add:before {
|
||||
@@ -45,6 +46,10 @@
|
||||
background: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20fill%3D%22%23828B95%22%20d%3D%22M6%2C0%20L6%2C4%20L10%2C4%20L10%2C6%20L6%2C6%20L6%2C10%20L4%2C10%20L4%2C5.999%20L0%2C6%20L0%2C4%20L4%2C3.999%20L4%2C0%20L6%2C0%20Z%22/%3E%3C/svg%3E') center no-repeat;
|
||||
}
|
||||
|
||||
.main-grid-cell-content:hover .ui-editor-config-item--add {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ui-editor-config-item-avatar {
|
||||
display: inline-block;
|
||||
width: 26px;
|
||||
@@ -52,3 +57,10 @@
|
||||
border-radius: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.ui-editor-config-item--number {
|
||||
background-color: var(--ui-color-base-7);
|
||||
border-radius: 100%;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.ui-editor-config{display:block;position:relative;height:30px}.ui-editor-config-item{display:inline-block;margin-left:-9px;position:relative;width:26px;height:26px;border:2px solid #fff;border-radius:100%}.main-grid-row:hover .ui-editor-config-item{border-color:#f6f8f9}.ui-editor-config-item:first-child{margin-left:0}.ui-editor-config-item--add{height:24px;width:24px;position:relative;border:0;background:#fff;box-shadow:0 2px 4px 0 rgba(0,0,0,.14);border-radius:100%;cursor:pointer}.ui-editor-config-item--add:before{content:'';position:absolute;width:10px;height:10px;top:50%;left:50%;margin:-5px 0 0 -5px;opacity:.7; background: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20fill%3D%22%23828B95%22%20d%3D%22M6%2C0%20L6%2C4%20L10%2C4%20L10%2C6%20L6%2C6%20L6%2C10%20L4%2C10%20L4%2C5.999%20L0%2C6%20L0%2C4%20L4%2C3.999%20L4%2C0%20L6%2C0%20Z%22/%3E%3C/svg%3E') center no-repeat;}.ui-editor-config-item-avatar{display:inline-block;width:26px;height:26px;border-radius:100%;background-size:cover}
|
||||
.ui-editor-config{display:inline-flex;position:relative;height:30px}.ui-editor-config-item{display:inline-grid;margin-left:-9px;position:relative;width:26px;height:26px;border:2px solid #fff;border-radius:100%}.main-grid-row:hover .ui-editor-config-item{border-color:#f6f8f9}.ui-editor-config-item:first-child{margin-left:0}.ui-editor-config-item--add{height:24px;width:24px;position:relative;display:none;background:#fff;box-shadow:0 2px 4px 0 rgba(0,0,0,.14);border-radius:100%;cursor:pointer;margin-left:0}.ui-editor-config-item--add:before{content:"";position:absolute;width:10px;height:10px;top:50%;left:50%;margin:-5px 0 0 -5px;opacity:.7;background:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20fill%3D%22%23828B95%22%20d%3D%22M6%2C0%20L6%2C4%20L10%2C4%20L10%2C6%20L6%2C6%20L6%2C10%20L4%2C10%20L4%2C5.999%20L0%2C6%20L0%2C4%20L4%2C3.999%20L4%2C0%20L6%2C0%20Z%22/%3E%3C/svg%3E") 50% no-repeat}.main-grid-cell-content:hover .ui-editor-config-item--add{display:block}.ui-editor-config-item-avatar{display:inline-block;width:26px;height:26px;border-radius:100%;background-size:cover}.ui-editor-config-item--number{background-color:var(--ui-color-base-7);border-radius:100%;line-height:26px;text-align:center}
|
||||
+34
-56
@@ -1,16 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Bitrix\Main\Localization\Loc;
|
||||
use Bitrix\Main\UI\Extension;
|
||||
use Bitrix\Main\Web\Json;
|
||||
use Bitrix\UI\Toolbar\Facade\Toolbar;
|
||||
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
|
||||
{
|
||||
die();
|
||||
die;
|
||||
}
|
||||
|
||||
$this->setFrameMode(true);
|
||||
|
||||
Extension::load([
|
||||
'ui.buttons',
|
||||
'ui.entity-selector',
|
||||
'ui.dialogs.messagebox',
|
||||
]);
|
||||
if ($arResult['grid']['FILTER'])
|
||||
{
|
||||
$filterOptions = [
|
||||
'FILTER_ID' => $arResult['grid']['FILTER']['FILTER_ID'],
|
||||
'GRID_ID' => $arResult['grid']['GRID_ID'],
|
||||
'FILTER' => $arResult['grid']['FILTER']['FILTER_FIELDS'],
|
||||
'ENABLE_LIVE_SEARCH' => true,
|
||||
'ENABLE_LABEL' => true,
|
||||
"RESET_TO_DEFAULT_MODE" => true,
|
||||
];
|
||||
|
||||
Toolbar::addFilter($filterOptions);
|
||||
}
|
||||
$APPLICATION->IncludeComponent(
|
||||
'bitrix:main.ui.grid',
|
||||
'',
|
||||
$arResult['grid']
|
||||
$arResult['grid'],
|
||||
);
|
||||
|
||||
$moduleId = $arParams['MODULE_ID'];
|
||||
@@ -22,59 +45,14 @@ $componentId = 'bx-ui-form-config-group';
|
||||
<script>
|
||||
BX.ready(function ()
|
||||
{
|
||||
new BX.Ui.Form.Config(<?= CUtil::PhpToJSObject([
|
||||
'scopes' => $arResult['jsData'],
|
||||
'componentId' => $componentId
|
||||
]) ?>);
|
||||
new BX.Ui.Form.Config();
|
||||
BX.Loc.setMessage(<?=Json::encode([
|
||||
'UI_SCOPE_LIST_CONFIRM_TITLE_DELETE' => Loc::getMessage('UI_SCOPE_LIST_CONFIRM_TITLE_DELETE'),
|
||||
'UI_SCOPE_LIST_CONFIRM_ACCEPT_DELETE' => Loc::getMessage('UI_SCOPE_LIST_CONFIRM_ACCEPT_DELETE'),
|
||||
'UI_SCOPE_LIST_CONFIRM_CANCEL' => Loc::getMessage('UI_SCOPE_LIST_CONFIRM_CANCEL'),
|
||||
'UI_SCOPE_LIST_CONFIRM_TITLE_COPY' => Loc::getMessage('UI_SCOPE_LIST_CONFIRM_TITLE_COPY'),
|
||||
'UI_SCOPE_LIST_CONFIRM_ACCEPT_COPY' => Loc::getMessage('UI_SCOPE_LIST_CONFIRM_ACCEPT_COPY'),
|
||||
'UI_SCOPE_LIST_ALERT_EMPTY_CODES' => Loc::getMessage('UI_SCOPE_LIST_ALERT_EMPTY_CODES'),
|
||||
])?>);
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
$initPopupEvent = 'ui:onComponentLoad';
|
||||
$openPopupEvent = 'ui:onComponentOpen';
|
||||
|
||||
$APPLICATION->IncludeComponent(
|
||||
'bitrix:main.ui.selector',
|
||||
'.default',
|
||||
[
|
||||
'API_VERSION' => 3,
|
||||
'ID' => $componentId,
|
||||
'BIND_ID' => $componentId,
|
||||
'ITEMS_SELECTED' => [],
|
||||
'CALLBACK' => [
|
||||
'select' => 'BX.Ui.Form.ConfigItem.onMemberSelect',
|
||||
'unSelect' => 'BX.Ui.Form.ConfigItem.onMemberUnselect',
|
||||
'openDialog' => 'function(){}',
|
||||
'closeDialog' => 'BX.Ui.Form.ConfigItem.onDialogClose',
|
||||
],
|
||||
'OPTIONS' => [
|
||||
'eventInit' => 'BX.Ui.Form.ConfigItem:onComponentLoad',
|
||||
'eventOpen' => 'BX.Ui.Form.ConfigItem:onComponentOpen',
|
||||
'useContainer' => 'Y',
|
||||
'lazyLoad' => 'Y',
|
||||
'context' => 'UI_EDITOR_CONFIG',
|
||||
'contextCode' => '',
|
||||
'useSearch' => 'Y',
|
||||
'useClientDatabase' => 'Y',
|
||||
'allowEmailInvitation' => 'N',
|
||||
'enableAll' => 'N',
|
||||
'enableUsers' => 'Y',
|
||||
'enableDepartments' => 'Y',
|
||||
'enableGroups' => 'Y',
|
||||
'departmentSelectDisable' => 'N',
|
||||
'allowAddUser' => 'Y',
|
||||
'allowAddCrmContact' => 'N',
|
||||
'allowAddSocNetGroup' => 'N',
|
||||
'allowSearchEmailUsers' => 'N',
|
||||
'allowSearchCrmEmailUsers' => 'N',
|
||||
'allowSearchNetworkUsers' => 'N',
|
||||
'useNewCallback' => 'Y',
|
||||
'multiple' => 'Y',
|
||||
'enableSonetgroups' => 'Y',
|
||||
'showVacations' => 'Y'
|
||||
]
|
||||
],
|
||||
false,
|
||||
['HIDE_ICONS' => 'Y']
|
||||
);
|
||||
@@ -74,31 +74,13 @@ class CUIFormComponentAjaxController extends Main\Engine\Controller
|
||||
$this->emitOnUIFormSetScope($guid, $scope, $categoryName);
|
||||
}
|
||||
|
||||
public function forceCommonScopeForAllAction($guid, string $categoryName = '')
|
||||
public function forceCommonScopeForAllAction($guid, string $categoryName = '', string $signedConfigParams = '', ?string $type = null): void
|
||||
{
|
||||
$this->getConfiguration($categoryName)->forceCommonScopeForAll($guid);
|
||||
}
|
||||
|
||||
public static function renderImageInputAction($moduleId, $name, $value)
|
||||
{
|
||||
/*
|
||||
$component = new UI\Controller\Response\Entity\Component('bitrix:main.file.input');
|
||||
$component->setParameters(
|
||||
array(
|
||||
'MODULE_ID' => $moduleId,
|
||||
'MAX_FILE_SIZE' => 3145728,
|
||||
'MULTIPLE'=> 'N',
|
||||
'ALLOW_UPLOAD' => 'I',
|
||||
'SHOW_AVATAR_EDITOR' => 'Y',
|
||||
'ENABLE_CAMERA' => 'N',
|
||||
'CONTROL_ID' => strtolower($name).'_uploader',
|
||||
'INPUT_NAME' => $name,
|
||||
'INPUT_VALUE' => $value
|
||||
)
|
||||
);
|
||||
$component->setFunctionParameters(array('HIDE_ICONS' => 'Y'));
|
||||
return new UI\Controller\Response\Engine\Content($component);
|
||||
*/
|
||||
$configParams = (new \Bitrix\UI\Form\EntityEditorConfigSigner($guid))->unsign($signedConfigParams);
|
||||
if ($configParams && $configParams['CAN_UPDATE_COMMON_CONFIGURATION'])
|
||||
{
|
||||
$this->getConfiguration($categoryName)->forceCommonScopeForAll($guid, $configParams['MODULE_ID'], $type);
|
||||
}
|
||||
}
|
||||
|
||||
private function areSignedParamsValid(string $guid, array $params, string $signedConfigParams): bool
|
||||
|
||||
@@ -841,6 +841,7 @@ protected function getEntityConfigOptions(): array
|
||||
return (new \Bitrix\UI\Form\EntityEditorConfigSigner($this->configID))->sign([
|
||||
'CAN_UPDATE_COMMON_CONFIGURATION' => $this->arResult['CAN_UPDATE_COMMON_CONFIGURATION'],
|
||||
'CAN_UPDATE_PERSONAL_CONFIGURATION' => $this->arResult['CAN_UPDATE_PERSONAL_CONFIGURATION'],
|
||||
'MODULE_ID' => $this->arParams['MODULE_ID'] ?? '',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -141,6 +141,11 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ui-sidepanel-sidebar-air-template .ui-sidepanel-submenu-active .ui-sidepanel-submenu-link .ui-sidepanel-menu-link-text,
|
||||
.ui-sidepanel-sidebar-air-template .ui-sidepanel-menu-active .ui-sidepanel-menu-link .ui-sidepanel-menu-link-text {
|
||||
background-color: var(--ui-color-design-filled-bg);
|
||||
}
|
||||
|
||||
.ui-sidepanel-menu-notice-icon {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+3
-1
@@ -9,11 +9,13 @@ use Bitrix\Main\UI\Extension;
|
||||
/** @var array $arParams*/
|
||||
|
||||
Extension::load('ui.fonts.opensans');
|
||||
|
||||
$airDesignClass = defined('AIR_SITE_TEMPLATE') ? 'ui-sidepanel-sidebar-air-template' : '';
|
||||
?>
|
||||
|
||||
<?php $this->SetViewTarget($arResult['VIEW_TARGET']) ?>
|
||||
|
||||
<div <?if($arResult['ID']):?>id="<?=$arResult['ID']?>"<?endif;?> class="ui-sidepanel-sidebar">
|
||||
<div <?if($arResult['ID']):?>id="<?=$arResult['ID']?>"<?endif;?> class="ui-sidepanel-sidebar <?=$airDesignClass?>">
|
||||
<?if(!empty($arResult['TITLE'])):?>
|
||||
<div class="ui-sidepanel-head">
|
||||
<h2 class="ui-sidepanel-title">
|
||||
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
<?
|
||||
|
||||
use Bitrix\UI\Toolbar;
|
||||
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true)
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
$this->setFrameMode(true);
|
||||
|
||||
\Bitrix\Main\UI\Extension::load(['ui.design-tokens', 'ui.fonts.opensans']);
|
||||
|
||||
$toolbarManager = Toolbar\Manager::getInstance();
|
||||
if($arResult["TOOLBAR_ID"] != "")
|
||||
{
|
||||
$toolbar = $toolbarManager->getToolbarById($arResult["TOOLBAR_ID"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$toolbar = $toolbarManager->getToolbarById(Toolbar\Facade\Toolbar::DEFAULT_ID);
|
||||
}
|
||||
|
||||
$filter = $toolbar->getFilter();
|
||||
$afterTitleButtons = $toolbar->renderAfterTitleButtons();
|
||||
$rightButtons = $toolbar->renderRightButtons();
|
||||
$filterButtons = $toolbar->renderAfterFilterButtons();
|
||||
?>
|
||||
|
||||
<div id="<?=$arResult["CONTAINER_ID"]?>" class="ui-toolbar">
|
||||
<? if($afterTitleButtons <> ''): ?><?
|
||||
?>
|
||||
<div class="ui-toolbar-after-title-buttons"><?= $afterTitleButtons ?></div><?
|
||||
endif;
|
||||
|
||||
if($filter <> ''):
|
||||
?>
|
||||
<div class="ui-toolbar-filter-box"><?= $filter ?><?
|
||||
if($filterButtons <> ''): ?><?
|
||||
?>
|
||||
<div class="ui-toolbar-filter-buttons"><?= $filterButtons ?></div><?
|
||||
endif
|
||||
?></div><?
|
||||
endif;
|
||||
|
||||
if($rightButtons <> ''):?><?
|
||||
?>
|
||||
<div class="ui-toolbar-right-buttons"><?= $rightButtons ?></div><?
|
||||
endif ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
BX.UI.ToolbarManager.create(Object.assign(<?=\Bitrix\Main\Web\Json::encode([
|
||||
"id" => $toolbar->getId(),
|
||||
"titleMinWidth" => $toolbar->getTitleMinWidth(),
|
||||
"titleMaxWidth" => $toolbar->getTitleMaxWidth(),
|
||||
"buttonIds" => array_map(function(\Bitrix\UI\Buttons\BaseButton $button){
|
||||
return $button->getUniqId();
|
||||
}, $toolbar->getButtons()),
|
||||
])?>,
|
||||
{
|
||||
target: document.getElementById('<?=$arResult["CONTAINER_ID"]?>')
|
||||
}
|
||||
));
|
||||
</script>
|
||||
@@ -56,6 +56,7 @@ $favoriteStar = Toolbar::hasFavoriteStar()? '<span class="ui-toolbar-star" id="u
|
||||
<?=$APPLICATION->getViewContent("inside_pagetitle")?>
|
||||
</div>
|
||||
</div>
|
||||
<script>console.error('UI Toolbar: do not use an old toolbar.')</script>
|
||||
<script>
|
||||
BX.message({
|
||||
UI_TOOLBAR_ADD_PAGE_TO_LEFT_MENU: '<?= GetMessageJS('UI_TOOLBAR_ADD_PAGE_TO_LEFT_MENU') ?>',
|
||||
|
||||
-188
@@ -1,188 +0,0 @@
|
||||
.ui-toolbar,
|
||||
.ui-toolbar-filter-box,
|
||||
.ui-toolbar-right-buttons,
|
||||
.ui-toolbar-after-title-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ui-toolbar {
|
||||
min-height: 73px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ui-toolbar-title-box {
|
||||
font: 26px/26px var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
|
||||
font-weight: var(--ui-font-weight-light, 300);
|
||||
margin: 0;
|
||||
padding: 21px 0 21px 5px;
|
||||
display: block;
|
||||
color: #fff;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.ui-page-slider-wrapper .ui-toolbar-title-box {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.bitrix24-default-theme .ui-toolbar-title-box,
|
||||
.bitrix24-dark-theme .ui-toolbar-title-box {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ui-toolbar .ui-toolbar-title-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 1;
|
||||
flex-basis: auto;
|
||||
padding: 0 15px 0 0;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
min-width: 158px;
|
||||
}
|
||||
|
||||
.ui-toolbar .ui-toolbar-title-inner {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ui-toolbar .ui-toolbar-title-item {
|
||||
display: inline-block;
|
||||
padding: 0 10px 0 0;
|
||||
min-width: 0;
|
||||
height: 30px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ui-toolbar .ui-toolbar-title-item-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ui-toolbar-star {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 19px;
|
||||
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2017%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23AFB5BB%22%20d%3D%22M13.915%2016.225l-.936-5.461%203.968-3.868-5.484-.797-2.452-4.97L6.558%206.1l-5.484.797%203.969%203.868-.937%205.461%204.905-2.578%204.904%202.578z%22/%3E%3C/svg%3E');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pagetitle-toolbar-field-view .ui-toolbar-star {
|
||||
background-size: 20px auto;
|
||||
width: 20px;
|
||||
min-width: 20px;
|
||||
max-width: 20px;
|
||||
}
|
||||
|
||||
.ui-toolbar-star:hover {
|
||||
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2017%22%3E%3Cpath%20fill%3D%22%23AFB5BB%22%20fill-rule%3D%22evenodd%22%20d%3D%22M9.01%2014.211l-5.03%202.645a.3.3%200%200%201-.436-.316l.961-5.602-4.07-3.967a.3.3%200%200%201%20.167-.512l5.624-.817L8.742.545a.3.3%200%200%201%20.538%200l2.515%205.097%205.625.817a.3.3%200%200%201%20.166.512l-4.07%203.967.96%205.602a.3.3%200%200%201-.435.316l-5.03-2.645z%22/%3E%3C/svg%3E');
|
||||
}
|
||||
|
||||
.ui-toolbar-star-active {
|
||||
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2018%2017%22%3E%3Cpath%20fill%3D%22%23AFB5BB%22%20fill-rule%3D%22evenodd%22%20d%3D%22M9.01%2014.211l-5.03%202.645a.3.3%200%200%201-.436-.316l.961-5.602-4.07-3.967a.3.3%200%200%201%20.167-.512l5.624-.817L8.742.545a.3.3%200%200%201%20.538%200l2.515%205.097%205.625.817a.3.3%200%200%201%20.166.512l-4.07%203.967.96%205.602a.3.3%200%200%201-.435.316l-5.03-2.645z%22/%3E%3C/svg%3E');
|
||||
}
|
||||
|
||||
@media (max-width: 1360px) {
|
||||
.pagetitle-toolbar-field-view .ui-toolbar-title-box {
|
||||
margin: 0 15px 0 0 !important;
|
||||
}
|
||||
|
||||
.pagetitle-toolbar-field-view .pagetitle-inner-container .main-ui-filter-search.main-ui-filter-theme-default {
|
||||
max-width: 100%;
|
||||
min-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-toolbar .ui-toolbar-star {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
flex-basis: auto;
|
||||
background-size: 20px auto;
|
||||
}
|
||||
|
||||
.ui-toolbar-filter-box {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
flex-basis: auto;
|
||||
}
|
||||
|
||||
.ui-toolbar-filter-box .main-ui-filter-search {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
flex-basis: 100%;
|
||||
min-width: 300px;
|
||||
max-width: 748px;
|
||||
}
|
||||
|
||||
.ui-toolbar-filter-buttons {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ui-toolbar-right-buttons,
|
||||
.ui-toolbar-after-title-buttons {
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.ui-toolbar-after-title-buttons {
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.ui-toolbar-right-buttons {
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.ui-toolbar-subtitle-show.ui-toolbar {
|
||||
padding-top: 25px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.ui-toolbar-subtitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ui-toolbar-subtitle-item {
|
||||
display: inline-block;
|
||||
margin-right: 6px;
|
||||
font: 13px var(--ui-font-family-primary, var(--ui-font-family-helvetica));
|
||||
color: #858c96;
|
||||
}
|
||||
|
||||
.ui-toolbar-subtitle-control {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
font: 13px var(--ui-font-family-primary, var(--ui-font-family-helvetica));
|
||||
color: #2066b0;
|
||||
border-bottom: 1px dashed rgba(39, 107, 179, .4);
|
||||
transition: border-bottom .3s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui-toolbar-subtitle-control:hover {
|
||||
border-bottom: 1px dashed transparent;
|
||||
}
|
||||
|
||||
.ui-toolbar-subtitle-control:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: -16px;
|
||||
display: block;
|
||||
width: 10px;
|
||||
height: 6px;
|
||||
background: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20viewBox%3D%220%200%2010%206%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%0A%3Cpath%20opacity%3D%220.5%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M8.30607%200.754272L5.66529%203.39505L4.99999%204.05006L4.3473%203.39505L1.70652%200.754272L0.774669%201.68613L5.00626%205.91772L9.23785%201.68613L8.30607%200.754272Z%22%20fill%3D%22%23525C69%22/%3E%0A%3C/svg%3E%0A') no-repeat;
|
||||
}
|
||||
|
||||
.ui-toolbar-before-title {
|
||||
padding-right: 12px;
|
||||
}
|
||||
@@ -8,6 +8,8 @@ CREATE TABLE b_ui_entity_editor_config
|
||||
COMMON VARCHAR(1) NOT NULL,
|
||||
AUTO_APPLY_SCOPE varchar(1) NOT NULL DEFAULT 'N',
|
||||
OPTION_CATEGORY varchar(50) NOT NULL,
|
||||
ON_ADD varchar(1) NOT NULL DEFAULT 'Y',
|
||||
ON_UPDATE varchar(1) NOT NULL DEFAULT 'Y',
|
||||
PRIMARY KEY (ID),
|
||||
INDEX ENTITY_TYPE_ID (ENTITY_TYPE_ID),
|
||||
INDEX CATEGORY (CATEGORY)
|
||||
|
||||
@@ -8,6 +8,8 @@ CREATE TABLE b_ui_entity_editor_config (
|
||||
COMMON varchar(1) NOT NULL,
|
||||
AUTO_APPLY_SCOPE varchar(1) NOT NULL DEFAULT 'N',
|
||||
OPTION_CATEGORY varchar(50) NOT NULL,
|
||||
ON_ADD varchar(1) NOT NULL DEFAULT 'Y',
|
||||
ON_UPDATE varchar(1) NOT NULL DEFAULT 'Y',
|
||||
PRIMARY KEY (ID)
|
||||
);
|
||||
CREATE INDEX ix_b_ui_entity_editor_config_entity_type_id ON b_ui_entity_editor_config (entity_type_id);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,11 @@
|
||||
.ui-access-rights-v2 {
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section:last-child .ui-access-rights-v2-section-container {
|
||||
border-bottom-left-radius: var(--ui-border-radius-xl);
|
||||
border-bottom-right-radius: var(--ui-border-radius-xl);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-block {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
@@ -30,6 +35,14 @@
|
||||
font-size: var(--ui-font-size-lg);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2--head-section::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--ui-color-gray-05) ;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2--head-section .ui-access-rights-v2-column-item-text {
|
||||
font-size: var(--ui-font-size-lg);
|
||||
}
|
||||
@@ -45,8 +58,8 @@
|
||||
|
||||
.ui-access-rights-v2--head-section .ui-access-rights-v2-section-container {
|
||||
height: 82px;
|
||||
border-top-right-radius: var(--ui-border-radius-xs);
|
||||
border-top-left-radius: var(--ui-border-radius-xs);
|
||||
border-top-right-radius: var(--ui-border-radius-xl);
|
||||
border-top-left-radius: var(--ui-border-radius-xl);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-head {
|
||||
@@ -174,7 +187,7 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: var(--ui-font-size-sm);
|
||||
color: var(--ui-color-palette-black-base);
|
||||
color: var(--ui-color-base-90);
|
||||
line-height: var(--ui-font-line-height-2xs);
|
||||
cursor: default;
|
||||
}
|
||||
@@ -188,6 +201,8 @@
|
||||
.ui-access-rights-v2-column-item-title-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title-icon {
|
||||
@@ -206,8 +221,8 @@
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .--plus-in-circle, .ui-access-rights-v2-column-item-title .--minus-in-circle {
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-gray-50);
|
||||
.ui-access-rights-v2-column-item-title .--o-circle-plus, .ui-access-rights-v2-column-item-title .--o-circle-minus {
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-gray-30);
|
||||
--ui-icon-set__icon-size: 18px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
@@ -217,14 +232,25 @@
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .ui-access-rights-v2-hint-container {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
top: 1px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-hint-container::before {
|
||||
content: "\00a0";
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .ui-hint {
|
||||
line-height: normal;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-hint-container .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 16px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .ui-hint-icon {
|
||||
@@ -249,7 +275,7 @@
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-role-cell {
|
||||
padding: 10px;
|
||||
padding: 16px 10px 10px 10px;
|
||||
height: calc(100% - 20px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -269,13 +295,15 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: -16px; /* because of menu */
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-role-input,
|
||||
.ui-access-rights-v2-role-value {
|
||||
font-size: var(--ui-font-size-lg);
|
||||
line-height: var(--ui-font-line-height-3xs);
|
||||
color: var(--ui-color-gray-90);
|
||||
font-weight: var(--ui-font-weight-normal);
|
||||
line-height: 20px;
|
||||
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -306,11 +334,14 @@
|
||||
.ui-access-rights-v2-members {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: var(--ui-border-width-thin) solid #525C6929;
|
||||
border-radius: var(--ui-border-radius-pill);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-air-template {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item {
|
||||
display: inline-block;
|
||||
margin-left: -9px;
|
||||
@@ -328,15 +359,18 @@
|
||||
.ui-access-rights-v2-members-item-add {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
border: none;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,.14);
|
||||
border-radius: 100%;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--ui-color-base-7)
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item-add:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item-add .ui-icon-set {
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-blue-50);
|
||||
--ui-icon-set__icon-color: var(--ui-color-accent-main-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item-add:hover .ui-icon-set {
|
||||
@@ -438,6 +472,12 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
overflow: visible;
|
||||
text-overflow: clip;
|
||||
word-break: break-word;
|
||||
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: var(--ui-font-size-sm);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-text-center {
|
||||
@@ -456,13 +496,23 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
|
||||
.ui-access-rights-v2-icon-more {
|
||||
--ui-icon-set__icon-size: 16px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-base-5);
|
||||
opacity: var(--ui-opacity-40);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search {
|
||||
max-width: 290px;
|
||||
--ui-field-size: 34px
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search-input {
|
||||
background-color: #F6F7F9;
|
||||
border: none;
|
||||
border-radius: var(--ui-border-radius-sm);
|
||||
border: 1px solid var(--ui-color-bg-content-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search .ui-ctl-element:hover, .ui-access-rights-v2-search .ui-ctl-element:focus {
|
||||
border-color: var(--ui-color-bg-content-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search-input:focus {
|
||||
@@ -486,8 +536,7 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-role-add .ui-btn:hover:not(.ui-btn-disabled) {
|
||||
border-color: var(--ui-color-palette-blue-30);
|
||||
background: unset;
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-role-add .ui-btn.ui-btn-disabled {
|
||||
@@ -497,6 +546,19 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
.ui-access-rights-v2-header-role-add .ui-icon-set {
|
||||
--ui-icon-set__icon-color: var(--ui-color-base-50);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search-icon {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
width: 22px;
|
||||
height: calc(var(--ui-field-size) - 2px);
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
|
||||
--ui-icon-set__icon-size: 20px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-base-5);
|
||||
}
|
||||
.ui-access-rights-v2-column-item.ui-access-rights-v2-header-roles-control {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -523,10 +585,18 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
font-size: var(--ui-font-size-sm);
|
||||
border: 1px solid var(--design-outline-default-design-outline-stroke, var(--ui-color-base-7));
|
||||
border-radius: var(--ui-border-radius-pill);
|
||||
box-shadow: var(--ui-shadow-bottom-s);
|
||||
padding: 5px 10px 5px 10px;
|
||||
border: var(--ui-border-width-thin) solid rgba(var(--ui-color-palette-black-solid-rgb), 0.07)
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-counter:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-counter .ui-icon-set {
|
||||
--ui-icon-set__icon-color: var(--ui-color-accent-main-primary);
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-chevron {
|
||||
@@ -546,6 +616,27 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-expander-button {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
border: 1px solid var(--design-outline-default-design-outline-stroke, var(--ui-color-base-7));
|
||||
border-radius: var(--ui-border-radius-xs);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-expander-button:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-expander-button .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 18px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -570,23 +661,22 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
.ui-access-rights-v2-section-header-expander {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: var(--ui-color-palette-white-base);
|
||||
border: 1px solid var(--ui-color-base-7);
|
||||
border-radius: var(--ui-border-radius-circle);
|
||||
box-shadow: var(--ui-shadow-bottom-s);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 9px;
|
||||
background-color: var(--ui-color-bg-content-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header-expander:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header-expander .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 12px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-gray-40);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header.--expanded .ui-access-rights-v2-section-header-expander .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 12px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-black-base);
|
||||
--ui-icon-set__icon-color: var(--ui-color-accent-main-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header-icon {
|
||||
@@ -603,16 +693,16 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-title {
|
||||
color: var(--ui-color-palette-gray-80);
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header.--expanded .ui-access-rights-v2-section-title {
|
||||
color: var(--ui-color-palette-black-base);
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-subtitle {
|
||||
color: var(--ui-color-palette-gray-70);
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
margin-left: 3px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
return babelHelpers.classPrivateFieldLooseBase(this, _cache)[_cache].remember(`hint-${appGuid}`, () => {
|
||||
return BX.UI.Hint.createInstance({
|
||||
id: `ui-access-rights-v2-hint-${appGuid}`,
|
||||
classNameIcon: 'ui-icon-set --o-question',
|
||||
popupParameters: {
|
||||
className: 'ui-access-rights-v2-popup-pointer-events ui-hint-popup',
|
||||
autoHide: true,
|
||||
@@ -173,7 +174,8 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
options: state => state.application.options,
|
||||
addUserGroupsProviderTab: state => state.application.options.additionalMembersParams.addUserGroupsProviderTab,
|
||||
addProjectsProviderTab: state => state.application.options.additionalMembersParams.addProjectsProviderTab,
|
||||
addStructureTeamsProviderTab: state => state.application.options.additionalMembersParams.addStructureTeamsProviderTab
|
||||
addStructureTeamsProviderTab: state => state.application.options.additionalMembersParams.addStructureTeamsProviderTab,
|
||||
addStructureRolesProviderTab: state => state.application.options.additionalMembersParams.addStructureRolesProviderTab
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
@@ -218,6 +220,9 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
const groupId = match ? match[1] : null;
|
||||
return ['site-groups', groupId];
|
||||
}
|
||||
if (/^(?:ATD|ATE|ATT|AD|AE|AT)[1-9]\d*$/.test(accessCode)) {
|
||||
return ['structure-role', accessCode];
|
||||
}
|
||||
if (accessCode.at(0) === 'A') {
|
||||
return ['user-groups', accessCode];
|
||||
}
|
||||
@@ -294,6 +299,9 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
if (entityId === 'user-groups') {
|
||||
return item.id;
|
||||
}
|
||||
if (entityId === 'structure-role') {
|
||||
return item.id;
|
||||
}
|
||||
if (entityId === 'project-access-codes') {
|
||||
return item.id;
|
||||
}
|
||||
@@ -315,6 +323,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
return 'structureteams';
|
||||
case 'site-groups':
|
||||
case 'user-groups':
|
||||
case 'structure-role':
|
||||
return 'usergroups';
|
||||
default:
|
||||
return '';
|
||||
@@ -341,14 +350,24 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
dynamicLoad: true,
|
||||
dynamicSearch: true
|
||||
}];
|
||||
if (this.addStructureRolesProviderTab) {
|
||||
entities.push({
|
||||
id: 'structure-role',
|
||||
options: {
|
||||
includedNodeEntityTypes: ['team', 'department']
|
||||
},
|
||||
dynamicLoad: true,
|
||||
dynamicSearch: true
|
||||
});
|
||||
}
|
||||
if (this.addStructureTeamsProviderTab) {
|
||||
entities.push({
|
||||
id: 'structure-node',
|
||||
options: {
|
||||
selectMode: 'usersAndDepartments',
|
||||
includedNodeEntityTypes: ['team'],
|
||||
allowSelectRootDepartment: true,
|
||||
allowFlatDepartments: true,
|
||||
includedNodeEntityTypes: ['team'],
|
||||
useMultipleTabs: true,
|
||||
visual: {
|
||||
avatarMode: 'node',
|
||||
@@ -472,7 +491,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
'--has-siblings': userGroup.members.size > 0,
|
||||
}"
|
||||
>
|
||||
<div class="ui-icon-set --plus-30"></div>
|
||||
<div class="ui-icon-set --plus-m"></div>
|
||||
</div>
|
||||
<Selector
|
||||
v-if="isSelectorShown"
|
||||
@@ -506,7 +525,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
computed: {
|
||||
RichMenuItemIcon: () => ui_vue3_components_richMenu.RichMenuItemIcon,
|
||||
...ui_vue3_vuex.mapState({
|
||||
isSaving: state => state.application.isSaving,
|
||||
isProgress: state => state.application.isProgress,
|
||||
guid: state => state.application.guid,
|
||||
maxVisibleUserGroups: state => state.application.options.maxVisibleUserGroups
|
||||
}),
|
||||
@@ -594,6 +613,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
}
|
||||
}
|
||||
}), new ui_buttons.CancelButton({
|
||||
text: this.$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_CANCEL'),
|
||||
size: ui_buttons.ButtonSize.SMALL,
|
||||
events: {
|
||||
click: () => {
|
||||
@@ -605,7 +625,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
popup.show();
|
||||
},
|
||||
showActionsMenu() {
|
||||
if (!this.isSaving) {
|
||||
if (!this.isProgress) {
|
||||
this.isPopupShown = true;
|
||||
}
|
||||
},
|
||||
@@ -643,7 +663,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
<div ref="container" class='ui-access-rights-v2-role'>
|
||||
<div class="ui-access-rights-v2-role-value-container">
|
||||
<input
|
||||
v-if="isEdit && !isSaving"
|
||||
v-if="isEdit && !isProgress"
|
||||
ref="input"
|
||||
type='text'
|
||||
class='ui-access-rights-v2-role-input'
|
||||
@@ -655,7 +675,8 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
</div>
|
||||
<div
|
||||
ref="menu"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more"
|
||||
style="position: absolute; right: 11px; top: 5px;"
|
||||
@click="showActionsMenu"
|
||||
>
|
||||
<RichMenuPopup v-if="isPopupShown" @close="isPopupShown = false" :popup-options="{bindElement: $refs.menu}">
|
||||
@@ -898,7 +919,8 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
<div>{{ $Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_ROLES') }}</div>
|
||||
<div
|
||||
ref="configure"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more"
|
||||
style="position: absolute; right: 11px; top: 5px;"
|
||||
@click="isPopupShown = true"
|
||||
>
|
||||
<RichMenuPopup v-if="isPopupShown" @close="isPopupShown = false" :popup-options="{bindElement: $refs.configure}">
|
||||
@@ -945,21 +967,25 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
class="ui-access-rights-v2-header-roles-control-counter"
|
||||
@click="toggleViewDialog($refs.counter)"
|
||||
>
|
||||
<div class="ui-icon-set --opened-eye" style="--ui-icon-set__icon-size: 15px;"></div>
|
||||
<div class="ui-icon-set --o-observer" style="--ui-icon-set__icon-size: 18px;"></div>
|
||||
<span v-html="shownGroupsCounter"></span>
|
||||
<div class="ui-icon-set --chevron-down ui-access-rights-v2-header-roles-control-chevron"></div>
|
||||
</div>
|
||||
<div class="ui-access-rights-v2-header-roles-control-expander">
|
||||
<div
|
||||
class="ui-icon-set --collapse"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_COLLAPSE_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/collapseAllSections')"
|
||||
></div>
|
||||
<div
|
||||
class="ui-icon-set --expand-1"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_EXPAND_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/expandAllSections')"
|
||||
></div>
|
||||
<div class="ui-access-rights-v2-header-roles-control-expander-button">
|
||||
<div
|
||||
class="ui-icon-set --collapse"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_COLLAPSE_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/collapseAllSections')"
|
||||
></div>
|
||||
</div>
|
||||
<div class="ui-access-rights-v2-header-roles-control-expander-button">
|
||||
<div
|
||||
class="ui-icon-set --expand-1"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_EXPAND_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/expandAllSections')"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</CellLayout>
|
||||
@@ -1179,14 +1205,19 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="ui-ctl ui-ctl-after-icon ui-ctl-w100 ui-access-rights-v2-search">
|
||||
<div
|
||||
class="ui-ctl ui-ctl-after-icon ui-access-rights-v2-search">
|
||||
<input
|
||||
type="text"
|
||||
class="ui-ctl-element ui-ctl-textbox ui-access-rights-v2-search-input"
|
||||
:placeholder="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_SEARCH_PLACEHOLDER')"
|
||||
v-model="searchQuery"
|
||||
ref="searchInput"
|
||||
>
|
||||
<a class="ui-ctl-after ui-ctl-icon-search ui-access-rights-v2-search-icon"></a>
|
||||
<a
|
||||
class="ui-icon-set --o-search ui-access-rights-v2-search-icon"
|
||||
@click="this.$refs.searchInput.focus()"
|
||||
></a>
|
||||
</div>
|
||||
`
|
||||
};
|
||||
@@ -2033,7 +2064,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
<CellLayout class="ui-access-rights-v2-menu-cell" style="cursor: pointer" @click="toggleMenu">
|
||||
<div
|
||||
ref="icon"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more"
|
||||
>
|
||||
<RichMenuPopup
|
||||
v-if="isMenuShown"
|
||||
@@ -2554,7 +2585,8 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
const cancelButton = new ui_buttons.CancelButton({
|
||||
onclick: () => {
|
||||
this.$emit('close');
|
||||
}
|
||||
},
|
||||
text: this.$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_CANCEL')
|
||||
});
|
||||
cancelButton.renderTo(this.$refs['button-container']);
|
||||
});
|
||||
@@ -3757,8 +3789,8 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
v-if="right.groupHead"
|
||||
class="ui-icon-set"
|
||||
:class="{
|
||||
'--minus-in-circle': right.isGroupExpanded,
|
||||
'--plus-in-circle': !right.isGroupExpanded,
|
||||
'--o-circle-minus': right.isGroupExpanded,
|
||||
'--o-circle-plus': !right.isGroupExpanded,
|
||||
}"
|
||||
></span>
|
||||
<div
|
||||
@@ -3772,15 +3804,13 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
class="ui-access-rights-v2-column-item-title-link ui-access-rights-v2-text-ellipsis"
|
||||
@click="onRightClick"
|
||||
>
|
||||
{{ right.title }}
|
||||
<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
{{ right.title }}<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
class="ui-access-rights-v2-text-wrap"
|
||||
>
|
||||
{{ right.title }}
|
||||
<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
{{ right.title }}<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
</span>
|
||||
<span
|
||||
v-if="right.subtitle"
|
||||
@@ -3790,7 +3820,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
</div>
|
||||
<div
|
||||
ref="icon"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more ui-access-rights-v2-title-column-menu"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more ui-access-rights-v2-title-column-menu"
|
||||
@click="toggleMenu"
|
||||
>
|
||||
<RichMenuPopup
|
||||
@@ -3959,7 +3989,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
loader: null,
|
||||
computed: {
|
||||
...ui_vue3_vuex.mapState({
|
||||
isSaving: state => state.application.isSaving,
|
||||
isProgress: state => state.application.isProgress,
|
||||
guid: state => state.application.guid,
|
||||
searchContainerSelector: state => state.application.options.searchContainerSelector
|
||||
}),
|
||||
@@ -4071,7 +4101,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
<SearchBox/>
|
||||
</Teleport>
|
||||
<div ref="container" class='ui-access-rights-v2' :class="{
|
||||
'ui-access-rights-v2-block': isSaving,
|
||||
'ui-access-rights-v2-block': isProgress,
|
||||
}">
|
||||
<Header :user-groups="shownUserGroups"/>
|
||||
<Section
|
||||
@@ -4153,25 +4183,6 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
// 'event' field is provided by AnalyticsManager
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _isEnabled)[_isEnabled] = Object.hasOwn(babelHelpers.classPrivateFieldLooseBase(this, _data)[_data], 'tool') && Object.hasOwn(babelHelpers.classPrivateFieldLooseBase(this, _data)[_data], 'category');
|
||||
}
|
||||
onSaveAttempt() {
|
||||
if (!babelHelpers.classPrivateFieldLooseBase(this, _isEnabled)[_isEnabled]) {
|
||||
return;
|
||||
}
|
||||
const {
|
||||
createdRoles,
|
||||
editedRoles,
|
||||
deletedRoles
|
||||
} = babelHelpers.classPrivateFieldLooseBase(this, _analyzeRoles)[_analyzeRoles]();
|
||||
for (let i = 0; i < createdRoles; i++) {
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _registerRoleCreateEvent)[_registerRoleCreateEvent]('attempt');
|
||||
}
|
||||
for (let i = 0; i < editedRoles; i++) {
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _registerRoleEditEvent)[_registerRoleEditEvent]('attempt');
|
||||
}
|
||||
for (let i = 0; i < deletedRoles; i++) {
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _registerRoleDeleteEvent)[_registerRoleDeleteEvent]('attempt');
|
||||
}
|
||||
}
|
||||
onSaveSuccess() {
|
||||
if (!babelHelpers.classPrivateFieldLooseBase(this, _isEnabled)[_isEnabled]) {
|
||||
return;
|
||||
@@ -4343,7 +4354,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
return {
|
||||
options: babelHelpers.classPrivateFieldLooseBase(this, _options)[_options],
|
||||
guid: babelHelpers.classPrivateFieldLooseBase(this, _guid)[_guid],
|
||||
isSaving: false
|
||||
isProgress: false
|
||||
};
|
||||
}
|
||||
getGetters() {
|
||||
@@ -4361,9 +4372,9 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
}
|
||||
getMutations() {
|
||||
return {
|
||||
setSaving: (state, isSaving) => {
|
||||
setProgress: (state, isProgress) => {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
state.isSaving = Boolean(isSaving);
|
||||
state.isProgress = Boolean(isProgress);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -5236,7 +5247,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
}
|
||||
// noinspection OverlyComplexFunctionJS
|
||||
transform(externalSource) {
|
||||
var _externalSource$addit, _externalSource$addit2, _externalSource$addit3, _externalSource$addit4, _externalSource$addit5, _externalSource$addit6;
|
||||
var _externalSource$addit, _externalSource$addit2, _externalSource$addit3, _externalSource$addit4, _externalSource$addit5, _externalSource$addit6, _externalSource$addit7, _externalSource$addit8;
|
||||
// freeze tells vue that we don't need reactivity on this state
|
||||
// and prevents accidental modification as well
|
||||
return babelHelpers.classPrivateFieldLooseBase(this, _deepFreeze)[_deepFreeze]({
|
||||
@@ -5251,11 +5262,13 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
additionalMembersParams: main_core.Type.isPlainObject(externalSource.additionalMembersParams) ? {
|
||||
addUserGroupsProviderTab: Boolean((_externalSource$addit = (_externalSource$addit2 = externalSource.additionalMembersParams) == null ? void 0 : _externalSource$addit2.addUserGroupsProviderTab) != null ? _externalSource$addit : false),
|
||||
addProjectsProviderTab: Boolean((_externalSource$addit3 = (_externalSource$addit4 = externalSource.additionalMembersParams) == null ? void 0 : _externalSource$addit4.addProjectsProviderTab) != null ? _externalSource$addit3 : true),
|
||||
addStructureTeamsProviderTab: Boolean((_externalSource$addit5 = (_externalSource$addit6 = externalSource.additionalMembersParams) == null ? void 0 : _externalSource$addit6.addStructureTeamsProviderTab) != null ? _externalSource$addit5 : false)
|
||||
addStructureTeamsProviderTab: Boolean((_externalSource$addit5 = (_externalSource$addit6 = externalSource.additionalMembersParams) == null ? void 0 : _externalSource$addit6.addStructureTeamsProviderTab) != null ? _externalSource$addit5 : false),
|
||||
addStructureRolesProviderTab: Boolean((_externalSource$addit7 = (_externalSource$addit8 = externalSource.additionalMembersParams) == null ? void 0 : _externalSource$addit8.addStructureRolesProviderTab) != null ? _externalSource$addit7 : false)
|
||||
} : {
|
||||
addUserGroupsProviderTab: false,
|
||||
addProjectsProviderTab: true,
|
||||
addStructureTeamsProviderTab: false
|
||||
addStructureTeamsProviderTab: false,
|
||||
addStructureRolesProviderTab: false
|
||||
},
|
||||
isSaveAccessRightsList: main_core.Type.isBoolean(externalSource.isSaveAccessRightsList) ? externalSource.isSaveAccessRightsList : false
|
||||
});
|
||||
@@ -5431,6 +5444,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
var _userGroupsModel = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("userGroupsModel");
|
||||
var _accessRightsModel = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("accessRightsModel");
|
||||
var _analyticsManager = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("analyticsManager");
|
||||
var _confirmationPopup = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("confirmationPopup");
|
||||
var _bindEvents = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("bindEvents");
|
||||
var _unbindEvents = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("unbindEvents");
|
||||
var _tryShowFeaturePromoter = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("tryShowFeaturePromoter");
|
||||
@@ -5516,6 +5530,10 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, _confirmationPopup, {
|
||||
writable: true,
|
||||
value: null
|
||||
});
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _options$1)[_options$1] = options || {};
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _renderTo)[_renderTo] = babelHelpers.classPrivateFieldLooseBase(this, _options$1)[_options$1].renderTo;
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _buttonPanel)[_buttonPanel] = BX.UI.ButtonPanel || null;
|
||||
@@ -5548,12 +5566,11 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
}
|
||||
sendActionRequest() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].state.application.isSaving || !babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].getters['application/isModified']) {
|
||||
if (babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].state.application.isProgress || !babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].getters['application/isModified']) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].commit('application/setSaving', true);
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _analyticsManager)[_analyticsManager].onSaveAttempt();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].commit('application/setProgress', true);
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _runSaveAjaxRequest)[_runSaveAjaxRequest]().then(({
|
||||
userGroups,
|
||||
accessRights
|
||||
@@ -5590,7 +5607,7 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
var _babelHelpers$classPr;
|
||||
const waitContainer = (_babelHelpers$classPr = babelHelpers.classPrivateFieldLooseBase(this, _buttonPanel)[_buttonPanel]) == null ? void 0 : _babelHelpers$classPr.getContainer().querySelector('.ui-btn-wait');
|
||||
main_core.Dom.removeClass(waitContainer, 'ui-btn-wait');
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].commit('application/setSaving', false);
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].commit('application/setProgress', false);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
@@ -5636,6 +5653,11 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _buttonPanel)[_buttonPanel] = null;
|
||||
main_core.Dom.clean(babelHelpers.classPrivateFieldLooseBase(this, _renderTo)[_renderTo]);
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _renderTo)[_renderTo] = null;
|
||||
if (babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup]) {
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup].close();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup].getPopupWindow().destroy();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup] = null;
|
||||
}
|
||||
}
|
||||
hasUnsavedChanges() {
|
||||
return !(!babelHelpers.classPrivateFieldLooseBase(this, _store$1)[_store$1].getters['application/isModified'] || babelHelpers.classPrivateFieldLooseBase(this, _isUserConfirmedClose)[_isUserConfirmedClose]);
|
||||
@@ -5739,7 +5761,10 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
return;
|
||||
}
|
||||
sliderEvent.denyAction();
|
||||
const box = ui_dialogs_messagebox.MessageBox.create({
|
||||
if (babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup] && babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup].getPopupWindow().isShown()) {
|
||||
return;
|
||||
}
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup] = ui_dialogs_messagebox.MessageBox.create({
|
||||
mediumButtonSize: false,
|
||||
title: main_core.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_MODIFIED_CLOSE_WARNING_TITLE'),
|
||||
message: main_core.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_MODIFIED_CLOSE_WARNING'),
|
||||
@@ -5751,19 +5776,25 @@ this.BX.UI.AccessRights = this.BX.UI.AccessRights || {};
|
||||
onclick: () => {
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _analyticsManager)[_analyticsManager].onCloseWithoutSave();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _isUserConfirmedClose)[_isUserConfirmedClose] = true;
|
||||
box.close();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup].close();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup] = null;
|
||||
setTimeout(() => {
|
||||
sliderEvent.getSlider().close();
|
||||
});
|
||||
}
|
||||
}), new ui_buttons.CancelButton({
|
||||
size: ui_buttons.ButtonSize.SMALL,
|
||||
text: main_core.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_CANCEL'),
|
||||
onclick: () => {
|
||||
box.close();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup].close();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup] = null;
|
||||
}
|
||||
})]
|
||||
})],
|
||||
popupOptions: {
|
||||
fixed: true
|
||||
}
|
||||
});
|
||||
box.show();
|
||||
babelHelpers.classPrivateFieldLooseBase(this, _confirmationPopup)[_confirmationPopup].show();
|
||||
}
|
||||
|
||||
exports.App = App;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,6 +7,7 @@ $MESS["JS_UI_ACCESSRIGHTS_V2_ALL_ROLES"] = "All roles";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ALL_SELECT_LABEL"] = "select all";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_APPLY_TO_ROLE"] = "Copy to existing role";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_APPLY_TO_ROLE_SUBTITLE"] = "Copies access permissions from this role to another one.";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_CANCEL"] = "Cancel";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_COLLAPSE_ALL_SECTIONS"] = "Collapse all sections";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_COPIED_ROLE_NAME"] = "Copy of #ORIGINAL#";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_COPY"] = "Clone";
|
||||
|
||||
@@ -7,6 +7,7 @@ $MESS["JS_UI_ACCESSRIGHTS_V2_ALL_ROLES"] = "Барлық рөлдер";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ALL_SELECT_LABEL"] = "барлығын таңдаңыз";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_APPLY_TO_ROLE"] = "Басқа рөлге көшіру";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_APPLY_TO_ROLE_SUBTITLE"] = "Орнатылған қолжетімділік құқықтары басқа рөлге көшіріледі.";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_CANCEL"] = "Болдырмау";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_COLLAPSE_ALL_SECTIONS"] = "Барлық бөлімдерді орау";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_COPIED_ROLE_NAME"] = "#ORIGINAL# көшірмесі";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_COPY"] = "Көшіру";
|
||||
@@ -40,10 +41,8 @@ $MESS["JS_UI_ACCESSRIGHTS_V2_ROLE_COUNTER"] = " #ALL_ROLES##GREY_FINISH# -дан
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ROLE_NAME"] = "Рөл атауы";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ROLE_SELECTOR_MAX_VISIBLE_WARNING"] = "Кіру құқығында бір уақытта #COUNT# рөл көрсетілуі мүмкін";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ROLE_VIEW"] = "Рөлдерді көрсету";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ROLE_VIEW_SUBTITLE"] = "Маңызды емес рөлдер жасырылады";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ROLE_VIEW_SUBTITLE_MSGVER_1"] = "Қандай рөлдерді көрсету немесе жасыру керектігін таңдаңыз.";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_SEARCH_PLACEHOLDER"] = "Іздеу";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_SEARCH_PLACEHOLDER_1"] = "элемент немесе ереже атауы бойынша іздеу";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_SELECTED_ITEMS_TITLE"] = "Таңдалған:";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_SETTINGS_HAVE_BEEN_SAVED"] = "Баптаулар сақталды";
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_SET_MAX_ACCESS_RIGHTS"] = "Барлығына қолжетімділікті ашыңыз";
|
||||
|
||||
@@ -56,3 +56,4 @@ $MESS["JS_UI_ACCESSRIGHTS_V2_SET_MIN_ACCESS_RIGHTS_ROW_SUBTITLE"] = "Досту
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_ACTIONS"] = "Действия";
|
||||
$MESS['JS_UI_ACCESSRIGHTS_V2_EXPAND_ALL_SECTIONS'] = 'Развернуть все разделы';
|
||||
$MESS['JS_UI_ACCESSRIGHTS_V2_COLLAPSE_ALL_SECTIONS'] = 'Свернуть все разделы';
|
||||
$MESS["JS_UI_ACCESSRIGHTS_V2_CANCEL"] = "Отмена";
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Grid } from './components/grid';
|
||||
import 'ui.notification';
|
||||
import { AnalyticsManager } from './integration/analytics-manager';
|
||||
import { createStore } from './store/index';
|
||||
import type { AccessRightsModel } from './store/model/access-rights-model';
|
||||
import type { Options } from './store/model/application-model';
|
||||
import { AccessRightsExporter } from './store/model/transformation/backend-exporter/access-rights-exporter';
|
||||
import { AllUserGroupsExporter } from './store/model/transformation/backend-exporter/user-groups/all-user-groups-exporter';
|
||||
@@ -19,7 +20,6 @@ import type { ExternalUserGroup } from './store/model/transformation/internalize
|
||||
import { UserGroupsInternalizer } from './store/model/transformation/internalizer/user-groups-internalizer';
|
||||
import { ShownUserGroupsCopier } from './store/model/transformation/shown-user-groups-copier';
|
||||
import type { UserGroupsCollection, UserGroupsModel } from './store/model/user-groups-model';
|
||||
import type { AccessRightsModel } from './store/model/access-rights-model';
|
||||
|
||||
export type AppConstructOptions = Options & {
|
||||
renderTo: HTMLElement;
|
||||
@@ -51,6 +51,7 @@ export class App
|
||||
#userGroupsModel: UserGroupsModel;
|
||||
#accessRightsModel: AccessRightsModel;
|
||||
#analyticsManager: AnalyticsManager;
|
||||
#confirmationPopup: MessageBox | null = null;
|
||||
|
||||
constructor(options: AppConstructOptions)
|
||||
{
|
||||
@@ -155,16 +156,14 @@ export class App
|
||||
sendActionRequest(): Promise
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
if (this.#store.state.application.isSaving || !this.#store.getters['application/isModified'])
|
||||
if (this.#store.state.application.isProgress || !this.#store.getters['application/isModified'])
|
||||
{
|
||||
resolve();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.#store.commit('application/setSaving', true);
|
||||
|
||||
this.#analyticsManager.onSaveAttempt();
|
||||
this.#store.commit('application/setProgress', true);
|
||||
|
||||
this.#runSaveAjaxRequest()
|
||||
.then(({ userGroups, accessRights }) => {
|
||||
@@ -203,7 +202,7 @@ export class App
|
||||
.finally(() => {
|
||||
const waitContainer = this.#buttonPanel?.getContainer().querySelector('.ui-btn-wait');
|
||||
Dom.removeClass(waitContainer, 'ui-btn-wait');
|
||||
this.#store.commit('application/setSaving', false);
|
||||
this.#store.commit('application/setProgress', false);
|
||||
|
||||
resolve();
|
||||
});
|
||||
@@ -287,7 +286,12 @@ export class App
|
||||
|
||||
sliderEvent.denyAction();
|
||||
|
||||
const box = MessageBox.create({
|
||||
if (this.#confirmationPopup && this.#confirmationPopup.getPopupWindow().isShown())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.#confirmationPopup = MessageBox.create({
|
||||
mediumButtonSize: false,
|
||||
title: Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_MODIFIED_CLOSE_WARNING_TITLE'),
|
||||
message: Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_MODIFIED_CLOSE_WARNING'),
|
||||
@@ -300,7 +304,8 @@ export class App
|
||||
onclick: () => {
|
||||
this.#analyticsManager.onCloseWithoutSave();
|
||||
this.#isUserConfirmedClose = true;
|
||||
box.close();
|
||||
this.#confirmationPopup.close();
|
||||
this.#confirmationPopup = null;
|
||||
|
||||
setTimeout(() => {
|
||||
sliderEvent.getSlider().close();
|
||||
@@ -309,14 +314,19 @@ export class App
|
||||
}),
|
||||
new CancelButton({
|
||||
size: ButtonSize.SMALL,
|
||||
text: Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_CANCEL'),
|
||||
onclick: () => {
|
||||
box.close();
|
||||
this.#confirmationPopup.close();
|
||||
this.#confirmationPopup = null;
|
||||
},
|
||||
}),
|
||||
],
|
||||
popupOptions: {
|
||||
fixed: true,
|
||||
},
|
||||
});
|
||||
|
||||
box.show();
|
||||
this.#confirmationPopup.show();
|
||||
}
|
||||
|
||||
draw(): void
|
||||
@@ -377,6 +387,13 @@ export class App
|
||||
|
||||
Dom.clean(this.#renderTo);
|
||||
this.#renderTo = null;
|
||||
|
||||
if (this.#confirmationPopup)
|
||||
{
|
||||
this.#confirmationPopup.close();
|
||||
this.#confirmationPopup.getPopupWindow().destroy();
|
||||
this.#confirmationPopup = null;
|
||||
}
|
||||
}
|
||||
|
||||
hasUnsavedChanges(): boolean
|
||||
|
||||
@@ -12,7 +12,7 @@ export const Grid = {
|
||||
loader: null,
|
||||
computed: {
|
||||
...mapState({
|
||||
isSaving: (state) => state.application.isSaving,
|
||||
isProgress: (state) => state.application.isProgress,
|
||||
guid: (state) => state.application.guid,
|
||||
searchContainerSelector: (state) => state.application.options.searchContainerSelector,
|
||||
}),
|
||||
@@ -109,7 +109,7 @@ export const Grid = {
|
||||
<SearchBox/>
|
||||
</Teleport>
|
||||
<div ref="container" class='ui-access-rights-v2' :class="{
|
||||
'ui-access-rights-v2-block': isSaving,
|
||||
'ui-access-rights-v2-block': isProgress,
|
||||
}">
|
||||
<Header :user-groups="shownUserGroups"/>
|
||||
<Section
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
import { Extension } from 'main.core';
|
||||
import type { MemberCollection } from '../../store/model/user-groups-model';
|
||||
import { Selector } from './members/selector';
|
||||
import { SingleMember } from './members/single-member';
|
||||
@@ -62,7 +63,7 @@ export const Members = {
|
||||
'--has-siblings': userGroup.members.size > 0,
|
||||
}"
|
||||
>
|
||||
<div class="ui-icon-set --plus-30"></div>
|
||||
<div class="ui-icon-set --plus-m"></div>
|
||||
</div>
|
||||
<Selector
|
||||
v-if="isSelectorShown"
|
||||
|
||||
+25
-1
@@ -32,6 +32,7 @@ export const Selector = {
|
||||
addUserGroupsProviderTab: (state) => state.application.options.additionalMembersParams.addUserGroupsProviderTab,
|
||||
addProjectsProviderTab: (state) => state.application.options.additionalMembersParams.addProjectsProviderTab,
|
||||
addStructureTeamsProviderTab: (state) => state.application.options.additionalMembersParams.addStructureTeamsProviderTab,
|
||||
addStructureRolesProviderTab: (state) => state.application.options.additionalMembersParams.addStructureRolesProviderTab,
|
||||
}),
|
||||
},
|
||||
mounted()
|
||||
@@ -90,6 +91,11 @@ export const Selector = {
|
||||
return ['site-groups', groupId];
|
||||
}
|
||||
|
||||
if (/^(?:ATD|ATE|ATT|AD|AE|AT)[1-9]\d*$/.test(accessCode))
|
||||
{
|
||||
return ['structure-role', accessCode];
|
||||
}
|
||||
|
||||
if (accessCode.at(0) === 'A')
|
||||
{
|
||||
return ['user-groups', accessCode];
|
||||
@@ -192,6 +198,11 @@ export const Selector = {
|
||||
return item.id;
|
||||
}
|
||||
|
||||
if (entityId === 'structure-role')
|
||||
{
|
||||
return item.id;
|
||||
}
|
||||
|
||||
if (entityId === 'project-access-codes')
|
||||
{
|
||||
return item.id;
|
||||
@@ -216,6 +227,7 @@ export const Selector = {
|
||||
return 'structureteams';
|
||||
case 'site-groups':
|
||||
case 'user-groups':
|
||||
case 'structure-role':
|
||||
return 'usergroups';
|
||||
default:
|
||||
return '';
|
||||
@@ -247,15 +259,27 @@ export const Selector = {
|
||||
},
|
||||
];
|
||||
|
||||
if (this.addStructureRolesProviderTab)
|
||||
{
|
||||
entities.push({
|
||||
id: 'structure-role',
|
||||
options: {
|
||||
includedNodeEntityTypes: ['team', 'department'],
|
||||
},
|
||||
dynamicLoad: true,
|
||||
dynamicSearch: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (this.addStructureTeamsProviderTab)
|
||||
{
|
||||
entities.push({
|
||||
id: 'structure-node',
|
||||
options: {
|
||||
selectMode: 'usersAndDepartments',
|
||||
includedNodeEntityTypes: ['team'],
|
||||
allowSelectRootDepartment: true,
|
||||
allowFlatDepartments: true,
|
||||
includedNodeEntityTypes: ['team'],
|
||||
useMultipleTabs: true,
|
||||
visual: {
|
||||
avatarMode: 'node',
|
||||
|
||||
+6
-4
@@ -23,7 +23,7 @@ export const RoleHeading = {
|
||||
computed: {
|
||||
RichMenuItemIcon: () => RichMenuItemIcon,
|
||||
...mapState({
|
||||
isSaving: (state) => state.application.isSaving,
|
||||
isProgress: (state) => state.application.isProgress,
|
||||
guid: (state) => state.application.guid,
|
||||
maxVisibleUserGroups: (state) => state.application.options.maxVisibleUserGroups,
|
||||
}),
|
||||
@@ -122,6 +122,7 @@ export const RoleHeading = {
|
||||
},
|
||||
}),
|
||||
new CancelButton({
|
||||
text: this.$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_CANCEL'),
|
||||
size: ButtonSize.SMALL,
|
||||
events: {
|
||||
click: () => {
|
||||
@@ -135,7 +136,7 @@ export const RoleHeading = {
|
||||
popup.show();
|
||||
},
|
||||
showActionsMenu(): void {
|
||||
if (!this.isSaving)
|
||||
if (!this.isProgress)
|
||||
{
|
||||
this.isPopupShown = true;
|
||||
}
|
||||
@@ -179,7 +180,7 @@ export const RoleHeading = {
|
||||
<div ref="container" class='ui-access-rights-v2-role'>
|
||||
<div class="ui-access-rights-v2-role-value-container">
|
||||
<input
|
||||
v-if="isEdit && !isSaving"
|
||||
v-if="isEdit && !isProgress"
|
||||
ref="input"
|
||||
type='text'
|
||||
class='ui-access-rights-v2-role-input'
|
||||
@@ -191,7 +192,8 @@ export const RoleHeading = {
|
||||
</div>
|
||||
<div
|
||||
ref="menu"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more"
|
||||
style="position: absolute; right: 11px; top: 5px;"
|
||||
@click="showActionsMenu"
|
||||
>
|
||||
<RichMenuPopup v-if="isPopupShown" @close="isPopupShown = false" :popup-options="{bindElement: $refs.menu}">
|
||||
|
||||
+17
-12
@@ -169,7 +169,8 @@ export const RolesControl = {
|
||||
<div>{{ $Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_ROLES') }}</div>
|
||||
<div
|
||||
ref="configure"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more"
|
||||
style="position: absolute; right: 11px; top: 5px;"
|
||||
@click="isPopupShown = true"
|
||||
>
|
||||
<RichMenuPopup v-if="isPopupShown" @close="isPopupShown = false" :popup-options="{bindElement: $refs.configure}">
|
||||
@@ -216,21 +217,25 @@ export const RolesControl = {
|
||||
class="ui-access-rights-v2-header-roles-control-counter"
|
||||
@click="toggleViewDialog($refs.counter)"
|
||||
>
|
||||
<div class="ui-icon-set --opened-eye" style="--ui-icon-set__icon-size: 15px;"></div>
|
||||
<div class="ui-icon-set --o-observer" style="--ui-icon-set__icon-size: 18px;"></div>
|
||||
<span v-html="shownGroupsCounter"></span>
|
||||
<div class="ui-icon-set --chevron-down ui-access-rights-v2-header-roles-control-chevron"></div>
|
||||
</div>
|
||||
<div class="ui-access-rights-v2-header-roles-control-expander">
|
||||
<div
|
||||
class="ui-icon-set --collapse"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_COLLAPSE_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/collapseAllSections')"
|
||||
></div>
|
||||
<div
|
||||
class="ui-icon-set --expand-1"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_EXPAND_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/expandAllSections')"
|
||||
></div>
|
||||
<div class="ui-access-rights-v2-header-roles-control-expander-button">
|
||||
<div
|
||||
class="ui-icon-set --collapse"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_COLLAPSE_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/collapseAllSections')"
|
||||
></div>
|
||||
</div>
|
||||
<div class="ui-access-rights-v2-header-roles-control-expander-button">
|
||||
<div
|
||||
class="ui-icon-set --expand-1"
|
||||
:title="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_EXPAND_ALL_SECTIONS')"
|
||||
@click="$store.dispatch('accessRights/expandAllSections')"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</CellLayout>
|
||||
|
||||
@@ -22,14 +22,19 @@ export const SearchBox = {
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div class="ui-ctl ui-ctl-after-icon ui-ctl-w100 ui-access-rights-v2-search">
|
||||
<div
|
||||
class="ui-ctl ui-ctl-after-icon ui-access-rights-v2-search">
|
||||
<input
|
||||
type="text"
|
||||
class="ui-ctl-element ui-ctl-textbox ui-access-rights-v2-search-input"
|
||||
:placeholder="$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_SEARCH_PLACEHOLDER')"
|
||||
v-model="searchQuery"
|
||||
ref="searchInput"
|
||||
>
|
||||
<a class="ui-ctl-after ui-ctl-icon-search ui-access-rights-v2-search-icon"></a>
|
||||
<a
|
||||
class="ui-icon-set --o-search ui-access-rights-v2-search-icon"
|
||||
@click="this.$refs.searchInput.focus()"
|
||||
></a>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ export const MenuCell = {
|
||||
<CellLayout class="ui-access-rights-v2-menu-cell" style="cursor: pointer" @click="toggleMenu">
|
||||
<div
|
||||
ref="icon"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more"
|
||||
>
|
||||
<RichMenuPopup
|
||||
v-if="isMenuShown"
|
||||
|
||||
+5
-7
@@ -129,8 +129,8 @@ export const TitleCell = {
|
||||
v-if="right.groupHead"
|
||||
class="ui-icon-set"
|
||||
:class="{
|
||||
'--minus-in-circle': right.isGroupExpanded,
|
||||
'--plus-in-circle': !right.isGroupExpanded,
|
||||
'--o-circle-minus': right.isGroupExpanded,
|
||||
'--o-circle-plus': !right.isGroupExpanded,
|
||||
}"
|
||||
></span>
|
||||
<div
|
||||
@@ -144,15 +144,13 @@ export const TitleCell = {
|
||||
class="ui-access-rights-v2-column-item-title-link ui-access-rights-v2-text-ellipsis"
|
||||
@click="onRightClick"
|
||||
>
|
||||
{{ right.title }}
|
||||
<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
{{ right.title }}<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
class="ui-access-rights-v2-text-wrap"
|
||||
>
|
||||
{{ right.title }}
|
||||
<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
{{ right.title }}<Hint v-once v-if="right.hint" :html="right.hint"/>
|
||||
</span>
|
||||
<span
|
||||
v-if="right.subtitle"
|
||||
@@ -162,7 +160,7 @@ export const TitleCell = {
|
||||
</div>
|
||||
<div
|
||||
ref="icon"
|
||||
class="ui-icon-set --more ui-access-rights-v2-icon-more ui-access-rights-v2-title-column-menu"
|
||||
class="ui-icon-set --more-l ui-access-rights-v2-icon-more ui-access-rights-v2-title-column-menu"
|
||||
@click="toggleMenu"
|
||||
>
|
||||
<RichMenuPopup
|
||||
|
||||
+1
@@ -47,6 +47,7 @@ export const ValuePopup = {
|
||||
onclick: () => {
|
||||
this.$emit('close');
|
||||
},
|
||||
text: this.$Bitrix.Loc.getMessage('JS_UI_ACCESSRIGHTS_V2_CANCEL'),
|
||||
});
|
||||
cancelButton.renderTo(this.$refs['button-container']);
|
||||
});
|
||||
|
||||
+31
-2
@@ -24,10 +24,18 @@
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
font-size: var(--ui-font-size-sm);
|
||||
border: 1px solid var(--design-outline-default-design-outline-stroke, var(--ui-color-base-7));
|
||||
border-radius: var(--ui-border-radius-pill);
|
||||
box-shadow: var(--ui-shadow-bottom-s);
|
||||
padding: 5px 10px 5px 10px;
|
||||
border: var(--ui-border-width-thin) solid rgba(var(--ui-color-palette-black-solid-rgb), 0.07)
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-counter:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-counter .ui-icon-set {
|
||||
--ui-icon-set__icon-color: var(--ui-color-accent-main-primary);
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-chevron {
|
||||
@@ -46,3 +54,24 @@
|
||||
opacity: var(--ui-opacity-60);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-expander-button {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
border: 1px solid var(--design-outline-default-design-outline-stroke, var(--ui-color-base-7));
|
||||
border-radius: var(--ui-border-radius-xs);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-expander-button:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-roles-control-expander-button .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 18px;
|
||||
}
|
||||
|
||||
@@ -22,23 +22,22 @@
|
||||
.ui-access-rights-v2-section-header-expander {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: var(--ui-color-palette-white-base);
|
||||
border: 1px solid var(--ui-color-base-7);
|
||||
border-radius: var(--ui-border-radius-circle);
|
||||
box-shadow: var(--ui-shadow-bottom-s);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 9px;
|
||||
background-color: var(--ui-color-bg-content-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header-expander:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header-expander .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 12px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-gray-40);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header.--expanded .ui-access-rights-v2-section-header-expander .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 12px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-black-base);
|
||||
--ui-icon-set__icon-color: var(--ui-color-accent-main-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header-icon {
|
||||
@@ -55,16 +54,16 @@
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-title {
|
||||
color: var(--ui-color-palette-gray-80);
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-header.--expanded .ui-access-rights-v2-section-title {
|
||||
color: var(--ui-color-palette-black-base);
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-subtitle {
|
||||
color: var(--ui-color-palette-gray-70);
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
margin-left: 3px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
.ui-access-rights-v2 {
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section:last-child .ui-access-rights-v2-section-container {
|
||||
border-bottom-left-radius: var(--ui-border-radius-xl);
|
||||
border-bottom-right-radius: var(--ui-border-radius-xl);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-block {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
@@ -29,6 +34,14 @@
|
||||
font-size: var(--ui-font-size-lg);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2--head-section::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--ui-color-gray-05) ;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2--head-section .ui-access-rights-v2-column-item-text {
|
||||
font-size: var(--ui-font-size-lg);
|
||||
}
|
||||
@@ -44,8 +57,8 @@
|
||||
|
||||
.ui-access-rights-v2--head-section .ui-access-rights-v2-section-container {
|
||||
height: 82px;
|
||||
border-top-right-radius: var(--ui-border-radius-xs);
|
||||
border-top-left-radius: var(--ui-border-radius-xs);
|
||||
border-top-right-radius: var(--ui-border-radius-xl);
|
||||
border-top-left-radius: var(--ui-border-radius-xl);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-section-head {
|
||||
@@ -173,7 +186,7 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: var(--ui-font-size-sm);
|
||||
color: var(--ui-color-palette-black-base);
|
||||
color: var(--ui-color-base-90);
|
||||
line-height: var(--ui-font-line-height-2xs);
|
||||
cursor: default;
|
||||
}
|
||||
@@ -187,6 +200,8 @@
|
||||
.ui-access-rights-v2-column-item-title-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title-icon {
|
||||
@@ -205,8 +220,8 @@
|
||||
color: var(--ui-color-palette-gray-90);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .--plus-in-circle, .ui-access-rights-v2-column-item-title .--minus-in-circle {
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-gray-50);
|
||||
.ui-access-rights-v2-column-item-title .--o-circle-plus, .ui-access-rights-v2-column-item-title .--o-circle-minus {
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-gray-30);
|
||||
--ui-icon-set__icon-size: 18px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
@@ -216,14 +231,25 @@
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .ui-access-rights-v2-hint-container {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
top: 1px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-hint-container::before {
|
||||
content: "\00a0";
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .ui-hint {
|
||||
line-height: normal;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-hint-container .ui-icon-set {
|
||||
--ui-icon-set__icon-size: 16px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-column-item-title .ui-hint-icon {
|
||||
@@ -248,7 +274,7 @@
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-role-cell {
|
||||
padding: 10px;
|
||||
padding: 16px 10px 10px 10px;
|
||||
height: calc(100% - 20px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -268,13 +294,15 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: -16px; /* because of menu */
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-role-input,
|
||||
.ui-access-rights-v2-role-value {
|
||||
font-size: var(--ui-font-size-lg);
|
||||
line-height: var(--ui-font-line-height-3xs);
|
||||
color: var(--ui-color-gray-90);
|
||||
font-weight: var(--ui-font-weight-normal);
|
||||
line-height: 20px;
|
||||
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -305,11 +333,14 @@
|
||||
.ui-access-rights-v2-members {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: var(--ui-border-width-thin) solid #525C6929;
|
||||
border-radius: var(--ui-border-radius-pill);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-air-template {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item {
|
||||
display: inline-block;
|
||||
margin-left: -9px;
|
||||
@@ -327,15 +358,18 @@
|
||||
.ui-access-rights-v2-members-item-add {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
border: none;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,.14);
|
||||
border-radius: 100%;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--ui-color-base-7)
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item-add:hover {
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item-add .ui-icon-set {
|
||||
--ui-icon-set__icon-color: var(--ui-color-palette-blue-50);
|
||||
--ui-icon-set__icon-color: var(--ui-color-accent-main-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-members-item-add:hover .ui-icon-set {
|
||||
@@ -437,6 +471,12 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
overflow: visible;
|
||||
text-overflow: clip;
|
||||
word-break: break-word;
|
||||
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
|
||||
font-weight: 400;
|
||||
font-size: var(--ui-font-size-sm);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-text-center {
|
||||
@@ -455,13 +495,23 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
|
||||
.ui-access-rights-v2-icon-more {
|
||||
--ui-icon-set__icon-size: 16px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-base-5);
|
||||
opacity: var(--ui-opacity-40);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search {
|
||||
max-width: 290px;
|
||||
--ui-field-size: 34px
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search-input {
|
||||
background-color: #F6F7F9;
|
||||
border: none;
|
||||
border-radius: var(--ui-border-radius-sm);
|
||||
border: 1px solid var(--ui-color-bg-content-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search .ui-ctl-element:hover, .ui-access-rights-v2-search .ui-ctl-element:focus {
|
||||
border-color: var(--ui-color-bg-content-primary);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search-input:focus {
|
||||
@@ -485,8 +535,7 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-role-add .ui-btn:hover:not(.ui-btn-disabled) {
|
||||
border-color: var(--ui-color-palette-blue-30);
|
||||
background: unset;
|
||||
background-color: var(--ui-color-base-7);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-header-role-add .ui-btn.ui-btn-disabled {
|
||||
@@ -495,4 +544,17 @@ div.ui-access-rights-v2-members-item-new:last-of-type {
|
||||
|
||||
.ui-access-rights-v2-header-role-add .ui-icon-set {
|
||||
--ui-icon-set__icon-color: var(--ui-color-base-50);
|
||||
}
|
||||
|
||||
.ui-access-rights-v2-search-icon {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
width: 22px;
|
||||
height: calc(var(--ui-field-size) - 2px);
|
||||
right: 12px;
|
||||
cursor: pointer;
|
||||
|
||||
--ui-icon-set__icon-size: 20px;
|
||||
--ui-icon-set__icon-color: var(--ui-color-base-5);
|
||||
}
|
||||
-25
@@ -21,31 +21,6 @@ export class AnalyticsManager
|
||||
this.#isEnabled = Object.hasOwn(this.#data, 'tool') && Object.hasOwn(this.#data, 'category');
|
||||
}
|
||||
|
||||
onSaveAttempt(): void
|
||||
{
|
||||
if (!this.#isEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const { createdRoles, editedRoles, deletedRoles } = this.#analyzeRoles();
|
||||
|
||||
for (let i = 0; i < createdRoles; i++)
|
||||
{
|
||||
this.#registerRoleCreateEvent('attempt');
|
||||
}
|
||||
|
||||
for (let i = 0; i < editedRoles; i++)
|
||||
{
|
||||
this.#registerRoleEditEvent('attempt');
|
||||
}
|
||||
|
||||
for (let i = 0; i < deletedRoles; i++)
|
||||
{
|
||||
this.#registerRoleDeleteEvent('attempt');
|
||||
}
|
||||
}
|
||||
|
||||
onSaveSuccess(): void
|
||||
{
|
||||
if (!this.#isEnabled)
|
||||
|
||||
@@ -20,6 +20,7 @@ export class ServiceLocator
|
||||
return this.#cache.remember(`hint-${appGuid}`, () => {
|
||||
return BX.UI.Hint.createInstance({
|
||||
id: `ui-access-rights-v2-hint-${appGuid}`,
|
||||
classNameIcon: 'ui-icon-set --o-question',
|
||||
popupParameters: {
|
||||
className: 'ui-access-rights-v2-popup-pointer-events ui-hint-popup',
|
||||
autoHide: true,
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@ import { BuilderModel, type GetterTree, type MutationTree } from 'ui.vue3.vuex';
|
||||
export type ApplicationState = {
|
||||
options: Readonly<Options>,
|
||||
guid: string,
|
||||
isSaving: boolean,
|
||||
isProgress: boolean,
|
||||
}
|
||||
|
||||
export type Options = {
|
||||
@@ -58,7 +58,7 @@ export class ApplicationModel extends BuilderModel
|
||||
return {
|
||||
options: this.#options,
|
||||
guid: this.#guid,
|
||||
isSaving: false,
|
||||
isProgress: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -80,9 +80,9 @@ export class ApplicationModel extends BuilderModel
|
||||
getMutations(): MutationTree<ApplicationState>
|
||||
{
|
||||
return {
|
||||
setSaving: (state, isSaving: boolean): void => {
|
||||
setProgress: (state, isProgress: boolean): void => {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
state.isSaving = Boolean(isSaving);
|
||||
state.isProgress = Boolean(isProgress);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
+2
@@ -31,11 +31,13 @@ export class ApplicationInternalizer implements Transformer<Options, Readonly<Op
|
||||
addUserGroupsProviderTab: Boolean(externalSource.additionalMembersParams?.addUserGroupsProviderTab ?? false),
|
||||
addProjectsProviderTab: Boolean(externalSource.additionalMembersParams?.addProjectsProviderTab ?? true),
|
||||
addStructureTeamsProviderTab: Boolean(externalSource.additionalMembersParams?.addStructureTeamsProviderTab ?? false),
|
||||
addStructureRolesProviderTab: Boolean(externalSource.additionalMembersParams?.addStructureRolesProviderTab ?? false),
|
||||
}
|
||||
: {
|
||||
addUserGroupsProviderTab: false,
|
||||
addProjectsProviderTab: true,
|
||||
addStructureTeamsProviderTab: false,
|
||||
addStructureRolesProviderTab: false,
|
||||
},
|
||||
isSaveAccessRightsList: Type.isBoolean(externalSource.isSaveAccessRightsList)
|
||||
? externalSource.isSaveAccessRightsList
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.ui-avatar svg {
|
||||
.ui-avatar > svg {
|
||||
width: var(--ui-avatar-size);
|
||||
height: var(--ui-avatar-size)
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -40,7 +40,7 @@
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.ui-avatar svg {
|
||||
.ui-avatar > svg {
|
||||
width: var(--ui-avatar-size);
|
||||
height: var(--ui-avatar-size)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
this.BX=this.BX||{},function(e,s,a){"use strict";var t=babelHelpers.classPrivateFieldLooseKey("priority"),i=babelHelpers.classPrivateFieldLooseKey("delay"),r=babelHelpers.classPrivateFieldLooseKey("itemList"),l=babelHelpers.classPrivateFieldLooseKey("enough"),o=babelHelpers.classPrivateFieldLooseKey("launchPerHit");class c{constructor(e,s,a=!1){Object.defineProperty(this,t,{writable:!0,value:void 0}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,r,{writable:!0,value:{}}),Object.defineProperty(this,l,{writable:!0,value:!1}),Object.defineProperty(this,o,{writable:!0,value:!1}),babelHelpers.classPrivateFieldLooseBase(this,i)[i]=1e3*parseInt(s,10),babelHelpers.classPrivateFieldLooseBase(this,t)[t]=e,babelHelpers.classPrivateFieldLooseBase(this,o)[o]=a}add(e,c={}){if(babelHelpers.classPrivateFieldLooseBase(this,l)[l])return;if(!a.Type.isFunction(e))throw new TypeError('Unexpected type "promise" argument, expected Promise or callback');const h=!(babelHelpers.classPrivateFieldLooseBase(this,o)[o]&&Object.values(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).length>0),n=a.Type.isStringFilled(c.id)?c.id:a.Text.getRandom();babelHelpers.classPrivateFieldLooseBase(this,r)[r][n]=e,s.AutoLauncher.register(e,{...c,delay:babelHelpers.classPrivateFieldLooseBase(this,i)[i],priority:babelHelpers.classPrivateFieldLooseBase(this,t)[t],allowLaunchAfterOthers:h,id:n})}getItems(){return babelHelpers.classPrivateFieldLooseBase(this,r)[r]}clean(){Object.keys(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).forEach(e=>{this.remove(e)})}enough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!0}notEnough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!1}stop(){this.clean(),this.enough()}remove(e){s.AutoLauncher.unregister(e)}}const h=new c(s.LaunchPriority.CRITICAL,0),n=new c(s.LaunchPriority.HIGH,1),b=new c(s.LaunchPriority.NORMAL,1,!0),u=new c(s.LaunchPriority.LOW,5,!0),d={critical:{toQueue:(e,s={})=>{h.add(e,{allowLaunchAfterOthers:!0,forceShowOnTop:!0,...s})}},high:{toQueue:(e,s={})=>{n.add(e,{allowLaunchAfterOthers:!0,...s})}},normal:{toQueue:(e,s={})=>{b.add(e,s)}},low:{toQueue:(e,s={})=>{u.add(e,s)}},toQueue:(e,s={})=>{b.add(e,s)},only(e){Object.values(s.LaunchPriority).forEach(a=>{if(!e.includes(a))switch(a){case s.LaunchPriority.CRITICAL:h.stop();break;case s.LaunchPriority.HIGH:n.stop();break;case s.LaunchPriority.NORMAL:b.stop();break;case s.LaunchPriority.LOW:u.stop()}})}};e.BannerDispatcher=d}(this.BX.UI=this.BX.UI||{},BX.UI.AutoLaunch,BX);
|
||||
this.BX=this.BX||{},function(e,s,a){"use strict";var i=babelHelpers.classPrivateFieldLooseKey("priority"),t=babelHelpers.classPrivateFieldLooseKey("delay"),r=babelHelpers.classPrivateFieldLooseKey("itemList"),l=babelHelpers.classPrivateFieldLooseKey("enough"),o=babelHelpers.classPrivateFieldLooseKey("launchPerHit");class c{constructor(e,s,a=!1){Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,t,{writable:!0,value:void 0}),Object.defineProperty(this,r,{writable:!0,value:{}}),Object.defineProperty(this,l,{writable:!0,value:!1}),Object.defineProperty(this,o,{writable:!0,value:!1}),babelHelpers.classPrivateFieldLooseBase(this,t)[t]=1e3*parseInt(s,10),babelHelpers.classPrivateFieldLooseBase(this,i)[i]=e,babelHelpers.classPrivateFieldLooseBase(this,o)[o]=a}add(e,c={}){if(babelHelpers.classPrivateFieldLooseBase(this,l)[l])return;if(!a.Type.isFunction(e))throw new TypeError('Unexpected type "promise" argument, expected Promise or callback');const h=!(babelHelpers.classPrivateFieldLooseBase(this,o)[o]&&Object.values(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).length>0),n=a.Type.isStringFilled(c.id)?c.id:a.Text.getRandom();babelHelpers.classPrivateFieldLooseBase(this,r)[r][n]=e,s.AutoLauncher.register(e,{...c,delay:babelHelpers.classPrivateFieldLooseBase(this,t)[t],priority:babelHelpers.classPrivateFieldLooseBase(this,i)[i],allowLaunchAfterOthers:h,id:n})}getItems(){return babelHelpers.classPrivateFieldLooseBase(this,r)[r]}clean(){Object.keys(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).forEach(e=>{this.remove(e)})}enough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!0}notEnough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!1}stop(){this.clean(),this.enough()}remove(e){s.AutoLauncher.unregister(e)}}const h=new c(s.LaunchPriority.CRITICAL,0),n=new c(s.LaunchPriority.HIGH,1),b=new c(s.LaunchPriority.NORMAL,1,!0),u=new c(s.LaunchPriority.LOW,5,!0),d={critical:{toQueue:(e,s={})=>{h.add(e,{allowLaunchAfterOthers:!0,forceShowOnTop:!0,...s})}},high:{toQueue:(e,s={})=>{n.add(e,{allowLaunchAfterOthers:!0,...s})}},normal:{toQueue:(e,s={})=>{b.add(e,s)}},low:{toQueue:(e,s={})=>{u.add(e,s)}},toQueue:(e,s={})=>{b.add(e,s)},only(e){Object.values(s.LaunchPriority).forEach(a=>{if(!e.includes(a))switch(a){case s.LaunchPriority.CRITICAL:h.stop();break;case s.LaunchPriority.HIGH:n.stop();break;case s.LaunchPriority.NORMAL:b.stop();break;case s.LaunchPriority.LOW:u.stop()}})},isEnabled:()=>s.AutoLauncher.isEnabled()};e.BannerDispatcher=d}(this.BX.UI=this.BX.UI||{},BX.UI.AutoLaunch,BX);
|
||||
//# sourceMappingURL=banner-dispatcher.bundle.js.map
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"banner-dispatcher.bundle.map.js","names":["this","BX","e","s","a","t","babelHelpers","classPrivateFieldLooseKey","i","r","l","o","c","constructor","Object","defineProperty","writable","value","classPrivateFieldLooseBase","parseInt","add","Type","isFunction","TypeError","h","values","length","n","isStringFilled","id","Text","getRandom","AutoLauncher","register","delay","priority","allowLaunchAfterOthers","getItems","clean","keys","forEach","remove","enough","notEnough","stop","unregister","LaunchPriority","CRITICAL","HIGH","b","NORMAL","u","LOW","d","critical","toQueue","forceShowOnTop","high","normal","low","only","includes","BannerDispatcher","UI","AutoLaunch"],"sources":["banner-dispatcher.bundle.js"],"mappings":"AAAAA,KAAKC,GAAGD,KAAKC,IAAI,CAAC,EAAE,SAASC,EAAEC,EAAEC,GAAG,aAAa,IAAIC,EAAEC,aAAaC,0BAA0B,YAAYC,EAAEF,aAAaC,0BAA0B,SAASE,EAAEH,aAAaC,0BAA0B,YAAYG,EAAEJ,aAAaC,0BAA0B,UAAUI,EAAEL,aAAaC,0BAA0B,gBAAgB,MAAMK,EAAEC,YAAYX,EAAEC,EAAEC,GAAG,GAAGU,OAAOC,eAAef,KAAKK,EAAE,CAACW,UAAU,EAAEC,WAAW,IAAIH,OAAOC,eAAef,KAAKQ,EAAE,CAACQ,UAAU,EAAEC,WAAW,IAAIH,OAAOC,eAAef,KAAKS,EAAE,CAACO,UAAU,EAAEC,MAAM,CAAC,IAAIH,OAAOC,eAAef,KAAKU,EAAE,CAACM,UAAU,EAAEC,OAAO,IAAIH,OAAOC,eAAef,KAAKW,EAAE,CAACK,UAAU,EAAEC,OAAO,IAAIX,aAAaY,2BAA2BlB,KAAKQ,GAAGA,GAAG,IAAIW,SAAShB,EAAE,IAAIG,aAAaY,2BAA2BlB,KAAKK,GAAGA,GAAGH,EAAEI,aAAaY,2BAA2BlB,KAAKW,GAAGA,GAAGP,CAAC,CAACgB,IAAIlB,EAAEU,EAAE,CAAC,GAAG,GAAGN,aAAaY,2BAA2BlB,KAAKU,GAAGA,GAAG,OAAO,IAAIN,EAAEiB,KAAKC,WAAWpB,GAAG,MAAM,IAAIqB,UAAU,oEAAoE,MAAMC,IAAIlB,aAAaY,2BAA2BlB,KAAKW,GAAGA,IAAIG,OAAOW,OAAOnB,aAAaY,2BAA2BlB,KAAKS,GAAGA,IAAIiB,OAAO,GAAGC,EAAEvB,EAAEiB,KAAKO,eAAehB,EAAEiB,IAAIjB,EAAEiB,GAAGzB,EAAE0B,KAAKC,YAAYzB,aAAaY,2BAA2BlB,KAAKS,GAAGA,GAAGkB,GAAGzB,EAAEC,EAAE6B,aAAaC,SAAS/B,EAAE,IAAIU,EAAEsB,MAAM5B,aAAaY,2BAA2BlB,KAAKQ,GAAGA,GAAG2B,SAAS7B,aAAaY,2BAA2BlB,KAAKK,GAAGA,GAAG+B,uBAAuBZ,EAAEK,GAAGF,GAAG,CAACU,WAAW,OAAO/B,aAAaY,2BAA2BlB,KAAKS,GAAGA,EAAE,CAAC6B,QAAQxB,OAAOyB,KAAKjC,aAAaY,2BAA2BlB,KAAKS,GAAGA,IAAI+B,SAAQtC,IAAIF,KAAKyC,OAAOvC,EAAC,GAAG,CAACwC,SAASpC,aAAaY,2BAA2BlB,KAAKU,GAAGA,IAAI,CAAC,CAACiC,YAAYrC,aAAaY,2BAA2BlB,KAAKU,GAAGA,IAAI,CAAC,CAACkC,OAAO5C,KAAKsC,QAAQtC,KAAK0C,QAAQ,CAACD,OAAOvC,GAAGC,EAAE6B,aAAaa,WAAW3C,EAAE,EAAE,MAAMsB,EAAE,IAAIZ,EAAET,EAAE2C,eAAeC,SAAS,GAAGpB,EAAE,IAAIf,EAAET,EAAE2C,eAAeE,KAAK,GAAGC,EAAE,IAAIrC,EAAET,EAAE2C,eAAeI,OAAO,GAAG,GAAGC,EAAE,IAAIvC,EAAET,EAAE2C,eAAeM,IAAI,GAAG,GAAGC,EAAE,CAACC,SAAS,CAACC,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAKqB,EAAEJ,IAAIlB,EAAE,CAACkC,wBAAwB,EAAEoB,gBAAgB,KAAKrD,GAAE,GAAIsD,KAAK,CAACF,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAKwB,EAAEP,IAAIlB,EAAE,CAACkC,wBAAwB,KAAKjC,GAAE,GAAIuD,OAAO,CAACH,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAK8C,EAAE7B,IAAIlB,EAAEC,EAAC,GAAIwD,IAAI,CAACJ,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAKgD,EAAE/B,IAAIlB,EAAEC,EAAC,GAAIoD,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAK8C,EAAE7B,IAAIlB,EAAEC,EAAC,EAAGyD,KAAK1D,GAAGY,OAAOW,OAAOtB,EAAE2C,gBAAgBN,SAAQpC,IAAI,IAAIF,EAAE2D,SAASzD,GAAG,OAAOA,GAAG,KAAKD,EAAE2C,eAAeC,SAASvB,EAAEoB,OAAO,MAAM,KAAKzC,EAAE2C,eAAeE,KAAKrB,EAAEiB,OAAO,MAAM,KAAKzC,EAAE2C,eAAeI,OAAOD,EAAEL,OAAO,MAAM,KAAKzC,EAAE2C,eAAeM,IAAID,EAAEP,OAAM,GAAG,GAAG1C,EAAE4D,iBAAiBT,CAAC,CAAx5E,CAA05ErD,KAAKC,GAAG8D,GAAG/D,KAAKC,GAAG8D,IAAI,CAAC,EAAE9D,GAAG8D,GAAGC,WAAW/D"}
|
||||
{"version":3,"file":"banner-dispatcher.bundle.map.js","names":["this","BX","e","s","a","i","babelHelpers","classPrivateFieldLooseKey","t","r","l","o","c","constructor","Object","defineProperty","writable","value","classPrivateFieldLooseBase","parseInt","add","Type","isFunction","TypeError","h","values","length","n","isStringFilled","id","Text","getRandom","AutoLauncher","register","delay","priority","allowLaunchAfterOthers","getItems","clean","keys","forEach","remove","enough","notEnough","stop","unregister","LaunchPriority","CRITICAL","HIGH","b","NORMAL","u","LOW","d","critical","toQueue","forceShowOnTop","high","normal","low","only","includes","isEnabled","BannerDispatcher","UI","AutoLaunch"],"sources":["banner-dispatcher.bundle.js"],"mappings":"AAAAA,KAAKC,GAAGD,KAAKC,IAAI,CAAC,EAAE,SAASC,EAAEC,EAAEC,GAAG,aAAa,IAAIC,EAAEC,aAAaC,0BAA0B,YAAYC,EAAEF,aAAaC,0BAA0B,SAASE,EAAEH,aAAaC,0BAA0B,YAAYG,EAAEJ,aAAaC,0BAA0B,UAAUI,EAAEL,aAAaC,0BAA0B,gBAAgB,MAAMK,EAAE,WAAAC,CAAYX,EAAEC,EAAEC,GAAG,GAAGU,OAAOC,eAAef,KAAKK,EAAE,CAACW,UAAU,EAAEC,WAAW,IAAIH,OAAOC,eAAef,KAAKQ,EAAE,CAACQ,UAAU,EAAEC,WAAW,IAAIH,OAAOC,eAAef,KAAKS,EAAE,CAACO,UAAU,EAAEC,MAAM,CAAC,IAAIH,OAAOC,eAAef,KAAKU,EAAE,CAACM,UAAU,EAAEC,OAAO,IAAIH,OAAOC,eAAef,KAAKW,EAAE,CAACK,UAAU,EAAEC,OAAO,IAAIX,aAAaY,2BAA2BlB,KAAKQ,GAAGA,GAAG,IAAIW,SAAShB,EAAE,IAAIG,aAAaY,2BAA2BlB,KAAKK,GAAGA,GAAGH,EAAEI,aAAaY,2BAA2BlB,KAAKW,GAAGA,GAAGP,CAAC,CAAC,GAAAgB,CAAIlB,EAAEU,EAAE,CAAC,GAAG,GAAGN,aAAaY,2BAA2BlB,KAAKU,GAAGA,GAAG,OAAO,IAAIN,EAAEiB,KAAKC,WAAWpB,GAAG,MAAM,IAAIqB,UAAU,oEAAoE,MAAMC,IAAIlB,aAAaY,2BAA2BlB,KAAKW,GAAGA,IAAIG,OAAOW,OAAOnB,aAAaY,2BAA2BlB,KAAKS,GAAGA,IAAIiB,OAAO,GAAGC,EAAEvB,EAAEiB,KAAKO,eAAehB,EAAEiB,IAAIjB,EAAEiB,GAAGzB,EAAE0B,KAAKC,YAAYzB,aAAaY,2BAA2BlB,KAAKS,GAAGA,GAAGkB,GAAGzB,EAAEC,EAAE6B,aAAaC,SAAS/B,EAAE,IAAIU,EAAEsB,MAAM5B,aAAaY,2BAA2BlB,KAAKQ,GAAGA,GAAG2B,SAAS7B,aAAaY,2BAA2BlB,KAAKK,GAAGA,GAAG+B,uBAAuBZ,EAAEK,GAAGF,GAAG,CAAC,QAAAU,GAAW,OAAO/B,aAAaY,2BAA2BlB,KAAKS,GAAGA,EAAE,CAAC,KAAA6B,GAAQxB,OAAOyB,KAAKjC,aAAaY,2BAA2BlB,KAAKS,GAAGA,IAAI+B,SAAQtC,IAAIF,KAAKyC,OAAOvC,EAAC,GAAG,CAAC,MAAAwC,GAASpC,aAAaY,2BAA2BlB,KAAKU,GAAGA,IAAI,CAAC,CAAC,SAAAiC,GAAYrC,aAAaY,2BAA2BlB,KAAKU,GAAGA,IAAI,CAAC,CAAC,IAAAkC,GAAO5C,KAAKsC,QAAQtC,KAAK0C,QAAQ,CAAC,MAAAD,CAAOvC,GAAGC,EAAE6B,aAAaa,WAAW3C,EAAE,EAAE,MAAMsB,EAAE,IAAIZ,EAAET,EAAE2C,eAAeC,SAAS,GAAGpB,EAAE,IAAIf,EAAET,EAAE2C,eAAeE,KAAK,GAAGC,EAAE,IAAIrC,EAAET,EAAE2C,eAAeI,OAAO,GAAG,GAAGC,EAAE,IAAIvC,EAAET,EAAE2C,eAAeM,IAAI,GAAG,GAAGC,EAAE,CAACC,SAAS,CAACC,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAKqB,EAAEJ,IAAIlB,EAAE,CAACkC,wBAAwB,EAAEoB,gBAAgB,KAAKrD,GAAE,GAAIsD,KAAK,CAACF,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAKwB,EAAEP,IAAIlB,EAAE,CAACkC,wBAAwB,KAAKjC,GAAE,GAAIuD,OAAO,CAACH,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAK8C,EAAE7B,IAAIlB,EAAEC,EAAC,GAAIwD,IAAI,CAACJ,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAKgD,EAAE/B,IAAIlB,EAAEC,EAAC,GAAIoD,QAAQ,CAACrD,EAAEC,EAAE,CAAC,KAAK8C,EAAE7B,IAAIlB,EAAEC,EAAC,EAAG,IAAAyD,CAAK1D,GAAGY,OAAOW,OAAOtB,EAAE2C,gBAAgBN,SAAQpC,IAAI,IAAIF,EAAE2D,SAASzD,GAAG,OAAOA,GAAG,KAAKD,EAAE2C,eAAeC,SAASvB,EAAEoB,OAAO,MAAM,KAAKzC,EAAE2C,eAAeE,KAAKrB,EAAEiB,OAAO,MAAM,KAAKzC,EAAE2C,eAAeI,OAAOD,EAAEL,OAAO,MAAM,KAAKzC,EAAE2C,eAAeM,IAAID,EAAEP,OAAM,GAAG,EAAEkB,UAAU,IAAI3D,EAAE6B,aAAa8B,aAAa5D,EAAE6D,iBAAiBV,CAAC,CAAj8E,CAAm8ErD,KAAKC,GAAG+D,GAAGhE,KAAKC,GAAG+D,IAAI,CAAC,EAAE/D,GAAG+D,GAAGC,WAAWhE","ignoreList":[]}
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
this.BX=this.BX||{},function(e,s,a){"use strict";var t=babelHelpers.classPrivateFieldLooseKey("priority"),i=babelHelpers.classPrivateFieldLooseKey("delay"),r=babelHelpers.classPrivateFieldLooseKey("itemList"),l=babelHelpers.classPrivateFieldLooseKey("enough"),o=babelHelpers.classPrivateFieldLooseKey("launchPerHit");class c{constructor(e,s,a=!1){Object.defineProperty(this,t,{writable:!0,value:void 0}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,r,{writable:!0,value:{}}),Object.defineProperty(this,l,{writable:!0,value:!1}),Object.defineProperty(this,o,{writable:!0,value:!1}),babelHelpers.classPrivateFieldLooseBase(this,i)[i]=1e3*parseInt(s,10),babelHelpers.classPrivateFieldLooseBase(this,t)[t]=e,babelHelpers.classPrivateFieldLooseBase(this,o)[o]=a}add(e,c={}){if(babelHelpers.classPrivateFieldLooseBase(this,l)[l])return;if(!a.Type.isFunction(e))throw new TypeError('Unexpected type "promise" argument, expected Promise or callback');const h=!(babelHelpers.classPrivateFieldLooseBase(this,o)[o]&&Object.values(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).length>0),n=a.Type.isStringFilled(c.id)?c.id:a.Text.getRandom();babelHelpers.classPrivateFieldLooseBase(this,r)[r][n]=e,s.AutoLauncher.register(e,{...c,delay:babelHelpers.classPrivateFieldLooseBase(this,i)[i],priority:babelHelpers.classPrivateFieldLooseBase(this,t)[t],allowLaunchAfterOthers:h,id:n})}getItems(){return babelHelpers.classPrivateFieldLooseBase(this,r)[r]}clean(){Object.keys(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).forEach((e=>{this.remove(e)}))}enough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!0}notEnough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!1}stop(){this.clean(),this.enough()}remove(e){s.AutoLauncher.unregister(e)}}const h=new c(s.LaunchPriority.CRITICAL,0),n=new c(s.LaunchPriority.HIGH,1),b=new c(s.LaunchPriority.NORMAL,1,!0),u=new c(s.LaunchPriority.LOW,5,!0),d={critical:{toQueue:(e,s={})=>{h.add(e,{allowLaunchAfterOthers:!0,forceShowOnTop:!0,...s})}},high:{toQueue:(e,s={})=>{n.add(e,{allowLaunchAfterOthers:!0,...s})}},normal:{toQueue:(e,s={})=>{b.add(e,s)}},low:{toQueue:(e,s={})=>{u.add(e,s)}},toQueue:(e,s={})=>{b.add(e,s)},only(e){Object.values(s.LaunchPriority).forEach((a=>{if(!e.includes(a))switch(a){case s.LaunchPriority.CRITICAL:h.stop();break;case s.LaunchPriority.HIGH:n.stop();break;case s.LaunchPriority.NORMAL:b.stop();break;case s.LaunchPriority.LOW:u.stop()}}))}};e.BannerDispatcher=d}(this.BX.UI=this.BX.UI||{},BX.UI.AutoLaunch,BX);
|
||||
this.BX=this.BX||{},function(e,s,a){"use strict";var i=babelHelpers.classPrivateFieldLooseKey("priority"),t=babelHelpers.classPrivateFieldLooseKey("delay"),r=babelHelpers.classPrivateFieldLooseKey("itemList"),l=babelHelpers.classPrivateFieldLooseKey("enough"),o=babelHelpers.classPrivateFieldLooseKey("launchPerHit");class c{constructor(e,s,a=!1){Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,t,{writable:!0,value:void 0}),Object.defineProperty(this,r,{writable:!0,value:{}}),Object.defineProperty(this,l,{writable:!0,value:!1}),Object.defineProperty(this,o,{writable:!0,value:!1}),babelHelpers.classPrivateFieldLooseBase(this,t)[t]=1e3*parseInt(s,10),babelHelpers.classPrivateFieldLooseBase(this,i)[i]=e,babelHelpers.classPrivateFieldLooseBase(this,o)[o]=a}add(e,c={}){if(babelHelpers.classPrivateFieldLooseBase(this,l)[l])return;if(!a.Type.isFunction(e))throw new TypeError('Unexpected type "promise" argument, expected Promise or callback');const h=!(babelHelpers.classPrivateFieldLooseBase(this,o)[o]&&Object.values(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).length>0),n=a.Type.isStringFilled(c.id)?c.id:a.Text.getRandom();babelHelpers.classPrivateFieldLooseBase(this,r)[r][n]=e,s.AutoLauncher.register(e,{...c,delay:babelHelpers.classPrivateFieldLooseBase(this,t)[t],priority:babelHelpers.classPrivateFieldLooseBase(this,i)[i],allowLaunchAfterOthers:h,id:n})}getItems(){return babelHelpers.classPrivateFieldLooseBase(this,r)[r]}clean(){Object.keys(babelHelpers.classPrivateFieldLooseBase(this,r)[r]).forEach((e=>{this.remove(e)}))}enough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!0}notEnough(){babelHelpers.classPrivateFieldLooseBase(this,l)[l]=!1}stop(){this.clean(),this.enough()}remove(e){s.AutoLauncher.unregister(e)}}const h=new c(s.LaunchPriority.CRITICAL,0),n=new c(s.LaunchPriority.HIGH,1),b=new c(s.LaunchPriority.NORMAL,1,!0),u=new c(s.LaunchPriority.LOW,5,!0),d={critical:{toQueue:(e,s={})=>{h.add(e,{allowLaunchAfterOthers:!0,forceShowOnTop:!0,...s})}},high:{toQueue:(e,s={})=>{n.add(e,{allowLaunchAfterOthers:!0,...s})}},normal:{toQueue:(e,s={})=>{b.add(e,s)}},low:{toQueue:(e,s={})=>{u.add(e,s)}},toQueue:(e,s={})=>{b.add(e,s)},only(e){Object.values(s.LaunchPriority).forEach((a=>{if(!e.includes(a))switch(a){case s.LaunchPriority.CRITICAL:h.stop();break;case s.LaunchPriority.HIGH:n.stop();break;case s.LaunchPriority.NORMAL:b.stop();break;case s.LaunchPriority.LOW:u.stop()}}))},isEnabled:()=>s.AutoLauncher.isEnabled()};e.BannerDispatcher=d}(this.BX.UI=this.BX.UI||{},BX.UI.AutoLaunch,BX);
|
||||
//# sourceMappingURL=banner-dispatcher.bundle.map.js
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LaunchPriority, type LaunchItemOptions, type LaunchItemCallback } from 'ui.auto-launch';
|
||||
import { LaunchPriority, type LaunchItemOptions, type LaunchItemCallback, AutoLauncher } from 'ui.auto-launch';
|
||||
import { Queue } from './queue';
|
||||
|
||||
const criticalQueue = new Queue(LaunchPriority.CRITICAL, 0);
|
||||
@@ -63,4 +63,9 @@ export const BannerDispatcher = {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
isEnabled(): boolean
|
||||
{
|
||||
return AutoLauncher.isEnabled();
|
||||
},
|
||||
};
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.map.js","names":["fs","require","path","module","exports","webToMobilePlugin","options","this","name","modulesDirectory","join","__dirname","split","extensionsDirectory","targetExtensionFilePath","targetExtension","generateBundle","bundle","existsSync","rmSync","writeFileSync","bundleContent","readFileSync","file","Array","isArray","replacements","length","forEach","entry","replace","banner"],"sources":["index.js"],"mappings":"AAAA,MAAMA,GAAKC,QAAQ,MACnB,MAAMC,KAAOD,QAAQ,QASrBE,OAAOC,QAAU,SAASC,EAAkBC,GAC3CC,KAAKC,KAAO,uBACZ,MAAMC,EAAmBP,KAAKQ,KAAKC,UAAUC,MAAM,WAAW,GAAI,WAClE,MAAMC,EAAsBX,KAAKQ,KAAKD,EAAkB,SAAU,UAAW,YAAa,SAAU,aAAc,UAClH,MAAMK,EAA0BZ,KAAKQ,KAAKG,KAAwBP,EAAQS,gBAAgBH,MAAM,KAAM,gBAEtG,MAAO,CACNJ,KAAM,uBAENQ,eAAeC,GACd,GAAIjB,GAAGkB,WAAWJ,GAClB,CACCd,GAAGmB,OAAOL,EACX,CAEAd,GAAGoB,cAAcN,EAAyB,IAE1C,IAAIO,EAAgBrB,GAAGsB,aAAaL,EAAOM,KAAM,SACjD,GAAIC,MAAMC,QAAQnB,EAAQoB,eAAiBpB,EAAQoB,aAAaC,OAAS,EACzE,CACCrB,EAAQoB,aAAaE,SAASC,IAC7B,GAAIL,MAAMC,QAAQI,IAAUA,EAAMF,OAAS,EAC3C,CACCN,EAAgBA,EAAcS,WAAWD,EAC1C,IAEF,CAEA,UAAWvB,EAAQyB,SAAW,UAAYzB,EAAQyB,OAAOJ,OAAS,EAClE,CACCN,EAAgB,GAAGf,EAAQyB,WAAWV,GACvC,CAEArB,GAAGoB,cAAcN,EAAyBO,EAE3C,EAEF"}
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
const fs=require("fs");const path=require("path");module.exports=function e(n){this.name="web-to-mobile-plugin";const i=path.join(__dirname.split("modules")[0],"modules");const t=path.join(i,"mobile","install","mobileapp","mobile","extensions","bitrix");const s=path.join(t,...n.targetExtension.split("/"),"extension.js");return{name:"web-to-mobile-plugin",generateBundle(e){if(fs.existsSync(s)){fs.rmSync(s)}fs.writeFileSync(s,"");let i=fs.readFileSync(e.file,"ascii");if(Array.isArray(n.replacements)&&n.replacements.length>0){n.replacements.forEach((e=>{if(Array.isArray(e)&&e.length>1){i=i.replace(...e)}}))}if(typeof n.banner==="string"&&n.banner.length>0){i=`${n.banner}\n${i}`}fs.writeFileSync(s,i)}}};
|
||||
//# sourceMappingURL=index.map.js
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
import { Dom } from 'main.core';
|
||||
import { NodeFormatter, type NodeFormatterOptions, type ConvertCallbackOptions } from 'ui.bbcode.formatter';
|
||||
|
||||
export class SpanNodeFormatter extends NodeFormatter
|
||||
{
|
||||
constructor(options: NodeFormatterOptions = {})
|
||||
{
|
||||
super({
|
||||
name: 'span',
|
||||
convert({ node }: ConvertCallbackOptions): HTMLElement {
|
||||
return Dom.create({
|
||||
tag: 'span',
|
||||
attrs: node.getAttributes(),
|
||||
});
|
||||
},
|
||||
...options,
|
||||
});
|
||||
}
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.map.js","names":["fs","require","path","module","exports","webToMobilePlugin","options","this","name","modulesDirectory","join","__dirname","split","extensionsDirectory","targetExtensionFilePath","targetExtension","generateBundle","bundle","existsSync","rmSync","writeFileSync","bundleContent","readFileSync","file","Array","isArray","replacements","length","forEach","entry","replace","banner"],"sources":["index.js"],"mappings":"AAAA,MAAMA,GAAKC,QAAQ,MACnB,MAAMC,KAAOD,QAAQ,QASrBE,OAAOC,QAAU,SAASC,EAAkBC,GAC3CC,KAAKC,KAAO,uBACZ,MAAMC,EAAmBP,KAAKQ,KAAKC,UAAUC,MAAM,WAAW,GAAI,WAClE,MAAMC,EAAsBX,KAAKQ,KAAKD,EAAkB,SAAU,UAAW,YAAa,SAAU,aAAc,UAClH,MAAMK,EAA0BZ,KAAKQ,KAAKG,KAAwBP,EAAQS,gBAAgBH,MAAM,KAAM,gBAEtG,MAAO,CACNJ,KAAM,uBAENQ,eAAeC,GACd,GAAIjB,GAAGkB,WAAWJ,GAClB,CACCd,GAAGmB,OAAOL,EACX,CAEAd,GAAGoB,cAAcN,EAAyB,IAE1C,IAAIO,EAAgBrB,GAAGsB,aAAaL,EAAOM,KAAM,SACjD,GAAIC,MAAMC,QAAQnB,EAAQoB,eAAiBpB,EAAQoB,aAAaC,OAAS,EACzE,CACCrB,EAAQoB,aAAaE,SAASC,IAC7B,GAAIL,MAAMC,QAAQI,IAAUA,EAAMF,OAAS,EAC3C,CACCN,EAAgBA,EAAcS,WAAWD,EAC1C,IAEF,CAEA,UAAWvB,EAAQyB,SAAW,UAAYzB,EAAQyB,OAAOJ,OAAS,EAClE,CACCN,EAAgB,GAAGf,EAAQyB,WAAWV,GACvC,CAEArB,GAAGoB,cAAcN,EAAyBO,EAE3C,EAEF"}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
const fs=require("fs");const path=require("path");module.exports=function e(n){this.name="web-to-mobile-plugin";const i=path.join(__dirname.split("modules")[0],"modules");const t=path.join(i,"mobile","install","mobileapp","mobile","extensions","bitrix");const s=path.join(t,...n.targetExtension.split("/"),"extension.js");return{name:"web-to-mobile-plugin",generateBundle(e){if(fs.existsSync(s)){fs.rmSync(s)}fs.writeFileSync(s,"");let i=fs.readFileSync(e.file,"ascii");if(Array.isArray(n.replacements)&&n.replacements.length>0){n.replacements.forEach((e=>{if(Array.isArray(e)&&e.length>1){i=i.replace(...e)}}))}if(typeof n.banner==="string"&&n.banner.length>0){i=`${n.banner}\n${i}`}fs.writeFileSync(s,i)}}};
|
||||
//# sourceMappingURL=index.map.js
|
||||
@@ -1,224 +0,0 @@
|
||||
declare module 'ui.buttons'
|
||||
{
|
||||
namespace UI
|
||||
{
|
||||
class BaseButton
|
||||
{
|
||||
constructor(options: { [key: string]: any })
|
||||
render(): HTMLElement
|
||||
renderTo(node: HTMLElement): HTMLElement | null
|
||||
getContainer(): HTMLElement
|
||||
setText(text: string): BaseButton
|
||||
getText(): string
|
||||
getTag(): any
|
||||
setProps(props: { [key: string]: string }): BaseButton
|
||||
getProps(): { [key: string]: string }
|
||||
setDataSet(dataset: { [key: string]: string }): { [key: string]: string }
|
||||
getDataSet(): DOMStringMap
|
||||
addClass(className: string): BaseButton
|
||||
removeClass(className: string): BaseButton
|
||||
setDisabled(state: boolean): BaseButton
|
||||
isDisabled(): boolean
|
||||
isInputType(): boolean
|
||||
bindEvents(events: { [key: string]: () => void }): BaseButton
|
||||
unbindEvents(events: { [key: string]: () => void }): BaseButton
|
||||
bindEvent(event: string, handler: (event: Event) => void): BaseButton
|
||||
unbindEvent(event: string, handler: (event: Event) => void): BaseButton
|
||||
}
|
||||
|
||||
class Button extends BaseButton
|
||||
{
|
||||
static Size: {
|
||||
LARGE: string,
|
||||
MEDIUM: string,
|
||||
SMALL: string,
|
||||
EXTRA_SMALL: string,
|
||||
};
|
||||
|
||||
static Color: {
|
||||
DANGER: string,
|
||||
DANGER_DARK: string,
|
||||
DANGER_LIGHT: string,
|
||||
SUCCESS: string,
|
||||
SUCCESS_LIGHT: string,
|
||||
PRIMARY_DARK: string,
|
||||
PRIMARY: string,
|
||||
SECONDARY: string,
|
||||
LINK: string,
|
||||
LIGHT: string,
|
||||
LIGHT_BORDER: string,
|
||||
};
|
||||
|
||||
static State: {
|
||||
HOVER: string,
|
||||
ACTIVE: string,
|
||||
DISABLED: string,
|
||||
CLOCKING: string,
|
||||
WAITING: string,
|
||||
};
|
||||
|
||||
static Icon: {
|
||||
UNFOLLOW: string,
|
||||
FOLLOW: string,
|
||||
ADD: string,
|
||||
STOP: string,
|
||||
START: string,
|
||||
ADD_FOLDER: string,
|
||||
PAUSE: string,
|
||||
SETTING: string,
|
||||
TASK: string,
|
||||
INFO: string,
|
||||
SEARCH: string,
|
||||
PRINT: string,
|
||||
LIST: string,
|
||||
BUSINESS: string,
|
||||
BUSINESS_CONFIRM: string,
|
||||
BUSINESS_WARNING: string,
|
||||
CAMERA: string,
|
||||
PHONE_UP: string,
|
||||
PHONE_DOWN: string,
|
||||
BACK: string,
|
||||
REMOVE: string,
|
||||
DONE: string,
|
||||
DISK: string,
|
||||
};
|
||||
|
||||
static Tag: {
|
||||
BUTTON: number,
|
||||
LINK: number,
|
||||
SUBMIT: number,
|
||||
INPUT: number,
|
||||
};
|
||||
|
||||
static Style: {
|
||||
NO_CAPS: string,
|
||||
ROUND: string,
|
||||
DROPDOWN: string,
|
||||
};
|
||||
|
||||
setSize(size: string): Button
|
||||
getSize(): string
|
||||
setColor(color: string): Button
|
||||
getColor(): string
|
||||
setIcon(icon: string): Button
|
||||
getIcon(): string
|
||||
setState(state: string): Button
|
||||
getState(): string
|
||||
setNoCaps(value: boolean): Button
|
||||
setRound(value: boolean): Button
|
||||
setDropdown(value: boolean): Button
|
||||
setMenu(options: { [key: string]: any }): Button
|
||||
getMenuBindElement(): HTMLElement
|
||||
getMenuClickElement(): HTMLElement
|
||||
getMenuWindow(): any
|
||||
setId(id: string): Button
|
||||
getId(): string | null
|
||||
setActive(value: boolean): Button
|
||||
isActive(): boolean
|
||||
setHovered(value: boolean): Button
|
||||
isHover(): boolean
|
||||
setDisabled(value: boolean): Button
|
||||
isDisabled(): boolean
|
||||
setWaiting(value: boolean): Button
|
||||
isWaiting(): boolean
|
||||
setClocking(value: boolean): Button
|
||||
isClocking(): boolean
|
||||
setContext(context: any): void
|
||||
getContext(): any
|
||||
}
|
||||
|
||||
class SaveButton extends Button
|
||||
{
|
||||
}
|
||||
|
||||
class CreateButton extends Button
|
||||
{
|
||||
}
|
||||
|
||||
class AddButton extends Button
|
||||
{
|
||||
}
|
||||
|
||||
class SendButton extends Button
|
||||
{
|
||||
}
|
||||
|
||||
class ApplyButton extends Button
|
||||
{
|
||||
}
|
||||
|
||||
class CancelButton extends Button
|
||||
{
|
||||
}
|
||||
|
||||
class CloseButton extends Button
|
||||
{
|
||||
}
|
||||
|
||||
class SplitButton extends Button
|
||||
{
|
||||
static State: {
|
||||
HOVER: string,
|
||||
MAIN_HOVER: string,
|
||||
MENU_HOVER: string,
|
||||
ACTIVE: string,
|
||||
MAIN_ACTIVE: string,
|
||||
MENU_ACTIVE: string,
|
||||
DISABLED: string,
|
||||
MAIN_DISABLED: string,
|
||||
MENU_DISABLED: string,
|
||||
CLOCKING: string,
|
||||
WAITING: string,
|
||||
};
|
||||
|
||||
getMainButton(): SplitSubButton
|
||||
getMenuButton(): SplitSubButton
|
||||
getMenuTarget(): any
|
||||
}
|
||||
|
||||
class SplitSubButton extends BaseButton
|
||||
{
|
||||
static Type: {
|
||||
MAIN: string,
|
||||
MENU: string,
|
||||
};
|
||||
|
||||
setSplitButton(button: SplitButton): SplitSubButton
|
||||
getSplitButton(): SplitButton
|
||||
isMainButton(): boolean
|
||||
isMenuButton(): boolean
|
||||
setActive(value: boolean): SplitSubButton
|
||||
isActive(): boolean
|
||||
setHovered(value: boolean): SplitSubButton
|
||||
isHovered(): boolean
|
||||
}
|
||||
|
||||
class SaveSplitButton extends SplitButton
|
||||
{
|
||||
}
|
||||
|
||||
class CreateSplitButton extends SplitButton
|
||||
{
|
||||
}
|
||||
|
||||
class AddSplitButton extends SplitButton
|
||||
{
|
||||
}
|
||||
|
||||
class SendSplitButton extends SplitButton
|
||||
{
|
||||
}
|
||||
|
||||
class ApplySplitButton extends SplitButton
|
||||
{
|
||||
}
|
||||
|
||||
class CancelSplitButton extends SplitButton
|
||||
{
|
||||
}
|
||||
|
||||
class CloseSplitButton extends SplitButton
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1754,7 +1754,8 @@ this.BX = this.BX || {};
|
||||
if (_classStaticPrivateMethodGet(this, ButtonManager$$1, _getCounter).call(this, counterNode)) {
|
||||
var _counterNode;
|
||||
options.rightCounter = {
|
||||
value: _classStaticPrivateMethodGet(this, ButtonManager$$1, _getCounter).call(this, counterNode)
|
||||
value: _classStaticPrivateMethodGet(this, ButtonManager$$1, _getCounter).call(this, counterNode),
|
||||
style: _classStaticPrivateMethodGet(this, ButtonManager$$1, _getCounterStyle).call(this, counterNode)
|
||||
};
|
||||
options.counterNode = undefined;
|
||||
options.counter = undefined;
|
||||
@@ -1874,6 +1875,12 @@ this.BX = this.BX || {};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function _getCounterStyle(counterNode) {
|
||||
if (!main_core.Type.isDomNode(counterNode)) {
|
||||
return null;
|
||||
}
|
||||
return _classStaticPrivateMethodGet(this, ButtonManager$$1, _getEnumProp).call(this, counterNode, ui_cnt.CounterStyle);
|
||||
}
|
||||
function _getEnumProp(node, enumeration) {
|
||||
for (let key in enumeration) {
|
||||
if (!enumeration.hasOwnProperty(key)) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@ import { Type, Reflection, Dom, Runtime, Tag } from 'main.core';
|
||||
import { EventEmitter, BaseEvent } from 'main.core.events';
|
||||
import { MenuItem } from 'main.popup';
|
||||
import { Switcher } from 'ui.switcher';
|
||||
import { Counter } from 'ui.cnt';
|
||||
import { Counter, CounterStyle } from 'ui.cnt';
|
||||
|
||||
import BaseButton from './base-button';
|
||||
import Button from './button/button';
|
||||
@@ -159,6 +159,7 @@ export default class ButtonManager
|
||||
{
|
||||
options.rightCounter = {
|
||||
value: this.#getCounter(counterNode),
|
||||
style: this.#getCounterStyle(counterNode),
|
||||
};
|
||||
|
||||
options.counterNode = undefined;
|
||||
@@ -331,6 +332,21 @@ export default class ButtonManager
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {HTMLElement} counterNode
|
||||
* @return {string | null}
|
||||
*/
|
||||
static #getCounterStyle(counterNode: HTMLElement): string | null
|
||||
{
|
||||
if (!Type.isDomNode(counterNode))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.#getEnumProp(counterNode, CounterStyle);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {HTMLElement} node
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import type { BaseButtonOptions } from '../base-button-options';
|
||||
import ButtonSize from './button-size';
|
||||
import ButtonStyle from './button-style';
|
||||
import AirButtonStyle from './air-button-style';
|
||||
import ButtonColor from './button-color';
|
||||
import ButtonIcon from './button-icon';
|
||||
import ButtonState from './button-state';
|
||||
@@ -19,8 +21,8 @@ export type ButtonOptions = BaseButtonOptions & {
|
||||
round?: boolean,
|
||||
dropdown?: boolean,
|
||||
dependOnTheme?: boolean,
|
||||
// Use only with useAirTheme: true option
|
||||
style?: boolean;
|
||||
// Use only with useAirDesign: true option
|
||||
style?: ButtonStyle & AirButtonStyle;
|
||||
wide?: boolean;
|
||||
iconPosition?: 'left' | 'right';
|
||||
rightCounter?: CounterOptions;
|
||||
|
||||
@@ -1,711 +0,0 @@
|
||||
/*region Variables*/
|
||||
:root {
|
||||
/*size*/
|
||||
--ui-btn-size-xs: 26px;
|
||||
--ui-btn-size-sm: 31px;
|
||||
--ui-btn-size-md: 39px;
|
||||
--ui-btn-size-lg: 47px;
|
||||
/*default param*/
|
||||
--ui-btn-padding: 0 20px;
|
||||
--ui-btn-padding-right: 20px;
|
||||
--ui-btn-min-width: 80px;
|
||||
--ui-btn-height: var(--ui-btn-size-md);
|
||||
--ui-btn-font-size: 12px;
|
||||
--ui-btn-background: #868d95;
|
||||
--ui-btn-background-hover: #5b6573;
|
||||
--ui-btn-background-active: #3b506e;
|
||||
--ui-btn-border-color: #868d95;
|
||||
--ui-btn-border-color-hover: #5b6573;
|
||||
--ui-btn-border-color-active: #3b506e;
|
||||
--ui-btn-border: 1px solid var(--ui-btn-border-color);
|
||||
--ui-btn-opacity-after: .3;
|
||||
--ui-btn-colors-after-bg: #fff;
|
||||
--ui-btn-colors-before-bg: #fff;
|
||||
--ui-btn-color: #fff;
|
||||
--ui-btn-color-hover: #fff;
|
||||
--ui-btn-color-active: #fff;
|
||||
--ui-btn-box-shadow: none;
|
||||
--ui-btn-box-shadow-hover: none;
|
||||
--ui-btn-box-shadow-active: none;
|
||||
--ui-btn-text-shadow: none;
|
||||
--ui-btn-text-shadow-hover: none;
|
||||
--ui-btn-text-shadow-active: none;
|
||||
/**/
|
||||
--ui-btn-clock-white: url(/bitrix/js/ui/buttons/images/ui-loader-clock-white.min.svg?v=1.1);
|
||||
--ui-btn-clock-black: url(/bitrix/js/ui/buttons/images/ui-loader-clock-black.min.svg?v=1.1);
|
||||
--ui-btn-wait-white: url(/bitrix/js/ui/buttons/images/ui-loader-wait-white.min.svg?v=1.1);
|
||||
--ui-btn-wait-black: url(/bitrix/js/ui/buttons/images/ui-loader-wait-black.min.svg?v=1.1);
|
||||
|
||||
}
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Base style*/
|
||||
.ui-btn-container { margin: 15px 0; }
|
||||
|
||||
.ui-btn-container-center { text-align: center; }
|
||||
|
||||
.ui-btn,
|
||||
.ui-btn-main,
|
||||
.ui-btn-extra,
|
||||
.ui-btn-menu {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
height: var(--ui-btn-height);
|
||||
outline: none;
|
||||
border: var(--ui-btn-border);
|
||||
border-color: var(--ui-btn-border-color);
|
||||
background-color: var(--ui-btn-background);
|
||||
box-shadow: var(--ui-btn-box-shadow);
|
||||
text-shadow: var(--ui-btn-text-shadow);
|
||||
cursor: pointer;
|
||||
transition: 160ms background-color linear, 160ms color linear, 160ms opacity linear, 160ms border-color linear;
|
||||
}
|
||||
|
||||
.ui-btn,
|
||||
.ui-btn-main {
|
||||
position: relative;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: var(--ui-btn-padding);
|
||||
color: var(--ui-btn-color);
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
font: var(--ui-btn-font-size)/calc(var(--ui-btn-height) - 2px) "OpenSans-Bold", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.ui-btn,
|
||||
.ui-btn-double,
|
||||
.ui-btn-split {
|
||||
line-height: calc(var(--ui-btn-height) - 2px);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.ui-btn {
|
||||
min-width: var(--ui-btn-min-width);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.ui-btn-double,
|
||||
.ui-btn-split {
|
||||
position: relative;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-align: stretch;
|
||||
-ms-flex-align: stretch;
|
||||
align-items: stretch;
|
||||
padding-right: 30px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.ui-btn-main {
|
||||
padding-right: var(--ui-btn-padding-right);
|
||||
border-right: none !important;
|
||||
border-radius: 2px 0 0 2px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.ui-btn-extra,
|
||||
.ui-btn-menu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 30px;
|
||||
border-left: none !important;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
.ui-btn:hover,
|
||||
a.ui-btn:focus,
|
||||
.ui-btn-main:hover,
|
||||
.ui-btn-main:focus,
|
||||
.ui-btn-extra:hover,
|
||||
.ui-btn-menu:hover,
|
||||
.ui-btn.ui-btn-hover,
|
||||
.ui-btn-hover .ui-btn-main,
|
||||
.ui-btn-hover .ui-btn-extra,
|
||||
.ui-btn-hover .ui-btn-menu,
|
||||
.ui-btn-main-hover .ui-btn-main,
|
||||
.ui-btn-extra-hover .ui-btn-extra,
|
||||
.ui-btn-menu-hover .ui-btn-menu {
|
||||
border-color: var(--ui-btn-border-color-hover);
|
||||
background-color: var(--ui-btn-background-hover);
|
||||
box-shadow: var(--ui-btn-box-shadow-hover);
|
||||
color: var(--ui-btn-color-hover);
|
||||
text-decoration: none;
|
||||
text-shadow: var(--ui-btn-text-shadow-hover);
|
||||
}
|
||||
|
||||
.ui-btn:active,
|
||||
a.ui-btn:focus,
|
||||
a.ui-btn-split:focus,
|
||||
a.ui-btn-double:focus,
|
||||
.ui-btn-main:active,
|
||||
.ui-btn-menu:active,
|
||||
.ui-btn-extra:active,
|
||||
.ui-btn-wait.ui-btn,
|
||||
.ui-btn-wait .ui-btn-main,
|
||||
.ui-btn-clock.ui-btn,
|
||||
.ui-btn-clock .ui-btn-main,
|
||||
.ui-btn-active.ui-btn,
|
||||
.ui-btn-active .ui-btn-main,
|
||||
.ui-btn-active .ui-btn-menu,
|
||||
.ui-btn-active .ui-btn-extra,
|
||||
.ui-btn-main-active .ui-btn-main,
|
||||
.ui-btn-menu-active .ui-btn-menu,
|
||||
.ui-btn-extra-active .ui-btn-extra,
|
||||
.ui-btn-wait.ui-btn:hover,
|
||||
.ui-btn-wait .ui-btn-main:hover,
|
||||
.ui-btn-clock.ui-btn:hover,
|
||||
.ui-btn-clock .ui-btn-main:hover,
|
||||
.ui-btn-active.ui-btn:hover,
|
||||
.ui-btn-active .ui-btn-main:hover,
|
||||
.ui-btn-active .ui-btn-menu:hover,
|
||||
.ui-btn-active .ui-btn-extra:hover,
|
||||
.ui-btn-main-active .ui-btn-main:hover,
|
||||
.ui-btn-menu-active .ui-btn-menu:hover,
|
||||
.ui-btn-extra-active .ui-btn-extra:hover {
|
||||
outline: none;
|
||||
border-color: var(--ui-btn-border-color-active);
|
||||
background-color: var(--ui-btn-background-active);
|
||||
box-shadow: var(--ui-btn-box-shadow-active);
|
||||
color: var(--ui-btn-color-active);
|
||||
text-shadow: var(--ui-btn-text-shadow-active);
|
||||
}
|
||||
|
||||
.ui-btn-extra:after,
|
||||
.ui-btn-menu:after {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
bottom: 6px;
|
||||
left: 0;
|
||||
width: 1px;
|
||||
background-color: var(--ui-btn-colors-after-bg);
|
||||
content: '';
|
||||
opacity: var(--ui-btn-opacity-after);
|
||||
}
|
||||
|
||||
.ui-btn-extra:before,
|
||||
.ui-btn-menu:before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
box-sizing: border-box;
|
||||
margin-top: -2px;
|
||||
margin-left: -4px;
|
||||
width: 8px;
|
||||
border: 4px solid transparent;
|
||||
border-top-color: var(--ui-btn-colors-before-bg);
|
||||
background: none;
|
||||
content: '';
|
||||
transition: 160ms background-color linear, 160ms color linear, 160ms opacity linear, 160ms border-color linear;
|
||||
}
|
||||
|
||||
.ui-btn + .ui-btn,
|
||||
.ui-btn + .ui-btn-double,
|
||||
.ui-btn-double + .ui-btn,
|
||||
.ui-btn-double + .ui-btn-double,
|
||||
.ui-btn + .ui-btn-split,
|
||||
.ui-btn-split + .ui-btn,
|
||||
.ui-btn-split + .ui-btn-split,
|
||||
.ui-btn + script + .ui-btn,
|
||||
.ui-btn + script + .ui-btn-split,
|
||||
.ui-btn-split + script + .ui-btn,
|
||||
.ui-btn-split + script + .ui-btn-split,
|
||||
.ui-ctl + .ui-btn,
|
||||
.ui-ctl + .ui-btn-double,
|
||||
.ui-ctl + .ui-btn-split { margin-left: 12px; }
|
||||
|
||||
.ui-btn-text {
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Size*/
|
||||
.ui-btn-md {
|
||||
--ui-btn-padding: 0 19px;
|
||||
--ui-btn-padding-right: 12px;
|
||||
--ui-btn-min-width: 80px;
|
||||
--ui-btn-height: var(--ui-btn-size-md);
|
||||
--ui-btn-font-size: 12px;
|
||||
}
|
||||
|
||||
.ui-btn-lg {
|
||||
--ui-btn-padding: 0 26px;
|
||||
--ui-btn-padding-right: 12px;
|
||||
--ui-btn-min-width: 90px;
|
||||
--ui-btn-height: var(--ui-btn-size-lg);
|
||||
--ui-btn-font-size: 12px;
|
||||
}
|
||||
|
||||
.ui-btn-sm {
|
||||
--ui-btn-padding: 0 17px;
|
||||
--ui-btn-padding-right: 10px;
|
||||
--ui-btn-min-width: 70px;
|
||||
--ui-btn-height: var(--ui-btn-size-sm);
|
||||
--ui-btn-font-size: 12px;
|
||||
}
|
||||
|
||||
.ui-btn-xs {
|
||||
--ui-btn-padding: 0 15px;
|
||||
--ui-btn-padding-right: 9px;
|
||||
--ui-btn-min-width: 66px;
|
||||
--ui-btn-height: var(--ui-btn-size-xs);
|
||||
--ui-btn-font-size: 11px;
|
||||
}
|
||||
|
||||
.ui-btn-double.ui-btn-lg,
|
||||
.ui-btn-split.ui-btn-lg { padding-right: 33px; }
|
||||
|
||||
.ui-btn-lg.ui-btn { border-radius: 3px; }
|
||||
|
||||
.ui-btn-lg .ui-btn-main { border-radius: 3px 0 0 3px; }
|
||||
|
||||
.ui-btn-lg.ui-btn-double,
|
||||
.ui-btn-lg.ui-btn-split { padding-right: 34px; }
|
||||
|
||||
.ui-btn-lg .ui-btn-extra,
|
||||
.ui-btn-lg .ui-btn-menu {
|
||||
width: 34px;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
.ui-btn-sm.ui-btn-double,
|
||||
.ui-btn-sm.ui-btn-split { padding-right: 28px; }
|
||||
|
||||
.ui-btn-sm .ui-btn-extra,
|
||||
.ui-btn-sm .ui-btn-menu {
|
||||
width: 28px;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
.ui-btn-lg .ui-btn-extra:before,
|
||||
.ui-btn-lg .ui-btn-menu:before { margin-top: -3px; }
|
||||
|
||||
.ui-btn-lg .ui-btn-extra:after,
|
||||
.ui-btn-lg .ui-btn-menu:after {
|
||||
top: 11px;
|
||||
bottom: 10px;
|
||||
opacity: .25;
|
||||
}
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Colors*/
|
||||
/*region Color Variables*/
|
||||
.ui-btn-default { /* default variables */ }
|
||||
|
||||
.ui-btn-success {
|
||||
--ui-btn-background: #bbed21;
|
||||
--ui-btn-background-hover: #d2f95f;
|
||||
--ui-btn-background-active: #b2e232;
|
||||
--ui-btn-border-color: #bbed21;
|
||||
--ui-btn-border-color-hover: #d2f95f;
|
||||
--ui-btn-border-color-active: #b2e232;
|
||||
--ui-btn-opacity-after: .2;
|
||||
--ui-btn-colors-after-bg: #535c69;
|
||||
--ui-btn-colors-before-bg: #535c69;
|
||||
--ui-btn-color: #535c69;
|
||||
--ui-btn-color-hover: #535c69;
|
||||
--ui-btn-color-active: #535c69;
|
||||
}
|
||||
|
||||
.ui-btn-success-light {
|
||||
--ui-btn-background: #e1f0b1;
|
||||
--ui-btn-background-hover: #eaf5c5;
|
||||
--ui-btn-background-active: #d3e59a;
|
||||
--ui-btn-border-color: #e1f0b1;
|
||||
--ui-btn-border-color-hover: #eaf5c5;
|
||||
--ui-btn-border-color-active: #d3e59a;
|
||||
--ui-btn-opacity-after: .2;
|
||||
--ui-btn-colors-after-bg: #333;
|
||||
--ui-btn-colors-before-bg: #a3bf63;
|
||||
--ui-btn-color: #668d13;
|
||||
--ui-btn-color-hover: #668d13;
|
||||
--ui-btn-color-active: #668d13;
|
||||
}
|
||||
|
||||
.ui-btn-success-dark {
|
||||
--ui-btn-background: #86a732;
|
||||
--ui-btn-background-hover: #a2bf54;
|
||||
--ui-btn-background-active: #a2bf54;
|
||||
--ui-btn-border-color: #86a732;
|
||||
--ui-btn-border-color-hover: #a2bf54;
|
||||
--ui-btn-border-color-active: #a2bf54;
|
||||
--ui-btn-opacity-after: .2;
|
||||
--ui-btn-colors-after-bg: #fff;
|
||||
--ui-btn-colors-before-bg: #a3bf63;
|
||||
--ui-btn-color: #fff;
|
||||
--ui-btn-color-hover: #fff;
|
||||
--ui-btn-color-active: #fff;
|
||||
}
|
||||
|
||||
.ui-btn-danger {
|
||||
--ui-btn-background: #f1361a;
|
||||
--ui-btn-background-hover: #cc1c00;
|
||||
--ui-btn-background-active: #d24430;
|
||||
--ui-btn-border-color: #f1361a;
|
||||
--ui-btn-border-color-hover: #cc1c00;
|
||||
--ui-btn-border-color-active: #d24430;
|
||||
--ui-btn-opacity-after: .3;
|
||||
--ui-btn-color: #fff;
|
||||
--ui-btn-color-hover: #fff;
|
||||
--ui-btn-color-active: #fff;
|
||||
}
|
||||
|
||||
.ui-btn-danger-dark {
|
||||
--ui-btn-background: #a21429;
|
||||
--ui-btn-background-hover: #c43d51;
|
||||
--ui-btn-background-active: #c43d51;
|
||||
--ui-btn-border-color: #a21429;
|
||||
--ui-btn-border-color-hover: #c43d51;
|
||||
--ui-btn-border-color-active: #c43d51;
|
||||
--ui-btn-opacity-after: .3;
|
||||
--ui-btn-color: #fff;
|
||||
--ui-btn-color-hover: #fff;
|
||||
--ui-btn-color-active: #fff;
|
||||
}
|
||||
|
||||
.ui-btn-danger-light {
|
||||
--ui-btn-background: #ffccca;
|
||||
--ui-btn-background-hover: #ffdcdb;
|
||||
--ui-btn-background-active: #f2b6b3;
|
||||
--ui-btn-border-color: #ffccca;
|
||||
--ui-btn-border-color-hover: #ffdcdb;
|
||||
--ui-btn-border-color-active: #f2b6b3;
|
||||
--ui-btn-opacity-after: .2;
|
||||
--ui-btn-colors-after-bg: #333;
|
||||
--ui-btn-colors-before-bg: #eb8783;
|
||||
--ui-btn-color: #d7413c;
|
||||
--ui-btn-color-hover: #d7413c;
|
||||
--ui-btn-color-active: #d7413c;
|
||||
}
|
||||
|
||||
.ui-btn-primary {
|
||||
--ui-btn-background: #3bc8f5;
|
||||
--ui-btn-background-hover: #3eddff;
|
||||
--ui-btn-background-active: #12b1e3;
|
||||
--ui-btn-border-color: #3bc8f5;
|
||||
--ui-btn-border-color-hover: #3eddff;
|
||||
--ui-btn-border-color-active: #12b1e3;
|
||||
--ui-btn-color: #fff;
|
||||
--ui-btn-color-hover: #fff;
|
||||
--ui-btn-color-active: #fff;
|
||||
}
|
||||
|
||||
.ui-btn-primary-dark {
|
||||
--ui-btn-background: #399fc2;
|
||||
--ui-btn-background-hover: #37aed4;
|
||||
--ui-btn-background-active: #37aed4;
|
||||
--ui-btn-border-color: #399fc2;
|
||||
--ui-btn-border-color-hover: #37aed4;
|
||||
--ui-btn-border-color-active: #37aed4;
|
||||
--ui-btn-color: #fff;
|
||||
--ui-btn-color-hover: #fff;
|
||||
--ui-btn-color-active: #fff;
|
||||
}
|
||||
|
||||
.ui-btn-secondary {
|
||||
--ui-btn-background: #c5e7f4;
|
||||
--ui-btn-background-hover: #d1eef9;
|
||||
--ui-btn-background-active: #aee0f2;
|
||||
--ui-btn-border-color: #aee0f2;
|
||||
--ui-btn-border-color-hover: #aee0f2;
|
||||
--ui-btn-border-color-active: #aee0f2;
|
||||
--ui-btn-opacity-after: .3;
|
||||
--ui-btn-colors-after-bg: #535c69;
|
||||
--ui-btn-colors-before-bg: #535c69;
|
||||
--ui-btn-color: #535c69;
|
||||
--ui-btn-color-hover: #535c69;
|
||||
--ui-btn-color-active: #535c69;
|
||||
}
|
||||
|
||||
.ui-btn-link {
|
||||
--ui-btn-background: transparent;
|
||||
--ui-btn-background-hover: transparent;
|
||||
--ui-btn-background-active: transparent;
|
||||
--ui-btn-border-color: transparent;
|
||||
--ui-btn-border-color-hover: transparent;
|
||||
--ui-btn-border-color-active: transparent;
|
||||
--ui-btn-opacity-after: .3;
|
||||
--ui-btn-colors-after-bg: #535c69;
|
||||
--ui-btn-colors-before-bg: #535c69;
|
||||
--ui-btn-color: #535c69;
|
||||
--ui-btn-color-hover: #80868e;
|
||||
--ui-btn-color-active: #535c69;
|
||||
}
|
||||
|
||||
.ui-btn-light {
|
||||
--ui-btn-background: transparent;
|
||||
--ui-btn-background-hover: #f6f8f9;
|
||||
--ui-btn-background-active: #d6f1fb;
|
||||
--ui-btn-border-color: transparent;
|
||||
--ui-btn-border-color-hover: #f6f8f9;
|
||||
--ui-btn-border-color-active: #d6f1fb;
|
||||
--ui-btn-opacity-after: .3;
|
||||
--ui-btn-colors-after-bg: #535c69;
|
||||
--ui-btn-colors-before-bg: #535c69;
|
||||
--ui-btn-color: #535c69;
|
||||
--ui-btn-color-hover: #333;
|
||||
--ui-btn-color-active: #000;
|
||||
}
|
||||
|
||||
.ui-btn-light-border {
|
||||
--ui-btn-background: transparent;
|
||||
--ui-btn-background-hover: #cfd4d8;
|
||||
--ui-btn-background-active: #dde2e5;
|
||||
--ui-btn-border-color: #c6cdd3;
|
||||
--ui-btn-border-color-hover: #c6cdd3;
|
||||
--ui-btn-border-color-active: #9fa4ab;
|
||||
--ui-btn-opacity-after: .3;
|
||||
--ui-btn-colors-after-bg: #535c69;
|
||||
--ui-btn-colors-before-bg: #535c69;
|
||||
--ui-btn-color: #535b69;
|
||||
--ui-btn-color-hover: #535b69;
|
||||
--ui-btn-color-active: #535b69;
|
||||
}
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Button Color*/
|
||||
|
||||
/*region Link button*/
|
||||
.ui-btn-link.ui-btn {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.ui-btn-link .ui-btn-main { padding-left: 0; }
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Light-border button*/
|
||||
|
||||
/*region Fix for Themes*/
|
||||
.bitrix24-light-theme .ui-btn-themes.ui-btn-link,
|
||||
.bitrix24-light-theme .ui-btn-themes.ui-btn-light,
|
||||
.bitrix24-light-theme .ui-btn-themes.ui-btn-light-border {
|
||||
--ui-btn-background: rgba(255, 255, 255, .15);
|
||||
--ui-btn-background-hover: rgba(255, 255, 255, .3);
|
||||
--ui-btn-background-active: rgba(255, 255, 255, .4);
|
||||
--ui-btn-colors-after-bg: #fff;
|
||||
--ui-btn-colors-before-bg: #fff;
|
||||
--ui-btn-color: #fff;
|
||||
--ui-btn-color-hover: #fff;
|
||||
--ui-btn-color-active: #fff;
|
||||
}
|
||||
|
||||
.bitrix24-light-theme .ui-btn-themes.ui-btn-light-border { --ui-btn-border-color: rgba(255, 255, 255, .4); }
|
||||
|
||||
|
||||
.bitrix24-dark-theme .ui-btn-themes.ui-btn-link,
|
||||
.bitrix24-dark-theme .ui-btn-themes.ui-btn-light,
|
||||
.bitrix24-dark-theme .ui-btn-themes.ui-btn-light-border {
|
||||
--ui-btn-background: rgba(0, 0, 0, .07);
|
||||
--ui-btn-background-hover: rgba(0, 0, 0, .1);
|
||||
--ui-btn-background-active: rgba(0, 0, 0, .15);
|
||||
--ui-btn-colors-after-bg: rgba(51, 51, 51, .8);
|
||||
--ui-btn-colors-before-bg: rgba(51, 51, 51, .8);
|
||||
--ui-btn-color: rgba(51, 51, 51, .8);
|
||||
--ui-btn-color-hover: rgba(51, 51, 51, .8);;
|
||||
--ui-btn-color-active: rgba(51, 51, 51, .8);;
|
||||
}
|
||||
|
||||
.bitrix24-dark-theme .ui-btn-themes.ui-btn-light-border { --ui-btn-border-color: rgba(0, 0, 0, .06); }
|
||||
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Others*/
|
||||
|
||||
.ui-btn-round { border-radius: calc(var(--ui-btn-height) / 2) !important; }
|
||||
|
||||
.ui-btn-no-caps,
|
||||
.ui-btn-no-caps .ui-btn-main {
|
||||
text-transform: none;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/*region Counter*/
|
||||
.ui-btn-counter {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
border-radius: 10px;
|
||||
background-color: #f34829;
|
||||
color: #fff;
|
||||
vertical-align: middle;
|
||||
font: 11px/19px "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.ui-btn-text + .ui-btn-counter { margin-left: 12px; }
|
||||
|
||||
.ui-btn-lg .ui-btn-counter { margin-left: 15px; }
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Dropdown*/
|
||||
.ui-btn.ui-btn-dropdown,
|
||||
.ui-btn-dropdown .ui-btn-main { padding-right: 29px; }
|
||||
|
||||
.ui-btn.ui-btn-dropdown:before,
|
||||
.ui-btn-dropdown .ui-btn-main:before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 13px;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
margin-top: -1.5px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-bottom: 2px solid;
|
||||
border-left: 2px solid;
|
||||
content: '';
|
||||
transform: translateY(-50%) rotate(-45deg);
|
||||
}
|
||||
|
||||
.ui-btn.ui-btn-dropdown:before,
|
||||
.ui-btn-dropdown .ui-btn-main:before { border-color: var(--ui-btn-color); }
|
||||
|
||||
.ui-btn.ui-btn-empty.ui-btn-dropdown:before,
|
||||
.ui-btn.ui-btn-collapsed.ui-btn-dropdown:before,
|
||||
.ui-btn-empty.ui-btn-dropdown .ui-btn-main:before,
|
||||
.ui-btn-collapsed.ui-btn-dropdown .ui-btn-main:before {
|
||||
right: auto;
|
||||
transform: translate(-50%, -50%) rotate(-45deg);
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.ui-btn.ui-btn-empty.ui-btn-dropdown[class*="ui-btn-icon-"]:before,
|
||||
.ui-btn.ui-btn-collapsed.ui-btn-dropdown[class*="ui-btn-icon-"]:before,
|
||||
.ui-btn-empty.ui-btn-dropdown[class*="ui-btn-icon-"] .ui-btn-main:before,
|
||||
.ui-btn-collapsed.ui-btn-dropdown[class*="ui-btn-icon-"] .ui-btn-main:before {
|
||||
right: 12px;
|
||||
transform: translateY(-50%) rotate(-45deg);
|
||||
left: auto;
|
||||
}
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Disabled*/
|
||||
.ui-btn.ui-btn-disabled,
|
||||
.ui-btn.ui-btn-disabled:hover,
|
||||
.ui-btn.ui-btn-disabled:active,
|
||||
.ui-btn[disabled],
|
||||
.ui-btn[disabled]:hover,
|
||||
.ui-btn[disabled]:active,
|
||||
.ui-btn-disabled .ui-btn-main,
|
||||
.ui-btn-disabled .ui-btn-main:hover,
|
||||
.ui-btn-disabled .ui-btn-main:active,
|
||||
.ui-btn-disabled .ui-btn-extra,
|
||||
.ui-btn-disabled .ui-btn-extra:hover,
|
||||
.ui-btn-disabled .ui-btn-extra:active,
|
||||
.ui-btn-disabled .ui-btn-menu,
|
||||
.ui-btn-disabled .ui-btn-menu:hover,
|
||||
.ui-btn-disabled .ui-btn-menu:active,
|
||||
.ui-btn-main-disabled .ui-btn-main,
|
||||
.ui-btn-main-disabled .ui-btn-main:hover,
|
||||
.ui-btn-main-disabled .ui-btn-main:active,
|
||||
.ui-btn-extra-disabled .ui-btn-extra,
|
||||
.ui-btn-extra-disabled .ui-btn-extra:hover,
|
||||
.ui-btn-extra-disabled .ui-btn-extra:active,
|
||||
.ui-btn-menu-disabled .ui-btn-menu,
|
||||
.ui-btn-menu-disabled .ui-btn-menu:hover,
|
||||
.ui-btn-menu-disabled .ui-btn-menu:active {
|
||||
opacity: .4;
|
||||
cursor: not-allowed;
|
||||
background-color: var(--ui-btn-background);
|
||||
border-color: var(--ui-btn-border-color);
|
||||
}
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Wait*/
|
||||
.ui-btn.ui-btn-wait,
|
||||
.ui-btn-wait .ui-btn-main {
|
||||
background-position: center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
.ui-btn.ui-btn-wait:after,
|
||||
.ui-btn-wait .ui-btn-main:after { opacity: 0; }
|
||||
|
||||
.ui-btn-wait,
|
||||
.ui-btn-wait.ui-btn-danger,
|
||||
.ui-btn-wait.ui-btn-primary,
|
||||
.ui-btn-wait.ui-btn-default,
|
||||
.ui-btn-wait.ui-btn-danger-dark,
|
||||
.ui-btn-wait.ui-btn-success-dark,
|
||||
.ui-btn-wait.ui-btn-primary-dark { --ui-btn-wait-loader: var(--ui-btn-wait-white); }
|
||||
|
||||
.ui-btn-wait.ui-btn-link,
|
||||
.ui-btn-wait.ui-btn-secondary,
|
||||
.ui-btn-wait.ui-btn-light,
|
||||
.ui-btn-wait.ui-btn-success,
|
||||
.ui-btn-wait.ui-btn-light-border,
|
||||
.ui-btn-wait.ui-btn-link { --ui-btn-wait-loader: var(--ui-btn-wait-black); }
|
||||
|
||||
.ui-btn.ui-btn-wait,
|
||||
.ui-btn-wait .ui-btn-main { background-image: var(--ui-btn-wait-loader); }
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*region Clock*/
|
||||
.ui-btn.ui-btn-clock,
|
||||
.ui-btn-double.ui-btn-clock .ui-btn-main,
|
||||
.ui-btn-split.ui-btn-clock .ui-btn-main {
|
||||
background-position: center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
.ui-btn.ui-btn-clock:after,
|
||||
.ui-btn-double.ui-btn-clock .ui-btn-main:after,
|
||||
.ui-btn-split.ui-btn-clock .ui-btn-main:after { opacity: 0; }
|
||||
|
||||
.ui-btn-clock,
|
||||
.ui-btn-clock.ui-btn-danger,
|
||||
.ui-btn-clock.ui-btn-primary,
|
||||
.ui-btn-clock.ui-btn-default,
|
||||
.ui-btn-clock.ui-btn-danger-dark,
|
||||
.ui-btn-clock.ui-btn-success-dark,
|
||||
.ui-btn-clock.ui-btn-primary-dark { --ui-btn-clock-loader: var(--ui-btn-clock-white); }
|
||||
|
||||
.ui-btn-clock.ui-btn-link,
|
||||
.ui-btn-clock.ui-btn-secondary,
|
||||
.ui-btn-clock.ui-btn-light,
|
||||
.ui-btn-clock.ui-btn-success,
|
||||
.ui-btn-clock.ui-btn-light-border,
|
||||
.ui-btn-clock.ui-btn-link { --ui-btn-clock-loader: var(--ui-btn-clock-black); }
|
||||
|
||||
.ui-btn.ui-btn-clock,
|
||||
.ui-btn-clock .ui-btn-main { background-image: var(--ui-btn-clock-loader); }
|
||||
|
||||
/*endregion*/
|
||||
|
||||
/*endregion*/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+57
-21
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Do not edit directly
|
||||
* Generated on Tue, 29 Apr 2025 05:39:16 GMT
|
||||
* Generated on Tue, 08 Jul 2025 12:00:23 GMT
|
||||
*/
|
||||
|
||||
:root, .--ui-context-content-light {
|
||||
@@ -14,8 +14,8 @@
|
||||
--ui-color-base-7: #EDEEF0;
|
||||
--ui-color-base-8: #FFFFFF;
|
||||
--ui-color-base-black-fixed: #000000;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-bg-content-primary: #FFFFFF;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-divider-accent: #E2E2E2;
|
||||
--ui-color-divider-default: #F0F0F0;
|
||||
--ui-color-divider-less: #F7F7F7;
|
||||
@@ -33,9 +33,9 @@
|
||||
--ui-divider-optical-1-weight: 0px;
|
||||
--ui-divider-optical-2-weight: 0px;
|
||||
--ui-color-divider-optical-on-overlay: #FFFFFF00;
|
||||
--ui-color-bg-content-secondary: #FBFBFB;
|
||||
--ui-color-bg-content-secondary: #FAFCFD;
|
||||
--ui-divider-optical-on-overlay-weight: 0px;
|
||||
--ui-color-bg-content-tertiary: #F1F4F6;
|
||||
--ui-color-bg-content-tertiary: #EEF2F4;
|
||||
--ui-color-bg-vibrant-accent: #FFFFFFF5;
|
||||
--ui-color-bg-state-hover-default-hex: #000000;
|
||||
--ui-color-bg-state-hover-default-opacity: 3%;
|
||||
@@ -109,6 +109,13 @@
|
||||
--ui-color-design-filled-warning-content-icon: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-chevron: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-divider: #FFFFFF3D;
|
||||
--ui-color-design-filled-white-bg: #FAFAFC;
|
||||
--ui-color-design-filled-white-stroke: var(--ui-color-base-7);
|
||||
--ui-design-filled-white-stroke-weight: 0px;
|
||||
--ui-color-design-filled-white-content: var(--ui-color-base-2);
|
||||
--ui-color-design-filled-white-content-icon: var(--ui-color-base-2);
|
||||
--ui-color-design-filled-white-content-chevron: var(--ui-color-base-2);
|
||||
--ui-color-design-filled-white-content-divider: var(--ui-color-base-7);
|
||||
--ui-color-design-filled-na-bg: var(--ui-color-base-4);
|
||||
--ui-color-design-filled-na-bg-secondary: var(--ui-color-base-5);
|
||||
--ui-color-design-filled-copilot-bg: var(--ui-color-copilot-accent-primary);
|
||||
@@ -266,8 +273,9 @@
|
||||
--ui-color-design-selection-bg: var(--ui-color-accent-soft-blue-3);
|
||||
--ui-color-design-selection-stroke: var(--ui-color-accent-soft-blue-1);
|
||||
--ui-design-selection-stroke-weight: var(--ui-border-width-medium);
|
||||
--ui-color-design-selection-content: var(--ui-color-accent-main-primary);
|
||||
--ui-design-selection-stroke-weight-alt: var(--ui-border-width-thin);
|
||||
--ui-color-design-plain-na-focused-stroke: var(--ui-color-divider-default);
|
||||
--ui-color-design-selection-content: var(--ui-color-accent-main-primary);
|
||||
--ui-design-plain-na-focused-stroke-weight: var(--ui-border-width-medium);
|
||||
--ui-color-design-selection-content-icon: var(--ui-color-accent-main-primary);
|
||||
--ui-color-design-selection-content-icon-secondary: var(--ui-color-accent-main-primary-alt-2);
|
||||
@@ -276,7 +284,7 @@
|
||||
--ui-color-design-selection-content-divider: var(--ui-color-accent-soft-blue-1);
|
||||
--ui-color-design-selection-focused-bg: var(--ui-color-bg-content-primary);
|
||||
--ui-color-accent-main-primary-alt: #1F86FF;
|
||||
--ui-color-accent-main-primary-alt-2: #7AB7FF;
|
||||
--ui-color-accent-main-primary-alt-2: #58B1FF;
|
||||
--ui-color-accent-main-success: #1BCE7B;
|
||||
--ui-color-accent-main-success-alt: #10B769;
|
||||
--ui-color-accent-main-success-alt-2: #00A659;
|
||||
@@ -344,8 +352,8 @@
|
||||
--ui-color-tech-bg-picture-tint: #00000000;
|
||||
--ui-color-tech-dark-fixes: #FFFFFF00;
|
||||
--ui-color-blue-02: #F9FCFF;
|
||||
--ui-color-blue-04: #F8FBFF;
|
||||
--ui-color-black-base: #333333;
|
||||
--ui-color-blue-04: #F8FBFF;
|
||||
--ui-color-blue-06: #F7FBFF;
|
||||
--ui-color-blue-08: #F5FAFF;
|
||||
--ui-color-g-content-glass-1: #FFFFFFE6;
|
||||
@@ -491,6 +499,7 @@
|
||||
--ui-color-design-disabled-stroke: var(--ui-color-base-7);
|
||||
--ui-design-disabled-stroke-weight: 0px;
|
||||
--ui-color-design-disabled-content: var(--ui-color-base-5);
|
||||
--ui-color-design-disabled-content-alt: var(--ui-color-base-4);
|
||||
--ui-color-design-disabled-content-icon: var(--ui-color-base-5);
|
||||
--ui-color-design-disabled-content-chevron: var(--ui-color-base-5);
|
||||
--ui-color-design-disabled-content-divider: var(--ui-color-base-6);
|
||||
@@ -535,8 +544,8 @@
|
||||
--ui-color-base-7: #373838;
|
||||
--ui-color-base-8: #252626;
|
||||
--ui-color-base-black-fixed: #000000;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-bg-content-primary: #262626;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-divider-accent: #383838;
|
||||
--ui-color-divider-default: #323232;
|
||||
--ui-color-divider-less: #323232;
|
||||
@@ -630,6 +639,13 @@
|
||||
--ui-color-design-filled-warning-content-icon: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-chevron: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-divider: #FFFFFF3D;
|
||||
--ui-color-design-filled-white-bg: var(--ui-color-bg-content-primary);
|
||||
--ui-color-design-filled-white-stroke: var(--ui-color-base-7);
|
||||
--ui-design-filled-white-stroke-weight: 0px;
|
||||
--ui-color-design-filled-white-content: var(--ui-color-base-2);
|
||||
--ui-color-design-filled-white-content-icon: var(--ui-color-base-2);
|
||||
--ui-color-design-filled-white-content-chevron: var(--ui-color-base-2);
|
||||
--ui-color-design-filled-white-content-divider: var(--ui-color-base-7);
|
||||
--ui-color-design-filled-na-bg: var(--ui-color-base-4);
|
||||
--ui-color-design-filled-na-bg-secondary: var(--ui-color-base-5);
|
||||
--ui-color-design-filled-copilot-bg: var(--ui-color-copilot-accent-primary);
|
||||
@@ -787,8 +803,9 @@
|
||||
--ui-color-design-selection-bg: #1F3048;
|
||||
--ui-color-design-selection-stroke: #294162;
|
||||
--ui-design-selection-stroke-weight: var(--ui-border-width-medium);
|
||||
--ui-color-design-selection-content: #2A94FF;
|
||||
--ui-design-selection-stroke-weight-alt: var(--ui-border-width-thin);
|
||||
--ui-color-design-plain-na-focused-stroke: var(--ui-color-divider-default);
|
||||
--ui-color-design-selection-content: #2A94FF;
|
||||
--ui-design-plain-na-focused-stroke-weight: var(--ui-border-width-medium);
|
||||
--ui-color-design-selection-content-icon: #2A94FF;
|
||||
--ui-color-design-selection-content-icon-secondary: #5EAEFF;
|
||||
@@ -865,8 +882,8 @@
|
||||
--ui-color-tech-bg-picture-tint: #0000003D;
|
||||
--ui-color-tech-dark-fixes: #383838;
|
||||
--ui-color-blue-02: #FFFFFF;
|
||||
--ui-color-blue-04: #FFFFFF;
|
||||
--ui-color-black-base: #333333;
|
||||
--ui-color-blue-04: #FFFFFF;
|
||||
--ui-color-blue-06: #FFFFFF;
|
||||
--ui-color-blue-08: #FFFFFF;
|
||||
--ui-color-g-content-glass-1: #FFFFFFE6;
|
||||
@@ -1012,6 +1029,7 @@
|
||||
--ui-color-design-disabled-stroke: var(--ui-color-base-7);
|
||||
--ui-design-disabled-stroke-weight: 0px;
|
||||
--ui-color-design-disabled-content: var(--ui-color-base-5);
|
||||
--ui-color-design-disabled-content-alt: var(--ui-color-base-4);
|
||||
--ui-color-design-disabled-content-icon: var(--ui-color-base-5);
|
||||
--ui-color-design-disabled-content-chevron: var(--ui-color-base-5);
|
||||
--ui-color-design-disabled-content-divider: var(--ui-color-base-6);
|
||||
@@ -1047,7 +1065,7 @@
|
||||
|
||||
.--ui-context-edge-light {
|
||||
--ui-color-base-0: #000000;
|
||||
--ui-color-base-1: #000000;
|
||||
--ui-color-base-1: #1D1E1F;
|
||||
--ui-color-base-2: #000000BF;
|
||||
--ui-color-base-3: #000000A6;
|
||||
--ui-color-base-4: #0000008C;
|
||||
@@ -1056,8 +1074,8 @@
|
||||
--ui-color-base-7: #00000040;
|
||||
--ui-color-base-8: #00000026;
|
||||
--ui-color-base-black-fixed: #000000;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-bg-content-primary: #0000000F;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-divider-accent: #0000000F;
|
||||
--ui-color-divider-default: #0000000A;
|
||||
--ui-color-divider-less: #00000008;
|
||||
@@ -1109,7 +1127,7 @@
|
||||
--ui-color-bg-content-inapp: #00428F;
|
||||
--ui-color-bg-content-primary-layer: #292929;
|
||||
--ui-color-bg-content-light: #EEEEEE;
|
||||
--ui-bg-blur-content: var(--ui-bg-blur-default);
|
||||
--ui-bg-blur-content: var(--ui-bg-blur-accent);
|
||||
--ui-bg-blur-vibrant: var(--ui-bg-blur-accent);
|
||||
--ui-color-accent-main-primary: #1587FA;
|
||||
--ui-color-design-filled-bg: var(--ui-color-accent-main-primary);
|
||||
@@ -1151,6 +1169,13 @@
|
||||
--ui-color-design-filled-warning-content-icon: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-chevron: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-divider: #FFFFFF1F;
|
||||
--ui-color-design-filled-white-bg: var(--ui-color-bg-content-primary);
|
||||
--ui-color-design-filled-white-stroke: #00000014;
|
||||
--ui-design-filled-white-stroke-weight: 0px;
|
||||
--ui-color-design-filled-white-content: var(--ui-color-base-0);
|
||||
--ui-color-design-filled-white-content-icon: var(--ui-color-base-1);
|
||||
--ui-color-design-filled-white-content-chevron: var(--ui-color-base-1);
|
||||
--ui-color-design-filled-white-content-divider: var(--ui-color-base-7);
|
||||
--ui-color-design-filled-na-bg: var(--ui-color-base-4);
|
||||
--ui-color-design-filled-na-bg-secondary: var(--ui-color-base-5);
|
||||
--ui-color-design-filled-copilot-bg: var(--ui-color-copilot-accent-primary);
|
||||
@@ -1305,13 +1330,14 @@
|
||||
--ui-color-design-plain-na-content-chevron: var(--ui-color-base-5);
|
||||
--ui-color-design-plain-na-content-divider: var(--ui-color-base-8);
|
||||
--ui-color-design-plain-na-focused-bg: #00000014;
|
||||
--ui-color-design-selection-bg: #0000001F;
|
||||
--ui-color-design-selection-bg: #00000014;
|
||||
--ui-color-design-selection-stroke: #00000000;
|
||||
--ui-design-selection-stroke-weight: 0px;
|
||||
--ui-color-design-selection-content: var(--ui-color-base-0);
|
||||
--ui-design-selection-stroke-weight-alt: 0px;
|
||||
--ui-color-design-plain-na-focused-stroke: #00000014;
|
||||
--ui-color-design-selection-content: var(--ui-color-base-1);
|
||||
--ui-design-plain-na-focused-stroke-weight: var(--ui-border-width-medium);
|
||||
--ui-color-design-selection-content-icon: var(--ui-color-base-0);
|
||||
--ui-color-design-selection-content-icon: var(--ui-color-base-1);
|
||||
--ui-color-design-selection-content-icon-secondary: var(--ui-color-base-2);
|
||||
--ui-color-design-selection-content-chevron: var(--ui-color-base-0);
|
||||
--ui-color-design-plain-na-focused-content: var(--ui-color-base-1);
|
||||
@@ -1386,8 +1412,8 @@
|
||||
--ui-color-tech-bg-picture-tint: #0000003D;
|
||||
--ui-color-tech-dark-fixes: #383838;
|
||||
--ui-color-blue-02: #FFFFFF;
|
||||
--ui-color-blue-04: #FFFFFF;
|
||||
--ui-color-black-base: #333333;
|
||||
--ui-color-blue-04: #FFFFFF;
|
||||
--ui-color-blue-06: #FFFFFF;
|
||||
--ui-color-blue-08: #FFFFFF;
|
||||
--ui-color-g-content-glass-1: #FFFFFFE6;
|
||||
@@ -1533,6 +1559,7 @@
|
||||
--ui-color-design-disabled-stroke: var(--ui-color-bg-content-primary);
|
||||
--ui-design-disabled-stroke-weight: 0px;
|
||||
--ui-color-design-disabled-content: var(--ui-color-base-7);
|
||||
--ui-color-design-disabled-content-alt: var(--ui-color-base-6);
|
||||
--ui-color-design-disabled-content-icon: var(--ui-color-base-7);
|
||||
--ui-color-design-disabled-content-chevron: var(--ui-color-base-7);
|
||||
--ui-color-design-disabled-content-divider: var(--ui-color-base-8);
|
||||
@@ -1577,8 +1604,8 @@
|
||||
--ui-color-base-7: #FFFFFF4D;
|
||||
--ui-color-base-8: #FFFFFF33;
|
||||
--ui-color-base-black-fixed: #000000;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-bg-content-primary: #FFFFFF29;
|
||||
--ui-color-base-white-fixed: #FFFFFF;
|
||||
--ui-color-divider-accent: #FFFFFF14;
|
||||
--ui-color-divider-default: #FFFFFF0F;
|
||||
--ui-color-divider-less: #FFFFFF0A;
|
||||
@@ -1630,7 +1657,7 @@
|
||||
--ui-color-bg-content-inapp: #00428F;
|
||||
--ui-color-bg-content-primary-layer: #FFFFFF;
|
||||
--ui-color-bg-content-light: #EEEEEE;
|
||||
--ui-bg-blur-content: var(--ui-bg-blur-default);
|
||||
--ui-bg-blur-content: var(--ui-bg-blur-accent);
|
||||
--ui-bg-blur-vibrant: var(--ui-bg-blur-accent-more);
|
||||
--ui-color-accent-main-primary: #1587FA;
|
||||
--ui-color-design-filled-bg: var(--ui-color-accent-main-primary);
|
||||
@@ -1672,6 +1699,13 @@
|
||||
--ui-color-design-filled-warning-content-icon: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-chevron: var(--ui-color-base-white-fixed);
|
||||
--ui-color-design-filled-warning-content-divider: #FFFFFF29;
|
||||
--ui-color-design-filled-white-bg: var(--ui-color-bg-content-primary);
|
||||
--ui-color-design-filled-white-stroke: #FFFFFF24;
|
||||
--ui-design-filled-white-stroke-weight: 0px;
|
||||
--ui-color-design-filled-white-content: var(--ui-color-base-0);
|
||||
--ui-color-design-filled-white-content-icon: var(--ui-color-base-1);
|
||||
--ui-color-design-filled-white-content-chevron: var(--ui-color-base-1);
|
||||
--ui-color-design-filled-white-content-divider: var(--ui-color-base-7);
|
||||
--ui-color-design-filled-na-bg: var(--ui-color-base-4);
|
||||
--ui-color-design-filled-na-bg-secondary: var(--ui-color-base-5);
|
||||
--ui-color-design-filled-copilot-bg: var(--ui-color-copilot-accent-primary);
|
||||
@@ -1829,8 +1863,9 @@
|
||||
--ui-color-design-selection-bg: #FFFFFF4D;
|
||||
--ui-color-design-selection-stroke: #FFFFFF00;
|
||||
--ui-design-selection-stroke-weight: 0px;
|
||||
--ui-color-design-selection-content: var(--ui-color-base-0);
|
||||
--ui-design-selection-stroke-weight-alt: 0px;
|
||||
--ui-color-design-plain-na-focused-stroke: #FFFFFF1F;
|
||||
--ui-color-design-selection-content: var(--ui-color-base-0);
|
||||
--ui-design-plain-na-focused-stroke-weight: var(--ui-border-width-medium);
|
||||
--ui-color-design-selection-content-icon: var(--ui-color-base-0);
|
||||
--ui-color-design-selection-content-icon-secondary: var(--ui-color-base-2);
|
||||
@@ -1907,8 +1942,8 @@
|
||||
--ui-color-tech-bg-picture-tint: #0000003D;
|
||||
--ui-color-tech-dark-fixes: #383838;
|
||||
--ui-color-blue-02: #FFFFFF;
|
||||
--ui-color-blue-04: #FFFFFF;
|
||||
--ui-color-black-base: #333333;
|
||||
--ui-color-blue-04: #FFFFFF;
|
||||
--ui-color-blue-06: #FFFFFF;
|
||||
--ui-color-blue-08: #FFFFFF;
|
||||
--ui-color-g-content-glass-1: #FFFFFFE6;
|
||||
@@ -2054,6 +2089,7 @@
|
||||
--ui-color-design-disabled-stroke: var(--ui-color-bg-content-primary);
|
||||
--ui-design-disabled-stroke-weight: 0px;
|
||||
--ui-color-design-disabled-content: var(--ui-color-base-7);
|
||||
--ui-color-design-disabled-content-alt: var(--ui-color-base-6);
|
||||
--ui-color-design-disabled-content-icon: var(--ui-color-base-7);
|
||||
--ui-color-design-disabled-content-chevron: var(--ui-color-base-7);
|
||||
--ui-color-design-disabled-content-divider: var(--ui-color-base-8);
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -69,13 +69,13 @@
|
||||
"value": "#000000"
|
||||
},
|
||||
{
|
||||
"name": "base/base-white-fixed",
|
||||
"name": "backgrounds/content/bg-content-primary",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "backgrounds/content/bg-content-primary",
|
||||
"name": "base/base-white-fixed",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
@@ -186,7 +186,7 @@
|
||||
"name": "backgrounds/content/bg-content-secondary",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FBFBFB"
|
||||
"value": "#FAFCFD"
|
||||
},
|
||||
{
|
||||
"name": "divider/optical/divider-optical-on-overlay-weight",
|
||||
@@ -198,7 +198,7 @@
|
||||
"name": "backgrounds/content/bg-content-tertiary",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#F1F4F6"
|
||||
"value": "#EEF2F4"
|
||||
},
|
||||
{
|
||||
"name": "backgrounds/vibrant/bg-vibrant-accent",
|
||||
@@ -623,6 +623,63 @@
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF3D"
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-bg",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FAFAFC"
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke-weight",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-icon",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-chevron",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-divider",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled no accent/default/design-filled-na-bg",
|
||||
"type": "color",
|
||||
@@ -1938,12 +1995,12 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-content",
|
||||
"type": "color",
|
||||
"name": "design/selection/default/design-selection-stroke-weight-alt",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "accent/main/accent-main-primary"
|
||||
"collection": "fixed",
|
||||
"name": "global/border/width/border-width-thin"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1955,6 +2012,15 @@
|
||||
"name": "divider/content/divider-default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-content",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "accent/main/accent-main-primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke-weight",
|
||||
"type": "number",
|
||||
@@ -2028,7 +2094,7 @@
|
||||
"name": "accent/main/accent-main-primary-alt-2",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#7AB7FF"
|
||||
"value": "#58B1FF"
|
||||
},
|
||||
{
|
||||
"name": "accent/main/accent-main-success",
|
||||
@@ -2718,7 +2784,7 @@
|
||||
"name": "component/drawer/drawer-bg-default",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#F6F8FA"
|
||||
"value": "#EEF2F4"
|
||||
},
|
||||
{
|
||||
"name": "component/drawer/drawer-bg-unfocused",
|
||||
@@ -3293,18 +3359,18 @@
|
||||
"isAlias": false,
|
||||
"value": "#F9FCFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#F8FBFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/black/black-base",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#333333"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#F8FBFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-06",
|
||||
"type": "color",
|
||||
@@ -4670,6 +4736,15 @@
|
||||
"name": "base/base-5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-alt",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-icon",
|
||||
"type": "color",
|
||||
@@ -4969,18 +5044,18 @@
|
||||
"isAlias": false,
|
||||
"value": "#000000"
|
||||
},
|
||||
{
|
||||
"name": "base/base-white-fixed",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "backgrounds/content/bg-content-primary",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#262626"
|
||||
},
|
||||
{
|
||||
"name": "base/base-white-fixed",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "divider/content/divider-accent",
|
||||
"type": "color",
|
||||
@@ -5533,6 +5608,66 @@
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF3D"
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-bg",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "backgrounds/content/bg-content-primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke-weight",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-icon",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-chevron",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-divider",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled no accent/default/design-filled-na-bg",
|
||||
"type": "color",
|
||||
@@ -6842,10 +6977,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-content",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#2A94FF"
|
||||
"name": "design/selection/default/design-selection-stroke-weight-alt",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "fixed",
|
||||
"name": "global/border/width/border-width-thin"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke",
|
||||
@@ -6856,6 +6994,12 @@
|
||||
"name": "divider/content/divider-default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-content",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#2A94FF"
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke-weight",
|
||||
"type": "number",
|
||||
@@ -8170,18 +8314,18 @@
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/black/black-base",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#333333"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-06",
|
||||
"type": "color",
|
||||
@@ -9547,6 +9691,15 @@
|
||||
"name": "base/base-5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-alt",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-icon",
|
||||
"type": "color",
|
||||
@@ -9796,7 +9949,7 @@
|
||||
"name": "base/base-1",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#000000"
|
||||
"value": "#1D1E1F"
|
||||
},
|
||||
{
|
||||
"name": "base/base-2",
|
||||
@@ -9846,18 +9999,18 @@
|
||||
"isAlias": false,
|
||||
"value": "#000000"
|
||||
},
|
||||
{
|
||||
"name": "base/base-white-fixed",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "backgrounds/content/bg-content-primary",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#0000000F"
|
||||
},
|
||||
{
|
||||
"name": "base/base-white-fixed",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "divider/content/divider-accent",
|
||||
"type": "color",
|
||||
@@ -10410,6 +10563,63 @@
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF1F"
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-bg",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "backgrounds/content/bg-content-primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#00000014"
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke-weight",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-icon",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-chevron",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-divider",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled no accent/default/design-filled-na-bg",
|
||||
"type": "color",
|
||||
@@ -11719,7 +11929,7 @@
|
||||
"name": "design/selection/default/design-selection-bg",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#0000001F"
|
||||
"value": "#00000014"
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-stroke",
|
||||
@@ -11734,13 +11944,10 @@
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-content",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-0"
|
||||
}
|
||||
"name": "design/selection/default/design-selection-stroke-weight-alt",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke",
|
||||
@@ -11748,6 +11955,15 @@
|
||||
"isAlias": false,
|
||||
"value": "#00000014"
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-content",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke-weight",
|
||||
"type": "number",
|
||||
@@ -11763,7 +11979,7 @@
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-0"
|
||||
"name": "base/base-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -12511,7 +12727,7 @@
|
||||
"name": "component/drawer/drawer-bg-default",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#F6F8FA00"
|
||||
"value": "#EEF2F400"
|
||||
},
|
||||
{
|
||||
"name": "component/drawer/drawer-bg-unfocused",
|
||||
@@ -13047,18 +13263,18 @@
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/black/black-base",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#333333"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-06",
|
||||
"type": "color",
|
||||
@@ -14427,6 +14643,15 @@
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-alt",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-icon",
|
||||
"type": "color",
|
||||
@@ -14720,18 +14945,18 @@
|
||||
"isAlias": false,
|
||||
"value": "#000000"
|
||||
},
|
||||
{
|
||||
"name": "base/base-white-fixed",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "backgrounds/content/bg-content-primary",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF29"
|
||||
},
|
||||
{
|
||||
"name": "base/base-white-fixed",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "divider/content/divider-accent",
|
||||
"type": "color",
|
||||
@@ -15284,6 +15509,63 @@
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF29"
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-bg",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "backgrounds/content/bg-content-primary"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF24"
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-stroke-weight",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-icon",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-chevron",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled white/default/design-filled-white-content-divider",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/filled no accent/default/design-filled-na-bg",
|
||||
"type": "color",
|
||||
@@ -16607,6 +16889,18 @@
|
||||
"isAlias": false,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-stroke-weight-alt",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF1F"
|
||||
},
|
||||
{
|
||||
"name": "design/selection/default/design-selection-content",
|
||||
"type": "color",
|
||||
@@ -16616,12 +16910,6 @@
|
||||
"name": "base/base-0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF1F"
|
||||
},
|
||||
{
|
||||
"name": "design/plain no accent/focused/design-plain-na-focused-stroke-weight",
|
||||
"type": "number",
|
||||
@@ -17385,7 +17673,7 @@
|
||||
"name": "component/drawer/drawer-bg-default",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#F6F8FA00"
|
||||
"value": "#EEF2F400"
|
||||
},
|
||||
{
|
||||
"name": "component/drawer/drawer-bg-unfocused",
|
||||
@@ -17921,18 +18209,18 @@
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/black/black-base",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#333333"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-04",
|
||||
"type": "color",
|
||||
"isAlias": false,
|
||||
"value": "#FFFFFF"
|
||||
},
|
||||
{
|
||||
"name": "pallete/blue/blue-06",
|
||||
"type": "color",
|
||||
@@ -19301,6 +19589,15 @@
|
||||
"name": "base/base-7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-alt",
|
||||
"type": "color",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "design",
|
||||
"name": "base/base-6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "design/disabled/default/design-disabled-content-icon",
|
||||
"type": "color",
|
||||
@@ -19672,37 +19969,175 @@
|
||||
"value": "#0000000D"
|
||||
},
|
||||
{
|
||||
"name": "global/font/letter-spacing-2XL",
|
||||
"name": "global/font/font size/font-size-4XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 25
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-3XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 21
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-2XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 19
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 17
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-L",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 16
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-M",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-S",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 14
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 13
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-2XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 12
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-3XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"name": "global/font/font size/font-size-4XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-5XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 33
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-4XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 29
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-3XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 26
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-2XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 23
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 21
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-L",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-M",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 19
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-S",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 17
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-2XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 14
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-3XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 13
|
||||
},
|
||||
{
|
||||
"name": "global/font/line height/line-height-4XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 12
|
||||
},
|
||||
{
|
||||
"name": "global/font/letter spacing/letter-spacing-2XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0.75
|
||||
},
|
||||
{
|
||||
"name": "global/font/letter-spacing-XL",
|
||||
"name": "global/font/letter spacing/letter-spacing-XL",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 0.6499999761581421
|
||||
},
|
||||
{
|
||||
"name": "global/font/letter-spacing-L",
|
||||
"name": "global/font/letter spacing/letter-spacing-L",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": -0.05000000074505806
|
||||
},
|
||||
{
|
||||
"name": "global/font/letter-spacing-M",
|
||||
"name": "global/font/letter spacing/letter-spacing-M",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": -0.10000000149011612
|
||||
},
|
||||
{
|
||||
"name": "global/font/letter-spacing-S",
|
||||
"name": "global/font/letter spacing/letter-spacing-S",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": -0.20000000298023224
|
||||
},
|
||||
{
|
||||
"name": "global/font/letter-spacing-XS",
|
||||
"name": "global/font/letter spacing/letter-spacing-XS",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": -0.3499999940395355
|
||||
@@ -20098,12 +20533,12 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/toggle/button-toggle-XL-space-inset",
|
||||
"name": "component/button/space/submenu/button-submenu-XL-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "fixed",
|
||||
"name": "global/space/inset/space-inset-sm2"
|
||||
"name": "global/space/inset/space-inset-sm"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -20161,25 +20596,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/toggle/button-toggle-L-space-inset",
|
||||
"name": "component/button/space/submenu/button-submenu-L-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "fixed",
|
||||
"name": "global/space/inset/space-inset-sm"
|
||||
}
|
||||
"isAlias": false,
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/toggle/button-toggle-M-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "fixed",
|
||||
"name": "global/space/inset/space-inset-xs2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/toggle/button-toggle-S-space-inset",
|
||||
"name": "component/button/space/submenu/button-submenu-M-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
@@ -20188,7 +20611,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/toggle/button-toggle-XS-space-inset",
|
||||
"name": "component/button/space/submenu/button-submenu-S-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
@@ -20197,7 +20620,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/toggle/button-toggle-2XS-space-inset",
|
||||
"name": "component/button/space/submenu/button-submenu-XS-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": false,
|
||||
"value": 5
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/submenu/button-submenu-2XS-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
@@ -20205,6 +20634,15 @@
|
||||
"name": "global/space/inset/space-inset-2xs"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/button/space/submenu/button-submenu-3XS-space-inset",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "fixed",
|
||||
"name": "global/space/inset/space-inset-3xs"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/area/box shadow/default/area-box-shadow-default-X",
|
||||
"type": "number",
|
||||
@@ -20716,7 +21154,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/popup-menu/pmenu-cell-space-inset-TB",
|
||||
"name": "component/popup-menu/pmenu-cell-space-inset-TB-M",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
@@ -20724,6 +21162,15 @@
|
||||
"name": "global/space/inset/space-inset-xs"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/popup-menu/pmenu-cell-space-inset-TB-L",
|
||||
"type": "number",
|
||||
"isAlias": true,
|
||||
"value": {
|
||||
"collection": "fixed",
|
||||
"name": "global/space/inset/space-inset-sm2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "component/popup-menu/pmenu-cell-space-inset-L",
|
||||
"type": "number",
|
||||
|
||||
@@ -335,7 +335,7 @@ function parseArgs()
|
||||
const args = process.argv.slice(2);
|
||||
let inputFile = defaultInputPath;
|
||||
let outputFile = defaultOutputPath;
|
||||
let excludeList = ['legacy', 'chat', 'stage', 'space', 'opacity', 'size', 'radius', 'component'];
|
||||
let excludeList = ['legacy', 'chat', 'stage', 'space', 'opacity', 'size', 'radius', 'component', 'font size', 'line height'];
|
||||
let collectionsFilter = ['design', 'fixed'];
|
||||
|
||||
args.forEach(arg =>
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,2 +1,2 @@
|
||||
const fs=require("fs");const path=require("path");const specialHexTokens=["backgrounds/state/bg-state-hover-default","backgrounds/state/bg-state-click-default","backgrounds/state/bg-state-hover-alt","backgrounds/state/bg-state-click-alt","backgrounds/state/bg-state-hover-default-overlay","backgrounds/state/bg-state-click-default-overlay","backgrounds/state/bg-state-hover-alt-overlay","backgrounds/state/bg-state-click-alt-overlay"];function applyCustomRules(e,t){if(e.type==="number"&&e.name.toLowerCase().includes("opacity")){return(e.value/100).toString()}return t}function shouldIgnoreToken(e,t){const n=e.split("/");for(const e of n){if(t.includes(e)){return true}}return false}function transformTokenName(e,t){const n=e.split("/");let s=n[n.length-1];s=s.replace(/\s+/g,"-").toLowerCase();const o=t==="color"?"color-":"";return`ui-${o}${s}`}function buildTokenLookup(e,t,n){const s={};e.forEach((e=>{if(n.length>0&&!n.includes(e.name)){return}const o=e.name;if(!s[o]){s[o]={}}e.modes.forEach((e=>{if(Array.isArray(e.variables)){e.variables.forEach((e=>{if(shouldIgnoreToken(e.name,t)){return}const n=transformTokenName(e.name,e.type);s[o][e.name]=n}))}}))}));return s}function generateCssVariables(e,t,n){let s="";e.forEach((e=>{if(shouldIgnoreToken(e.name,n)){return}const o=transformTokenName(e.name,e.type);if(specialHexTokens.includes(e.name)){const t=e.value;if(t&&t[0]==="#"&&t.length===9){const e=t.slice(0,7);const n=t.slice(7);const r=Math.round(parseInt(n,16)/255*100);s+=` --${o}-hex: ${e};\n`;s+=` --${o}-opacity: ${r}%;\n`}else{s+=` --${o}: ${e.value};\n`}s+=` --${o}: ${e.value};\n`;return}let r="";if(e.isAlias&&typeof e.value==="object"){const n=e.value.collection;const s=e.value.name;if(t[n]&&t[n][s]){const e=t[n][s];r=`var(--${e})`}else{console.error(`Alias target token not found: collection "${n}", name "${s}"`);r="undefined"}}else{if(e.type==="number"){const t=`${e.value}px`;r=applyCustomRules(e,t)}else{r=e.value}}if(e.name.toLowerCase().includes("blur")){if(e.isAlias&&typeof e.value==="object"){}else if(e.type==="number"){if(e.value===0){r="none"}else{const t=`${e.value}px`;const n=applyCustomRules(e,t);r=`blur(${n})`}}else{r=`blur(${r})`}}s+=` --${o}: ${r};\n`}));return s}function generateCss(e,t,n){const s=`/**\n * Do not edit directly\n * Generated on ${(new Date).toUTCString()}\n */\n\n`;const{collections:o}=e;const r=new Set;o.forEach((e=>{if(n.length>0&&!n.includes(e.name))return;e.modes.forEach((e=>{e.variables.forEach((e=>{if(!shouldIgnoreToken(e.name,t)&&e.name.toLowerCase().includes("bg-blur")){const t=transformTokenName(e.name,e.type);r.add(t)}}))}))}));const a=buildTokenLookup(o,t,n);let l=s;o.forEach((e=>{if(n.length>0&&!n.includes(e.name)){return}if(e.modes.length===1){const n=e.modes[0];l+=`:root {\n`;l+=generateCssVariables(n.variables,a,t);l+=`}\n\n`}else{const n=e.modes[0];const s=`--ui-context-${n.name.toLowerCase().replace(/\s+/g,"-")}`;l+=`:root, .${s} {\n`;l+=generateCssVariables(n.variables,a,t);l+=`}\n\n`;e.modes.forEach((e=>{if(e.name.toLowerCase()===n.name.toLowerCase()){return}const s=`--ui-context-${e.name.toLowerCase().replace(/\s+/g,"-")}`;l+=`.${s} {\n`;l+=generateCssVariables(e.variables,a,t);l+=`}\n\n`}))}}));if(r.size>0){l+=`.--ui-reset-bg-blur {\n`;r.forEach((e=>{l+=` --${e}: none;\n`}));l+=`}\n\n`}return l}function parseArgs(){const e="./src/figma-tokens.json";const t="./dist/air-design-tokens.css";const n=process.argv.slice(2);let s=e;let o=t;let r=["legacy","chat","stage","space","opacity","size","radius","component"];let a=["design","fixed"];n.forEach((e=>{if(e.startsWith("--input=")){s=e.split("=")[1]}else if(e.startsWith("--output=")){o=e.split("=")[1]}else if(e.startsWith("--exclude=")){r=e.split("=")[1].split(",").map((e=>e.trim()))}else if(e.startsWith("--collections=")){a=e.split("=")[1].split(",").map((e=>e.trim()))}}));return{input:path.resolve(s),output:path.resolve(o),exclude:r,collections:a}}function main(){const e=parseArgs();let t;try{const n=fs.readFileSync(e.input,"utf8");t=JSON.parse(n)}catch(e){console.error("Error reading or parsing JSON file:",e);process.exit(1)}let n="";try{const e=path.join(__dirname,"src","hoverable.css");n=fs.readFileSync(e,"utf8")}catch(e){console.error("Error reading hoverable.css:",e);process.exit(1)}const s=generateCss(t,e.exclude,e.collections);const o=`${s}${n}`;try{fs.writeFileSync(e.output,o,"utf8");console.log(`CSS file successfully generated: ${e.output}`)}catch(e){console.error("Error writing CSS file:",e);process.exit(1)}}main();
|
||||
const fs=require("fs");const path=require("path");const specialHexTokens=["backgrounds/state/bg-state-hover-default","backgrounds/state/bg-state-click-default","backgrounds/state/bg-state-hover-alt","backgrounds/state/bg-state-click-alt","backgrounds/state/bg-state-hover-default-overlay","backgrounds/state/bg-state-click-default-overlay","backgrounds/state/bg-state-hover-alt-overlay","backgrounds/state/bg-state-click-alt-overlay"];function applyCustomRules(e,t){if(e.type==="number"&&e.name.toLowerCase().includes("opacity")){return(e.value/100).toString()}return t}function shouldIgnoreToken(e,t){const n=e.split("/");for(const e of n){if(t.includes(e)){return true}}return false}function transformTokenName(e,t){const n=e.split("/");let s=n[n.length-1];s=s.replace(/\s+/g,"-").toLowerCase();const o=t==="color"?"color-":"";return`ui-${o}${s}`}function buildTokenLookup(e,t,n){const s={};e.forEach((e=>{if(n.length>0&&!n.includes(e.name)){return}const o=e.name;if(!s[o]){s[o]={}}e.modes.forEach((e=>{if(Array.isArray(e.variables)){e.variables.forEach((e=>{if(shouldIgnoreToken(e.name,t)){return}const n=transformTokenName(e.name,e.type);s[o][e.name]=n}))}}))}));return s}function generateCssVariables(e,t,n){let s="";e.forEach((e=>{if(shouldIgnoreToken(e.name,n)){return}const o=transformTokenName(e.name,e.type);if(specialHexTokens.includes(e.name)){const t=e.value;if(t&&t[0]==="#"&&t.length===9){const e=t.slice(0,7);const n=t.slice(7);const r=Math.round(parseInt(n,16)/255*100);s+=` --${o}-hex: ${e};\n`;s+=` --${o}-opacity: ${r}%;\n`}else{s+=` --${o}: ${e.value};\n`}s+=` --${o}: ${e.value};\n`;return}let r="";if(e.isAlias&&typeof e.value==="object"){const n=e.value.collection;const s=e.value.name;if(t[n]&&t[n][s]){const e=t[n][s];r=`var(--${e})`}else{console.error(`Alias target token not found: collection "${n}", name "${s}"`);r="undefined"}}else{if(e.type==="number"){const t=`${e.value}px`;r=applyCustomRules(e,t)}else{r=e.value}}if(e.name.toLowerCase().includes("blur")){if(e.isAlias&&typeof e.value==="object"){}else if(e.type==="number"){if(e.value===0){r="none"}else{const t=`${e.value}px`;const n=applyCustomRules(e,t);r=`blur(${n})`}}else{r=`blur(${r})`}}s+=` --${o}: ${r};\n`}));return s}function generateCss(e,t,n){const s=`/**\n * Do not edit directly\n * Generated on ${(new Date).toUTCString()}\n */\n\n`;const{collections:o}=e;const r=new Set;o.forEach((e=>{if(n.length>0&&!n.includes(e.name))return;e.modes.forEach((e=>{e.variables.forEach((e=>{if(!shouldIgnoreToken(e.name,t)&&e.name.toLowerCase().includes("bg-blur")){const t=transformTokenName(e.name,e.type);r.add(t)}}))}))}));const a=buildTokenLookup(o,t,n);let l=s;o.forEach((e=>{if(n.length>0&&!n.includes(e.name)){return}if(e.modes.length===1){const n=e.modes[0];l+=`:root {\n`;l+=generateCssVariables(n.variables,a,t);l+=`}\n\n`}else{const n=e.modes[0];const s=`--ui-context-${n.name.toLowerCase().replace(/\s+/g,"-")}`;l+=`:root, .${s} {\n`;l+=generateCssVariables(n.variables,a,t);l+=`}\n\n`;e.modes.forEach((e=>{if(e.name.toLowerCase()===n.name.toLowerCase()){return}const s=`--ui-context-${e.name.toLowerCase().replace(/\s+/g,"-")}`;l+=`.${s} {\n`;l+=generateCssVariables(e.variables,a,t);l+=`}\n\n`}))}}));if(r.size>0){l+=`.--ui-reset-bg-blur {\n`;r.forEach((e=>{l+=` --${e}: none;\n`}));l+=`}\n\n`}return l}function parseArgs(){const e="./src/figma-tokens.json";const t="./dist/air-design-tokens.css";const n=process.argv.slice(2);let s=e;let o=t;let r=["legacy","chat","stage","space","opacity","size","radius","component","font size","line height"];let a=["design","fixed"];n.forEach((e=>{if(e.startsWith("--input=")){s=e.split("=")[1]}else if(e.startsWith("--output=")){o=e.split("=")[1]}else if(e.startsWith("--exclude=")){r=e.split("=")[1].split(",").map((e=>e.trim()))}else if(e.startsWith("--collections=")){a=e.split("=")[1].split(",").map((e=>e.trim()))}}));return{input:path.resolve(s),output:path.resolve(o),exclude:r,collections:a}}function main(){const e=parseArgs();let t;try{const n=fs.readFileSync(e.input,"utf8");t=JSON.parse(n)}catch(e){console.error("Error reading or parsing JSON file:",e);process.exit(1)}let n="";try{const e=path.join(__dirname,"src","hoverable.css");n=fs.readFileSync(e,"utf8")}catch(e){console.error("Error reading hoverable.css:",e);process.exit(1)}const s=generateCss(t,e.exclude,e.collections);const o=`${s}${n}`;try{fs.writeFileSync(e.output,o,"utf8");console.log(`CSS file successfully generated: ${e.output}`)}catch(e){console.error("Error writing CSS file:",e);process.exit(1)}}main();
|
||||
//# sourceMappingURL=tokens-converter.map.js
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,6 @@
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_ACCEPT_BUTTON"] = "Apply";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_CANCEL_BUTTON"] = "Cancel";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SELECT_ALL_MSGVER_1"] = "select all";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_EMPTY_STATE_DESCRIPTION"] = "Try a different search criteria.";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_EMPTY_STATE_DESCRIPTION_MSGVER_1"] = "change your search parameters";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_EMPTY_STATE_TITLE_MSGVER_1"] = "Not found";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_MSGVER_1"] = "default";
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
<?php
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_ACCEPT_BUTTON"] = "Қолдану";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_CANCEL_BUTTON"] = "Болдырмау";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SELECT_ALL"] = "Барлығын таңдау";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SELECT_ALL_MSGVER_1"] = "барлығын таңдау";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS"] = "Әдепкі бойынша";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_DESELECT_ALL"] = "Барлығын болдырмау";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_EMPTY_STATE_DESCRIPTION"] = "Іздеуге сұрауды өзгертіп көріңіз";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_EMPTY_STATE_DESCRIPTION_MSGVER_1"] = "Іздеу параметрлерін өзгертіңіз";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_EMPTY_STATE_TITLE"] = "Ештеңе табылған жоқ";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_EMPTY_STATE_TITLE_MSGVER_1"] = "Табылмады";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_MSGVER_1"] = "әдепкі бойынша";
|
||||
$MESS["UI_CHECKBOX_LIST_DEFAULT_SETTINGS_PLACEHOLDER"] = "Іздеу";
|
||||
|
||||
+5
-1
@@ -19,6 +19,10 @@
|
||||
font-size: var(--ui-font-size-md);
|
||||
}
|
||||
|
||||
.ui-message-box.--air:has(.popup-window-buttons) {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.ui-message-box .popup-window-titlebar + .popup-window-content {
|
||||
padding-top: 10px;
|
||||
text-align: left;
|
||||
@@ -40,4 +44,4 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-3
@@ -123,6 +123,7 @@ this.BX.UI = this.BX.UI || {};
|
||||
* BX.UI.Dialogs.MessageBox.confirm('Message', 'Title', () => {});
|
||||
* BX.UI.Dialogs.MessageBox.confirm('Message', 'Title', () => {}, 'Proceed', () => {});
|
||||
* BX.UI.Dialogs.MessageBox.confirm('Message', 'Title', () => {}, 'Proceed', () => {}, 'Cancel');
|
||||
* BX.UI.Dialogs.MessageBox.confirm('Message', 'Title', () => {}, 'Proceed', () => {}, 'Cancel', true);
|
||||
*/
|
||||
static confirm(message, ...args) {
|
||||
let title = null;
|
||||
@@ -130,11 +131,12 @@ this.BX.UI = this.BX.UI || {};
|
||||
let okCaption = null;
|
||||
let cancelCallback = null;
|
||||
let cancelCaption = null;
|
||||
let useAirDesign = false;
|
||||
if (args.length > 0) {
|
||||
if (main_core.Type.isString(args[0])) {
|
||||
[title, okCallback, okCaption, cancelCallback, cancelCaption] = args;
|
||||
if (main_core.Type.isString(args[0]) || main_core.Type.isNull(args[0])) {
|
||||
[title, okCallback, okCaption, cancelCallback, cancelCaption, useAirDesign] = args;
|
||||
} else {
|
||||
[okCallback, okCaption, cancelCallback, cancelCaption] = args;
|
||||
[okCallback, okCaption, cancelCallback, cancelCaption, useAirDesign] = args;
|
||||
}
|
||||
}
|
||||
const messageBox = this.create({
|
||||
@@ -142,6 +144,7 @@ this.BX.UI = this.BX.UI || {};
|
||||
title,
|
||||
okCaption,
|
||||
cancelCaption,
|
||||
useAirDesign,
|
||||
onOk: okCallback,
|
||||
onCancel: cancelCallback,
|
||||
buttons: BX.UI.Dialogs.MessageBoxButtons.OK_CANCEL
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user