saby-customizer 0.0.0-pre.32 → 0.0.0-pre.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -719,7 +719,7 @@ class GitBranchCardList extends oom.extends(HTMLElement) {
719
719
  if (openTaskList.length > 0) {
720
720
  taskTist = oom()(...openTaskList)
721
721
  } else {
722
- taskTist = oom.div({ class: 'empty' }, 'Открытых задач с вехой не найдено')
722
+ taskTist = oom.div({ class: 'empty' }, 'Открытых задач не найдено')
723
723
  }
724
724
 
725
725
  return taskTist.dom
@@ -91,6 +91,16 @@ function parseRichEditorJSON(json) {
91
91
  * @property {boolean} [hasVersion] Документ включен хотя бы в 1 веху
92
92
  * @property {boolean} [duplicates] Показать/скрыть из ответа документы которые открыты дважды
93
93
  */
94
+ /**
95
+ * @typedef ReactWasabyControl filter
96
+ * @property {{record:{get:(name:string)=>any}}} props Опции компонента
97
+ */
98
+ /**
99
+ * @typedef WasabyControl Реализация компонентов платформы Wasaby в в составе DOM элемента
100
+ * @property {HTMLElement} element Ссылка на DOM элемент
101
+ * @property {{record:{get:(name:string)=>any}}} options Опции компонента
102
+ * @property {ReactWasabyControl} control Доп. вложенность контрола, для реализации на React
103
+ */
94
104
  /**
95
105
  * Собирает из верстки страницы список открытых в данный момент карточек документов ЭДО
96
106
  *
@@ -107,10 +117,10 @@ export function getListOfOpenCards(filter = {}) {
107
117
  const { controlNodes } = cardNode
108
118
 
109
119
  if (controlNodes) {
110
- /** @type {{element:HTMLElement,options:{record:{get:(name:string)=>any}}}} */
120
+ /** @type {WasabyControl} */
111
121
  const control = controlNodes.at()
112
122
  const { element } = control
113
- const record = control?.options?.record
123
+ const record = control.options?.record || control.control?.props?.record
114
124
  const data = record && {
115
125
  id: record.get('@Документ'),
116
126
  number: record.get('Номер'),
@@ -124,6 +134,10 @@ export function getListOfOpenCards(filter = {}) {
124
134
  description: ''
125
135
  }
126
136
 
137
+ if (!data) {
138
+ continue
139
+ }
140
+
127
141
  if (filter.id && filter.id !== data.id) {
128
142
  continue
129
143
  }
@@ -106,7 +106,8 @@ class ToolbarContainer extends oom.extends(HTMLElement, optionsDefaults) {
106
106
  * Добавляет в вертску сайта глобальный контейнер в панели для добавления кнопок
107
107
  */
108
108
  static addGlobalContainer() {
109
- const sabyPageRightPanel = document.querySelector('.sabyPage-MainLayout__rightPanel .sabyPage-MainLayout__wrapper')
109
+ const sabyPageRightPanel = document.querySelector('.sabyPage-MainLayout__rightPanel .sabyPage-MainLayout__wrapper') ||
110
+ document.querySelector('.sabyPage-MainLayout__mainContent .sabyPage-widgets__rightPanel__bottomButtons .sabyPage-widgets__wrapper')
110
111
 
111
112
  if (sabyPageRightPanel) {
112
113
  ToolbarContainer.globalContainer = new ToolbarContainer({ global: true })
package/material.js CHANGED
@@ -5725,7 +5725,7 @@ class ButtonBase extends LitElement {
5725
5725
  @mouseleave="${this.handleRippleMouseLeave}"
5726
5726
  @touchstart="${this.handleRippleActivate}"
5727
5727
  @touchend="${this.handleRippleDeactivate}"
5728
- @touchcancel="${this.handleRippleDeactivate}">
5728
+ @touchcancel="${this.handleRippleDeactivate}">
5729
5729
  ${this.renderOverlay()}
5730
5730
  ${this.renderRipple()}
5731
5731
  <span class="leading-icon">
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": "github:saby-customizer/saby-customizer.github.io",
11
11
  "license": "Unlicense",
12
- "version": "0.0.0-pre.32",
12
+ "version": "0.0.0-pre.33",
13
13
  "type": "module",
14
14
  "main": "./userscript.js",
15
15
  "exports": {