@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.
- package/CHANGELOG.md +15 -0
- package/demo/index.html +1 -1
- package/dist/temba-components.js +139 -35
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/chat/Chat.js +1 -0
- package/out-tsc/src/chat/Chat.js.map +1 -1
- package/out-tsc/src/contacts/ContactChat.js +1 -1
- package/out-tsc/src/contacts/ContactChat.js.map +1 -1
- package/out-tsc/src/contacts/ContactFields.js +5 -0
- package/out-tsc/src/contacts/ContactFields.js.map +1 -1
- package/out-tsc/src/contacts/ContactNotepad.js +129 -0
- package/out-tsc/src/contacts/ContactNotepad.js.map +1 -0
- package/out-tsc/src/contacts/ContactPending.js +7 -2
- package/out-tsc/src/contacts/ContactPending.js.map +1 -1
- package/out-tsc/src/contacts/ContactStoreElement.js +11 -2
- package/out-tsc/src/contacts/ContactStoreElement.js.map +1 -1
- package/out-tsc/src/contacts/ContactTickets.js +7 -2
- package/out-tsc/src/contacts/ContactTickets.js.map +1 -1
- package/out-tsc/src/contacts/helpers.js +3 -0
- package/out-tsc/src/contacts/helpers.js.map +1 -1
- package/out-tsc/src/fields/FieldManager.js +2 -2
- package/out-tsc/src/fields/FieldManager.js.map +1 -1
- package/out-tsc/src/flow/FlowStoreElement.js +2 -2
- package/out-tsc/src/flow/FlowStoreElement.js.map +1 -1
- package/out-tsc/src/interfaces.js +1 -0
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/list/TembaMenu.js +11 -0
- package/out-tsc/src/list/TembaMenu.js.map +1 -1
- package/out-tsc/src/store/{StoreElement.js → EndpointMonitorElement.js} +5 -5
- package/out-tsc/src/store/EndpointMonitorElement.js.map +1 -0
- package/out-tsc/src/store/Store.js +22 -0
- package/out-tsc/src/store/Store.js.map +1 -1
- package/out-tsc/src/store/StoreMonitorElement.js +22 -0
- package/out-tsc/src/store/StoreMonitorElement.js.map +1 -1
- package/out-tsc/src/tabpane/Tab.js +33 -0
- package/out-tsc/src/tabpane/Tab.js.map +1 -1
- package/out-tsc/src/tabpane/TabPane.js +53 -15
- package/out-tsc/src/tabpane/TabPane.js.map +1 -1
- package/out-tsc/src/vectoricon/index.js +1 -0
- package/out-tsc/src/vectoricon/index.js.map +1 -1
- package/out-tsc/temba-modules.js +2 -0
- package/out-tsc/temba-modules.js.map +1 -1
- package/package.json +1 -1
- package/screenshots/truth/compose/attachments-and-send-button.png +0 -0
- package/screenshots/truth/compose/attachments-no-send-button.png +0 -0
- package/screenshots/truth/compose/attachments-with-all-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/attachments-with-all-files.png +0 -0
- package/screenshots/truth/compose/attachments-with-failure-files.png +0 -0
- package/screenshots/truth/compose/attachments-with-success-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/attachments-with-success-files.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-no-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-attachments-no-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-no-counter-and-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-no-counter-no-send-button.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-all-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-all-files.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-failure-files.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-success-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-no-text-attachments-with-success-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-spaces.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-and-url.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-no-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-no-files-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-no-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-all-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-failure-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files-and-click-send.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files-and-hit-enter.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-attachments-with-success-files.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text-no-spaces.png +0 -0
- package/screenshots/truth/compose/chatbox-with-text.png +0 -0
- package/screenshots/truth/contacts/compose-attachments-no-text-failure.png +0 -0
- package/screenshots/truth/contacts/compose-attachments-no-text-success.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-attachments.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-generic.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-text-and-attachments.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-text.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-success.png +0 -0
- package/screenshots/truth/contacts/compose-text-no-attachments-failure.png +0 -0
- package/screenshots/truth/contacts/compose-text-no-attachments-success.png +0 -0
- package/screenshots/truth/contacts/contact-active-default.png +0 -0
- package/screenshots/truth/contacts/contact-active-show-chatbox.png +0 -0
- package/src/chat/Chat.ts +1 -0
- package/src/contacts/ContactChat.ts +1 -2
- package/src/contacts/ContactFields.ts +7 -0
- package/src/contacts/ContactNotepad.ts +133 -0
- package/src/contacts/ContactPending.ts +8 -2
- package/src/contacts/ContactStoreElement.ts +12 -2
- package/src/contacts/ContactTickets.ts +9 -2
- package/src/contacts/helpers.ts +5 -1
- package/src/fields/FieldManager.ts +2 -2
- package/src/flow/FlowStoreElement.ts +2 -2
- package/src/interfaces.ts +13 -1
- package/src/list/TembaMenu.ts +13 -0
- package/src/store/{StoreElement.ts → EndpointMonitorElement.ts} +1 -4
- package/src/store/Store.ts +31 -0
- package/src/store/StoreMonitorElement.ts +24 -0
- package/src/tabpane/Tab.ts +29 -0
- package/src/tabpane/TabPane.ts +54 -15
- package/src/vectoricon/index.ts +1 -0
- package/temba-modules.ts +2 -0
- package/out-tsc/src/store/StoreElement.js.map +0 -1
- 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;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;IAES,YAAY,CAAC,KAAkB;QACvC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC;YAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;YAC3B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,SAAS,EAAE;gBAC9C,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;gBACvB,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAES,OAAO,CACf,UAA6D;QAE7D,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC1B,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;gBACb,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YACtE,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;CACF;AAjDC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACf;AAGZ;IADC,QAAQ,CAAC,EAAE,IAAI,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"]}
|
|
Binary file
|