attribute_view.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. // SiYuan - Refactor your thinking
  2. // Copyright (c) 2020-present, b3log.org
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Affero General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU Affero General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Affero General Public License
  15. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. package model
  17. import (
  18. "errors"
  19. "fmt"
  20. "strings"
  21. "github.com/88250/gulu"
  22. "github.com/88250/lute/ast"
  23. "github.com/88250/lute/parse"
  24. "github.com/jinzhu/copier"
  25. "github.com/siyuan-note/logging"
  26. "github.com/siyuan-note/siyuan/kernel/av"
  27. "github.com/siyuan-note/siyuan/kernel/sql"
  28. "github.com/siyuan-note/siyuan/kernel/treenode"
  29. "github.com/siyuan-note/siyuan/kernel/util"
  30. )
  31. func RenderAttributeView(avID string) (ret *av.AttributeView, err error) {
  32. waitForSyncingStorages()
  33. ret, err = av.ParseAttributeView(avID)
  34. if nil != err {
  35. logging.LogErrorf("parse attribute view [%s] failed: %s", avID, err)
  36. return
  37. }
  38. ret.FilterRows()
  39. ret.SortRows()
  40. ret.CalcCols()
  41. return
  42. }
  43. func (tx *Transaction) doUpdateAttrViewCell(operation *Operation) (ret *TxErr) {
  44. avID := operation.ParentID
  45. view, err := av.ParseAttributeView(avID)
  46. if nil != err {
  47. logging.LogErrorf("parse attribute view [%s] failed: %s", avID, err)
  48. return &TxErr{code: TxErrCodeBlockNotFound, id: avID, msg: err.Error()}
  49. }
  50. var c *av.Cell
  51. var blockID string
  52. for _, row := range view.Rows {
  53. if row.ID != operation.RowID {
  54. continue
  55. }
  56. blockCell := row.GetBlockCell()
  57. if nil == blockCell {
  58. continue
  59. }
  60. blockID = blockCell.Value.Block.ID
  61. for _, cell := range row.Cells {
  62. if cell.ID == operation.ID {
  63. c = cell
  64. break
  65. }
  66. }
  67. break
  68. }
  69. if nil == c {
  70. return
  71. }
  72. tree, err := tx.loadTree(blockID)
  73. if nil != err {
  74. return
  75. }
  76. node := treenode.GetNodeInTree(tree, blockID)
  77. if nil == node {
  78. return
  79. }
  80. data, err := gulu.JSON.MarshalJSON(operation.Data)
  81. if nil != err {
  82. return
  83. }
  84. if err = gulu.JSON.UnmarshalJSON(data, &c.Value); nil != err {
  85. return
  86. }
  87. attrs := parse.IAL2Map(node.KramdownIAL)
  88. attrs[NodeAttrNamePrefixAvCol+avID+"-"+c.ID] = c.Value.ToJSONString()
  89. if err = setNodeAttrsWithTx(tx, node, tree, attrs); nil != err {
  90. return
  91. }
  92. if err = av.SaveAttributeView(view); nil != err {
  93. return
  94. }
  95. sql.RebuildAttributeViewQueue(view)
  96. return
  97. }
  98. func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr) {
  99. firstSrcID := operation.SrcIDs[0]
  100. tree, err := tx.loadTree(firstSrcID)
  101. if nil != err {
  102. logging.LogErrorf("load tree [%s] failed: %s", firstSrcID, err)
  103. return &TxErr{code: TxErrCodeBlockNotFound, id: firstSrcID, msg: err.Error()}
  104. }
  105. avID := operation.ParentID
  106. var avs []*av.AttributeView
  107. previousID := operation.PreviousID
  108. for _, id := range operation.SrcIDs {
  109. var av *av.AttributeView
  110. var avErr error
  111. if av, avErr = addAttributeViewBlock(id, previousID, avID, tree, tx); nil != avErr {
  112. return &TxErr{code: TxErrWriteAttributeView, id: avID, msg: avErr.Error()}
  113. }
  114. if nil == av {
  115. continue
  116. }
  117. avs = append(avs, av)
  118. }
  119. for _, av := range avs {
  120. sql.RebuildAttributeViewQueue(av)
  121. }
  122. return
  123. }
  124. func (tx *Transaction) doRemoveAttrViewBlock(operation *Operation) (ret *TxErr) {
  125. var avs []*av.AttributeView
  126. avID := operation.ParentID
  127. for _, id := range operation.SrcIDs {
  128. var av *av.AttributeView
  129. var avErr error
  130. if av, avErr = removeAttributeViewBlock(id, avID); nil != avErr {
  131. return &TxErr{code: TxErrWriteAttributeView, id: avID}
  132. }
  133. if nil == av {
  134. continue
  135. }
  136. avs = append(avs, av)
  137. }
  138. for _, av := range avs {
  139. sql.RebuildAttributeViewQueue(av)
  140. }
  141. return
  142. }
  143. func (tx *Transaction) doUpdateAttrViewColOption(operation *Operation) (ret *TxErr) {
  144. err := updateAttributeViewColumnOption(operation)
  145. if nil != err {
  146. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  147. }
  148. return
  149. }
  150. func (tx *Transaction) doRemoveAttrViewColOption(operation *Operation) (ret *TxErr) {
  151. err := removeAttributeViewColumnOption(operation)
  152. if nil != err {
  153. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  154. }
  155. return
  156. }
  157. func (tx *Transaction) doUpdateAttrViewColOptions(operation *Operation) (ret *TxErr) {
  158. err := updateAttributeViewColumnOptions(operation.Data, operation.ID, operation.ParentID)
  159. if nil != err {
  160. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  161. }
  162. return
  163. }
  164. func (tx *Transaction) doAddAttrViewColumn(operation *Operation) (ret *TxErr) {
  165. err := addAttributeViewColumn(operation.Name, operation.Typ, operation.ParentID)
  166. if nil != err {
  167. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  168. }
  169. return
  170. }
  171. func (tx *Transaction) doUpdateAttrViewColumn(operation *Operation) (ret *TxErr) {
  172. err := updateAttributeViewColumn(operation.ID, operation.Name, operation.Typ, operation.ParentID)
  173. if nil != err {
  174. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  175. }
  176. return
  177. }
  178. func (tx *Transaction) doRemoveAttrViewColumn(operation *Operation) (ret *TxErr) {
  179. err := removeAttributeViewColumn(operation.ID, operation.ParentID)
  180. if nil != err {
  181. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  182. }
  183. return
  184. }
  185. func (tx *Transaction) doSortAttrViewColumn(operation *Operation) (ret *TxErr) {
  186. err := sortAttributeViewColumn(operation.ID, operation.PreviousID, operation.ParentID)
  187. if nil != err {
  188. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  189. }
  190. return
  191. }
  192. func (tx *Transaction) doSortAttrViewRow(operation *Operation) (ret *TxErr) {
  193. err := sortAttributeViewRow(operation.ID, operation.PreviousID, operation.ParentID)
  194. if nil != err {
  195. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  196. }
  197. return
  198. }
  199. func (tx *Transaction) doSetAttrViewColumnHidden(operation *Operation) (ret *TxErr) {
  200. err := setAttributeViewColHidden(operation.Data.(bool), operation.ID, operation.ParentID)
  201. if nil != err {
  202. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  203. }
  204. return
  205. }
  206. func (tx *Transaction) doSetAttrViewColumnWrap(operation *Operation) (ret *TxErr) {
  207. err := setAttributeViewColWrap(operation.Data.(bool), operation.ID, operation.ParentID)
  208. if nil != err {
  209. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  210. }
  211. return
  212. }
  213. func (tx *Transaction) doSetAttrViewColumnWidth(operation *Operation) (ret *TxErr) {
  214. err := setAttributeViewColWidth(operation.Data.(string), operation.ID, operation.ParentID)
  215. if nil != err {
  216. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  217. }
  218. return
  219. }
  220. func (tx *Transaction) doSetAttrView(operation *Operation) (ret *TxErr) {
  221. err := setAttributeView(operation)
  222. if nil != err {
  223. return &TxErr{code: TxErrWriteAttributeView, id: operation.ParentID, msg: err.Error()}
  224. }
  225. return
  226. }
  227. func addAttributeViewColumn(name string, typ string, avID string) (err error) {
  228. attrView, err := av.ParseAttributeView(avID)
  229. if nil != err {
  230. return
  231. }
  232. colType := av.ColumnType(typ)
  233. switch colType {
  234. case av.ColumnTypeText, av.ColumnTypeNumber, av.ColumnTypeDate, av.ColumnTypeSelect, av.ColumnTypeMSelect:
  235. col := &av.Column{ID: ast.NewNodeID(), Name: name, Type: colType}
  236. attrView.Columns = append(attrView.Columns, col)
  237. for _, row := range attrView.Rows {
  238. row.Cells = append(row.Cells, av.NewCell(colType))
  239. }
  240. default:
  241. msg := fmt.Sprintf("invalid column type [%s]", typ)
  242. logging.LogErrorf(msg)
  243. err = errors.New(msg)
  244. return
  245. }
  246. err = av.SaveAttributeView(attrView)
  247. return
  248. }
  249. func updateAttributeViewColumn(id, name string, typ string, avID string) (err error) {
  250. attrView, err := av.ParseAttributeView(avID)
  251. if nil != err {
  252. return
  253. }
  254. colType := av.ColumnType(typ)
  255. switch colType {
  256. case av.ColumnTypeText, av.ColumnTypeNumber, av.ColumnTypeDate, av.ColumnTypeSelect, av.ColumnTypeMSelect:
  257. for _, col := range attrView.Columns {
  258. if col.ID == id {
  259. col.Name = name
  260. col.Type = colType
  261. break
  262. }
  263. }
  264. default:
  265. msg := fmt.Sprintf("invalid column type [%s]", typ)
  266. logging.LogErrorf(msg)
  267. err = errors.New(msg)
  268. return
  269. }
  270. err = av.SaveAttributeView(attrView)
  271. return
  272. }
  273. func updateAttributeViewColumnOption(operation *Operation) (err error) {
  274. avID := operation.ParentID
  275. attrView, err := av.ParseAttributeView(avID)
  276. if nil != err {
  277. return
  278. }
  279. colID := operation.ID
  280. data := operation.Data.(map[string]interface{})
  281. oldName := data["oldName"].(string)
  282. newName := data["newName"].(string)
  283. newColor := data["newColor"].(string)
  284. var colIndex int
  285. for i, col := range attrView.Columns {
  286. if col.ID != colID {
  287. continue
  288. }
  289. colIndex = i
  290. for _, opt := range col.Options {
  291. if opt.Name != oldName {
  292. continue
  293. }
  294. opt.Name = newName
  295. opt.Color = newColor
  296. break
  297. }
  298. break
  299. }
  300. for _, row := range attrView.Rows {
  301. for k, cell := range row.Cells {
  302. if colIndex != k || nil == cell.Value {
  303. continue
  304. }
  305. if nil != cell.Value.Select {
  306. if oldName == cell.Value.Select.Content {
  307. cell.Value.Select.Content = newName
  308. cell.Value.Select.Color = newColor
  309. break
  310. }
  311. } else if nil != cell.Value.MSelect {
  312. for j, opt := range cell.Value.MSelect {
  313. if oldName == opt.Content {
  314. cell.Value.MSelect[j].Content = newName
  315. cell.Value.MSelect[j].Color = newColor
  316. break
  317. }
  318. }
  319. }
  320. break
  321. }
  322. }
  323. err = av.SaveAttributeView(attrView)
  324. return
  325. }
  326. func removeAttributeViewColumnOption(operation *Operation) (err error) {
  327. avID := operation.ParentID
  328. attrView, err := av.ParseAttributeView(avID)
  329. if nil != err {
  330. return
  331. }
  332. colID := operation.ID
  333. optName := operation.Data.(string)
  334. var colIndex int
  335. for i, col := range attrView.Columns {
  336. if col.ID != colID {
  337. continue
  338. }
  339. colIndex = i
  340. for j, opt := range col.Options {
  341. if opt.Name != optName {
  342. continue
  343. }
  344. col.Options = append(col.Options[:j], col.Options[j+1:]...)
  345. break
  346. }
  347. break
  348. }
  349. for _, row := range attrView.Rows {
  350. for i, cell := range row.Cells {
  351. if colIndex != i {
  352. continue
  353. }
  354. if nil != cell.Value {
  355. if nil != cell.Value.Select {
  356. if optName == cell.Value.Select.Content {
  357. cell.Value = nil
  358. break
  359. }
  360. } else if nil != cell.Value.MSelect {
  361. for j, opt := range cell.Value.MSelect {
  362. if optName == opt.Content {
  363. cell.Value.MSelect = append(cell.Value.MSelect[:j], cell.Value.MSelect[j+1:]...)
  364. break
  365. }
  366. }
  367. }
  368. }
  369. break
  370. }
  371. }
  372. err = av.SaveAttributeView(attrView)
  373. return
  374. }
  375. func updateAttributeViewColumnOptions(data interface{}, id, avID string) (err error) {
  376. attrView, err := av.ParseAttributeView(avID)
  377. if nil != err {
  378. return
  379. }
  380. jsonData, err := gulu.JSON.MarshalJSON(data)
  381. if nil != err {
  382. return
  383. }
  384. options := []*av.ColumnSelectOption{}
  385. if err = gulu.JSON.UnmarshalJSON(jsonData, &options); nil != err {
  386. return
  387. }
  388. for _, col := range attrView.Columns {
  389. if col.ID == id {
  390. col.Options = options
  391. err = av.SaveAttributeView(attrView)
  392. return
  393. }
  394. }
  395. return
  396. }
  397. func removeAttributeViewColumn(columnID string, avID string) (err error) {
  398. attrView, err := av.ParseAttributeView(avID)
  399. if nil != err {
  400. return
  401. }
  402. for i, column := range attrView.Columns {
  403. if column.ID == columnID {
  404. attrView.Columns = append(attrView.Columns[:i], attrView.Columns[i+1:]...)
  405. for _, row := range attrView.Rows {
  406. if len(row.Cells) <= i {
  407. continue
  408. }
  409. row.Cells = append(row.Cells[:i], row.Cells[i+1:]...)
  410. }
  411. break
  412. }
  413. }
  414. err = av.SaveAttributeView(attrView)
  415. return
  416. }
  417. func sortAttributeViewColumn(columnID, previousColumnID, avID string) (err error) {
  418. attrView, err := av.ParseAttributeView(avID)
  419. if nil != err {
  420. return
  421. }
  422. var col *av.Column
  423. var index, previousIndex int
  424. for i, column := range attrView.Columns {
  425. if column.ID == columnID {
  426. col = column
  427. index = i
  428. break
  429. }
  430. }
  431. if nil == col {
  432. return
  433. }
  434. attrView.Columns = append(attrView.Columns[:index], attrView.Columns[index+1:]...)
  435. for i, column := range attrView.Columns {
  436. if column.ID == previousColumnID {
  437. previousIndex = i + 1
  438. break
  439. }
  440. }
  441. attrView.Columns = util.InsertElem(attrView.Columns, previousIndex, col)
  442. for _, row := range attrView.Rows {
  443. cel := row.Cells[index]
  444. row.Cells = append(row.Cells[:index], row.Cells[index+1:]...)
  445. row.Cells = util.InsertElem(row.Cells, previousIndex, cel)
  446. }
  447. err = av.SaveAttributeView(attrView)
  448. return
  449. }
  450. func sortAttributeViewRow(rowID, previousRowID, avID string) (err error) {
  451. attrView, err := av.ParseAttributeView(avID)
  452. if nil != err {
  453. return
  454. }
  455. var row *av.Row
  456. var index, previousIndex int
  457. for i, r := range attrView.Rows {
  458. if r.ID == rowID {
  459. row = r
  460. index = i
  461. break
  462. }
  463. }
  464. if nil == row {
  465. return
  466. }
  467. attrView.Rows = append(attrView.Rows[:index], attrView.Rows[index+1:]...)
  468. for i, r := range attrView.Rows {
  469. if r.ID == previousRowID {
  470. previousIndex = i + 1
  471. break
  472. }
  473. }
  474. attrView.Rows = util.InsertElem(attrView.Rows, previousIndex, row)
  475. err = av.SaveAttributeView(attrView)
  476. return
  477. }
  478. func setAttributeViewColHidden(hidden bool, columnID, avID string) (err error) {
  479. attrView, err := av.ParseAttributeView(avID)
  480. if nil != err {
  481. return
  482. }
  483. for _, column := range attrView.Columns {
  484. if column.ID == columnID {
  485. column.Hidden = hidden
  486. break
  487. }
  488. }
  489. err = av.SaveAttributeView(attrView)
  490. return
  491. }
  492. func setAttributeViewColWrap(wrap bool, columnID, avID string) (err error) {
  493. attrView, err := av.ParseAttributeView(avID)
  494. if nil != err {
  495. return
  496. }
  497. for _, column := range attrView.Columns {
  498. if column.ID == columnID {
  499. column.Wrap = wrap
  500. break
  501. }
  502. }
  503. err = av.SaveAttributeView(attrView)
  504. return
  505. }
  506. func setAttributeViewColWidth(width, columnID, avID string) (err error) {
  507. attrView, err := av.ParseAttributeView(avID)
  508. if nil != err {
  509. return
  510. }
  511. for _, column := range attrView.Columns {
  512. if column.ID == columnID {
  513. column.Width = width
  514. break
  515. }
  516. }
  517. err = av.SaveAttributeView(attrView)
  518. return
  519. }
  520. func setAttributeView(operation *Operation) (err error) {
  521. avID := operation.ID
  522. attrViewMap, err := av.ParseAttributeViewMap(avID)
  523. if nil != err {
  524. return
  525. }
  526. operationData := operation.Data.(map[string]interface{})
  527. if err = copier.Copy(&attrViewMap, operationData); nil != err {
  528. return
  529. }
  530. data, err := gulu.JSON.MarshalJSON(attrViewMap)
  531. if nil != err {
  532. return
  533. }
  534. attrView := &av.AttributeView{}
  535. if err = gulu.JSON.UnmarshalJSON(data, attrView); nil != err {
  536. return
  537. }
  538. err = av.SaveAttributeView(attrView)
  539. return
  540. }
  541. func removeAttributeViewBlock(blockID, avID string) (ret *av.AttributeView, err error) {
  542. ret, err = av.ParseAttributeView(avID)
  543. if nil != err {
  544. return
  545. }
  546. for i, row := range ret.Rows {
  547. blockCell := row.GetBlockCell()
  548. if nil == blockCell {
  549. continue
  550. }
  551. if blockCell.Value.Block.ID == blockID {
  552. // 从行中移除,但是不移除属性
  553. ret.Rows = append(ret.Rows[:i], ret.Rows[i+1:]...)
  554. break
  555. }
  556. }
  557. err = av.SaveAttributeView(ret)
  558. return
  559. }
  560. func addAttributeViewBlock(blockID, previousRowID, avID string, tree *parse.Tree, tx *Transaction) (ret *av.AttributeView, err error) {
  561. node := treenode.GetNodeInTree(tree, blockID)
  562. if nil == node {
  563. err = ErrBlockNotFound
  564. return
  565. }
  566. if ast.NodeAttributeView == node.Type {
  567. // 不能将一个属性视图拖拽到另一个属性视图中
  568. return
  569. }
  570. block := sql.BuildBlockFromNode(node, tree)
  571. if nil == block {
  572. err = ErrBlockNotFound
  573. return
  574. }
  575. ret, err = av.ParseAttributeView(avID)
  576. if nil != err {
  577. return
  578. }
  579. // 不允许重复添加相同的块到属性视图中
  580. for _, row := range ret.Rows {
  581. blockCell := row.GetBlockCell()
  582. if nil == blockCell {
  583. continue
  584. }
  585. if blockCell.Value.Block.ID == blockID {
  586. return
  587. }
  588. }
  589. row := av.NewRow()
  590. attrs := parse.IAL2Map(node.KramdownIAL)
  591. for _, col := range ret.Columns {
  592. if av.ColumnTypeBlock != col.Type {
  593. attrs[NodeAttrNamePrefixAvCol+avID+"-"+col.ID] = "" // 将列作为属性添加到块中
  594. row.Cells = append(row.Cells, av.NewCell(col.Type))
  595. } else {
  596. row.Cells = append(row.Cells, av.NewCellBlock(blockID, getNodeRefText(node)))
  597. }
  598. }
  599. if "" == attrs[NodeAttrNameAVs] {
  600. attrs[NodeAttrNameAVs] = avID
  601. } else {
  602. avIDs := strings.Split(attrs[NodeAttrNameAVs], ",")
  603. avIDs = append(avIDs, avID)
  604. avIDs = gulu.Str.RemoveDuplicatedElem(avIDs)
  605. attrs[NodeAttrNameAVs] = strings.Join(avIDs, ",")
  606. }
  607. if err = setNodeAttrsWithTx(tx, node, tree, attrs); nil != err {
  608. return
  609. }
  610. if "" == previousRowID {
  611. ret.Rows = append([]*av.Row{row}, ret.Rows...)
  612. } else {
  613. for i, r := range ret.Rows {
  614. if r.ID == previousRowID {
  615. ret.Rows = append(ret.Rows[:i+1], append([]*av.Row{row}, ret.Rows[i+1:]...)...)
  616. break
  617. }
  618. }
  619. }
  620. err = av.SaveAttributeView(ret)
  621. return
  622. }
  623. const (
  624. NodeAttrNameAVs = "custom-avs"
  625. NodeAttrNamePrefixAvCol = "custom-av-col-"
  626. )