@skyworx/dynamic-ui 1.0.43 → 1.0.45
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/README.md +38 -38
- package/dist/{docx-preview-DFe9VY4J.js → docx-preview-Czb3gqZc.js} +1 -1
- package/dist/dynamic-ui.css +1 -1
- package/dist/dynamic-ui.es.js +1 -1
- package/dist/dynamic-ui.umd.js +310 -252
- package/dist/{index--kSDer8n.js → index-BJuz0zGP.js} +27735 -27155
- package/dist/{jszip.min-NMotBpMA.js → jszip.min-BGchZUav.js} +1 -1
- package/dist/pdf-DoBFB-iX.js +17130 -0
- package/dist/pdf.worker-Dnx0VvWa.js +33870 -0
- package/dist/{pptx-preview.es-C1EHNQHe.js → pptx-preview.es-Dj5S_k8I.js} +2 -2
- package/dist/types/components/base/DCodeButtonGroup.test.d.ts +1 -0
- package/dist/types/components/base/DCodeMapField.vue.d.ts +1 -1
- package/dist/types/components/base/DCodePagination.test.d.ts +1 -0
- package/dist/types/utils/pagination.utils.d.ts +18 -0
- package/dist/types/utils/pagination.utils.test.d.ts +1 -0
- package/dist/types/utils/pdfPreview.d.ts +64 -0
- package/dist/types/utils/pdfPreview.test.d.ts +1 -0
- package/dist/{viewer-B74BOtnp.js → viewer-BzO1wd-y.js} +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @skyworx/dynamic-ui
|
|
2
2
|
|
|
3
3
|
Library **Vue 3** component yang bisa digunakan di berbagai framework (Vue, React, Angular, Svelte, dll.) untuk membuat **Dynamic Form** dan **DataTable** otomatis dari JSON schema, sekaligus menyediakan komponen UI yang kaya fitur.
|
|
4
4
|
|
|
@@ -58,13 +58,13 @@ Library **Vue 3** component yang bisa digunakan di berbagai framework (Vue, Reac
|
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
# npm
|
|
61
|
-
npm install @
|
|
61
|
+
npm install @skyworx/dynamic-ui
|
|
62
62
|
|
|
63
63
|
# yarn
|
|
64
|
-
yarn add @
|
|
64
|
+
yarn add @skyworx/dynamic-ui
|
|
65
65
|
|
|
66
66
|
# pnpm
|
|
67
|
-
pnpm add @
|
|
67
|
+
pnpm add @skyworx/dynamic-ui
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
---
|
|
@@ -92,8 +92,8 @@ Cara paling direkomendasikan: lewatkan config saat `app.use()`, atau gunakan `se
|
|
|
92
92
|
// main.js
|
|
93
93
|
import { createApp } from 'vue'
|
|
94
94
|
import App from './App.vue'
|
|
95
|
-
import DynamicUI, { setApiConfig } from '@
|
|
96
|
-
import '@
|
|
95
|
+
import DynamicUI, { setApiConfig } from '@skyworx/dynamic-ui'
|
|
96
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
97
97
|
|
|
98
98
|
// Contoh import instance Axios / useApi dari host project Anda
|
|
99
99
|
import axiosInstance from './plugins/axios'
|
|
@@ -139,8 +139,8 @@ app.mount('#app')
|
|
|
139
139
|
|
|
140
140
|
```ts
|
|
141
141
|
// plugins/dynamic-ui.ts
|
|
142
|
-
import DynamicUI from '@
|
|
143
|
-
import '@
|
|
142
|
+
import DynamicUI from '@skyworx/dynamic-ui'
|
|
143
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
144
144
|
|
|
145
145
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
146
146
|
const config = useRuntimeConfig()
|
|
@@ -177,7 +177,7 @@ Gunakan fungsi `setApiConfig()` secara langsung (tidak perlu Vue plugin).
|
|
|
177
177
|
|
|
178
178
|
```ts
|
|
179
179
|
// src/lib/dynamic-ui-config.ts (jalankan sebelum render app)
|
|
180
|
-
import { setApiConfig } from '@
|
|
180
|
+
import { setApiConfig } from '@skyworx/dynamic-ui'
|
|
181
181
|
|
|
182
182
|
setApiConfig({
|
|
183
183
|
apiBaseUrl: process.env.NEXT_PUBLIC_API_BASE_URL,
|
|
@@ -196,7 +196,7 @@ Panggil di entry point:
|
|
|
196
196
|
// app/layout.tsx atau _app.tsx
|
|
197
197
|
'use client'
|
|
198
198
|
import '@/lib/dynamic-ui-config' // ← jalankan konfigurasi lebih dulu
|
|
199
|
-
import '@
|
|
199
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
> File `.env.local` di host project Next.js:
|
|
@@ -210,9 +210,9 @@ import '@gemafajarramadhan/dynamic-ui/style.css'
|
|
|
210
210
|
|
|
211
211
|
```ts
|
|
212
212
|
// main.ts
|
|
213
|
-
import { setApiConfig } from '@
|
|
214
|
-
import '@
|
|
215
|
-
import '@
|
|
213
|
+
import { setApiConfig } from '@skyworx/dynamic-ui'
|
|
214
|
+
import '@skyworx/dynamic-ui'
|
|
215
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
216
216
|
|
|
217
217
|
// Konfigurasi sebelum bootstrap
|
|
218
218
|
setApiConfig({
|
|
@@ -289,8 +289,8 @@ Cara paling ringan: import hanya komponen yang diperlukan.
|
|
|
289
289
|
```vue
|
|
290
290
|
<!-- MyForm.vue -->
|
|
291
291
|
<script setup>
|
|
292
|
-
import { DCodeTextField, DCodeButton } from '@
|
|
293
|
-
import '@
|
|
292
|
+
import { DCodeTextField, DCodeButton } from '@skyworx/dynamic-ui'
|
|
293
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
294
294
|
</script>
|
|
295
295
|
|
|
296
296
|
<template>
|
|
@@ -335,8 +335,8 @@ Install semua komponen sekaligus agar bisa digunakan di mana saja tanpa import p
|
|
|
335
335
|
// main.js
|
|
336
336
|
import { createApp } from 'vue'
|
|
337
337
|
import App from './App.vue'
|
|
338
|
-
import DynamicUI from '@
|
|
339
|
-
import '@
|
|
338
|
+
import DynamicUI from '@skyworx/dynamic-ui'
|
|
339
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
340
340
|
|
|
341
341
|
const app = createApp(App)
|
|
342
342
|
|
|
@@ -367,8 +367,8 @@ Buat plugin Nuxt untuk mendaftarkan semua komponen secara global:
|
|
|
367
367
|
|
|
368
368
|
```ts
|
|
369
369
|
// plugins/dynamic-ui.ts
|
|
370
|
-
import DynamicUI from '@
|
|
371
|
-
import '@
|
|
370
|
+
import DynamicUI from '@skyworx/dynamic-ui'
|
|
371
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
372
372
|
|
|
373
373
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
374
374
|
const config = useRuntimeConfig()
|
|
@@ -447,7 +447,7 @@ Consumer kontrol penuh HTTP. Component tidak hit endpoint sama sekali — cocok
|
|
|
447
447
|
</template>
|
|
448
448
|
|
|
449
449
|
<script setup lang="ts">
|
|
450
|
-
import { DCodeDataTable } from '@
|
|
450
|
+
import { DCodeDataTable } from '@skyworx/dynamic-ui'
|
|
451
451
|
import axios from '@/lib/axios' // axios instance consumer — interceptor token sudah terpasang
|
|
452
452
|
|
|
453
453
|
// 1. fetchHandler: dipanggil tiap page/filter/sort/search change
|
|
@@ -853,7 +853,7 @@ import {
|
|
|
853
853
|
registerLogic,
|
|
854
854
|
unregisterLogic,
|
|
855
855
|
getLogicModule
|
|
856
|
-
} from '@
|
|
856
|
+
} from '@skyworx/dynamic-ui'
|
|
857
857
|
```
|
|
858
858
|
|
|
859
859
|
| Fungsi | Deskripsi |
|
|
@@ -879,7 +879,7 @@ Cara paling sederhana. Import library dari bundler, lalu gunakan custom element
|
|
|
879
879
|
<meta charset="UTF-8" />
|
|
880
880
|
<title>Dynamic UI</title>
|
|
881
881
|
<!-- Import style -->
|
|
882
|
-
<link rel="stylesheet" href="./node_modules/@
|
|
882
|
+
<link rel="stylesheet" href="./node_modules/@skyworx/dynamic-ui/dist/style.css" />
|
|
883
883
|
</head>
|
|
884
884
|
<body>
|
|
885
885
|
|
|
@@ -894,8 +894,8 @@ Cara paling sederhana. Import library dari bundler, lalu gunakan custom element
|
|
|
894
894
|
|
|
895
895
|
<!-- Import library (registrasi Web Components otomatis) -->
|
|
896
896
|
<script type="module">
|
|
897
|
-
import '@
|
|
898
|
-
import { setApiConfig } from '@
|
|
897
|
+
import '@skyworx/dynamic-ui'
|
|
898
|
+
import { setApiConfig } from '@skyworx/dynamic-ui'
|
|
899
899
|
|
|
900
900
|
// ✅ Konfigurasi API dari host project
|
|
901
901
|
setApiConfig({
|
|
@@ -1005,8 +1005,8 @@ export default defineConfig({
|
|
|
1005
1005
|
// main.js
|
|
1006
1006
|
import { createApp } from 'vue'
|
|
1007
1007
|
import App from './App.vue'
|
|
1008
|
-
import DynamicUI from '@
|
|
1009
|
-
import '@
|
|
1008
|
+
import DynamicUI from '@skyworx/dynamic-ui'
|
|
1009
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
1010
1010
|
|
|
1011
1011
|
const app = createApp(App)
|
|
1012
1012
|
|
|
@@ -1075,9 +1075,9 @@ Di React, gunakan `useRef` dan `useEffect` untuk set properti DOM secara imperat
|
|
|
1075
1075
|
import React from 'react'
|
|
1076
1076
|
import ReactDOM from 'react-dom/client'
|
|
1077
1077
|
import App from './App'
|
|
1078
|
-
import { setApiConfig } from '@
|
|
1079
|
-
import '@
|
|
1080
|
-
import '@
|
|
1078
|
+
import { setApiConfig } from '@skyworx/dynamic-ui'
|
|
1079
|
+
import '@skyworx/dynamic-ui'
|
|
1080
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
1081
1081
|
|
|
1082
1082
|
// ✅ Konfigurasi API dari env host project
|
|
1083
1083
|
setApiConfig({
|
|
@@ -1218,7 +1218,7 @@ Di Next.js dengan App Router, Web Components harus di-import di sisi klien (`'us
|
|
|
1218
1218
|
|
|
1219
1219
|
```ts
|
|
1220
1220
|
// lib/dynamic-ui-config.ts
|
|
1221
|
-
import { setApiConfig } from '@
|
|
1221
|
+
import { setApiConfig } from '@skyworx/dynamic-ui'
|
|
1222
1222
|
|
|
1223
1223
|
setApiConfig({
|
|
1224
1224
|
apiBaseUrl: process.env.NEXT_PUBLIC_API_BASE_URL!,
|
|
@@ -1235,8 +1235,8 @@ setApiConfig({
|
|
|
1235
1235
|
|
|
1236
1236
|
import { useEffect, useRef } from 'react'
|
|
1237
1237
|
import '@/lib/dynamic-ui-config'
|
|
1238
|
-
import('@
|
|
1239
|
-
import '@
|
|
1238
|
+
import('@skyworx/dynamic-ui')
|
|
1239
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
1240
1240
|
|
|
1241
1241
|
const formConfig = {
|
|
1242
1242
|
title: 'Form Next.js',
|
|
@@ -1335,9 +1335,9 @@ export class AppModule {}
|
|
|
1335
1335
|
|
|
1336
1336
|
```ts
|
|
1337
1337
|
// main.ts
|
|
1338
|
-
import { setApiConfig } from '@
|
|
1339
|
-
import '@
|
|
1340
|
-
import '@
|
|
1338
|
+
import { setApiConfig } from '@skyworx/dynamic-ui'
|
|
1339
|
+
import '@skyworx/dynamic-ui'
|
|
1340
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
1341
1341
|
|
|
1342
1342
|
// ✅ Konfigurasi API dari environment Angular
|
|
1343
1343
|
import { environment } from './environments/environment'
|
|
@@ -1444,8 +1444,8 @@ Buat file plugin dengan suffix `.client.ts` agar hanya dijalankan di sisi klien
|
|
|
1444
1444
|
|
|
1445
1445
|
```ts
|
|
1446
1446
|
// plugins/dynamic-ui.client.ts
|
|
1447
|
-
import DynamicUI from '@
|
|
1448
|
-
import '@
|
|
1447
|
+
import DynamicUI from '@skyworx/dynamic-ui'
|
|
1448
|
+
import '@skyworx/dynamic-ui/style.css'
|
|
1449
1449
|
|
|
1450
1450
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
1451
1451
|
const config = useRuntimeConfig()
|
|
@@ -1555,7 +1555,7 @@ window.__MICRO_LOGIC_REGISTRY__ = {
|
|
|
1555
1555
|
import {
|
|
1556
1556
|
registerLogic,
|
|
1557
1557
|
unregisterLogic,
|
|
1558
|
-
} from '@
|
|
1558
|
+
} from '@skyworx/dynamic-ui'
|
|
1559
1559
|
|
|
1560
1560
|
registerLogic('user-management', {
|
|
1561
1561
|
onReady(context) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as fe } from "./jszip.min-
|
|
1
|
+
import { o as fe } from "./jszip.min-BGchZUav.js";
|
|
2
2
|
var g;
|
|
3
3
|
(function(a) {
|
|
4
4
|
a.OfficeDocument = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", a.FontTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", a.Image = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", a.Numbering = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", a.Styles = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", a.StylesWithEffects = "http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects", a.Theme = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", a.Settings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings", a.WebSettings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings", a.Hyperlink = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", a.Footnotes = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", a.Endnotes = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes", a.Footer = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", a.Header = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", a.ExtendedProperties = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", a.CoreProperties = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", a.CustomProperties = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties", a.Comments = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", a.CommentsExtended = "http://schemas.microsoft.com/office/2011/relationships/commentsExtended", a.AltChunk = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk";
|