@vulcanjs/react-ui 0.6.6-alpha.4 → 0.6.6-alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/form/FormComponentInner.d.ts +3 -6
- package/dist/components/form/FormComponentInner.d.ts.map +1 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/inputs/BasicInputs.d.ts +2 -6
- package/dist/components/form/inputs/BasicInputs.d.ts.map +1 -1
- package/dist/components/form/inputs/Checkboxgroup.d.ts.map +1 -1
- package/dist/components/form/inputs/FormItem.d.ts +4 -0
- package/dist/components/form/inputs/FormItem.d.ts.map +1 -0
- package/dist/components/form/inputs/RadioGroup.d.ts +4 -0
- package/dist/components/form/inputs/RadioGroup.d.ts.map +1 -0
- package/dist/components/form/inputs/SelectInputs.d.ts +5 -0
- package/dist/components/form/inputs/SelectInputs.d.ts.map +1 -0
- package/dist/components/form/inputs/index.d.ts +6 -0
- package/dist/components/form/inputs/index.d.ts.map +1 -0
- package/dist/index.js +499 -434
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -9602,7 +9602,7 @@ init_esm_shims();
|
|
9602
9602
|
|
9603
9603
|
// components/VulcanComponents/Provider.tsx
|
9604
9604
|
init_esm_shims();
|
9605
|
-
import
|
9605
|
+
import React65 from "react";
|
9606
9606
|
|
9607
9607
|
// components/VulcanComponents/defaultVulcanComponents/index.ts
|
9608
9608
|
init_esm_shims();
|
@@ -10723,9 +10723,24 @@ var FormOptionLabel = /* @__PURE__ */ __name(({ option }) => {
|
|
10723
10723
|
}, label);
|
10724
10724
|
}, "FormOptionLabel");
|
10725
10725
|
|
10726
|
-
// components/form/inputs/
|
10726
|
+
// components/form/inputs/index.ts
|
10727
|
+
init_esm_shims();
|
10728
|
+
|
10729
|
+
// components/form/inputs/FormItem.tsx
|
10727
10730
|
init_esm_shims();
|
10728
10731
|
import React25 from "react";
|
10732
|
+
var FormItem = /* @__PURE__ */ __name((props) => {
|
10733
|
+
const { inputProperties, label, name: name2 } = props;
|
10734
|
+
return /* @__PURE__ */ React25.createElement("div", {
|
10735
|
+
className: `form-item ${name2}`
|
10736
|
+
}, /* @__PURE__ */ React25.createElement("label", {
|
10737
|
+
htmlFor: name2
|
10738
|
+
}, label), props.children);
|
10739
|
+
}, "FormItem");
|
10740
|
+
|
10741
|
+
// components/form/inputs/BasicInputs.tsx
|
10742
|
+
init_esm_shims();
|
10743
|
+
import React26 from "react";
|
10729
10744
|
function _extends15() {
|
10730
10745
|
_extends15 = Object.assign || function(target) {
|
10731
10746
|
for (var i = 1; i < arguments.length; i++) {
|
@@ -10745,125 +10760,125 @@ var HTMLInputAdapter = /* @__PURE__ */ __name((props) => {
|
|
10745
10760
|
const Components2 = useVulcanComponents();
|
10746
10761
|
const { inputProperties = {}, itemProperties = {}, path } = props;
|
10747
10762
|
const _a = inputProperties, { label, name: name2 } = _a, otherInputProperties = __objRest(_a, ["label", "name"]);
|
10748
|
-
return /* @__PURE__ */
|
10763
|
+
return /* @__PURE__ */ React26.createElement(Components2.FormItem, _extends15({
|
10749
10764
|
name: name2,
|
10750
10765
|
path,
|
10751
10766
|
label,
|
10752
10767
|
inputProperties
|
10753
|
-
}, itemProperties), /* @__PURE__ */
|
10768
|
+
}, itemProperties), /* @__PURE__ */ React26.createElement("input", _extends15({}, otherInputProperties, {
|
10754
10769
|
id: name2,
|
10755
10770
|
name: name2,
|
10756
10771
|
type: props.type
|
10757
10772
|
})));
|
10758
10773
|
}, "HTMLInputAdapter");
|
10759
|
-
var
|
10760
|
-
const { inputProperties, label, name: name2 } = props;
|
10761
|
-
return /* @__PURE__ */ React25.createElement("div", {
|
10762
|
-
className: `form-item ${name2}`
|
10763
|
-
}, /* @__PURE__ */ React25.createElement("label", {
|
10764
|
-
htmlFor: name2
|
10765
|
-
}, label), props.children);
|
10766
|
-
}, "FormItem");
|
10767
|
-
var HTMLSelectAdapter = /* @__PURE__ */ __name((props) => {
|
10768
|
-
const { multiple, path, inputProperties = {}, options = [], itemProperties } = props;
|
10769
|
-
const { label: label1, name: name2 } = inputProperties;
|
10770
|
-
if (!Array.isArray(options))
|
10771
|
-
throw new Error("HTMLSelectAdapater not yet supporting functional options");
|
10772
|
-
const Components2 = useVulcanComponents();
|
10773
|
-
return /* @__PURE__ */ React25.createElement(Components2.FormItem, _extends15({
|
10774
|
-
name: name2,
|
10775
|
-
label: label1,
|
10776
|
-
path,
|
10777
|
-
inputProperties
|
10778
|
-
}, itemProperties), /* @__PURE__ */ React25.createElement("select", _extends15({
|
10779
|
-
multiple
|
10780
|
-
}, inputProperties), options.map(({ label, value }) => /* @__PURE__ */ React25.createElement("option", {
|
10781
|
-
key: value,
|
10782
|
-
label,
|
10783
|
-
value
|
10784
|
-
}))));
|
10785
|
-
}, "HTMLSelectAdapter");
|
10786
|
-
var FormComponentDefault = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(HTMLInputAdapter, _extends15({
|
10774
|
+
var FormComponentDefault = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10787
10775
|
type: "text"
|
10788
10776
|
}, props)), "FormComponentDefault");
|
10789
|
-
var FormComponentPassword = /* @__PURE__ */ __name((props) => /* @__PURE__ */
|
10777
|
+
var FormComponentPassword = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10790
10778
|
type: "password"
|
10791
10779
|
}, props)), "FormComponentPassword");
|
10792
|
-
var FormComponentNumber = /* @__PURE__ */ __name((props) => /* @__PURE__ */
|
10780
|
+
var FormComponentNumber = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10793
10781
|
type: "number"
|
10794
10782
|
}, props)), "FormComponentNumber");
|
10795
|
-
var FormComponentUrl = /* @__PURE__ */ __name((props) => /* @__PURE__ */
|
10783
|
+
var FormComponentUrl = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10796
10784
|
type: "url"
|
10797
10785
|
}, props)), "FormComponentUrl");
|
10798
|
-
var FormComponentEmail = /* @__PURE__ */ __name((props) => /* @__PURE__ */
|
10786
|
+
var FormComponentEmail = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10799
10787
|
type: "email"
|
10800
10788
|
}, props)), "FormComponentEmail");
|
10801
|
-
var FormComponentTextarea = /* @__PURE__ */ __name((props) => {
|
10802
|
-
const { inputProperties, itemProperties } = props;
|
10803
|
-
return /* @__PURE__ */ React25.createElement("textarea", _extends15({}, inputProperties));
|
10804
|
-
}, "FormComponentTextarea");
|
10805
10789
|
var FormComponentCheckbox = /* @__PURE__ */ __name((props) => {
|
10806
|
-
return /* @__PURE__ */
|
10790
|
+
return /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10807
10791
|
type: "checkbox"
|
10808
10792
|
}, props));
|
10809
10793
|
}, "FormComponentCheckbox");
|
10794
|
+
var FormComponentDate = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10795
|
+
type: "date"
|
10796
|
+
}, props)), "FormComponentDate");
|
10797
|
+
var FormComponentDateTime = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10798
|
+
type: "datetime-local"
|
10799
|
+
}, props)), "FormComponentDateTime");
|
10800
|
+
var FormComponentTime = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React26.createElement(HTMLInputAdapter, _extends15({
|
10801
|
+
type: "time"
|
10802
|
+
}, props)), "FormComponentTime");
|
10803
|
+
var FormComponentStaticText = /* @__PURE__ */ __name((props) => {
|
10804
|
+
const { inputProperties } = props;
|
10805
|
+
return /* @__PURE__ */ React26.createElement("input", _extends15({}, inputProperties, {
|
10806
|
+
disabled: true
|
10807
|
+
}));
|
10808
|
+
}, "FormComponentStaticText");
|
10809
|
+
var FormComponentLikert = /* @__PURE__ */ __name((props) => "Likert component not yet implemented", "FormComponentLikert");
|
10810
|
+
var FormComponentAutocomplete = /* @__PURE__ */ __name((props) => "Autocomplete component not yet implemented", "FormComponentAutocomplete");
|
10811
|
+
var FormComponentTextarea = /* @__PURE__ */ __name((props) => {
|
10812
|
+
const Components2 = useVulcanComponents();
|
10813
|
+
const { inputProperties = {}, itemProperties = {}, path } = props;
|
10814
|
+
const _a = inputProperties, { label, name: name2 } = _a, otherInputProperties = __objRest(_a, ["label", "name"]);
|
10815
|
+
return /* @__PURE__ */ React26.createElement(Components2.FormItem, _extends15({
|
10816
|
+
name: name2,
|
10817
|
+
path,
|
10818
|
+
label,
|
10819
|
+
inputProperties
|
10820
|
+
}, itemProperties), /* @__PURE__ */ React26.createElement("label", {
|
10821
|
+
htmlFor: "name"
|
10822
|
+
}, label), /* @__PURE__ */ React26.createElement("textarea", _extends15({}, inputProperties)));
|
10823
|
+
}, "FormComponentTextarea");
|
10824
|
+
|
10825
|
+
// components/form/inputs/RadioGroup.tsx
|
10826
|
+
init_esm_shims();
|
10827
|
+
import React27 from "react";
|
10828
|
+
function _extends16() {
|
10829
|
+
_extends16 = Object.assign || function(target) {
|
10830
|
+
for (var i = 1; i < arguments.length; i++) {
|
10831
|
+
var source = arguments[i];
|
10832
|
+
for (var key in source) {
|
10833
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
10834
|
+
target[key] = source[key];
|
10835
|
+
}
|
10836
|
+
}
|
10837
|
+
}
|
10838
|
+
return target;
|
10839
|
+
};
|
10840
|
+
return _extends16.apply(this, arguments);
|
10841
|
+
}
|
10842
|
+
__name(_extends16, "_extends");
|
10810
10843
|
var FormComponentRadioGroup = /* @__PURE__ */ __name((props) => {
|
10811
10844
|
const { path, inputProperties, options = [], itemProperties } = props;
|
10812
10845
|
const { label, name: name2 } = inputProperties;
|
10813
10846
|
if (!Array.isArray(options))
|
10814
10847
|
throw new Error("RadioGroup not yet supporting functional options");
|
10815
10848
|
const Components2 = useVulcanComponents();
|
10816
|
-
return /* @__PURE__ */
|
10849
|
+
return /* @__PURE__ */ React27.createElement(Components2.FormItem, _extends16({
|
10817
10850
|
path,
|
10818
10851
|
name: name2,
|
10819
10852
|
label,
|
10820
10853
|
inputProperties
|
10821
10854
|
}, itemProperties), options.map((option) => {
|
10822
10855
|
const { value, label: label2 } = option;
|
10823
|
-
return /* @__PURE__ */
|
10856
|
+
return /* @__PURE__ */ React27.createElement("div", {
|
10824
10857
|
key: value,
|
10825
10858
|
className: "form-radio-group-radio-item"
|
10826
|
-
}, /* @__PURE__ */
|
10859
|
+
}, /* @__PURE__ */ React27.createElement(Components2.FormOptionLabel, {
|
10827
10860
|
option
|
10828
|
-
}), /* @__PURE__ */
|
10861
|
+
}), /* @__PURE__ */ React27.createElement("input", _extends16({
|
10829
10862
|
type: "radio",
|
10830
10863
|
id: value,
|
10831
10864
|
name: name2,
|
10832
|
-
key: value
|
10833
|
-
|
10834
|
-
|
10865
|
+
key: value
|
10866
|
+
}, inputProperties, {
|
10867
|
+
value,
|
10868
|
+
checked: value === inputProperties.value
|
10869
|
+
})));
|
10835
10870
|
}));
|
10836
10871
|
}, "FormComponentRadioGroup");
|
10837
|
-
var FormComponentSelect = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(HTMLSelectAdapter, _extends15({}, props)), "FormComponentSelect");
|
10838
|
-
var FormComponentSelectMultiple = /* @__PURE__ */ __name((props) => {
|
10839
|
-
const Components2 = useVulcanComponents();
|
10840
|
-
return /* @__PURE__ */ React25.createElement(Components2.FormComponentSelect, _extends15({
|
10841
|
-
multiple: true
|
10842
|
-
}, props));
|
10843
|
-
}, "FormComponentSelectMultiple");
|
10844
|
-
var FormComponentDate = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(HTMLInputAdapter, _extends15({
|
10845
|
-
type: "date"
|
10846
|
-
}, props)), "FormComponentDate");
|
10847
|
-
var FormComponentDateTime = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(HTMLInputAdapter, _extends15({
|
10848
|
-
type: "datetime-local"
|
10849
|
-
}, props)), "FormComponentDateTime");
|
10850
|
-
var FormComponentTime = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(HTMLInputAdapter, _extends15({
|
10851
|
-
type: "time"
|
10852
|
-
}, props)), "FormComponentTime");
|
10853
|
-
var FormComponentStaticText = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement("input", _extends15({
|
10854
|
-
disabled: true
|
10855
|
-
}, props)), "FormComponentStaticText");
|
10856
|
-
var FormComponentLikert = /* @__PURE__ */ __name((props) => "Likert component not yet implemented", "FormComponentLikert");
|
10857
|
-
var FormComponentAutocomplete = /* @__PURE__ */ __name((props) => "Autocomplete component not yet implemented", "FormComponentAutocomplete");
|
10858
10872
|
|
10859
10873
|
// components/form/inputs/Checkboxgroup.tsx
|
10860
10874
|
init_esm_shims();
|
10861
|
-
import
|
10875
|
+
import React28, { useState as useState4 } from "react";
|
10862
10876
|
import without2 from "lodash/without.js";
|
10877
|
+
import omit3 from "lodash/omit.js";
|
10863
10878
|
import uniq2 from "lodash/uniq.js";
|
10864
10879
|
import isEmpty3 from "lodash/isEmpty.js";
|
10865
|
-
function
|
10866
|
-
|
10880
|
+
function _extends17() {
|
10881
|
+
_extends17 = Object.assign || function(target) {
|
10867
10882
|
for (var i = 1; i < arguments.length; i++) {
|
10868
10883
|
var source = arguments[i];
|
10869
10884
|
for (var key in source) {
|
@@ -10874,9 +10889,9 @@ function _extends16() {
|
|
10874
10889
|
}
|
10875
10890
|
return target;
|
10876
10891
|
};
|
10877
|
-
return
|
10892
|
+
return _extends17.apply(this, arguments);
|
10878
10893
|
}
|
10879
|
-
__name(
|
10894
|
+
__name(_extends17, "_extends");
|
10880
10895
|
var otherMarker = "[other]";
|
10881
10896
|
var isOtherValue = /* @__PURE__ */ __name((s) => s && typeof s === "string" && s.substr(0, otherMarker.length) === otherMarker, "isOtherValue");
|
10882
10897
|
var removeOtherMarker = /* @__PURE__ */ __name((s) => s && typeof s === "string" && s.substr(otherMarker.length), "removeOtherMarker");
|
@@ -10909,9 +10924,9 @@ var OtherComponent = /* @__PURE__ */ __name(({ value, path }) => {
|
|
10909
10924
|
const textFieldItemProperties = {
|
10910
10925
|
layout: "elementOnly"
|
10911
10926
|
};
|
10912
|
-
return /* @__PURE__ */
|
10927
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
10913
10928
|
className: "form-option-other"
|
10914
|
-
}, /* @__PURE__ */
|
10929
|
+
}, /* @__PURE__ */ React28.createElement(Components2.FormComponentCheckbox, {
|
10915
10930
|
layout: "elementOnly",
|
10916
10931
|
label: "Other",
|
10917
10932
|
value: showOther,
|
@@ -10934,7 +10949,7 @@ var OtherComponent = /* @__PURE__ */ __name(({ value, path }) => {
|
|
10934
10949
|
});
|
10935
10950
|
}
|
10936
10951
|
}
|
10937
|
-
}), showOther && /* @__PURE__ */
|
10952
|
+
}), showOther && /* @__PURE__ */ React28.createElement(Components2.FormComponentText, {
|
10938
10953
|
inputProperties: textFieldInputProperties,
|
10939
10954
|
itemProperties: textFieldItemProperties
|
10940
10955
|
}));
|
@@ -10948,22 +10963,25 @@ var FormComponentCheckboxGroup = /* @__PURE__ */ __name((props) => {
|
|
10948
10963
|
throw new Error("FormComponentCheckboxGroup not yet supporting functional options");
|
10949
10964
|
const value = valueFromProps ? uniq2(valueFromProps.filter((v) => isOtherValue(v) || options.map((o) => o.value).includes(v))) : [];
|
10950
10965
|
const hasValue = value.length > 0;
|
10951
|
-
return /* @__PURE__ */
|
10966
|
+
return /* @__PURE__ */ React28.createElement(Components2.FormItem, _extends17({
|
10952
10967
|
name: name2,
|
10953
10968
|
label,
|
10954
10969
|
path,
|
10955
10970
|
inputProperties
|
10956
|
-
}, itemProperties), /* @__PURE__ */
|
10971
|
+
}, itemProperties), /* @__PURE__ */ React28.createElement("div", {
|
10957
10972
|
className: "form-item-options"
|
10958
10973
|
}, options.map((option, i) => {
|
10959
10974
|
const isChecked1 = value.includes(option.value);
|
10960
10975
|
const checkClass = hasValue ? isChecked1 ? "form-check-checked" : "form-check-unchecked" : "";
|
10961
|
-
return /* @__PURE__ */
|
10976
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
10977
|
+
className: "form-item-option",
|
10978
|
+
key: option.value
|
10979
|
+
}, /* @__PURE__ */ React28.createElement(Components2.FormOptionLabel, {
|
10962
10980
|
option,
|
10963
10981
|
name: name2
|
10964
|
-
}), /* @__PURE__ */
|
10982
|
+
}), /* @__PURE__ */ React28.createElement("input", _extends17({
|
10965
10983
|
type: "checkbox"
|
10966
|
-
}, inputProperties, {
|
10984
|
+
}, omit3(inputProperties, "value"), {
|
10967
10985
|
name: name2,
|
10968
10986
|
key: i,
|
10969
10987
|
checked: isChecked1,
|
@@ -10980,19 +10998,66 @@ var FormComponentCheckboxGroup = /* @__PURE__ */ __name((props) => {
|
|
10980
10998
|
},
|
10981
10999
|
className: checkClass
|
10982
11000
|
})));
|
10983
|
-
}), itemProperties.showOther && /* @__PURE__ */
|
11001
|
+
}), itemProperties.showOther && /* @__PURE__ */ React28.createElement(OtherComponent, {
|
10984
11002
|
value,
|
10985
11003
|
path
|
10986
11004
|
})));
|
10987
11005
|
}, "FormComponentCheckboxGroup");
|
10988
11006
|
|
11007
|
+
// components/form/inputs/SelectInputs.tsx
|
11008
|
+
init_esm_shims();
|
11009
|
+
import React29 from "react";
|
11010
|
+
function _extends18() {
|
11011
|
+
_extends18 = Object.assign || function(target) {
|
11012
|
+
for (var i = 1; i < arguments.length; i++) {
|
11013
|
+
var source = arguments[i];
|
11014
|
+
for (var key in source) {
|
11015
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
11016
|
+
target[key] = source[key];
|
11017
|
+
}
|
11018
|
+
}
|
11019
|
+
}
|
11020
|
+
return target;
|
11021
|
+
};
|
11022
|
+
return _extends18.apply(this, arguments);
|
11023
|
+
}
|
11024
|
+
__name(_extends18, "_extends");
|
11025
|
+
var HTMLSelectAdapter = /* @__PURE__ */ __name((props) => {
|
11026
|
+
const { multiple, path, inputProperties = {}, options = [], itemProperties } = props;
|
11027
|
+
const { label: label1, name: name2 } = inputProperties;
|
11028
|
+
if (!Array.isArray(options))
|
11029
|
+
throw new Error("HTMLSelectAdapater not yet supporting functional options");
|
11030
|
+
const Components2 = useVulcanComponents();
|
11031
|
+
return /* @__PURE__ */ React29.createElement(Components2.FormItem, _extends18({
|
11032
|
+
name: name2,
|
11033
|
+
label: label1,
|
11034
|
+
path,
|
11035
|
+
inputProperties
|
11036
|
+
}, itemProperties), /* @__PURE__ */ React29.createElement("select", _extends18({
|
11037
|
+
multiple
|
11038
|
+
}, inputProperties, {
|
11039
|
+
value: inputProperties.value === null ? void 0 : inputProperties.value
|
11040
|
+
}), options.map(({ label, value }) => /* @__PURE__ */ React29.createElement("option", {
|
11041
|
+
key: value,
|
11042
|
+
label,
|
11043
|
+
value
|
11044
|
+
}))));
|
11045
|
+
}, "HTMLSelectAdapter");
|
11046
|
+
var FormComponentSelect = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React29.createElement(HTMLSelectAdapter, _extends18({}, props)), "FormComponentSelect");
|
11047
|
+
var FormComponentSelectMultiple = /* @__PURE__ */ __name((props) => {
|
11048
|
+
const Components2 = useVulcanComponents();
|
11049
|
+
return /* @__PURE__ */ React29.createElement(Components2.FormComponentSelect, _extends18({
|
11050
|
+
multiple: true
|
11051
|
+
}, props));
|
11052
|
+
}, "FormComponentSelectMultiple");
|
11053
|
+
|
10989
11054
|
// components/form/inputs/AutocompleteMultiple.tsx
|
10990
11055
|
init_esm_shims();
|
10991
11056
|
import { AsyncTypeahead } from "react-bootstrap-typeahead";
|
10992
|
-
import
|
11057
|
+
import React30, { useState as useState5 } from "react";
|
10993
11058
|
import { useLazyQuery as useLazyQuery2 } from "@apollo/client";
|
10994
|
-
function
|
10995
|
-
|
11059
|
+
function _extends19() {
|
11060
|
+
_extends19 = Object.assign || function(target) {
|
10996
11061
|
for (var i = 1; i < arguments.length; i++) {
|
10997
11062
|
var source = arguments[i];
|
10998
11063
|
for (var key in source) {
|
@@ -11003,9 +11068,9 @@ function _extends17() {
|
|
11003
11068
|
}
|
11004
11069
|
return target;
|
11005
11070
|
};
|
11006
|
-
return
|
11071
|
+
return _extends19.apply(this, arguments);
|
11007
11072
|
}
|
11008
|
-
__name(
|
11073
|
+
__name(_extends19, "_extends");
|
11009
11074
|
var AutocompleteMultiple = /* @__PURE__ */ __name((props) => {
|
11010
11075
|
const {
|
11011
11076
|
queryData,
|
@@ -11034,9 +11099,9 @@ var AutocompleteMultiple = /* @__PURE__ */ __name((props) => {
|
|
11034
11099
|
const selectedItems = queryData && optionsFunction({
|
11035
11100
|
data: queryData
|
11036
11101
|
}).filter((d) => value1.includes(d.value));
|
11037
|
-
return /* @__PURE__ */
|
11102
|
+
return /* @__PURE__ */ React30.createElement(Components2.FormItem, _extends19({}, props, itemProperties, {
|
11038
11103
|
name: path
|
11039
|
-
}), /* @__PURE__ */
|
11104
|
+
}), /* @__PURE__ */ React30.createElement(AsyncTypeahead, _extends19({}, inputProperties, {
|
11040
11105
|
multiple: true,
|
11041
11106
|
onChange: (selected) => {
|
11042
11107
|
const selectedIds = selected.map(({ value }) => value);
|
@@ -11116,14 +11181,14 @@ init_esm_shims();
|
|
11116
11181
|
|
11117
11182
|
// components/Datatable/Datatable.tsx
|
11118
11183
|
init_esm_shims();
|
11119
|
-
import
|
11184
|
+
import React31, { useEffect as useEffect6, useState as useState6 } from "react";
|
11120
11185
|
import _isEmpty from "lodash/isEmpty.js";
|
11121
11186
|
import { useMulti } from "@vulcanjs/react-hooks";
|
11122
11187
|
import { isAdmin as isAdmin2 } from "@vulcanjs/permissions";
|
11123
11188
|
import { useIntlContext as useIntlContext5 } from "@vulcanjs/react-i18n";
|
11124
11189
|
import { permissionCheck } from "@vulcanjs/permissions";
|
11125
|
-
function
|
11126
|
-
|
11190
|
+
function _extends20() {
|
11191
|
+
_extends20 = Object.assign || function(target) {
|
11127
11192
|
for (var i = 1; i < arguments.length; i++) {
|
11128
11193
|
var source = arguments[i];
|
11129
11194
|
for (var key in source) {
|
@@ -11134,9 +11199,9 @@ function _extends18() {
|
|
11134
11199
|
}
|
11135
11200
|
return target;
|
11136
11201
|
};
|
11137
|
-
return
|
11202
|
+
return _extends20.apply(this, arguments);
|
11138
11203
|
}
|
11139
|
-
__name(
|
11204
|
+
__name(_extends20, "_extends");
|
11140
11205
|
var ascSortOperator = "asc";
|
11141
11206
|
var descSortOperator = "desc";
|
11142
11207
|
var delay = function() {
|
@@ -11237,7 +11302,7 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11237
11302
|
}
|
11238
11303
|
}));
|
11239
11304
|
if (data) {
|
11240
|
-
return /* @__PURE__ */
|
11305
|
+
return /* @__PURE__ */ React31.createElement(Components2.DatatableContents, _extends20({}, props, {
|
11241
11306
|
datatableData: data,
|
11242
11307
|
totalCount: data.length,
|
11243
11308
|
results: data,
|
@@ -11268,9 +11333,9 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11268
11333
|
if (!_isEmpty(state.currentFilters)) {
|
11269
11334
|
input.filter = state.currentFilters;
|
11270
11335
|
}
|
11271
|
-
return /* @__PURE__ */
|
11336
|
+
return /* @__PURE__ */ React31.createElement(Components2.DatatableLayout, {
|
11272
11337
|
model
|
11273
|
-
}, /* @__PURE__ */
|
11338
|
+
}, /* @__PURE__ */ React31.createElement(Components2.DatatableAbove, _extends20({}, props, {
|
11274
11339
|
model,
|
11275
11340
|
canInsert: canCreate,
|
11276
11341
|
canCreate,
|
@@ -11278,7 +11343,7 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11278
11343
|
updateSearch,
|
11279
11344
|
selectedItems: state.selectedItems,
|
11280
11345
|
onSubmitSelected
|
11281
|
-
})), /* @__PURE__ */
|
11346
|
+
})), /* @__PURE__ */ React31.createElement(Components2.DatatableContents, _extends20({}, props, {
|
11282
11347
|
results: multiRes.documents,
|
11283
11348
|
totalCount: multiRes.totalCount,
|
11284
11349
|
count: multiRes.count,
|
@@ -11292,20 +11357,20 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11292
11357
|
toggleItem
|
11293
11358
|
})));
|
11294
11359
|
}, "Datatable");
|
11295
|
-
var DatatableLayout = /* @__PURE__ */ __name(({ model, children }) => /* @__PURE__ */
|
11360
|
+
var DatatableLayout = /* @__PURE__ */ __name(({ model, children }) => /* @__PURE__ */ React31.createElement("div", {
|
11296
11361
|
className: `datatable datatable-${model.name.toLowerCase()}`
|
11297
11362
|
}, children), "DatatableLayout");
|
11298
11363
|
var DatatableAbove = /* @__PURE__ */ __name((props) => {
|
11299
11364
|
const Components2 = useVulcanComponents();
|
11300
|
-
return /* @__PURE__ */
|
11365
|
+
return /* @__PURE__ */ React31.createElement(Components2.DatatableAboveLayout, null, /* @__PURE__ */ React31.createElement(Components2.DatatableAboveLeft, _extends20({}, props)), /* @__PURE__ */ React31.createElement(Components2.DatatableAboveRight, _extends20({}, props)));
|
11301
11366
|
}, "DatatableAbove");
|
11302
11367
|
var DatatableAboveLeft = /* @__PURE__ */ __name((props) => {
|
11303
11368
|
const { showSearch, searchValue, updateSearch } = props;
|
11304
11369
|
const Components2 = useVulcanComponents();
|
11305
11370
|
const intl = useIntlContext5();
|
11306
|
-
return /* @__PURE__ */
|
11371
|
+
return /* @__PURE__ */ React31.createElement("div", {
|
11307
11372
|
className: "datatable-above-left"
|
11308
|
-
}, showSearch && /* @__PURE__ */
|
11373
|
+
}, showSearch && /* @__PURE__ */ React31.createElement(Components2.DatatableAboveSearchInput, {
|
11309
11374
|
className: "datatable-search form-control",
|
11310
11375
|
inputProperties: {
|
11311
11376
|
path: "datatableSearchQuery",
|
@@ -11321,16 +11386,16 @@ var DatatableAboveLeft = /* @__PURE__ */ __name((props) => {
|
|
11321
11386
|
var DatatableAboveRight = /* @__PURE__ */ __name((props) => {
|
11322
11387
|
const { currentUser, showNew, canInsert, options, newFormOptions, newFormProps, showSelect, selectedItems, onSubmitSelected, model } = props;
|
11323
11388
|
const Components2 = useVulcanComponents();
|
11324
|
-
return /* @__PURE__ */
|
11389
|
+
return /* @__PURE__ */ React31.createElement("div", {
|
11325
11390
|
className: "datatable-above-right"
|
11326
|
-
}, showSelect && selectedItems.length > 0 && /* @__PURE__ */
|
11391
|
+
}, showSelect && selectedItems.length > 0 && /* @__PURE__ */ React31.createElement("div", {
|
11327
11392
|
className: "datatable-above-item"
|
11328
|
-
}, /* @__PURE__ */
|
11393
|
+
}, /* @__PURE__ */ React31.createElement(Components2.DatatableSubmitSelected, {
|
11329
11394
|
selectedItems,
|
11330
11395
|
onSubmitSelected
|
11331
|
-
})), showNew && canInsert && /* @__PURE__ */
|
11396
|
+
})), showNew && canInsert && /* @__PURE__ */ React31.createElement("div", {
|
11332
11397
|
className: "datatable-above-item"
|
11333
|
-
}, /* @__PURE__ */
|
11398
|
+
}, /* @__PURE__ */ React31.createElement(Components2.NewButton, _extends20({
|
11334
11399
|
model,
|
11335
11400
|
currentUser,
|
11336
11401
|
mutationFragmentName: options && options.fragmentName
|
@@ -11338,20 +11403,20 @@ var DatatableAboveRight = /* @__PURE__ */ __name((props) => {
|
|
11338
11403
|
}, "DatatableAboveRight");
|
11339
11404
|
var DatatableAboveSearchInput = /* @__PURE__ */ __name((props) => {
|
11340
11405
|
const Components2 = useVulcanComponents();
|
11341
|
-
return /* @__PURE__ */
|
11406
|
+
return /* @__PURE__ */ React31.createElement("div", {
|
11342
11407
|
className: "datatable-above-search-input"
|
11343
|
-
}, /* @__PURE__ */
|
11408
|
+
}, /* @__PURE__ */ React31.createElement(Components2.FormComponentText, _extends20({}, props)));
|
11344
11409
|
}, "DatatableAboveSearchInput");
|
11345
|
-
var DatatableAboveLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11410
|
+
var DatatableAboveLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React31.createElement("div", {
|
11346
11411
|
className: "datatable-above"
|
11347
11412
|
}, children), "DatatableAboveLayout");
|
11348
11413
|
|
11349
11414
|
// components/Datatable/DatatableContents.tsx
|
11350
11415
|
init_esm_shims();
|
11351
|
-
import
|
11416
|
+
import React32 from "react";
|
11352
11417
|
import _sortBy from "lodash/sortBy.js";
|
11353
|
-
function
|
11354
|
-
|
11418
|
+
function _extends21() {
|
11419
|
+
_extends21 = Object.assign || function(target) {
|
11355
11420
|
for (var i = 1; i < arguments.length; i++) {
|
11356
11421
|
var source = arguments[i];
|
11357
11422
|
for (var key in source) {
|
@@ -11362,9 +11427,9 @@ function _extends19() {
|
|
11362
11427
|
}
|
11363
11428
|
return target;
|
11364
11429
|
};
|
11365
|
-
return
|
11430
|
+
return _extends21.apply(this, arguments);
|
11366
11431
|
}
|
11367
|
-
__name(
|
11432
|
+
__name(_extends21, "_extends");
|
11368
11433
|
var wrapColumns = /* @__PURE__ */ __name((c) => ({
|
11369
11434
|
name: c
|
11370
11435
|
}), "wrapColumns");
|
@@ -11386,18 +11451,18 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11386
11451
|
let { title = "", datatableData, results = [], columns, loading, loadMore, count = 0, totalCount = 0, networkStatus, showEdit, showDelete, currentUser, toggleSort, currentSort, submitFilters, currentFilters, modalProps, error, showSelect, model } = props;
|
11387
11452
|
const Components2 = useVulcanComponents();
|
11388
11453
|
if (loading) {
|
11389
|
-
return /* @__PURE__ */
|
11454
|
+
return /* @__PURE__ */ React32.createElement("div", {
|
11390
11455
|
className: "datatable-list datatable-list-loading"
|
11391
|
-
}, /* @__PURE__ */
|
11456
|
+
}, /* @__PURE__ */ React32.createElement(Components2.Loading, null));
|
11392
11457
|
}
|
11393
11458
|
const isLoadingMore = networkStatus === 2;
|
11394
11459
|
const hasMore = results && totalCount > results.length;
|
11395
11460
|
const sortedColumns = getColumns(columns, results, datatableData);
|
11396
|
-
return /* @__PURE__ */
|
11461
|
+
return /* @__PURE__ */ React32.createElement(Components2.DatatableContentsLayout, null, error && /* @__PURE__ */ React32.createElement(Components2.Alert, {
|
11397
11462
|
variant: "danger"
|
11398
|
-
}, error.message), title && /* @__PURE__ */
|
11463
|
+
}, error.message), title && /* @__PURE__ */ React32.createElement(Components2.DatatableTitle, {
|
11399
11464
|
title
|
11400
|
-
}), /* @__PURE__ */
|
11465
|
+
}), /* @__PURE__ */ React32.createElement(Components2.DatatableContentsInnerLayout, null, /* @__PURE__ */ React32.createElement(Components2.DatatableContentsHeadLayout, null, showSelect && /* @__PURE__ */ React32.createElement("th", null), sortedColumns.map((column, index) => /* @__PURE__ */ React32.createElement(Components2.DatatableHeader, {
|
11401
11466
|
key: index,
|
11402
11467
|
model,
|
11403
11468
|
column,
|
@@ -11405,13 +11470,13 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11405
11470
|
currentSort,
|
11406
11471
|
submitFilters,
|
11407
11472
|
currentFilters
|
11408
|
-
})), showEdit ? /* @__PURE__ */
|
11473
|
+
})), showEdit ? /* @__PURE__ */ React32.createElement("th", null, /* @__PURE__ */ React32.createElement(Components2.FormattedMessage, {
|
11409
11474
|
id: "datatable.edit",
|
11410
11475
|
defaultMessage: "Edit"
|
11411
|
-
})) : null, showDelete ? /* @__PURE__ */
|
11476
|
+
})) : null, showDelete ? /* @__PURE__ */ React32.createElement("th", null, /* @__PURE__ */ React32.createElement(Components2.FormattedMessage, {
|
11412
11477
|
id: "datatable.delete",
|
11413
11478
|
defaultMessage: "Delete"
|
11414
|
-
})) : null), /* @__PURE__ */
|
11479
|
+
})) : null), /* @__PURE__ */ React32.createElement(Components2.DatatableContentsBodyLayout, null, results && results.length ? results.map((document, index) => /* @__PURE__ */ React32.createElement(Components2.DatatableRow, _extends21({}, props, {
|
11415
11480
|
model,
|
11416
11481
|
columns: sortedColumns,
|
11417
11482
|
document,
|
@@ -11420,7 +11485,7 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11420
11485
|
showDelete,
|
11421
11486
|
currentUser,
|
11422
11487
|
modalProps
|
11423
|
-
}))) : /* @__PURE__ */
|
11488
|
+
}))) : /* @__PURE__ */ React32.createElement(Components2.DatatableEmpty, null))), hasMore && /* @__PURE__ */ React32.createElement(Components2.DatatableContentsMoreLayout, null, isLoadingMore ? /* @__PURE__ */ React32.createElement(Components2.Loading, null) : /* @__PURE__ */ React32.createElement(Components2.DatatableLoadMoreButton, {
|
11424
11489
|
count,
|
11425
11490
|
totalCount,
|
11426
11491
|
onClick: (e) => {
|
@@ -11429,37 +11494,37 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11429
11494
|
}
|
11430
11495
|
}, "Load More (", count, "/", totalCount, ")")));
|
11431
11496
|
}, "DatatableContents");
|
11432
|
-
var DatatableContentsLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11497
|
+
var DatatableContentsLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React32.createElement("div", {
|
11433
11498
|
className: "datatable-list"
|
11434
11499
|
}, children), "DatatableContentsLayout");
|
11435
|
-
var DatatableContentsInnerLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11500
|
+
var DatatableContentsInnerLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React32.createElement("table", {
|
11436
11501
|
className: "table"
|
11437
11502
|
}, children), "DatatableContentsInnerLayout");
|
11438
|
-
var DatatableContentsHeadLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11439
|
-
var DatatableContentsBodyLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11440
|
-
var DatatableContentsMoreLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11503
|
+
var DatatableContentsHeadLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React32.createElement("thead", null, /* @__PURE__ */ React32.createElement("tr", null, children)), "DatatableContentsHeadLayout");
|
11504
|
+
var DatatableContentsBodyLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React32.createElement("tbody", null, children), "DatatableContentsBodyLayout");
|
11505
|
+
var DatatableContentsMoreLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React32.createElement("div", {
|
11441
11506
|
className: "datatable-list-load-more"
|
11442
11507
|
}, children), "DatatableContentsMoreLayout");
|
11443
11508
|
var DatatableLoadMoreButton = /* @__PURE__ */ __name((_a) => {
|
11444
11509
|
var _b = _a, { count, totalCount, children } = _b, otherProps = __objRest(_b, ["count", "totalCount", "children"]);
|
11445
11510
|
const Components2 = useVulcanComponents();
|
11446
|
-
return /* @__PURE__ */
|
11511
|
+
return /* @__PURE__ */ React32.createElement(Components2.Button, _extends21({
|
11447
11512
|
variant: "primary"
|
11448
11513
|
}, otherProps), children);
|
11449
11514
|
}, "DatatableLoadMoreButton");
|
11450
|
-
var DatatableTitle = /* @__PURE__ */ __name(({ title }) => /* @__PURE__ */
|
11515
|
+
var DatatableTitle = /* @__PURE__ */ __name(({ title }) => /* @__PURE__ */ React32.createElement("div", {
|
11451
11516
|
className: "datatable-title"
|
11452
11517
|
}, title), "DatatableTitle");
|
11453
11518
|
var DatatableEmpty = /* @__PURE__ */ __name(() => {
|
11454
11519
|
const Components2 = useVulcanComponents();
|
11455
|
-
return /* @__PURE__ */
|
11520
|
+
return /* @__PURE__ */ React32.createElement("tr", null, /* @__PURE__ */ React32.createElement("td", {
|
11456
11521
|
colSpan: 99
|
11457
|
-
}, /* @__PURE__ */
|
11522
|
+
}, /* @__PURE__ */ React32.createElement("div", {
|
11458
11523
|
style: {
|
11459
11524
|
textAlign: "center",
|
11460
11525
|
padding: 10
|
11461
11526
|
}
|
11462
|
-
}, /* @__PURE__ */
|
11527
|
+
}, /* @__PURE__ */ React32.createElement(Components2.FormattedMessage, {
|
11463
11528
|
id: "datatable.empty",
|
11464
11529
|
defaultMessage: "No items to display."
|
11465
11530
|
}))));
|
@@ -11467,11 +11532,11 @@ var DatatableEmpty = /* @__PURE__ */ __name(() => {
|
|
11467
11532
|
|
11468
11533
|
// components/Datatable/DatatableHeader.tsx
|
11469
11534
|
init_esm_shims();
|
11470
|
-
import
|
11535
|
+
import React33 from "react";
|
11471
11536
|
import { useIntlContext as useIntlContext6 } from "@vulcanjs/react-i18n";
|
11472
11537
|
import { formatLabel as formatLabel2 } from "@vulcanjs/i18n";
|
11473
|
-
function
|
11474
|
-
|
11538
|
+
function _extends22() {
|
11539
|
+
_extends22 = Object.assign || function(target) {
|
11475
11540
|
for (var i = 1; i < arguments.length; i++) {
|
11476
11541
|
var source = arguments[i];
|
11477
11542
|
for (var key in source) {
|
@@ -11482,9 +11547,9 @@ function _extends20() {
|
|
11482
11547
|
}
|
11483
11548
|
return target;
|
11484
11549
|
};
|
11485
|
-
return
|
11550
|
+
return _extends22.apply(this, arguments);
|
11486
11551
|
}
|
11487
|
-
__name(
|
11552
|
+
__name(_extends22, "_extends");
|
11488
11553
|
var DatatableHeader = /* @__PURE__ */ __name(({ model, column, toggleSort, currentSort, submitFilters, currentFilters }) => {
|
11489
11554
|
const Components2 = useVulcanComponents();
|
11490
11555
|
const intl = useIntlContext6();
|
@@ -11505,16 +11570,16 @@ var DatatableHeader = /* @__PURE__ */ __name(({ model, column, toggleSort, curre
|
|
11505
11570
|
const fieldOptions = field && field.options;
|
11506
11571
|
const filterOptions = column.options ? column.options : fieldOptions;
|
11507
11572
|
const filterQuery = field && field.staticQuery;
|
11508
|
-
return /* @__PURE__ */
|
11573
|
+
return /* @__PURE__ */ React33.createElement(Components2.DatatableHeaderCellLayout, {
|
11509
11574
|
className: `datatable-header-${column.name}`
|
11510
|
-
}, /* @__PURE__ */
|
11575
|
+
}, /* @__PURE__ */ React33.createElement("span", {
|
11511
11576
|
className: "datatable-header-cell-label"
|
11512
|
-
}, formattedLabel), column.sortable && /* @__PURE__ */
|
11577
|
+
}, formattedLabel), column.sortable && /* @__PURE__ */ React33.createElement(Components2.DatatableSorter, {
|
11513
11578
|
name: column.name,
|
11514
11579
|
label: formattedLabel,
|
11515
11580
|
toggleSort,
|
11516
11581
|
currentSort
|
11517
|
-
}), column.filterable && /* @__PURE__ */
|
11582
|
+
}), column.filterable && /* @__PURE__ */ React33.createElement(Components2.DatatableFilter, {
|
11518
11583
|
model,
|
11519
11584
|
field,
|
11520
11585
|
name: column.name,
|
@@ -11530,25 +11595,25 @@ var DatatableHeader = /* @__PURE__ */ __name(({ model, column, toggleSort, curre
|
|
11530
11595
|
id: column.name,
|
11531
11596
|
defaultMessage: column.name
|
11532
11597
|
});
|
11533
|
-
return /* @__PURE__ */
|
11598
|
+
return /* @__PURE__ */ React33.createElement(Components2.DatatableHeaderCellLayout, {
|
11534
11599
|
className: `datatable-th-${formattedLabel2.toLowerCase().replace(/\s/g, "-")}`
|
11535
11600
|
}, formattedLabel2);
|
11536
11601
|
}
|
11537
11602
|
}, "DatatableHeader");
|
11538
11603
|
var DatatableHeaderCellLayout = /* @__PURE__ */ __name((_a) => {
|
11539
11604
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
11540
|
-
return /* @__PURE__ */
|
11605
|
+
return /* @__PURE__ */ React33.createElement("th", _extends22({}, otherProps), /* @__PURE__ */ React33.createElement("div", {
|
11541
11606
|
className: "datatable-header-cell-inner"
|
11542
11607
|
}, children));
|
11543
11608
|
}, "DatatableHeaderCellLayout");
|
11544
11609
|
|
11545
11610
|
// components/Datatable/DatatableRow.tsx
|
11546
11611
|
init_esm_shims();
|
11547
|
-
import
|
11612
|
+
import React34 from "react";
|
11548
11613
|
import _isFunction from "lodash/isFunction.js";
|
11549
11614
|
import { isAdmin as isAdmin3, permissionCheck as permissionCheck2 } from "@vulcanjs/permissions";
|
11550
|
-
function
|
11551
|
-
|
11615
|
+
function _extends23() {
|
11616
|
+
_extends23 = Object.assign || function(target) {
|
11552
11617
|
for (var i = 1; i < arguments.length; i++) {
|
11553
11618
|
var source = arguments[i];
|
11554
11619
|
for (var key in source) {
|
@@ -11559,9 +11624,9 @@ function _extends21() {
|
|
11559
11624
|
}
|
11560
11625
|
return target;
|
11561
11626
|
};
|
11562
|
-
return
|
11627
|
+
return _extends23.apply(this, arguments);
|
11563
11628
|
}
|
11564
|
-
__name(
|
11629
|
+
__name(_extends23, "_extends");
|
11565
11630
|
var DatatableRow = /* @__PURE__ */ __name((props) => {
|
11566
11631
|
const { model, columns, document, showEdit, showDelete, currentUser, options, editFormOptions, editFormProps, rowClass, showSelect, toggleItem, selectedItems } = props;
|
11567
11632
|
const Components2 = useVulcanComponents();
|
@@ -11580,33 +11645,33 @@ var DatatableRow = /* @__PURE__ */ __name((props) => {
|
|
11580
11645
|
const row = typeof rowClass === "function" ? rowClass(document) : rowClass || "";
|
11581
11646
|
const { modalProps = {} } = props;
|
11582
11647
|
const defaultModalProps = {
|
11583
|
-
title: /* @__PURE__ */
|
11648
|
+
title: /* @__PURE__ */ React34.createElement("code", null, document._id)
|
11584
11649
|
};
|
11585
11650
|
const customModalProps = __spreadValues(__spreadValues({}, defaultModalProps), _isFunction(modalProps) ? modalProps(document) : modalProps);
|
11586
11651
|
const isSelected = selectedItems && selectedItems.includes(document._id);
|
11587
|
-
return /* @__PURE__ */
|
11652
|
+
return /* @__PURE__ */ React34.createElement(Components2.DatatableRowLayout, {
|
11588
11653
|
className: `datatable-item ${row} ${isSelected ? "datatable-item-selected" : ""}`
|
11589
|
-
}, showSelect && /* @__PURE__ */
|
11654
|
+
}, showSelect && /* @__PURE__ */ React34.createElement(Components2.DatatableSelect, {
|
11590
11655
|
document,
|
11591
11656
|
toggleItem,
|
11592
11657
|
selectedItems
|
11593
|
-
}), columns.map((column, index) => /* @__PURE__ */
|
11658
|
+
}), columns.map((column, index) => /* @__PURE__ */ React34.createElement(Components2.DatatableCell, {
|
11594
11659
|
key: index,
|
11595
11660
|
column,
|
11596
11661
|
document,
|
11597
11662
|
currentUser,
|
11598
11663
|
model
|
11599
|
-
})), showEdit && canUpdate ? /* @__PURE__ */
|
11664
|
+
})), showEdit && canUpdate ? /* @__PURE__ */ React34.createElement(Components2.DatatableCellLayout, {
|
11600
11665
|
className: "datatable-edit"
|
11601
|
-
}, /* @__PURE__ */
|
11666
|
+
}, /* @__PURE__ */ React34.createElement(Components2.EditButton, _extends23({
|
11602
11667
|
model,
|
11603
11668
|
documentId: document._id,
|
11604
11669
|
currentUser,
|
11605
11670
|
mutationFragmentName: options && options.fragmentName,
|
11606
11671
|
modalProps: customModalProps
|
11607
|
-
}, editFormOptions, editFormProps))) : null, showDelete && canUpdate ? /* @__PURE__ */
|
11672
|
+
}, editFormOptions, editFormProps))) : null, showDelete && canUpdate ? /* @__PURE__ */ React34.createElement(Components2.DatatableCellLayout, {
|
11608
11673
|
className: "datatable-delete"
|
11609
|
-
}, /* @__PURE__ */
|
11674
|
+
}, /* @__PURE__ */ React34.createElement(Components2.DeleteButton, {
|
11610
11675
|
model,
|
11611
11676
|
documentId: document._id,
|
11612
11677
|
currentUser
|
@@ -11614,14 +11679,14 @@ var DatatableRow = /* @__PURE__ */ __name((props) => {
|
|
11614
11679
|
}, "DatatableRow");
|
11615
11680
|
var DatatableRowLayout = /* @__PURE__ */ __name((_a) => {
|
11616
11681
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
11617
|
-
return /* @__PURE__ */
|
11682
|
+
return /* @__PURE__ */ React34.createElement("tr", _extends23({}, otherProps), children);
|
11618
11683
|
}, "DatatableRowLayout");
|
11619
11684
|
|
11620
11685
|
// components/Datatable/DatatableCell.tsx
|
11621
11686
|
init_esm_shims();
|
11622
|
-
import
|
11623
|
-
function
|
11624
|
-
|
11687
|
+
import React35 from "react";
|
11688
|
+
function _extends24() {
|
11689
|
+
_extends24 = Object.assign || function(target) {
|
11625
11690
|
for (var i = 1; i < arguments.length; i++) {
|
11626
11691
|
var source = arguments[i];
|
11627
11692
|
for (var key in source) {
|
@@ -11632,18 +11697,18 @@ function _extends22() {
|
|
11632
11697
|
}
|
11633
11698
|
return target;
|
11634
11699
|
};
|
11635
|
-
return
|
11700
|
+
return _extends24.apply(this, arguments);
|
11636
11701
|
}
|
11637
|
-
__name(
|
11702
|
+
__name(_extends24, "_extends");
|
11638
11703
|
var DatatableCell = /* @__PURE__ */ __name(({ column, document, currentUser, model }) => {
|
11639
11704
|
const Components2 = useVulcanComponents();
|
11640
11705
|
const Component = column.component || column.componentName && Components2[column.componentName] || Components2.DatatableDefaultCell;
|
11641
11706
|
const columnName = column.label || column.name;
|
11642
11707
|
if (!columnName)
|
11643
11708
|
throw new Error("Column should have name or label");
|
11644
|
-
return /* @__PURE__ */
|
11709
|
+
return /* @__PURE__ */ React35.createElement(Components2.DatatableCellLayout, {
|
11645
11710
|
className: `datatable-item-${columnName.toLowerCase().replace(/\s/g, "-")}`
|
11646
|
-
}, /* @__PURE__ */
|
11711
|
+
}, /* @__PURE__ */ React35.createElement(Component, {
|
11647
11712
|
column,
|
11648
11713
|
document,
|
11649
11714
|
currentUser,
|
@@ -11652,14 +11717,14 @@ var DatatableCell = /* @__PURE__ */ __name(({ column, document, currentUser, mod
|
|
11652
11717
|
}, "DatatableCell");
|
11653
11718
|
var DatatableCellLayout = /* @__PURE__ */ __name((_a) => {
|
11654
11719
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
11655
|
-
return /* @__PURE__ */
|
11720
|
+
return /* @__PURE__ */ React35.createElement("td", _extends24({}, otherProps), /* @__PURE__ */ React35.createElement("div", {
|
11656
11721
|
className: "cell-contents"
|
11657
11722
|
}, children));
|
11658
11723
|
}, "DatatableCellLayout");
|
11659
11724
|
var DatatableDefaultCell = /* @__PURE__ */ __name((_a) => {
|
11660
11725
|
var _b = _a, { column, document } = _b, rest = __objRest(_b, ["column", "document"]);
|
11661
11726
|
const Components2 = useVulcanComponents();
|
11662
|
-
return /* @__PURE__ */
|
11727
|
+
return /* @__PURE__ */ React35.createElement(Components2.CardItemSwitcher, _extends24({
|
11663
11728
|
value: document[column.name],
|
11664
11729
|
document,
|
11665
11730
|
fieldName: column.name
|
@@ -11669,11 +11734,11 @@ var DatatableDefaultCell = /* @__PURE__ */ __name((_a) => {
|
|
11669
11734
|
// components/Datatable/DatatableFilter.tsx
|
11670
11735
|
init_esm_shims();
|
11671
11736
|
var import_moment = __toESM(require_moment(), 1);
|
11672
|
-
import
|
11737
|
+
import React36, { useState as useState7 } from "react";
|
11673
11738
|
import { useQuery } from "@apollo/client";
|
11674
11739
|
import isEmpty4 from "lodash/isEmpty.js";
|
11675
|
-
function
|
11676
|
-
|
11740
|
+
function _extends25() {
|
11741
|
+
_extends25 = Object.assign || function(target) {
|
11677
11742
|
for (var i = 1; i < arguments.length; i++) {
|
11678
11743
|
var source = arguments[i];
|
11679
11744
|
for (var key in source) {
|
@@ -11684,9 +11749,9 @@ function _extends23() {
|
|
11684
11749
|
}
|
11685
11750
|
return target;
|
11686
11751
|
};
|
11687
|
-
return
|
11752
|
+
return _extends25.apply(this, arguments);
|
11688
11753
|
}
|
11689
|
-
__name(
|
11754
|
+
__name(_extends25, "_extends");
|
11690
11755
|
var getCount = /* @__PURE__ */ __name((columnFilters) => {
|
11691
11756
|
if (!columnFilters) {
|
11692
11757
|
return 0;
|
@@ -11701,16 +11766,16 @@ var getCount = /* @__PURE__ */ __name((columnFilters) => {
|
|
11701
11766
|
}
|
11702
11767
|
return 0;
|
11703
11768
|
}, "getCount");
|
11704
|
-
var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */
|
11769
|
+
var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */ React36.createElement("svg", {
|
11705
11770
|
width: "16",
|
11706
11771
|
height: "16",
|
11707
11772
|
xmlns: "http://www.w3.org/2000/svg",
|
11708
11773
|
viewBox: "0 0 448 512"
|
11709
|
-
}, /* @__PURE__ */
|
11774
|
+
}, /* @__PURE__ */ React36.createElement("path", {
|
11710
11775
|
fill: "#000",
|
11711
11776
|
d: "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z",
|
11712
11777
|
fillOpacity: count ? 0.8 : 0.3
|
11713
|
-
}), count ? /* @__PURE__ */
|
11778
|
+
}), count ? /* @__PURE__ */ React36.createElement("text", {
|
11714
11779
|
x: "50%",
|
11715
11780
|
y: "55%",
|
11716
11781
|
fill: "#000",
|
@@ -11718,7 +11783,7 @@ var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */ React33.creat
|
|
11718
11783
|
textAnchor: "middle",
|
11719
11784
|
alignmentBaseline: "middle",
|
11720
11785
|
fillOpacity: 0.8
|
11721
|
-
}, count) : /* @__PURE__ */
|
11786
|
+
}, count) : /* @__PURE__ */ React36.createElement("path", {
|
11722
11787
|
fill: "#000",
|
11723
11788
|
d: "M224 200v-16c0-13.3-10.7-24-24-24h-24v-20c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v20h-24c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h24v148c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V224h24c13.3 0 24-10.7 24-24zM352 328v-16c0-13.3-10.7-24-24-24h-24V140c0-6.6-5.4-12-12-12h-8c-6.6 0-12 5.4-12 12v148h-24c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h24v20c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12v-20h24c13.3 0 24-10.7 24-24z",
|
11724
11789
|
fillOpacity: 0.3
|
@@ -11726,10 +11791,10 @@ var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */ React33.creat
|
|
11726
11791
|
var DatatableFilter = /* @__PURE__ */ __name((props) => {
|
11727
11792
|
const Components2 = useVulcanComponents();
|
11728
11793
|
const { columnFilters, label, query } = props;
|
11729
|
-
return /* @__PURE__ */
|
11794
|
+
return /* @__PURE__ */ React36.createElement("span", {
|
11730
11795
|
className: "datatable-filter"
|
11731
|
-
}, /* @__PURE__ */
|
11732
|
-
title: /* @__PURE__ */
|
11796
|
+
}, /* @__PURE__ */ React36.createElement(Components2.ModalTrigger, {
|
11797
|
+
title: /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11733
11798
|
id: "datatable.filter_column",
|
11734
11799
|
values: {
|
11735
11800
|
label
|
@@ -11737,10 +11802,10 @@ var DatatableFilter = /* @__PURE__ */ __name((props) => {
|
|
11737
11802
|
defaultMessage: `Filter \u201C${label}\u201D`
|
11738
11803
|
}),
|
11739
11804
|
size: "small",
|
11740
|
-
trigger: /* @__PURE__ */
|
11805
|
+
trigger: /* @__PURE__ */ React36.createElement(Filter, {
|
11741
11806
|
count: getCount(columnFilters)
|
11742
11807
|
})
|
11743
|
-
}, query ? /* @__PURE__ */
|
11808
|
+
}, query ? /* @__PURE__ */ React36.createElement(Components2.DatatableFilterContentsWithData, _extends25({}, props)) : /* @__PURE__ */ React36.createElement(Components2.DatatableFilterContents, _extends25({}, props))));
|
11744
11809
|
}, "DatatableFilter");
|
11745
11810
|
var DatatableFilterContentsWithData = /* @__PURE__ */ __name((props) => {
|
11746
11811
|
const Components2 = useVulcanComponents();
|
@@ -11751,14 +11816,14 @@ var DatatableFilterContentsWithData = /* @__PURE__ */ __name((props) => {
|
|
11751
11816
|
const filterQuery = queryGql;
|
11752
11817
|
const { loading, error, data } = useQuery(filterQuery);
|
11753
11818
|
if (loading) {
|
11754
|
-
return /* @__PURE__ */
|
11819
|
+
return /* @__PURE__ */ React36.createElement(Components2.Loading, null);
|
11755
11820
|
} else if (error) {
|
11756
|
-
return /* @__PURE__ */
|
11821
|
+
return /* @__PURE__ */ React36.createElement("p", null, "error");
|
11757
11822
|
} else {
|
11758
11823
|
const queryOptions = options({
|
11759
11824
|
data
|
11760
11825
|
});
|
11761
|
-
return /* @__PURE__ */
|
11826
|
+
return /* @__PURE__ */ React36.createElement(Components2.DatatableFilterContents, _extends25({}, props, {
|
11762
11827
|
options: queryOptions
|
11763
11828
|
}));
|
11764
11829
|
}
|
@@ -11775,28 +11840,28 @@ var DatatableFilterContents = /* @__PURE__ */ __name((props) => {
|
|
11775
11840
|
let contents;
|
11776
11841
|
if (filterComponent) {
|
11777
11842
|
const CustomFilter = filterComponent;
|
11778
|
-
contents = /* @__PURE__ */
|
11843
|
+
contents = /* @__PURE__ */ React36.createElement(CustomFilter, _extends25({}, filterProps));
|
11779
11844
|
} else if (options) {
|
11780
|
-
contents = /* @__PURE__ */
|
11845
|
+
contents = /* @__PURE__ */ React36.createElement(Components2.DatatableFilterCheckboxes, _extends25({}, filterProps));
|
11781
11846
|
} else {
|
11782
11847
|
switch (fieldType) {
|
11783
11848
|
case Date:
|
11784
|
-
contents = /* @__PURE__ */
|
11849
|
+
contents = /* @__PURE__ */ React36.createElement(Components2.DatatableFilterDates, _extends25({}, filterProps));
|
11785
11850
|
break;
|
11786
11851
|
case Number:
|
11787
|
-
contents = /* @__PURE__ */
|
11852
|
+
contents = /* @__PURE__ */ React36.createElement(Components2.DatatableFilterNumbers, _extends25({}, filterProps));
|
11788
11853
|
break;
|
11789
11854
|
case Boolean:
|
11790
|
-
contents = /* @__PURE__ */
|
11855
|
+
contents = /* @__PURE__ */ React36.createElement(Components2.DatatableFilterBooleans, _extends25({}, filterProps));
|
11791
11856
|
break;
|
11792
11857
|
default:
|
11793
|
-
contents = /* @__PURE__ */
|
11858
|
+
contents = /* @__PURE__ */ React36.createElement("p", null, /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11794
11859
|
id: "datatable.specify_option",
|
11795
11860
|
defaultMessage: "Please specify an options property on your schema field."
|
11796
11861
|
}));
|
11797
11862
|
}
|
11798
11863
|
}
|
11799
|
-
return /* @__PURE__ */
|
11864
|
+
return /* @__PURE__ */ React36.createElement("form", null, contents, /* @__PURE__ */ React36.createElement(Components2.Button, {
|
11800
11865
|
variant: "link",
|
11801
11866
|
style: {
|
11802
11867
|
display: "inline-block",
|
@@ -11806,10 +11871,10 @@ var DatatableFilterContents = /* @__PURE__ */ __name((props) => {
|
|
11806
11871
|
onClick: () => {
|
11807
11872
|
setFilters(void 0);
|
11808
11873
|
}
|
11809
|
-
}, /* @__PURE__ */
|
11874
|
+
}, /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11810
11875
|
id: "datatable.clear_all",
|
11811
11876
|
defaultMessage: "Clear All"
|
11812
|
-
})), /* @__PURE__ */
|
11877
|
+
})), /* @__PURE__ */ React36.createElement(Components2.Button, {
|
11813
11878
|
type: "submit",
|
11814
11879
|
className: "datatable_filter_submit",
|
11815
11880
|
onClick: () => {
|
@@ -11818,7 +11883,7 @@ var DatatableFilterContents = /* @__PURE__ */ __name((props) => {
|
|
11818
11883
|
filters
|
11819
11884
|
});
|
11820
11885
|
}
|
11821
|
-
}, /* @__PURE__ */
|
11886
|
+
}, /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11822
11887
|
id: "datatable.submit",
|
11823
11888
|
defaultMessage: "Submit"
|
11824
11889
|
})));
|
@@ -11828,7 +11893,7 @@ var DatatableFilterCheckboxes = /* @__PURE__ */ __name(({ options, filters = {
|
|
11828
11893
|
_in: []
|
11829
11894
|
}, setFilters }) => {
|
11830
11895
|
const Components2 = useVulcanComponents();
|
11831
|
-
return /* @__PURE__ */
|
11896
|
+
return /* @__PURE__ */ React36.createElement(Components2.FormComponentCheckboxGroup, {
|
11832
11897
|
path: "filter",
|
11833
11898
|
itemProperties: {
|
11834
11899
|
layout: "inputOnly"
|
@@ -11862,7 +11927,7 @@ var DatatableFilterBooleans = /* @__PURE__ */ __name(({ filters = {
|
|
11862
11927
|
_eq: []
|
11863
11928
|
}, setFilters }) => {
|
11864
11929
|
const Components2 = useVulcanComponents();
|
11865
|
-
return /* @__PURE__ */
|
11930
|
+
return /* @__PURE__ */ React36.createElement(Components2.FormComponentRadioGroup, {
|
11866
11931
|
path: "filter",
|
11867
11932
|
itemProperties: {
|
11868
11933
|
layout: "inputOnly"
|
@@ -11881,10 +11946,10 @@ var DatatableFilterBooleans = /* @__PURE__ */ __name(({ filters = {
|
|
11881
11946
|
}, "DatatableFilterBooleans");
|
11882
11947
|
var DatatableFilterDates = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
11883
11948
|
const Components2 = useVulcanComponents();
|
11884
|
-
return /* @__PURE__ */
|
11949
|
+
return /* @__PURE__ */ React36.createElement("div", null, /* @__PURE__ */ React36.createElement(Components2.FormComponentDate, {
|
11885
11950
|
path: "_gte",
|
11886
11951
|
itemProperties: {
|
11887
|
-
label: /* @__PURE__ */
|
11952
|
+
label: /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11888
11953
|
id: "datatable.after",
|
11889
11954
|
defaultMessage: "After"
|
11890
11955
|
}),
|
@@ -11903,10 +11968,10 @@ var DatatableFilterDates = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
|
11903
11968
|
}));
|
11904
11969
|
}
|
11905
11970
|
}
|
11906
|
-
}), /* @__PURE__ */
|
11971
|
+
}), /* @__PURE__ */ React36.createElement(Components2.FormComponentDate, {
|
11907
11972
|
path: "_lte",
|
11908
11973
|
itemProperties: {
|
11909
|
-
label: /* @__PURE__ */
|
11974
|
+
label: /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11910
11975
|
id: "datatable.before",
|
11911
11976
|
defaultMessage: "Before"
|
11912
11977
|
}),
|
@@ -11929,10 +11994,10 @@ var DatatableFilterDates = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
|
11929
11994
|
}, "DatatableFilterDates");
|
11930
11995
|
var DatatableFilterNumbers = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
11931
11996
|
const Components2 = useVulcanComponents();
|
11932
|
-
return /* @__PURE__ */
|
11997
|
+
return /* @__PURE__ */ React36.createElement("div", null, /* @__PURE__ */ React36.createElement(Components2.FormComponentNumber, {
|
11933
11998
|
path: "_gte",
|
11934
11999
|
itemProperties: {
|
11935
|
-
label: /* @__PURE__ */
|
12000
|
+
label: /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11936
12001
|
id: "datatable.greater_than",
|
11937
12002
|
defaultMessage: "Greater than"
|
11938
12003
|
}),
|
@@ -11953,10 +12018,10 @@ var DatatableFilterNumbers = /* @__PURE__ */ __name(({ filters, setFilters }) =>
|
|
11953
12018
|
},
|
11954
12019
|
value: filters && parseFloat(filters._gte)
|
11955
12020
|
}
|
11956
|
-
}), /* @__PURE__ */
|
12021
|
+
}), /* @__PURE__ */ React36.createElement(Components2.FormComponentNumber, {
|
11957
12022
|
path: "_lte",
|
11958
12023
|
itemProperties: {
|
11959
|
-
label: /* @__PURE__ */
|
12024
|
+
label: /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11960
12025
|
id: "datatable.lower_than",
|
11961
12026
|
defaultMessage: "Lower than"
|
11962
12027
|
}),
|
@@ -11982,63 +12047,63 @@ var DatatableFilterNumbers = /* @__PURE__ */ __name(({ filters, setFilters }) =>
|
|
11982
12047
|
|
11983
12048
|
// components/Datatable/DatatableSorter.tsx
|
11984
12049
|
init_esm_shims();
|
11985
|
-
import
|
11986
|
-
var SortNone = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
12050
|
+
import React37 from "react";
|
12051
|
+
var SortNone = /* @__PURE__ */ __name(() => /* @__PURE__ */ React37.createElement("svg", {
|
11987
12052
|
width: "16",
|
11988
12053
|
height: "16",
|
11989
12054
|
viewBox: "0 0 438 438",
|
11990
12055
|
fill: "none",
|
11991
12056
|
xmlns: "http://www.w3.org/2000/svg"
|
11992
|
-
}, /* @__PURE__ */
|
12057
|
+
}, /* @__PURE__ */ React37.createElement("path", {
|
11993
12058
|
d: "M25.7368 247.243H280.263C303.149 247.243 314.592 274.958 298.444 291.116L171.18 418.456C161.128 428.515 144.872 428.515 134.926 418.456L7.55631 291.116C-8.59221 274.958 2.85078 247.243 25.7368 247.243ZM298.444 134.884L171.18 7.54408C161.128 -2.51469 144.872 -2.51469 134.926 7.54408L7.55631 134.884C-8.59221 151.042 2.85078 178.757 25.7368 178.757H280.263C303.149 178.757 314.592 151.042 298.444 134.884Z",
|
11994
12059
|
transform: "translate(66 6)",
|
11995
12060
|
fill: "#000",
|
11996
12061
|
fillOpacity: "0.2"
|
11997
12062
|
})), "SortNone");
|
11998
|
-
var SortDesc = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
12063
|
+
var SortDesc = /* @__PURE__ */ __name(() => /* @__PURE__ */ React37.createElement("svg", {
|
11999
12064
|
width: "16",
|
12000
12065
|
height: "16",
|
12001
12066
|
viewBox: "0 0 438 438",
|
12002
12067
|
fill: "none",
|
12003
12068
|
xmlns: "http://www.w3.org/2000/svg"
|
12004
|
-
}, /* @__PURE__ */
|
12069
|
+
}, /* @__PURE__ */ React37.createElement("path", {
|
12005
12070
|
d: "M25.7368 0H280.263C303.149 0 314.592 27.7151 298.444 43.8734L171.18 171.213C161.128 181.272 144.872 181.272 134.926 171.213L7.55631 43.8734C-8.59221 27.7151 2.85078 0 25.7368 0Z",
|
12006
12071
|
transform: "translate(66 253.243)",
|
12007
12072
|
fill: "black",
|
12008
12073
|
fillOpacity: "0.7"
|
12009
|
-
}), /* @__PURE__ */
|
12074
|
+
}), /* @__PURE__ */ React37.createElement("path", {
|
12010
12075
|
d: "M171.18 7.54408L298.444 134.884C314.592 151.042 303.149 178.757 280.263 178.757H25.7368C2.85078 178.757 -8.59221 151.042 7.55631 134.884L134.926 7.54408C144.872 -2.51469 161.128 -2.51469 171.18 7.54408Z",
|
12011
12076
|
transform: "translate(66 6)",
|
12012
12077
|
fill: "black",
|
12013
12078
|
fillOpacity: "0.2"
|
12014
12079
|
})), "SortDesc");
|
12015
|
-
var SortAsc = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
12080
|
+
var SortAsc = /* @__PURE__ */ __name(() => /* @__PURE__ */ React37.createElement("svg", {
|
12016
12081
|
width: "16",
|
12017
12082
|
height: "16",
|
12018
12083
|
viewBox: "0 0 438 438",
|
12019
12084
|
fill: "none",
|
12020
12085
|
xmlns: "http://www.w3.org/2000/svg"
|
12021
|
-
}, /* @__PURE__ */
|
12086
|
+
}, /* @__PURE__ */ React37.createElement("path", {
|
12022
12087
|
d: "M298.444 134.884L171.18 7.54408C161.128 -2.51469 144.872 -2.51469 134.926 7.54408L7.55631 134.884C-8.59221 151.042 2.85078 178.757 25.7368 178.757H280.263C303.149 178.757 314.592 151.042 298.444 134.884Z",
|
12023
12088
|
transform: "translate(66 6)",
|
12024
12089
|
fill: "black",
|
12025
12090
|
fillOpacity: "0.7"
|
12026
|
-
}), /* @__PURE__ */
|
12091
|
+
}), /* @__PURE__ */ React37.createElement("path", {
|
12027
12092
|
d: "M280.263 0H25.7368C2.85078 0 -8.59221 27.7151 7.55631 43.8734L134.926 171.213C144.872 181.272 161.128 181.272 171.18 171.213L298.444 43.8734C314.592 27.7151 303.149 0 280.263 0Z",
|
12028
12093
|
transform: "translate(66 253.243)",
|
12029
12094
|
fill: "black",
|
12030
12095
|
fillOpacity: "0.2"
|
12031
12096
|
})), "SortAsc");
|
12032
|
-
var DatatableSorter = /* @__PURE__ */ __name(({ name: name2, label, toggleSort, currentSort }) => /* @__PURE__ */
|
12097
|
+
var DatatableSorter = /* @__PURE__ */ __name(({ name: name2, label, toggleSort, currentSort }) => /* @__PURE__ */ React37.createElement("span", {
|
12033
12098
|
className: "datatable-sorter",
|
12034
12099
|
onClick: () => {
|
12035
12100
|
toggleSort(name2);
|
12036
12101
|
}
|
12037
|
-
}, !currentSort[name2] ? /* @__PURE__ */
|
12102
|
+
}, !currentSort[name2] ? /* @__PURE__ */ React37.createElement(SortNone, null) : currentSort[name2] === "asc" ? /* @__PURE__ */ React37.createElement(SortAsc, null) : /* @__PURE__ */ React37.createElement(SortDesc, null)), "DatatableSorter");
|
12038
12103
|
|
12039
12104
|
// components/Datatable/DatatableSelect.tsx
|
12040
12105
|
init_esm_shims();
|
12041
|
-
import
|
12106
|
+
import React38 from "react";
|
12042
12107
|
var DatatableSelect = /* @__PURE__ */ __name(({ toggleItem, selectedItems, document }) => {
|
12043
12108
|
const value = selectedItems.includes(document._id || "");
|
12044
12109
|
const onChange = /* @__PURE__ */ __name((e) => {
|
@@ -12047,9 +12112,9 @@ var DatatableSelect = /* @__PURE__ */ __name(({ toggleItem, selectedItems, docum
|
|
12047
12112
|
toggleItem(document._id);
|
12048
12113
|
}, "onChange");
|
12049
12114
|
const Components2 = useVulcanComponents();
|
12050
|
-
return /* @__PURE__ */
|
12115
|
+
return /* @__PURE__ */ React38.createElement(Components2.DatatableCellLayout, {
|
12051
12116
|
className: "datatable-check"
|
12052
|
-
}, /* @__PURE__ */
|
12117
|
+
}, /* @__PURE__ */ React38.createElement(Components2.FormComponentCheckbox, {
|
12053
12118
|
inputProperties: {
|
12054
12119
|
value,
|
12055
12120
|
onChange
|
@@ -12062,16 +12127,16 @@ var DatatableSelect = /* @__PURE__ */ __name(({ toggleItem, selectedItems, docum
|
|
12062
12127
|
|
12063
12128
|
// components/Datatable/DatatableSubmitSelected.tsx
|
12064
12129
|
init_esm_shims();
|
12065
|
-
import
|
12130
|
+
import React39 from "react";
|
12066
12131
|
var DatatableSubmitSelected = /* @__PURE__ */ __name(({ selectedItems, onSubmitSelected }) => {
|
12067
12132
|
const Components2 = useVulcanComponents();
|
12068
|
-
return /* @__PURE__ */
|
12133
|
+
return /* @__PURE__ */ React39.createElement(Components2.Button, {
|
12069
12134
|
className: "datatable-submit-selected",
|
12070
12135
|
onClick: (e) => {
|
12071
12136
|
e.preventDefault();
|
12072
12137
|
onSubmitSelected(selectedItems);
|
12073
12138
|
}
|
12074
|
-
}, /* @__PURE__ */
|
12139
|
+
}, /* @__PURE__ */ React39.createElement(Components2.FormattedMessage, {
|
12075
12140
|
id: "datatable.submit"
|
12076
12141
|
}));
|
12077
12142
|
}, "DatatableSubmitSelected");
|
@@ -12079,9 +12144,9 @@ var DatatableSubmitSelected = /* @__PURE__ */ __name(({ selectedItems, onSubmitS
|
|
12079
12144
|
// components/Datatable/others/EditButton.tsx
|
12080
12145
|
init_esm_shims();
|
12081
12146
|
import { useIntlContext as useIntlContext7 } from "@vulcanjs/react-i18n";
|
12082
|
-
import
|
12083
|
-
function
|
12084
|
-
|
12147
|
+
import React40 from "react";
|
12148
|
+
function _extends26() {
|
12149
|
+
_extends26 = Object.assign || function(target) {
|
12085
12150
|
for (var i = 1; i < arguments.length; i++) {
|
12086
12151
|
var source = arguments[i];
|
12087
12152
|
for (var key in source) {
|
@@ -12092,27 +12157,27 @@ function _extends24() {
|
|
12092
12157
|
}
|
12093
12158
|
return target;
|
12094
12159
|
};
|
12095
|
-
return
|
12160
|
+
return _extends26.apply(this, arguments);
|
12096
12161
|
}
|
12097
|
-
__name(
|
12162
|
+
__name(_extends26, "_extends");
|
12098
12163
|
var EditButton = /* @__PURE__ */ __name((_a) => {
|
12099
12164
|
var _b = _a, { style = "primary", variant, label, size: size2, showId, modalProps, formProps, component } = _b, props = __objRest(_b, ["style", "variant", "label", "size", "showId", "modalProps", "formProps", "component"]);
|
12100
12165
|
const Components2 = useVulcanComponents();
|
12101
12166
|
const intl = useIntlContext7();
|
12102
|
-
return /* @__PURE__ */
|
12167
|
+
return /* @__PURE__ */ React40.createElement(Components2.ModalTrigger, {
|
12103
12168
|
label: label || intl.formatMessage({
|
12104
12169
|
id: "datatable.edit",
|
12105
12170
|
defaultMessage: "Edit"
|
12106
12171
|
}),
|
12107
|
-
component: component ? component : /* @__PURE__ */
|
12172
|
+
component: component ? component : /* @__PURE__ */ React40.createElement(Components2.Button, {
|
12108
12173
|
size: size2,
|
12109
12174
|
variant: variant || style
|
12110
|
-
}, label || /* @__PURE__ */
|
12175
|
+
}, label || /* @__PURE__ */ React40.createElement(Components2.FormattedMessage, {
|
12111
12176
|
id: "datatable.edit",
|
12112
12177
|
defaultMessage: "Edit"
|
12113
12178
|
})),
|
12114
12179
|
modalProps
|
12115
|
-
}, /* @__PURE__ */
|
12180
|
+
}, /* @__PURE__ */ React40.createElement(Components2.EditForm, _extends26({
|
12116
12181
|
closeModal: () => {
|
12117
12182
|
console.warn("closeModal not defined");
|
12118
12183
|
}
|
@@ -12135,7 +12200,7 @@ var EditForm = /* @__PURE__ */ __name((_a) => {
|
|
12135
12200
|
} : () => {
|
12136
12201
|
closeModal();
|
12137
12202
|
};
|
12138
|
-
return /* @__PURE__ */
|
12203
|
+
return /* @__PURE__ */ React40.createElement(Components2.SmartForm, _extends26({
|
12139
12204
|
successCallback: success,
|
12140
12205
|
removeSuccessCallback: remove
|
12141
12206
|
}, formProps, props));
|
@@ -12144,9 +12209,9 @@ var EditForm = /* @__PURE__ */ __name((_a) => {
|
|
12144
12209
|
// components/Datatable/others/NewButton.tsx
|
12145
12210
|
init_esm_shims();
|
12146
12211
|
import { useIntlContext as useIntlContext8 } from "@vulcanjs/react-i18n";
|
12147
|
-
import
|
12148
|
-
function
|
12149
|
-
|
12212
|
+
import React41 from "react";
|
12213
|
+
function _extends27() {
|
12214
|
+
_extends27 = Object.assign || function(target) {
|
12150
12215
|
for (var i = 1; i < arguments.length; i++) {
|
12151
12216
|
var source = arguments[i];
|
12152
12217
|
for (var key in source) {
|
@@ -12157,27 +12222,27 @@ function _extends25() {
|
|
12157
12222
|
}
|
12158
12223
|
return target;
|
12159
12224
|
};
|
12160
|
-
return
|
12225
|
+
return _extends27.apply(this, arguments);
|
12161
12226
|
}
|
12162
|
-
__name(
|
12227
|
+
__name(_extends27, "_extends");
|
12163
12228
|
var NewButton = /* @__PURE__ */ __name((_a) => {
|
12164
12229
|
var _b = _a, { size: size2, label, style = "primary", formProps } = _b, props = __objRest(_b, ["size", "label", "style", "formProps"]);
|
12165
12230
|
const intl = useIntlContext8();
|
12166
12231
|
const Components2 = useVulcanComponents();
|
12167
|
-
return /* @__PURE__ */
|
12232
|
+
return /* @__PURE__ */ React41.createElement(Components2.ModalTrigger, {
|
12168
12233
|
label: label || intl.formatMessage({
|
12169
12234
|
id: "datatable.new"
|
12170
12235
|
}),
|
12171
12236
|
title: label || intl.formatMessage({
|
12172
12237
|
id: "datatable.new"
|
12173
12238
|
}),
|
12174
|
-
component: /* @__PURE__ */
|
12239
|
+
component: /* @__PURE__ */ React41.createElement(Components2.Button, {
|
12175
12240
|
variant: style,
|
12176
12241
|
size: size2
|
12177
|
-
}, label || /* @__PURE__ */
|
12242
|
+
}, label || /* @__PURE__ */ React41.createElement(Components2.FormattedMessage, {
|
12178
12243
|
id: "datatable.new"
|
12179
12244
|
}))
|
12180
|
-
}, /* @__PURE__ */
|
12245
|
+
}, /* @__PURE__ */ React41.createElement(Components2.NewForm, _extends27({
|
12181
12246
|
formProps
|
12182
12247
|
}, props)));
|
12183
12248
|
}, "NewButton");
|
@@ -12189,7 +12254,7 @@ var NewForm = /* @__PURE__ */ __name(({ model, closeModal, successCallback, form
|
|
12189
12254
|
} : () => {
|
12190
12255
|
closeModal();
|
12191
12256
|
};
|
12192
|
-
return /* @__PURE__ */
|
12257
|
+
return /* @__PURE__ */ React41.createElement(Components2.SmartForm, _extends27({
|
12193
12258
|
model,
|
12194
12259
|
successCallback: success
|
12195
12260
|
}, formProps || {}));
|
@@ -12198,9 +12263,9 @@ var NewForm = /* @__PURE__ */ __name(({ model, closeModal, successCallback, form
|
|
12198
12263
|
// components/Datatable/others/DeleteButton.tsx
|
12199
12264
|
init_esm_shims();
|
12200
12265
|
import { useDelete as useDelete2 } from "@vulcanjs/react-hooks";
|
12201
|
-
import
|
12202
|
-
function
|
12203
|
-
|
12266
|
+
import React42 from "react";
|
12267
|
+
function _extends28() {
|
12268
|
+
_extends28 = Object.assign || function(target) {
|
12204
12269
|
for (var i = 1; i < arguments.length; i++) {
|
12205
12270
|
var source = arguments[i];
|
12206
12271
|
for (var key in source) {
|
@@ -12211,9 +12276,9 @@ function _extends26() {
|
|
12211
12276
|
}
|
12212
12277
|
return target;
|
12213
12278
|
};
|
12214
|
-
return
|
12279
|
+
return _extends28.apply(this, arguments);
|
12215
12280
|
}
|
12216
|
-
__name(
|
12281
|
+
__name(_extends28, "_extends");
|
12217
12282
|
var DeleteButton = /* @__PURE__ */ __name((props) => {
|
12218
12283
|
const Components2 = useVulcanComponents();
|
12219
12284
|
const _a = props, { label, fragment, documentId, mutationOptions, currentUser, model } = _a, rest = __objRest(_a, ["label", "fragment", "documentId", "mutationOptions", "currentUser", "model"]);
|
@@ -12222,7 +12287,7 @@ var DeleteButton = /* @__PURE__ */ __name((props) => {
|
|
12222
12287
|
fragment,
|
12223
12288
|
mutationOptions
|
12224
12289
|
});
|
12225
|
-
return /* @__PURE__ */
|
12290
|
+
return /* @__PURE__ */ React42.createElement(Components2.LoadingButton, _extends28({
|
12226
12291
|
loading,
|
12227
12292
|
onClick: () => {
|
12228
12293
|
deleteFunction({
|
@@ -12231,7 +12296,7 @@ var DeleteButton = /* @__PURE__ */ __name((props) => {
|
|
12231
12296
|
}
|
12232
12297
|
});
|
12233
12298
|
},
|
12234
|
-
label: label || /* @__PURE__ */
|
12299
|
+
label: label || /* @__PURE__ */ React42.createElement(Components2.FormattedMessage, {
|
12235
12300
|
id: "datatable.delete",
|
12236
12301
|
defaultMessage: "Delete"
|
12237
12302
|
})
|
@@ -12285,9 +12350,9 @@ init_esm_shims();
|
|
12285
12350
|
|
12286
12351
|
// components/cell/CardItem.tsx
|
12287
12352
|
init_esm_shims();
|
12288
|
-
import
|
12289
|
-
function
|
12290
|
-
|
12353
|
+
import React43 from "react";
|
12354
|
+
function _extends29() {
|
12355
|
+
_extends29 = Object.assign || function(target) {
|
12291
12356
|
for (var i = 1; i < arguments.length; i++) {
|
12292
12357
|
var source = arguments[i];
|
12293
12358
|
for (var key in source) {
|
@@ -12298,9 +12363,9 @@ function _extends27() {
|
|
12298
12363
|
}
|
12299
12364
|
return target;
|
12300
12365
|
};
|
12301
|
-
return
|
12366
|
+
return _extends29.apply(this, arguments);
|
12302
12367
|
}
|
12303
|
-
__name(
|
12368
|
+
__name(_extends29, "_extends");
|
12304
12369
|
var getTypeName = /* @__PURE__ */ __name((value, fieldName, model) => {
|
12305
12370
|
const schema = model.schema;
|
12306
12371
|
const fieldSchema = schema && schema[fieldName];
|
@@ -12331,7 +12396,7 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12331
12396
|
}
|
12332
12397
|
}
|
12333
12398
|
if (typeof value === "undefined" || value === null) {
|
12334
|
-
return /* @__PURE__ */
|
12399
|
+
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, '""');
|
12335
12400
|
}
|
12336
12401
|
const itemProps = {
|
12337
12402
|
nestingLevel: nestingLevel + 1,
|
@@ -12341,7 +12406,7 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12341
12406
|
model,
|
12342
12407
|
fieldSchema
|
12343
12408
|
};
|
12344
|
-
if (/* @__PURE__ */
|
12409
|
+
if (/* @__PURE__ */ React43.isValidElement(itemProps.value)) {
|
12345
12410
|
return itemProps.value;
|
12346
12411
|
}
|
12347
12412
|
if (fieldSchema && fieldSchema.resolveAs && fieldSchema.resolveAs.relation) {
|
@@ -12349,15 +12414,15 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12349
12414
|
itemProps.relatedDocument = document == null ? void 0 : document[itemProps.relatedFieldName || ""];
|
12350
12415
|
itemProps.relatedModel = (_b = fieldSchema.relation) == null ? void 0 : _b.model;
|
12351
12416
|
if (!itemProps.relatedDocument) {
|
12352
|
-
return /* @__PURE__ */
|
12417
|
+
return /* @__PURE__ */ React43.createElement("span", null, "Missing data for sub-document ", /* @__PURE__ */ React43.createElement("code", null, value), " of type", " ", /* @__PURE__ */ React43.createElement("code", null, typeName), " (", /* @__PURE__ */ React43.createElement("code", null, itemProps.relatedFieldName), ")");
|
12353
12418
|
}
|
12354
12419
|
switch ((_c = fieldSchema.relation) == null ? void 0 : _c.kind) {
|
12355
12420
|
case "hasOne":
|
12356
|
-
return /* @__PURE__ */
|
12421
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemRelationHasOne, _extends29({}, itemProps));
|
12357
12422
|
case "hasMany":
|
12358
|
-
return /* @__PURE__ */
|
12423
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemRelationHasMany, _extends29({}, itemProps));
|
12359
12424
|
default:
|
12360
|
-
return /* @__PURE__ */
|
12425
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemDefault, _extends29({}, itemProps));
|
12361
12426
|
}
|
12362
12427
|
}
|
12363
12428
|
if (Array.isArray(value)) {
|
@@ -12369,81 +12434,81 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12369
12434
|
case "Number":
|
12370
12435
|
case "number":
|
12371
12436
|
case "SimpleSchema.Integer":
|
12372
|
-
return /* @__PURE__ */
|
12437
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemNumber, _extends29({}, itemProps));
|
12373
12438
|
case "Array":
|
12374
|
-
return /* @__PURE__ */
|
12439
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemArray, _extends29({}, itemProps));
|
12375
12440
|
case "Object":
|
12376
12441
|
case "object":
|
12377
|
-
return /* @__PURE__ */
|
12442
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemObject, _extends29({}, itemProps));
|
12378
12443
|
case "Date":
|
12379
|
-
return /* @__PURE__ */
|
12444
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemDate, _extends29({}, itemProps));
|
12380
12445
|
case "String":
|
12381
12446
|
case "string":
|
12382
12447
|
switch (contents) {
|
12383
12448
|
case "html":
|
12384
|
-
return /* @__PURE__ */
|
12449
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemHTML, _extends29({}, itemProps));
|
12385
12450
|
case "date":
|
12386
|
-
return /* @__PURE__ */
|
12451
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemDate, _extends29({}, itemProps));
|
12387
12452
|
case "image":
|
12388
|
-
return /* @__PURE__ */
|
12453
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemImage, _extends29({}, itemProps, {
|
12389
12454
|
force: true
|
12390
12455
|
}));
|
12391
12456
|
case "url":
|
12392
|
-
return /* @__PURE__ */
|
12457
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemURL, _extends29({}, itemProps, {
|
12393
12458
|
force: true
|
12394
12459
|
}));
|
12395
12460
|
default:
|
12396
|
-
return /* @__PURE__ */
|
12461
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemImage, _extends29({}, itemProps));
|
12397
12462
|
}
|
12398
12463
|
default:
|
12399
|
-
return /* @__PURE__ */
|
12464
|
+
return /* @__PURE__ */ React43.createElement(Components2.CardItemDefault, _extends29({}, itemProps));
|
12400
12465
|
}
|
12401
12466
|
}, "CardItemSwitcher");
|
12402
12467
|
|
12403
12468
|
// components/cell/CardItemRelationItem.tsx
|
12404
12469
|
init_esm_shims();
|
12405
|
-
import
|
12470
|
+
import React44 from "react";
|
12406
12471
|
var CardItemRelationItem = /* @__PURE__ */ __name(({ relatedDocument, relatedModel }) => {
|
12407
12472
|
const Components2 = useVulcanComponents();
|
12408
12473
|
const label = relatedDocument._id;
|
12409
12474
|
const typeName = relatedDocument.__typename;
|
12410
12475
|
const Cell = Components2[`${typeName}Cell`];
|
12411
|
-
return Cell ? /* @__PURE__ */
|
12476
|
+
return Cell ? /* @__PURE__ */ React44.createElement(Cell, {
|
12412
12477
|
document: relatedDocument,
|
12413
12478
|
label,
|
12414
12479
|
Components: Components2
|
12415
|
-
}) : /* @__PURE__ */
|
12480
|
+
}) : /* @__PURE__ */ React44.createElement(Components2.DefaultCell, {
|
12416
12481
|
document: relatedDocument,
|
12417
12482
|
label
|
12418
12483
|
});
|
12419
12484
|
}, "CardItemRelationItem");
|
12420
|
-
var DefaultCell = /* @__PURE__ */ __name(({ document, label }) => /* @__PURE__ */
|
12485
|
+
var DefaultCell = /* @__PURE__ */ __name(({ document, label }) => /* @__PURE__ */ React44.createElement("li", {
|
12421
12486
|
className: "relation-default-cell"
|
12422
|
-
}, document.pagePath ? /* @__PURE__ */
|
12487
|
+
}, document.pagePath ? /* @__PURE__ */ React44.createElement("a", {
|
12423
12488
|
href: document.pagePath
|
12424
|
-
}, label) : /* @__PURE__ */
|
12489
|
+
}, label) : /* @__PURE__ */ React44.createElement("span", null, label)), "DefaultCell");
|
12425
12490
|
var UserCell = /* @__PURE__ */ __name(({ document }) => {
|
12426
12491
|
const Components2 = useVulcanComponents();
|
12427
|
-
return /* @__PURE__ */
|
12492
|
+
return /* @__PURE__ */ React44.createElement("div", {
|
12428
12493
|
className: "contents-user user-item"
|
12429
|
-
}, document.pagePath ? /* @__PURE__ */
|
12494
|
+
}, document.pagePath ? /* @__PURE__ */ React44.createElement("a", {
|
12430
12495
|
className: "user-item-name",
|
12431
12496
|
href: document.pagePath
|
12432
|
-
}, document.displayName) : /* @__PURE__ */
|
12497
|
+
}, document.displayName) : /* @__PURE__ */ React44.createElement("span", {
|
12433
12498
|
className: "user-item-name"
|
12434
12499
|
}, document.displayName));
|
12435
12500
|
}, "UserCell");
|
12436
12501
|
|
12437
12502
|
// components/cell/CardItemArray.tsx
|
12438
12503
|
init_esm_shims();
|
12439
|
-
import
|
12504
|
+
import React45 from "react";
|
12440
12505
|
var CardItemArray = /* @__PURE__ */ __name(({ nestingLevel, value }) => {
|
12441
12506
|
const Components2 = useVulcanComponents();
|
12442
|
-
return /* @__PURE__ */
|
12507
|
+
return /* @__PURE__ */ React45.createElement("ol", {
|
12443
12508
|
className: "contents-array"
|
12444
|
-
}, value.map((item, index) => /* @__PURE__ */
|
12509
|
+
}, value.map((item, index) => /* @__PURE__ */ React45.createElement("li", {
|
12445
12510
|
key: index
|
12446
|
-
}, /* @__PURE__ */
|
12511
|
+
}, /* @__PURE__ */ React45.createElement(Components2.CardItem, {
|
12447
12512
|
value: item,
|
12448
12513
|
typeName: typeof item,
|
12449
12514
|
nestingLevel
|
@@ -12453,20 +12518,20 @@ var CardItemArray = /* @__PURE__ */ __name(({ nestingLevel, value }) => {
|
|
12453
12518
|
// components/cell/CardItemDate.tsx
|
12454
12519
|
init_esm_shims();
|
12455
12520
|
var import_moment2 = __toESM(require_moment(), 1);
|
12456
|
-
import
|
12457
|
-
var CardItemDate = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12521
|
+
import React46 from "react";
|
12522
|
+
var CardItemDate = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React46.createElement("span", {
|
12458
12523
|
className: "contents-date"
|
12459
12524
|
}, (0, import_moment2.default)(new Date(value)).format("YYYY/MM/DD, hh:mm")), "CardItemDate");
|
12460
12525
|
|
12461
12526
|
// components/cell/CardItemDefault.tsx
|
12462
12527
|
init_esm_shims();
|
12463
|
-
import
|
12464
|
-
var CardItemDefault = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12528
|
+
import React47 from "react";
|
12529
|
+
var CardItemDefault = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React47.createElement("span", null, value && value.toString()), "CardItemDefault");
|
12465
12530
|
|
12466
12531
|
// components/cell/CardItemHTML.tsx
|
12467
12532
|
init_esm_shims();
|
12468
|
-
import
|
12469
|
-
var CardItemHTML = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12533
|
+
import React48 from "react";
|
12534
|
+
var CardItemHTML = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React48.createElement("div", {
|
12470
12535
|
className: "contents-html",
|
12471
12536
|
dangerouslySetInnerHTML: {
|
12472
12537
|
__html: value
|
@@ -12475,7 +12540,7 @@ var CardItemHTML = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React45
|
|
12475
12540
|
|
12476
12541
|
// components/cell/CardItemImage.tsx
|
12477
12542
|
init_esm_shims();
|
12478
|
-
import
|
12543
|
+
import React49 from "react";
|
12479
12544
|
var CardItemImage = /* @__PURE__ */ __name(({ value, force = false }) => {
|
12480
12545
|
const Components2 = useVulcanComponents();
|
12481
12546
|
const isImage = [
|
@@ -12486,7 +12551,7 @@ var CardItemImage = /* @__PURE__ */ __name(({ value, force = false }) => {
|
|
12486
12551
|
".webp",
|
12487
12552
|
".jpeg"
|
12488
12553
|
].indexOf(value.substr(-5)) !== -1;
|
12489
|
-
return isImage || force ? /* @__PURE__ */
|
12554
|
+
return isImage || force ? /* @__PURE__ */ React49.createElement("img", {
|
12490
12555
|
className: "contents-image",
|
12491
12556
|
style: {
|
12492
12557
|
width: "100%",
|
@@ -12496,24 +12561,24 @@ var CardItemImage = /* @__PURE__ */ __name(({ value, force = false }) => {
|
|
12496
12561
|
},
|
12497
12562
|
src: value,
|
12498
12563
|
alt: value
|
12499
|
-
}) : /* @__PURE__ */
|
12564
|
+
}) : /* @__PURE__ */ React49.createElement(Components2.CardItemURL, {
|
12500
12565
|
value
|
12501
12566
|
});
|
12502
12567
|
}, "CardItemImage");
|
12503
12568
|
|
12504
12569
|
// components/cell/CardItemNumber.tsx
|
12505
12570
|
init_esm_shims();
|
12506
|
-
import
|
12507
|
-
var CardItemNumber = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12571
|
+
import React50 from "react";
|
12572
|
+
var CardItemNumber = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React50.createElement("code", {
|
12508
12573
|
className: "contents-number"
|
12509
12574
|
}, value.toString()), "CardItemNumber");
|
12510
12575
|
|
12511
12576
|
// components/cell/CardItemObject.tsx
|
12512
12577
|
init_esm_shims();
|
12513
|
-
import
|
12578
|
+
import React51 from "react";
|
12514
12579
|
import without3 from "lodash/without.js";
|
12515
|
-
function
|
12516
|
-
|
12580
|
+
function _extends30() {
|
12581
|
+
_extends30 = Object.assign || function(target) {
|
12517
12582
|
for (var i = 1; i < arguments.length; i++) {
|
12518
12583
|
var source = arguments[i];
|
12519
12584
|
for (var key in source) {
|
@@ -12524,36 +12589,36 @@ function _extends28() {
|
|
12524
12589
|
}
|
12525
12590
|
return target;
|
12526
12591
|
};
|
12527
|
-
return
|
12592
|
+
return _extends30.apply(this, arguments);
|
12528
12593
|
}
|
12529
|
-
__name(
|
12594
|
+
__name(_extends30, "_extends");
|
12530
12595
|
var CardItemObject = /* @__PURE__ */ __name((props) => {
|
12531
12596
|
const { nestingLevel, value, showExpand } = props;
|
12532
12597
|
const Components2 = useVulcanComponents();
|
12533
12598
|
const showExpandControl = showExpand || nestingLevel > 1;
|
12534
12599
|
if (value.__typename === "User") {
|
12535
12600
|
const user = value;
|
12536
|
-
return /* @__PURE__ */
|
12601
|
+
return /* @__PURE__ */ React51.createElement("div", {
|
12537
12602
|
className: "dashboard-user",
|
12538
12603
|
style: {
|
12539
12604
|
whiteSpace: "nowrap"
|
12540
12605
|
}
|
12541
|
-
}, user.pagePath ? /* @__PURE__ */
|
12606
|
+
}, user.pagePath ? /* @__PURE__ */ React51.createElement("a", {
|
12542
12607
|
href: user.pagePath
|
12543
|
-
}, user.displayName) : /* @__PURE__ */
|
12608
|
+
}, user.displayName) : /* @__PURE__ */ React51.createElement("span", null, user.displayName));
|
12544
12609
|
} else {
|
12545
|
-
return /* @__PURE__ */
|
12610
|
+
return /* @__PURE__ */ React51.createElement("div", {
|
12546
12611
|
className: "card-item-details"
|
12547
|
-
}, showExpandControl ? /* @__PURE__ */
|
12612
|
+
}, showExpandControl ? /* @__PURE__ */ React51.createElement("details", null, /* @__PURE__ */ React51.createElement("summary", null, "Expand"), /* @__PURE__ */ React51.createElement(CardItemObjectContents, _extends30({}, props))) : /* @__PURE__ */ React51.createElement(CardItemObjectContents, _extends30({}, props)));
|
12548
12613
|
}
|
12549
12614
|
}, "CardItemObject");
|
12550
12615
|
var CardItemObjectContents = /* @__PURE__ */ __name(({ nestingLevel, value: object }) => {
|
12551
12616
|
const Components2 = useVulcanComponents();
|
12552
|
-
return /* @__PURE__ */
|
12617
|
+
return /* @__PURE__ */ React51.createElement("table", {
|
12553
12618
|
className: "table table-bordered"
|
12554
|
-
}, /* @__PURE__ */
|
12619
|
+
}, /* @__PURE__ */ React51.createElement("tbody", null, without3(Object.keys(object), "__typename").map((key) => /* @__PURE__ */ React51.createElement("tr", {
|
12555
12620
|
key
|
12556
|
-
}, /* @__PURE__ */
|
12621
|
+
}, /* @__PURE__ */ React51.createElement("td", null, /* @__PURE__ */ React51.createElement("strong", null, key)), /* @__PURE__ */ React51.createElement("td", null, /* @__PURE__ */ React51.createElement(Components2.CardItemSwitcher, {
|
12557
12622
|
nestingLevel,
|
12558
12623
|
value: object[key],
|
12559
12624
|
typeName: typeof object[key]
|
@@ -12562,9 +12627,9 @@ var CardItemObjectContents = /* @__PURE__ */ __name(({ nestingLevel, value: obje
|
|
12562
12627
|
|
12563
12628
|
// components/cell/CardItemRelationHasMany.tsx
|
12564
12629
|
init_esm_shims();
|
12565
|
-
import
|
12566
|
-
function
|
12567
|
-
|
12630
|
+
import React52 from "react";
|
12631
|
+
function _extends31() {
|
12632
|
+
_extends31 = Object.assign || function(target) {
|
12568
12633
|
for (var i = 1; i < arguments.length; i++) {
|
12569
12634
|
var source = arguments[i];
|
12570
12635
|
for (var key in source) {
|
@@ -12575,15 +12640,15 @@ function _extends29() {
|
|
12575
12640
|
}
|
12576
12641
|
return target;
|
12577
12642
|
};
|
12578
|
-
return
|
12643
|
+
return _extends31.apply(this, arguments);
|
12579
12644
|
}
|
12580
|
-
__name(
|
12645
|
+
__name(_extends31, "_extends");
|
12581
12646
|
var CardItemRelationHasMany = /* @__PURE__ */ __name((_a) => {
|
12582
12647
|
var _b = _a, { relatedDocument: relatedDocuments } = _b, rest = __objRest(_b, ["relatedDocument"]);
|
12583
12648
|
const Components2 = useVulcanComponents();
|
12584
|
-
return /* @__PURE__ */
|
12649
|
+
return /* @__PURE__ */ React52.createElement("div", {
|
12585
12650
|
className: "contents-hasmany"
|
12586
|
-
}, relatedDocuments.map((relatedDocument) => /* @__PURE__ */
|
12651
|
+
}, relatedDocuments.map((relatedDocument) => /* @__PURE__ */ React52.createElement(Components2.CardItemRelationItem, _extends31({
|
12587
12652
|
key: relatedDocument._id,
|
12588
12653
|
relatedDocument
|
12589
12654
|
}, rest))));
|
@@ -12591,9 +12656,9 @@ var CardItemRelationHasMany = /* @__PURE__ */ __name((_a) => {
|
|
12591
12656
|
|
12592
12657
|
// components/cell/CardItemRelationHasOne.tsx
|
12593
12658
|
init_esm_shims();
|
12594
|
-
import
|
12595
|
-
function
|
12596
|
-
|
12659
|
+
import React53 from "react";
|
12660
|
+
function _extends32() {
|
12661
|
+
_extends32 = Object.assign || function(target) {
|
12597
12662
|
for (var i = 1; i < arguments.length; i++) {
|
12598
12663
|
var source = arguments[i];
|
12599
12664
|
for (var key in source) {
|
@@ -12604,39 +12669,39 @@ function _extends30() {
|
|
12604
12669
|
}
|
12605
12670
|
return target;
|
12606
12671
|
};
|
12607
|
-
return
|
12672
|
+
return _extends32.apply(this, arguments);
|
12608
12673
|
}
|
12609
|
-
__name(
|
12674
|
+
__name(_extends32, "_extends");
|
12610
12675
|
var CardItemRelationHasOne = /* @__PURE__ */ __name((_a) => {
|
12611
12676
|
var rest = __objRest(_a, []);
|
12612
12677
|
const Components2 = useVulcanComponents();
|
12613
|
-
return /* @__PURE__ */
|
12678
|
+
return /* @__PURE__ */ React53.createElement("div", {
|
12614
12679
|
className: "contents-hasone"
|
12615
|
-
}, /* @__PURE__ */
|
12680
|
+
}, /* @__PURE__ */ React53.createElement(Components2.CardItemRelationItem, _extends32({}, rest)));
|
12616
12681
|
}, "CardItemRelationHasOne");
|
12617
12682
|
|
12618
12683
|
// components/cell/CardItemString.tsx
|
12619
12684
|
init_esm_shims();
|
12620
|
-
import
|
12621
|
-
var CardItemString = /* @__PURE__ */ __name(({ string }) => /* @__PURE__ */
|
12685
|
+
import React54 from "react";
|
12686
|
+
var CardItemString = /* @__PURE__ */ __name(({ string }) => /* @__PURE__ */ React54.createElement("div", {
|
12622
12687
|
className: "contents-string"
|
12623
|
-
}, string.indexOf(" ") === -1 && string.length > 30 ? /* @__PURE__ */
|
12688
|
+
}, string.indexOf(" ") === -1 && string.length > 30 ? /* @__PURE__ */ React54.createElement("span", {
|
12624
12689
|
title: string
|
12625
|
-
}, string.substr(0, 30), "\u2026") : /* @__PURE__ */
|
12690
|
+
}, string.substr(0, 30), "\u2026") : /* @__PURE__ */ React54.createElement("span", null, string)), "CardItemString");
|
12626
12691
|
|
12627
12692
|
// components/cell/CardItemURL.tsx
|
12628
12693
|
init_esm_shims();
|
12629
|
-
import
|
12694
|
+
import React55 from "react";
|
12630
12695
|
var CardItemURL = /* @__PURE__ */ __name(({ value, force }) => {
|
12631
12696
|
const Components2 = useVulcanComponents();
|
12632
|
-
return force || value.slice(0, 4) === "http" ? /* @__PURE__ */
|
12697
|
+
return force || value.slice(0, 4) === "http" ? /* @__PURE__ */ React55.createElement("a", {
|
12633
12698
|
className: "contents-link",
|
12634
12699
|
href: value,
|
12635
12700
|
target: "_blank",
|
12636
12701
|
rel: "noopener noreferrer"
|
12637
|
-
}, /* @__PURE__ */
|
12702
|
+
}, /* @__PURE__ */ React55.createElement(Components2.CardItemString, {
|
12638
12703
|
string: value
|
12639
|
-
})) : /* @__PURE__ */
|
12704
|
+
})) : /* @__PURE__ */ React55.createElement(Components2.CardItemString, {
|
12640
12705
|
string: value
|
12641
12706
|
});
|
12642
12707
|
}, "CardItemURL");
|
@@ -12667,9 +12732,9 @@ import { FormattedMessage } from "@vulcanjs/react-i18n";
|
|
12667
12732
|
|
12668
12733
|
// components/form/core/Button.tsx
|
12669
12734
|
init_esm_shims();
|
12670
|
-
import
|
12671
|
-
function
|
12672
|
-
|
12735
|
+
import React56 from "react";
|
12736
|
+
function _extends33() {
|
12737
|
+
_extends33 = Object.assign || function(target) {
|
12673
12738
|
for (var i = 1; i < arguments.length; i++) {
|
12674
12739
|
var source = arguments[i];
|
12675
12740
|
for (var key in source) {
|
@@ -12680,27 +12745,27 @@ function _extends31() {
|
|
12680
12745
|
}
|
12681
12746
|
return target;
|
12682
12747
|
};
|
12683
|
-
return
|
12748
|
+
return _extends33.apply(this, arguments);
|
12684
12749
|
}
|
12685
|
-
__name(
|
12750
|
+
__name(_extends33, "_extends");
|
12686
12751
|
var Button = /* @__PURE__ */ __name((_a) => {
|
12687
12752
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
12688
|
-
return /* @__PURE__ */
|
12753
|
+
return /* @__PURE__ */ React56.createElement("button", _extends33({}, props), children);
|
12689
12754
|
}, "Button");
|
12690
12755
|
|
12691
12756
|
// components/form/core/Loading.tsx
|
12692
12757
|
init_esm_shims();
|
12693
|
-
import
|
12694
|
-
var Loading = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
12758
|
+
import React57 from "react";
|
12759
|
+
var Loading = /* @__PURE__ */ __name(() => /* @__PURE__ */ React57.createElement("span", {
|
12695
12760
|
"aria-live": "polite",
|
12696
12761
|
"aria-busy": "true"
|
12697
12762
|
}, "Loading..."), "Loading");
|
12698
12763
|
|
12699
12764
|
// components/LoadingButton.tsx
|
12700
12765
|
init_esm_shims();
|
12701
|
-
import
|
12702
|
-
function
|
12703
|
-
|
12766
|
+
import React58 from "react";
|
12767
|
+
function _extends34() {
|
12768
|
+
_extends34 = Object.assign || function(target) {
|
12704
12769
|
for (var i = 1; i < arguments.length; i++) {
|
12705
12770
|
var source = arguments[i];
|
12706
12771
|
for (var key in source) {
|
@@ -12711,9 +12776,9 @@ function _extends32() {
|
|
12711
12776
|
}
|
12712
12777
|
return target;
|
12713
12778
|
};
|
12714
|
-
return
|
12779
|
+
return _extends34.apply(this, arguments);
|
12715
12780
|
}
|
12716
|
-
__name(
|
12781
|
+
__name(_extends34, "_extends");
|
12717
12782
|
var LoadingButton = /* @__PURE__ */ __name((_a) => {
|
12718
12783
|
var _b = _a, { loading, label, onClick, children, className = "" } = _b, rest = __objRest(_b, ["loading", "label", "onClick", "children", "className"]);
|
12719
12784
|
const Components2 = useVulcanComponents();
|
@@ -12735,24 +12800,24 @@ var LoadingButton = /* @__PURE__ */ __name((_a) => {
|
|
12735
12800
|
} : {
|
12736
12801
|
display: "none"
|
12737
12802
|
};
|
12738
|
-
return /* @__PURE__ */
|
12803
|
+
return /* @__PURE__ */ React58.createElement(Components2.Button, _extends34({
|
12739
12804
|
className: `loading-button ${loading ? "loading-button-loading" : "loading-button-notloading"} ${className}`,
|
12740
12805
|
onClick
|
12741
|
-
}, rest), /* @__PURE__ */
|
12806
|
+
}, rest), /* @__PURE__ */ React58.createElement("span", {
|
12742
12807
|
style: wrapperStyle
|
12743
|
-
}, /* @__PURE__ */
|
12808
|
+
}, /* @__PURE__ */ React58.createElement("span", {
|
12744
12809
|
style: labelStyle
|
12745
|
-
}, label || children), /* @__PURE__ */
|
12810
|
+
}, label || children), /* @__PURE__ */ React58.createElement("span", {
|
12746
12811
|
style: loadingStyle
|
12747
|
-
}, /* @__PURE__ */
|
12812
|
+
}, /* @__PURE__ */ React58.createElement(Components2.Loading, null))));
|
12748
12813
|
}, "LoadingButton");
|
12749
12814
|
|
12750
12815
|
// components/MutationButton.tsx
|
12751
12816
|
init_esm_shims();
|
12752
|
-
import
|
12817
|
+
import React59, { useState as useState8 } from "react";
|
12753
12818
|
import { useMutation } from "@apollo/client";
|
12754
|
-
function
|
12755
|
-
|
12819
|
+
function _extends35() {
|
12820
|
+
_extends35 = Object.assign || function(target) {
|
12756
12821
|
for (var i = 1; i < arguments.length; i++) {
|
12757
12822
|
var source = arguments[i];
|
12758
12823
|
for (var key in source) {
|
@@ -12763,9 +12828,9 @@ function _extends33() {
|
|
12763
12828
|
}
|
12764
12829
|
return target;
|
12765
12830
|
};
|
12766
|
-
return
|
12831
|
+
return _extends35.apply(this, arguments);
|
12767
12832
|
}
|
12768
|
-
__name(
|
12833
|
+
__name(_extends35, "_extends");
|
12769
12834
|
var MutationButton = /* @__PURE__ */ __name((props) => {
|
12770
12835
|
const Components2 = useVulcanComponents();
|
12771
12836
|
const [loading, setLoading] = useState8(false);
|
@@ -12811,13 +12876,13 @@ var MutationButton = /* @__PURE__ */ __name((props) => {
|
|
12811
12876
|
setLoading(false);
|
12812
12877
|
}
|
12813
12878
|
}, "handleClick");
|
12814
|
-
const loadingButton = /* @__PURE__ */
|
12879
|
+
const loadingButton = /* @__PURE__ */ React59.createElement(Components2.LoadingButton, _extends35({
|
12815
12880
|
loading,
|
12816
12881
|
onClick: handleClick,
|
12817
12882
|
label
|
12818
12883
|
}, loadingButtonProps));
|
12819
12884
|
if (error1) {
|
12820
|
-
return /* @__PURE__ */
|
12885
|
+
return /* @__PURE__ */ React59.createElement(Components2.TooltipTrigger, {
|
12821
12886
|
trigger: loadingButton,
|
12822
12887
|
defaultShow: true
|
12823
12888
|
}, error1.message.replace("GraphQL error: ", ""));
|
@@ -12827,7 +12892,7 @@ var MutationButton = /* @__PURE__ */ __name((props) => {
|
|
12827
12892
|
|
12828
12893
|
// components/HeadTags.tsx
|
12829
12894
|
init_esm_shims();
|
12830
|
-
import
|
12895
|
+
import React60, { PureComponent } from "react";
|
12831
12896
|
var HeadTags = class extends PureComponent {
|
12832
12897
|
render() {
|
12833
12898
|
console.warn("HeadTags won't work in Next.js, because Head doesn't support nesting. Define meta directly in your app instead.");
|
@@ -12839,45 +12904,45 @@ var HeadTags = class extends PureComponent {
|
|
12839
12904
|
}
|
12840
12905
|
image = siteUrl + image;
|
12841
12906
|
}
|
12842
|
-
return /* @__PURE__ */
|
12907
|
+
return /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement("title", null, title), /* @__PURE__ */ React60.createElement("meta", {
|
12843
12908
|
charSet: "utf-8"
|
12844
|
-
}), /* @__PURE__ */
|
12909
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12845
12910
|
name: "description",
|
12846
12911
|
content: description
|
12847
|
-
}), /* @__PURE__ */
|
12912
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12848
12913
|
name: "viewport",
|
12849
12914
|
content: "width=device-width, initial-scale=1"
|
12850
|
-
}), /* @__PURE__ */
|
12915
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12851
12916
|
property: "og:type",
|
12852
12917
|
content: "article"
|
12853
|
-
}), /* @__PURE__ */
|
12918
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12854
12919
|
property: "og:url",
|
12855
12920
|
content: url
|
12856
|
-
}), /* @__PURE__ */
|
12921
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12857
12922
|
property: "og:image",
|
12858
12923
|
content: image
|
12859
|
-
}), /* @__PURE__ */
|
12924
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12860
12925
|
property: "og:title",
|
12861
12926
|
content: title
|
12862
|
-
}), /* @__PURE__ */
|
12927
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12863
12928
|
property: "og:description",
|
12864
12929
|
content: description
|
12865
|
-
}), /* @__PURE__ */
|
12930
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12866
12931
|
name: "twitter:card",
|
12867
12932
|
content: "summary"
|
12868
|
-
}), /* @__PURE__ */
|
12933
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12869
12934
|
name: "twitter:image:src",
|
12870
12935
|
content: image
|
12871
|
-
}), /* @__PURE__ */
|
12936
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12872
12937
|
name: "twitter:title",
|
12873
12938
|
content: title
|
12874
|
-
}), /* @__PURE__ */
|
12939
|
+
}), /* @__PURE__ */ React60.createElement("meta", {
|
12875
12940
|
name: "twitter:description",
|
12876
12941
|
content: description
|
12877
|
-
}), /* @__PURE__ */
|
12942
|
+
}), /* @__PURE__ */ React60.createElement("link", {
|
12878
12943
|
rel: "canonical",
|
12879
12944
|
href: url
|
12880
|
-
}), /* @__PURE__ */
|
12945
|
+
}), /* @__PURE__ */ React60.createElement("link", {
|
12881
12946
|
rel: "shortcut icon",
|
12882
12947
|
href: faviconUrl || "/favicon.ico"
|
12883
12948
|
}));
|
@@ -12887,9 +12952,9 @@ __name(HeadTags, "HeadTags");
|
|
12887
12952
|
|
12888
12953
|
// components/bootstrap/TooltipTrigger.tsx
|
12889
12954
|
init_esm_shims();
|
12890
|
-
import
|
12955
|
+
import React61 from "react";
|
12891
12956
|
var TooltipTrigger = /* @__PURE__ */ __name(({ children, trigger }) => {
|
12892
|
-
return /* @__PURE__ */
|
12957
|
+
return /* @__PURE__ */ React61.createElement("div", {
|
12893
12958
|
title: children
|
12894
12959
|
}, trigger);
|
12895
12960
|
}, "TooltipTrigger");
|
@@ -12897,10 +12962,10 @@ var TooltipTrigger = /* @__PURE__ */ __name(({ children, trigger }) => {
|
|
12897
12962
|
// components/bootstrap/Dropdown.tsx
|
12898
12963
|
init_esm_shims();
|
12899
12964
|
var import_prop_types6 = __toESM(require_prop_types(), 1);
|
12900
|
-
import
|
12965
|
+
import React62 from "react";
|
12901
12966
|
import { Dropdown, DropdownButton } from "react-bootstrap";
|
12902
|
-
function
|
12903
|
-
|
12967
|
+
function _extends36() {
|
12968
|
+
_extends36 = Object.assign || function(target) {
|
12904
12969
|
for (var i = 1; i < arguments.length; i++) {
|
12905
12970
|
var source = arguments[i];
|
12906
12971
|
for (var key in source) {
|
@@ -12911,9 +12976,9 @@ function _extends34() {
|
|
12911
12976
|
}
|
12912
12977
|
return target;
|
12913
12978
|
};
|
12914
|
-
return
|
12979
|
+
return _extends36.apply(this, arguments);
|
12915
12980
|
}
|
12916
|
-
__name(
|
12981
|
+
__name(_extends36, "_extends");
|
12917
12982
|
var DropdownItem = Dropdown.Item;
|
12918
12983
|
var Item = /* @__PURE__ */ __name((_a) => {
|
12919
12984
|
var _b = _a, {
|
@@ -12934,15 +12999,15 @@ var Item = /* @__PURE__ */ __name((_a) => {
|
|
12934
12999
|
const Components2 = useVulcanComponents();
|
12935
13000
|
let menuComponent;
|
12936
13001
|
if (component) {
|
12937
|
-
menuComponent = /* @__PURE__ */
|
13002
|
+
menuComponent = /* @__PURE__ */ React62.cloneElement(component, componentProps);
|
12938
13003
|
} else if (labelId) {
|
12939
|
-
menuComponent = /* @__PURE__ */
|
13004
|
+
menuComponent = /* @__PURE__ */ React62.createElement(Components2.FormattedMessage, {
|
12940
13005
|
id: labelId
|
12941
13006
|
});
|
12942
13007
|
} else {
|
12943
|
-
menuComponent = /* @__PURE__ */
|
13008
|
+
menuComponent = /* @__PURE__ */ React62.createElement("span", null, label);
|
12944
13009
|
}
|
12945
|
-
const item = /* @__PURE__ */
|
13010
|
+
const item = /* @__PURE__ */ React62.createElement(DropdownItem, _extends36({
|
12946
13011
|
eventKey: index
|
12947
13012
|
}, itemProps, rest), menuComponent);
|
12948
13013
|
return item;
|
@@ -12958,9 +13023,9 @@ Item.propTypes = {
|
|
12958
13023
|
};
|
12959
13024
|
var Node = /* @__PURE__ */ __name((_a) => {
|
12960
13025
|
var _b = _a, { childrenItems } = _b, rest = __objRest(_b, ["childrenItems"]);
|
12961
|
-
return /* @__PURE__ */
|
13026
|
+
return /* @__PURE__ */ React62.createElement(React62.Fragment, null, /* @__PURE__ */ React62.createElement(Item, _extends36({}, rest)), childrenItems && !!childrenItems.length && /* @__PURE__ */ React62.createElement("div", {
|
12962
13027
|
className: "menu-node-children"
|
12963
|
-
}, childrenItems.map((item, index) => /* @__PURE__ */
|
13028
|
+
}, childrenItems.map((item, index) => /* @__PURE__ */ React62.createElement(Item, _extends36({
|
12964
13029
|
key: index
|
12965
13030
|
}, item)))));
|
12966
13031
|
}, "Node");
|
@@ -12972,11 +13037,11 @@ var BootstrapDropdown = /* @__PURE__ */ __name((_a) => {
|
|
12972
13037
|
const Components2 = useVulcanComponents();
|
12973
13038
|
const menuBody = menuContents ? menuContents : menuItems.map((item, index) => {
|
12974
13039
|
if (item === "divider") {
|
12975
|
-
return /* @__PURE__ */
|
13040
|
+
return /* @__PURE__ */ React62.createElement(Dropdown.Divider, {
|
12976
13041
|
key: index
|
12977
13042
|
});
|
12978
13043
|
} else {
|
12979
|
-
return /* @__PURE__ */
|
13044
|
+
return /* @__PURE__ */ React62.createElement(Node, _extends36({}, item, {
|
12980
13045
|
key: index,
|
12981
13046
|
index
|
12982
13047
|
}));
|
@@ -12986,10 +13051,10 @@ var BootstrapDropdown = /* @__PURE__ */ __name((_a) => {
|
|
12986
13051
|
return menuBody;
|
12987
13052
|
} else {
|
12988
13053
|
if (trigger) {
|
12989
|
-
return /* @__PURE__ */
|
13054
|
+
return /* @__PURE__ */ React62.createElement(Dropdown, _extends36({}, dropdownProps), /* @__PURE__ */ React62.createElement(Dropdown.Toggle, null, trigger), /* @__PURE__ */ React62.createElement(Dropdown.Menu, null, menuBody));
|
12990
13055
|
} else {
|
12991
|
-
return /* @__PURE__ */
|
12992
|
-
title: labelId ? /* @__PURE__ */
|
13056
|
+
return /* @__PURE__ */ React62.createElement(DropdownButton, _extends36({}, buttonProps, {
|
13057
|
+
title: labelId ? /* @__PURE__ */ React62.createElement(Components2.FormattedMessage, {
|
12993
13058
|
id: labelId
|
12994
13059
|
}) : label
|
12995
13060
|
}, dropdownProps), menuBody);
|
@@ -13010,10 +13075,10 @@ var Dropdown_default = BootstrapDropdown;
|
|
13010
13075
|
// components/bootstrap/Modal.tsx
|
13011
13076
|
init_esm_shims();
|
13012
13077
|
var import_prop_types7 = __toESM(require_prop_types(), 1);
|
13013
|
-
import
|
13078
|
+
import React63 from "react";
|
13014
13079
|
import { Modal } from "react-bootstrap";
|
13015
|
-
function
|
13016
|
-
|
13080
|
+
function _extends37() {
|
13081
|
+
_extends37 = Object.assign || function(target) {
|
13017
13082
|
for (var i = 1; i < arguments.length; i++) {
|
13018
13083
|
var source = arguments[i];
|
13019
13084
|
for (var key in source) {
|
@@ -13024,29 +13089,29 @@ function _extends35() {
|
|
13024
13089
|
}
|
13025
13090
|
return target;
|
13026
13091
|
};
|
13027
|
-
return
|
13092
|
+
return _extends37.apply(this, arguments);
|
13028
13093
|
}
|
13029
|
-
__name(
|
13094
|
+
__name(_extends37, "_extends");
|
13030
13095
|
var BootstrapModal = /* @__PURE__ */ __name((_a) => {
|
13031
13096
|
var _b = _a, { children, size: size2 = "lg", show = false, onHide, title, showCloseButton = true, header, footer } = _b, rest = __objRest(_b, ["children", "size", "show", "onHide", "title", "showCloseButton", "header", "footer"]);
|
13032
13097
|
let headerComponent;
|
13033
13098
|
if (header) {
|
13034
|
-
headerComponent = /* @__PURE__ */
|
13099
|
+
headerComponent = /* @__PURE__ */ React63.createElement(Modal.Header, null, header);
|
13035
13100
|
} else if (title) {
|
13036
|
-
headerComponent = /* @__PURE__ */
|
13101
|
+
headerComponent = /* @__PURE__ */ React63.createElement(Modal.Header, {
|
13037
13102
|
closeButton: showCloseButton
|
13038
|
-
}, /* @__PURE__ */
|
13103
|
+
}, /* @__PURE__ */ React63.createElement(Modal.Title, null, title));
|
13039
13104
|
} else {
|
13040
|
-
headerComponent = /* @__PURE__ */
|
13105
|
+
headerComponent = /* @__PURE__ */ React63.createElement(Modal.Header, {
|
13041
13106
|
closeButton: showCloseButton
|
13042
13107
|
});
|
13043
13108
|
}
|
13044
|
-
const footerComponent = footer ? /* @__PURE__ */
|
13045
|
-
return /* @__PURE__ */
|
13109
|
+
const footerComponent = footer ? /* @__PURE__ */ React63.createElement(Modal.Footer, null, footer) : null;
|
13110
|
+
return /* @__PURE__ */ React63.createElement(Modal, _extends37({
|
13046
13111
|
size: size2,
|
13047
13112
|
show,
|
13048
13113
|
onHide
|
13049
|
-
}, rest), headerComponent, /* @__PURE__ */
|
13114
|
+
}, rest), headerComponent, /* @__PURE__ */ React63.createElement(Modal.Body, null, children), footerComponent);
|
13050
13115
|
}, "BootstrapModal");
|
13051
13116
|
BootstrapModal.propTypes = {
|
13052
13117
|
size: import_prop_types7.default.string,
|
@@ -13069,9 +13134,9 @@ BootstrapModal.propTypes = {
|
|
13069
13134
|
|
13070
13135
|
// components/bootstrap/ModalTrigger.tsx
|
13071
13136
|
init_esm_shims();
|
13072
|
-
import
|
13073
|
-
function
|
13074
|
-
|
13137
|
+
import React64, { useState as useState9 } from "react";
|
13138
|
+
function _extends38() {
|
13139
|
+
_extends38 = Object.assign || function(target) {
|
13075
13140
|
for (var i = 1; i < arguments.length; i++) {
|
13076
13141
|
var source = arguments[i];
|
13077
13142
|
for (var key in source) {
|
@@ -13082,9 +13147,9 @@ function _extends36() {
|
|
13082
13147
|
}
|
13083
13148
|
return target;
|
13084
13149
|
};
|
13085
|
-
return
|
13150
|
+
return _extends38.apply(this, arguments);
|
13086
13151
|
}
|
13087
|
-
__name(
|
13152
|
+
__name(_extends38, "_extends");
|
13088
13153
|
var ModalTrigger = /* @__PURE__ */ __name((props) => {
|
13089
13154
|
const [modalIsOpen, setModalIsOpen] = useState9(false);
|
13090
13155
|
const { onClick, openCallback, closeCallback } = props;
|
@@ -13110,23 +13175,23 @@ var ModalTrigger = /* @__PURE__ */ __name((props) => {
|
|
13110
13175
|
const Components2 = useVulcanComponents();
|
13111
13176
|
const { trigger, component, children, label, size: size2, className, dialogClassName, title, modalProps, header, footer } = props;
|
13112
13177
|
let triggerComponent = trigger || component;
|
13113
|
-
triggerComponent = triggerComponent ? /* @__PURE__ */
|
13178
|
+
triggerComponent = triggerComponent ? /* @__PURE__ */ React64.createElement("span", {
|
13114
13179
|
onClick: clickHandler
|
13115
|
-
}, triggerComponent) : /* @__PURE__ */
|
13180
|
+
}, triggerComponent) : /* @__PURE__ */ React64.createElement(Components2.Button, {
|
13116
13181
|
onClick: clickHandler
|
13117
13182
|
}, label);
|
13118
|
-
const childrenComponent = /* @__PURE__ */
|
13183
|
+
const childrenComponent = /* @__PURE__ */ React64.cloneElement(children, {
|
13119
13184
|
closeModal
|
13120
13185
|
});
|
13121
|
-
const headerComponent = header && /* @__PURE__ */
|
13186
|
+
const headerComponent = header && /* @__PURE__ */ React64.cloneElement(header, {
|
13122
13187
|
closeModal
|
13123
13188
|
});
|
13124
|
-
const footerComponent = footer && /* @__PURE__ */
|
13189
|
+
const footerComponent = footer && /* @__PURE__ */ React64.cloneElement(footer, {
|
13125
13190
|
closeModal
|
13126
13191
|
});
|
13127
|
-
return /* @__PURE__ */
|
13192
|
+
return /* @__PURE__ */ React64.createElement("div", {
|
13128
13193
|
className: "modal-trigger"
|
13129
|
-
}, triggerComponent, /* @__PURE__ */
|
13194
|
+
}, triggerComponent, /* @__PURE__ */ React64.createElement(Components2.Modal, _extends38({
|
13130
13195
|
size: size2,
|
13131
13196
|
className,
|
13132
13197
|
show: modalIsOpen,
|
@@ -13159,8 +13224,8 @@ var defaultVulcanComponents = __spreadValues(__spreadValues(__spreadValues(__spr
|
|
13159
13224
|
|
13160
13225
|
// components/VulcanComponents/Provider.tsx
|
13161
13226
|
import { debugVulcan as debugVulcan2 } from "@vulcanjs/utils";
|
13162
|
-
function
|
13163
|
-
|
13227
|
+
function _extends39() {
|
13228
|
+
_extends39 = Object.assign || function(target) {
|
13164
13229
|
for (var i = 1; i < arguments.length; i++) {
|
13165
13230
|
var source = arguments[i];
|
13166
13231
|
for (var key in source) {
|
@@ -13171,9 +13236,9 @@ function _extends37() {
|
|
13171
13236
|
}
|
13172
13237
|
return target;
|
13173
13238
|
};
|
13174
|
-
return
|
13239
|
+
return _extends39.apply(this, arguments);
|
13175
13240
|
}
|
13176
|
-
__name(
|
13241
|
+
__name(_extends39, "_extends");
|
13177
13242
|
var debugComponents = debugVulcan2("components");
|
13178
13243
|
var VulcanComponentsProvider = /* @__PURE__ */ __name((_a) => {
|
13179
13244
|
var _b = _a, { value } = _b, props = __objRest(_b, ["value"]);
|
@@ -13191,23 +13256,23 @@ var VulcanComponentsProvider = /* @__PURE__ */ __name((_a) => {
|
|
13191
13256
|
"useVulcanComponents" from index instead of Consumer.`);
|
13192
13257
|
}
|
13193
13258
|
});
|
13194
|
-
return /* @__PURE__ */
|
13259
|
+
return /* @__PURE__ */ React65.createElement(VulcanComponentsContext.Provider, _extends39({
|
13195
13260
|
value: mergedComponents
|
13196
13261
|
}, props));
|
13197
13262
|
}, "VulcanComponentsProvider");
|
13198
13263
|
|
13199
13264
|
// components/VulcanComponents/typings.ts
|
13200
13265
|
init_esm_shims();
|
13201
|
-
import
|
13266
|
+
import React66 from "react";
|
13202
13267
|
|
13203
13268
|
// components/VulcanCurrentUser/index.ts
|
13204
13269
|
init_esm_shims();
|
13205
13270
|
|
13206
13271
|
// components/VulcanCurrentUser/Provider.tsx
|
13207
13272
|
init_esm_shims();
|
13208
|
-
import
|
13209
|
-
function
|
13210
|
-
|
13273
|
+
import React67 from "react";
|
13274
|
+
function _extends40() {
|
13275
|
+
_extends40 = Object.assign || function(target) {
|
13211
13276
|
for (var i = 1; i < arguments.length; i++) {
|
13212
13277
|
var source = arguments[i];
|
13213
13278
|
for (var key in source) {
|
@@ -13218,21 +13283,21 @@ function _extends38() {
|
|
13218
13283
|
}
|
13219
13284
|
return target;
|
13220
13285
|
};
|
13221
|
-
return
|
13286
|
+
return _extends40.apply(this, arguments);
|
13222
13287
|
}
|
13223
|
-
__name(
|
13288
|
+
__name(_extends40, "_extends");
|
13224
13289
|
var VulcanCurrentUserProvider = /* @__PURE__ */ __name((_a) => {
|
13225
13290
|
var _b = _a, { value } = _b, props = __objRest(_b, ["value"]);
|
13226
|
-
return /* @__PURE__ */
|
13291
|
+
return /* @__PURE__ */ React67.createElement(VulcanCurrentUserContext.Provider, _extends40({
|
13227
13292
|
value
|
13228
13293
|
}, props));
|
13229
13294
|
}, "VulcanCurrentUserProvider");
|
13230
13295
|
|
13231
13296
|
// componentsHelpers.tsx
|
13232
13297
|
init_esm_shims();
|
13233
|
-
import
|
13234
|
-
function
|
13235
|
-
|
13298
|
+
import React68 from "react";
|
13299
|
+
function _extends41() {
|
13300
|
+
_extends41 = Object.assign || function(target) {
|
13236
13301
|
for (var i = 1; i < arguments.length; i++) {
|
13237
13302
|
var source = arguments[i];
|
13238
13303
|
for (var key in source) {
|
@@ -13243,9 +13308,9 @@ function _extends39() {
|
|
13243
13308
|
}
|
13244
13309
|
return target;
|
13245
13310
|
};
|
13246
|
-
return
|
13311
|
+
return _extends41.apply(this, arguments);
|
13247
13312
|
}
|
13248
|
-
__name(
|
13313
|
+
__name(_extends41, "_extends");
|
13249
13314
|
var Components = {};
|
13250
13315
|
var ComponentsTable = {};
|
13251
13316
|
var coreComponents = [
|
@@ -13284,16 +13349,16 @@ var getRawComponent = /* @__PURE__ */ __name((name2) => {
|
|
13284
13349
|
var instantiateComponent = /* @__PURE__ */ __name((component, props) => {
|
13285
13350
|
if (!component) {
|
13286
13351
|
return null;
|
13287
|
-
} else if (/* @__PURE__ */
|
13288
|
-
return /* @__PURE__ */
|
13352
|
+
} else if (/* @__PURE__ */ React68.isValidElement(component)) {
|
13353
|
+
return /* @__PURE__ */ React68.cloneElement(component, props);
|
13289
13354
|
} else if (typeof component === "function" && component.prototype && component.prototype.isReactComponent) {
|
13290
13355
|
const Component = component;
|
13291
|
-
return /* @__PURE__ */
|
13356
|
+
return /* @__PURE__ */ React68.createElement(Component, _extends41({}, props));
|
13292
13357
|
} else if (typeof component === "function") {
|
13293
13358
|
return component(props);
|
13294
13359
|
} else if (typeof component === "object" && component.$$typeof && component.render) {
|
13295
13360
|
const Component = component;
|
13296
|
-
return /* @__PURE__ */
|
13361
|
+
return /* @__PURE__ */ React68.createElement(Component, _extends41({}, props));
|
13297
13362
|
} else {
|
13298
13363
|
return component;
|
13299
13364
|
}
|
@@ -13301,7 +13366,7 @@ var instantiateComponent = /* @__PURE__ */ __name((component, props) => {
|
|
13301
13366
|
var delayedComponent = /* @__PURE__ */ __name((name2) => {
|
13302
13367
|
return (props) => {
|
13303
13368
|
const Component = Components[name2] || null;
|
13304
|
-
return Component && /* @__PURE__ */
|
13369
|
+
return Component && /* @__PURE__ */ React68.createElement(Component, _extends41({}, props));
|
13305
13370
|
};
|
13306
13371
|
}, "delayedComponent");
|
13307
13372
|
var mergeWithComponents = /* @__PURE__ */ __name((myComponents) => myComponents ? __spreadValues(__spreadValues({}, Components), myComponents) : Components, "mergeWithComponents");
|