@stonecrop/aform 0.7.9 → 0.8.1
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/aform.d.ts +98 -1
- package/dist/aform.js +2594 -503
- package/dist/aform.js.map +1 -1
- package/dist/aform.umd.cjs +2 -2
- package/dist/aform.umd.cjs.map +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index.js +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +96 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +5 -7
- package/src/components/AForm.vue +108 -39
- package/src/components/form/AFieldset.vue +1 -1
- package/src/index.ts +2 -0
- package/src/types/index.ts +108 -1
package/dist/assets/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.aform_checkbox[data-v-f13fd4d6]{cursor:pointer;width:auto;margin-top:0;display:block}.aform_checkbox[data-v-f13fd4d6]:checked{accent-color:var(--sc-primary-color);border:1px solid black}.aform_checkbox-container[data-v-f13fd4d6]{width:100%;display:inline-block;text-align:left}.aform_checkbox-container input[data-v-f13fd4d6]{width:auto}.aform_checkbox-container:hover+.aform_field-label[data-v-f13fd4d6]{color:var(--sc-input-active-label-color)}div[data-v-a15ed922]{min-width:40ch;width:100%;box-sizing:border-box;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-a15ed922]{width:calc(100% - 1ch);box-sizing:border-box;outline:1px solid transparent;border:1px solid var(--sc-input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-a15ed922],label[data-v-a15ed922]{color:var(--sc-input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;box-sizing:border-box}p[data-v-a15ed922]{width:100%;color:red;font-size:85%;box-sizing:border-box}label[data-v-a15ed922]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch;box-sizing:border-box}input[data-v-a15ed922]:focus{border:1px solid var(--sc-input-active-border-color)}input:focus+label[data-v-a15ed922]{color:var(--sc-input-active-label-color)}.autocomplete[data-v-31a6db8c]{position:relative}.input-wrapper[data-v-31a6db8c]{border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-31a6db8c]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--sc-input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}input[data-v-31a6db8c]:focus{border:1px solid var(--sc-input-active-border-color);border-radius:.25rem .25rem 0 0;border-bottom:none}label[data-v-31a6db8c]{display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}.autocomplete-results[data-v-31a6db8c]{position:absolute;width:calc(100% - 1ch + 1.5px);z-index:999;padding:0;margin:0;color:var(--sc-input-active-border-color);border:1px solid var(--sc-input-active-border-color);border-radius:0 0 .25rem .25rem;border-top:none;background-color:#fff}.autocomplete-result[data-v-31a6db8c]{list-style:none;text-align:left;padding:4px 6px;cursor:pointer;border-bottom:.5px solid lightgray}.autocomplete-result.is-active[data-v-31a6db8c],.autocomplete-result[data-v-31a6db8c]:hover{background-color:var(--sc-row-color-zebra-light);color:var(--sc-input-active-border-color)}.adatepicker[data-v-056d2b5e]{font-size:var(--sc-table-font-size);display:inline-table;color:var(--sc-cell-text-color);outline:none;border-collapse:collapse}.adatepicker tr[data-v-056d2b5e]{height:1.15rem;text-align:center;vertical-align:middle}.adatepicker td[data-v-056d2b5e]{border:2px solid transparent;outline:2px solid transparent;min-width:3ch;max-width:3ch}.adatepicker td[data-v-056d2b5e]:focus,.adatepicker td[data-v-056d2b5e]:focus-within{outline:1px dashed black;box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}.adatepicker .selectedDate[data-v-056d2b5e]{outline:1px solid black;background:var(--sc-gray-20);font-weight:bolder}.adatepicker .todaysDate[data-v-056d2b5e]{font-weight:bolder;text-decoration:underline;color:#000}.days-header>td[data-v-056d2b5e]{font-weight:700}.prev-date[data-v-056d2b5e]{color:var(--sc-gray-20)}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}.aform_form-element{padding:0;margin:0;position:relative;box-sizing:border-box;flex-grow:1;min-width:20ch;margin-bottom:1rem}.aform_input-field{outline:1px solid var(--sc-input-border-color);outline-offset:-1px;font-size:1rem;padding:.5rem;margin:0;border-radius:0;box-sizing:border-box;width:100%;min-height:auto;position:relative;color:var(--sc-cell-text-color);background:var(--sc-input-field-background)}.aform_input-field:focus{outline:1px solid var(--sc-input-active-border-color)}.aform_input-field:focus+.aform_field-label{color:var(--sc-input-active-label-color)}.aform_field-label{color:var(--sc-input-label-color);display:inline-block;position:absolute;padding:0 .25rem;margin:0rem;z-index:2;font-size:.7rem;font-weight:300;letter-spacing:.05rem;background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-background) 50%);width:auto;box-sizing:border-box;background:#fff;margin:0;grid-row:1;top:0;left:10px;border:none;line-height:0;transform:translateY(-50%)}.aform_input-field:disabled{background:var(--sc-input-field-disabled-background)}.aform_input-field:disabled+.aform_field-label{background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-disabled-background) 50%)}.aform_input-field:disabled~p.aform_error{background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-disabled-background) 50%)}.aform_field-label:after{margin:0;padding:0;box-sizing:border-box;content:"";line-height:normal}p.aform_error{display:block;display:inline-block;display:none;background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-background) 50%);padding:0 .25rem;margin:0rem;width:auto;color:var(--sc-brand-danger);font-size:.7rem;position:absolute;right:0;top:0;line-height:0;background:#fff;padding:.25rem;transform:translate(-1rem,-50%);margin:0}.aform[data-v-5336a410]{display:flex;flex-wrap:wrap;gap:1rem;padding:1rem;border:1px solid var(--sc-form-border);border-left:4px solid var(--sc-form-border);margin-bottom:1rem;max-width:100%}@media screen and (max-width:400px){.aform[data-v-5336a410]{flex-direction:column}}fieldset[data-v-40b2a95d]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--sc-gray-50)}legend[data-v-40b2a95d]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;-webkit-user-select:none;user-select:none}.collapse-button[data-v-40b2a95d]{float:right}.aform_file-attach[data-v-b700734f]{padding:1rem;display:flex;flex-wrap:wrap;gap:1rem;flex-direction:row;justify-content:center;align-items:center;border:1px dashed var(--sc-input-border-color);width:100%}@media screen and (max-width:400px){.aform_file-attach>.aform_form-btn[data-v-b700734f]{width:100%}}.aform_file-attach-feedback[data-v-b700734f]{color:var(--sc-input-label-color);width:100%;padding:.5rem;text-align:center;align-self:center}.aform_file-attach-feedback>li[data-v-b700734f]{list-style:none;font-style:italic}.aform_file-attach-feedback>p[data-v-b700734f]{margin-top:0}.aform_form-btn[data-v-b700734f]{padding:.5rem 2rem;width:auto;border:1px solid var(--sc-input-border-color);color:var(--sc-input-label-color);cursor:pointer;background-color:#fff}.aform_form-btn[data-v-b700734f]:disabled{background-color:var(--sc-gray-5)}.login-container[data-v-d9ffd0a7]{width:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:var(--sc-font-family)}.account-container[data-v-d9ffd0a7]{width:100%;margin-left:auto;margin-top:.5rem;margin-right:auto;display:flex;flex-direction:column;justify-content:center}.account-header[data-v-d9ffd0a7]{display:flex;flex-direction:column;text-align:center;margin-top:.5rem}#account-title[data-v-d9ffd0a7]{font-size:1.5rem;line-height:2rem;font-weight:600;letter-spacing:-.025em;margin:0}#account-subtitle[data-v-d9ffd0a7]{font-size:.875rem;line-height:1.25rem;margin:1rem}.login-form-container[data-v-d9ffd0a7]{display:grid;gap:.5rem}.login-form-element[data-v-d9ffd0a7]{display:grid;margin:.5rem 0;position:relative}.login-field[data-v-d9ffd0a7]{padding:.5rem .25rem .25rem .5rem;outline:1px solid transparent;border:1px solid var(--sc-input-border-color);border-radius:.25rem}.login-field[data-v-d9ffd0a7]:focus{border:1px solid black}.btn[data-v-d9ffd0a7]{background-color:var(--sc-btn-color);color:var(--sc-btn-label-color);border:1px solid var(--sc-btn-border);margin:.5rem 0;padding:.25rem;position:relative;cursor:pointer}.btn[data-v-d9ffd0a7]:hover{background-color:var(--sc-btn-hover)}.btn[data-v-d9ffd0a7]:disabled{background-color:var(--sc-input-field-disabled-background)}.disabled[data-v-d9ffd0a7]{opacity:.5}.loading-icon[data-v-d9ffd0a7]{animation:spin-d9ffd0a7 1s linear infinite forwards;display:inline-block;margin-right:.2rem;line-height:0;font-size:1rem;position:relative;top:.2rem}@keyframes spin-d9ffd0a7{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";.atable-cell{border-radius:0;box-sizing:border-box;outline:none;box-shadow:none;color:var(--sc-cell-text-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);border-spacing:0px;border-collapse:collapse;overflow:hidden;text-overflow:ellipsis;order:1;white-space:nowrap;max-width:40ch;border-top:1px solid var(--sc-row-border-color);margin:0 0 0 1px}.atable-cell a{color:var(--sc-cell-text-color);text-decoration:none}.atable-cell:focus,.atable-cell:focus-within{background-color:var(--sc-focus-cell-background);outline-width:var(--sc-atable-cell-border-width);outline-style:solid;outline-offset:calc(var(--sc-atable-cell-border-width) * -1);outline-color:var(--sc-focus-cell-outline);box-shadow:none;overflow:hidden;text-wrap:nowrap;box-sizing:border-box}.cell-modified{font-weight:700;font-style:italic}.cell-modified-highlight{background-color:var(--sc-cell-changed-color)}.row-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;display:flex;align-items:center;justify-content:center}.expandable-row{border-top:1px solid var(--sc-row-border-color);height:var(--sc-atable-row-height)}.expandable-row>td:first-child{border-left:4px solid var(--sc-row-border-color)}.expanded-row{border-left:2px solid var(--sc-row-border-color)}.expandable-row:last-child{border-bottom:1px solid var(--sc-row-border-color)}.expanded-row-content{border-top:1px solid var(--sc-row-border-color);padding:1.5rem}.expandable-row.changed-row-gradient[data-v-a42297c7]:has(td.cell-modified){--cell-color-start: color-mix(in srgb, var(--sc-cell-changed-color), #fff 20%);--cell-color-end: color-mix(in srgb, var(--sc-cell-changed-color), #fff 60%);background:linear-gradient(90deg,var(--cell-color-start),var(--cell-color-end))}.aganttcell[data-v-8917a8a3]{background-color:#f9f9f9;width:100%;padding:0;height:100%}.gantt-container[data-v-8917a8a3]{position:relative;height:100%;background-color:#f0f0f0;border-radius:4px;overflow:visible}.gantt-bar[data-v-8917a8a3]{position:absolute;border-radius:4px;display:flex;align-items:center;justify-content:space-between;cursor:grab;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);transition:left .1s ease-out,width .1s ease-out;height:80%;top:50%;z-index:2;transform:translateY(-50%)}.gantt-bar[data-v-8917a8a3]:active{cursor:grabbing}.gantt-bar.is-dragging[data-v-8917a8a3]{z-index:10}.gantt-label[data-v-8917a8a3]{flex:1;text-align:center;font-size:12px;color:#aaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px;-webkit-user-select:none;user-select:none}.resize-handle[data-v-8917a8a3]{position:relative;width:12px;height:100%;cursor:ew-resize;display:flex;align-items:center;justify-content:center;z-index:0;background:#00000040}.left-resize-handle[data-v-8917a8a3]{border-right:1px solid rgba(0,0,0,.5)}.right-resize-handle[data-v-8917a8a3]{border-left:1px solid rgba(0,0,0,.5)}.handle-grip[data-v-8917a8a3]{width:4px;height:12px;border-radius:2px;background:#000c}.resize-handle[data-v-8917a8a3]:hover{background-color:#ffffff80}.vertical-indicator[data-v-8917a8a3]{position:absolute;width:2px;opacity:0;pointer-events:none;transition:opacity .2s ease;top:-100vh;height:100vh;z-index:5;background-color:var(--v6d722296)}.left-indicator[data-v-8917a8a3]{left:50%;transform:translate(-50%)}.right-indicator[data-v-8917a8a3]{right:50%;transform:translate(50%)}.resize-handle.is-dragging .vertical-indicator[data-v-8917a8a3]{opacity:.7}.gantt-container[data-v-8917a8a3]:after{content:"";position:absolute;inset:0;background-size:calc(100% / var(--v260b36f8)) 100%;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px);pointer-events:none;z-index:1}.connection-handle[data-v-8917a8a3]{position:absolute;top:50%;transform:translateY(-50%);width:16px;height:16px;opacity:0;transition:opacity .2s ease;cursor:crosshair;z-index:15;display:flex;align-items:center;justify-content:center}.connection-handle.visible[data-v-8917a8a3]{opacity:1}.left-connection-handle[data-v-8917a8a3]{left:-16px}.right-connection-handle[data-v-8917a8a3]{right:-16px}.connection-dot[data-v-8917a8a3]{width:8px;height:8px;border-radius:50%;background-color:#2196f3;border:2px solid white;box-shadow:0 1px 3px #0000004d}.connection-handle:hover .connection-dot[data-v-8917a8a3]{background-color:#1976d2;transform:scale(1.2)}.connection-handle.is-dragging[data-v-8917a8a3]{opacity:1!important}.connection-handle.is-dragging .connection-dot[data-v-8917a8a3]{background-color:#1976d2;transform:scale(1.3);box-shadow:0 2px 8px #2196f366}.atable-row{background-color:#fff}.atable-row>td:first-child{border-left:4px solid var(--sc-row-border-color)}.list-index{color:var(--sc-header-text-color);font-weight:700;padding-left:var(--sc-atable-row-padding);padding-right:.5em;text-align:left;-webkit-user-select:none;user-select:none;width:7ch;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.tree-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.atable-row:has(td.cell-modified)>td.sticky-column,.atable-row:has(td.cell-modified)>th.sticky-column,.atable-row:has(td.cell-modified)>td.sticky-index,.atable-row:has(td.cell-modified)>th.sticky-index{background:var(--sc-cell-changed-color)}.atable-row.changed-row-gradient[data-v-0fa91f83]:has(td.cell-modified){--cell-color-start: color-mix(in srgb, var(--sc-cell-changed-color), #fff 20%);--cell-color-end: color-mix(in srgb, var(--sc-cell-changed-color), #fff 60%);background:linear-gradient(90deg,var(--cell-color-start),var(--cell-color-end))}.gantt-connection-overlay[data-v-71911260]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1}.connection-path[data-v-71911260]{transition:stroke-width .2s ease;pointer-events:auto;cursor:pointer;stroke-dasharray:5px;stroke:var(--sc-cell-text-color)}#arrowhead-marker polygon[data-v-71911260]{fill:var(--sc-cell-text-color)}.animated-path[data-v-71911260]{animation:animated-dash-71911260 infinite 1.5s linear}.connection-path[data-v-71911260]:hover{stroke-width:3px}.connection-hitbox[data-v-71911260]{pointer-events:auto;cursor:pointer}@keyframes animated-dash-71911260{0%{stroke-dashoffset:0px}to{stroke-dashoffset:-10px}}.column-filter[data-v-8487462d]{display:flex;align-items:center;gap:.25rem;width:100%}.filter-input[data-v-8487462d],.filter-select[data-v-8487462d]{background-color:var(--sc-form-background)!important;padding:.15rem .2rem;border:1px solid var(--sc-form-border);border-radius:3px;font-size:.875rem;color:var(--sc-text-color);width:100%;box-sizing:border-box}.filter-input[data-v-8487462d]:focus,.filter-select[data-v-8487462d]:focus{outline:none;border-color:var(--sc-input-active-border-color)}.checkbox-filter[data-v-8487462d]{display:flex;align-items:center;gap:.25rem;font-size:.875rem;color:var(--sc-text-color);cursor:pointer}.filter-checkbox[data-v-8487462d]{margin:0}.date-range-filter[data-v-8487462d]{display:flex;gap:.25rem;align-items:center;width:100%}.date-range-filter .filter-input[data-v-8487462d]{flex:1;min-width:0}.date-separator[data-v-8487462d]{color:var(--sc-gray-50);font-weight:500;padding:0 .25rem;flex-shrink:0}.clear-btn[data-v-8487462d]{background:var(--sc-gray-10, #f0f0f0);border:1px solid var(--sc-form-border);border-radius:3px;color:var(--sc-gray-70);cursor:pointer;font-size:1rem;padding:.15rem .4rem;line-height:1;flex-shrink:0}.atable-header-row th{padding-left:.5ch!important;font-weight:700;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);box-sizing:border-box;color:var(--sc-header-text-color);position:relative}#header-index{padding-left:var(--sc-atable-row-padding);box-sizing:border-box}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}.cursor-pointer{cursor:pointer}.atable-filters-row th{padding:.25rem .5ch;vertical-align:top}:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-changed-color: #d8edff;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: .125rem;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-table-loading-color: 204, 204, 204;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.amodal{position:absolute;background-color:var(--sc-row-color-zebra-dark);z-index:5}.atable-container{position:relative}.sticky-index{position:sticky;left:0;z-index:10;order:0}.sticky-column,th.sticky-column,td.sticky-column,th.sticky-index,td.sticky-index{position:sticky;z-index:10;order:0;background:#fff}.sticky-column-edge,.atable th.sticky-column-edge{border-right:1px solid var(--sc-row-border-color)}[data-v-c0a0032f]:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-changed-color: #d8edff;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: .125rem;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-table-loading-color: 204, 204, 204;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.atable[data-v-c0a0032f]{position:relative;font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);border-collapse:collapse;box-sizing:border-box;table-layout:auto;width:auto;overflow:clip;height:1px}.atable th[data-v-c0a0032f]{border-width:0px;border-style:solid;border-radius:0;padding-left:.5ch;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);color:var(--sc-gray-60);height:var(--sc-atable-row-height);font-weight:300;letter-spacing:.05rem;order:1;box-sizing:border-box}.atable th[data-v-c0a0032f]:focus{outline:none}.atable[data-v-c0a0032f]:tbody{overflow:hidden;position:relative}.atable[data-v-c0a0032f]:tbody:before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:transparent;z-index:100}.aloading[data-v-a930a25b]{width:100%;border-top:1px solid var(--sc-row-border-color);border-bottom:1px solid var(--sc-row-border-color);display:flex;background-color:#fff;border-left:4px solid var(--sc-row-border-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);align-items:center;box-sizing:border-box;background:var(--sc-focus-cell-background);overflow:hidden;position:relative}.aloading-bar[data-v-a930a25b]{width:100%;height:100%;position:absolute;left:-100%;top:0;background:linear-gradient(90deg,rgba(var(--sc-table-loading-color),0),rgba(var(--sc-table-loading-color),1),rgba(var(--sc-table-loading-color),0));animation:gradient-a930a25b infinite 2s;z-index:0}.aloading-header[data-v-a930a25b]{color:var(--sc-cell-text-color);font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);padding:0;margin:0;font-weight:400;z-index:1}.aloading-header[data-v-a930a25b]:after{content:"...";animation:ellipse-a930a25b 2s;animation-iteration-count:infinite}@keyframes gradient-a930a25b{0%{left:-100%}to{left:100%}}@keyframes ellipse-a930a25b{0%{content:""}20%{content:""}40%{content:"."}60%{content:".."}80%{content:"..."}}.aloading[data-v-e1165876]{width:100%;border-top:1px solid var(--sc-row-border-color);border-bottom:1px solid var(--sc-row-border-color);display:flex;background-color:#fff;border-left:4px solid var(--sc-row-border-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);align-items:center;box-sizing:border-box;background:var(--sc-focus-cell-background);overflow:hidden;position:relative}.aloading-bar[data-v-e1165876]{width:50%;height:3px;position:absolute;left:-100%;bottom:0;background:var(--sc-row-border-color);animation:bar-left-e1165876 infinite 2s;z-index:0}.aloading-header[data-v-e1165876]{color:var(--sc-cell-text-color);font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);padding:0;margin:0;font-weight:400;z-index:1}.aloading-header[data-v-e1165876]:after{content:"...";animation:ellipse-e1165876 2s;animation-iteration-count:infinite}@keyframes bar-left-e1165876{0%{left:-50%}to{left:100%}}@keyframes ellipse-e1165876{0%{content:""}20%{content:""}40%{content:"."}60%{content:".."}80%{content:"..."}}.aform_checkbox[data-v-f13fd4d6]{cursor:pointer;width:auto;margin-top:0;display:block}.aform_checkbox[data-v-f13fd4d6]:checked{accent-color:var(--sc-primary-color);border:1px solid black}.aform_checkbox-container[data-v-f13fd4d6]{width:100%;display:inline-block;text-align:left}.aform_checkbox-container input[data-v-f13fd4d6]{width:auto}.aform_checkbox-container:hover+.aform_field-label[data-v-f13fd4d6]{color:var(--sc-input-active-label-color)}div[data-v-a15ed922]{min-width:40ch;width:100%;box-sizing:border-box;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-a15ed922]{width:calc(100% - 1ch);box-sizing:border-box;outline:1px solid transparent;border:1px solid var(--sc-input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-a15ed922],label[data-v-a15ed922]{color:var(--sc-input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;box-sizing:border-box}p[data-v-a15ed922]{width:100%;color:red;font-size:85%;box-sizing:border-box}label[data-v-a15ed922]{z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch;box-sizing:border-box}input[data-v-a15ed922]:focus{border:1px solid var(--sc-input-active-border-color)}input:focus+label[data-v-a15ed922]{color:var(--sc-input-active-label-color)}.autocomplete[data-v-31a6db8c]{position:relative}.input-wrapper[data-v-31a6db8c]{border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-31a6db8c]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--sc-input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}input[data-v-31a6db8c]:focus{border:1px solid var(--sc-input-active-border-color);border-radius:.25rem .25rem 0 0;border-bottom:none}label[data-v-31a6db8c]{display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent;z-index:2;font-size:80%;position:absolute;background:#fff;margin:-2.575rem 0 0 1ch;padding:0 .25ch}.autocomplete-results[data-v-31a6db8c]{position:absolute;width:calc(100% - 1ch + 1.5px);z-index:999;padding:0;margin:0;color:var(--sc-input-active-border-color);border:1px solid var(--sc-input-active-border-color);border-radius:0 0 .25rem .25rem;border-top:none;background-color:#fff}.autocomplete-result[data-v-31a6db8c]{list-style:none;text-align:left;padding:4px 6px;cursor:pointer;border-bottom:.5px solid lightgray}.autocomplete-result.is-active[data-v-31a6db8c],.autocomplete-result[data-v-31a6db8c]:hover{background-color:var(--sc-row-color-zebra-light);color:var(--sc-input-active-border-color)}.adatepicker[data-v-056d2b5e]{font-size:var(--sc-table-font-size);display:inline-table;color:var(--sc-cell-text-color);outline:none;border-collapse:collapse}.adatepicker tr[data-v-056d2b5e]{height:1.15rem;text-align:center;vertical-align:middle}.adatepicker td[data-v-056d2b5e]{border:2px solid transparent;outline:2px solid transparent;min-width:3ch;max-width:3ch}.adatepicker td[data-v-056d2b5e]:focus,.adatepicker td[data-v-056d2b5e]:focus-within{outline:1px dashed black;box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}.adatepicker .selectedDate[data-v-056d2b5e]{outline:1px solid black;background:var(--sc-gray-20);font-weight:bolder}.adatepicker .todaysDate[data-v-056d2b5e]{font-weight:bolder;text-decoration:underline;color:#000}.days-header>td[data-v-056d2b5e]{font-weight:700}.prev-date[data-v-056d2b5e]{color:var(--sc-gray-20)}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}.aform_form-element{padding:0;margin:0;position:relative;box-sizing:border-box;flex-grow:1;min-width:20ch;margin-bottom:1rem}.aform_input-field{outline:1px solid var(--sc-input-border-color);outline-offset:-1px;font-size:1rem;padding:.5rem;margin:0;border-radius:0;box-sizing:border-box;width:100%;min-height:auto;position:relative;color:var(--sc-cell-text-color);background:var(--sc-input-field-background)}.aform_input-field:focus{outline:1px solid var(--sc-input-active-border-color)}.aform_input-field:focus+.aform_field-label{color:var(--sc-input-active-label-color)}.aform_field-label{color:var(--sc-input-label-color);display:inline-block;position:absolute;padding:0 .25rem;margin:0rem;z-index:2;font-size:.7rem;font-weight:300;letter-spacing:.05rem;background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-background) 50%);width:auto;box-sizing:border-box;background:#fff;margin:0;grid-row:1;top:0;left:10px;border:none;line-height:0;transform:translateY(-50%)}.aform_input-field:disabled{background:var(--sc-input-field-disabled-background)}.aform_input-field:disabled+.aform_field-label{background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-disabled-background) 50%)}.aform_input-field:disabled~p.aform_error{background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-disabled-background) 50%)}.aform_field-label:after{margin:0;padding:0;box-sizing:border-box;content:"";line-height:normal}p.aform_error{display:block;display:inline-block;display:none;background:linear-gradient(var(--sc-form-background) 50%,var(--sc-input-field-background) 50%);padding:0 .25rem;margin:0rem;width:auto;color:var(--sc-brand-danger);font-size:.7rem;position:absolute;right:0;top:0;line-height:0;background:#fff;padding:.25rem;transform:translate(-1rem,-50%);margin:0}.aform[data-v-06e17c5b]{display:flex;flex-wrap:wrap;gap:1rem;padding:1rem;border:1px solid var(--sc-form-border);border-left:4px solid var(--sc-form-border);margin-bottom:1rem;max-width:100%}@media screen and (max-width:400px){.aform[data-v-06e17c5b]{flex-direction:column}}.aform-nested-section[data-v-06e17c5b]{width:100%;padding:.5rem 0}.aform-nested-label[data-v-06e17c5b]{font-size:.9rem;font-weight:600;margin:0 0 .5rem;color:var(--sc-input-label-color, #666)}.aform-nested-section .aform[data-v-06e17c5b]{border-left-width:2px;margin-left:.5rem}fieldset[data-v-18fd6c61]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--sc-gray-50)}legend[data-v-18fd6c61]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;-webkit-user-select:none;user-select:none}.collapse-button[data-v-18fd6c61]{float:right}.aform_file-attach[data-v-b700734f]{padding:1rem;display:flex;flex-wrap:wrap;gap:1rem;flex-direction:row;justify-content:center;align-items:center;border:1px dashed var(--sc-input-border-color);width:100%}@media screen and (max-width:400px){.aform_file-attach>.aform_form-btn[data-v-b700734f]{width:100%}}.aform_file-attach-feedback[data-v-b700734f]{color:var(--sc-input-label-color);width:100%;padding:.5rem;text-align:center;align-self:center}.aform_file-attach-feedback>li[data-v-b700734f]{list-style:none;font-style:italic}.aform_file-attach-feedback>p[data-v-b700734f]{margin-top:0}.aform_form-btn[data-v-b700734f]{padding:.5rem 2rem;width:auto;border:1px solid var(--sc-input-border-color);color:var(--sc-input-label-color);cursor:pointer;background-color:#fff}.aform_form-btn[data-v-b700734f]:disabled{background-color:var(--sc-gray-5)}.login-container[data-v-d9ffd0a7]{width:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:var(--sc-font-family)}.account-container[data-v-d9ffd0a7]{width:100%;margin-left:auto;margin-top:.5rem;margin-right:auto;display:flex;flex-direction:column;justify-content:center}.account-header[data-v-d9ffd0a7]{display:flex;flex-direction:column;text-align:center;margin-top:.5rem}#account-title[data-v-d9ffd0a7]{font-size:1.5rem;line-height:2rem;font-weight:600;letter-spacing:-.025em;margin:0}#account-subtitle[data-v-d9ffd0a7]{font-size:.875rem;line-height:1.25rem;margin:1rem}.login-form-container[data-v-d9ffd0a7]{display:grid;gap:.5rem}.login-form-element[data-v-d9ffd0a7]{display:grid;margin:.5rem 0;position:relative}.login-field[data-v-d9ffd0a7]{padding:.5rem .25rem .25rem .5rem;outline:1px solid transparent;border:1px solid var(--sc-input-border-color);border-radius:.25rem}.login-field[data-v-d9ffd0a7]:focus{border:1px solid black}.btn[data-v-d9ffd0a7]{background-color:var(--sc-btn-color);color:var(--sc-btn-label-color);border:1px solid var(--sc-btn-border);margin:.5rem 0;padding:.25rem;position:relative;cursor:pointer}.btn[data-v-d9ffd0a7]:hover{background-color:var(--sc-btn-hover)}.btn[data-v-d9ffd0a7]:disabled{background-color:var(--sc-input-field-disabled-background)}.disabled[data-v-d9ffd0a7]{opacity:.5}.loading-icon[data-v-d9ffd0a7]{animation:spin-d9ffd0a7 1s linear infinite forwards;display:inline-block;margin-right:.2rem;line-height:0;font-size:1rem;position:relative;top:.2rem}@keyframes spin-d9ffd0a7{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { install as installATable } from '@stonecrop/atable';
|
|
1
2
|
import ACheckbox from './components/form/ACheckbox.vue';
|
|
2
3
|
import AComboBox from './components/form/AComboBox.vue';
|
|
3
4
|
import ADate from './components/form/ADate.vue';
|
|
@@ -15,6 +16,7 @@ import Login from './components/utilities/Login.vue';
|
|
|
15
16
|
* @public
|
|
16
17
|
*/
|
|
17
18
|
function install(app /* options */) {
|
|
19
|
+
app.use(installATable); // Install ATable components for use within AForm
|
|
18
20
|
app.component('ACheckbox', ACheckbox);
|
|
19
21
|
app.component('ACombobox', AComboBox);
|
|
20
22
|
app.component('ADate', ADate);
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,yBAAyB,CAAA;AAE5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,OAAO,SAAS,MAAM,iCAAiC,CAAA;AACvD,OAAO,SAAS,MAAM,iCAAiC,CAAA;AACvD,OAAO,KAAK,MAAM,6BAA6B,CAAA;AAC/C,OAAO,SAAS,MAAM,iCAAiC,CAAA;AACvD,OAAO,WAAW,MAAM,mCAAmC,CAAA;AAC3D,OAAO,SAAS,MAAM,iCAAiC,CAAA;AACvD,OAAO,WAAW,MAAM,mCAAmC,CAAA;AAC3D,OAAO,KAAK,MAAM,wBAAwB,CAAA;AAC1C,OAAO,aAAa,MAAM,qCAAqC,CAAA;AAC/D,OAAO,UAAU,MAAM,kCAAkC,CAAA;AACzD,OAAO,KAAK,MAAM,kCAAkC,CAAA;AACpD,mBAAmB,SAAS,CAAA;AAE5B;;;;GAIG;AACH,iBAAS,OAAO,CAAC,GAAG,EAAE,GAAG,QAYxB;AAED,OAAO,EACN,SAAS,EACT,SAAS,EACT,KAAK,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,KAAK,EACL,aAAa,EACb,UAAU,EACV,KAAK,EACL,OAAO,GACP,CAAA"}
|
|
@@ -167,9 +167,104 @@ export type FieldsetSchema = BaseSchema & {
|
|
|
167
167
|
*/
|
|
168
168
|
collapsible?: boolean;
|
|
169
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* Schema structure for defining nested doctype fields inside AForm
|
|
172
|
+
*
|
|
173
|
+
* @remarks
|
|
174
|
+
* When a field has `fieldtype: 'Doctype'`, the `options` property contains the slug
|
|
175
|
+
* of the referenced doctype. The `schema` property is populated by the framework's
|
|
176
|
+
* `registry.resolveSchema()` method with the resolved child schema fields.
|
|
177
|
+
*
|
|
178
|
+
* Before resolution: `{ fieldname: 'address', fieldtype: 'Doctype', options: 'address' }`
|
|
179
|
+
* After resolution: `{ fieldname: 'address', fieldtype: 'Doctype', options: 'address', schema: [...resolved fields...] }`
|
|
180
|
+
*
|
|
181
|
+
* Users can also manually provide the `schema` property without using the framework registry.
|
|
182
|
+
*
|
|
183
|
+
* @public
|
|
184
|
+
*/
|
|
185
|
+
export type DoctypeSchema = BaseSchema & {
|
|
186
|
+
/**
|
|
187
|
+
* The field type - must be 'Doctype' for nested doctype fields
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
fieldtype: 'Doctype';
|
|
191
|
+
/**
|
|
192
|
+
* The slug of the referenced doctype in the registry
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
options: string;
|
|
196
|
+
/**
|
|
197
|
+
* The label to display above the nested form section
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
label?: string;
|
|
201
|
+
/**
|
|
202
|
+
* The resolved child schema fields, populated by `registry.resolveSchema()`
|
|
203
|
+
* or provided manually for standalone usage
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
schema?: SchemaTypes[];
|
|
207
|
+
/**
|
|
208
|
+
* Indicate whether the nested form is read-only
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
readOnly?: boolean;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Schema structure for defining 1:many child table fields inside AForm
|
|
215
|
+
*
|
|
216
|
+
* @remarks
|
|
217
|
+
* When a field has `fieldtype: 'Table'`, the `options` property contains the slug
|
|
218
|
+
* of the child doctype whose records appear as table rows.
|
|
219
|
+
*
|
|
220
|
+
* `Registry.resolveSchema()` auto-derives `columns` from the child doctype's schema
|
|
221
|
+
* fields and sets sensible defaults for `component` (`'ATable'`) and `config` (`{ view: 'list' }`).
|
|
222
|
+
*
|
|
223
|
+
* Users can override any auto-derived property by specifying it explicitly on the schema field.
|
|
224
|
+
* Row data comes from the parent form's data model at `data[fieldname]` (an array).
|
|
225
|
+
*
|
|
226
|
+
* @public
|
|
227
|
+
*/
|
|
228
|
+
export type TableDoctypeSchema = BaseSchema & {
|
|
229
|
+
/**
|
|
230
|
+
* The field type — must be 'Table' for 1:many child table fields
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
233
|
+
fieldtype: 'Table';
|
|
234
|
+
/**
|
|
235
|
+
* The slug of the child doctype in the registry
|
|
236
|
+
* @public
|
|
237
|
+
*/
|
|
238
|
+
options: string;
|
|
239
|
+
/**
|
|
240
|
+
* The label to display above the table section
|
|
241
|
+
* @public
|
|
242
|
+
*/
|
|
243
|
+
label?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Table columns — auto-derived from child doctype schema if not provided
|
|
246
|
+
* @public
|
|
247
|
+
*/
|
|
248
|
+
columns?: TableColumn[];
|
|
249
|
+
/**
|
|
250
|
+
* Table configuration — defaults to `{ view: 'list' }` if not provided
|
|
251
|
+
* @public
|
|
252
|
+
*/
|
|
253
|
+
config?: TableConfig;
|
|
254
|
+
/**
|
|
255
|
+
* Table rows — populated from the parent form's data model at `data[fieldname]`
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
258
|
+
rows?: TableRow[];
|
|
259
|
+
/**
|
|
260
|
+
* Indicate whether the table is read-only
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
readOnly?: boolean;
|
|
264
|
+
};
|
|
170
265
|
/**
|
|
171
266
|
* Superset of all schema types for AForm
|
|
172
267
|
* @public
|
|
173
268
|
*/
|
|
174
|
-
export type SchemaTypes = FormSchema | TableSchema | FieldsetSchema;
|
|
269
|
+
export type SchemaTypes = FormSchema | TableSchema | FieldsetSchema | DoctypeSchema | TableDoctypeSchema;
|
|
175
270
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3E;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,UAAU,CAAC,EAAE;QACZ;;;WAGG;QACH,YAAY,EAAE,MAAM,CAAA;QAEpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAClB,CAAA;CACD,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACxB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAA;CACX,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACrC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAA;IAEvB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,UAAU,GAAG,WAAW,CAAC,EAAE,CAAA;IAErC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3E;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,UAAU,CAAC,EAAE;QACZ;;;WAGG;QACH,YAAY,EAAE,MAAM,CAAA;QAEpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAClB,CAAA;CACD,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACxB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAA;CACX,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACrC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAA;IAEvB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,UAAU,GAAG,WAAW,CAAC,EAAE,CAAA;IAErC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG;IACxC;;;OAGG;IACH,SAAS,EAAE,SAAS,CAAA;IAEpB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC7C;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAA;IAEvB;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAA;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,GAAG,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/aform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -37,9 +37,11 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@vueuse/core": "^14.1.0",
|
|
39
39
|
"@vueuse/components": "^14.1.0",
|
|
40
|
+
"pinia": "^3.0.4",
|
|
40
41
|
"vue": "^3.5.26",
|
|
41
|
-
"@stonecrop/themes": "0.
|
|
42
|
-
"@stonecrop/
|
|
42
|
+
"@stonecrop/themes": "0.8.1",
|
|
43
|
+
"@stonecrop/atable": "0.8.1",
|
|
44
|
+
"@stonecrop/utilities": "0.8.1"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@eslint/js": "^9.39.2",
|
|
@@ -60,12 +62,8 @@
|
|
|
60
62
|
"vite": "^7.3.1",
|
|
61
63
|
"vitest": "^4.0.17",
|
|
62
64
|
"vue-router": "^4.6.4",
|
|
63
|
-
"@stonecrop/atable": "0.7.9",
|
|
64
65
|
"stonecrop-rig": "0.7.0"
|
|
65
66
|
},
|
|
66
|
-
"peerDependencies": {
|
|
67
|
-
"@stonecrop/atable": "0.7.9"
|
|
68
|
-
},
|
|
69
67
|
"publishConfig": {
|
|
70
68
|
"access": "public"
|
|
71
69
|
},
|
package/src/components/AForm.vue
CHANGED
|
@@ -1,84 +1,135 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<form class="aform">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
<template v-for="(componentObj, key) in schema" :key="key">
|
|
4
|
+
<!-- Nested schema field (Doctype or any field with resolved schema) -->
|
|
5
|
+
<div
|
|
6
|
+
v-if="'schema' in componentObj && Array.isArray(componentObj.schema) && componentObj.schema.length > 0"
|
|
7
|
+
class="aform-nested-section">
|
|
8
|
+
<h4 v-if="(componentObj as any).label" class="aform-nested-label">
|
|
9
|
+
{{ (componentObj as any).label }}
|
|
10
|
+
</h4>
|
|
11
|
+
<AForm
|
|
12
|
+
v-model:data="nestedData[componentObj.fieldname]"
|
|
13
|
+
:schema="componentObj.schema"
|
|
14
|
+
:read-only="readOnly || (componentObj as any).readOnly" />
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- Regular field -->
|
|
18
|
+
<component
|
|
19
|
+
:is="componentObj.component"
|
|
20
|
+
v-else
|
|
21
|
+
v-model="childModels[key].value"
|
|
22
|
+
:schema="componentObj"
|
|
23
|
+
:data="dataModel[componentObj.fieldname]"
|
|
24
|
+
:read-only="readOnly"
|
|
25
|
+
v-bind="componentProps(componentObj)">
|
|
26
|
+
</component>
|
|
27
|
+
</template>
|
|
13
28
|
</form>
|
|
14
29
|
</template>
|
|
15
30
|
|
|
16
31
|
<script setup lang="ts">
|
|
17
|
-
import {
|
|
32
|
+
import { computed, watchEffect, ref } from 'vue'
|
|
18
33
|
|
|
19
34
|
import type { SchemaTypes } from '../types'
|
|
20
35
|
|
|
21
|
-
const emit = defineEmits(['update:
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
36
|
+
const emit = defineEmits(['update:schema', 'update:data'])
|
|
37
|
+
const dataModel = defineModel<Record<string, any>>('data', { required: true })
|
|
38
|
+
const { schema, readOnly } = defineProps<{ schema: SchemaTypes[]; readOnly?: boolean }>()
|
|
39
|
+
|
|
40
|
+
// Reactive nested data refs for two-way binding with nested AForm instances
|
|
41
|
+
const nestedData = ref<Record<string, any>>({})
|
|
42
|
+
|
|
43
|
+
// Initialize and sync nested data from dataModel for fields with resolved schemas
|
|
44
|
+
watchEffect(() => {
|
|
45
|
+
if (!schema || !dataModel.value) return
|
|
46
|
+
|
|
47
|
+
schema.forEach(field => {
|
|
48
|
+
if ('schema' in field && Array.isArray(field.schema) && field.schema.length > 0) {
|
|
49
|
+
// Initialize nested data from parent data model if not yet present
|
|
50
|
+
if (!nestedData.value[field.fieldname] && dataModel.value[field.fieldname]) {
|
|
51
|
+
nestedData.value[field.fieldname] = dataModel.value[field.fieldname]
|
|
52
|
+
} else if (!nestedData.value[field.fieldname]) {
|
|
53
|
+
nestedData.value[field.fieldname] = {}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
})
|
|
27
58
|
|
|
28
|
-
|
|
59
|
+
// Sync nested data changes back to main data model
|
|
60
|
+
watchEffect(() => {
|
|
61
|
+
Object.keys(nestedData.value).forEach(fieldname => {
|
|
62
|
+
if (dataModel.value && nestedData.value[fieldname] !== dataModel.value[fieldname]) {
|
|
63
|
+
dataModel.value[fieldname] = nestedData.value[fieldname]
|
|
64
|
+
emit('update:data', dataModel.value)
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
})
|
|
29
68
|
|
|
30
69
|
// Sync data values into schema immediately and on changes
|
|
31
70
|
watchEffect(() => {
|
|
32
|
-
if (
|
|
33
|
-
formData.value = data
|
|
71
|
+
if (dataModel.value && schema) {
|
|
34
72
|
// Sync data values into schema
|
|
35
|
-
|
|
36
|
-
if (field.fieldname &&
|
|
37
|
-
|
|
38
|
-
field.value = data[field.fieldname]
|
|
73
|
+
schema.forEach(field => {
|
|
74
|
+
if (field.fieldname && dataModel.value[field.fieldname] !== undefined) {
|
|
75
|
+
field.value = dataModel.value[field.fieldname]
|
|
39
76
|
}
|
|
40
77
|
})
|
|
41
78
|
}
|
|
42
79
|
})
|
|
43
80
|
|
|
44
81
|
const componentProps = (componentObj: SchemaTypes) => {
|
|
45
|
-
|
|
82
|
+
const propsToPass: Record<string, any> = {}
|
|
46
83
|
for (const [key, value] of Object.entries(componentObj)) {
|
|
47
84
|
if (!['component', 'fieldtype'].includes(key)) {
|
|
48
85
|
propsToPass[key] = value
|
|
49
86
|
}
|
|
50
87
|
|
|
51
|
-
// handle ATable data formats in case the table is nested under an
|
|
52
|
-
//
|
|
88
|
+
// handle ATable data formats in case the table is nested under an AForm;
|
|
89
|
+
// when resolveSchema sets rows: [], this fallback routes data from dataModel[fieldname]
|
|
53
90
|
if (key === 'rows') {
|
|
54
|
-
if (value && (value as any[]).length === 0) {
|
|
55
|
-
propsToPass['rows'] =
|
|
91
|
+
if (!value || (Array.isArray(value) && (value as any[]).length === 0)) {
|
|
92
|
+
propsToPass['rows'] = dataModel.value[componentObj.fieldname] || []
|
|
56
93
|
}
|
|
57
94
|
}
|
|
58
95
|
}
|
|
59
96
|
return propsToPass
|
|
60
97
|
}
|
|
61
98
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
99
|
+
// Create stable computed refs array to avoid recreation on every access
|
|
100
|
+
const childModelsCache = ref<ReturnType<typeof computed>[]>([])
|
|
101
|
+
|
|
102
|
+
// Watch for schema changes and update cache (avoiding side effects in computed)
|
|
103
|
+
watchEffect(() => {
|
|
104
|
+
if (!schema) return
|
|
105
|
+
|
|
106
|
+
// Recreate cache only if length changed
|
|
107
|
+
if (childModelsCache.value.length !== schema.length) {
|
|
108
|
+
childModelsCache.value = schema.map((val, i) => {
|
|
65
109
|
return computed({
|
|
66
110
|
get() {
|
|
67
111
|
return val.value
|
|
68
112
|
},
|
|
69
113
|
set: newValue => {
|
|
70
|
-
|
|
114
|
+
const fieldname = schema[i].fieldname
|
|
115
|
+
// Find the component in schema and update it
|
|
71
116
|
// eslint-disable-next-line vue/no-mutating-props
|
|
72
|
-
|
|
73
|
-
|
|
117
|
+
schema[i].value = newValue
|
|
118
|
+
// Also sync to data model for two-way binding
|
|
119
|
+
if (fieldname && dataModel.value) {
|
|
120
|
+
dataModel.value[fieldname] = newValue
|
|
121
|
+
// Manually emit to trigger parent's update:data handler
|
|
122
|
+
emit('update:data', dataModel.value)
|
|
123
|
+
}
|
|
124
|
+
emit('update:schema', schema)
|
|
74
125
|
},
|
|
75
126
|
})
|
|
76
127
|
})
|
|
77
|
-
}
|
|
78
|
-
set: (/* newValue */) => {
|
|
79
|
-
//emit('update:modelValue', '')
|
|
80
|
-
},
|
|
128
|
+
}
|
|
81
129
|
})
|
|
130
|
+
|
|
131
|
+
// Computed just returns the cached models (no side effects)
|
|
132
|
+
const childModels = computed(() => childModelsCache.value)
|
|
82
133
|
</script>
|
|
83
134
|
|
|
84
135
|
<style>
|
|
@@ -190,4 +241,22 @@ p.aform_error {
|
|
|
190
241
|
flex-direction: column;
|
|
191
242
|
}
|
|
192
243
|
}
|
|
244
|
+
|
|
245
|
+
/* Nested form section */
|
|
246
|
+
.aform-nested-section {
|
|
247
|
+
width: 100%;
|
|
248
|
+
padding: 0.5rem 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.aform-nested-label {
|
|
252
|
+
font-size: 0.9rem;
|
|
253
|
+
font-weight: 600;
|
|
254
|
+
margin: 0 0 0.5rem 0;
|
|
255
|
+
color: var(--sc-input-label-color, #666);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.aform-nested-section .aform {
|
|
259
|
+
border-left-width: 2px;
|
|
260
|
+
margin-left: 0.5rem;
|
|
261
|
+
}
|
|
193
262
|
</style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<CollapseButton v-if="collapsible" :collapsed="collapsed" />
|
|
6
6
|
</legend>
|
|
7
7
|
<slot :collapsed="collapsed">
|
|
8
|
-
<AForm v-show="!collapsed"
|
|
8
|
+
<AForm v-show="!collapsed" :schema="formSchema" v-model:data="formData" />
|
|
9
9
|
</slot>
|
|
10
10
|
</fieldset>
|
|
11
11
|
</template>
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type * from '@stonecrop/atable/types'
|
|
2
|
+
import { install as installATable } from '@stonecrop/atable'
|
|
2
3
|
import type { App } from 'vue'
|
|
3
4
|
|
|
4
5
|
import ACheckbox from './components/form/ACheckbox.vue'
|
|
@@ -20,6 +21,7 @@ export type * from './types'
|
|
|
20
21
|
* @public
|
|
21
22
|
*/
|
|
22
23
|
function install(app: App /* options */) {
|
|
24
|
+
app.use(installATable) // Install ATable components for use within AForm
|
|
23
25
|
app.component('ACheckbox', ACheckbox)
|
|
24
26
|
app.component('ACombobox', AComboBox)
|
|
25
27
|
app.component('ADate', ADate)
|
package/src/types/index.ts
CHANGED
|
@@ -192,8 +192,115 @@ export type FieldsetSchema = BaseSchema & {
|
|
|
192
192
|
collapsible?: boolean
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Schema structure for defining nested doctype fields inside AForm
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* When a field has `fieldtype: 'Doctype'`, the `options` property contains the slug
|
|
200
|
+
* of the referenced doctype. The `schema` property is populated by the framework's
|
|
201
|
+
* `registry.resolveSchema()` method with the resolved child schema fields.
|
|
202
|
+
*
|
|
203
|
+
* Before resolution: `{ fieldname: 'address', fieldtype: 'Doctype', options: 'address' }`
|
|
204
|
+
* After resolution: `{ fieldname: 'address', fieldtype: 'Doctype', options: 'address', schema: [...resolved fields...] }`
|
|
205
|
+
*
|
|
206
|
+
* Users can also manually provide the `schema` property without using the framework registry.
|
|
207
|
+
*
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
210
|
+
export type DoctypeSchema = BaseSchema & {
|
|
211
|
+
/**
|
|
212
|
+
* The field type - must be 'Doctype' for nested doctype fields
|
|
213
|
+
* @public
|
|
214
|
+
*/
|
|
215
|
+
fieldtype: 'Doctype'
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* The slug of the referenced doctype in the registry
|
|
219
|
+
* @public
|
|
220
|
+
*/
|
|
221
|
+
options: string
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The label to display above the nested form section
|
|
225
|
+
* @public
|
|
226
|
+
*/
|
|
227
|
+
label?: string
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The resolved child schema fields, populated by `registry.resolveSchema()`
|
|
231
|
+
* or provided manually for standalone usage
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
schema?: SchemaTypes[]
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Indicate whether the nested form is read-only
|
|
238
|
+
* @public
|
|
239
|
+
*/
|
|
240
|
+
readOnly?: boolean
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Schema structure for defining 1:many child table fields inside AForm
|
|
245
|
+
*
|
|
246
|
+
* @remarks
|
|
247
|
+
* When a field has `fieldtype: 'Table'`, the `options` property contains the slug
|
|
248
|
+
* of the child doctype whose records appear as table rows.
|
|
249
|
+
*
|
|
250
|
+
* `Registry.resolveSchema()` auto-derives `columns` from the child doctype's schema
|
|
251
|
+
* fields and sets sensible defaults for `component` (`'ATable'`) and `config` (`{ view: 'list' }`).
|
|
252
|
+
*
|
|
253
|
+
* Users can override any auto-derived property by specifying it explicitly on the schema field.
|
|
254
|
+
* Row data comes from the parent form's data model at `data[fieldname]` (an array).
|
|
255
|
+
*
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
258
|
+
export type TableDoctypeSchema = BaseSchema & {
|
|
259
|
+
/**
|
|
260
|
+
* The field type — must be 'Table' for 1:many child table fields
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
fieldtype: 'Table'
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The slug of the child doctype in the registry
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
|
+
options: string
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The label to display above the table section
|
|
273
|
+
* @public
|
|
274
|
+
*/
|
|
275
|
+
label?: string
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Table columns — auto-derived from child doctype schema if not provided
|
|
279
|
+
* @public
|
|
280
|
+
*/
|
|
281
|
+
columns?: TableColumn[]
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Table configuration — defaults to `{ view: 'list' }` if not provided
|
|
285
|
+
* @public
|
|
286
|
+
*/
|
|
287
|
+
config?: TableConfig
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Table rows — populated from the parent form's data model at `data[fieldname]`
|
|
291
|
+
* @public
|
|
292
|
+
*/
|
|
293
|
+
rows?: TableRow[]
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Indicate whether the table is read-only
|
|
297
|
+
* @public
|
|
298
|
+
*/
|
|
299
|
+
readOnly?: boolean
|
|
300
|
+
}
|
|
301
|
+
|
|
195
302
|
/**
|
|
196
303
|
* Superset of all schema types for AForm
|
|
197
304
|
* @public
|
|
198
305
|
*/
|
|
199
|
-
export type SchemaTypes = FormSchema | TableSchema | FieldsetSchema
|
|
306
|
+
export type SchemaTypes = FormSchema | TableSchema | FieldsetSchema | DoctypeSchema | TableDoctypeSchema
|