@neutron.co.id/operasional-interfaces 1.0.1-beta.2

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 ADDED
@@ -0,0 +1,3 @@
1
+ # Vortex XXX's Interfaces
2
+
3
+ This repository contains interface library boilerplate of Vortex.
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const client = require("@neon.id/utils/client");
4
+ const vue = require("vue");
5
+ const interfaces = require("@neon.id/interfaces");
6
+ const personaliaModels = require("@neutron.co.id/personalia-models");
7
+ const context = require("@neon.id/context");
8
+ const office = require("@neon.id/office");
9
+ const form = require("@neon.id/form");
10
+ const _hoisted_1$1 = { class: "xxx-button" };
11
+ const __default__$1 = vue.defineComponent({ name: "XxxButton" });
12
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
13
+ ...__default__$1,
14
+ props: {
15
+ color: {
16
+ type: String,
17
+ default: "base"
18
+ }
19
+ },
20
+ setup(__props) {
21
+ return (_ctx, _cache) => {
22
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
23
+ vue.createVNode(vue.unref(interfaces.NeonButton), { label: "XXX" })
24
+ ]);
25
+ };
26
+ }
27
+ });
28
+ const StaffModel = personaliaModels.models.StaffModel;
29
+ const __default__ = vue.defineComponent({
30
+ name: "StaffCollection"
31
+ });
32
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
33
+ ...__default__,
34
+ setup(__props) {
35
+ context.useCollection();
36
+ return (_ctx, _cache) => {
37
+ return vue.openBlock(), vue.createBlock(vue.unref(context.NeonCollection), { class: "neu-staff-collection" }, {
38
+ default: vue.withCtx(() => [
39
+ vue.createVNode(vue.unref(office.OfficeCollectionTable))
40
+ ]),
41
+ _: 1
42
+ /* STABLE */
43
+ });
44
+ };
45
+ }
46
+ });
47
+ const _hoisted_1 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
48
+ const _hoisted_2 = { class: "grid gap-4 sm:grid-cols-2" };
49
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
50
+ __name: "StaffSingle",
51
+ setup(__props) {
52
+ const {
53
+ fields,
54
+ id,
55
+ initialValues,
56
+ values,
57
+ isLoading,
58
+ isChanged,
59
+ isReady,
60
+ isMain,
61
+ isNew,
62
+ saveOne,
63
+ discardChanges
64
+ } = context.useSingle();
65
+ return (_ctx, _cache) => {
66
+ return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-staff-single" }, {
67
+ default: vue.withCtx(() => [
68
+ vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
69
+ default: vue.withCtx(() => [
70
+ vue.createVNode(vue.unref(office.OfficeTab), {
71
+ handle: "info",
72
+ icon: "circle-info",
73
+ title: "Info"
74
+ }, {
75
+ default: vue.withCtx(() => [
76
+ vue.createVNode(vue.unref(form.NeonForm), {
77
+ handle: "info",
78
+ "initial-values": vue.unref(initialValues),
79
+ "is-loading": vue.unref(isLoading),
80
+ "is-changed": vue.unref(isChanged),
81
+ "use-unsaved": "",
82
+ onCancel: vue.unref(discardChanges),
83
+ onSubmit: vue.unref(saveOne)
84
+ }, {
85
+ default: vue.withCtx(() => [
86
+ vue.createElementVNode("div", _hoisted_1, [
87
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
88
+ modelValue: vue.unref(values).name,
89
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(values).name = $event)
90
+ }, vue.unref(fields).name), null, 16, ["modelValue"]),
91
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
92
+ modelValue: vue.unref(values).nik,
93
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(values).nik = $event)
94
+ }, vue.unref(fields).nik), null, 16, ["modelValue"])
95
+ ]),
96
+ vue.createElementVNode("div", _hoisted_2, [
97
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
98
+ modelValue: vue.unref(values).birthPlace,
99
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(values).birthPlace = $event)
100
+ }, vue.unref(fields).birthPlace), null, 16, ["modelValue"]),
101
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
102
+ modelValue: vue.unref(values).birthDate,
103
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.unref(values).birthDate = $event)
104
+ }, vue.unref(fields).birthDate), null, 16, ["modelValue"])
105
+ ]),
106
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
107
+ modelValue: vue.unref(values).image,
108
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).image = $event)
109
+ }, vue.unref(fields).image), null, 16, ["modelValue"]),
110
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
111
+ modelValue: vue.unref(values).note,
112
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(values).note = $event)
113
+ }, vue.unref(fields).note), null, 16, ["modelValue"])
114
+ ]),
115
+ _: 1
116
+ /* STABLE */
117
+ }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
118
+ ]),
119
+ _: 1
120
+ /* STABLE */
121
+ }),
122
+ vue.createCommentVNode(' IDENTITAS\n <OfficeTab handle="identity" icon="circle-info" title="Identity">\n </OfficeTab> '),
123
+ vue.createCommentVNode(" CABANG "),
124
+ vue.createVNode(vue.unref(office.OfficeTab), {
125
+ handle: "branch",
126
+ icon: "circle-info",
127
+ title: "Cabang"
128
+ }, {
129
+ default: vue.withCtx(() => [
130
+ vue.createVNode(vue.unref(form.NeonForm), {
131
+ handle: "branch",
132
+ "initial-values": vue.unref(initialValues),
133
+ "is-loading": vue.unref(isLoading),
134
+ "is-changed": vue.unref(isChanged),
135
+ "use-unsaved": "",
136
+ onCancel: vue.unref(discardChanges),
137
+ onSubmit: vue.unref(saveOne)
138
+ }, {
139
+ default: vue.withCtx(() => [
140
+ vue.createVNode(vue.unref(office.OfficeRelation), {
141
+ modelValue: vue.unref(values),
142
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.isRef(values) ? values.value = $event : null),
143
+ field: vue.unref(fields).branch
144
+ }, null, 8, ["modelValue", "field"]),
145
+ vue.createVNode(vue.unref(office.OfficeRelation), {
146
+ modelValue: vue.unref(values),
147
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.isRef(values) ? values.value = $event : null),
148
+ field: vue.unref(fields).branches
149
+ }, null, 8, ["modelValue", "field"])
150
+ ]),
151
+ _: 1
152
+ /* STABLE */
153
+ }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
154
+ ]),
155
+ _: 1
156
+ /* STABLE */
157
+ }),
158
+ vue.createCommentVNode(" KELUAR MASUK "),
159
+ vue.createVNode(vue.unref(office.OfficeTab), {
160
+ handle: "checkIn",
161
+ icon: "person-to-door",
162
+ title: "Keluar Masuk"
163
+ }, {
164
+ default: vue.withCtx(() => [
165
+ vue.createCommentVNode(` <OfficeCollectionRelated
166
+ definition="neu:tempat:checkIn"
167
+ title="Keluar Masuk"
168
+ description="Keluar masuk."
169
+ :query="
170
+ Query.define({
171
+ filter: {
172
+ handle: 'staffId',
173
+ operator: 'eq',
174
+ value: id,
175
+ },
176
+ })
177
+ "
178
+ /> `)
179
+ ]),
180
+ _: 1
181
+ /* STABLE */
182
+ })
183
+ ]),
184
+ _: 1
185
+ /* STABLE */
186
+ }, 8, ["use-url"])
187
+ ]),
188
+ _: 1
189
+ /* STABLE */
190
+ });
191
+ };
192
+ }
193
+ });
194
+ const StaffSingle_vue_vue_type_style_index_0_scoped_dbeb1998_lang = "";
195
+ const _export_sfc = (sfc, props) => {
196
+ const target = sfc.__vccOpts || sfc;
197
+ for (const [key, val] of props) {
198
+ target[key] = val;
199
+ }
200
+ return target;
201
+ };
202
+ const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dbeb1998"]]);
203
+ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
204
+ __proto__: null,
205
+ StaffCollection: _sfc_main$1,
206
+ StaffModel,
207
+ StaffSingle,
208
+ XxxButton: _sfc_main$2
209
+ }, Symbol.toStringTag, { value: "Module" }));
210
+ function registerComponents(app) {
211
+ Object.entries(components).forEach(([name, component]) => {
212
+ client.ComponentUtil.register(app, name, component);
213
+ });
214
+ }
215
+ const graphql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
216
+ __proto__: null
217
+ }, Symbol.toStringTag, { value: "Module" }));
218
+ const OperasionalInterfacesPlugin = {
219
+ install(app, options) {
220
+ registerComponents(app);
221
+ }
222
+ };
223
+ exports.OperasionalInterfacesPlugin = OperasionalInterfacesPlugin;
224
+ exports.Schema = graphql;
225
+ exports.StaffCollection = _sfc_main$1;
226
+ exports.StaffModel = StaffModel;
227
+ exports.StaffSingle = StaffSingle;
228
+ exports.XxxButton = _sfc_main$2;
@@ -0,0 +1,228 @@
1
+ import { ComponentUtil } from "@neon.id/utils/client";
2
+ import { defineComponent, openBlock, createElementBlock, createVNode, unref, createBlock, withCtx, createElementVNode, mergeProps, createCommentVNode, isRef } from "vue";
3
+ import { NeonButton } from "@neon.id/interfaces";
4
+ import { models } from "@neutron.co.id/personalia-models";
5
+ import { useCollection, NeonCollection, useSingle, NeonSingle } from "@neon.id/context";
6
+ import { OfficeCollectionTable, OfficeTabs, OfficeTab, OfficeRelation } from "@neon.id/office";
7
+ import { NeonForm, NeonField } from "@neon.id/form";
8
+ const _hoisted_1$1 = { class: "xxx-button" };
9
+ const __default__$1 = defineComponent({ name: "XxxButton" });
10
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
11
+ ...__default__$1,
12
+ props: {
13
+ color: {
14
+ type: String,
15
+ default: "base"
16
+ }
17
+ },
18
+ setup(__props) {
19
+ return (_ctx, _cache) => {
20
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
21
+ createVNode(unref(NeonButton), { label: "XXX" })
22
+ ]);
23
+ };
24
+ }
25
+ });
26
+ const StaffModel = models.StaffModel;
27
+ const __default__ = defineComponent({
28
+ name: "StaffCollection"
29
+ });
30
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
31
+ ...__default__,
32
+ setup(__props) {
33
+ useCollection();
34
+ return (_ctx, _cache) => {
35
+ return openBlock(), createBlock(unref(NeonCollection), { class: "neu-staff-collection" }, {
36
+ default: withCtx(() => [
37
+ createVNode(unref(OfficeCollectionTable))
38
+ ]),
39
+ _: 1
40
+ /* STABLE */
41
+ });
42
+ };
43
+ }
44
+ });
45
+ const _hoisted_1 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
46
+ const _hoisted_2 = { class: "grid gap-4 sm:grid-cols-2" };
47
+ const _sfc_main = /* @__PURE__ */ defineComponent({
48
+ __name: "StaffSingle",
49
+ setup(__props) {
50
+ const {
51
+ fields,
52
+ id,
53
+ initialValues,
54
+ values,
55
+ isLoading,
56
+ isChanged,
57
+ isReady,
58
+ isMain,
59
+ isNew,
60
+ saveOne,
61
+ discardChanges
62
+ } = useSingle();
63
+ return (_ctx, _cache) => {
64
+ return openBlock(), createBlock(unref(NeonSingle), { class: "neu-staff-single" }, {
65
+ default: withCtx(() => [
66
+ createVNode(unref(OfficeTabs), { "use-url": unref(isMain) }, {
67
+ default: withCtx(() => [
68
+ createVNode(unref(OfficeTab), {
69
+ handle: "info",
70
+ icon: "circle-info",
71
+ title: "Info"
72
+ }, {
73
+ default: withCtx(() => [
74
+ createVNode(unref(NeonForm), {
75
+ handle: "info",
76
+ "initial-values": unref(initialValues),
77
+ "is-loading": unref(isLoading),
78
+ "is-changed": unref(isChanged),
79
+ "use-unsaved": "",
80
+ onCancel: unref(discardChanges),
81
+ onSubmit: unref(saveOne)
82
+ }, {
83
+ default: withCtx(() => [
84
+ createElementVNode("div", _hoisted_1, [
85
+ createVNode(unref(NeonField), mergeProps({
86
+ modelValue: unref(values).name,
87
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).name = $event)
88
+ }, unref(fields).name), null, 16, ["modelValue"]),
89
+ createVNode(unref(NeonField), mergeProps({
90
+ modelValue: unref(values).nik,
91
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).nik = $event)
92
+ }, unref(fields).nik), null, 16, ["modelValue"])
93
+ ]),
94
+ createElementVNode("div", _hoisted_2, [
95
+ createVNode(unref(NeonField), mergeProps({
96
+ modelValue: unref(values).birthPlace,
97
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).birthPlace = $event)
98
+ }, unref(fields).birthPlace), null, 16, ["modelValue"]),
99
+ createVNode(unref(NeonField), mergeProps({
100
+ modelValue: unref(values).birthDate,
101
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).birthDate = $event)
102
+ }, unref(fields).birthDate), null, 16, ["modelValue"])
103
+ ]),
104
+ createVNode(unref(NeonField), mergeProps({
105
+ modelValue: unref(values).image,
106
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).image = $event)
107
+ }, unref(fields).image), null, 16, ["modelValue"]),
108
+ createVNode(unref(NeonField), mergeProps({
109
+ modelValue: unref(values).note,
110
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).note = $event)
111
+ }, unref(fields).note), null, 16, ["modelValue"])
112
+ ]),
113
+ _: 1
114
+ /* STABLE */
115
+ }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
116
+ ]),
117
+ _: 1
118
+ /* STABLE */
119
+ }),
120
+ createCommentVNode(' IDENTITAS\n <OfficeTab handle="identity" icon="circle-info" title="Identity">\n </OfficeTab> '),
121
+ createCommentVNode(" CABANG "),
122
+ createVNode(unref(OfficeTab), {
123
+ handle: "branch",
124
+ icon: "circle-info",
125
+ title: "Cabang"
126
+ }, {
127
+ default: withCtx(() => [
128
+ createVNode(unref(NeonForm), {
129
+ handle: "branch",
130
+ "initial-values": unref(initialValues),
131
+ "is-loading": unref(isLoading),
132
+ "is-changed": unref(isChanged),
133
+ "use-unsaved": "",
134
+ onCancel: unref(discardChanges),
135
+ onSubmit: unref(saveOne)
136
+ }, {
137
+ default: withCtx(() => [
138
+ createVNode(unref(OfficeRelation), {
139
+ modelValue: unref(values),
140
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(values) ? values.value = $event : null),
141
+ field: unref(fields).branch
142
+ }, null, 8, ["modelValue", "field"]),
143
+ createVNode(unref(OfficeRelation), {
144
+ modelValue: unref(values),
145
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
146
+ field: unref(fields).branches
147
+ }, null, 8, ["modelValue", "field"])
148
+ ]),
149
+ _: 1
150
+ /* STABLE */
151
+ }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
152
+ ]),
153
+ _: 1
154
+ /* STABLE */
155
+ }),
156
+ createCommentVNode(" KELUAR MASUK "),
157
+ createVNode(unref(OfficeTab), {
158
+ handle: "checkIn",
159
+ icon: "person-to-door",
160
+ title: "Keluar Masuk"
161
+ }, {
162
+ default: withCtx(() => [
163
+ createCommentVNode(` <OfficeCollectionRelated
164
+ definition="neu:tempat:checkIn"
165
+ title="Keluar Masuk"
166
+ description="Keluar masuk."
167
+ :query="
168
+ Query.define({
169
+ filter: {
170
+ handle: 'staffId',
171
+ operator: 'eq',
172
+ value: id,
173
+ },
174
+ })
175
+ "
176
+ /> `)
177
+ ]),
178
+ _: 1
179
+ /* STABLE */
180
+ })
181
+ ]),
182
+ _: 1
183
+ /* STABLE */
184
+ }, 8, ["use-url"])
185
+ ]),
186
+ _: 1
187
+ /* STABLE */
188
+ });
189
+ };
190
+ }
191
+ });
192
+ const StaffSingle_vue_vue_type_style_index_0_scoped_dbeb1998_lang = "";
193
+ const _export_sfc = (sfc, props) => {
194
+ const target = sfc.__vccOpts || sfc;
195
+ for (const [key, val] of props) {
196
+ target[key] = val;
197
+ }
198
+ return target;
199
+ };
200
+ const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dbeb1998"]]);
201
+ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
202
+ __proto__: null,
203
+ StaffCollection: _sfc_main$1,
204
+ StaffModel,
205
+ StaffSingle,
206
+ XxxButton: _sfc_main$2
207
+ }, Symbol.toStringTag, { value: "Module" }));
208
+ function registerComponents(app) {
209
+ Object.entries(components).forEach(([name, component]) => {
210
+ ComponentUtil.register(app, name, component);
211
+ });
212
+ }
213
+ const graphql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
214
+ __proto__: null
215
+ }, Symbol.toStringTag, { value: "Module" }));
216
+ const OperasionalInterfacesPlugin = {
217
+ install(app, options) {
218
+ registerComponents(app);
219
+ }
220
+ };
221
+ export {
222
+ OperasionalInterfacesPlugin,
223
+ graphql as Schema,
224
+ _sfc_main$1 as StaffCollection,
225
+ StaffModel,
226
+ StaffSingle,
227
+ _sfc_main$2 as XxxButton
228
+ };
@@ -0,0 +1,4 @@
1
+
2
+ .neu-staff-single[data-v-dbeb1998] {
3
+ display: block
4
+ }
@@ -0,0 +1,14 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ color: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ color: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }>>, {
12
+ color: string;
13
+ }>;
14
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as XxxButton } from './XxxButton.vue';
@@ -0,0 +1 @@
1
+ export * from './XxxButton';
@@ -0,0 +1,2 @@
1
+ export * from './common';
2
+ export * from './staff';
@@ -0,0 +1,2 @@
1
+ import { App } from 'vue';
2
+ export declare function registerComponents(app: App): void;
@@ -0,0 +1,2 @@
1
+ export * from './staff.types';
2
+ export * from './sheets';
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as StaffCollection } from './StaffCollection.vue';
2
+ export { default as StaffSingle } from './StaffSingle.vue';
@@ -0,0 +1,2 @@
1
+ export declare const StaffModel: import("@neon.id/model/build/types/model/model.types").Instance<"neu:personalia:staff", "name" | "image" | "nik" | "branch" | "branches" | "user" | "birthPlace" | "birthDate" | "note">;
2
+ export type TStaffModel = typeof StaffModel;