@7365admin1/layer-common 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.editorconfig +12 -0
  4. package/.github/workflows/main.yml +17 -0
  5. package/.github/workflows/publish.yml +39 -0
  6. package/.nuxtrc +1 -0
  7. package/.playground/app.vue +41 -0
  8. package/.playground/eslint.config.mjs +6 -0
  9. package/.playground/nuxt.config.ts +22 -0
  10. package/.playground/pages/feedback.vue +30 -0
  11. package/CHANGELOG.md +263 -0
  12. package/README.md +73 -0
  13. package/app.vue +3 -0
  14. package/components/AccessCardAddForm.vue +363 -0
  15. package/components/AccessManagement.vue +420 -0
  16. package/components/Avatar/Main.vue +68 -0
  17. package/components/BillingMain.vue +66 -0
  18. package/components/BtnUploadFile.vue +139 -0
  19. package/components/BuildingForm.vue +303 -0
  20. package/components/BuildingManagement/buildings.vue +335 -0
  21. package/components/BuildingManagement/units.vue +350 -0
  22. package/components/BuildingUnitFormAdd.vue +441 -0
  23. package/components/BuildingUnitFormEdit.vue +429 -0
  24. package/components/CameraForm.vue +264 -0
  25. package/components/CameraMain.vue +352 -0
  26. package/components/Card/DeleteConfirmation.vue +51 -0
  27. package/components/Card/MemberInfoSummary.vue +44 -0
  28. package/components/Card/Toggle.vue +25 -0
  29. package/components/Chat/Bubbles.vue +53 -0
  30. package/components/Chat/Information.vue +416 -0
  31. package/components/Chat/ListCard.vue +62 -0
  32. package/components/Chat/Message.vue +158 -0
  33. package/components/Chat/Navigation.vue +150 -0
  34. package/components/ConfirmDialog.vue +66 -0
  35. package/components/Container/Standard.vue +33 -0
  36. package/components/DashboardPlaceholder.vue +1524 -0
  37. package/components/Dialog/DeleteConfirmation.vue +51 -0
  38. package/components/Dialog/ReplaceAutofillPrompt.vue +49 -0
  39. package/components/Dialog/UpdateMoreAction.vue +103 -0
  40. package/components/DocumentForm.vue +187 -0
  41. package/components/DocumentManagement.vue +376 -0
  42. package/components/Editor.vue +95 -0
  43. package/components/EntryPassMain.vue +518 -0
  44. package/components/Feedback/Form.vue +173 -0
  45. package/components/FeedbackDetail.vue +599 -0
  46. package/components/FeedbackMain.vue +588 -0
  47. package/components/FormDialog.vue +65 -0
  48. package/components/ImageCarousel.vue +138 -0
  49. package/components/Input/Date.vue +177 -0
  50. package/components/Input/DateTimePicker.vue +131 -0
  51. package/components/Input/File.vue +236 -0
  52. package/components/Input/FileV2.vue +234 -0
  53. package/components/Input/InputPhoneNumberV2.vue +164 -0
  54. package/components/Input/ListGroupSelection.vue +96 -0
  55. package/components/Input/NRICNumber.vue +53 -0
  56. package/components/Input/NewDate.vue +123 -0
  57. package/components/Input/Number.vue +124 -0
  58. package/components/Input/Password.vue +22 -0
  59. package/components/Input/PhoneNumber.vue +188 -0
  60. package/components/Input/VehicleNumber.vue +49 -0
  61. package/components/InputLabel.vue +22 -0
  62. package/components/InvitationForm.vue +359 -0
  63. package/components/InvitationMain.vue +310 -0
  64. package/components/Layout/Header.vue +129 -0
  65. package/components/Layout/NavigationDrawer.vue +44 -0
  66. package/components/ListItem.vue +35 -0
  67. package/components/ListView.vue +87 -0
  68. package/components/LocalPagination.vue +31 -0
  69. package/components/MemberMain.vue +459 -0
  70. package/components/NFC/NFCPatrolReportMain.vue +591 -0
  71. package/components/NFC/NFCPatrolRouteForm.vue +596 -0
  72. package/components/NFC/NFCPatrolRouteMain.vue +539 -0
  73. package/components/NFC/NFCTagForm.vue +236 -0
  74. package/components/NFC/NFCTagMain.vue +337 -0
  75. package/components/NFC/PatrolSettings.vue +130 -0
  76. package/components/NavigationItem.vue +83 -0
  77. package/components/NumberSettingField.vue +107 -0
  78. package/components/OnlineFormConfigurationForm.vue +290 -0
  79. package/components/OnlineFormsConfiguration.vue +429 -0
  80. package/components/PeopleForm.vue +452 -0
  81. package/components/PlaceholderComponent.vue +34 -0
  82. package/components/RolePermissionFormCreate.vue +161 -0
  83. package/components/RolePermissionFormPreviewUpdate.vue +183 -0
  84. package/components/RolePermissionMain.vue +361 -0
  85. package/components/SearchVehicleNumberUser.vue +91 -0
  86. package/components/ServiceProviderFormCreate.vue +154 -0
  87. package/components/ServiceProviderMain.vue +547 -0
  88. package/components/SignaturePad.vue +73 -0
  89. package/components/Snackbar.vue +23 -0
  90. package/components/SpecificAttr.vue +53 -0
  91. package/components/SupplyManagement.vue +292 -0
  92. package/components/SwitchContext.vue +108 -0
  93. package/components/TableList.vue +150 -0
  94. package/components/TableListSecondary.vue +164 -0
  95. package/components/TableMain.vue +142 -0
  96. package/components/TableWithButton.vue +94 -0
  97. package/components/VehicleUpdateMoreAction.vue +84 -0
  98. package/components/VideoPlayer.vue +125 -0
  99. package/components/VisitorForm.vue +659 -0
  100. package/components/VisitorFormSelection.vue +53 -0
  101. package/components/VisitorManagement.vue +490 -0
  102. package/components/WorkOrder/Create.vue +284 -0
  103. package/components/WorkOrder/Detail.vue +71 -0
  104. package/components/WorkOrder/ListView.vue +96 -0
  105. package/components/WorkOrder/Main.vue +489 -0
  106. package/components/Workorder.vue +1 -0
  107. package/composables/useAddress.ts +107 -0
  108. package/composables/useBuilding.ts +250 -0
  109. package/composables/useBuildingUnit.ts +116 -0
  110. package/composables/useCard.ts +46 -0
  111. package/composables/useCommonPermission.ts +207 -0
  112. package/composables/useCustomer.ts +113 -0
  113. package/composables/useCustomerSite.ts +56 -0
  114. package/composables/useDashboard.ts +31 -0
  115. package/composables/useDashboardData.ts +425 -0
  116. package/composables/useDocument.ts +57 -0
  117. package/composables/useFacility.ts +246 -0
  118. package/composables/useFeedback.ts +119 -0
  119. package/composables/useFile.ts +55 -0
  120. package/composables/useInvoice.ts +18 -0
  121. package/composables/useLocal.ts +131 -0
  122. package/composables/useLocalAuth.ts +137 -0
  123. package/composables/useLocalSetup.ts +13 -0
  124. package/composables/useMember.ts +111 -0
  125. package/composables/useNFCPatrolRoute.ts +77 -0
  126. package/composables/useNFCPatrolSettings.ts +19 -0
  127. package/composables/useNFCPatrolTag.ts +53 -0
  128. package/composables/useOnlineForm.ts +67 -0
  129. package/composables/useOrg.ts +129 -0
  130. package/composables/usePDFDownload.ts +25 -0
  131. package/composables/usePaymentMethod.ts +101 -0
  132. package/composables/usePeople.ts +81 -0
  133. package/composables/usePermission.ts +54 -0
  134. package/composables/usePhoneCountries.ts +561 -0
  135. package/composables/usePrice.ts +15 -0
  136. package/composables/usePromoCode.ts +36 -0
  137. package/composables/useRecapPermission.ts +26 -0
  138. package/composables/useRole.ts +104 -0
  139. package/composables/useSecurityUtils.ts +18 -0
  140. package/composables/useServiceProvider.ts +224 -0
  141. package/composables/useSite.ts +109 -0
  142. package/composables/useSiteEntryPassSettings.ts +46 -0
  143. package/composables/useSiteSettings.ts +123 -0
  144. package/composables/useSubscription.ts +150 -0
  145. package/composables/useUser.ts +132 -0
  146. package/composables/useUtils.ts +445 -0
  147. package/composables/useVerification.ts +34 -0
  148. package/composables/useVisitor.ts +120 -0
  149. package/composables/useWorkOrder.ts +85 -0
  150. package/error.vue +41 -0
  151. package/layouts/plain.vue +7 -0
  152. package/middleware/01.auth.ts +20 -0
  153. package/middleware/02.org.ts +21 -0
  154. package/middleware/03.customer.ts +13 -0
  155. package/middleware/member.ts +4 -0
  156. package/nuxt.config.ts +54 -0
  157. package/package.json +39 -0
  158. package/pages/index.vue +3 -0
  159. package/pages/payment-method-linked.vue +31 -0
  160. package/pages/require-customer.vue +56 -0
  161. package/pages/require-organization-membership.vue +47 -0
  162. package/pages/unauthorized.vue +29 -0
  163. package/plugins/API.ts +21 -0
  164. package/plugins/iconify.client.ts +5 -0
  165. package/plugins/secure-member.client.ts +86 -0
  166. package/plugins/vuetify.ts +62 -0
  167. package/public/bg-camera.jpg +0 -0
  168. package/public/bg-city.jpg +0 -0
  169. package/public/bg-condo.jpg +0 -0
  170. package/public/images/icons/delete-icon.png +0 -0
  171. package/public/sprite.svg +1 -0
  172. package/tsconfig.json +3 -0
  173. package/types/address.d.ts +13 -0
  174. package/types/building.d.ts +27 -0
  175. package/types/camera.d.ts +31 -0
  176. package/types/card.d.ts +22 -0
  177. package/types/customer.d.ts +27 -0
  178. package/types/document.d.ts +6 -0
  179. package/types/feedback.d.ts +68 -0
  180. package/types/local.d.ts +74 -0
  181. package/types/member.d.ts +21 -0
  182. package/types/online-form.d.ts +15 -0
  183. package/types/org.d.ts +13 -0
  184. package/types/people.d.ts +24 -0
  185. package/types/permission.d.ts +25 -0
  186. package/types/phone-number.d.ts +10 -0
  187. package/types/price.d.ts +17 -0
  188. package/types/promo-code.d.ts +19 -0
  189. package/types/role.d.ts +11 -0
  190. package/types/select.d.ts +4 -0
  191. package/types/service-provider.d.ts +15 -0
  192. package/types/site.d.ts +20 -0
  193. package/types/subscription.d.ts +23 -0
  194. package/types/user.d.ts +19 -0
  195. package/types/verification.d.ts +20 -0
  196. package/types/visitor.d.ts +42 -0
  197. package/types/work-order.d.ts +42 -0
  198. package/utils/phoneMasks.ts +1703 -0
@@ -0,0 +1,376 @@
1
+ <template>
2
+ <v-row no-gutters>
3
+ <v-col cols="12" class="mb-2">
4
+ <v-row no-gutters>
5
+ <v-btn
6
+ class="text-none"
7
+ rounded="pill"
8
+ variant="tonal"
9
+ size="large"
10
+ @click="setDocument()"
11
+ v-if="canCreate && canCreateDocument"
12
+ >
13
+ Add Document
14
+ </v-btn>
15
+ </v-row>
16
+ </v-col>
17
+ <v-col cols="12">
18
+ <v-card
19
+ width="100%"
20
+ variant="outlined"
21
+ border="thin"
22
+ rounded="lg"
23
+ :loading="loading"
24
+ >
25
+ <v-toolbar density="compact" color="grey-lighten-4">
26
+ <template #prepend>
27
+ <v-btn fab icon density="comfortable" @click="getDocuments">
28
+ <v-icon>mdi-refresh</v-icon>
29
+ </v-btn>
30
+ </template>
31
+
32
+ <template #append>
33
+ <v-row no-gutters justify="end" align="center">
34
+ <span class="mr-2 text-caption text-fontgray">
35
+ {{ pageRange }}
36
+ </span>
37
+ <local-pagination
38
+ v-model="page"
39
+ :length="pages"
40
+ @update:value="getDocuments"
41
+ />
42
+ </v-row>
43
+ </template>
44
+ </v-toolbar>
45
+ <v-data-table
46
+ :headers="headers"
47
+ :items="items"
48
+ item-value="_id"
49
+ items-per-page="10"
50
+ fixed-header
51
+ hide-default-footer
52
+ @click:row="tableRowClickHandler"
53
+ style="max-height: calc(100vh - (200px))"
54
+ ></v-data-table>
55
+ </v-card>
56
+ </v-col>
57
+
58
+ <!-- Create Dialog -->
59
+ <v-dialog v-model="createDialog" width="450" persistent>
60
+ <DocumentForm @cancel="createDialog = false" @success="successCreate()" />
61
+ </v-dialog>
62
+
63
+ <!-- Edit Dialog -->
64
+ <v-dialog v-model="editDialog" width="450" persistent>
65
+ <DocumentForm
66
+ mode="edit"
67
+ @cancel="editDialog = false"
68
+ @success="successUpdate()"
69
+ :document="selectedDocument"
70
+ />
71
+ </v-dialog>
72
+
73
+ <!-- Preview Dialog -->
74
+ <v-dialog v-model="previewDialog" width="450" persistent>
75
+ <v-card width="100%">
76
+ <v-card-text style="max-height: 100vh; overflow-y: auto" class="pb-0">
77
+ <v-row no-gutters class="mb-4">
78
+ <v-col cols="12">
79
+ <strong>Name:</strong> {{ selectedDocument?.name ?? "N/A" }}
80
+ </v-col>
81
+ <v-col cols="12">
82
+ <strong>Type:</strong> {{ selectedDocument?.type ?? "N/A" }}
83
+ </v-col>
84
+ <v-col cols="12">
85
+ <strong>Document: </strong>
86
+ <NuxtLink
87
+ :to="getFileUrl(selectedDocument.attachment)"
88
+ external
89
+ target="_blank"
90
+ >
91
+ View Document
92
+ </NuxtLink>
93
+ </v-col>
94
+ </v-row>
95
+ </v-card-text>
96
+ <v-toolbar class="pa-0" density="compact">
97
+ <v-row no-gutters>
98
+ <v-col cols="6" class="pa-0">
99
+ <v-btn
100
+ block
101
+ variant="text"
102
+ class="text-none"
103
+ size="large"
104
+ @click="previewDialog = false"
105
+ height="48"
106
+ >
107
+ Close
108
+ </v-btn>
109
+ </v-col>
110
+ <v-col cols="6" class="pa-0">
111
+ <v-menu>
112
+ <template #activator="{ props }">
113
+ <v-btn
114
+ block
115
+ variant="flat"
116
+ color="black"
117
+ class="text-none"
118
+ height="48"
119
+ v-bind="props"
120
+ tile
121
+ >
122
+ More actions
123
+ </v-btn>
124
+ </template>
125
+ <v-list class="pa-0">
126
+ <v-list-item
127
+ v-if="canUpdateDocument"
128
+ @click="openEditDialog()"
129
+ >
130
+ <v-list-item-title class="text-subtitle-2">
131
+ Edit Document
132
+ </v-list-item-title>
133
+ </v-list-item>
134
+
135
+ <v-list-item
136
+ v-if="canDeleteDocument"
137
+ @click="openDeleteDialog()"
138
+ class="text-red"
139
+ >
140
+ <v-list-item-title class="text-subtitle-2">
141
+ Delete Document
142
+ </v-list-item-title>
143
+ </v-list-item>
144
+ </v-list>
145
+ </v-menu>
146
+ </v-col>
147
+ </v-row>
148
+ </v-toolbar>
149
+ </v-card>
150
+ </v-dialog>
151
+
152
+ <!-- Delete Dialog -->
153
+ <v-dialog
154
+ v-model="confirmDialog"
155
+ :loading="deleteLoading"
156
+ width="450"
157
+ persistent
158
+ >
159
+ <v-card width="100%">
160
+ <v-toolbar density="compact" class="pl-4">
161
+ <span class="font-weight-medium text-h5">Delete Document</span>
162
+ </v-toolbar>
163
+ <v-card-text>
164
+ <p class="text-subtitle-2 text-center">
165
+ Are you sure you want to delete this document? This action cannot be
166
+ undone.
167
+ </p>
168
+
169
+ <v-row v-if="message" no-gutters justify="center" class="mt-4">
170
+ <span class="text-caption text-error text-center">
171
+ {{ message }}
172
+ </span>
173
+ </v-row>
174
+ </v-card-text>
175
+
176
+ <v-toolbar density="compact">
177
+ <v-row no-gutters>
178
+ <v-col cols="6">
179
+ <v-btn
180
+ tile
181
+ block
182
+ size="48"
183
+ variant="text"
184
+ class="text-none"
185
+ @click="confirmDialog = false"
186
+ :disabled="deleteLoading"
187
+ >
188
+ Close
189
+ </v-btn>
190
+ </v-col>
191
+ <v-col cols="6">
192
+ <v-btn
193
+ tile
194
+ block
195
+ size="48"
196
+ color="black"
197
+ variant="flat"
198
+ class="text-none"
199
+ @click="handleDeleteDocument"
200
+ :loading="deleteLoading"
201
+ >
202
+ Delete Document
203
+ </v-btn>
204
+ </v-col>
205
+ </v-row>
206
+ </v-toolbar>
207
+ </v-card>
208
+ </v-dialog>
209
+
210
+ <Snackbar v-model="messageSnackbar" :text="message" :color="messageColor" />
211
+ </v-row>
212
+ </template>
213
+ <script setup lang="ts">
214
+ definePageMeta({
215
+ middleware: ["01-auth", "02-org"],
216
+ memberOnly: true,
217
+ });
218
+ const props = defineProps({
219
+ headers: {
220
+ type: Array as PropType<Array<Record<string, any>>>,
221
+ default: () => [
222
+ {
223
+ title: "Name",
224
+ value: "name",
225
+ },
226
+ {
227
+ title: "Type",
228
+ value: "type",
229
+ },
230
+ // { title: "Action", value: "action-table" },
231
+ ],
232
+ },
233
+ canCreate: {
234
+ type: Boolean,
235
+ default: true,
236
+ },
237
+ canUpdate: {
238
+ type: Boolean,
239
+ default: true,
240
+ },
241
+ canDelete: {
242
+ type: Boolean,
243
+ default: true,
244
+ },
245
+ canCreateDocument: {
246
+ type: Boolean,
247
+ default: true,
248
+ },
249
+ canUpdateDocument: {
250
+ type: Boolean,
251
+ default: true,
252
+ },
253
+ canDeleteDocument: {
254
+ type: Boolean,
255
+ default: true,
256
+ },
257
+ });
258
+
259
+ const { headerSearch } = useLocal();
260
+ const { getAll: _getAllDocuments, deleteById } = useDocument();
261
+ const { getFileUrl } = useFile();
262
+
263
+ const page = ref(1);
264
+ const pages = ref(0);
265
+ const pageRange = ref("-- - -- of --");
266
+
267
+ const message = ref("");
268
+ const messageSnackbar = ref(false);
269
+ const messageColor = ref("");
270
+
271
+ const items = ref<Array<Record<string, any>>>([]);
272
+
273
+ const {
274
+ data: getDocumentReq,
275
+ refresh: getDocuments,
276
+ status: getAllReqStatus,
277
+ } = useLazyAsyncData(
278
+ "get-all-documents",
279
+ () =>
280
+ _getAllDocuments({
281
+ page: page.value,
282
+ search: headerSearch.value,
283
+ }),
284
+ {
285
+ watch: [page, headerSearch],
286
+ }
287
+ );
288
+
289
+ const loading = computed(() => getAllReqStatus.value === "pending");
290
+
291
+ watchEffect(() => {
292
+ if (getDocumentReq.value) {
293
+ items.value = getDocumentReq.value.items;
294
+ pages.value = getDocumentReq.value.pages;
295
+ pageRange.value = getDocumentReq.value.pageRange;
296
+ }
297
+ });
298
+
299
+ const createDialog = ref(false);
300
+ const editDialog = ref(false);
301
+ const previewDialog = ref(false);
302
+ const selectedDocument = ref<TDocument>({
303
+ _id: "",
304
+ name: "",
305
+ attachment: "",
306
+ type: ""
307
+ });
308
+ const deleteLoading = ref(false);
309
+ const confirmDialog = ref(false);
310
+ const selectedDocumentId = ref<string | null>(null);
311
+
312
+ function tableRowClickHandler(_: any, data: any) {
313
+ selectedDocument.value = data.item as TDocument;
314
+ previewDialog.value = true;
315
+ }
316
+
317
+ function setDocument({
318
+ mode = "create",
319
+ dialog = true,
320
+ data = {} as TDocument,
321
+ } = {}) {
322
+ if (mode === "create") {
323
+ createDialog.value = dialog;
324
+ } else if (mode === "edit") {
325
+ editDialog.value = dialog;
326
+ selectedDocument.value = data;
327
+ } else if (mode === "preview") {
328
+ previewDialog.value = dialog;
329
+ selectedDocument.value = data;
330
+ }
331
+ }
332
+
333
+ function showMessage(msg: string, color: string) {
334
+ message.value = msg;
335
+ messageColor.value = color;
336
+ messageSnackbar.value = true;
337
+ }
338
+
339
+ function successCreate() {
340
+ createDialog.value = false;
341
+ getDocuments();
342
+ showMessage("Document created successfully!", "success");
343
+ }
344
+
345
+ function openDeleteDialog() {
346
+ confirmDialog.value = true;
347
+ message.value = "";
348
+ }
349
+
350
+ function openEditDialog() {
351
+ editDialog.value = true;
352
+ }
353
+
354
+ async function handleDeleteDocument() {
355
+ deleteLoading.value = true;
356
+ try {
357
+ await deleteById(selectedDocument.value._id ?? "");
358
+ await getDocuments();
359
+ selectedDocumentId.value = null;
360
+ confirmDialog.value = false;
361
+ previewDialog.value = false;
362
+ } catch (error: any) {
363
+ message.value =
364
+ error?.response?._data?.message || "Failed to delete document";
365
+ } finally {
366
+ deleteLoading.value = false;
367
+ }
368
+ }
369
+
370
+ function successUpdate() {
371
+ editDialog.value = false;
372
+ previewDialog.value = false;
373
+ getDocuments();
374
+ showMessage("Document updated successfully!", "success");
375
+ };
376
+ </script>
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <ClientOnly>
3
+ <v-row no-gutters class="ckeditor-container w-100">
4
+ <ckeditor v-model="data" :editor="ClassicEditor" :config="config" @ready="onReady" :key="prop.readOnly" />
5
+ </v-row>
6
+ </ClientOnly>
7
+ </template>
8
+
9
+ <script setup>
10
+
11
+ const prop = defineProps({
12
+ readOnly: {
13
+ type: Boolean,
14
+ required: false
15
+ }
16
+ })
17
+ import {
18
+ ClassicEditor,
19
+ Essentials,
20
+ Paragraph,
21
+ Bold,
22
+ Italic,
23
+ Heading,
24
+ List,
25
+ Link,
26
+ Alignment,
27
+ Font,
28
+ } from 'ckeditor5'
29
+ import { Ckeditor } from '@ckeditor/ckeditor5-vue'
30
+ import 'ckeditor5/ckeditor5.css';
31
+
32
+ import 'ckeditor5/ckeditor5.css'
33
+
34
+ const data = defineModel({ required: true, default: "" })
35
+
36
+ const editorInstance = ref(null);
37
+
38
+ const config = computed(() => ({
39
+ licenseKey: 'GPL',
40
+ plugins: [Essentials, Paragraph, Bold, Italic, Heading, List, Alignment, Font],
41
+ toolbar: [
42
+ 'undo', 'redo',
43
+ '|', 'bold', 'italic',
44
+ '|', 'fontSize', 'fontColor', 'fontBackgroundColor',
45
+ '|', 'bulletedList', 'numberedList',
46
+ '|', 'heading', '|', 'alignment:left', 'alignment:center', 'alignment:right', 'alignment:justify',
47
+ ],
48
+ }))
49
+
50
+
51
+ function onReady(editor) {
52
+ editorInstance.value = editor;
53
+ toggleReadOnly(prop.readOnly);
54
+ }
55
+
56
+ function toggleReadOnly(isReadOnly) {
57
+ if (!editorInstance.value) return;
58
+
59
+
60
+ if (isReadOnly) {
61
+ editorInstance.value.enableReadOnlyMode("view-mode-lock");
62
+ } else {
63
+ editorInstance.value.disableReadOnlyMode("view-mode-lock");
64
+ }
65
+ }
66
+
67
+ watch(
68
+ () => prop.readOnly,
69
+ (newVal) => {
70
+ toggleReadOnly(newVal);
71
+ }
72
+ );
73
+
74
+
75
+ </script>
76
+
77
+ <style scoped>
78
+ .ckeditor-container {
79
+ width: 100%;
80
+ max-width: 100% !important;
81
+ overflow: hidden;
82
+ }
83
+
84
+ :deep(.ck.ck-editor) {
85
+ width: 100% !important;
86
+ max-width: 100%;
87
+ box-sizing: border-box;
88
+ }
89
+
90
+ :deep(.ck-editor__editable_inline) {
91
+ min-height: 200px;
92
+ width: 100% !important;
93
+ box-sizing: border-box;
94
+ }
95
+ </style>