@nyaruka/temba-components 0.102.1 → 0.103.0

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.
Files changed (111) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/demo/index.html +1 -1
  3. package/dist/temba-components.js +139 -35
  4. package/dist/temba-components.js.map +1 -1
  5. package/out-tsc/src/chat/Chat.js +1 -0
  6. package/out-tsc/src/chat/Chat.js.map +1 -1
  7. package/out-tsc/src/contacts/ContactChat.js +1 -1
  8. package/out-tsc/src/contacts/ContactChat.js.map +1 -1
  9. package/out-tsc/src/contacts/ContactFields.js +5 -0
  10. package/out-tsc/src/contacts/ContactFields.js.map +1 -1
  11. package/out-tsc/src/contacts/ContactNotepad.js +129 -0
  12. package/out-tsc/src/contacts/ContactNotepad.js.map +1 -0
  13. package/out-tsc/src/contacts/ContactPending.js +7 -2
  14. package/out-tsc/src/contacts/ContactPending.js.map +1 -1
  15. package/out-tsc/src/contacts/ContactStoreElement.js +11 -2
  16. package/out-tsc/src/contacts/ContactStoreElement.js.map +1 -1
  17. package/out-tsc/src/contacts/ContactTickets.js +7 -2
  18. package/out-tsc/src/contacts/ContactTickets.js.map +1 -1
  19. package/out-tsc/src/contacts/helpers.js +3 -0
  20. package/out-tsc/src/contacts/helpers.js.map +1 -1
  21. package/out-tsc/src/fields/FieldManager.js +2 -2
  22. package/out-tsc/src/fields/FieldManager.js.map +1 -1
  23. package/out-tsc/src/flow/FlowStoreElement.js +2 -2
  24. package/out-tsc/src/flow/FlowStoreElement.js.map +1 -1
  25. package/out-tsc/src/interfaces.js +1 -0
  26. package/out-tsc/src/interfaces.js.map +1 -1
  27. package/out-tsc/src/list/TembaMenu.js +11 -0
  28. package/out-tsc/src/list/TembaMenu.js.map +1 -1
  29. package/out-tsc/src/store/{StoreElement.js → EndpointMonitorElement.js} +5 -5
  30. package/out-tsc/src/store/EndpointMonitorElement.js.map +1 -0
  31. package/out-tsc/src/store/Store.js +22 -0
  32. package/out-tsc/src/store/Store.js.map +1 -1
  33. package/out-tsc/src/store/StoreMonitorElement.js +22 -0
  34. package/out-tsc/src/store/StoreMonitorElement.js.map +1 -1
  35. package/out-tsc/src/tabpane/Tab.js +33 -0
  36. package/out-tsc/src/tabpane/Tab.js.map +1 -1
  37. package/out-tsc/src/tabpane/TabPane.js +53 -15
  38. package/out-tsc/src/tabpane/TabPane.js.map +1 -1
  39. package/out-tsc/src/vectoricon/index.js +1 -0
  40. package/out-tsc/src/vectoricon/index.js.map +1 -1
  41. package/out-tsc/temba-modules.js +2 -0
  42. package/out-tsc/temba-modules.js.map +1 -1
  43. package/package.json +1 -1
  44. package/screenshots/truth/compose/attachments-and-send-button.png +0 -0
  45. package/screenshots/truth/compose/attachments-no-send-button.png +0 -0
  46. package/screenshots/truth/compose/attachments-with-all-files-and-click-send.png +0 -0
  47. package/screenshots/truth/compose/attachments-with-all-files.png +0 -0
  48. package/screenshots/truth/compose/attachments-with-failure-files.png +0 -0
  49. package/screenshots/truth/compose/attachments-with-success-files-and-click-send.png +0 -0
  50. package/screenshots/truth/compose/attachments-with-success-files.png +0 -0
  51. package/screenshots/truth/compose/chatbox-attachments-counter-and-send-button.png +0 -0
  52. package/screenshots/truth/compose/chatbox-attachments-counter-no-send-button.png +0 -0
  53. package/screenshots/truth/compose/chatbox-attachments-no-counter-and-send-button.png +0 -0
  54. package/screenshots/truth/compose/chatbox-attachments-no-counter-no-send-button.png +0 -0
  55. package/screenshots/truth/compose/chatbox-counter-and-send-button.png +0 -0
  56. package/screenshots/truth/compose/chatbox-counter-no-send-button.png +0 -0
  57. package/screenshots/truth/compose/chatbox-no-counter-and-send-button.png +0 -0
  58. package/screenshots/truth/compose/chatbox-no-counter-no-send-button.png +0 -0
  59. package/screenshots/truth/compose/chatbox-no-text-attachments-with-all-files-and-click-send.png +0 -0
  60. package/screenshots/truth/compose/chatbox-no-text-attachments-with-all-files.png +0 -0
  61. package/screenshots/truth/compose/chatbox-no-text-attachments-with-failure-files.png +0 -0
  62. package/screenshots/truth/compose/chatbox-no-text-attachments-with-success-files-and-click-send.png +0 -0
  63. package/screenshots/truth/compose/chatbox-no-text-attachments-with-success-files.png +0 -0
  64. package/screenshots/truth/compose/chatbox-with-text-and-click-send.png +0 -0
  65. package/screenshots/truth/compose/chatbox-with-text-and-hit-enter.png +0 -0
  66. package/screenshots/truth/compose/chatbox-with-text-and-spaces.png +0 -0
  67. package/screenshots/truth/compose/chatbox-with-text-and-url.png +0 -0
  68. package/screenshots/truth/compose/chatbox-with-text-attachments-no-files-and-click-send.png +0 -0
  69. package/screenshots/truth/compose/chatbox-with-text-attachments-no-files-and-hit-enter.png +0 -0
  70. package/screenshots/truth/compose/chatbox-with-text-attachments-no-files.png +0 -0
  71. package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files-and-click-send.png +0 -0
  72. package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files-and-hit-enter.png +0 -0
  73. package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files.png +0 -0
  74. package/screenshots/truth/compose/chatbox-with-text-attachments-with-failure-files.png +0 -0
  75. package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files-and-click-send.png +0 -0
  76. package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files-and-hit-enter.png +0 -0
  77. package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files.png +0 -0
  78. package/screenshots/truth/compose/chatbox-with-text-no-spaces.png +0 -0
  79. package/screenshots/truth/compose/chatbox-with-text.png +0 -0
  80. package/screenshots/truth/contacts/compose-attachments-no-text-failure.png +0 -0
  81. package/screenshots/truth/contacts/compose-attachments-no-text-success.png +0 -0
  82. package/screenshots/truth/contacts/compose-text-and-attachments-failure-attachments.png +0 -0
  83. package/screenshots/truth/contacts/compose-text-and-attachments-failure-generic.png +0 -0
  84. package/screenshots/truth/contacts/compose-text-and-attachments-failure-text-and-attachments.png +0 -0
  85. package/screenshots/truth/contacts/compose-text-and-attachments-failure-text.png +0 -0
  86. package/screenshots/truth/contacts/compose-text-and-attachments-success.png +0 -0
  87. package/screenshots/truth/contacts/compose-text-no-attachments-failure.png +0 -0
  88. package/screenshots/truth/contacts/compose-text-no-attachments-success.png +0 -0
  89. package/screenshots/truth/contacts/contact-active-default.png +0 -0
  90. package/screenshots/truth/contacts/contact-active-show-chatbox.png +0 -0
  91. package/src/chat/Chat.ts +1 -0
  92. package/src/contacts/ContactChat.ts +1 -2
  93. package/src/contacts/ContactFields.ts +7 -0
  94. package/src/contacts/ContactNotepad.ts +133 -0
  95. package/src/contacts/ContactPending.ts +8 -2
  96. package/src/contacts/ContactStoreElement.ts +12 -2
  97. package/src/contacts/ContactTickets.ts +9 -2
  98. package/src/contacts/helpers.ts +5 -1
  99. package/src/fields/FieldManager.ts +2 -2
  100. package/src/flow/FlowStoreElement.ts +2 -2
  101. package/src/interfaces.ts +13 -1
  102. package/src/list/TembaMenu.ts +13 -0
  103. package/src/store/{StoreElement.ts → EndpointMonitorElement.ts} +1 -4
  104. package/src/store/Store.ts +31 -0
  105. package/src/store/StoreMonitorElement.ts +24 -0
  106. package/src/tabpane/Tab.ts +29 -0
  107. package/src/tabpane/TabPane.ts +54 -15
  108. package/src/vectoricon/index.ts +1 -0
  109. package/temba-modules.ts +2 -0
  110. package/out-tsc/src/store/StoreElement.js.map +0 -1
  111. package/screenshots/truth/contacts/history.png +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"StoreElement.js","sourceRoot":"","sources":["../../../src/store/StoreElement.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,mBAAmB;IAArD;;QAKE,gBAAW,GAAG,KAAK,CAAC;IA8CtB,CAAC;IAvCC,WAAW,CAAC,IAAS;QACn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I,EAAE,OAAO,EAAE,CAAC;iDACR;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;0CACnC","sourcesContent":["import { PropertyValueMap } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { CustomEventType } from '../interfaces';\n\nimport { Store } from './Store';\nimport { StoreMonitorElement } from './StoreMonitorElement';\n\n/**\n * StoreElement is a listener for a given endpoint that re-renders\n * when the underlying store element changes\n */\nexport class StoreElement extends StoreMonitorElement {\n @property({ type: String })\n url: string;\n\n @property({ type: Boolean })\n showLoading = false;\n\n @property({ type: Object, attribute: false })\n data: any;\n\n store: Store;\n\n prepareData(data: any): any {\n return data;\n }\n\n public refresh() {\n this.store.makeRequest(this.url, {\n prepareData: this.prepareData,\n force: true\n });\n }\n\n protected storeUpdated(event: CustomEvent) {\n if (event.detail.url === this.url) {\n const previous = this.data;\n this.data = event.detail.data;\n this.fireCustomEvent(CustomEventType.Refreshed, {\n data: event.detail.data,\n previous\n });\n }\n }\n\n protected updated(\n properties: PropertyValueMap<any> | Map<PropertyKey, unknown>\n ): void {\n super.updated(properties);\n if (properties.has('url')) {\n if (this.url) {\n this.store.makeRequest(this.url, { prepareData: this.prepareData });\n } else {\n this.data = null;\n }\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.prepareData = this.prepareData.bind(this);\n }\n}\n"]}