zignal-stencil-library 1.1.161 → 1.1.162
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/dist/cjs/autocomplete-address_49.cjs.entry.js +196 -84
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/quick-message-app.cjs.entry.js +1 -1
- package/dist/cjs/zignal-stencil-library.cjs.js +1 -1
- package/dist/collection/components/autocomplete-address/autocomplete-address.css +1 -1
- package/dist/collection/components/autocomplete-multiple-select/autocomplete-multiple-select.css +1 -1
- package/dist/collection/components/autocomplete-select/autocomplete-select.css +1 -1
- package/dist/collection/components/channel-box/channel-box.css +1 -1
- package/dist/collection/components/chat-app/chat-app.css +1 -1
- package/dist/collection/components/chat-header/chat-header.css +1 -1
- package/dist/collection/components/chat-input/chat-input.css +1 -1
- package/dist/collection/components/checkbox-list/checkbox-list.css +1 -1
- package/dist/collection/components/dialog-bill-editor/dialog-bill-editor.css +1 -1
- package/dist/collection/components/dialog-custom-filter/dialog-custom-filter.css +1 -1
- package/dist/collection/components/dialog-editor/dialog-editor.css +1 -1
- package/dist/collection/components/dialog-preview-media/dialog-preview-media.css +1 -1
- package/dist/collection/components/dialog-search/dialog-search.css +1 -1
- package/dist/collection/components/master-status-app/master-status-app.css +1 -1
- package/dist/collection/components/master-status-app/master-status-app.js +79 -21
- package/dist/collection/components/master-status-app/master-status-app.js.map +1 -1
- package/dist/collection/components/master-tag-app/master-tag-app.css +1 -1
- package/dist/collection/components/master-tag-app/master-tag-app.js +79 -21
- package/dist/collection/components/master-tag-app/master-tag-app.js.map +1 -1
- package/dist/collection/components/menu-chat-channel/menu-chat-channel.css +1 -1
- package/dist/collection/components/menu-chat-type/menu-chat-type.css +1 -1
- package/dist/collection/components/menu-list/menu-list.css +1 -1
- package/dist/collection/components/message-box/message-box.css +1 -1
- package/dist/collection/components/message-content/message-content.css +1 -1
- package/dist/collection/components/message-item/message-item.css +1 -1
- package/dist/collection/components/message-media/message-media.css +1 -1
- package/dist/collection/components/profile-history/profile-history.css +1 -1
- package/dist/collection/components/profile-info/profile-info.css +1 -1
- package/dist/collection/components/profile-media/profile-media.css +1 -1
- package/dist/collection/components/profile-tabs/profile-tabs.css +1 -1
- package/dist/collection/components/quick-message-add-template/quick-message-add-template.css +1 -1
- package/dist/collection/components/quick-message-app/quick-message-app.css +1 -1
- package/dist/collection/components/quick-message-file/quick-message-file.css +1 -1
- package/dist/collection/components/quick-message-image/quick-message-image.css +1 -1
- package/dist/collection/components/quick-message-modal/quick-message-modal.css +1 -1
- package/dist/collection/components/quick-message-template/quick-message-template.css +1 -1
- package/dist/collection/components/search-box/search-box.css +1 -1
- package/dist/collection/components/status-badge/status-badge.css +1 -1
- package/dist/collection/components/tag-list/tag-list.css +1 -1
- package/dist/collection/components/tag-or-status-item/tag-or-status-item.css +1 -1
- package/dist/collection/components/tag-popper/tag-popper.css +1 -1
- package/dist/collection/components/typography-clamp/typography-clamp.css +1 -1
- package/dist/collection/components/z-avatar/z-avatar.css +1 -1
- package/dist/collection/components/z-dialog/z-dialog.css +1 -1
- package/dist/collection/components/z-tooltip/z-tooltip.css +1 -1
- package/dist/components/autocomplete-address2.js +1 -1
- package/dist/components/autocomplete-address2.js.map +1 -1
- package/dist/components/autocomplete-multiple-select2.js +1 -1
- package/dist/components/autocomplete-multiple-select2.js.map +1 -1
- package/dist/components/autocomplete-select2.js +1 -1
- package/dist/components/autocomplete-select2.js.map +1 -1
- package/dist/components/channel-box2.js +1 -1
- package/dist/components/channel-box2.js.map +1 -1
- package/dist/components/chat-app.js +1 -1
- package/dist/components/chat-app.js.map +1 -1
- package/dist/components/chat-header2.js +1 -1
- package/dist/components/chat-header2.js.map +1 -1
- package/dist/components/chat-input2.js +1 -1
- package/dist/components/chat-input2.js.map +1 -1
- package/dist/components/checkbox-list2.js +1 -1
- package/dist/components/checkbox-list2.js.map +1 -1
- package/dist/components/dialog-bill-editor2.js +1 -1
- package/dist/components/dialog-bill-editor2.js.map +1 -1
- package/dist/components/dialog-custom-filter2.js +1 -1
- package/dist/components/dialog-custom-filter2.js.map +1 -1
- package/dist/components/dialog-editor2.js +1 -1
- package/dist/components/dialog-editor2.js.map +1 -1
- package/dist/components/dialog-preview-media2.js +1 -1
- package/dist/components/dialog-preview-media2.js.map +1 -1
- package/dist/components/dialog-search2.js +1 -1
- package/dist/components/dialog-search2.js.map +1 -1
- package/dist/components/master-status-app.js +87 -29
- package/dist/components/master-status-app.js.map +1 -1
- package/dist/components/master-tag-app.js +87 -29
- package/dist/components/master-tag-app.js.map +1 -1
- package/dist/components/menu-chat-channel2.js +1 -1
- package/dist/components/menu-chat-channel2.js.map +1 -1
- package/dist/components/menu-chat-type2.js +1 -1
- package/dist/components/menu-chat-type2.js.map +1 -1
- package/dist/components/menu-list2.js +1 -1
- package/dist/components/menu-list2.js.map +1 -1
- package/dist/components/message-box2.js +1 -1
- package/dist/components/message-box2.js.map +1 -1
- package/dist/components/message-content2.js +1 -1
- package/dist/components/message-content2.js.map +1 -1
- package/dist/components/message-item2.js +1 -1
- package/dist/components/message-item2.js.map +1 -1
- package/dist/components/message-media2.js +1 -1
- package/dist/components/message-media2.js.map +1 -1
- package/dist/components/profile-history2.js +1 -1
- package/dist/components/profile-history2.js.map +1 -1
- package/dist/components/profile-info2.js +1 -1
- package/dist/components/profile-info2.js.map +1 -1
- package/dist/components/profile-media2.js +1 -1
- package/dist/components/profile-media2.js.map +1 -1
- package/dist/components/profile-tabs2.js +1 -1
- package/dist/components/profile-tabs2.js.map +1 -1
- package/dist/components/quick-message-add-template2.js +1 -1
- package/dist/components/quick-message-add-template2.js.map +1 -1
- package/dist/components/quick-message-app.js +1 -1
- package/dist/components/quick-message-file2.js +1 -1
- package/dist/components/quick-message-file2.js.map +1 -1
- package/dist/components/quick-message-image2.js +1 -1
- package/dist/components/quick-message-image2.js.map +1 -1
- package/dist/components/quick-message-modal2.js +1 -1
- package/dist/components/quick-message-modal2.js.map +1 -1
- package/dist/components/quick-message-template2.js +1 -1
- package/dist/components/quick-message-template2.js.map +1 -1
- package/dist/components/search-box2.js +1 -1
- package/dist/components/search-box2.js.map +1 -1
- package/dist/components/status-badge2.js +1 -1
- package/dist/components/status-badge2.js.map +1 -1
- package/dist/components/summarize-message-section2.js +1 -1
- package/dist/components/summarize-message-section2.js.map +1 -1
- package/dist/components/tag-list2.js +1 -1
- package/dist/components/tag-list2.js.map +1 -1
- package/dist/components/tag-or-status-item2.js +1 -1
- package/dist/components/tag-or-status-item2.js.map +1 -1
- package/dist/components/tag-popper2.js +1 -1
- package/dist/components/tag-popper2.js.map +1 -1
- package/dist/components/typography-clamp2.js +1 -1
- package/dist/components/typography-clamp2.js.map +1 -1
- package/dist/components/user-info-section2.js +1 -1
- package/dist/components/user-info-section2.js.map +1 -1
- package/dist/components/z-avatar2.js +1 -1
- package/dist/components/z-avatar2.js.map +1 -1
- package/dist/components/z-dialog2.js +1 -1
- package/dist/components/z-dialog2.js.map +1 -1
- package/dist/components/z-tooltip2.js +1 -1
- package/dist/components/z-tooltip2.js.map +1 -1
- package/dist/esm/autocomplete-address_49.entry.js +196 -84
- package/dist/esm/loader.js +1 -1
- package/dist/esm/quick-message-app.entry.js +1 -1
- package/dist/esm/zignal-stencil-library.js +1 -1
- package/dist/types/components/master-status-app/master-status-app.d.ts +15 -2
- package/dist/types/components/master-tag-app/master-tag-app.d.ts +15 -2
- package/dist/zignal-stencil-library/autocomplete-address_49.entry.js +196 -84
- package/dist/zignal-stencil-library/quick-message-app.entry.js +1 -1
- package/dist/zignal-stencil-library/zignal-stencil-library.esm.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-status-app.js","sourceRoot":"","sources":["../../../src/components/master-status-app/master-status-app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE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C7B,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;oBAC3B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE;iBACtC,CAAC,CAAC,CAAC,SAAS,EACb,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EACxC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACrF,QAAQ,EAAE,IAAI,CAAC,YAAY,GAC7B,CACA,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h, Watch } from '@stencil/core';\nimport { configStore } from '../../store/store';\nimport {\n getUserStatuses,\n createUserStatus,\n updateUserStatus,\n deleteUserStatus,\n reorderUserStatus,\n} from '../../api/index';\nimport { TTagOrStatusItem } from '../../store/type';\nimport { ZButton } from '../internal-component/z-button';\nimport { ZInput } from '../internal-component/z-input';\nimport { Icon } from '../internal-component/icon';\nimport { useTranslation } from '../../utils/utils';\nimport { AxiosError } from 'axios';\nimport { DIALOG_TYPE, openDialog, handleError } from '../../store/dialog';\nimport Sortable from 'sortablejs';\n\n@Component({\n tag: 'master-status-app',\n styleUrl: 'master-status-app.css',\n})\nexport class MasterStatusApp {\n @Prop() languagePref: string = 'en';\n @Prop() themeMode: 'light' | 'dark' = 'light';\n @Prop() businessId: string;\n @Prop() shopId: string;\n @Prop() accessToken: string;\n @Prop() isProduction: boolean = false;\n @Prop() timeZone: string;\n\n @State() statuses: TTagOrStatusItem[] = [];\n @State() searchQuery: string = '';\n @State() loading: boolean = false;\n @State() dialogOpen: boolean = false;\n @State() editingItem: TTagOrStatusItem | null = null;\n @State() dialogLoading: boolean = false;\n\n private containerRef?: HTMLElement;\n private sortable: Sortable;\n\n componentWillLoad() {\n this.updateConfig();\n this.fetchData();\n }\n\n componentDidLoad() {\n if (this.containerRef) {\n this.sortable = new Sortable(this.containerRef, {\n animation: 150,\n ghostClass: 'status-sortable-ghost',\n onEnd: async (evt) => {\n const { oldIndex, newIndex } = evt;\n if (oldIndex === newIndex || oldIndex === undefined || newIndex === undefined) return;\n\n const newStatuses = [...this.statuses];\n const [movedItem] = newStatuses.splice(oldIndex, 1);\n newStatuses.splice(newIndex, 0, movedItem);\n\n // Update sequences locally\n newStatuses.forEach((item, index) => {\n item.sequence = index;\n });\n\n this.statuses = newStatuses;\n\n try {\n await reorderUserStatus({ id: movedItem.id, sequence: newIndex + 1 });\n // Fetch to ensure consistency\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder status');\n await this.fetchData(); // Revert on error\n }\n },\n });\n }\n }\n\n disconnectedCallback() {\n this.sortable?.destroy();\n }\n\n @Watch('languagePref')\n @Watch('themeMode')\n @Watch('businessId')\n @Watch('shopId')\n @Watch('accessToken')\n @Watch('isProduction')\n @Watch('timeZone')\n handleConfigChange() {\n this.updateConfig();\n this.fetchData();\n }\n\n private updateConfig() {\n configStore.set('language', this.languagePref as 'en' | 'th');\n configStore.set('theme', this.themeMode);\n configStore.set('businessId', this.businessId);\n configStore.set('shopId', this.shopId);\n configStore.set('accessToken', this.accessToken);\n configStore.set('isProduction', this.isProduction);\n configStore.set('timeZone', this.timeZone);\n }\n\n private async fetchData() {\n if (!this.businessId || !this.shopId || !this.accessToken) return;\n this.loading = true;\n try {\n const response = await getUserStatuses();\n this.statuses = response.statuses.sort((a, b) => a.sequence - b.sequence);\n } catch (error) {\n handleError(error, 'Failed to fetch statuses');\n } finally {\n this.loading = false;\n }\n }\n\n private handleCreate = async (e: CustomEvent<{ name: string; color: string }>) => {\n this.dialogLoading = true;\n try {\n await createUserStatus({ name: e.detail.name, color: e.detail.color });\n await this.fetchData();\n this.dialogOpen = false;\n } catch (error) {\n handleError(error, 'Failed to create status');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleUpdate = async (e: CustomEvent<{ name: string; color: string }>) => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n try {\n await updateUserStatus({\n id: this.editingItem.id,\n name: e.detail.name,\n color: e.detail.color,\n });\n await this.fetchData();\n this.dialogOpen = false;\n this.editingItem = null;\n } catch (error) {\n handleError(error, 'Failed to update status');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleDelete = async () => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n const t = useTranslation();\n let total: number | undefined;\n try {\n await deleteUserStatus({ id: this.editingItem.id, });\n } catch (error) {\n if (error instanceof AxiosError && error.response?.data?.code === 'user-status-in-use') {\n total = error.response?.data?.data?.total;\n if (total) {\n openDialog({\n open: true,\n type: DIALOG_TYPE.WARNING,\n title: t('quick_message.delete_item_with_users_confirmation', { total }),\n buttonName: t('confirm'),\n cancelButtonName: t('cancel'),\n onSubmitDialog: async () => {\n try {\n await deleteUserStatus({ id: this.editingItem.id, force: true });\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n } catch (e) {\n handleError(e, 'Failed to delete status');\n }\n },\n });\n }\n } else {\n handleError(error, 'Failed to delete status');\n }\n } finally {\n if (!total) {\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n }\n this.dialogLoading = false;\n }\n };\n\n private handleReorder = async (id: string, direction: 'top' | 'bottom') => {\n const currentIndex = this.statuses.findIndex((s) => s.id === id);\n if (currentIndex === -1) return;\n\n let newSequence = 0;\n if (direction === 'top') {\n newSequence = 0;\n } else {\n const maxSeq = Math.max(...this.statuses.map(s => s.sequence), 0);\n newSequence = maxSeq + 1;\n }\n\n try {\n await reorderUserStatus({ id, sequence: newSequence });\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder status');\n }\n };\n\n render() {\n const theme = configStore.get('theme');\n const t = useTranslation();\n const filteredStatuses = this.statuses.filter((s) =>\n s.name.toLowerCase().includes(this.searchQuery.toLowerCase())\n );\n\n return (\n <div data-theme={theme} class=\"master-status-app\" >\n <div class=\"master-status-app-header\">\n <h1 class=\"master-status-app-title\">{t('status')}</h1>\n <div class=\"master-status-app-controls\">\n <div class=\"master-status-app-search\">\n <ZInput\n placeholder={t('master_data.search_status')}\n value={this.searchQuery}\n onChange={(val) => (this.searchQuery = val)}\n />\n </div>\n <ZButton\n variant=\"outlined\"\n label={t('master_data.add_status')}\n onClick={() => {\n this.editingItem = null;\n this.dialogOpen = true;\n }}\n startIcon={<Icon name=\"Plus\" />}\n />\n </div>\n </div>\n\n <div\n class=\"master-status-app-content\"\n ref={(el) => (this.containerRef = el as HTMLElement)}\n >\n {filteredStatuses.length > 0 ? (\n filteredStatuses.map((status, index) => (\n <master-data-item\n key={status.id}\n item={{\n id: status.id || '',\n name: status.name,\n color: status.color || '',\n sequence: status.sequence || 0\n }}\n index={index}\n isFirst={index === 0}\n isLast={index === filteredStatuses.length - 1}\n isSearching={!!this.searchQuery}\n draggableItem={!this.searchQuery}\n onEdit={() => {\n this.editingItem = status;\n this.dialogOpen = true;\n }}\n onMoveToTop={(e) => this.handleReorder(e.detail, 'top')}\n onMoveToBottom={(e) => this.handleReorder(e.detail, 'bottom')}\n />\n ))\n ) : (\n <div class=\"master-status-app-empty\">\n <Icon name=\"ClipboardList\" addClass=\"master-status-app-empty-icon\" />\n <p>\n {this.searchQuery\n ? t('master_data.not_found_status')\n : t('master_data.status_empty')}\n </p>\n </div>\n )}\n </div>\n\n <create-master-data-dialog\n open={this.dialogOpen}\n dialogTitle={t('status')}\n type=\"status\"\n initialData={this.editingItem ? {\n id: this.editingItem.id || '',\n name: this.editingItem.name,\n color: this.editingItem.color || ''\n } : undefined}\n loading={this.dialogLoading}\n onClose={() => (this.dialogOpen = false)}\n onSubmitData={(e) => (this.editingItem ? this.handleUpdate(e) : this.handleCreate(e))}\n onDelete={this.handleDelete}\n />\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"master-status-app.js","sourceRoot":"","sources":["../../../src/components/master-status-app/master-status-app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EACH,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC,MAAM,OAAO,eAAe;IAChB,YAAY,GAAW,IAAI,CAAC;IAC5B,SAAS,GAAqB,OAAO,CAAC;IACtC,UAAU,CAAS;IACnB,MAAM,CAAS;IACf,WAAW,CAAS;IACpB,YAAY,GAAY,KAAK,CAAC;IAC9B,QAAQ,CAAS;IAEhB,QAAQ,GAAuB,EAAE,CAAC;IAClC,WAAW,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,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE;oBAC7B,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;oBAC3B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE;iBACtC,CAAC,CAAC,CAAC,SAAS,EACb,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EACxC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACrF,QAAQ,EAAE,IAAI,CAAC,YAAY,GAC7B,CACA,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h, Watch } from '@stencil/core';\nimport { configStore } from '../../store/store';\nimport i18n from '../../global/i18n';\nimport { setDayjsLocale, setDayjsTimeZone } from '../../utils/dayjs';\nimport {\n getUserStatuses,\n createUserStatus,\n updateUserStatus,\n deleteUserStatus,\n reorderUserStatus,\n} from '../../api/index';\nimport { TTagOrStatusItem } from '../../store/type';\nimport { ZButton } from '../internal-component/z-button';\nimport { ZInput } from '../internal-component/z-input';\nimport { Icon } from '../internal-component/icon';\nimport { useTranslation } from '../../utils/utils';\nimport { AxiosError } from 'axios';\nimport { DIALOG_TYPE, openDialog, handleError } from '../../store/dialog';\nimport Sortable from 'sortablejs';\n\n@Component({\n tag: 'master-status-app',\n styleUrl: 'master-status-app.css',\n})\nexport class MasterStatusApp {\n @Prop() languagePref: string = 'en';\n @Prop() themeMode: 'light' | 'dark' = 'light';\n @Prop() businessId: string;\n @Prop() shopId: string;\n @Prop() accessToken: string;\n @Prop() isProduction: boolean = false;\n @Prop() timeZone: string;\n\n @State() statuses: TTagOrStatusItem[] = [];\n @State() searchQuery: string = '';\n @State() loading: boolean = false;\n @State() dialogOpen: boolean = false;\n @State() editingItem: TTagOrStatusItem | null = null;\n @State() dialogLoading: boolean = false;\n\n private containerRef?: HTMLElement;\n private sortable: Sortable;\n\n connectedCallback() {\n this.applyLanguage(this.languagePref as 'en' | 'th');\n this.applyTheme(this.themeMode);\n this.setBusinessId(this.businessId);\n this.setShopId(this.shopId);\n this.setAccessToken(this.accessToken);\n this.setIsProduction(this.isProduction);\n this.setTimeZone(this.timeZone);\n }\n\n componentWillLoad() {\n this.setBusinessId(this.businessId);\n this.setShopId(this.shopId);\n this.setAccessToken(this.accessToken);\n this.setIsProduction(this.isProduction);\n this.setTimeZone(this.timeZone);\n this.fetchData();\n }\n\n componentDidLoad() {\n if (this.containerRef) {\n this.sortable = new Sortable(this.containerRef, {\n animation: 150,\n ghostClass: 'status-sortable-ghost',\n onEnd: async (evt) => {\n const { oldIndex, newIndex } = evt;\n if (oldIndex === newIndex || oldIndex === undefined || newIndex === undefined) return;\n\n const newStatuses = [...this.statuses];\n const [movedItem] = newStatuses.splice(oldIndex, 1);\n newStatuses.splice(newIndex, 0, movedItem);\n\n // Update sequences locally\n newStatuses.forEach((item, index) => {\n item.sequence = index;\n });\n\n this.statuses = newStatuses;\n\n try {\n await reorderUserStatus({ id: movedItem.id, sequence: newIndex + 1 });\n // Fetch to ensure consistency\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder status');\n await this.fetchData(); // Revert on error\n }\n },\n });\n }\n }\n\n disconnectedCallback() {\n this.sortable?.destroy();\n }\n\n @Watch('languagePref')\n handleLanguageChange(newValue: string) {\n this.applyLanguage(newValue as 'en' | 'th');\n }\n\n @Watch('themeMode')\n handleThemeChange(newValue: 'light' | 'dark') {\n this.applyTheme(newValue);\n }\n\n @Watch('businessId')\n handleBusinessIdChange(newValue: string) {\n this.setBusinessId(newValue);\n this.fetchData();\n }\n\n @Watch('shopId')\n handleShopIdChange(newValue: string) {\n this.setShopId(newValue);\n this.fetchData();\n }\n\n @Watch('accessToken')\n handleAccessTokenChange(newValue: string) {\n this.setAccessToken(newValue);\n this.fetchData();\n }\n\n @Watch('isProduction')\n handleIsProductionChange(newValue: boolean) {\n this.setIsProduction(newValue);\n }\n\n @Watch('timeZone')\n handleTimeZoneChange(newValue: string) {\n this.setTimeZone(newValue);\n }\n\n private applyLanguage(lang: 'th' | 'en') {\n if (i18n.language !== lang) {\n i18n.changeLanguage(lang);\n }\n configStore.set('language', lang);\n setDayjsLocale(lang);\n }\n\n private applyTheme(theme: 'dark' | 'light') {\n configStore.set('theme', theme);\n }\n\n private setBusinessId(businessId?: string) {\n configStore.set('businessId', businessId || null);\n }\n\n private setShopId(shopId?: string) {\n configStore.set('shopId', shopId || null);\n }\n\n private setAccessToken(accessToken?: string) {\n configStore.set('accessToken', accessToken || null);\n }\n\n private setIsProduction(isProduction: boolean) {\n configStore.set('isProduction', isProduction);\n }\n\n private setTimeZone(timeZone?: string) {\n if (!timeZone || timeZone === 'null') {\n const resolved = Intl.DateTimeFormat().resolvedOptions().timeZone;\n configStore.set('timeZone', resolved);\n setDayjsTimeZone(resolved);\n return;\n }\n\n configStore.set('timeZone', timeZone);\n setDayjsTimeZone(timeZone);\n }\n\n private async fetchData() {\n if (!this.businessId || !this.shopId || !this.accessToken) return;\n this.loading = true;\n try {\n const response = await getUserStatuses();\n this.statuses = response.statuses.sort((a, b) => a.sequence - b.sequence);\n } catch (error) {\n handleError(error, 'Failed to fetch statuses');\n } finally {\n this.loading = false;\n }\n }\n\n private handleCreate = async (e: CustomEvent<{ name: string; color: string }>) => {\n this.dialogLoading = true;\n try {\n await createUserStatus({ name: e.detail.name, color: e.detail.color });\n await this.fetchData();\n this.dialogOpen = false;\n } catch (error) {\n handleError(error, 'Failed to create status');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleUpdate = async (e: CustomEvent<{ name: string; color: string }>) => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n try {\n await updateUserStatus({\n id: this.editingItem.id,\n name: e.detail.name,\n color: e.detail.color,\n });\n await this.fetchData();\n this.dialogOpen = false;\n this.editingItem = null;\n } catch (error) {\n handleError(error, 'Failed to update status');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleDelete = async () => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n const t = useTranslation();\n let total: number | undefined;\n try {\n await deleteUserStatus({ id: this.editingItem.id, });\n } catch (error) {\n if (error instanceof AxiosError && error.response?.data?.code === 'user-status-in-use') {\n total = error.response?.data?.data?.total;\n if (total) {\n openDialog({\n open: true,\n type: DIALOG_TYPE.WARNING,\n title: t('quick_message.delete_item_with_users_confirmation', { total }),\n buttonName: t('confirm'),\n cancelButtonName: t('cancel'),\n onSubmitDialog: async () => {\n try {\n await deleteUserStatus({ id: this.editingItem.id, force: true });\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n } catch (e) {\n handleError(e, 'Failed to delete status');\n }\n },\n });\n }\n } else {\n handleError(error, 'Failed to delete status');\n }\n } finally {\n if (!total) {\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n }\n this.dialogLoading = false;\n }\n };\n\n private handleReorder = async (id: string, direction: 'top' | 'bottom') => {\n const currentIndex = this.statuses.findIndex((s) => s.id === id);\n if (currentIndex === -1) return;\n\n let newSequence = 0;\n if (direction === 'top') {\n newSequence = 0;\n } else {\n const maxSeq = Math.max(...this.statuses.map(s => s.sequence), 0);\n newSequence = maxSeq + 1;\n }\n\n try {\n await reorderUserStatus({ id, sequence: newSequence });\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder status');\n }\n };\n\n render() {\n const theme = configStore.get('theme');\n const t = useTranslation();\n const filteredStatuses = this.statuses.filter((s) =>\n s.name.toLowerCase().includes(this.searchQuery.toLowerCase())\n );\n\n return (\n <div data-theme={theme} class=\"master-status-app\" >\n <div class=\"master-status-app-header\">\n <h1 class=\"master-status-app-title\">{t('status')}</h1>\n <div class=\"master-status-app-controls\">\n <div class=\"master-status-app-search\">\n <ZInput\n placeholder={t('master_data.search_status')}\n value={this.searchQuery}\n onChange={(val) => (this.searchQuery = val)}\n />\n </div>\n <ZButton\n variant=\"outlined\"\n label={t('master_data.add_status')}\n onClick={() => {\n this.editingItem = null;\n this.dialogOpen = true;\n }}\n startIcon={<Icon name=\"Plus\" />}\n />\n </div>\n </div>\n\n <div\n class=\"master-status-app-content\"\n ref={(el) => (this.containerRef = el as HTMLElement)}\n >\n {filteredStatuses.length > 0 ? (\n filteredStatuses.map((status, index) => (\n <master-data-item\n key={status.id}\n item={{\n id: status.id || '',\n name: status.name,\n color: status.color || '',\n sequence: status.sequence || 0\n }}\n index={index}\n isFirst={index === 0}\n isLast={index === filteredStatuses.length - 1}\n isSearching={!!this.searchQuery}\n draggableItem={!this.searchQuery}\n onEdit={() => {\n this.editingItem = status;\n this.dialogOpen = true;\n }}\n onMoveToTop={(e) => this.handleReorder(e.detail, 'top')}\n onMoveToBottom={(e) => this.handleReorder(e.detail, 'bottom')}\n />\n ))\n ) : (\n <div class=\"master-status-app-empty\">\n <Icon name=\"ClipboardList\" addClass=\"master-status-app-empty-icon\" />\n <p>\n {this.searchQuery\n ? t('master_data.not_found_status')\n : t('master_data.status_empty')}\n </p>\n </div>\n )}\n </div>\n\n <create-master-data-dialog\n open={this.dialogOpen}\n dialogTitle={t('status')}\n type=\"status\"\n initialData={this.editingItem ? {\n id: this.editingItem.id || '',\n name: this.editingItem.name,\n color: this.editingItem.color || ''\n } : undefined}\n loading={this.dialogLoading}\n onClose={() => (this.dialogOpen = false)}\n onSubmitData={(e) => (this.editingItem ? this.handleUpdate(e) : this.handleCreate(e))}\n onDelete={this.handleDelete}\n />\n </div>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer base{*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-x-reverse:0;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-drop-shadow-alpha:100%;--tw-border-style:solid;border:0 solid;box-sizing:border-box;margin:0;padding:0}}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-x-reverse:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-font-weight:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-border-style:solid}}}@layer theme{:host,:root{--color-red-700:oklch(50.5% .213 27.518);--color-green-500:oklch(72.3% .219 149.579);--color-green-700:oklch(52.7% .154 150.069);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-100:oklch(94.8% .028 342.258);--color-gray-400:oklch(70.7% .022 261.325);--font-weight-semibold:600;--font-weight-bold:700;--animate-spin:spin 1s linear infinite;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--font-weight-medium:500;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:"Kanit",var(--default-font);--default-mono-font-family:var(--font-mono);--default-font:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--color-primary:#e02848;--color-secondary:#023761;--color-background:#fff;--color-surface:#000;--color-paper:#f3f4f6;--color-divider:#e5e7eb;--color-theme-gray:#6b7280;--color-overlay:#0000004d;--color-selected:#fdeef1}}@layer base{::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-meridiem-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-color:oklch(55.1% .027 264.364);border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);border-color:oklch(54.6% .245 262.881);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:oklch(55.1% .027 264.364);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;print-color-adjust:unset}[type=checkbox],[type=radio]{appearance:none;color:oklch(54.6% .245 262.881);print-color-adjust:exact;-webkit-user-select:none;user-select:none;vertical-align:middle;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-color:oklch(55.1% .027 264.364);border-width:1px;display:inline-block;flex-shrink:0;height:1rem;padding:0;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components{.dialog-backdrop{align-items:center;background-color:#0006;display:flex;inset:calc(var(--spacing)*0);justify-content:center;position:fixed;z-index:50}@supports (color:color-mix(in lab,red,red)){.dialog-backdrop{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.chat-item{align-items:flex-start;border-radius:var(--radius-xl);cursor:pointer;display:flex;margin-block:calc(var(--spacing)*1);margin-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*3);padding-inline:calc(var(--spacing)*4);position:relative;--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}:where(.chat-item>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*4*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*4*var(--tw-space-x-reverse))}.chat-item .chat-item-pin{position:absolute;right:calc(var(--spacing)*-3);top:calc(var(--spacing)*1)}.chat-item .chat-item-pin-icon{fill:currentColor;height:calc(var(--spacing)*3);rotate:45deg;width:calc(var(--spacing)*3)}.chat-item .chat-item-content-container{display:flex;flex-direction:row;width:100%}:where(.chat-item .chat-item-content-container>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*4*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*4*var(--tw-space-x-reverse))}.chat-item .chat-item-avatar-wrapper{align-self:center;flex-shrink:0;position:relative}.chat-item .chat-item-avatar-badge{bottom:calc(var(--spacing)*-.5);position:absolute;right:calc(var(--spacing)*-.5)}.chat-item .chat-item-content-wrapper{min-height:calc(var(--spacing)*18);width:100%}.chat-item .chat-item-content-main{align-items:center;display:flex}:where(.chat-item .chat-item-content-main>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*1*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*1*var(--tw-space-x-reverse))}.chat-item .chat-item-content-main-image{border-radius:3.40282e+38px;height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.chat-item .chat-item-content-main-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.chat-item .chat-item-content-main-name,.chat-item .chat-item-content-main-time{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-item .chat-item-content-main-time{color:var(--color-gray-500);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-left:auto}.chat-item .chat-item-content-secondary{align-items:flex-start;display:flex;flex-direction:row;width:100%}.chat-item .chat-item-content-secondary-nickname{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.chat-item .chat-item-content-secondary-message,.chat-item .chat-item-content-secondary-nickname{color:var(--color-surface);-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-item .chat-item-content-secondary-message{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.chat-item .chat-item-content-unread{background-color:var(--color-primary);border-radius:3.40282e+38px;color:var(--color-white);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-left:auto}.chat-item .chat-item-content-unread-mark{display:inline-block;height:calc(var(--spacing)*2.5);width:calc(var(--spacing)*2.5)}.chat-item .chat-item-content-unread-count{padding-block:calc(var(--spacing)*.5);padding-inline:calc(var(--spacing)*2)}.z-icon-button{cursor:pointer;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);align-items:center;border-radius:3.40282e+38px;display:inline-flex;font-weight:var(--font-weight-medium);justify-content:center;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.z-icon-button:focus{--tw-outline-style:none;outline-style:none}.z-icon-button-primary{background-color:var(--color-primary);color:var(--color-white)}.z-icon-button-outlined{border-color:var(--color-primary);border-style:var(--tw-border-style);border-width:1px}.z-icon-button-outlined,.z-icon-button-text{color:var(--color-primary)}.z-icon-button-disabled{cursor:not-allowed;opacity:.5}.z-button{cursor:pointer;--tw-font-weight:var(--font-weight-medium);align-items:center;border-radius:3.40282e+38px;display:inline-flex;font-weight:var(--font-weight-medium);justify-content:center;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.z-button:focus{--tw-outline-style:none;outline-style:none}.z-button-small{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));padding-block:calc(var(--spacing)*1.5);padding-inline:calc(var(--spacing)*2)}.z-button-medium{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*3)}.z-button-large{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));padding-block:calc(var(--spacing)*3);padding-inline:calc(var(--spacing)*4)}.z-button-primary{background-color:var(--color-primary);color:var(--color-white)}.z-button-outlined{border-color:var(--color-primary);border-style:var(--tw-border-style);border-width:1px;color:var(--color-primary)}.z-button-disabled{cursor:not-allowed;opacity:.5}.z-button-text{margin-inline:calc(var(--spacing)*2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.z-input-area-label{margin-bottom:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);display:block;font-weight:var(--font-weight-medium)}.z-input-area-input,.z-input-area-label{color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.z-input-area-input{background-color:var(--color-paper);border-color:var(--color-surface);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);width:100%;--tw-ring-color:var(--color-primary)}.z-input-area-input:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-input-area-error{color:var(--color-red-500);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-top:calc(var(--spacing)*1)}.z-input-label{margin-bottom:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);display:block;font-weight:var(--font-weight-medium)}.z-input,.z-input-label{color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.z-input{background-color:var(--color-background);border-color:var(--color-divider);border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);width:100%;--tw-ring-color:var(--color-primary)}.z-input:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-input-error{color:var(--color-red-500);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-top:calc(var(--spacing)*1)}.z-select-input-label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));margin-bottom:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);display:block;font-weight:var(--font-weight-medium)}.z-tag-or-status-item{align-items:center;border-radius:var(--radius-2xl);gap:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*1.5);padding-inline:calc(var(--spacing)*3);--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);display:inline-flex}.z-tag-or-status-item .z-tag-or-status-item-name{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));max-width:calc(var(--spacing)*20)}.z-tag-or-status-item .z-tag-or-status-item-icon{border-radius:3.40282e+38px;height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.z-context-input{align-items:stretch;display:flex;flex-direction:row;margin-block:calc(var(--spacing)*1)}.z-context-input-key{background-color:var(--color-background);border-bottom-left-radius:var(--radius-3xl);border-color:var(--color-divider);border-style:var(--tw-border-style);border-top-left-radius:var(--radius-3xl);border-width:1px;color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));max-height:6.4rem;min-height:2.4rem;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);resize:none;width:100%;--tw-ring-color:var(--color-primary);flex:1}.z-context-input-key:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-context-input-value{background-color:var(--color-background);border-bottom-right-radius:var(--radius-3xl);border-color:var(--color-primary);border-style:var(--tw-border-style);border-top-right-radius:var(--radius-3xl);border-width:1px;color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));max-height:6.4rem;min-height:2.4rem;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);resize:none;width:100%;--tw-ring-color:var(--color-primary);flex:1}.z-context-input-value:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-text-with-link{color:var(--color-blue-600);text-decoration-line:underline}.z-button-group{display:inline-flex}.z-button-group-tab{border-radius:var(--radius-md);display:flex;gap:calc(var(--spacing)*1);padding:calc(var(--spacing)*.5)!important}.z-button-group-tab-overlay{background-color:var(--color-overlay)}.z-button-group-item{border-style:var(--tw-border-style);cursor:pointer;--tw-font-weight:var(--font-weight-medium);align-items:center;border-width:1px;display:inline-flex;font-weight:var(--font-weight-medium);justify-content:center;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.z-button-group-item:focus{--tw-outline-style:none;outline-style:none}.z-button-group-item-tab{align-items:center;border-radius:var(--radius-sm);display:flex;flex:1;flex-direction:column;gap:calc(var(--spacing)*2);justify-content:center;padding:calc(var(--spacing)*1)!important}.z-button-group-item-tab,.z-button-group-item-tab-selected{border-style:var(--tw-border-style)!important;border-width:0!important}.z-button-group-item-tab-selected{background-color:var(--color-white);--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.z-button-group-item-tab-unselected{border-style:var(--tw-border-style)!important;border-width:0!important}.z-button-group-small{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));padding-block:calc(var(--spacing)*1.5);padding-inline:calc(var(--spacing)*2)}.z-button-group-medium{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*3)}.z-button-group-large{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));padding-block:calc(var(--spacing)*3);padding-inline:calc(var(--spacing)*4)}.z-button-group-item-first{border-bottom-left-radius:3.40282e+38px;border-top-left-radius:3.40282e+38px}.z-button-group-item-last{border-bottom-right-radius:3.40282e+38px;border-top-right-radius:3.40282e+38px}.z-button-group-item-middle{border-radius:0}.z-button-group-item-primary-selected{background-color:var(--color-primary);border-color:var(--color-primary);color:var(--color-white)}.z-button-group-item-primary-unselected{background-color:var(--color-white);border-color:var(--color-primary);color:var(--color-primary)}.z-button-group-item-outlined-selected{background-color:var(--color-primary);border-color:var(--color-primary);color:var(--color-white)}.z-button-group-item-outlined-unselected{background-color:#0000;border-color:var(--color-primary);color:var(--color-primary)}.z-button-group-item-disabled{cursor:not-allowed;opacity:.5}.z-button-group-item:not(:first-child){margin-left:-1px}.z-avatar-error{align-items:center;display:flex;justify-content:center}.z-avatar-2x-small{height:calc(var(--spacing)*3);min-height:calc(var(--spacing)*3);min-width:calc(var(--spacing)*3);width:calc(var(--spacing)*3)}.z-avatar-x-small{height:calc(var(--spacing)*4);min-height:calc(var(--spacing)*4);min-width:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.z-avatar-small{height:calc(var(--spacing)*8);min-height:calc(var(--spacing)*8);min-width:calc(var(--spacing)*8);width:calc(var(--spacing)*8)}.z-avatar-medium{height:calc(var(--spacing)*16);min-height:calc(var(--spacing)*16);min-width:calc(var(--spacing)*16);width:calc(var(--spacing)*16)}.z-avatar-large{height:calc(var(--spacing)*32);min-height:calc(var(--spacing)*32);min-width:calc(var(--spacing)*32);width:calc(var(--spacing)*32)}.z-avatar-full{height:100%;width:100%}.z-avatar-group{background-color:#023761;border-radius:3.40282e+38px}}@layer utilities;[data-theme=light]{--color-primary:#e02848;--color-secondary:#023761;--color-background:#fff;--color-surface:#000;--color-paper:#f3f4f6;--color-divider:#e5e7eb;--color-theme-gray:#6b7280;--color-overlay:#0000004d;--color-selected:#fdeef1}[data-theme=dark]{--color-primary:#b50f30;--color-secondary:#fff;--color-background:#23292d;--color-surface:#fff;--color-paper:#374151;--color-divider:#4b5563;--color-theme-gray:#d1d5db;--color-overlay:#ffffff4d;--color-selected:#3a242e}.scroll-container::-webkit-scrollbar{background:#0000001a;height:8px;width:8px}.scroll-container:active::-webkit-scrollbar,.scroll-container:hover::-webkit-scrollbar{background:#0003}.scroll-container:active::-webkit-scrollbar-thumb,.scroll-container:hover::-webkit-scrollbar-thumb{background:#0006;border-radius:4px}.bg-time-badge{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-time-badge{background-color:color-mix(in srgb,var(--color-surface)30%,transparent)}}.placeholder-surface::placeholder{color:var(--color-text-gray)}.z-width-100{width:100%}.z-width-90{width:90%}.z-width-75{width:75%}.z-width-50{width:50%}.z-width-25{width:25%}.z-width-0{width:0}.z-animate-width{transition-duration:.5s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.z-animate-grid-template-cols{transition:grid-template-rows .5s}[type=checkbox]{background-color:var(--color-gray-300);border-color:var(--color-gray-300);border-radius:4px;cursor:pointer}[type=checkbox]:checked,[type=checkbox]:indeterminate{background-color:var(--color-primary);border-color:var(--color-primary);border-radius:4px;cursor:pointer}[type=checkbox]:focus{offset:0;outline-offset:0;--tw-ring-color:var(--color-primary);outline:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.grid-cols-1{grid-template-columns:1fr}.grid-cols-1_3{grid-template-columns:1fr 3fr}.grid-cols-1_2_1{grid-template-columns:1fr 2fr 1fr}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.top-1\/2{top:50%}.right-3{right:calc(var(--spacing)*3)}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.m-2{margin:calc(var(--spacing)*2)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-auto{margin-top:auto}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-auto{margin-left:auto}.flex{display:flex}.size-3{height:calc(var(--spacing)*3);width:calc(var(--spacing)*3)}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.size-5{height:calc(var(--spacing)*5);width:calc(var(--spacing)*5)}.size-8{height:calc(var(--spacing)*8);width:calc(var(--spacing)*8)}.size-16{height:calc(var(--spacing)*16);width:calc(var(--spacing)*16)}.size-32{height:calc(var(--spacing)*32);width:calc(var(--spacing)*32)}.size-\[8px\]{height:8px;width:8px}.size-\[10px\]{height:10px;width:10px}.w-1\/2{width:50%}.w-9{width:calc(var(--spacing)*9)}.w-full{width:100%}.max-w-32{max-width:calc(var(--spacing)*32)}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.translate-y-0{translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-spin{animation:var(--animate-spin)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.justify-between{justify-content:space-between}.justify-end{justify-content:flex-end}.gap-y-1{row-gap:calc(var(--spacing)*1)}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:3.40282e+38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-b-\[0\.5px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:.5px}.border-divider{border-color:var(--color-divider)}.border-primary{border-color:var(--color-primary)}.bg-background{background-color:var(--color-background)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-selected{background-color:var(--color-selected)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-16{padding-right:calc(var(--spacing)*16)}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-background{color:var(--color-background)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-gray-400{color:var(--color-gray-400)}.text-green-500{color:var(--color-green-500)}.text-green-700{color:var(--color-green-700)}.text-primary{color:var(--color-primary)}.text-red-700{color:var(--color-red-700)}.text-surface{color:var(--color-surface)}.text-theme-gray{color:var(--color-theme-gray)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}}@keyframes spin{to{transform:rotate(1turn)}}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer utilities;:host{display:block}.master-tag-app{display:flex;flex-direction:column;max-height:calc(100vh - 120px);min-height:calc(100vh - 120px);overflow:hidden;width:100%}.master-tag-app,.master-tag-app-header{background-color:var(--color-background)}.master-tag-app-header{border-bottom:1px solid var(--color-border);padding:1rem;position:sticky;top:0;z-index:10}.master-tag-app-title{color:var(--color-surface);font-size:1.25rem;font-weight:600;margin-bottom:1rem}.master-tag-app-controls{display:flex;flex-wrap:wrap;gap:1rem}.master-tag-app-search{flex-grow:1}.master-tag-app-content{flex:1;overflow-y:auto;padding:1rem}.master-tag-app-empty{align-items:center;color:var(--color-text-secondary);display:flex;flex-direction:column;justify-content:center;min-height:300px;text-align:center}.master-tag-app-empty-icon{color:var(--color-primary);height:80px;margin-bottom:1rem;transform:rotate(90deg);width:80px}.tag-sortable-ghost{background-color:var(--color-primary);opacity:.4}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@media (forced-colors:active){[type=checkbox]:checked,[type=radio]:checked{appearance:auto}[type=checkbox]:indeterminate{appearance:auto}}@media (hover:hover){.z-button-outlined:hover,.z-button-primary:hover,.z-icon-button-outlined:hover,.z-icon-button-primary:hover,.z-icon-button-text:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.z-button-group-item-tab:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.z-button-group-item-tab-unselected:hover{background-color:var(--color-white)}.z-button-group-item-primary-unselected:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.z-button-group-item-outlined-unselected:hover{background-color:#e028481a}@supports (color:color-mix(in lab,red,red)){.z-button-group-item-outlined-unselected:hover{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}@media screen and (min-width:0){.z-max-height{height:calc(100vh - 56px)}}@media screen and (min-width:600px){.z-max-height{height:calc(100vh - 64px)}}
|
|
1
|
+
@layer base{*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-x-reverse:0;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-drop-shadow-alpha:100%;--tw-border-style:solid;border:0 solid;box-sizing:border-box;margin:0;padding:0}}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-x-reverse:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-font-weight:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-border-style:solid}}}@layer theme{:host,:root{--color-red-700:oklch(50.5% .213 27.518);--color-green-500:oklch(72.3% .219 149.579);--color-green-700:oklch(52.7% .154 150.069);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-100:oklch(94.8% .028 342.258);--color-gray-400:oklch(70.7% .022 261.325);--font-weight-semibold:600;--font-weight-bold:700;--animate-spin:spin 1s linear infinite;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--font-weight-medium:500;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:"Kanit",var(--default-font);--default-mono-font-family:var(--font-mono);--default-font:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--color-primary:#e02848;--color-secondary:#023761;--color-background:#fff;--color-surface:#000;--color-paper:#f3f4f6;--color-divider:#e5e7eb;--color-theme-gray:#6b7280;--color-overlay:#0000004d;--color-selected:#fdeef1}}@layer base{::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-meridiem-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-color:oklch(55.1% .027 264.364);border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);border-color:oklch(54.6% .245 262.881);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:oklch(55.1% .027 264.364);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;print-color-adjust:unset}[type=checkbox],[type=radio]{appearance:none;color:oklch(54.6% .245 262.881);print-color-adjust:exact;-webkit-user-select:none;user-select:none;vertical-align:middle;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-color:oklch(55.1% .027 264.364);border-width:1px;display:inline-block;flex-shrink:0;height:1rem;padding:0;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components{.dialog-backdrop{align-items:center;background-color:#0006;display:flex;inset:calc(var(--spacing)*0);justify-content:center;position:fixed;z-index:50}@supports (color:color-mix(in lab,red,red)){.dialog-backdrop{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.chat-item{align-items:flex-start;border-radius:var(--radius-xl);cursor:pointer;display:flex;margin-block:calc(var(--spacing)*1);margin-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*3);padding-inline:calc(var(--spacing)*4);position:relative;--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}:where(.chat-item>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*4*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*4*var(--tw-space-x-reverse))}.chat-item .chat-item-pin{position:absolute;right:calc(var(--spacing)*-3);top:calc(var(--spacing)*1)}.chat-item .chat-item-pin-icon{fill:currentColor;height:calc(var(--spacing)*3);rotate:45deg;width:calc(var(--spacing)*3)}.chat-item .chat-item-content-container{display:flex;flex-direction:row;width:100%}:where(.chat-item .chat-item-content-container>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*4*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*4*var(--tw-space-x-reverse))}.chat-item .chat-item-avatar-wrapper{align-self:center;flex-shrink:0;position:relative}.chat-item .chat-item-avatar-badge{bottom:calc(var(--spacing)*-.5);position:absolute;right:calc(var(--spacing)*-.5)}.chat-item .chat-item-content-wrapper{min-height:calc(var(--spacing)*18);width:100%}.chat-item .chat-item-content-main{align-items:center;display:flex}:where(.chat-item .chat-item-content-main>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*1*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*1*var(--tw-space-x-reverse))}.chat-item .chat-item-content-main-image{border-radius:3.40282e+38px;height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.chat-item .chat-item-content-main-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.chat-item .chat-item-content-main-name,.chat-item .chat-item-content-main-time{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-item .chat-item-content-main-time{color:var(--color-gray-500);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-left:auto}.chat-item .chat-item-content-secondary{align-items:flex-start;display:flex;flex-direction:row;width:100%}.chat-item .chat-item-content-secondary-nickname{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.chat-item .chat-item-content-secondary-message,.chat-item .chat-item-content-secondary-nickname{color:var(--color-surface);-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.chat-item .chat-item-content-secondary-message{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.chat-item .chat-item-content-unread{background-color:var(--color-primary);border-radius:3.40282e+38px;color:var(--color-white);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-left:auto}.chat-item .chat-item-content-unread-mark{display:inline-block;height:calc(var(--spacing)*2.5);width:calc(var(--spacing)*2.5)}.chat-item .chat-item-content-unread-count{padding-block:calc(var(--spacing)*.5);padding-inline:calc(var(--spacing)*2)}.z-icon-button{cursor:pointer;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);align-items:center;border-radius:3.40282e+38px;display:inline-flex;font-weight:var(--font-weight-medium);justify-content:center;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.z-icon-button:focus{--tw-outline-style:none;outline-style:none}.z-icon-button-primary{background-color:var(--color-primary);color:var(--color-white)}.z-icon-button-outlined{border-color:var(--color-primary);border-style:var(--tw-border-style);border-width:1px}.z-icon-button-outlined,.z-icon-button-text{color:var(--color-primary)}.z-icon-button-disabled{cursor:not-allowed;opacity:.5}.z-button{cursor:pointer;--tw-font-weight:var(--font-weight-medium);align-items:center;border-radius:3.40282e+38px;display:inline-flex;font-weight:var(--font-weight-medium);justify-content:center;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.z-button:focus{--tw-outline-style:none;outline-style:none}.z-button-small{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));padding-block:calc(var(--spacing)*1.5);padding-inline:calc(var(--spacing)*2)}.z-button-medium{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*3)}.z-button-large{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));padding-block:calc(var(--spacing)*3);padding-inline:calc(var(--spacing)*4)}.z-button-primary{background-color:var(--color-primary);color:var(--color-white)}.z-button-outlined{border-color:var(--color-primary);border-style:var(--tw-border-style);border-width:1px;color:var(--color-primary)}.z-button-disabled{cursor:not-allowed;opacity:.5}.z-button-text{margin-inline:calc(var(--spacing)*2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.z-input-area-label{margin-bottom:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);display:block;font-weight:var(--font-weight-medium)}.z-input-area-input,.z-input-area-label{color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.z-input-area-input{background-color:var(--color-paper);border-color:var(--color-surface);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);width:100%;--tw-ring-color:var(--color-primary)}.z-input-area-input:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-input-area-error{color:var(--color-red-500);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-top:calc(var(--spacing)*1)}.z-input-label{margin-bottom:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);display:block;font-weight:var(--font-weight-medium)}.z-input,.z-input-label{color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.z-input{background-color:var(--color-background);border-color:var(--color-divider);border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);width:100%;--tw-ring-color:var(--color-primary)}.z-input:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-input-error{color:var(--color-red-500);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));margin-top:calc(var(--spacing)*1)}.z-select-input-label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));margin-bottom:calc(var(--spacing)*1);--tw-font-weight:var(--font-weight-medium);display:block;font-weight:var(--font-weight-medium)}.z-tag-or-status-item{align-items:center;border-radius:var(--radius-2xl);gap:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*1.5);padding-inline:calc(var(--spacing)*3);--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);display:inline-flex}.z-tag-or-status-item .z-tag-or-status-item-name{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));max-width:calc(var(--spacing)*20)}.z-tag-or-status-item .z-tag-or-status-item-icon{border-radius:3.40282e+38px;height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.z-context-input{align-items:stretch;display:flex;flex-direction:row;margin-block:calc(var(--spacing)*1)}.z-context-input-key{background-color:var(--color-background);border-bottom-left-radius:var(--radius-3xl);border-color:var(--color-divider);border-style:var(--tw-border-style);border-top-left-radius:var(--radius-3xl);border-width:1px;color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));max-height:6.4rem;min-height:2.4rem;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);resize:none;width:100%;--tw-ring-color:var(--color-primary);flex:1}.z-context-input-key:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-context-input-value{background-color:var(--color-background);border-bottom-right-radius:var(--radius-3xl);border-color:var(--color-primary);border-style:var(--tw-border-style);border-top-right-radius:var(--radius-3xl);border-width:1px;color:var(--color-surface);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));max-height:6.4rem;min-height:2.4rem;padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*4);resize:none;width:100%;--tw-ring-color:var(--color-primary);flex:1}.z-context-input-value:focus{border-color:var(--color-primary);--tw-outline-style:none;outline-style:none}.z-text-with-link{color:var(--color-blue-600);text-decoration-line:underline}.z-button-group{display:inline-flex}.z-button-group-tab{border-radius:var(--radius-md);display:flex;gap:calc(var(--spacing)*1);padding:calc(var(--spacing)*.5)!important}.z-button-group-tab-overlay{background-color:var(--color-overlay)}.z-button-group-item{border-style:var(--tw-border-style);cursor:pointer;--tw-font-weight:var(--font-weight-medium);align-items:center;border-width:1px;display:inline-flex;font-weight:var(--font-weight-medium);justify-content:center;transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.z-button-group-item:focus{--tw-outline-style:none;outline-style:none}.z-button-group-item-tab{align-items:center;border-radius:var(--radius-sm);display:flex;flex:1;flex-direction:column;gap:calc(var(--spacing)*2);justify-content:center;padding:calc(var(--spacing)*1)!important}.z-button-group-item-tab,.z-button-group-item-tab-selected{border-style:var(--tw-border-style)!important;border-width:0!important}.z-button-group-item-tab-selected{background-color:var(--color-white);--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.z-button-group-item-tab-unselected{border-style:var(--tw-border-style)!important;border-width:0!important}.z-button-group-small{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));padding-block:calc(var(--spacing)*1.5);padding-inline:calc(var(--spacing)*2)}.z-button-group-medium{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));padding-block:calc(var(--spacing)*2);padding-inline:calc(var(--spacing)*3)}.z-button-group-large{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));padding-block:calc(var(--spacing)*3);padding-inline:calc(var(--spacing)*4)}.z-button-group-item-first{border-bottom-left-radius:3.40282e+38px;border-top-left-radius:3.40282e+38px}.z-button-group-item-last{border-bottom-right-radius:3.40282e+38px;border-top-right-radius:3.40282e+38px}.z-button-group-item-middle{border-radius:0}.z-button-group-item-primary-selected{background-color:var(--color-primary);border-color:var(--color-primary);color:var(--color-white)}.z-button-group-item-primary-unselected{background-color:var(--color-white);border-color:var(--color-primary);color:var(--color-primary)}.z-button-group-item-outlined-selected{background-color:var(--color-primary);border-color:var(--color-primary);color:var(--color-white)}.z-button-group-item-outlined-unselected{background-color:#0000;border-color:var(--color-primary);color:var(--color-primary)}.z-button-group-item-disabled{cursor:not-allowed;opacity:.5}.z-button-group-item:not(:first-child){margin-left:-1px}.z-avatar-error{align-items:center;display:flex;justify-content:center}.z-avatar-2x-small{height:calc(var(--spacing)*3);min-height:calc(var(--spacing)*3);min-width:calc(var(--spacing)*3);width:calc(var(--spacing)*3)}.z-avatar-x-small{height:calc(var(--spacing)*4);min-height:calc(var(--spacing)*4);min-width:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.z-avatar-small{height:calc(var(--spacing)*8);min-height:calc(var(--spacing)*8);min-width:calc(var(--spacing)*8);width:calc(var(--spacing)*8)}.z-avatar-medium{height:calc(var(--spacing)*16);min-height:calc(var(--spacing)*16);min-width:calc(var(--spacing)*16);width:calc(var(--spacing)*16)}.z-avatar-large{height:calc(var(--spacing)*32);min-height:calc(var(--spacing)*32);min-width:calc(var(--spacing)*32);width:calc(var(--spacing)*32)}.z-avatar-full{height:100%;width:100%}.z-avatar-group{background-color:#023761;border-radius:3.40282e+38px}}@layer utilities;[data-theme=light]{--color-primary:#e02848;--color-secondary:#023761;--color-background:#fff;--color-surface:#000;--color-paper:#f3f4f6;--color-divider:#e5e7eb;--color-theme-gray:#6b7280;--color-overlay:#0000004d;--color-selected:#fdeef1}[data-theme=dark]{--color-primary:#b50f30;--color-secondary:#fff;--color-background:#23292d;--color-surface:#fff;--color-paper:#374151;--color-divider:#4b5563;--color-theme-gray:#d1d5db;--color-overlay:#ffffff4d;--color-selected:#3a242e}.scroll-container::-webkit-scrollbar{background:#0000001a;height:8px;width:8px}.scroll-container:active::-webkit-scrollbar,.scroll-container:hover::-webkit-scrollbar{background:#0003}.scroll-container:active::-webkit-scrollbar-thumb,.scroll-container:hover::-webkit-scrollbar-thumb{background:#0006;border-radius:4px}.bg-time-badge{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-time-badge{background-color:color-mix(in srgb,var(--color-surface)30%,transparent)}}.placeholder-surface::placeholder{color:var(--color-text-gray)}.z-width-100{width:100%}.z-width-90{width:90%}.z-width-75{width:75%}.z-width-50{width:50%}.z-width-25{width:25%}.z-width-0{width:0}.z-animate-width{transition-duration:.5s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.z-animate-grid-template-cols{transition:grid-template-rows .5s}[type=checkbox]{background-color:var(--color-gray-300);border-color:var(--color-gray-300);border-radius:4px;cursor:pointer}[type=checkbox]:checked,[type=checkbox]:indeterminate{background-color:var(--color-primary);border-color:var(--color-primary);border-radius:4px;cursor:pointer}[type=checkbox]:focus{offset:0;outline-offset:0;--tw-ring-color:var(--color-primary);outline:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.grid-cols-1{grid-template-columns:1fr}.grid-cols-1_3{grid-template-columns:1fr 3fr}.grid-cols-1_2_1{grid-template-columns:1fr 2fr 1fr}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.top-1\/2{top:50%}.right-3{right:calc(var(--spacing)*3)}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.m-2{margin:calc(var(--spacing)*2)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-auto{margin-top:auto}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-auto{margin-left:auto}.flex{display:flex}.size-3{height:calc(var(--spacing)*3);width:calc(var(--spacing)*3)}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.size-5{height:calc(var(--spacing)*5);width:calc(var(--spacing)*5)}.size-8{height:calc(var(--spacing)*8);width:calc(var(--spacing)*8)}.size-16{height:calc(var(--spacing)*16);width:calc(var(--spacing)*16)}.size-32{height:calc(var(--spacing)*32);width:calc(var(--spacing)*32)}.size-\[8px\]{height:8px;width:8px}.size-\[10px\]{height:10px;width:10px}.w-1\/2{width:50%}.w-9{width:calc(var(--spacing)*9)}.w-full{width:100%}.max-w-32{max-width:calc(var(--spacing)*32)}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.translate-y-0{translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-spin{animation:var(--animate-spin)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.justify-between{justify-content:space-between}.justify-end{justify-content:flex-end}.gap-y-1{row-gap:calc(var(--spacing)*1)}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:3.40282e+38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-b-\[0\.5px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:.5px}.border-divider{border-color:var(--color-divider)}.border-primary{border-color:var(--color-primary)}.bg-background{background-color:var(--color-background)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-selected{background-color:var(--color-selected)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-16{padding-right:calc(var(--spacing)*16)}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-background{color:var(--color-background)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-gray-400{color:var(--color-gray-400)}.text-green-500{color:var(--color-green-500)}.text-green-700{color:var(--color-green-700)}.text-primary{color:var(--color-primary)}.text-red-700{color:var(--color-red-700)}.text-surface{color:var(--color-surface)}.text-theme-gray{color:var(--color-theme-gray)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}}@keyframes spin{to{transform:rotate(1turn)}}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer utilities;:host{display:block}.master-tag-app{display:flex;flex-direction:column;max-height:calc(100vh - 120px);min-height:calc(100vh - 120px);overflow:hidden;width:100%}.master-tag-app,.master-tag-app-header{background-color:var(--color-background)}.master-tag-app-header{border-bottom:1px solid var(--color-border);padding:0 8px;position:sticky;top:0;z-index:10}.master-tag-app-title{color:var(--color-surface);font-size:1.25rem;font-weight:600;margin-bottom:1rem}.master-tag-app-controls{display:flex;flex-wrap:wrap;gap:1rem}.master-tag-app-search{flex-grow:1}.master-tag-app-content{flex:1;overflow-y:auto;padding:1rem}.master-tag-app-empty{align-items:center;color:var(--color-text-secondary);display:flex;flex-direction:column;justify-content:center;min-height:300px;text-align:center}.master-tag-app-empty-icon{color:var(--color-primary);height:80px;margin-bottom:1rem;transform:rotate(90deg);width:80px}.tag-sortable-ghost{background-color:var(--color-primary);opacity:.4}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@media (forced-colors:active){[type=checkbox]:checked,[type=radio]:checked{appearance:auto}[type=checkbox]:indeterminate{appearance:auto}}@media (hover:hover){.z-button-outlined:hover,.z-button-primary:hover,.z-icon-button-outlined:hover,.z-icon-button-primary:hover,.z-icon-button-text:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.z-button-group-item-tab:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.z-button-group-item-tab-unselected:hover{background-color:var(--color-white)}.z-button-group-item-primary-unselected:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.z-button-group-item-outlined-unselected:hover{background-color:#e028481a}@supports (color:color-mix(in lab,red,red)){.z-button-group-item-outlined-unselected:hover{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}@media screen and (min-width:0){.z-max-height{height:calc(100vh - 56px)}}@media screen and (min-width:600px){.z-max-height{height:calc(100vh - 64px)}}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { configStore } from "../../store/store";
|
|
3
|
+
import i18n from "../../global/i18n";
|
|
4
|
+
import { setDayjsLocale, setDayjsTimeZone } from "../../utils/dayjs";
|
|
3
5
|
import { getUserTags, createUserTag, updateUserTag, deleteUserTag, reorderUserTag, } from "../../api/index";
|
|
4
6
|
import { ZButton } from "../internal-component/z-button";
|
|
5
7
|
import { ZInput } from "../internal-component/z-input";
|
|
@@ -24,8 +26,21 @@ export class MasterTagApp {
|
|
|
24
26
|
dialogLoading = false;
|
|
25
27
|
containerRef;
|
|
26
28
|
sortable;
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
this.applyLanguage(this.languagePref);
|
|
31
|
+
this.applyTheme(this.themeMode);
|
|
32
|
+
this.setBusinessId(this.businessId);
|
|
33
|
+
this.setShopId(this.shopId);
|
|
34
|
+
this.setAccessToken(this.accessToken);
|
|
35
|
+
this.setIsProduction(this.isProduction);
|
|
36
|
+
this.setTimeZone(this.timeZone);
|
|
37
|
+
}
|
|
27
38
|
componentWillLoad() {
|
|
28
|
-
this.
|
|
39
|
+
this.setBusinessId(this.businessId);
|
|
40
|
+
this.setShopId(this.shopId);
|
|
41
|
+
this.setAccessToken(this.accessToken);
|
|
42
|
+
this.setIsProduction(this.isProduction);
|
|
43
|
+
this.setTimeZone(this.timeZone);
|
|
29
44
|
this.fetchData();
|
|
30
45
|
}
|
|
31
46
|
componentDidLoad() {
|
|
@@ -60,18 +75,61 @@ export class MasterTagApp {
|
|
|
60
75
|
disconnectedCallback() {
|
|
61
76
|
this.sortable?.destroy();
|
|
62
77
|
}
|
|
63
|
-
|
|
64
|
-
this.
|
|
78
|
+
handleLanguageChange(newValue) {
|
|
79
|
+
this.applyLanguage(newValue);
|
|
80
|
+
}
|
|
81
|
+
handleThemeChange(newValue) {
|
|
82
|
+
this.applyTheme(newValue);
|
|
83
|
+
}
|
|
84
|
+
handleBusinessIdChange(newValue) {
|
|
85
|
+
this.setBusinessId(newValue);
|
|
86
|
+
this.fetchData();
|
|
87
|
+
}
|
|
88
|
+
handleShopIdChange(newValue) {
|
|
89
|
+
this.setShopId(newValue);
|
|
65
90
|
this.fetchData();
|
|
66
91
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
92
|
+
handleAccessTokenChange(newValue) {
|
|
93
|
+
this.setAccessToken(newValue);
|
|
94
|
+
this.fetchData();
|
|
95
|
+
}
|
|
96
|
+
handleIsProductionChange(newValue) {
|
|
97
|
+
this.setIsProduction(newValue);
|
|
98
|
+
}
|
|
99
|
+
handleTimeZoneChange(newValue) {
|
|
100
|
+
this.setTimeZone(newValue);
|
|
101
|
+
}
|
|
102
|
+
applyLanguage(lang) {
|
|
103
|
+
if (i18n.language !== lang) {
|
|
104
|
+
i18n.changeLanguage(lang);
|
|
105
|
+
}
|
|
106
|
+
configStore.set('language', lang);
|
|
107
|
+
setDayjsLocale(lang);
|
|
108
|
+
}
|
|
109
|
+
applyTheme(theme) {
|
|
110
|
+
configStore.set('theme', theme);
|
|
111
|
+
}
|
|
112
|
+
setBusinessId(businessId) {
|
|
113
|
+
configStore.set('businessId', businessId || null);
|
|
114
|
+
}
|
|
115
|
+
setShopId(shopId) {
|
|
116
|
+
configStore.set('shopId', shopId || null);
|
|
117
|
+
}
|
|
118
|
+
setAccessToken(accessToken) {
|
|
119
|
+
configStore.set('accessToken', accessToken || null);
|
|
120
|
+
}
|
|
121
|
+
setIsProduction(isProduction) {
|
|
122
|
+
configStore.set('isProduction', isProduction);
|
|
123
|
+
}
|
|
124
|
+
setTimeZone(timeZone) {
|
|
125
|
+
if (!timeZone || timeZone === 'null') {
|
|
126
|
+
const resolved = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
127
|
+
configStore.set('timeZone', resolved);
|
|
128
|
+
setDayjsTimeZone(resolved);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
configStore.set('timeZone', timeZone);
|
|
132
|
+
setDayjsTimeZone(timeZone);
|
|
75
133
|
}
|
|
76
134
|
async fetchData() {
|
|
77
135
|
if (!this.businessId || !this.shopId || !this.accessToken)
|
|
@@ -193,10 +251,10 @@ export class MasterTagApp {
|
|
|
193
251
|
const theme = configStore.get('theme');
|
|
194
252
|
const t = useTranslation();
|
|
195
253
|
const filteredTags = this.tags.filter((s) => s.name.toLowerCase().includes(this.searchQuery.toLowerCase()));
|
|
196
|
-
return (h("div", { key: '
|
|
254
|
+
return (h("div", { key: '3b922c9029d9770b762208c1afbb659bc2e7199a', class: "master-tag-app", "data-theme": theme }, h("div", { key: 'af355f43d0a395164b327a3bc6b30f5196edee3d', class: "master-tag-app-header" }, h("h1", { key: '03ec599766c02b072919f9f4e7b22be746988538', class: "master-tag-app-title" }, t('tag')), h("div", { key: '5686c5a29a1119a39773edb1fd0ee4bf445325b1', class: "master-tag-app-controls" }, h("div", { key: 'bc28ea72fa772946a0e1d1d17144c9597ef083e6', class: "master-tag-app-search" }, h(ZInput, { key: 'ddb56f09d7a9c1fc4fdd7e2d5f5e75d42a37a7de', placeholder: t('master_data.search_tag'), value: this.searchQuery, onChange: (val) => (this.searchQuery = val) })), h(ZButton, { key: '8751e87b1c9a8d6e228210bb42d387a60fe846c2', variant: "outlined", label: t('master_data.add_tag'), onClick: () => {
|
|
197
255
|
this.editingItem = null;
|
|
198
256
|
this.dialogOpen = true;
|
|
199
|
-
}, startIcon: h(Icon, { name: "Plus" }) }))), h("div", { key: '
|
|
257
|
+
}, startIcon: h(Icon, { name: "Plus" }) }))), h("div", { key: '495cf874e6a6f0ac75a744b6a3a9eb08c4a9f5ed', class: "master-tag-app-content", ref: (el) => (this.containerRef = el) }, filteredTags.length > 0 ? (filteredTags.map((tag, index) => (h("master-data-item", { key: tag.id, item: {
|
|
200
258
|
id: tag.id || '',
|
|
201
259
|
name: tag.name,
|
|
202
260
|
color: tag.color || '',
|
|
@@ -206,7 +264,7 @@ export class MasterTagApp {
|
|
|
206
264
|
this.dialogOpen = true;
|
|
207
265
|
}, onMoveToTop: (e) => this.handleReorder(e.detail, 'top'), onMoveToBottom: (e) => this.handleReorder(e.detail, 'bottom') })))) : (h("div", { class: "master-tag-app-empty" }, h(Icon, { name: "Tag", addClass: "master-tag-app-empty-icon" }), h("p", null, this.searchQuery
|
|
208
266
|
? t('master_data.not_found_tag')
|
|
209
|
-
: t('master_data.tag_empty'))))), h("create-master-data-dialog", { key: '
|
|
267
|
+
: t('master_data.tag_empty'))))), h("create-master-data-dialog", { key: '0b22047815051f977d87525a68cc29227babf510', open: this.dialogOpen, dialogTitle: t('tag'), type: "tag", initialData: this.editingItem ? {
|
|
210
268
|
id: this.editingItem.id || '',
|
|
211
269
|
name: this.editingItem.name,
|
|
212
270
|
color: this.editingItem.color || ''
|
|
@@ -376,25 +434,25 @@ export class MasterTagApp {
|
|
|
376
434
|
static get watchers() {
|
|
377
435
|
return [{
|
|
378
436
|
"propName": "languagePref",
|
|
379
|
-
"methodName": "
|
|
437
|
+
"methodName": "handleLanguageChange"
|
|
380
438
|
}, {
|
|
381
439
|
"propName": "themeMode",
|
|
382
|
-
"methodName": "
|
|
440
|
+
"methodName": "handleThemeChange"
|
|
383
441
|
}, {
|
|
384
442
|
"propName": "businessId",
|
|
385
|
-
"methodName": "
|
|
443
|
+
"methodName": "handleBusinessIdChange"
|
|
386
444
|
}, {
|
|
387
445
|
"propName": "shopId",
|
|
388
|
-
"methodName": "
|
|
446
|
+
"methodName": "handleShopIdChange"
|
|
389
447
|
}, {
|
|
390
448
|
"propName": "accessToken",
|
|
391
|
-
"methodName": "
|
|
449
|
+
"methodName": "handleAccessTokenChange"
|
|
392
450
|
}, {
|
|
393
451
|
"propName": "isProduction",
|
|
394
|
-
"methodName": "
|
|
452
|
+
"methodName": "handleIsProductionChange"
|
|
395
453
|
}, {
|
|
396
454
|
"propName": "timeZone",
|
|
397
|
-
"methodName": "
|
|
455
|
+
"methodName": "handleTimeZoneChange"
|
|
398
456
|
}];
|
|
399
457
|
}
|
|
400
458
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-tag-app.js","sourceRoot":"","sources":["../../../src/components/master-tag-app/master-tag-app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,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,CAAC,WAAW,CAAC,IAAI;oBAC3B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE;iBACtC,CAAC,CAAC,CAAC,SAAS,EACb,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EACxC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACrF,QAAQ,EAAE,IAAI,CAAC,YAAY,GAC7B,CACA,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h, Watch } from '@stencil/core';\nimport { configStore } from '../../store/store';\nimport {\n getUserTags,\n createUserTag,\n updateUserTag,\n deleteUserTag,\n reorderUserTag,\n} from '../../api/index';\nimport { TTagOrStatusItem } from '../../store/type';\nimport { ZButton } from '../internal-component/z-button';\nimport { ZInput } from '../internal-component/z-input';\nimport { Icon } from '../internal-component/icon';\nimport { useTranslation } from '../../utils/utils';\nimport { DIALOG_TYPE, openDialog, handleError } from '../../store/dialog';\nimport { AxiosError } from 'axios';\nimport Sortable from 'sortablejs';\n\n@Component({\n tag: 'master-tag-app',\n styleUrl: 'master-tag-app.css',\n})\nexport class MasterTagApp {\n @Prop() languagePref: string = 'en';\n @Prop() themeMode: 'light' | 'dark' = 'light';\n @Prop() businessId: string;\n @Prop() shopId: string;\n @Prop() accessToken: string;\n @Prop() isProduction: boolean = false;\n @Prop() timeZone: string;\n\n @State() tags: TTagOrStatusItem[] = [];\n @State() searchQuery: string = '';\n @State() loading: boolean = false;\n @State() dialogOpen: boolean = false;\n @State() editingItem: TTagOrStatusItem | null = null;\n @State() dialogLoading: boolean = false;\n\n private containerRef?: HTMLElement;\n private sortable: Sortable;\n\n componentWillLoad() {\n this.updateConfig();\n this.fetchData();\n }\n\n componentDidLoad() {\n if (this.containerRef) {\n this.sortable = new Sortable(this.containerRef, {\n animation: 150,\n ghostClass: 'tag-sortable-ghost',\n onEnd: async (evt) => {\n const { oldIndex, newIndex } = evt;\n if (oldIndex === newIndex || oldIndex === undefined || newIndex === undefined) return;\n\n const newTags = [...this.tags];\n const [movedItem] = newTags.splice(oldIndex, 1);\n newTags.splice(newIndex, 0, movedItem);\n\n // Update sequences locally\n newTags.forEach((item, index) => {\n item.sequence = index;\n });\n\n this.tags = newTags;\n\n try {\n await reorderUserTag({ id: movedItem.id, sequence: newIndex + 1 });\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder tag');\n await this.fetchData(); // Revert on error\n }\n },\n });\n }\n }\n\n disconnectedCallback() {\n this.sortable?.destroy();\n }\n\n @Watch('languagePref')\n @Watch('themeMode')\n @Watch('businessId')\n @Watch('shopId')\n @Watch('accessToken')\n @Watch('isProduction')\n @Watch('timeZone')\n handleConfigChange() {\n this.updateConfig();\n this.fetchData();\n }\n\n private updateConfig() {\n configStore.set('language', this.languagePref as 'en' | 'th');\n configStore.set('theme', this.themeMode);\n configStore.set('businessId', this.businessId);\n configStore.set('shopId', this.shopId);\n configStore.set('accessToken', this.accessToken);\n configStore.set('isProduction', this.isProduction);\n configStore.set('timeZone', this.timeZone);\n }\n\n private async fetchData() {\n if (!this.businessId || !this.shopId || !this.accessToken) return;\n this.loading = true;\n try {\n const response = await getUserTags();\n this.tags = response.tags.sort((a, b) => a.sequence - b.sequence);\n } catch (error) {\n handleError(error, 'Failed to fetch tags');\n } finally {\n this.loading = false;\n }\n }\n\n private handleCreate = async (e: CustomEvent<{ name: string; color: string }>) => {\n this.dialogLoading = true;\n try {\n await createUserTag({ name: e.detail.name, color: e.detail.color });\n await this.fetchData();\n this.dialogOpen = false;\n } catch (error) {\n handleError(error, 'Failed to create tag');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleUpdate = async (e: CustomEvent<{ name: string; color: string }>) => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n try {\n await updateUserTag({\n id: this.editingItem.id,\n name: e.detail.name,\n color: e.detail.color,\n });\n await this.fetchData();\n this.dialogOpen = false;\n this.editingItem = null;\n } catch (error) {\n handleError(error, 'Failed to update tag');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleDelete = async () => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n const t = useTranslation();\n let total: number | undefined;\n try {\n await deleteUserTag({ id: this.editingItem.id, });\n } catch (error) {\n if (error instanceof AxiosError && error.response?.data?.code === 'user-tag-in-use') {\n total = error.response?.data?.data?.total;\n if (total) {\n openDialog({\n open: true,\n type: DIALOG_TYPE.WARNING,\n title: t('quick_message.delete_item_with_users_confirmation', { total }),\n buttonName: t('confirm'),\n cancelButtonName: t('cancel'),\n onSubmitDialog: async () => {\n try {\n await deleteUserTag({ id: this.editingItem.id, force: true });\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n } catch (e) {\n handleError(e, 'Failed to delete tag');\n }\n },\n });\n }\n } else {\n handleError(error, 'Failed to delete tag');\n }\n } finally {\n if (!total) {\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n }\n this.dialogLoading = false;\n }\n };\n\n private handleReorder = async (id: string, direction: 'top' | 'bottom') => {\n const currentIndex = this.tags.findIndex((s) => s.id === id);\n if (currentIndex === -1) return;\n\n let newSequence = 0;\n if (direction === 'top') {\n newSequence = 0;\n } else {\n const maxSeq = Math.max(...this.tags.map(s => s.sequence), 0);\n newSequence = maxSeq + 1;\n }\n\n try {\n await reorderUserTag({ id, sequence: newSequence });\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder tag');\n }\n };\n\n render() {\n const theme = configStore.get('theme');\n const t = useTranslation();\n const filteredTags = this.tags.filter((s) =>\n s.name.toLowerCase().includes(this.searchQuery.toLowerCase())\n );\n\n return (\n <div class=\"master-tag-app\" data-theme={theme}>\n <div class=\"master-tag-app-header\">\n <h1 class=\"master-tag-app-title\">{t('tag')}</h1>\n <div class=\"master-tag-app-controls\">\n <div class=\"master-tag-app-search\">\n <ZInput\n placeholder={t('master_data.search_tag')}\n value={this.searchQuery}\n onChange={(val) => (this.searchQuery = val)}\n />\n </div>\n <ZButton\n variant=\"outlined\"\n label={t('master_data.add_tag')}\n onClick={() => {\n this.editingItem = null;\n this.dialogOpen = true;\n }}\n startIcon={<Icon name=\"Plus\" />}\n />\n </div>\n </div>\n\n <div\n class=\"master-tag-app-content\"\n ref={(el) => (this.containerRef = el as HTMLElement)}\n >\n {filteredTags.length > 0 ? (\n filteredTags.map((tag, index) => (\n <master-data-item\n key={tag.id}\n item={{\n id: tag.id || '',\n name: tag.name,\n color: tag.color || '',\n sequence: tag.sequence || 0\n }}\n index={index}\n isFirst={index === 0}\n isLast={index === filteredTags.length - 1}\n isSearching={!!this.searchQuery}\n draggableItem={!this.searchQuery}\n onEdit={() => {\n this.editingItem = tag;\n this.dialogOpen = true;\n }}\n onMoveToTop={(e) => this.handleReorder(e.detail, 'top')}\n onMoveToBottom={(e) => this.handleReorder(e.detail, 'bottom')}\n />\n ))\n ) : (\n <div class=\"master-tag-app-empty\">\n <Icon name=\"Tag\" addClass=\"master-tag-app-empty-icon\" />\n <p>\n {this.searchQuery\n ? t('master_data.not_found_tag')\n : t('master_data.tag_empty')}\n </p>\n </div>\n )}\n </div>\n\n <create-master-data-dialog\n open={this.dialogOpen}\n dialogTitle={t('tag')}\n type=\"tag\"\n initialData={this.editingItem ? {\n id: this.editingItem.id || '',\n name: this.editingItem.name,\n color: this.editingItem.color || ''\n } : undefined}\n loading={this.dialogLoading}\n onClose={() => (this.dialogOpen = false)}\n onSubmitData={(e) => (this.editingItem ? this.handleUpdate(e) : this.handleCreate(e))}\n onDelete={this.handleDelete}\n />\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"master-tag-app.js","sourceRoot":"","sources":["../../../src/components/master-tag-app/master-tag-app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EACH,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,GACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC,MAAM,OAAO,YAAY;IACb,YAAY,GAAW,IAAI,CAAC;IAC5B,SAAS,GAAqB,OAAO,CAAC;IACtC,UAAU,CAAS;IACnB,MAAM,CAAS;IACf,WAAW,CAAS;IACpB,YAAY,GAAY,KAAK,CAAC;IAC9B,QAAQ,CAAS;IAEhB,IAAI,GAAuB,EAAE,CAAC;IAC9B,WAAW,GAAW,EAAE,CAAC;IACzB,OAAO,GAAY,KAAK,CAAC;IACzB,UAAU,GAAY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BAC3B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE;iBACtC,CAAC,CAAC,CAAC,SAAS,EACb,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,EACxC,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACrF,QAAQ,EAAE,IAAI,CAAC,YAAY,GAC7B,CACA,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h, Watch } from '@stencil/core';\nimport { configStore } from '../../store/store';\nimport i18n from '../../global/i18n';\nimport { setDayjsLocale, setDayjsTimeZone } from '../../utils/dayjs';\nimport {\n getUserTags,\n createUserTag,\n updateUserTag,\n deleteUserTag,\n reorderUserTag,\n} from '../../api/index';\nimport { TTagOrStatusItem } from '../../store/type';\nimport { ZButton } from '../internal-component/z-button';\nimport { ZInput } from '../internal-component/z-input';\nimport { Icon } from '../internal-component/icon';\nimport { useTranslation } from '../../utils/utils';\nimport { DIALOG_TYPE, openDialog, handleError } from '../../store/dialog';\nimport { AxiosError } from 'axios';\nimport Sortable from 'sortablejs';\n\n@Component({\n tag: 'master-tag-app',\n styleUrl: 'master-tag-app.css',\n})\nexport class MasterTagApp {\n @Prop() languagePref: string = 'en';\n @Prop() themeMode: 'light' | 'dark' = 'light';\n @Prop() businessId: string;\n @Prop() shopId: string;\n @Prop() accessToken: string;\n @Prop() isProduction: boolean = false;\n @Prop() timeZone: string;\n\n @State() tags: TTagOrStatusItem[] = [];\n @State() searchQuery: string = '';\n @State() loading: boolean = false;\n @State() dialogOpen: boolean = false;\n @State() editingItem: TTagOrStatusItem | null = null;\n @State() dialogLoading: boolean = false;\n\n private containerRef?: HTMLElement;\n private sortable: Sortable;\n\n connectedCallback() {\n this.applyLanguage(this.languagePref as 'en' | 'th');\n this.applyTheme(this.themeMode);\n this.setBusinessId(this.businessId);\n this.setShopId(this.shopId);\n this.setAccessToken(this.accessToken);\n this.setIsProduction(this.isProduction);\n this.setTimeZone(this.timeZone);\n }\n\n componentWillLoad() {\n this.setBusinessId(this.businessId);\n this.setShopId(this.shopId);\n this.setAccessToken(this.accessToken);\n this.setIsProduction(this.isProduction);\n this.setTimeZone(this.timeZone);\n this.fetchData();\n }\n\n componentDidLoad() {\n if (this.containerRef) {\n this.sortable = new Sortable(this.containerRef, {\n animation: 150,\n ghostClass: 'tag-sortable-ghost',\n onEnd: async (evt) => {\n const { oldIndex, newIndex } = evt;\n if (oldIndex === newIndex || oldIndex === undefined || newIndex === undefined) return;\n\n const newTags = [...this.tags];\n const [movedItem] = newTags.splice(oldIndex, 1);\n newTags.splice(newIndex, 0, movedItem);\n\n // Update sequences locally\n newTags.forEach((item, index) => {\n item.sequence = index;\n });\n\n this.tags = newTags;\n\n try {\n await reorderUserTag({ id: movedItem.id, sequence: newIndex + 1 });\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder tag');\n await this.fetchData(); // Revert on error\n }\n },\n });\n }\n }\n\n disconnectedCallback() {\n this.sortable?.destroy();\n }\n\n @Watch('languagePref')\n handleLanguageChange(newValue: string) {\n this.applyLanguage(newValue as 'en' | 'th');\n }\n\n @Watch('themeMode')\n handleThemeChange(newValue: 'light' | 'dark') {\n this.applyTheme(newValue);\n }\n\n @Watch('businessId')\n handleBusinessIdChange(newValue: string) {\n this.setBusinessId(newValue);\n this.fetchData();\n }\n\n @Watch('shopId')\n handleShopIdChange(newValue: string) {\n this.setShopId(newValue);\n this.fetchData();\n }\n\n @Watch('accessToken')\n handleAccessTokenChange(newValue: string) {\n this.setAccessToken(newValue);\n this.fetchData();\n }\n\n @Watch('isProduction')\n handleIsProductionChange(newValue: boolean) {\n this.setIsProduction(newValue);\n }\n\n @Watch('timeZone')\n handleTimeZoneChange(newValue: string) {\n this.setTimeZone(newValue);\n }\n\n private applyLanguage(lang: 'th' | 'en') {\n if (i18n.language !== lang) {\n i18n.changeLanguage(lang);\n }\n configStore.set('language', lang);\n setDayjsLocale(lang);\n }\n\n private applyTheme(theme: 'dark' | 'light') {\n configStore.set('theme', theme);\n }\n\n private setBusinessId(businessId?: string) {\n configStore.set('businessId', businessId || null);\n }\n\n private setShopId(shopId?: string) {\n configStore.set('shopId', shopId || null);\n }\n\n private setAccessToken(accessToken?: string) {\n configStore.set('accessToken', accessToken || null);\n }\n\n private setIsProduction(isProduction: boolean) {\n configStore.set('isProduction', isProduction);\n }\n\n private setTimeZone(timeZone?: string) {\n if (!timeZone || timeZone === 'null') {\n const resolved = Intl.DateTimeFormat().resolvedOptions().timeZone;\n configStore.set('timeZone', resolved);\n setDayjsTimeZone(resolved);\n return;\n }\n\n configStore.set('timeZone', timeZone);\n setDayjsTimeZone(timeZone);\n }\n\n private async fetchData() {\n if (!this.businessId || !this.shopId || !this.accessToken) return;\n this.loading = true;\n try {\n const response = await getUserTags();\n this.tags = response.tags.sort((a, b) => a.sequence - b.sequence);\n } catch (error) {\n handleError(error, 'Failed to fetch tags');\n } finally {\n this.loading = false;\n }\n }\n\n private handleCreate = async (e: CustomEvent<{ name: string; color: string }>) => {\n this.dialogLoading = true;\n try {\n await createUserTag({ name: e.detail.name, color: e.detail.color });\n await this.fetchData();\n this.dialogOpen = false;\n } catch (error) {\n handleError(error, 'Failed to create tag');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleUpdate = async (e: CustomEvent<{ name: string; color: string }>) => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n try {\n await updateUserTag({\n id: this.editingItem.id,\n name: e.detail.name,\n color: e.detail.color,\n });\n await this.fetchData();\n this.dialogOpen = false;\n this.editingItem = null;\n } catch (error) {\n handleError(error, 'Failed to update tag');\n } finally {\n this.dialogLoading = false;\n }\n };\n\n private handleDelete = async () => {\n if (!this.editingItem) return;\n this.dialogLoading = true;\n const t = useTranslation();\n let total: number | undefined;\n try {\n await deleteUserTag({ id: this.editingItem.id, });\n } catch (error) {\n if (error instanceof AxiosError && error.response?.data?.code === 'user-tag-in-use') {\n total = error.response?.data?.data?.total;\n if (total) {\n openDialog({\n open: true,\n type: DIALOG_TYPE.WARNING,\n title: t('quick_message.delete_item_with_users_confirmation', { total }),\n buttonName: t('confirm'),\n cancelButtonName: t('cancel'),\n onSubmitDialog: async () => {\n try {\n await deleteUserTag({ id: this.editingItem.id, force: true });\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n } catch (e) {\n handleError(e, 'Failed to delete tag');\n }\n },\n });\n }\n } else {\n handleError(error, 'Failed to delete tag');\n }\n } finally {\n if (!total) {\n this.dialogOpen = false;\n this.editingItem = null;\n await this.fetchData();\n }\n this.dialogLoading = false;\n }\n };\n\n private handleReorder = async (id: string, direction: 'top' | 'bottom') => {\n const currentIndex = this.tags.findIndex((s) => s.id === id);\n if (currentIndex === -1) return;\n\n let newSequence = 0;\n if (direction === 'top') {\n newSequence = 0;\n } else {\n const maxSeq = Math.max(...this.tags.map(s => s.sequence), 0);\n newSequence = maxSeq + 1;\n }\n\n try {\n await reorderUserTag({ id, sequence: newSequence });\n await this.fetchData();\n } catch (error) {\n handleError(error, 'Failed to reorder tag');\n }\n };\n\n render() {\n const theme = configStore.get('theme');\n const t = useTranslation();\n const filteredTags = this.tags.filter((s) =>\n s.name.toLowerCase().includes(this.searchQuery.toLowerCase())\n );\n\n return (\n <div class=\"master-tag-app\" data-theme={theme}>\n <div class=\"master-tag-app-header\">\n <h1 class=\"master-tag-app-title\">{t('tag')}</h1>\n <div class=\"master-tag-app-controls\">\n <div class=\"master-tag-app-search\">\n <ZInput\n placeholder={t('master_data.search_tag')}\n value={this.searchQuery}\n onChange={(val) => (this.searchQuery = val)}\n />\n </div>\n <ZButton\n variant=\"outlined\"\n label={t('master_data.add_tag')}\n onClick={() => {\n this.editingItem = null;\n this.dialogOpen = true;\n }}\n startIcon={<Icon name=\"Plus\" />}\n />\n </div>\n </div>\n\n <div\n class=\"master-tag-app-content\"\n ref={(el) => (this.containerRef = el as HTMLElement)}\n >\n {filteredTags.length > 0 ? (\n filteredTags.map((tag, index) => (\n <master-data-item\n key={tag.id}\n item={{\n id: tag.id || '',\n name: tag.name,\n color: tag.color || '',\n sequence: tag.sequence || 0\n }}\n index={index}\n isFirst={index === 0}\n isLast={index === filteredTags.length - 1}\n isSearching={!!this.searchQuery}\n draggableItem={!this.searchQuery}\n onEdit={() => {\n this.editingItem = tag;\n this.dialogOpen = true;\n }}\n onMoveToTop={(e) => this.handleReorder(e.detail, 'top')}\n onMoveToBottom={(e) => this.handleReorder(e.detail, 'bottom')}\n />\n ))\n ) : (\n <div class=\"master-tag-app-empty\">\n <Icon name=\"Tag\" addClass=\"master-tag-app-empty-icon\" />\n <p>\n {this.searchQuery\n ? t('master_data.not_found_tag')\n : t('master_data.tag_empty')}\n </p>\n </div>\n )}\n </div>\n\n <create-master-data-dialog\n open={this.dialogOpen}\n dialogTitle={t('tag')}\n type=\"tag\"\n initialData={this.editingItem ? {\n id: this.editingItem.id || '',\n name: this.editingItem.name,\n color: this.editingItem.color || ''\n } : undefined}\n loading={this.dialogLoading}\n onClose={() => (this.dialogOpen = false)}\n onSubmitData={(e) => (this.editingItem ? this.handleUpdate(e) : this.handleCreate(e))}\n onDelete={this.handleDelete}\n />\n </div>\n );\n }\n}\n"]}
|