@vulcanjs/react-ui 0.6.6-alpha.3 → 0.6.6-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form/FormComponent.d.ts +1 -0
- package/dist/components/form/FormComponent.d.ts.map +1 -1
- package/dist/components/form/FormComponentInner.d.ts +1 -1
- package/dist/components/form/FormComponentInner.d.ts.map +1 -1
- package/dist/components/form/inputs/AutocompleteMultiple.d.ts.map +1 -1
- package/dist/components/form/inputs/BasicInputs.d.ts +0 -1
- package/dist/components/form/inputs/BasicInputs.d.ts.map +1 -1
- package/dist/components/form/inputs/Checkboxgroup.d.ts +9 -0
- package/dist/components/form/inputs/Checkboxgroup.d.ts.map +1 -0
- package/dist/index.js +636 -500
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -1822,13 +1822,13 @@ var require_moment = __commonJS({
|
|
1822
1822
|
}
|
1823
1823
|
__name(deprecate2, "deprecate");
|
1824
1824
|
var deprecations = {};
|
1825
|
-
function deprecateSimple(
|
1825
|
+
function deprecateSimple(name2, msg) {
|
1826
1826
|
if (hooks.deprecationHandler != null) {
|
1827
|
-
hooks.deprecationHandler(
|
1827
|
+
hooks.deprecationHandler(name2, msg);
|
1828
1828
|
}
|
1829
|
-
if (!deprecations[
|
1829
|
+
if (!deprecations[name2]) {
|
1830
1830
|
warn(msg);
|
1831
|
-
deprecations[
|
1831
|
+
deprecations[name2] = true;
|
1832
1832
|
}
|
1833
1833
|
}
|
1834
1834
|
__name(deprecateSimple, "deprecateSimple");
|
@@ -3139,23 +3139,23 @@ var require_moment = __commonJS({
|
|
3139
3139
|
return globalLocale;
|
3140
3140
|
}
|
3141
3141
|
__name(chooseLocale, "chooseLocale");
|
3142
|
-
function isLocaleNameSane(
|
3143
|
-
return
|
3142
|
+
function isLocaleNameSane(name2) {
|
3143
|
+
return name2.match("^[^/\\\\]*$") != null;
|
3144
3144
|
}
|
3145
3145
|
__name(isLocaleNameSane, "isLocaleNameSane");
|
3146
|
-
function loadLocale(
|
3146
|
+
function loadLocale(name2) {
|
3147
3147
|
var oldLocale = null, aliasedRequire;
|
3148
|
-
if (locales[
|
3148
|
+
if (locales[name2] === void 0 && typeof module !== "undefined" && module && module.exports && isLocaleNameSane(name2)) {
|
3149
3149
|
try {
|
3150
3150
|
oldLocale = globalLocale._abbr;
|
3151
3151
|
aliasedRequire = __require;
|
3152
|
-
aliasedRequire("./locale/" +
|
3152
|
+
aliasedRequire("./locale/" + name2);
|
3153
3153
|
getSetGlobalLocale(oldLocale);
|
3154
3154
|
} catch (e) {
|
3155
|
-
locales[
|
3155
|
+
locales[name2] = null;
|
3156
3156
|
}
|
3157
3157
|
}
|
3158
|
-
return locales[
|
3158
|
+
return locales[name2];
|
3159
3159
|
}
|
3160
3160
|
__name(loadLocale, "loadLocale");
|
3161
3161
|
function getSetGlobalLocale(key, values) {
|
@@ -3177,13 +3177,13 @@ var require_moment = __commonJS({
|
|
3177
3177
|
return globalLocale._abbr;
|
3178
3178
|
}
|
3179
3179
|
__name(getSetGlobalLocale, "getSetGlobalLocale");
|
3180
|
-
function defineLocale(
|
3180
|
+
function defineLocale(name2, config) {
|
3181
3181
|
if (config !== null) {
|
3182
3182
|
var locale, parentConfig = baseConfig;
|
3183
|
-
config.abbr =
|
3184
|
-
if (locales[
|
3183
|
+
config.abbr = name2;
|
3184
|
+
if (locales[name2] != null) {
|
3185
3185
|
deprecateSimple("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");
|
3186
|
-
parentConfig = locales[
|
3186
|
+
parentConfig = locales[name2]._config;
|
3187
3187
|
} else if (config.parentLocale != null) {
|
3188
3188
|
if (locales[config.parentLocale] != null) {
|
3189
3189
|
parentConfig = locales[config.parentLocale]._config;
|
@@ -3196,59 +3196,59 @@ var require_moment = __commonJS({
|
|
3196
3196
|
localeFamilies[config.parentLocale] = [];
|
3197
3197
|
}
|
3198
3198
|
localeFamilies[config.parentLocale].push({
|
3199
|
-
name,
|
3199
|
+
name: name2,
|
3200
3200
|
config
|
3201
3201
|
});
|
3202
3202
|
return null;
|
3203
3203
|
}
|
3204
3204
|
}
|
3205
3205
|
}
|
3206
|
-
locales[
|
3207
|
-
if (localeFamilies[
|
3208
|
-
localeFamilies[
|
3206
|
+
locales[name2] = new Locale(mergeConfigs(parentConfig, config));
|
3207
|
+
if (localeFamilies[name2]) {
|
3208
|
+
localeFamilies[name2].forEach(function(x) {
|
3209
3209
|
defineLocale(x.name, x.config);
|
3210
3210
|
});
|
3211
3211
|
}
|
3212
|
-
getSetGlobalLocale(
|
3213
|
-
return locales[
|
3212
|
+
getSetGlobalLocale(name2);
|
3213
|
+
return locales[name2];
|
3214
3214
|
} else {
|
3215
|
-
delete locales[
|
3215
|
+
delete locales[name2];
|
3216
3216
|
return null;
|
3217
3217
|
}
|
3218
3218
|
}
|
3219
3219
|
__name(defineLocale, "defineLocale");
|
3220
|
-
function updateLocale(
|
3220
|
+
function updateLocale(name2, config) {
|
3221
3221
|
if (config != null) {
|
3222
3222
|
var locale, tmpLocale, parentConfig = baseConfig;
|
3223
|
-
if (locales[
|
3224
|
-
locales[
|
3223
|
+
if (locales[name2] != null && locales[name2].parentLocale != null) {
|
3224
|
+
locales[name2].set(mergeConfigs(locales[name2]._config, config));
|
3225
3225
|
} else {
|
3226
|
-
tmpLocale = loadLocale(
|
3226
|
+
tmpLocale = loadLocale(name2);
|
3227
3227
|
if (tmpLocale != null) {
|
3228
3228
|
parentConfig = tmpLocale._config;
|
3229
3229
|
}
|
3230
3230
|
config = mergeConfigs(parentConfig, config);
|
3231
3231
|
if (tmpLocale == null) {
|
3232
|
-
config.abbr =
|
3232
|
+
config.abbr = name2;
|
3233
3233
|
}
|
3234
3234
|
locale = new Locale(config);
|
3235
|
-
locale.parentLocale = locales[
|
3236
|
-
locales[
|
3235
|
+
locale.parentLocale = locales[name2];
|
3236
|
+
locales[name2] = locale;
|
3237
3237
|
}
|
3238
|
-
getSetGlobalLocale(
|
3238
|
+
getSetGlobalLocale(name2);
|
3239
3239
|
} else {
|
3240
|
-
if (locales[
|
3241
|
-
if (locales[
|
3242
|
-
locales[
|
3243
|
-
if (
|
3244
|
-
getSetGlobalLocale(
|
3240
|
+
if (locales[name2] != null) {
|
3241
|
+
if (locales[name2].parentLocale != null) {
|
3242
|
+
locales[name2] = locales[name2].parentLocale;
|
3243
|
+
if (name2 === getSetGlobalLocale()) {
|
3244
|
+
getSetGlobalLocale(name2);
|
3245
3245
|
}
|
3246
|
-
} else if (locales[
|
3247
|
-
delete locales[
|
3246
|
+
} else if (locales[name2] != null) {
|
3247
|
+
delete locales[name2];
|
3248
3248
|
}
|
3249
3249
|
}
|
3250
3250
|
}
|
3251
|
-
return locales[
|
3251
|
+
return locales[name2];
|
3252
3252
|
}
|
3253
3253
|
__name(updateLocale, "updateLocale");
|
3254
3254
|
function getLocale(key) {
|
@@ -4258,11 +4258,11 @@ var require_moment = __commonJS({
|
|
4258
4258
|
return res;
|
4259
4259
|
}
|
4260
4260
|
__name(momentsDifference, "momentsDifference");
|
4261
|
-
function createAdder(direction,
|
4261
|
+
function createAdder(direction, name2) {
|
4262
4262
|
return function(val, period) {
|
4263
4263
|
var dur, tmp;
|
4264
4264
|
if (period !== null && !isNaN(+period)) {
|
4265
|
-
deprecateSimple(
|
4265
|
+
deprecateSimple(name2, "moment()." + name2 + "(period, number) is deprecated. Please use moment()." + name2 + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");
|
4266
4266
|
tmp = val;
|
4267
4267
|
val = period;
|
4268
4268
|
period = tmp;
|
@@ -4866,10 +4866,10 @@ var require_moment = __commonJS({
|
|
4866
4866
|
}
|
4867
4867
|
__name(localeEras, "localeEras");
|
4868
4868
|
function localeErasParse(eraName, format, strict) {
|
4869
|
-
var i, l, eras = this.eras(),
|
4869
|
+
var i, l, eras = this.eras(), name2, abbr, narrow;
|
4870
4870
|
eraName = eraName.toUpperCase();
|
4871
4871
|
for (i = 0, l = eras.length; i < l; ++i) {
|
4872
|
-
|
4872
|
+
name2 = eras[i].name.toUpperCase();
|
4873
4873
|
abbr = eras[i].abbr.toUpperCase();
|
4874
4874
|
narrow = eras[i].narrow.toUpperCase();
|
4875
4875
|
if (strict) {
|
@@ -4882,7 +4882,7 @@ var require_moment = __commonJS({
|
|
4882
4882
|
}
|
4883
4883
|
break;
|
4884
4884
|
case "NNNN":
|
4885
|
-
if (
|
4885
|
+
if (name2 === eraName) {
|
4886
4886
|
return eras[i];
|
4887
4887
|
}
|
4888
4888
|
break;
|
@@ -4893,7 +4893,7 @@ var require_moment = __commonJS({
|
|
4893
4893
|
break;
|
4894
4894
|
}
|
4895
4895
|
} else if ([
|
4896
|
-
|
4896
|
+
name2,
|
4897
4897
|
abbr,
|
4898
4898
|
narrow
|
4899
4899
|
].indexOf(eraName) >= 0) {
|
@@ -5626,9 +5626,9 @@ var require_moment = __commonJS({
|
|
5626
5626
|
return this.isValid() ? this[units + "s"]() : NaN;
|
5627
5627
|
}
|
5628
5628
|
__name(get$2, "get$2");
|
5629
|
-
function makeGetter(
|
5629
|
+
function makeGetter(name2) {
|
5630
5630
|
return function() {
|
5631
|
-
return this.isValid() ? this._data[
|
5631
|
+
return this.isValid() ? this._data[name2] : NaN;
|
5632
5632
|
};
|
5633
5633
|
}
|
5634
5634
|
__name(makeGetter, "makeGetter");
|
@@ -6580,9 +6580,9 @@ __name(getCustomFn, "getCustomFn");
|
|
6580
6580
|
function getObjectTag(object) {
|
6581
6581
|
var tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
|
6582
6582
|
if (tag === "Object" && typeof object.constructor === "function") {
|
6583
|
-
var
|
6584
|
-
if (typeof
|
6585
|
-
return
|
6583
|
+
var name2 = object.constructor.name;
|
6584
|
+
if (typeof name2 === "string" && name2 !== "") {
|
6585
|
+
return name2;
|
6586
6586
|
}
|
6587
6587
|
}
|
6588
6588
|
return tag;
|
@@ -6655,14 +6655,14 @@ function _createClass2(Constructor, protoProps, staticProps) {
|
|
6655
6655
|
__name(_createClass2, "_createClass");
|
6656
6656
|
var Source = /* @__PURE__ */ function() {
|
6657
6657
|
function Source2(body) {
|
6658
|
-
var
|
6658
|
+
var name2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "GraphQL request";
|
6659
6659
|
var locationOffset = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
6660
6660
|
line: 1,
|
6661
6661
|
column: 1
|
6662
6662
|
};
|
6663
6663
|
typeof body === "string" || devAssert(0, "Body must be a string. Received: ".concat(inspect(body), "."));
|
6664
6664
|
this.body = body;
|
6665
|
-
this.name =
|
6665
|
+
this.name = name2;
|
6666
6666
|
this.locationOffset = locationOffset;
|
6667
6667
|
this.locationOffset.line > 0 || devAssert(0, "line in locationOffset is 1-indexed and must be positive.");
|
6668
6668
|
this.locationOffset.column > 0 || devAssert(0, "column in locationOffset is 1-indexed and must be positive.");
|
@@ -7216,14 +7216,14 @@ var Parser = /* @__PURE__ */ function() {
|
|
7216
7216
|
};
|
7217
7217
|
}
|
7218
7218
|
var operation = this.parseOperationType();
|
7219
|
-
var
|
7219
|
+
var name2;
|
7220
7220
|
if (this.peek(TokenKind.NAME)) {
|
7221
|
-
|
7221
|
+
name2 = this.parseName();
|
7222
7222
|
}
|
7223
7223
|
return {
|
7224
7224
|
kind: Kind.OPERATION_DEFINITION,
|
7225
7225
|
operation,
|
7226
|
-
name,
|
7226
|
+
name: name2,
|
7227
7227
|
variableDefinitions: this.parseVariableDefinitions(),
|
7228
7228
|
directives: this.parseDirectives(false),
|
7229
7229
|
selectionSet: this.parseSelectionSet(),
|
@@ -7280,17 +7280,17 @@ var Parser = /* @__PURE__ */ function() {
|
|
7280
7280
|
var start = this._lexer.token;
|
7281
7281
|
var nameOrAlias = this.parseName();
|
7282
7282
|
var alias;
|
7283
|
-
var
|
7283
|
+
var name2;
|
7284
7284
|
if (this.expectOptionalToken(TokenKind.COLON)) {
|
7285
7285
|
alias = nameOrAlias;
|
7286
|
-
|
7286
|
+
name2 = this.parseName();
|
7287
7287
|
} else {
|
7288
|
-
|
7288
|
+
name2 = nameOrAlias;
|
7289
7289
|
}
|
7290
7290
|
return {
|
7291
7291
|
kind: Kind.FIELD,
|
7292
7292
|
alias,
|
7293
|
-
name,
|
7293
|
+
name: name2,
|
7294
7294
|
arguments: this.parseArguments(false),
|
7295
7295
|
directives: this.parseDirectives(false),
|
7296
7296
|
selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0,
|
@@ -7303,11 +7303,11 @@ var Parser = /* @__PURE__ */ function() {
|
|
7303
7303
|
}, "parseArguments");
|
7304
7304
|
_proto.parseArgument = /* @__PURE__ */ __name(function parseArgument() {
|
7305
7305
|
var start = this._lexer.token;
|
7306
|
-
var
|
7306
|
+
var name2 = this.parseName();
|
7307
7307
|
this.expectToken(TokenKind.COLON);
|
7308
7308
|
return {
|
7309
7309
|
kind: Kind.ARGUMENT,
|
7310
|
-
name,
|
7310
|
+
name: name2,
|
7311
7311
|
value: this.parseValueLiteral(false),
|
7312
7312
|
loc: this.loc(start)
|
7313
7313
|
};
|
@@ -7466,11 +7466,11 @@ var Parser = /* @__PURE__ */ function() {
|
|
7466
7466
|
}, "parseObject");
|
7467
7467
|
_proto.parseObjectField = /* @__PURE__ */ __name(function parseObjectField(isConst) {
|
7468
7468
|
var start = this._lexer.token;
|
7469
|
-
var
|
7469
|
+
var name2 = this.parseName();
|
7470
7470
|
this.expectToken(TokenKind.COLON);
|
7471
7471
|
return {
|
7472
7472
|
kind: Kind.OBJECT_FIELD,
|
7473
|
-
name,
|
7473
|
+
name: name2,
|
7474
7474
|
value: this.parseValueLiteral(isConst),
|
7475
7475
|
loc: this.loc(start)
|
7476
7476
|
};
|
@@ -7585,12 +7585,12 @@ var Parser = /* @__PURE__ */ function() {
|
|
7585
7585
|
var start = this._lexer.token;
|
7586
7586
|
var description = this.parseDescription();
|
7587
7587
|
this.expectKeyword("scalar");
|
7588
|
-
var
|
7588
|
+
var name2 = this.parseName();
|
7589
7589
|
var directives = this.parseDirectives(true);
|
7590
7590
|
return {
|
7591
7591
|
kind: Kind.SCALAR_TYPE_DEFINITION,
|
7592
7592
|
description,
|
7593
|
-
name,
|
7593
|
+
name: name2,
|
7594
7594
|
directives,
|
7595
7595
|
loc: this.loc(start)
|
7596
7596
|
};
|
@@ -7599,14 +7599,14 @@ var Parser = /* @__PURE__ */ function() {
|
|
7599
7599
|
var start = this._lexer.token;
|
7600
7600
|
var description = this.parseDescription();
|
7601
7601
|
this.expectKeyword("type");
|
7602
|
-
var
|
7602
|
+
var name2 = this.parseName();
|
7603
7603
|
var interfaces = this.parseImplementsInterfaces();
|
7604
7604
|
var directives = this.parseDirectives(true);
|
7605
7605
|
var fields = this.parseFieldsDefinition();
|
7606
7606
|
return {
|
7607
7607
|
kind: Kind.OBJECT_TYPE_DEFINITION,
|
7608
7608
|
description,
|
7609
|
-
name,
|
7609
|
+
name: name2,
|
7610
7610
|
interfaces,
|
7611
7611
|
directives,
|
7612
7612
|
fields,
|
@@ -7640,7 +7640,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7640
7640
|
_proto.parseFieldDefinition = /* @__PURE__ */ __name(function parseFieldDefinition() {
|
7641
7641
|
var start = this._lexer.token;
|
7642
7642
|
var description = this.parseDescription();
|
7643
|
-
var
|
7643
|
+
var name2 = this.parseName();
|
7644
7644
|
var args = this.parseArgumentDefs();
|
7645
7645
|
this.expectToken(TokenKind.COLON);
|
7646
7646
|
var type = this.parseTypeReference();
|
@@ -7648,7 +7648,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7648
7648
|
return {
|
7649
7649
|
kind: Kind.FIELD_DEFINITION,
|
7650
7650
|
description,
|
7651
|
-
name,
|
7651
|
+
name: name2,
|
7652
7652
|
arguments: args,
|
7653
7653
|
type,
|
7654
7654
|
directives,
|
@@ -7661,7 +7661,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7661
7661
|
_proto.parseInputValueDef = /* @__PURE__ */ __name(function parseInputValueDef() {
|
7662
7662
|
var start = this._lexer.token;
|
7663
7663
|
var description = this.parseDescription();
|
7664
|
-
var
|
7664
|
+
var name2 = this.parseName();
|
7665
7665
|
this.expectToken(TokenKind.COLON);
|
7666
7666
|
var type = this.parseTypeReference();
|
7667
7667
|
var defaultValue;
|
@@ -7672,7 +7672,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7672
7672
|
return {
|
7673
7673
|
kind: Kind.INPUT_VALUE_DEFINITION,
|
7674
7674
|
description,
|
7675
|
-
name,
|
7675
|
+
name: name2,
|
7676
7676
|
type,
|
7677
7677
|
defaultValue,
|
7678
7678
|
directives,
|
@@ -7683,14 +7683,14 @@ var Parser = /* @__PURE__ */ function() {
|
|
7683
7683
|
var start = this._lexer.token;
|
7684
7684
|
var description = this.parseDescription();
|
7685
7685
|
this.expectKeyword("interface");
|
7686
|
-
var
|
7686
|
+
var name2 = this.parseName();
|
7687
7687
|
var interfaces = this.parseImplementsInterfaces();
|
7688
7688
|
var directives = this.parseDirectives(true);
|
7689
7689
|
var fields = this.parseFieldsDefinition();
|
7690
7690
|
return {
|
7691
7691
|
kind: Kind.INTERFACE_TYPE_DEFINITION,
|
7692
7692
|
description,
|
7693
|
-
name,
|
7693
|
+
name: name2,
|
7694
7694
|
interfaces,
|
7695
7695
|
directives,
|
7696
7696
|
fields,
|
@@ -7701,13 +7701,13 @@ var Parser = /* @__PURE__ */ function() {
|
|
7701
7701
|
var start = this._lexer.token;
|
7702
7702
|
var description = this.parseDescription();
|
7703
7703
|
this.expectKeyword("union");
|
7704
|
-
var
|
7704
|
+
var name2 = this.parseName();
|
7705
7705
|
var directives = this.parseDirectives(true);
|
7706
7706
|
var types = this.parseUnionMemberTypes();
|
7707
7707
|
return {
|
7708
7708
|
kind: Kind.UNION_TYPE_DEFINITION,
|
7709
7709
|
description,
|
7710
|
-
name,
|
7710
|
+
name: name2,
|
7711
7711
|
directives,
|
7712
7712
|
types,
|
7713
7713
|
loc: this.loc(start)
|
@@ -7720,13 +7720,13 @@ var Parser = /* @__PURE__ */ function() {
|
|
7720
7720
|
var start = this._lexer.token;
|
7721
7721
|
var description = this.parseDescription();
|
7722
7722
|
this.expectKeyword("enum");
|
7723
|
-
var
|
7723
|
+
var name2 = this.parseName();
|
7724
7724
|
var directives = this.parseDirectives(true);
|
7725
7725
|
var values = this.parseEnumValuesDefinition();
|
7726
7726
|
return {
|
7727
7727
|
kind: Kind.ENUM_TYPE_DEFINITION,
|
7728
7728
|
description,
|
7729
|
-
name,
|
7729
|
+
name: name2,
|
7730
7730
|
directives,
|
7731
7731
|
values,
|
7732
7732
|
loc: this.loc(start)
|
@@ -7738,12 +7738,12 @@ var Parser = /* @__PURE__ */ function() {
|
|
7738
7738
|
_proto.parseEnumValueDefinition = /* @__PURE__ */ __name(function parseEnumValueDefinition() {
|
7739
7739
|
var start = this._lexer.token;
|
7740
7740
|
var description = this.parseDescription();
|
7741
|
-
var
|
7741
|
+
var name2 = this.parseName();
|
7742
7742
|
var directives = this.parseDirectives(true);
|
7743
7743
|
return {
|
7744
7744
|
kind: Kind.ENUM_VALUE_DEFINITION,
|
7745
7745
|
description,
|
7746
|
-
name,
|
7746
|
+
name: name2,
|
7747
7747
|
directives,
|
7748
7748
|
loc: this.loc(start)
|
7749
7749
|
};
|
@@ -7752,13 +7752,13 @@ var Parser = /* @__PURE__ */ function() {
|
|
7752
7752
|
var start = this._lexer.token;
|
7753
7753
|
var description = this.parseDescription();
|
7754
7754
|
this.expectKeyword("input");
|
7755
|
-
var
|
7755
|
+
var name2 = this.parseName();
|
7756
7756
|
var directives = this.parseDirectives(true);
|
7757
7757
|
var fields = this.parseInputFieldsDefinition();
|
7758
7758
|
return {
|
7759
7759
|
kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,
|
7760
7760
|
description,
|
7761
|
-
name,
|
7761
|
+
name: name2,
|
7762
7762
|
directives,
|
7763
7763
|
fields,
|
7764
7764
|
loc: this.loc(start)
|
@@ -7809,14 +7809,14 @@ var Parser = /* @__PURE__ */ function() {
|
|
7809
7809
|
var start = this._lexer.token;
|
7810
7810
|
this.expectKeyword("extend");
|
7811
7811
|
this.expectKeyword("scalar");
|
7812
|
-
var
|
7812
|
+
var name2 = this.parseName();
|
7813
7813
|
var directives = this.parseDirectives(true);
|
7814
7814
|
if (directives.length === 0) {
|
7815
7815
|
throw this.unexpected();
|
7816
7816
|
}
|
7817
7817
|
return {
|
7818
7818
|
kind: Kind.SCALAR_TYPE_EXTENSION,
|
7819
|
-
name,
|
7819
|
+
name: name2,
|
7820
7820
|
directives,
|
7821
7821
|
loc: this.loc(start)
|
7822
7822
|
};
|
@@ -7825,7 +7825,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7825
7825
|
var start = this._lexer.token;
|
7826
7826
|
this.expectKeyword("extend");
|
7827
7827
|
this.expectKeyword("type");
|
7828
|
-
var
|
7828
|
+
var name2 = this.parseName();
|
7829
7829
|
var interfaces = this.parseImplementsInterfaces();
|
7830
7830
|
var directives = this.parseDirectives(true);
|
7831
7831
|
var fields = this.parseFieldsDefinition();
|
@@ -7834,7 +7834,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7834
7834
|
}
|
7835
7835
|
return {
|
7836
7836
|
kind: Kind.OBJECT_TYPE_EXTENSION,
|
7837
|
-
name,
|
7837
|
+
name: name2,
|
7838
7838
|
interfaces,
|
7839
7839
|
directives,
|
7840
7840
|
fields,
|
@@ -7845,7 +7845,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7845
7845
|
var start = this._lexer.token;
|
7846
7846
|
this.expectKeyword("extend");
|
7847
7847
|
this.expectKeyword("interface");
|
7848
|
-
var
|
7848
|
+
var name2 = this.parseName();
|
7849
7849
|
var interfaces = this.parseImplementsInterfaces();
|
7850
7850
|
var directives = this.parseDirectives(true);
|
7851
7851
|
var fields = this.parseFieldsDefinition();
|
@@ -7854,7 +7854,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7854
7854
|
}
|
7855
7855
|
return {
|
7856
7856
|
kind: Kind.INTERFACE_TYPE_EXTENSION,
|
7857
|
-
name,
|
7857
|
+
name: name2,
|
7858
7858
|
interfaces,
|
7859
7859
|
directives,
|
7860
7860
|
fields,
|
@@ -7865,7 +7865,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7865
7865
|
var start = this._lexer.token;
|
7866
7866
|
this.expectKeyword("extend");
|
7867
7867
|
this.expectKeyword("union");
|
7868
|
-
var
|
7868
|
+
var name2 = this.parseName();
|
7869
7869
|
var directives = this.parseDirectives(true);
|
7870
7870
|
var types = this.parseUnionMemberTypes();
|
7871
7871
|
if (directives.length === 0 && types.length === 0) {
|
@@ -7873,7 +7873,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7873
7873
|
}
|
7874
7874
|
return {
|
7875
7875
|
kind: Kind.UNION_TYPE_EXTENSION,
|
7876
|
-
name,
|
7876
|
+
name: name2,
|
7877
7877
|
directives,
|
7878
7878
|
types,
|
7879
7879
|
loc: this.loc(start)
|
@@ -7883,7 +7883,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7883
7883
|
var start = this._lexer.token;
|
7884
7884
|
this.expectKeyword("extend");
|
7885
7885
|
this.expectKeyword("enum");
|
7886
|
-
var
|
7886
|
+
var name2 = this.parseName();
|
7887
7887
|
var directives = this.parseDirectives(true);
|
7888
7888
|
var values = this.parseEnumValuesDefinition();
|
7889
7889
|
if (directives.length === 0 && values.length === 0) {
|
@@ -7891,7 +7891,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7891
7891
|
}
|
7892
7892
|
return {
|
7893
7893
|
kind: Kind.ENUM_TYPE_EXTENSION,
|
7894
|
-
name,
|
7894
|
+
name: name2,
|
7895
7895
|
directives,
|
7896
7896
|
values,
|
7897
7897
|
loc: this.loc(start)
|
@@ -7901,7 +7901,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7901
7901
|
var start = this._lexer.token;
|
7902
7902
|
this.expectKeyword("extend");
|
7903
7903
|
this.expectKeyword("input");
|
7904
|
-
var
|
7904
|
+
var name2 = this.parseName();
|
7905
7905
|
var directives = this.parseDirectives(true);
|
7906
7906
|
var fields = this.parseInputFieldsDefinition();
|
7907
7907
|
if (directives.length === 0 && fields.length === 0) {
|
@@ -7909,7 +7909,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7909
7909
|
}
|
7910
7910
|
return {
|
7911
7911
|
kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,
|
7912
|
-
name,
|
7912
|
+
name: name2,
|
7913
7913
|
directives,
|
7914
7914
|
fields,
|
7915
7915
|
loc: this.loc(start)
|
@@ -7920,7 +7920,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7920
7920
|
var description = this.parseDescription();
|
7921
7921
|
this.expectKeyword("directive");
|
7922
7922
|
this.expectToken(TokenKind.AT);
|
7923
|
-
var
|
7923
|
+
var name2 = this.parseName();
|
7924
7924
|
var args = this.parseArgumentDefs();
|
7925
7925
|
var repeatable = this.expectOptionalKeyword("repeatable");
|
7926
7926
|
this.expectKeyword("on");
|
@@ -7928,7 +7928,7 @@ var Parser = /* @__PURE__ */ function() {
|
|
7928
7928
|
return {
|
7929
7929
|
kind: Kind.DIRECTIVE_DEFINITION,
|
7930
7930
|
description,
|
7931
|
-
name,
|
7931
|
+
name: name2,
|
7932
7932
|
arguments: args,
|
7933
7933
|
repeatable,
|
7934
7934
|
locations,
|
@@ -7940,9 +7940,9 @@ var Parser = /* @__PURE__ */ function() {
|
|
7940
7940
|
}, "parseDirectiveLocations");
|
7941
7941
|
_proto.parseDirectiveLocation = /* @__PURE__ */ __name(function parseDirectiveLocation() {
|
7942
7942
|
var start = this._lexer.token;
|
7943
|
-
var
|
7944
|
-
if (DirectiveLocation[
|
7945
|
-
return
|
7943
|
+
var name2 = this.parseName();
|
7944
|
+
if (DirectiveLocation[name2.value] !== void 0) {
|
7945
|
+
return name2;
|
7946
7946
|
}
|
7947
7947
|
throw this.unexpected(start);
|
7948
7948
|
}, "parseDirectiveLocation");
|
@@ -8220,7 +8220,7 @@ var getSchemaFragment = /* @__PURE__ */ __name(({ schema, fragmentName, options,
|
|
8220
8220
|
return null;
|
8221
8221
|
}, "getSchemaFragment");
|
8222
8222
|
var getFormFragments = /* @__PURE__ */ __name(({ formType = "new", model, fields, addFields }) => {
|
8223
|
-
const { schema, name, graphql } = model;
|
8223
|
+
const { schema, name: name2, graphql } = model;
|
8224
8224
|
const { typeName, multiTypeName } = graphql;
|
8225
8225
|
let queryFieldNames = getQueryFieldNames({
|
8226
8226
|
schema,
|
@@ -9314,10 +9314,10 @@ var Form = /* @__PURE__ */ __name((props) => {
|
|
9314
9314
|
setErrors((prevErrors) => prevErrors.filter((error) => error.path !== path));
|
9315
9315
|
}, "clearFieldErrors");
|
9316
9316
|
const [deletedValues, setDeletedValues] = useState([]);
|
9317
|
-
const addToDeletedValues = /* @__PURE__ */ __name((
|
9317
|
+
const addToDeletedValues = /* @__PURE__ */ __name((name2) => {
|
9318
9318
|
setDeletedValues((prevDeletedValues) => [
|
9319
9319
|
...prevDeletedValues,
|
9320
|
-
|
9320
|
+
name2
|
9321
9321
|
]);
|
9322
9322
|
}, "addToDeletedValues");
|
9323
9323
|
const [callbacks, setCallbacks] = useState({
|
@@ -9602,7 +9602,7 @@ init_esm_shims();
|
|
9602
9602
|
|
9603
9603
|
// components/VulcanComponents/Provider.tsx
|
9604
9604
|
init_esm_shims();
|
9605
|
-
import
|
9605
|
+
import React62 from "react";
|
9606
9606
|
|
9607
9607
|
// components/VulcanComponents/defaultVulcanComponents/index.ts
|
9608
9608
|
init_esm_shims();
|
@@ -10019,7 +10019,7 @@ var FormComponentInner = /* @__PURE__ */ __name((props) => {
|
|
10019
10019
|
}, "getProperties");
|
10020
10020
|
const {
|
10021
10021
|
inputClassName,
|
10022
|
-
name,
|
10022
|
+
name: name2,
|
10023
10023
|
input,
|
10024
10024
|
beforeComponent,
|
10025
10025
|
afterComponent,
|
@@ -10032,7 +10032,7 @@ var FormComponentInner = /* @__PURE__ */ __name((props) => {
|
|
10032
10032
|
const FormComponents = useVulcanComponents();
|
10033
10033
|
const hasErrors = errors && errors.length;
|
10034
10034
|
const inputName = typeof input === "function" ? input.name : inputType1;
|
10035
|
-
const inputClass = classNames("form-input", inputClassName, `input-${
|
10035
|
+
const inputClass = classNames("form-input", inputClassName, `input-${name2}`, `form-component-${inputName || "default"}`, {
|
10036
10036
|
"input-error": hasErrors
|
10037
10037
|
});
|
10038
10038
|
const properties1 = getProperties();
|
@@ -10158,7 +10158,7 @@ var FormGroupLayout = /* @__PURE__ */ __name((_a) => {
|
|
10158
10158
|
}, "FormGroupLayout");
|
10159
10159
|
var FormGroupHeader = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React13.createElement("h2", _extends8({}, props)), "FormGroupHeader");
|
10160
10160
|
var FormGroup = /* @__PURE__ */ __name((props) => {
|
10161
|
-
const { name, label, group, fields, hidden, document, currentUser, disabled, itemProperties, prefilledProps, formType } = props;
|
10161
|
+
const { name: name2, label, group, fields, hidden, document, currentUser, disabled, itemProperties, prefilledProps, formType } = props;
|
10162
10162
|
const { errors, clearFieldErrors } = useFormContext();
|
10163
10163
|
const [collapsed1, setCollapsed] = useState3(group.startCollapsed || false);
|
10164
10164
|
const toggle = /* @__PURE__ */ __name(() => setCollapsed((collapsed) => !collapsed), "toggle");
|
@@ -10179,7 +10179,7 @@ var FormGroup = /* @__PURE__ */ __name((props) => {
|
|
10179
10179
|
if (group.adminsOnly && !isAdmin(currentUser)) {
|
10180
10180
|
return null;
|
10181
10181
|
}
|
10182
|
-
const anchorName =
|
10182
|
+
const anchorName = name2.split(".").length > 1 ? name2.split(".")[1] : name2;
|
10183
10183
|
return /* @__PURE__ */ React13.createElement(VulcanComponents.FormGroupLayout, {
|
10184
10184
|
label,
|
10185
10185
|
anchorName,
|
@@ -10187,7 +10187,7 @@ var FormGroup = /* @__PURE__ */ __name((props) => {
|
|
10187
10187
|
collapsed: collapsed1,
|
10188
10188
|
hidden: isHidden,
|
10189
10189
|
group,
|
10190
|
-
heading:
|
10190
|
+
heading: name2 === "default" ? null : heading,
|
10191
10191
|
hasErrors,
|
10192
10192
|
document
|
10193
10193
|
}, fields.map((field) => /* @__PURE__ */ React13.createElement(VulcanComponents.FormComponent, _extends8({
|
@@ -10235,13 +10235,13 @@ var FormIntl = /* @__PURE__ */ __name((props) => {
|
|
10235
10235
|
const getLocalePath = /* @__PURE__ */ __name((defaultIndex) => {
|
10236
10236
|
return `${props.path}_intl.${defaultIndex}`;
|
10237
10237
|
}, "getLocalePath");
|
10238
|
-
const { name } = props;
|
10238
|
+
const { name: name2 } = props;
|
10239
10239
|
const properties = omit2(props, "value", "inputProperties", "intlInput", "nestedInput");
|
10240
10240
|
return /* @__PURE__ */ React14.createElement(FormComponents.FormIntlLayout, null, Locales.map((locale, i) => /* @__PURE__ */ React14.createElement(FormComponents.FormIntlItemLayout, {
|
10241
10241
|
key: locale.id,
|
10242
10242
|
locale
|
10243
10243
|
}, /* @__PURE__ */ React14.createElement(FormComponents.FormComponent, _extends9({}, properties, {
|
10244
|
-
label: getLabel2(
|
10244
|
+
label: getLabel2(name2, locale.id),
|
10245
10245
|
path: getLocalePath(i),
|
10246
10246
|
locale: locale.id
|
10247
10247
|
})))));
|
@@ -10570,7 +10570,7 @@ FormNestedItemLayout.propTypes = {
|
|
10570
10570
|
removeButton: import_prop_types3.default.node
|
10571
10571
|
};
|
10572
10572
|
var FormNestedItem = /* @__PURE__ */ __name((_a) => {
|
10573
|
-
var _b = _a, { nestedFields, name, path, removeItem, itemIndex, formComponents, hideRemove, label } = _b, props = __objRest(_b, ["nestedFields", "name", "path", "removeItem", "itemIndex", "formComponents", "hideRemove", "label"]);
|
10573
|
+
var _b = _a, { nestedFields, name: name2, path, removeItem, itemIndex, formComponents, hideRemove, label } = _b, props = __objRest(_b, ["nestedFields", "name", "path", "removeItem", "itemIndex", "formComponents", "hideRemove", "label"]);
|
10574
10574
|
const VulcanComponents = useVulcanComponents();
|
10575
10575
|
const intl = useIntlContext4();
|
10576
10576
|
const isArray = typeof itemIndex !== "undefined";
|
@@ -10594,7 +10594,7 @@ var FormNestedItem = /* @__PURE__ */ __name((_a) => {
|
|
10594
10594
|
iconButton: true,
|
10595
10595
|
tabIndex: -1,
|
10596
10596
|
onClick: () => {
|
10597
|
-
removeItem(
|
10597
|
+
removeItem(name2);
|
10598
10598
|
},
|
10599
10599
|
"aria-label": intl.formatMessage({
|
10600
10600
|
id: "forms.delete_nested_field"
|
@@ -10743,37 +10743,41 @@ function _extends15() {
|
|
10743
10743
|
__name(_extends15, "_extends");
|
10744
10744
|
var HTMLInputAdapter = /* @__PURE__ */ __name((props) => {
|
10745
10745
|
const Components2 = useVulcanComponents();
|
10746
|
-
const { inputProperties, itemProperties } = props;
|
10747
|
-
const _a = inputProperties, { label, name } = _a, otherInputProperties = __objRest(_a, ["label", "name"]);
|
10746
|
+
const { inputProperties = {}, itemProperties = {}, path } = props;
|
10747
|
+
const _a = inputProperties, { label, name: name2 } = _a, otherInputProperties = __objRest(_a, ["label", "name"]);
|
10748
10748
|
return /* @__PURE__ */ React25.createElement(Components2.FormItem, _extends15({
|
10749
|
-
name,
|
10749
|
+
name: name2,
|
10750
|
+
path,
|
10750
10751
|
label,
|
10751
10752
|
inputProperties
|
10752
10753
|
}, itemProperties), /* @__PURE__ */ React25.createElement("input", _extends15({}, otherInputProperties, {
|
10753
|
-
id:
|
10754
|
-
name,
|
10754
|
+
id: name2,
|
10755
|
+
name: name2,
|
10755
10756
|
type: props.type
|
10756
10757
|
})));
|
10757
10758
|
}, "HTMLInputAdapter");
|
10758
10759
|
var FormItem = /* @__PURE__ */ __name((props) => {
|
10759
|
-
const { inputProperties, label, name } = props;
|
10760
|
+
const { inputProperties, label, name: name2 } = props;
|
10760
10761
|
return /* @__PURE__ */ React25.createElement("div", {
|
10761
|
-
className: `form-item ${
|
10762
|
+
className: `form-item ${name2}`
|
10762
10763
|
}, /* @__PURE__ */ React25.createElement("label", {
|
10763
|
-
htmlFor:
|
10764
|
+
htmlFor: name2
|
10764
10765
|
}, label), props.children);
|
10765
10766
|
}, "FormItem");
|
10766
10767
|
var HTMLSelectAdapter = /* @__PURE__ */ __name((props) => {
|
10767
|
-
const { inputProperties, options = [], itemProperties } = props;
|
10768
|
-
const { label: label1, name } = inputProperties;
|
10768
|
+
const { multiple, path, inputProperties = {}, options = [], itemProperties } = props;
|
10769
|
+
const { label: label1, name: name2 } = inputProperties;
|
10769
10770
|
if (!Array.isArray(options))
|
10770
10771
|
throw new Error("HTMLSelectAdapater not yet supporting functional options");
|
10771
10772
|
const Components2 = useVulcanComponents();
|
10772
10773
|
return /* @__PURE__ */ React25.createElement(Components2.FormItem, _extends15({
|
10773
|
-
name,
|
10774
|
+
name: name2,
|
10774
10775
|
label: label1,
|
10776
|
+
path,
|
10775
10777
|
inputProperties
|
10776
|
-
}, itemProperties), /* @__PURE__ */ React25.createElement("select", _extends15({
|
10778
|
+
}, itemProperties), /* @__PURE__ */ React25.createElement("select", _extends15({
|
10779
|
+
multiple
|
10780
|
+
}, inputProperties), options.map(({ label, value }) => /* @__PURE__ */ React25.createElement("option", {
|
10777
10781
|
key: value,
|
10778
10782
|
label,
|
10779
10783
|
value
|
@@ -10798,18 +10802,20 @@ var FormComponentTextarea = /* @__PURE__ */ __name((props) => {
|
|
10798
10802
|
const { inputProperties, itemProperties } = props;
|
10799
10803
|
return /* @__PURE__ */ React25.createElement("textarea", _extends15({}, inputProperties));
|
10800
10804
|
}, "FormComponentTextarea");
|
10801
|
-
var FormComponentCheckbox = /* @__PURE__ */ __name((props) =>
|
10802
|
-
|
10803
|
-
|
10804
|
-
|
10805
|
+
var FormComponentCheckbox = /* @__PURE__ */ __name((props) => {
|
10806
|
+
return /* @__PURE__ */ React25.createElement(HTMLInputAdapter, _extends15({
|
10807
|
+
type: "checkbox"
|
10808
|
+
}, props));
|
10809
|
+
}, "FormComponentCheckbox");
|
10805
10810
|
var FormComponentRadioGroup = /* @__PURE__ */ __name((props) => {
|
10806
|
-
const { inputProperties, options = [], itemProperties } = props;
|
10807
|
-
const { label, name } = inputProperties;
|
10811
|
+
const { path, inputProperties, options = [], itemProperties } = props;
|
10812
|
+
const { label, name: name2 } = inputProperties;
|
10808
10813
|
if (!Array.isArray(options))
|
10809
10814
|
throw new Error("RadioGroup not yet supporting functional options");
|
10810
10815
|
const Components2 = useVulcanComponents();
|
10811
10816
|
return /* @__PURE__ */ React25.createElement(Components2.FormItem, _extends15({
|
10812
|
-
|
10817
|
+
path,
|
10818
|
+
name: name2,
|
10813
10819
|
label,
|
10814
10820
|
inputProperties
|
10815
10821
|
}, itemProperties), options.map((option) => {
|
@@ -10822,7 +10828,7 @@ var FormComponentRadioGroup = /* @__PURE__ */ __name((props) => {
|
|
10822
10828
|
}), /* @__PURE__ */ React25.createElement("input", {
|
10823
10829
|
type: "radio",
|
10824
10830
|
id: value,
|
10825
|
-
name,
|
10831
|
+
name: name2,
|
10826
10832
|
key: value,
|
10827
10833
|
value
|
10828
10834
|
}));
|
@@ -10850,11 +10856,12 @@ var FormComponentStaticText = /* @__PURE__ */ __name((props) => /* @__PURE__ */
|
|
10850
10856
|
var FormComponentLikert = /* @__PURE__ */ __name((props) => "Likert component not yet implemented", "FormComponentLikert");
|
10851
10857
|
var FormComponentAutocomplete = /* @__PURE__ */ __name((props) => "Autocomplete component not yet implemented", "FormComponentAutocomplete");
|
10852
10858
|
|
10853
|
-
// components/form/inputs/
|
10859
|
+
// components/form/inputs/Checkboxgroup.tsx
|
10854
10860
|
init_esm_shims();
|
10855
|
-
import { AsyncTypeahead } from "react-bootstrap-typeahead";
|
10856
10861
|
import React26, { useState as useState4 } from "react";
|
10857
|
-
import
|
10862
|
+
import without2 from "lodash/without.js";
|
10863
|
+
import uniq2 from "lodash/uniq.js";
|
10864
|
+
import isEmpty3 from "lodash/isEmpty.js";
|
10858
10865
|
function _extends16() {
|
10859
10866
|
_extends16 = Object.assign || function(target) {
|
10860
10867
|
for (var i = 1; i < arguments.length; i++) {
|
@@ -10870,6 +10877,135 @@ function _extends16() {
|
|
10870
10877
|
return _extends16.apply(this, arguments);
|
10871
10878
|
}
|
10872
10879
|
__name(_extends16, "_extends");
|
10880
|
+
var otherMarker = "[other]";
|
10881
|
+
var isOtherValue = /* @__PURE__ */ __name((s) => s && typeof s === "string" && s.substr(0, otherMarker.length) === otherMarker, "isOtherValue");
|
10882
|
+
var removeOtherMarker = /* @__PURE__ */ __name((s) => s && typeof s === "string" && s.substr(otherMarker.length), "removeOtherMarker");
|
10883
|
+
var addOtherMarker = /* @__PURE__ */ __name((s) => `${otherMarker}${s}`, "addOtherMarker");
|
10884
|
+
var removeOtherValue = /* @__PURE__ */ __name((a) => {
|
10885
|
+
return a.filter((s) => !isOtherValue(s));
|
10886
|
+
}, "removeOtherValue");
|
10887
|
+
var OtherComponent = /* @__PURE__ */ __name(({ value, path }) => {
|
10888
|
+
const { updateCurrentValues } = useFormContext();
|
10889
|
+
const Components2 = useVulcanComponents();
|
10890
|
+
const otherValue = removeOtherMarker(value.find(isOtherValue));
|
10891
|
+
const withoutOtherValue = removeOtherValue(value);
|
10892
|
+
const [showOther, setShowOther] = useState4(!!otherValue);
|
10893
|
+
const [textFieldValue, setTextFieldValue] = useState4(otherValue);
|
10894
|
+
const textFieldInputProperties = {
|
10895
|
+
name,
|
10896
|
+
value: textFieldValue,
|
10897
|
+
onChange: (event) => {
|
10898
|
+
const fieldValue = event.target.value;
|
10899
|
+
setTextFieldValue(fieldValue);
|
10900
|
+
const newValue = isEmpty3(fieldValue) ? withoutOtherValue : [
|
10901
|
+
...withoutOtherValue,
|
10902
|
+
addOtherMarker(fieldValue)
|
10903
|
+
];
|
10904
|
+
updateCurrentValues({
|
10905
|
+
[path]: newValue
|
10906
|
+
});
|
10907
|
+
}
|
10908
|
+
};
|
10909
|
+
const textFieldItemProperties = {
|
10910
|
+
layout: "elementOnly"
|
10911
|
+
};
|
10912
|
+
return /* @__PURE__ */ React26.createElement("div", {
|
10913
|
+
className: "form-option-other"
|
10914
|
+
}, /* @__PURE__ */ React26.createElement(Components2.FormComponentCheckbox, {
|
10915
|
+
layout: "elementOnly",
|
10916
|
+
label: "Other",
|
10917
|
+
value: showOther,
|
10918
|
+
checked: showOther,
|
10919
|
+
onClick: (event) => {
|
10920
|
+
const isChecked = event.target.checked;
|
10921
|
+
setShowOther(isChecked);
|
10922
|
+
if (isChecked) {
|
10923
|
+
if (textFieldValue) {
|
10924
|
+
updateCurrentValues({
|
10925
|
+
[path]: [
|
10926
|
+
...withoutOtherValue,
|
10927
|
+
addOtherMarker(textFieldValue)
|
10928
|
+
]
|
10929
|
+
});
|
10930
|
+
}
|
10931
|
+
} else {
|
10932
|
+
updateCurrentValues({
|
10933
|
+
[path]: withoutOtherValue
|
10934
|
+
});
|
10935
|
+
}
|
10936
|
+
}
|
10937
|
+
}), showOther && /* @__PURE__ */ React26.createElement(Components2.FormComponentText, {
|
10938
|
+
inputProperties: textFieldInputProperties,
|
10939
|
+
itemProperties: textFieldItemProperties
|
10940
|
+
}));
|
10941
|
+
}, "OtherComponent");
|
10942
|
+
var FormComponentCheckboxGroup = /* @__PURE__ */ __name((props) => {
|
10943
|
+
const { updateCurrentValues } = useFormContext();
|
10944
|
+
const { value: valueFromProps, multiple, inputProperties = {}, options = [], itemProperties, path } = props;
|
10945
|
+
const { label, name: name2 } = inputProperties;
|
10946
|
+
const Components2 = useVulcanComponents();
|
10947
|
+
if (!Array.isArray(options))
|
10948
|
+
throw new Error("FormComponentCheckboxGroup not yet supporting functional options");
|
10949
|
+
const value = valueFromProps ? uniq2(valueFromProps.filter((v) => isOtherValue(v) || options.map((o) => o.value).includes(v))) : [];
|
10950
|
+
const hasValue = value.length > 0;
|
10951
|
+
return /* @__PURE__ */ React26.createElement(Components2.FormItem, _extends16({
|
10952
|
+
name: name2,
|
10953
|
+
label,
|
10954
|
+
path,
|
10955
|
+
inputProperties
|
10956
|
+
}, itemProperties), /* @__PURE__ */ React26.createElement("div", {
|
10957
|
+
className: "form-item-options"
|
10958
|
+
}, options.map((option, i) => {
|
10959
|
+
const isChecked1 = value.includes(option.value);
|
10960
|
+
const checkClass = hasValue ? isChecked1 ? "form-check-checked" : "form-check-unchecked" : "";
|
10961
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Components2.FormOptionLabel, {
|
10962
|
+
option,
|
10963
|
+
name: name2
|
10964
|
+
}), /* @__PURE__ */ React26.createElement("input", _extends16({
|
10965
|
+
type: "checkbox"
|
10966
|
+
}, inputProperties, {
|
10967
|
+
name: name2,
|
10968
|
+
key: i,
|
10969
|
+
checked: isChecked1,
|
10970
|
+
id: `${path}.${i}`,
|
10971
|
+
onChange: (event) => {
|
10972
|
+
const isChecked = event.target.checked;
|
10973
|
+
const newValue = isChecked ? [
|
10974
|
+
...value,
|
10975
|
+
option.value
|
10976
|
+
] : without2(value, option.value);
|
10977
|
+
updateCurrentValues({
|
10978
|
+
[path]: newValue
|
10979
|
+
});
|
10980
|
+
},
|
10981
|
+
className: checkClass
|
10982
|
+
})));
|
10983
|
+
}), itemProperties.showOther && /* @__PURE__ */ React26.createElement(OtherComponent, {
|
10984
|
+
value,
|
10985
|
+
path
|
10986
|
+
})));
|
10987
|
+
}, "FormComponentCheckboxGroup");
|
10988
|
+
|
10989
|
+
// components/form/inputs/AutocompleteMultiple.tsx
|
10990
|
+
init_esm_shims();
|
10991
|
+
import { AsyncTypeahead } from "react-bootstrap-typeahead";
|
10992
|
+
import React27, { useState as useState5 } from "react";
|
10993
|
+
import { useLazyQuery as useLazyQuery2 } from "@apollo/client";
|
10994
|
+
function _extends17() {
|
10995
|
+
_extends17 = Object.assign || function(target) {
|
10996
|
+
for (var i = 1; i < arguments.length; i++) {
|
10997
|
+
var source = arguments[i];
|
10998
|
+
for (var key in source) {
|
10999
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
11000
|
+
target[key] = source[key];
|
11001
|
+
}
|
11002
|
+
}
|
11003
|
+
}
|
11004
|
+
return target;
|
11005
|
+
};
|
11006
|
+
return _extends17.apply(this, arguments);
|
11007
|
+
}
|
11008
|
+
__name(_extends17, "_extends");
|
10873
11009
|
var AutocompleteMultiple = /* @__PURE__ */ __name((props) => {
|
10874
11010
|
const {
|
10875
11011
|
queryData,
|
@@ -10883,7 +11019,7 @@ var AutocompleteMultiple = /* @__PURE__ */ __name((props) => {
|
|
10883
11019
|
const { updateCurrentValues } = useFormContext();
|
10884
11020
|
const Components2 = useVulcanComponents();
|
10885
11021
|
const { value: value1, label } = inputProperties;
|
10886
|
-
const [queryString1, setQueryString] =
|
11022
|
+
const [queryString1, setQueryString] = useState5();
|
10887
11023
|
const [loadAutocompleteOptions, { loading, error, data }] = useLazyQuery2(lib_default(autocompleteQuery()), {
|
10888
11024
|
variables: {
|
10889
11025
|
queryString: queryString1
|
@@ -10898,9 +11034,9 @@ var AutocompleteMultiple = /* @__PURE__ */ __name((props) => {
|
|
10898
11034
|
const selectedItems = queryData && optionsFunction({
|
10899
11035
|
data: queryData
|
10900
11036
|
}).filter((d) => value1.includes(d.value));
|
10901
|
-
return /* @__PURE__ */
|
11037
|
+
return /* @__PURE__ */ React27.createElement(Components2.FormItem, _extends17({}, props, itemProperties, {
|
10902
11038
|
name: path
|
10903
|
-
}), /* @__PURE__ */
|
11039
|
+
}), /* @__PURE__ */ React27.createElement(AsyncTypeahead, _extends17({}, inputProperties, {
|
10904
11040
|
multiple: true,
|
10905
11041
|
onChange: (selected) => {
|
10906
11042
|
const selectedIds = selected.map(({ value }) => value);
|
@@ -10980,14 +11116,14 @@ init_esm_shims();
|
|
10980
11116
|
|
10981
11117
|
// components/Datatable/Datatable.tsx
|
10982
11118
|
init_esm_shims();
|
10983
|
-
import
|
11119
|
+
import React28, { useEffect as useEffect6, useState as useState6 } from "react";
|
10984
11120
|
import _isEmpty from "lodash/isEmpty.js";
|
10985
11121
|
import { useMulti } from "@vulcanjs/react-hooks";
|
10986
11122
|
import { isAdmin as isAdmin2 } from "@vulcanjs/permissions";
|
10987
11123
|
import { useIntlContext as useIntlContext5 } from "@vulcanjs/react-i18n";
|
10988
11124
|
import { permissionCheck } from "@vulcanjs/permissions";
|
10989
|
-
function
|
10990
|
-
|
11125
|
+
function _extends18() {
|
11126
|
+
_extends18 = Object.assign || function(target) {
|
10991
11127
|
for (var i = 1; i < arguments.length; i++) {
|
10992
11128
|
var source = arguments[i];
|
10993
11129
|
for (var key in source) {
|
@@ -10998,9 +11134,9 @@ function _extends17() {
|
|
10998
11134
|
}
|
10999
11135
|
return target;
|
11000
11136
|
};
|
11001
|
-
return
|
11137
|
+
return _extends18.apply(this, arguments);
|
11002
11138
|
}
|
11003
|
-
__name(
|
11139
|
+
__name(_extends18, "_extends");
|
11004
11140
|
var ascSortOperator = "asc";
|
11005
11141
|
var descSortOperator = "desc";
|
11006
11142
|
var delay = function() {
|
@@ -11013,7 +11149,7 @@ var delay = function() {
|
|
11013
11149
|
};
|
11014
11150
|
}();
|
11015
11151
|
var Datatable = /* @__PURE__ */ __name((props) => {
|
11016
|
-
const [state, setState] =
|
11152
|
+
const [state, setState] = useState6({});
|
11017
11153
|
const { initialState } = props;
|
11018
11154
|
let initState = {
|
11019
11155
|
searchValue: "",
|
@@ -11058,12 +11194,12 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11058
11194
|
currentSort
|
11059
11195
|
}));
|
11060
11196
|
}, "toggleSort");
|
11061
|
-
const submitFilters = /* @__PURE__ */ __name(({ name, filters }) => {
|
11197
|
+
const submitFilters = /* @__PURE__ */ __name(({ name: name2, filters }) => {
|
11062
11198
|
let newFilters = Object.assign({}, state.currentFilters);
|
11063
11199
|
if (_isEmpty(filters)) {
|
11064
|
-
delete newFilters[
|
11200
|
+
delete newFilters[name2];
|
11065
11201
|
} else {
|
11066
|
-
newFilters[
|
11202
|
+
newFilters[name2] = filters;
|
11067
11203
|
}
|
11068
11204
|
setState((currentState) => __spreadProps(__spreadValues({}, currentState), {
|
11069
11205
|
currentFilters: newFilters
|
@@ -11101,7 +11237,7 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11101
11237
|
}
|
11102
11238
|
}));
|
11103
11239
|
if (data) {
|
11104
|
-
return /* @__PURE__ */
|
11240
|
+
return /* @__PURE__ */ React28.createElement(Components2.DatatableContents, _extends18({}, props, {
|
11105
11241
|
datatableData: data,
|
11106
11242
|
totalCount: data.length,
|
11107
11243
|
results: data,
|
@@ -11132,9 +11268,9 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11132
11268
|
if (!_isEmpty(state.currentFilters)) {
|
11133
11269
|
input.filter = state.currentFilters;
|
11134
11270
|
}
|
11135
|
-
return /* @__PURE__ */
|
11271
|
+
return /* @__PURE__ */ React28.createElement(Components2.DatatableLayout, {
|
11136
11272
|
model
|
11137
|
-
}, /* @__PURE__ */
|
11273
|
+
}, /* @__PURE__ */ React28.createElement(Components2.DatatableAbove, _extends18({}, props, {
|
11138
11274
|
model,
|
11139
11275
|
canInsert: canCreate,
|
11140
11276
|
canCreate,
|
@@ -11142,7 +11278,7 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11142
11278
|
updateSearch,
|
11143
11279
|
selectedItems: state.selectedItems,
|
11144
11280
|
onSubmitSelected
|
11145
|
-
})), /* @__PURE__ */
|
11281
|
+
})), /* @__PURE__ */ React28.createElement(Components2.DatatableContents, _extends18({}, props, {
|
11146
11282
|
results: multiRes.documents,
|
11147
11283
|
totalCount: multiRes.totalCount,
|
11148
11284
|
count: multiRes.count,
|
@@ -11156,20 +11292,20 @@ var Datatable = /* @__PURE__ */ __name((props) => {
|
|
11156
11292
|
toggleItem
|
11157
11293
|
})));
|
11158
11294
|
}, "Datatable");
|
11159
|
-
var DatatableLayout = /* @__PURE__ */ __name(({ model, children }) => /* @__PURE__ */
|
11295
|
+
var DatatableLayout = /* @__PURE__ */ __name(({ model, children }) => /* @__PURE__ */ React28.createElement("div", {
|
11160
11296
|
className: `datatable datatable-${model.name.toLowerCase()}`
|
11161
11297
|
}, children), "DatatableLayout");
|
11162
11298
|
var DatatableAbove = /* @__PURE__ */ __name((props) => {
|
11163
11299
|
const Components2 = useVulcanComponents();
|
11164
|
-
return /* @__PURE__ */
|
11300
|
+
return /* @__PURE__ */ React28.createElement(Components2.DatatableAboveLayout, null, /* @__PURE__ */ React28.createElement(Components2.DatatableAboveLeft, _extends18({}, props)), /* @__PURE__ */ React28.createElement(Components2.DatatableAboveRight, _extends18({}, props)));
|
11165
11301
|
}, "DatatableAbove");
|
11166
11302
|
var DatatableAboveLeft = /* @__PURE__ */ __name((props) => {
|
11167
11303
|
const { showSearch, searchValue, updateSearch } = props;
|
11168
11304
|
const Components2 = useVulcanComponents();
|
11169
11305
|
const intl = useIntlContext5();
|
11170
|
-
return /* @__PURE__ */
|
11306
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
11171
11307
|
className: "datatable-above-left"
|
11172
|
-
}, showSearch && /* @__PURE__ */
|
11308
|
+
}, showSearch && /* @__PURE__ */ React28.createElement(Components2.DatatableAboveSearchInput, {
|
11173
11309
|
className: "datatable-search form-control",
|
11174
11310
|
inputProperties: {
|
11175
11311
|
path: "datatableSearchQuery",
|
@@ -11185,16 +11321,16 @@ var DatatableAboveLeft = /* @__PURE__ */ __name((props) => {
|
|
11185
11321
|
var DatatableAboveRight = /* @__PURE__ */ __name((props) => {
|
11186
11322
|
const { currentUser, showNew, canInsert, options, newFormOptions, newFormProps, showSelect, selectedItems, onSubmitSelected, model } = props;
|
11187
11323
|
const Components2 = useVulcanComponents();
|
11188
|
-
return /* @__PURE__ */
|
11324
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
11189
11325
|
className: "datatable-above-right"
|
11190
|
-
}, showSelect && selectedItems.length > 0 && /* @__PURE__ */
|
11326
|
+
}, showSelect && selectedItems.length > 0 && /* @__PURE__ */ React28.createElement("div", {
|
11191
11327
|
className: "datatable-above-item"
|
11192
|
-
}, /* @__PURE__ */
|
11328
|
+
}, /* @__PURE__ */ React28.createElement(Components2.DatatableSubmitSelected, {
|
11193
11329
|
selectedItems,
|
11194
11330
|
onSubmitSelected
|
11195
|
-
})), showNew && canInsert && /* @__PURE__ */
|
11331
|
+
})), showNew && canInsert && /* @__PURE__ */ React28.createElement("div", {
|
11196
11332
|
className: "datatable-above-item"
|
11197
|
-
}, /* @__PURE__ */
|
11333
|
+
}, /* @__PURE__ */ React28.createElement(Components2.NewButton, _extends18({
|
11198
11334
|
model,
|
11199
11335
|
currentUser,
|
11200
11336
|
mutationFragmentName: options && options.fragmentName
|
@@ -11202,20 +11338,20 @@ var DatatableAboveRight = /* @__PURE__ */ __name((props) => {
|
|
11202
11338
|
}, "DatatableAboveRight");
|
11203
11339
|
var DatatableAboveSearchInput = /* @__PURE__ */ __name((props) => {
|
11204
11340
|
const Components2 = useVulcanComponents();
|
11205
|
-
return /* @__PURE__ */
|
11341
|
+
return /* @__PURE__ */ React28.createElement("div", {
|
11206
11342
|
className: "datatable-above-search-input"
|
11207
|
-
}, /* @__PURE__ */
|
11343
|
+
}, /* @__PURE__ */ React28.createElement(Components2.FormComponentText, _extends18({}, props)));
|
11208
11344
|
}, "DatatableAboveSearchInput");
|
11209
|
-
var DatatableAboveLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11345
|
+
var DatatableAboveLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React28.createElement("div", {
|
11210
11346
|
className: "datatable-above"
|
11211
11347
|
}, children), "DatatableAboveLayout");
|
11212
11348
|
|
11213
11349
|
// components/Datatable/DatatableContents.tsx
|
11214
11350
|
init_esm_shims();
|
11215
|
-
import
|
11351
|
+
import React29 from "react";
|
11216
11352
|
import _sortBy from "lodash/sortBy.js";
|
11217
|
-
function
|
11218
|
-
|
11353
|
+
function _extends19() {
|
11354
|
+
_extends19 = Object.assign || function(target) {
|
11219
11355
|
for (var i = 1; i < arguments.length; i++) {
|
11220
11356
|
var source = arguments[i];
|
11221
11357
|
for (var key in source) {
|
@@ -11226,9 +11362,9 @@ function _extends18() {
|
|
11226
11362
|
}
|
11227
11363
|
return target;
|
11228
11364
|
};
|
11229
|
-
return
|
11365
|
+
return _extends19.apply(this, arguments);
|
11230
11366
|
}
|
11231
|
-
__name(
|
11367
|
+
__name(_extends19, "_extends");
|
11232
11368
|
var wrapColumns = /* @__PURE__ */ __name((c) => ({
|
11233
11369
|
name: c
|
11234
11370
|
}), "wrapColumns");
|
@@ -11250,18 +11386,18 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11250
11386
|
let { title = "", datatableData, results = [], columns, loading, loadMore, count = 0, totalCount = 0, networkStatus, showEdit, showDelete, currentUser, toggleSort, currentSort, submitFilters, currentFilters, modalProps, error, showSelect, model } = props;
|
11251
11387
|
const Components2 = useVulcanComponents();
|
11252
11388
|
if (loading) {
|
11253
|
-
return /* @__PURE__ */
|
11389
|
+
return /* @__PURE__ */ React29.createElement("div", {
|
11254
11390
|
className: "datatable-list datatable-list-loading"
|
11255
|
-
}, /* @__PURE__ */
|
11391
|
+
}, /* @__PURE__ */ React29.createElement(Components2.Loading, null));
|
11256
11392
|
}
|
11257
11393
|
const isLoadingMore = networkStatus === 2;
|
11258
11394
|
const hasMore = results && totalCount > results.length;
|
11259
11395
|
const sortedColumns = getColumns(columns, results, datatableData);
|
11260
|
-
return /* @__PURE__ */
|
11396
|
+
return /* @__PURE__ */ React29.createElement(Components2.DatatableContentsLayout, null, error && /* @__PURE__ */ React29.createElement(Components2.Alert, {
|
11261
11397
|
variant: "danger"
|
11262
|
-
}, error.message), title && /* @__PURE__ */
|
11398
|
+
}, error.message), title && /* @__PURE__ */ React29.createElement(Components2.DatatableTitle, {
|
11263
11399
|
title
|
11264
|
-
}), /* @__PURE__ */
|
11400
|
+
}), /* @__PURE__ */ React29.createElement(Components2.DatatableContentsInnerLayout, null, /* @__PURE__ */ React29.createElement(Components2.DatatableContentsHeadLayout, null, showSelect && /* @__PURE__ */ React29.createElement("th", null), sortedColumns.map((column, index) => /* @__PURE__ */ React29.createElement(Components2.DatatableHeader, {
|
11265
11401
|
key: index,
|
11266
11402
|
model,
|
11267
11403
|
column,
|
@@ -11269,13 +11405,13 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11269
11405
|
currentSort,
|
11270
11406
|
submitFilters,
|
11271
11407
|
currentFilters
|
11272
|
-
})), showEdit ? /* @__PURE__ */
|
11408
|
+
})), showEdit ? /* @__PURE__ */ React29.createElement("th", null, /* @__PURE__ */ React29.createElement(Components2.FormattedMessage, {
|
11273
11409
|
id: "datatable.edit",
|
11274
11410
|
defaultMessage: "Edit"
|
11275
|
-
})) : null, showDelete ? /* @__PURE__ */
|
11411
|
+
})) : null, showDelete ? /* @__PURE__ */ React29.createElement("th", null, /* @__PURE__ */ React29.createElement(Components2.FormattedMessage, {
|
11276
11412
|
id: "datatable.delete",
|
11277
11413
|
defaultMessage: "Delete"
|
11278
|
-
})) : null), /* @__PURE__ */
|
11414
|
+
})) : null), /* @__PURE__ */ React29.createElement(Components2.DatatableContentsBodyLayout, null, results && results.length ? results.map((document, index) => /* @__PURE__ */ React29.createElement(Components2.DatatableRow, _extends19({}, props, {
|
11279
11415
|
model,
|
11280
11416
|
columns: sortedColumns,
|
11281
11417
|
document,
|
@@ -11284,7 +11420,7 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11284
11420
|
showDelete,
|
11285
11421
|
currentUser,
|
11286
11422
|
modalProps
|
11287
|
-
}))) : /* @__PURE__ */
|
11423
|
+
}))) : /* @__PURE__ */ React29.createElement(Components2.DatatableEmpty, null))), hasMore && /* @__PURE__ */ React29.createElement(Components2.DatatableContentsMoreLayout, null, isLoadingMore ? /* @__PURE__ */ React29.createElement(Components2.Loading, null) : /* @__PURE__ */ React29.createElement(Components2.DatatableLoadMoreButton, {
|
11288
11424
|
count,
|
11289
11425
|
totalCount,
|
11290
11426
|
onClick: (e) => {
|
@@ -11293,37 +11429,37 @@ var DatatableContents = /* @__PURE__ */ __name((props) => {
|
|
11293
11429
|
}
|
11294
11430
|
}, "Load More (", count, "/", totalCount, ")")));
|
11295
11431
|
}, "DatatableContents");
|
11296
|
-
var DatatableContentsLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11432
|
+
var DatatableContentsLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React29.createElement("div", {
|
11297
11433
|
className: "datatable-list"
|
11298
11434
|
}, children), "DatatableContentsLayout");
|
11299
|
-
var DatatableContentsInnerLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11435
|
+
var DatatableContentsInnerLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React29.createElement("table", {
|
11300
11436
|
className: "table"
|
11301
11437
|
}, children), "DatatableContentsInnerLayout");
|
11302
|
-
var DatatableContentsHeadLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11303
|
-
var DatatableContentsBodyLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11304
|
-
var DatatableContentsMoreLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */
|
11438
|
+
var DatatableContentsHeadLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React29.createElement("thead", null, /* @__PURE__ */ React29.createElement("tr", null, children)), "DatatableContentsHeadLayout");
|
11439
|
+
var DatatableContentsBodyLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React29.createElement("tbody", null, children), "DatatableContentsBodyLayout");
|
11440
|
+
var DatatableContentsMoreLayout = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React29.createElement("div", {
|
11305
11441
|
className: "datatable-list-load-more"
|
11306
11442
|
}, children), "DatatableContentsMoreLayout");
|
11307
11443
|
var DatatableLoadMoreButton = /* @__PURE__ */ __name((_a) => {
|
11308
11444
|
var _b = _a, { count, totalCount, children } = _b, otherProps = __objRest(_b, ["count", "totalCount", "children"]);
|
11309
11445
|
const Components2 = useVulcanComponents();
|
11310
|
-
return /* @__PURE__ */
|
11446
|
+
return /* @__PURE__ */ React29.createElement(Components2.Button, _extends19({
|
11311
11447
|
variant: "primary"
|
11312
11448
|
}, otherProps), children);
|
11313
11449
|
}, "DatatableLoadMoreButton");
|
11314
|
-
var DatatableTitle = /* @__PURE__ */ __name(({ title }) => /* @__PURE__ */
|
11450
|
+
var DatatableTitle = /* @__PURE__ */ __name(({ title }) => /* @__PURE__ */ React29.createElement("div", {
|
11315
11451
|
className: "datatable-title"
|
11316
11452
|
}, title), "DatatableTitle");
|
11317
11453
|
var DatatableEmpty = /* @__PURE__ */ __name(() => {
|
11318
11454
|
const Components2 = useVulcanComponents();
|
11319
|
-
return /* @__PURE__ */
|
11455
|
+
return /* @__PURE__ */ React29.createElement("tr", null, /* @__PURE__ */ React29.createElement("td", {
|
11320
11456
|
colSpan: 99
|
11321
|
-
}, /* @__PURE__ */
|
11457
|
+
}, /* @__PURE__ */ React29.createElement("div", {
|
11322
11458
|
style: {
|
11323
11459
|
textAlign: "center",
|
11324
11460
|
padding: 10
|
11325
11461
|
}
|
11326
|
-
}, /* @__PURE__ */
|
11462
|
+
}, /* @__PURE__ */ React29.createElement(Components2.FormattedMessage, {
|
11327
11463
|
id: "datatable.empty",
|
11328
11464
|
defaultMessage: "No items to display."
|
11329
11465
|
}))));
|
@@ -11331,11 +11467,11 @@ var DatatableEmpty = /* @__PURE__ */ __name(() => {
|
|
11331
11467
|
|
11332
11468
|
// components/Datatable/DatatableHeader.tsx
|
11333
11469
|
init_esm_shims();
|
11334
|
-
import
|
11470
|
+
import React30 from "react";
|
11335
11471
|
import { useIntlContext as useIntlContext6 } from "@vulcanjs/react-i18n";
|
11336
11472
|
import { formatLabel as formatLabel2 } from "@vulcanjs/i18n";
|
11337
|
-
function
|
11338
|
-
|
11473
|
+
function _extends20() {
|
11474
|
+
_extends20 = Object.assign || function(target) {
|
11339
11475
|
for (var i = 1; i < arguments.length; i++) {
|
11340
11476
|
var source = arguments[i];
|
11341
11477
|
for (var key in source) {
|
@@ -11346,9 +11482,9 @@ function _extends19() {
|
|
11346
11482
|
}
|
11347
11483
|
return target;
|
11348
11484
|
};
|
11349
|
-
return
|
11485
|
+
return _extends20.apply(this, arguments);
|
11350
11486
|
}
|
11351
|
-
__name(
|
11487
|
+
__name(_extends20, "_extends");
|
11352
11488
|
var DatatableHeader = /* @__PURE__ */ __name(({ model, column, toggleSort, currentSort, submitFilters, currentFilters }) => {
|
11353
11489
|
const Components2 = useVulcanComponents();
|
11354
11490
|
const intl = useIntlContext6();
|
@@ -11369,16 +11505,16 @@ var DatatableHeader = /* @__PURE__ */ __name(({ model, column, toggleSort, curre
|
|
11369
11505
|
const fieldOptions = field && field.options;
|
11370
11506
|
const filterOptions = column.options ? column.options : fieldOptions;
|
11371
11507
|
const filterQuery = field && field.staticQuery;
|
11372
|
-
return /* @__PURE__ */
|
11508
|
+
return /* @__PURE__ */ React30.createElement(Components2.DatatableHeaderCellLayout, {
|
11373
11509
|
className: `datatable-header-${column.name}`
|
11374
|
-
}, /* @__PURE__ */
|
11510
|
+
}, /* @__PURE__ */ React30.createElement("span", {
|
11375
11511
|
className: "datatable-header-cell-label"
|
11376
|
-
}, formattedLabel), column.sortable && /* @__PURE__ */
|
11512
|
+
}, formattedLabel), column.sortable && /* @__PURE__ */ React30.createElement(Components2.DatatableSorter, {
|
11377
11513
|
name: column.name,
|
11378
11514
|
label: formattedLabel,
|
11379
11515
|
toggleSort,
|
11380
11516
|
currentSort
|
11381
|
-
}), column.filterable && /* @__PURE__ */
|
11517
|
+
}), column.filterable && /* @__PURE__ */ React30.createElement(Components2.DatatableFilter, {
|
11382
11518
|
model,
|
11383
11519
|
field,
|
11384
11520
|
name: column.name,
|
@@ -11394,25 +11530,25 @@ var DatatableHeader = /* @__PURE__ */ __name(({ model, column, toggleSort, curre
|
|
11394
11530
|
id: column.name,
|
11395
11531
|
defaultMessage: column.name
|
11396
11532
|
});
|
11397
|
-
return /* @__PURE__ */
|
11533
|
+
return /* @__PURE__ */ React30.createElement(Components2.DatatableHeaderCellLayout, {
|
11398
11534
|
className: `datatable-th-${formattedLabel2.toLowerCase().replace(/\s/g, "-")}`
|
11399
11535
|
}, formattedLabel2);
|
11400
11536
|
}
|
11401
11537
|
}, "DatatableHeader");
|
11402
11538
|
var DatatableHeaderCellLayout = /* @__PURE__ */ __name((_a) => {
|
11403
11539
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
11404
|
-
return /* @__PURE__ */
|
11540
|
+
return /* @__PURE__ */ React30.createElement("th", _extends20({}, otherProps), /* @__PURE__ */ React30.createElement("div", {
|
11405
11541
|
className: "datatable-header-cell-inner"
|
11406
11542
|
}, children));
|
11407
11543
|
}, "DatatableHeaderCellLayout");
|
11408
11544
|
|
11409
11545
|
// components/Datatable/DatatableRow.tsx
|
11410
11546
|
init_esm_shims();
|
11411
|
-
import
|
11547
|
+
import React31 from "react";
|
11412
11548
|
import _isFunction from "lodash/isFunction.js";
|
11413
11549
|
import { isAdmin as isAdmin3, permissionCheck as permissionCheck2 } from "@vulcanjs/permissions";
|
11414
|
-
function
|
11415
|
-
|
11550
|
+
function _extends21() {
|
11551
|
+
_extends21 = Object.assign || function(target) {
|
11416
11552
|
for (var i = 1; i < arguments.length; i++) {
|
11417
11553
|
var source = arguments[i];
|
11418
11554
|
for (var key in source) {
|
@@ -11423,9 +11559,9 @@ function _extends20() {
|
|
11423
11559
|
}
|
11424
11560
|
return target;
|
11425
11561
|
};
|
11426
|
-
return
|
11562
|
+
return _extends21.apply(this, arguments);
|
11427
11563
|
}
|
11428
|
-
__name(
|
11564
|
+
__name(_extends21, "_extends");
|
11429
11565
|
var DatatableRow = /* @__PURE__ */ __name((props) => {
|
11430
11566
|
const { model, columns, document, showEdit, showDelete, currentUser, options, editFormOptions, editFormProps, rowClass, showSelect, toggleItem, selectedItems } = props;
|
11431
11567
|
const Components2 = useVulcanComponents();
|
@@ -11444,33 +11580,33 @@ var DatatableRow = /* @__PURE__ */ __name((props) => {
|
|
11444
11580
|
const row = typeof rowClass === "function" ? rowClass(document) : rowClass || "";
|
11445
11581
|
const { modalProps = {} } = props;
|
11446
11582
|
const defaultModalProps = {
|
11447
|
-
title: /* @__PURE__ */
|
11583
|
+
title: /* @__PURE__ */ React31.createElement("code", null, document._id)
|
11448
11584
|
};
|
11449
11585
|
const customModalProps = __spreadValues(__spreadValues({}, defaultModalProps), _isFunction(modalProps) ? modalProps(document) : modalProps);
|
11450
11586
|
const isSelected = selectedItems && selectedItems.includes(document._id);
|
11451
|
-
return /* @__PURE__ */
|
11587
|
+
return /* @__PURE__ */ React31.createElement(Components2.DatatableRowLayout, {
|
11452
11588
|
className: `datatable-item ${row} ${isSelected ? "datatable-item-selected" : ""}`
|
11453
|
-
}, showSelect && /* @__PURE__ */
|
11589
|
+
}, showSelect && /* @__PURE__ */ React31.createElement(Components2.DatatableSelect, {
|
11454
11590
|
document,
|
11455
11591
|
toggleItem,
|
11456
11592
|
selectedItems
|
11457
|
-
}), columns.map((column, index) => /* @__PURE__ */
|
11593
|
+
}), columns.map((column, index) => /* @__PURE__ */ React31.createElement(Components2.DatatableCell, {
|
11458
11594
|
key: index,
|
11459
11595
|
column,
|
11460
11596
|
document,
|
11461
11597
|
currentUser,
|
11462
11598
|
model
|
11463
|
-
})), showEdit && canUpdate ? /* @__PURE__ */
|
11599
|
+
})), showEdit && canUpdate ? /* @__PURE__ */ React31.createElement(Components2.DatatableCellLayout, {
|
11464
11600
|
className: "datatable-edit"
|
11465
|
-
}, /* @__PURE__ */
|
11601
|
+
}, /* @__PURE__ */ React31.createElement(Components2.EditButton, _extends21({
|
11466
11602
|
model,
|
11467
11603
|
documentId: document._id,
|
11468
11604
|
currentUser,
|
11469
11605
|
mutationFragmentName: options && options.fragmentName,
|
11470
11606
|
modalProps: customModalProps
|
11471
|
-
}, editFormOptions, editFormProps))) : null, showDelete && canUpdate ? /* @__PURE__ */
|
11607
|
+
}, editFormOptions, editFormProps))) : null, showDelete && canUpdate ? /* @__PURE__ */ React31.createElement(Components2.DatatableCellLayout, {
|
11472
11608
|
className: "datatable-delete"
|
11473
|
-
}, /* @__PURE__ */
|
11609
|
+
}, /* @__PURE__ */ React31.createElement(Components2.DeleteButton, {
|
11474
11610
|
model,
|
11475
11611
|
documentId: document._id,
|
11476
11612
|
currentUser
|
@@ -11478,14 +11614,14 @@ var DatatableRow = /* @__PURE__ */ __name((props) => {
|
|
11478
11614
|
}, "DatatableRow");
|
11479
11615
|
var DatatableRowLayout = /* @__PURE__ */ __name((_a) => {
|
11480
11616
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
11481
|
-
return /* @__PURE__ */
|
11617
|
+
return /* @__PURE__ */ React31.createElement("tr", _extends21({}, otherProps), children);
|
11482
11618
|
}, "DatatableRowLayout");
|
11483
11619
|
|
11484
11620
|
// components/Datatable/DatatableCell.tsx
|
11485
11621
|
init_esm_shims();
|
11486
|
-
import
|
11487
|
-
function
|
11488
|
-
|
11622
|
+
import React32 from "react";
|
11623
|
+
function _extends22() {
|
11624
|
+
_extends22 = Object.assign || function(target) {
|
11489
11625
|
for (var i = 1; i < arguments.length; i++) {
|
11490
11626
|
var source = arguments[i];
|
11491
11627
|
for (var key in source) {
|
@@ -11496,18 +11632,18 @@ function _extends21() {
|
|
11496
11632
|
}
|
11497
11633
|
return target;
|
11498
11634
|
};
|
11499
|
-
return
|
11635
|
+
return _extends22.apply(this, arguments);
|
11500
11636
|
}
|
11501
|
-
__name(
|
11637
|
+
__name(_extends22, "_extends");
|
11502
11638
|
var DatatableCell = /* @__PURE__ */ __name(({ column, document, currentUser, model }) => {
|
11503
11639
|
const Components2 = useVulcanComponents();
|
11504
11640
|
const Component = column.component || column.componentName && Components2[column.componentName] || Components2.DatatableDefaultCell;
|
11505
11641
|
const columnName = column.label || column.name;
|
11506
11642
|
if (!columnName)
|
11507
11643
|
throw new Error("Column should have name or label");
|
11508
|
-
return /* @__PURE__ */
|
11644
|
+
return /* @__PURE__ */ React32.createElement(Components2.DatatableCellLayout, {
|
11509
11645
|
className: `datatable-item-${columnName.toLowerCase().replace(/\s/g, "-")}`
|
11510
|
-
}, /* @__PURE__ */
|
11646
|
+
}, /* @__PURE__ */ React32.createElement(Component, {
|
11511
11647
|
column,
|
11512
11648
|
document,
|
11513
11649
|
currentUser,
|
@@ -11516,14 +11652,14 @@ var DatatableCell = /* @__PURE__ */ __name(({ column, document, currentUser, mod
|
|
11516
11652
|
}, "DatatableCell");
|
11517
11653
|
var DatatableCellLayout = /* @__PURE__ */ __name((_a) => {
|
11518
11654
|
var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
|
11519
|
-
return /* @__PURE__ */
|
11655
|
+
return /* @__PURE__ */ React32.createElement("td", _extends22({}, otherProps), /* @__PURE__ */ React32.createElement("div", {
|
11520
11656
|
className: "cell-contents"
|
11521
11657
|
}, children));
|
11522
11658
|
}, "DatatableCellLayout");
|
11523
11659
|
var DatatableDefaultCell = /* @__PURE__ */ __name((_a) => {
|
11524
11660
|
var _b = _a, { column, document } = _b, rest = __objRest(_b, ["column", "document"]);
|
11525
11661
|
const Components2 = useVulcanComponents();
|
11526
|
-
return /* @__PURE__ */
|
11662
|
+
return /* @__PURE__ */ React32.createElement(Components2.CardItemSwitcher, _extends22({
|
11527
11663
|
value: document[column.name],
|
11528
11664
|
document,
|
11529
11665
|
fieldName: column.name
|
@@ -11533,11 +11669,11 @@ var DatatableDefaultCell = /* @__PURE__ */ __name((_a) => {
|
|
11533
11669
|
// components/Datatable/DatatableFilter.tsx
|
11534
11670
|
init_esm_shims();
|
11535
11671
|
var import_moment = __toESM(require_moment(), 1);
|
11536
|
-
import
|
11672
|
+
import React33, { useState as useState7 } from "react";
|
11537
11673
|
import { useQuery } from "@apollo/client";
|
11538
|
-
import
|
11539
|
-
function
|
11540
|
-
|
11674
|
+
import isEmpty4 from "lodash/isEmpty.js";
|
11675
|
+
function _extends23() {
|
11676
|
+
_extends23 = Object.assign || function(target) {
|
11541
11677
|
for (var i = 1; i < arguments.length; i++) {
|
11542
11678
|
var source = arguments[i];
|
11543
11679
|
for (var key in source) {
|
@@ -11548,9 +11684,9 @@ function _extends22() {
|
|
11548
11684
|
}
|
11549
11685
|
return target;
|
11550
11686
|
};
|
11551
|
-
return
|
11687
|
+
return _extends23.apply(this, arguments);
|
11552
11688
|
}
|
11553
|
-
__name(
|
11689
|
+
__name(_extends23, "_extends");
|
11554
11690
|
var getCount = /* @__PURE__ */ __name((columnFilters) => {
|
11555
11691
|
if (!columnFilters) {
|
11556
11692
|
return 0;
|
@@ -11565,16 +11701,16 @@ var getCount = /* @__PURE__ */ __name((columnFilters) => {
|
|
11565
11701
|
}
|
11566
11702
|
return 0;
|
11567
11703
|
}, "getCount");
|
11568
|
-
var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */
|
11704
|
+
var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */ React33.createElement("svg", {
|
11569
11705
|
width: "16",
|
11570
11706
|
height: "16",
|
11571
11707
|
xmlns: "http://www.w3.org/2000/svg",
|
11572
11708
|
viewBox: "0 0 448 512"
|
11573
|
-
}, /* @__PURE__ */
|
11709
|
+
}, /* @__PURE__ */ React33.createElement("path", {
|
11574
11710
|
fill: "#000",
|
11575
11711
|
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",
|
11576
11712
|
fillOpacity: count ? 0.8 : 0.3
|
11577
|
-
}), count ? /* @__PURE__ */
|
11713
|
+
}), count ? /* @__PURE__ */ React33.createElement("text", {
|
11578
11714
|
x: "50%",
|
11579
11715
|
y: "55%",
|
11580
11716
|
fill: "#000",
|
@@ -11582,7 +11718,7 @@ var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */ React32.creat
|
|
11582
11718
|
textAnchor: "middle",
|
11583
11719
|
alignmentBaseline: "middle",
|
11584
11720
|
fillOpacity: 0.8
|
11585
|
-
}, count) : /* @__PURE__ */
|
11721
|
+
}, count) : /* @__PURE__ */ React33.createElement("path", {
|
11586
11722
|
fill: "#000",
|
11587
11723
|
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",
|
11588
11724
|
fillOpacity: 0.3
|
@@ -11590,10 +11726,10 @@ var Filter = /* @__PURE__ */ __name(({ count }) => /* @__PURE__ */ React32.creat
|
|
11590
11726
|
var DatatableFilter = /* @__PURE__ */ __name((props) => {
|
11591
11727
|
const Components2 = useVulcanComponents();
|
11592
11728
|
const { columnFilters, label, query } = props;
|
11593
|
-
return /* @__PURE__ */
|
11729
|
+
return /* @__PURE__ */ React33.createElement("span", {
|
11594
11730
|
className: "datatable-filter"
|
11595
|
-
}, /* @__PURE__ */
|
11596
|
-
title: /* @__PURE__ */
|
11731
|
+
}, /* @__PURE__ */ React33.createElement(Components2.ModalTrigger, {
|
11732
|
+
title: /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11597
11733
|
id: "datatable.filter_column",
|
11598
11734
|
values: {
|
11599
11735
|
label
|
@@ -11601,10 +11737,10 @@ var DatatableFilter = /* @__PURE__ */ __name((props) => {
|
|
11601
11737
|
defaultMessage: `Filter \u201C${label}\u201D`
|
11602
11738
|
}),
|
11603
11739
|
size: "small",
|
11604
|
-
trigger: /* @__PURE__ */
|
11740
|
+
trigger: /* @__PURE__ */ React33.createElement(Filter, {
|
11605
11741
|
count: getCount(columnFilters)
|
11606
11742
|
})
|
11607
|
-
}, query ? /* @__PURE__ */
|
11743
|
+
}, query ? /* @__PURE__ */ React33.createElement(Components2.DatatableFilterContentsWithData, _extends23({}, props)) : /* @__PURE__ */ React33.createElement(Components2.DatatableFilterContents, _extends23({}, props))));
|
11608
11744
|
}, "DatatableFilter");
|
11609
11745
|
var DatatableFilterContentsWithData = /* @__PURE__ */ __name((props) => {
|
11610
11746
|
const Components2 = useVulcanComponents();
|
@@ -11615,23 +11751,23 @@ var DatatableFilterContentsWithData = /* @__PURE__ */ __name((props) => {
|
|
11615
11751
|
const filterQuery = queryGql;
|
11616
11752
|
const { loading, error, data } = useQuery(filterQuery);
|
11617
11753
|
if (loading) {
|
11618
|
-
return /* @__PURE__ */
|
11754
|
+
return /* @__PURE__ */ React33.createElement(Components2.Loading, null);
|
11619
11755
|
} else if (error) {
|
11620
|
-
return /* @__PURE__ */
|
11756
|
+
return /* @__PURE__ */ React33.createElement("p", null, "error");
|
11621
11757
|
} else {
|
11622
11758
|
const queryOptions = options({
|
11623
11759
|
data
|
11624
11760
|
});
|
11625
|
-
return /* @__PURE__ */
|
11761
|
+
return /* @__PURE__ */ React33.createElement(Components2.DatatableFilterContents, _extends23({}, props, {
|
11626
11762
|
options: queryOptions
|
11627
11763
|
}));
|
11628
11764
|
}
|
11629
11765
|
}, "DatatableFilterContentsWithData");
|
11630
11766
|
var DatatableFilterContents = /* @__PURE__ */ __name((props) => {
|
11631
|
-
const { name, field, options, columnFilters, submitFilters, filterComponent } = props;
|
11767
|
+
const { name: name2, field, options, columnFilters, submitFilters, filterComponent } = props;
|
11632
11768
|
const Components2 = useVulcanComponents();
|
11633
11769
|
const fieldType = getFieldType(field);
|
11634
|
-
const [filters, setFilters] =
|
11770
|
+
const [filters, setFilters] = useState7(columnFilters);
|
11635
11771
|
const filterProps = __spreadProps(__spreadValues({}, props), {
|
11636
11772
|
filters,
|
11637
11773
|
setFilters
|
@@ -11639,28 +11775,28 @@ var DatatableFilterContents = /* @__PURE__ */ __name((props) => {
|
|
11639
11775
|
let contents;
|
11640
11776
|
if (filterComponent) {
|
11641
11777
|
const CustomFilter = filterComponent;
|
11642
|
-
contents = /* @__PURE__ */
|
11778
|
+
contents = /* @__PURE__ */ React33.createElement(CustomFilter, _extends23({}, filterProps));
|
11643
11779
|
} else if (options) {
|
11644
|
-
contents = /* @__PURE__ */
|
11780
|
+
contents = /* @__PURE__ */ React33.createElement(Components2.DatatableFilterCheckboxes, _extends23({}, filterProps));
|
11645
11781
|
} else {
|
11646
11782
|
switch (fieldType) {
|
11647
11783
|
case Date:
|
11648
|
-
contents = /* @__PURE__ */
|
11784
|
+
contents = /* @__PURE__ */ React33.createElement(Components2.DatatableFilterDates, _extends23({}, filterProps));
|
11649
11785
|
break;
|
11650
11786
|
case Number:
|
11651
|
-
contents = /* @__PURE__ */
|
11787
|
+
contents = /* @__PURE__ */ React33.createElement(Components2.DatatableFilterNumbers, _extends23({}, filterProps));
|
11652
11788
|
break;
|
11653
11789
|
case Boolean:
|
11654
|
-
contents = /* @__PURE__ */
|
11790
|
+
contents = /* @__PURE__ */ React33.createElement(Components2.DatatableFilterBooleans, _extends23({}, filterProps));
|
11655
11791
|
break;
|
11656
11792
|
default:
|
11657
|
-
contents = /* @__PURE__ */
|
11793
|
+
contents = /* @__PURE__ */ React33.createElement("p", null, /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11658
11794
|
id: "datatable.specify_option",
|
11659
11795
|
defaultMessage: "Please specify an options property on your schema field."
|
11660
11796
|
}));
|
11661
11797
|
}
|
11662
11798
|
}
|
11663
|
-
return /* @__PURE__ */
|
11799
|
+
return /* @__PURE__ */ React33.createElement("form", null, contents, /* @__PURE__ */ React33.createElement(Components2.Button, {
|
11664
11800
|
variant: "link",
|
11665
11801
|
style: {
|
11666
11802
|
display: "inline-block",
|
@@ -11670,19 +11806,19 @@ var DatatableFilterContents = /* @__PURE__ */ __name((props) => {
|
|
11670
11806
|
onClick: () => {
|
11671
11807
|
setFilters(void 0);
|
11672
11808
|
}
|
11673
|
-
}, /* @__PURE__ */
|
11809
|
+
}, /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11674
11810
|
id: "datatable.clear_all",
|
11675
11811
|
defaultMessage: "Clear All"
|
11676
|
-
})), /* @__PURE__ */
|
11812
|
+
})), /* @__PURE__ */ React33.createElement(Components2.Button, {
|
11677
11813
|
type: "submit",
|
11678
11814
|
className: "datatable_filter_submit",
|
11679
11815
|
onClick: () => {
|
11680
11816
|
submitFilters({
|
11681
|
-
name,
|
11817
|
+
name: name2,
|
11682
11818
|
filters
|
11683
11819
|
});
|
11684
11820
|
}
|
11685
|
-
}, /* @__PURE__ */
|
11821
|
+
}, /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11686
11822
|
id: "datatable.submit",
|
11687
11823
|
defaultMessage: "Submit"
|
11688
11824
|
})));
|
@@ -11692,7 +11828,7 @@ var DatatableFilterCheckboxes = /* @__PURE__ */ __name(({ options, filters = {
|
|
11692
11828
|
_in: []
|
11693
11829
|
}, setFilters }) => {
|
11694
11830
|
const Components2 = useVulcanComponents();
|
11695
|
-
return /* @__PURE__ */
|
11831
|
+
return /* @__PURE__ */ React33.createElement(Components2.FormComponentCheckboxGroup, {
|
11696
11832
|
path: "filter",
|
11697
11833
|
itemProperties: {
|
11698
11834
|
layout: "inputOnly"
|
@@ -11702,7 +11838,7 @@ var DatatableFilterCheckboxes = /* @__PURE__ */ __name(({ options, filters = {
|
|
11702
11838
|
},
|
11703
11839
|
value: filters[checkboxOperator],
|
11704
11840
|
updateCurrentValues: ({ filter: newValues }) => {
|
11705
|
-
if (
|
11841
|
+
if (isEmpty4(newValues)) {
|
11706
11842
|
setFilters(void 0);
|
11707
11843
|
} else {
|
11708
11844
|
setFilters({
|
@@ -11726,7 +11862,7 @@ var DatatableFilterBooleans = /* @__PURE__ */ __name(({ filters = {
|
|
11726
11862
|
_eq: []
|
11727
11863
|
}, setFilters }) => {
|
11728
11864
|
const Components2 = useVulcanComponents();
|
11729
|
-
return /* @__PURE__ */
|
11865
|
+
return /* @__PURE__ */ React33.createElement(Components2.FormComponentRadioGroup, {
|
11730
11866
|
path: "filter",
|
11731
11867
|
itemProperties: {
|
11732
11868
|
layout: "inputOnly"
|
@@ -11745,10 +11881,10 @@ var DatatableFilterBooleans = /* @__PURE__ */ __name(({ filters = {
|
|
11745
11881
|
}, "DatatableFilterBooleans");
|
11746
11882
|
var DatatableFilterDates = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
11747
11883
|
const Components2 = useVulcanComponents();
|
11748
|
-
return /* @__PURE__ */
|
11884
|
+
return /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement(Components2.FormComponentDate, {
|
11749
11885
|
path: "_gte",
|
11750
11886
|
itemProperties: {
|
11751
|
-
label: /* @__PURE__ */
|
11887
|
+
label: /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11752
11888
|
id: "datatable.after",
|
11753
11889
|
defaultMessage: "After"
|
11754
11890
|
}),
|
@@ -11767,10 +11903,10 @@ var DatatableFilterDates = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
|
11767
11903
|
}));
|
11768
11904
|
}
|
11769
11905
|
}
|
11770
|
-
}), /* @__PURE__ */
|
11906
|
+
}), /* @__PURE__ */ React33.createElement(Components2.FormComponentDate, {
|
11771
11907
|
path: "_lte",
|
11772
11908
|
itemProperties: {
|
11773
|
-
label: /* @__PURE__ */
|
11909
|
+
label: /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11774
11910
|
id: "datatable.before",
|
11775
11911
|
defaultMessage: "Before"
|
11776
11912
|
}),
|
@@ -11793,10 +11929,10 @@ var DatatableFilterDates = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
|
11793
11929
|
}, "DatatableFilterDates");
|
11794
11930
|
var DatatableFilterNumbers = /* @__PURE__ */ __name(({ filters, setFilters }) => {
|
11795
11931
|
const Components2 = useVulcanComponents();
|
11796
|
-
return /* @__PURE__ */
|
11932
|
+
return /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement(Components2.FormComponentNumber, {
|
11797
11933
|
path: "_gte",
|
11798
11934
|
itemProperties: {
|
11799
|
-
label: /* @__PURE__ */
|
11935
|
+
label: /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11800
11936
|
id: "datatable.greater_than",
|
11801
11937
|
defaultMessage: "Greater than"
|
11802
11938
|
}),
|
@@ -11817,10 +11953,10 @@ var DatatableFilterNumbers = /* @__PURE__ */ __name(({ filters, setFilters }) =>
|
|
11817
11953
|
},
|
11818
11954
|
value: filters && parseFloat(filters._gte)
|
11819
11955
|
}
|
11820
|
-
}), /* @__PURE__ */
|
11956
|
+
}), /* @__PURE__ */ React33.createElement(Components2.FormComponentNumber, {
|
11821
11957
|
path: "_lte",
|
11822
11958
|
itemProperties: {
|
11823
|
-
label: /* @__PURE__ */
|
11959
|
+
label: /* @__PURE__ */ React33.createElement(Components2.FormattedMessage, {
|
11824
11960
|
id: "datatable.lower_than",
|
11825
11961
|
defaultMessage: "Lower than"
|
11826
11962
|
}),
|
@@ -11846,63 +11982,63 @@ var DatatableFilterNumbers = /* @__PURE__ */ __name(({ filters, setFilters }) =>
|
|
11846
11982
|
|
11847
11983
|
// components/Datatable/DatatableSorter.tsx
|
11848
11984
|
init_esm_shims();
|
11849
|
-
import
|
11850
|
-
var SortNone = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
11985
|
+
import React34 from "react";
|
11986
|
+
var SortNone = /* @__PURE__ */ __name(() => /* @__PURE__ */ React34.createElement("svg", {
|
11851
11987
|
width: "16",
|
11852
11988
|
height: "16",
|
11853
11989
|
viewBox: "0 0 438 438",
|
11854
11990
|
fill: "none",
|
11855
11991
|
xmlns: "http://www.w3.org/2000/svg"
|
11856
|
-
}, /* @__PURE__ */
|
11992
|
+
}, /* @__PURE__ */ React34.createElement("path", {
|
11857
11993
|
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",
|
11858
11994
|
transform: "translate(66 6)",
|
11859
11995
|
fill: "#000",
|
11860
11996
|
fillOpacity: "0.2"
|
11861
11997
|
})), "SortNone");
|
11862
|
-
var SortDesc = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
11998
|
+
var SortDesc = /* @__PURE__ */ __name(() => /* @__PURE__ */ React34.createElement("svg", {
|
11863
11999
|
width: "16",
|
11864
12000
|
height: "16",
|
11865
12001
|
viewBox: "0 0 438 438",
|
11866
12002
|
fill: "none",
|
11867
12003
|
xmlns: "http://www.w3.org/2000/svg"
|
11868
|
-
}, /* @__PURE__ */
|
12004
|
+
}, /* @__PURE__ */ React34.createElement("path", {
|
11869
12005
|
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",
|
11870
12006
|
transform: "translate(66 253.243)",
|
11871
12007
|
fill: "black",
|
11872
12008
|
fillOpacity: "0.7"
|
11873
|
-
}), /* @__PURE__ */
|
12009
|
+
}), /* @__PURE__ */ React34.createElement("path", {
|
11874
12010
|
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",
|
11875
12011
|
transform: "translate(66 6)",
|
11876
12012
|
fill: "black",
|
11877
12013
|
fillOpacity: "0.2"
|
11878
12014
|
})), "SortDesc");
|
11879
|
-
var SortAsc = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
12015
|
+
var SortAsc = /* @__PURE__ */ __name(() => /* @__PURE__ */ React34.createElement("svg", {
|
11880
12016
|
width: "16",
|
11881
12017
|
height: "16",
|
11882
12018
|
viewBox: "0 0 438 438",
|
11883
12019
|
fill: "none",
|
11884
12020
|
xmlns: "http://www.w3.org/2000/svg"
|
11885
|
-
}, /* @__PURE__ */
|
12021
|
+
}, /* @__PURE__ */ React34.createElement("path", {
|
11886
12022
|
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",
|
11887
12023
|
transform: "translate(66 6)",
|
11888
12024
|
fill: "black",
|
11889
12025
|
fillOpacity: "0.7"
|
11890
|
-
}), /* @__PURE__ */
|
12026
|
+
}), /* @__PURE__ */ React34.createElement("path", {
|
11891
12027
|
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",
|
11892
12028
|
transform: "translate(66 253.243)",
|
11893
12029
|
fill: "black",
|
11894
12030
|
fillOpacity: "0.2"
|
11895
12031
|
})), "SortAsc");
|
11896
|
-
var DatatableSorter = /* @__PURE__ */ __name(({ name, label, toggleSort, currentSort }) => /* @__PURE__ */
|
12032
|
+
var DatatableSorter = /* @__PURE__ */ __name(({ name: name2, label, toggleSort, currentSort }) => /* @__PURE__ */ React34.createElement("span", {
|
11897
12033
|
className: "datatable-sorter",
|
11898
12034
|
onClick: () => {
|
11899
|
-
toggleSort(
|
12035
|
+
toggleSort(name2);
|
11900
12036
|
}
|
11901
|
-
}, !currentSort[
|
12037
|
+
}, !currentSort[name2] ? /* @__PURE__ */ React34.createElement(SortNone, null) : currentSort[name2] === "asc" ? /* @__PURE__ */ React34.createElement(SortAsc, null) : /* @__PURE__ */ React34.createElement(SortDesc, null)), "DatatableSorter");
|
11902
12038
|
|
11903
12039
|
// components/Datatable/DatatableSelect.tsx
|
11904
12040
|
init_esm_shims();
|
11905
|
-
import
|
12041
|
+
import React35 from "react";
|
11906
12042
|
var DatatableSelect = /* @__PURE__ */ __name(({ toggleItem, selectedItems, document }) => {
|
11907
12043
|
const value = selectedItems.includes(document._id || "");
|
11908
12044
|
const onChange = /* @__PURE__ */ __name((e) => {
|
@@ -11911,9 +12047,9 @@ var DatatableSelect = /* @__PURE__ */ __name(({ toggleItem, selectedItems, docum
|
|
11911
12047
|
toggleItem(document._id);
|
11912
12048
|
}, "onChange");
|
11913
12049
|
const Components2 = useVulcanComponents();
|
11914
|
-
return /* @__PURE__ */
|
12050
|
+
return /* @__PURE__ */ React35.createElement(Components2.DatatableCellLayout, {
|
11915
12051
|
className: "datatable-check"
|
11916
|
-
}, /* @__PURE__ */
|
12052
|
+
}, /* @__PURE__ */ React35.createElement(Components2.FormComponentCheckbox, {
|
11917
12053
|
inputProperties: {
|
11918
12054
|
value,
|
11919
12055
|
onChange
|
@@ -11926,16 +12062,16 @@ var DatatableSelect = /* @__PURE__ */ __name(({ toggleItem, selectedItems, docum
|
|
11926
12062
|
|
11927
12063
|
// components/Datatable/DatatableSubmitSelected.tsx
|
11928
12064
|
init_esm_shims();
|
11929
|
-
import
|
12065
|
+
import React36 from "react";
|
11930
12066
|
var DatatableSubmitSelected = /* @__PURE__ */ __name(({ selectedItems, onSubmitSelected }) => {
|
11931
12067
|
const Components2 = useVulcanComponents();
|
11932
|
-
return /* @__PURE__ */
|
12068
|
+
return /* @__PURE__ */ React36.createElement(Components2.Button, {
|
11933
12069
|
className: "datatable-submit-selected",
|
11934
12070
|
onClick: (e) => {
|
11935
12071
|
e.preventDefault();
|
11936
12072
|
onSubmitSelected(selectedItems);
|
11937
12073
|
}
|
11938
|
-
}, /* @__PURE__ */
|
12074
|
+
}, /* @__PURE__ */ React36.createElement(Components2.FormattedMessage, {
|
11939
12075
|
id: "datatable.submit"
|
11940
12076
|
}));
|
11941
12077
|
}, "DatatableSubmitSelected");
|
@@ -11943,9 +12079,9 @@ var DatatableSubmitSelected = /* @__PURE__ */ __name(({ selectedItems, onSubmitS
|
|
11943
12079
|
// components/Datatable/others/EditButton.tsx
|
11944
12080
|
init_esm_shims();
|
11945
12081
|
import { useIntlContext as useIntlContext7 } from "@vulcanjs/react-i18n";
|
11946
|
-
import
|
11947
|
-
function
|
11948
|
-
|
12082
|
+
import React37 from "react";
|
12083
|
+
function _extends24() {
|
12084
|
+
_extends24 = Object.assign || function(target) {
|
11949
12085
|
for (var i = 1; i < arguments.length; i++) {
|
11950
12086
|
var source = arguments[i];
|
11951
12087
|
for (var key in source) {
|
@@ -11956,27 +12092,27 @@ function _extends23() {
|
|
11956
12092
|
}
|
11957
12093
|
return target;
|
11958
12094
|
};
|
11959
|
-
return
|
12095
|
+
return _extends24.apply(this, arguments);
|
11960
12096
|
}
|
11961
|
-
__name(
|
12097
|
+
__name(_extends24, "_extends");
|
11962
12098
|
var EditButton = /* @__PURE__ */ __name((_a) => {
|
11963
12099
|
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"]);
|
11964
12100
|
const Components2 = useVulcanComponents();
|
11965
12101
|
const intl = useIntlContext7();
|
11966
|
-
return /* @__PURE__ */
|
12102
|
+
return /* @__PURE__ */ React37.createElement(Components2.ModalTrigger, {
|
11967
12103
|
label: label || intl.formatMessage({
|
11968
12104
|
id: "datatable.edit",
|
11969
12105
|
defaultMessage: "Edit"
|
11970
12106
|
}),
|
11971
|
-
component: component ? component : /* @__PURE__ */
|
12107
|
+
component: component ? component : /* @__PURE__ */ React37.createElement(Components2.Button, {
|
11972
12108
|
size: size2,
|
11973
12109
|
variant: variant || style
|
11974
|
-
}, label || /* @__PURE__ */
|
12110
|
+
}, label || /* @__PURE__ */ React37.createElement(Components2.FormattedMessage, {
|
11975
12111
|
id: "datatable.edit",
|
11976
12112
|
defaultMessage: "Edit"
|
11977
12113
|
})),
|
11978
12114
|
modalProps
|
11979
|
-
}, /* @__PURE__ */
|
12115
|
+
}, /* @__PURE__ */ React37.createElement(Components2.EditForm, _extends24({
|
11980
12116
|
closeModal: () => {
|
11981
12117
|
console.warn("closeModal not defined");
|
11982
12118
|
}
|
@@ -11999,7 +12135,7 @@ var EditForm = /* @__PURE__ */ __name((_a) => {
|
|
11999
12135
|
} : () => {
|
12000
12136
|
closeModal();
|
12001
12137
|
};
|
12002
|
-
return /* @__PURE__ */
|
12138
|
+
return /* @__PURE__ */ React37.createElement(Components2.SmartForm, _extends24({
|
12003
12139
|
successCallback: success,
|
12004
12140
|
removeSuccessCallback: remove
|
12005
12141
|
}, formProps, props));
|
@@ -12008,9 +12144,9 @@ var EditForm = /* @__PURE__ */ __name((_a) => {
|
|
12008
12144
|
// components/Datatable/others/NewButton.tsx
|
12009
12145
|
init_esm_shims();
|
12010
12146
|
import { useIntlContext as useIntlContext8 } from "@vulcanjs/react-i18n";
|
12011
|
-
import
|
12012
|
-
function
|
12013
|
-
|
12147
|
+
import React38 from "react";
|
12148
|
+
function _extends25() {
|
12149
|
+
_extends25 = Object.assign || function(target) {
|
12014
12150
|
for (var i = 1; i < arguments.length; i++) {
|
12015
12151
|
var source = arguments[i];
|
12016
12152
|
for (var key in source) {
|
@@ -12021,27 +12157,27 @@ function _extends24() {
|
|
12021
12157
|
}
|
12022
12158
|
return target;
|
12023
12159
|
};
|
12024
|
-
return
|
12160
|
+
return _extends25.apply(this, arguments);
|
12025
12161
|
}
|
12026
|
-
__name(
|
12162
|
+
__name(_extends25, "_extends");
|
12027
12163
|
var NewButton = /* @__PURE__ */ __name((_a) => {
|
12028
12164
|
var _b = _a, { size: size2, label, style = "primary", formProps } = _b, props = __objRest(_b, ["size", "label", "style", "formProps"]);
|
12029
12165
|
const intl = useIntlContext8();
|
12030
12166
|
const Components2 = useVulcanComponents();
|
12031
|
-
return /* @__PURE__ */
|
12167
|
+
return /* @__PURE__ */ React38.createElement(Components2.ModalTrigger, {
|
12032
12168
|
label: label || intl.formatMessage({
|
12033
12169
|
id: "datatable.new"
|
12034
12170
|
}),
|
12035
12171
|
title: label || intl.formatMessage({
|
12036
12172
|
id: "datatable.new"
|
12037
12173
|
}),
|
12038
|
-
component: /* @__PURE__ */
|
12174
|
+
component: /* @__PURE__ */ React38.createElement(Components2.Button, {
|
12039
12175
|
variant: style,
|
12040
12176
|
size: size2
|
12041
|
-
}, label || /* @__PURE__ */
|
12177
|
+
}, label || /* @__PURE__ */ React38.createElement(Components2.FormattedMessage, {
|
12042
12178
|
id: "datatable.new"
|
12043
12179
|
}))
|
12044
|
-
}, /* @__PURE__ */
|
12180
|
+
}, /* @__PURE__ */ React38.createElement(Components2.NewForm, _extends25({
|
12045
12181
|
formProps
|
12046
12182
|
}, props)));
|
12047
12183
|
}, "NewButton");
|
@@ -12053,7 +12189,7 @@ var NewForm = /* @__PURE__ */ __name(({ model, closeModal, successCallback, form
|
|
12053
12189
|
} : () => {
|
12054
12190
|
closeModal();
|
12055
12191
|
};
|
12056
|
-
return /* @__PURE__ */
|
12192
|
+
return /* @__PURE__ */ React38.createElement(Components2.SmartForm, _extends25({
|
12057
12193
|
model,
|
12058
12194
|
successCallback: success
|
12059
12195
|
}, formProps || {}));
|
@@ -12062,9 +12198,9 @@ var NewForm = /* @__PURE__ */ __name(({ model, closeModal, successCallback, form
|
|
12062
12198
|
// components/Datatable/others/DeleteButton.tsx
|
12063
12199
|
init_esm_shims();
|
12064
12200
|
import { useDelete as useDelete2 } from "@vulcanjs/react-hooks";
|
12065
|
-
import
|
12066
|
-
function
|
12067
|
-
|
12201
|
+
import React39 from "react";
|
12202
|
+
function _extends26() {
|
12203
|
+
_extends26 = Object.assign || function(target) {
|
12068
12204
|
for (var i = 1; i < arguments.length; i++) {
|
12069
12205
|
var source = arguments[i];
|
12070
12206
|
for (var key in source) {
|
@@ -12075,9 +12211,9 @@ function _extends25() {
|
|
12075
12211
|
}
|
12076
12212
|
return target;
|
12077
12213
|
};
|
12078
|
-
return
|
12214
|
+
return _extends26.apply(this, arguments);
|
12079
12215
|
}
|
12080
|
-
__name(
|
12216
|
+
__name(_extends26, "_extends");
|
12081
12217
|
var DeleteButton = /* @__PURE__ */ __name((props) => {
|
12082
12218
|
const Components2 = useVulcanComponents();
|
12083
12219
|
const _a = props, { label, fragment, documentId, mutationOptions, currentUser, model } = _a, rest = __objRest(_a, ["label", "fragment", "documentId", "mutationOptions", "currentUser", "model"]);
|
@@ -12086,7 +12222,7 @@ var DeleteButton = /* @__PURE__ */ __name((props) => {
|
|
12086
12222
|
fragment,
|
12087
12223
|
mutationOptions
|
12088
12224
|
});
|
12089
|
-
return /* @__PURE__ */
|
12225
|
+
return /* @__PURE__ */ React39.createElement(Components2.LoadingButton, _extends26({
|
12090
12226
|
loading,
|
12091
12227
|
onClick: () => {
|
12092
12228
|
deleteFunction({
|
@@ -12095,7 +12231,7 @@ var DeleteButton = /* @__PURE__ */ __name((props) => {
|
|
12095
12231
|
}
|
12096
12232
|
});
|
12097
12233
|
},
|
12098
|
-
label: label || /* @__PURE__ */
|
12234
|
+
label: label || /* @__PURE__ */ React39.createElement(Components2.FormattedMessage, {
|
12099
12235
|
id: "datatable.delete",
|
12100
12236
|
defaultMessage: "Delete"
|
12101
12237
|
})
|
@@ -12149,9 +12285,9 @@ init_esm_shims();
|
|
12149
12285
|
|
12150
12286
|
// components/cell/CardItem.tsx
|
12151
12287
|
init_esm_shims();
|
12152
|
-
import
|
12153
|
-
function
|
12154
|
-
|
12288
|
+
import React40 from "react";
|
12289
|
+
function _extends27() {
|
12290
|
+
_extends27 = Object.assign || function(target) {
|
12155
12291
|
for (var i = 1; i < arguments.length; i++) {
|
12156
12292
|
var source = arguments[i];
|
12157
12293
|
for (var key in source) {
|
@@ -12162,9 +12298,9 @@ function _extends26() {
|
|
12162
12298
|
}
|
12163
12299
|
return target;
|
12164
12300
|
};
|
12165
|
-
return
|
12301
|
+
return _extends27.apply(this, arguments);
|
12166
12302
|
}
|
12167
|
-
__name(
|
12303
|
+
__name(_extends27, "_extends");
|
12168
12304
|
var getTypeName = /* @__PURE__ */ __name((value, fieldName, model) => {
|
12169
12305
|
const schema = model.schema;
|
12170
12306
|
const fieldSchema = schema && schema[fieldName];
|
@@ -12195,7 +12331,7 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12195
12331
|
}
|
12196
12332
|
}
|
12197
12333
|
if (typeof value === "undefined" || value === null) {
|
12198
|
-
return /* @__PURE__ */
|
12334
|
+
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, '""');
|
12199
12335
|
}
|
12200
12336
|
const itemProps = {
|
12201
12337
|
nestingLevel: nestingLevel + 1,
|
@@ -12205,7 +12341,7 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12205
12341
|
model,
|
12206
12342
|
fieldSchema
|
12207
12343
|
};
|
12208
|
-
if (/* @__PURE__ */
|
12344
|
+
if (/* @__PURE__ */ React40.isValidElement(itemProps.value)) {
|
12209
12345
|
return itemProps.value;
|
12210
12346
|
}
|
12211
12347
|
if (fieldSchema && fieldSchema.resolveAs && fieldSchema.resolveAs.relation) {
|
@@ -12213,15 +12349,15 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12213
12349
|
itemProps.relatedDocument = document == null ? void 0 : document[itemProps.relatedFieldName || ""];
|
12214
12350
|
itemProps.relatedModel = (_b = fieldSchema.relation) == null ? void 0 : _b.model;
|
12215
12351
|
if (!itemProps.relatedDocument) {
|
12216
|
-
return /* @__PURE__ */
|
12352
|
+
return /* @__PURE__ */ React40.createElement("span", null, "Missing data for sub-document ", /* @__PURE__ */ React40.createElement("code", null, value), " of type", " ", /* @__PURE__ */ React40.createElement("code", null, typeName), " (", /* @__PURE__ */ React40.createElement("code", null, itemProps.relatedFieldName), ")");
|
12217
12353
|
}
|
12218
12354
|
switch ((_c = fieldSchema.relation) == null ? void 0 : _c.kind) {
|
12219
12355
|
case "hasOne":
|
12220
|
-
return /* @__PURE__ */
|
12356
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemRelationHasOne, _extends27({}, itemProps));
|
12221
12357
|
case "hasMany":
|
12222
|
-
return /* @__PURE__ */
|
12358
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemRelationHasMany, _extends27({}, itemProps));
|
12223
12359
|
default:
|
12224
|
-
return /* @__PURE__ */
|
12360
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemDefault, _extends27({}, itemProps));
|
12225
12361
|
}
|
12226
12362
|
}
|
12227
12363
|
if (Array.isArray(value)) {
|
@@ -12233,81 +12369,81 @@ var CardItemSwitcher = /* @__PURE__ */ __name((props) => {
|
|
12233
12369
|
case "Number":
|
12234
12370
|
case "number":
|
12235
12371
|
case "SimpleSchema.Integer":
|
12236
|
-
return /* @__PURE__ */
|
12372
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemNumber, _extends27({}, itemProps));
|
12237
12373
|
case "Array":
|
12238
|
-
return /* @__PURE__ */
|
12374
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemArray, _extends27({}, itemProps));
|
12239
12375
|
case "Object":
|
12240
12376
|
case "object":
|
12241
|
-
return /* @__PURE__ */
|
12377
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemObject, _extends27({}, itemProps));
|
12242
12378
|
case "Date":
|
12243
|
-
return /* @__PURE__ */
|
12379
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemDate, _extends27({}, itemProps));
|
12244
12380
|
case "String":
|
12245
12381
|
case "string":
|
12246
12382
|
switch (contents) {
|
12247
12383
|
case "html":
|
12248
|
-
return /* @__PURE__ */
|
12384
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemHTML, _extends27({}, itemProps));
|
12249
12385
|
case "date":
|
12250
|
-
return /* @__PURE__ */
|
12386
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemDate, _extends27({}, itemProps));
|
12251
12387
|
case "image":
|
12252
|
-
return /* @__PURE__ */
|
12388
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemImage, _extends27({}, itemProps, {
|
12253
12389
|
force: true
|
12254
12390
|
}));
|
12255
12391
|
case "url":
|
12256
|
-
return /* @__PURE__ */
|
12392
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemURL, _extends27({}, itemProps, {
|
12257
12393
|
force: true
|
12258
12394
|
}));
|
12259
12395
|
default:
|
12260
|
-
return /* @__PURE__ */
|
12396
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemImage, _extends27({}, itemProps));
|
12261
12397
|
}
|
12262
12398
|
default:
|
12263
|
-
return /* @__PURE__ */
|
12399
|
+
return /* @__PURE__ */ React40.createElement(Components2.CardItemDefault, _extends27({}, itemProps));
|
12264
12400
|
}
|
12265
12401
|
}, "CardItemSwitcher");
|
12266
12402
|
|
12267
12403
|
// components/cell/CardItemRelationItem.tsx
|
12268
12404
|
init_esm_shims();
|
12269
|
-
import
|
12405
|
+
import React41 from "react";
|
12270
12406
|
var CardItemRelationItem = /* @__PURE__ */ __name(({ relatedDocument, relatedModel }) => {
|
12271
12407
|
const Components2 = useVulcanComponents();
|
12272
12408
|
const label = relatedDocument._id;
|
12273
12409
|
const typeName = relatedDocument.__typename;
|
12274
12410
|
const Cell = Components2[`${typeName}Cell`];
|
12275
|
-
return Cell ? /* @__PURE__ */
|
12411
|
+
return Cell ? /* @__PURE__ */ React41.createElement(Cell, {
|
12276
12412
|
document: relatedDocument,
|
12277
12413
|
label,
|
12278
12414
|
Components: Components2
|
12279
|
-
}) : /* @__PURE__ */
|
12415
|
+
}) : /* @__PURE__ */ React41.createElement(Components2.DefaultCell, {
|
12280
12416
|
document: relatedDocument,
|
12281
12417
|
label
|
12282
12418
|
});
|
12283
12419
|
}, "CardItemRelationItem");
|
12284
|
-
var DefaultCell = /* @__PURE__ */ __name(({ document, label }) => /* @__PURE__ */
|
12420
|
+
var DefaultCell = /* @__PURE__ */ __name(({ document, label }) => /* @__PURE__ */ React41.createElement("li", {
|
12285
12421
|
className: "relation-default-cell"
|
12286
|
-
}, document.pagePath ? /* @__PURE__ */
|
12422
|
+
}, document.pagePath ? /* @__PURE__ */ React41.createElement("a", {
|
12287
12423
|
href: document.pagePath
|
12288
|
-
}, label) : /* @__PURE__ */
|
12424
|
+
}, label) : /* @__PURE__ */ React41.createElement("span", null, label)), "DefaultCell");
|
12289
12425
|
var UserCell = /* @__PURE__ */ __name(({ document }) => {
|
12290
12426
|
const Components2 = useVulcanComponents();
|
12291
|
-
return /* @__PURE__ */
|
12427
|
+
return /* @__PURE__ */ React41.createElement("div", {
|
12292
12428
|
className: "contents-user user-item"
|
12293
|
-
}, document.pagePath ? /* @__PURE__ */
|
12429
|
+
}, document.pagePath ? /* @__PURE__ */ React41.createElement("a", {
|
12294
12430
|
className: "user-item-name",
|
12295
12431
|
href: document.pagePath
|
12296
|
-
}, document.displayName) : /* @__PURE__ */
|
12432
|
+
}, document.displayName) : /* @__PURE__ */ React41.createElement("span", {
|
12297
12433
|
className: "user-item-name"
|
12298
12434
|
}, document.displayName));
|
12299
12435
|
}, "UserCell");
|
12300
12436
|
|
12301
12437
|
// components/cell/CardItemArray.tsx
|
12302
12438
|
init_esm_shims();
|
12303
|
-
import
|
12439
|
+
import React42 from "react";
|
12304
12440
|
var CardItemArray = /* @__PURE__ */ __name(({ nestingLevel, value }) => {
|
12305
12441
|
const Components2 = useVulcanComponents();
|
12306
|
-
return /* @__PURE__ */
|
12442
|
+
return /* @__PURE__ */ React42.createElement("ol", {
|
12307
12443
|
className: "contents-array"
|
12308
|
-
}, value.map((item, index) => /* @__PURE__ */
|
12444
|
+
}, value.map((item, index) => /* @__PURE__ */ React42.createElement("li", {
|
12309
12445
|
key: index
|
12310
|
-
}, /* @__PURE__ */
|
12446
|
+
}, /* @__PURE__ */ React42.createElement(Components2.CardItem, {
|
12311
12447
|
value: item,
|
12312
12448
|
typeName: typeof item,
|
12313
12449
|
nestingLevel
|
@@ -12317,20 +12453,20 @@ var CardItemArray = /* @__PURE__ */ __name(({ nestingLevel, value }) => {
|
|
12317
12453
|
// components/cell/CardItemDate.tsx
|
12318
12454
|
init_esm_shims();
|
12319
12455
|
var import_moment2 = __toESM(require_moment(), 1);
|
12320
|
-
import
|
12321
|
-
var CardItemDate = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12456
|
+
import React43 from "react";
|
12457
|
+
var CardItemDate = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React43.createElement("span", {
|
12322
12458
|
className: "contents-date"
|
12323
12459
|
}, (0, import_moment2.default)(new Date(value)).format("YYYY/MM/DD, hh:mm")), "CardItemDate");
|
12324
12460
|
|
12325
12461
|
// components/cell/CardItemDefault.tsx
|
12326
12462
|
init_esm_shims();
|
12327
|
-
import
|
12328
|
-
var CardItemDefault = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12463
|
+
import React44 from "react";
|
12464
|
+
var CardItemDefault = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React44.createElement("span", null, value && value.toString()), "CardItemDefault");
|
12329
12465
|
|
12330
12466
|
// components/cell/CardItemHTML.tsx
|
12331
12467
|
init_esm_shims();
|
12332
|
-
import
|
12333
|
-
var CardItemHTML = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12468
|
+
import React45 from "react";
|
12469
|
+
var CardItemHTML = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React45.createElement("div", {
|
12334
12470
|
className: "contents-html",
|
12335
12471
|
dangerouslySetInnerHTML: {
|
12336
12472
|
__html: value
|
@@ -12339,7 +12475,7 @@ var CardItemHTML = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React44
|
|
12339
12475
|
|
12340
12476
|
// components/cell/CardItemImage.tsx
|
12341
12477
|
init_esm_shims();
|
12342
|
-
import
|
12478
|
+
import React46 from "react";
|
12343
12479
|
var CardItemImage = /* @__PURE__ */ __name(({ value, force = false }) => {
|
12344
12480
|
const Components2 = useVulcanComponents();
|
12345
12481
|
const isImage = [
|
@@ -12350,7 +12486,7 @@ var CardItemImage = /* @__PURE__ */ __name(({ value, force = false }) => {
|
|
12350
12486
|
".webp",
|
12351
12487
|
".jpeg"
|
12352
12488
|
].indexOf(value.substr(-5)) !== -1;
|
12353
|
-
return isImage || force ? /* @__PURE__ */
|
12489
|
+
return isImage || force ? /* @__PURE__ */ React46.createElement("img", {
|
12354
12490
|
className: "contents-image",
|
12355
12491
|
style: {
|
12356
12492
|
width: "100%",
|
@@ -12360,24 +12496,24 @@ var CardItemImage = /* @__PURE__ */ __name(({ value, force = false }) => {
|
|
12360
12496
|
},
|
12361
12497
|
src: value,
|
12362
12498
|
alt: value
|
12363
|
-
}) : /* @__PURE__ */
|
12499
|
+
}) : /* @__PURE__ */ React46.createElement(Components2.CardItemURL, {
|
12364
12500
|
value
|
12365
12501
|
});
|
12366
12502
|
}, "CardItemImage");
|
12367
12503
|
|
12368
12504
|
// components/cell/CardItemNumber.tsx
|
12369
12505
|
init_esm_shims();
|
12370
|
-
import
|
12371
|
-
var CardItemNumber = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */
|
12506
|
+
import React47 from "react";
|
12507
|
+
var CardItemNumber = /* @__PURE__ */ __name(({ value }) => /* @__PURE__ */ React47.createElement("code", {
|
12372
12508
|
className: "contents-number"
|
12373
12509
|
}, value.toString()), "CardItemNumber");
|
12374
12510
|
|
12375
12511
|
// components/cell/CardItemObject.tsx
|
12376
12512
|
init_esm_shims();
|
12377
|
-
import
|
12378
|
-
import
|
12379
|
-
function
|
12380
|
-
|
12513
|
+
import React48 from "react";
|
12514
|
+
import without3 from "lodash/without.js";
|
12515
|
+
function _extends28() {
|
12516
|
+
_extends28 = Object.assign || function(target) {
|
12381
12517
|
for (var i = 1; i < arguments.length; i++) {
|
12382
12518
|
var source = arguments[i];
|
12383
12519
|
for (var key in source) {
|
@@ -12388,36 +12524,36 @@ function _extends27() {
|
|
12388
12524
|
}
|
12389
12525
|
return target;
|
12390
12526
|
};
|
12391
|
-
return
|
12527
|
+
return _extends28.apply(this, arguments);
|
12392
12528
|
}
|
12393
|
-
__name(
|
12529
|
+
__name(_extends28, "_extends");
|
12394
12530
|
var CardItemObject = /* @__PURE__ */ __name((props) => {
|
12395
12531
|
const { nestingLevel, value, showExpand } = props;
|
12396
12532
|
const Components2 = useVulcanComponents();
|
12397
12533
|
const showExpandControl = showExpand || nestingLevel > 1;
|
12398
12534
|
if (value.__typename === "User") {
|
12399
12535
|
const user = value;
|
12400
|
-
return /* @__PURE__ */
|
12536
|
+
return /* @__PURE__ */ React48.createElement("div", {
|
12401
12537
|
className: "dashboard-user",
|
12402
12538
|
style: {
|
12403
12539
|
whiteSpace: "nowrap"
|
12404
12540
|
}
|
12405
|
-
}, user.pagePath ? /* @__PURE__ */
|
12541
|
+
}, user.pagePath ? /* @__PURE__ */ React48.createElement("a", {
|
12406
12542
|
href: user.pagePath
|
12407
|
-
}, user.displayName) : /* @__PURE__ */
|
12543
|
+
}, user.displayName) : /* @__PURE__ */ React48.createElement("span", null, user.displayName));
|
12408
12544
|
} else {
|
12409
|
-
return /* @__PURE__ */
|
12545
|
+
return /* @__PURE__ */ React48.createElement("div", {
|
12410
12546
|
className: "card-item-details"
|
12411
|
-
}, showExpandControl ? /* @__PURE__ */
|
12547
|
+
}, showExpandControl ? /* @__PURE__ */ React48.createElement("details", null, /* @__PURE__ */ React48.createElement("summary", null, "Expand"), /* @__PURE__ */ React48.createElement(CardItemObjectContents, _extends28({}, props))) : /* @__PURE__ */ React48.createElement(CardItemObjectContents, _extends28({}, props)));
|
12412
12548
|
}
|
12413
12549
|
}, "CardItemObject");
|
12414
12550
|
var CardItemObjectContents = /* @__PURE__ */ __name(({ nestingLevel, value: object }) => {
|
12415
12551
|
const Components2 = useVulcanComponents();
|
12416
|
-
return /* @__PURE__ */
|
12552
|
+
return /* @__PURE__ */ React48.createElement("table", {
|
12417
12553
|
className: "table table-bordered"
|
12418
|
-
}, /* @__PURE__ */
|
12554
|
+
}, /* @__PURE__ */ React48.createElement("tbody", null, without3(Object.keys(object), "__typename").map((key) => /* @__PURE__ */ React48.createElement("tr", {
|
12419
12555
|
key
|
12420
|
-
}, /* @__PURE__ */
|
12556
|
+
}, /* @__PURE__ */ React48.createElement("td", null, /* @__PURE__ */ React48.createElement("strong", null, key)), /* @__PURE__ */ React48.createElement("td", null, /* @__PURE__ */ React48.createElement(Components2.CardItemSwitcher, {
|
12421
12557
|
nestingLevel,
|
12422
12558
|
value: object[key],
|
12423
12559
|
typeName: typeof object[key]
|
@@ -12426,9 +12562,9 @@ var CardItemObjectContents = /* @__PURE__ */ __name(({ nestingLevel, value: obje
|
|
12426
12562
|
|
12427
12563
|
// components/cell/CardItemRelationHasMany.tsx
|
12428
12564
|
init_esm_shims();
|
12429
|
-
import
|
12430
|
-
function
|
12431
|
-
|
12565
|
+
import React49 from "react";
|
12566
|
+
function _extends29() {
|
12567
|
+
_extends29 = Object.assign || function(target) {
|
12432
12568
|
for (var i = 1; i < arguments.length; i++) {
|
12433
12569
|
var source = arguments[i];
|
12434
12570
|
for (var key in source) {
|
@@ -12439,15 +12575,15 @@ function _extends28() {
|
|
12439
12575
|
}
|
12440
12576
|
return target;
|
12441
12577
|
};
|
12442
|
-
return
|
12578
|
+
return _extends29.apply(this, arguments);
|
12443
12579
|
}
|
12444
|
-
__name(
|
12580
|
+
__name(_extends29, "_extends");
|
12445
12581
|
var CardItemRelationHasMany = /* @__PURE__ */ __name((_a) => {
|
12446
12582
|
var _b = _a, { relatedDocument: relatedDocuments } = _b, rest = __objRest(_b, ["relatedDocument"]);
|
12447
12583
|
const Components2 = useVulcanComponents();
|
12448
|
-
return /* @__PURE__ */
|
12584
|
+
return /* @__PURE__ */ React49.createElement("div", {
|
12449
12585
|
className: "contents-hasmany"
|
12450
|
-
}, relatedDocuments.map((relatedDocument) => /* @__PURE__ */
|
12586
|
+
}, relatedDocuments.map((relatedDocument) => /* @__PURE__ */ React49.createElement(Components2.CardItemRelationItem, _extends29({
|
12451
12587
|
key: relatedDocument._id,
|
12452
12588
|
relatedDocument
|
12453
12589
|
}, rest))));
|
@@ -12455,9 +12591,9 @@ var CardItemRelationHasMany = /* @__PURE__ */ __name((_a) => {
|
|
12455
12591
|
|
12456
12592
|
// components/cell/CardItemRelationHasOne.tsx
|
12457
12593
|
init_esm_shims();
|
12458
|
-
import
|
12459
|
-
function
|
12460
|
-
|
12594
|
+
import React50 from "react";
|
12595
|
+
function _extends30() {
|
12596
|
+
_extends30 = Object.assign || function(target) {
|
12461
12597
|
for (var i = 1; i < arguments.length; i++) {
|
12462
12598
|
var source = arguments[i];
|
12463
12599
|
for (var key in source) {
|
@@ -12468,39 +12604,39 @@ function _extends29() {
|
|
12468
12604
|
}
|
12469
12605
|
return target;
|
12470
12606
|
};
|
12471
|
-
return
|
12607
|
+
return _extends30.apply(this, arguments);
|
12472
12608
|
}
|
12473
|
-
__name(
|
12609
|
+
__name(_extends30, "_extends");
|
12474
12610
|
var CardItemRelationHasOne = /* @__PURE__ */ __name((_a) => {
|
12475
12611
|
var rest = __objRest(_a, []);
|
12476
12612
|
const Components2 = useVulcanComponents();
|
12477
|
-
return /* @__PURE__ */
|
12613
|
+
return /* @__PURE__ */ React50.createElement("div", {
|
12478
12614
|
className: "contents-hasone"
|
12479
|
-
}, /* @__PURE__ */
|
12615
|
+
}, /* @__PURE__ */ React50.createElement(Components2.CardItemRelationItem, _extends30({}, rest)));
|
12480
12616
|
}, "CardItemRelationHasOne");
|
12481
12617
|
|
12482
12618
|
// components/cell/CardItemString.tsx
|
12483
12619
|
init_esm_shims();
|
12484
|
-
import
|
12485
|
-
var CardItemString = /* @__PURE__ */ __name(({ string }) => /* @__PURE__ */
|
12620
|
+
import React51 from "react";
|
12621
|
+
var CardItemString = /* @__PURE__ */ __name(({ string }) => /* @__PURE__ */ React51.createElement("div", {
|
12486
12622
|
className: "contents-string"
|
12487
|
-
}, string.indexOf(" ") === -1 && string.length > 30 ? /* @__PURE__ */
|
12623
|
+
}, string.indexOf(" ") === -1 && string.length > 30 ? /* @__PURE__ */ React51.createElement("span", {
|
12488
12624
|
title: string
|
12489
|
-
}, string.substr(0, 30), "\u2026") : /* @__PURE__ */
|
12625
|
+
}, string.substr(0, 30), "\u2026") : /* @__PURE__ */ React51.createElement("span", null, string)), "CardItemString");
|
12490
12626
|
|
12491
12627
|
// components/cell/CardItemURL.tsx
|
12492
12628
|
init_esm_shims();
|
12493
|
-
import
|
12629
|
+
import React52 from "react";
|
12494
12630
|
var CardItemURL = /* @__PURE__ */ __name(({ value, force }) => {
|
12495
12631
|
const Components2 = useVulcanComponents();
|
12496
|
-
return force || value.slice(0, 4) === "http" ? /* @__PURE__ */
|
12632
|
+
return force || value.slice(0, 4) === "http" ? /* @__PURE__ */ React52.createElement("a", {
|
12497
12633
|
className: "contents-link",
|
12498
12634
|
href: value,
|
12499
12635
|
target: "_blank",
|
12500
12636
|
rel: "noopener noreferrer"
|
12501
|
-
}, /* @__PURE__ */
|
12637
|
+
}, /* @__PURE__ */ React52.createElement(Components2.CardItemString, {
|
12502
12638
|
string: value
|
12503
|
-
})) : /* @__PURE__ */
|
12639
|
+
})) : /* @__PURE__ */ React52.createElement(Components2.CardItemString, {
|
12504
12640
|
string: value
|
12505
12641
|
});
|
12506
12642
|
}, "CardItemURL");
|
@@ -12531,9 +12667,9 @@ import { FormattedMessage } from "@vulcanjs/react-i18n";
|
|
12531
12667
|
|
12532
12668
|
// components/form/core/Button.tsx
|
12533
12669
|
init_esm_shims();
|
12534
|
-
import
|
12535
|
-
function
|
12536
|
-
|
12670
|
+
import React53 from "react";
|
12671
|
+
function _extends31() {
|
12672
|
+
_extends31 = Object.assign || function(target) {
|
12537
12673
|
for (var i = 1; i < arguments.length; i++) {
|
12538
12674
|
var source = arguments[i];
|
12539
12675
|
for (var key in source) {
|
@@ -12544,27 +12680,27 @@ function _extends30() {
|
|
12544
12680
|
}
|
12545
12681
|
return target;
|
12546
12682
|
};
|
12547
|
-
return
|
12683
|
+
return _extends31.apply(this, arguments);
|
12548
12684
|
}
|
12549
|
-
__name(
|
12685
|
+
__name(_extends31, "_extends");
|
12550
12686
|
var Button = /* @__PURE__ */ __name((_a) => {
|
12551
12687
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
12552
|
-
return /* @__PURE__ */
|
12688
|
+
return /* @__PURE__ */ React53.createElement("button", _extends31({}, props), children);
|
12553
12689
|
}, "Button");
|
12554
12690
|
|
12555
12691
|
// components/form/core/Loading.tsx
|
12556
12692
|
init_esm_shims();
|
12557
|
-
import
|
12558
|
-
var Loading = /* @__PURE__ */ __name(() => /* @__PURE__ */
|
12693
|
+
import React54 from "react";
|
12694
|
+
var Loading = /* @__PURE__ */ __name(() => /* @__PURE__ */ React54.createElement("span", {
|
12559
12695
|
"aria-live": "polite",
|
12560
12696
|
"aria-busy": "true"
|
12561
12697
|
}, "Loading..."), "Loading");
|
12562
12698
|
|
12563
12699
|
// components/LoadingButton.tsx
|
12564
12700
|
init_esm_shims();
|
12565
|
-
import
|
12566
|
-
function
|
12567
|
-
|
12701
|
+
import React55 from "react";
|
12702
|
+
function _extends32() {
|
12703
|
+
_extends32 = Object.assign || function(target) {
|
12568
12704
|
for (var i = 1; i < arguments.length; i++) {
|
12569
12705
|
var source = arguments[i];
|
12570
12706
|
for (var key in source) {
|
@@ -12575,9 +12711,9 @@ function _extends31() {
|
|
12575
12711
|
}
|
12576
12712
|
return target;
|
12577
12713
|
};
|
12578
|
-
return
|
12714
|
+
return _extends32.apply(this, arguments);
|
12579
12715
|
}
|
12580
|
-
__name(
|
12716
|
+
__name(_extends32, "_extends");
|
12581
12717
|
var LoadingButton = /* @__PURE__ */ __name((_a) => {
|
12582
12718
|
var _b = _a, { loading, label, onClick, children, className = "" } = _b, rest = __objRest(_b, ["loading", "label", "onClick", "children", "className"]);
|
12583
12719
|
const Components2 = useVulcanComponents();
|
@@ -12599,24 +12735,24 @@ var LoadingButton = /* @__PURE__ */ __name((_a) => {
|
|
12599
12735
|
} : {
|
12600
12736
|
display: "none"
|
12601
12737
|
};
|
12602
|
-
return /* @__PURE__ */
|
12738
|
+
return /* @__PURE__ */ React55.createElement(Components2.Button, _extends32({
|
12603
12739
|
className: `loading-button ${loading ? "loading-button-loading" : "loading-button-notloading"} ${className}`,
|
12604
12740
|
onClick
|
12605
|
-
}, rest), /* @__PURE__ */
|
12741
|
+
}, rest), /* @__PURE__ */ React55.createElement("span", {
|
12606
12742
|
style: wrapperStyle
|
12607
|
-
}, /* @__PURE__ */
|
12743
|
+
}, /* @__PURE__ */ React55.createElement("span", {
|
12608
12744
|
style: labelStyle
|
12609
|
-
}, label || children), /* @__PURE__ */
|
12745
|
+
}, label || children), /* @__PURE__ */ React55.createElement("span", {
|
12610
12746
|
style: loadingStyle
|
12611
|
-
}, /* @__PURE__ */
|
12747
|
+
}, /* @__PURE__ */ React55.createElement(Components2.Loading, null))));
|
12612
12748
|
}, "LoadingButton");
|
12613
12749
|
|
12614
12750
|
// components/MutationButton.tsx
|
12615
12751
|
init_esm_shims();
|
12616
|
-
import
|
12752
|
+
import React56, { useState as useState8 } from "react";
|
12617
12753
|
import { useMutation } from "@apollo/client";
|
12618
|
-
function
|
12619
|
-
|
12754
|
+
function _extends33() {
|
12755
|
+
_extends33 = Object.assign || function(target) {
|
12620
12756
|
for (var i = 1; i < arguments.length; i++) {
|
12621
12757
|
var source = arguments[i];
|
12622
12758
|
for (var key in source) {
|
@@ -12627,13 +12763,13 @@ function _extends32() {
|
|
12627
12763
|
}
|
12628
12764
|
return target;
|
12629
12765
|
};
|
12630
|
-
return
|
12766
|
+
return _extends33.apply(this, arguments);
|
12631
12767
|
}
|
12632
|
-
__name(
|
12768
|
+
__name(_extends33, "_extends");
|
12633
12769
|
var MutationButton = /* @__PURE__ */ __name((props) => {
|
12634
12770
|
const Components2 = useVulcanComponents();
|
12635
|
-
const [loading, setLoading] =
|
12636
|
-
const [error1, setError] =
|
12771
|
+
const [loading, setLoading] = useState8(false);
|
12772
|
+
const [error1, setError] = useState8();
|
12637
12773
|
const {
|
12638
12774
|
mutation,
|
12639
12775
|
loadingButtonProps = {},
|
@@ -12675,13 +12811,13 @@ var MutationButton = /* @__PURE__ */ __name((props) => {
|
|
12675
12811
|
setLoading(false);
|
12676
12812
|
}
|
12677
12813
|
}, "handleClick");
|
12678
|
-
const loadingButton = /* @__PURE__ */
|
12814
|
+
const loadingButton = /* @__PURE__ */ React56.createElement(Components2.LoadingButton, _extends33({
|
12679
12815
|
loading,
|
12680
12816
|
onClick: handleClick,
|
12681
12817
|
label
|
12682
12818
|
}, loadingButtonProps));
|
12683
12819
|
if (error1) {
|
12684
|
-
return /* @__PURE__ */
|
12820
|
+
return /* @__PURE__ */ React56.createElement(Components2.TooltipTrigger, {
|
12685
12821
|
trigger: loadingButton,
|
12686
12822
|
defaultShow: true
|
12687
12823
|
}, error1.message.replace("GraphQL error: ", ""));
|
@@ -12691,7 +12827,7 @@ var MutationButton = /* @__PURE__ */ __name((props) => {
|
|
12691
12827
|
|
12692
12828
|
// components/HeadTags.tsx
|
12693
12829
|
init_esm_shims();
|
12694
|
-
import
|
12830
|
+
import React57, { PureComponent } from "react";
|
12695
12831
|
var HeadTags = class extends PureComponent {
|
12696
12832
|
render() {
|
12697
12833
|
console.warn("HeadTags won't work in Next.js, because Head doesn't support nesting. Define meta directly in your app instead.");
|
@@ -12703,45 +12839,45 @@ var HeadTags = class extends PureComponent {
|
|
12703
12839
|
}
|
12704
12840
|
image = siteUrl + image;
|
12705
12841
|
}
|
12706
|
-
return /* @__PURE__ */
|
12842
|
+
return /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement("title", null, title), /* @__PURE__ */ React57.createElement("meta", {
|
12707
12843
|
charSet: "utf-8"
|
12708
|
-
}), /* @__PURE__ */
|
12844
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12709
12845
|
name: "description",
|
12710
12846
|
content: description
|
12711
|
-
}), /* @__PURE__ */
|
12847
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12712
12848
|
name: "viewport",
|
12713
12849
|
content: "width=device-width, initial-scale=1"
|
12714
|
-
}), /* @__PURE__ */
|
12850
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12715
12851
|
property: "og:type",
|
12716
12852
|
content: "article"
|
12717
|
-
}), /* @__PURE__ */
|
12853
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12718
12854
|
property: "og:url",
|
12719
12855
|
content: url
|
12720
|
-
}), /* @__PURE__ */
|
12856
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12721
12857
|
property: "og:image",
|
12722
12858
|
content: image
|
12723
|
-
}), /* @__PURE__ */
|
12859
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12724
12860
|
property: "og:title",
|
12725
12861
|
content: title
|
12726
|
-
}), /* @__PURE__ */
|
12862
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12727
12863
|
property: "og:description",
|
12728
12864
|
content: description
|
12729
|
-
}), /* @__PURE__ */
|
12865
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12730
12866
|
name: "twitter:card",
|
12731
12867
|
content: "summary"
|
12732
|
-
}), /* @__PURE__ */
|
12868
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12733
12869
|
name: "twitter:image:src",
|
12734
12870
|
content: image
|
12735
|
-
}), /* @__PURE__ */
|
12871
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12736
12872
|
name: "twitter:title",
|
12737
12873
|
content: title
|
12738
|
-
}), /* @__PURE__ */
|
12874
|
+
}), /* @__PURE__ */ React57.createElement("meta", {
|
12739
12875
|
name: "twitter:description",
|
12740
12876
|
content: description
|
12741
|
-
}), /* @__PURE__ */
|
12877
|
+
}), /* @__PURE__ */ React57.createElement("link", {
|
12742
12878
|
rel: "canonical",
|
12743
12879
|
href: url
|
12744
|
-
}), /* @__PURE__ */
|
12880
|
+
}), /* @__PURE__ */ React57.createElement("link", {
|
12745
12881
|
rel: "shortcut icon",
|
12746
12882
|
href: faviconUrl || "/favicon.ico"
|
12747
12883
|
}));
|
@@ -12751,9 +12887,9 @@ __name(HeadTags, "HeadTags");
|
|
12751
12887
|
|
12752
12888
|
// components/bootstrap/TooltipTrigger.tsx
|
12753
12889
|
init_esm_shims();
|
12754
|
-
import
|
12890
|
+
import React58 from "react";
|
12755
12891
|
var TooltipTrigger = /* @__PURE__ */ __name(({ children, trigger }) => {
|
12756
|
-
return /* @__PURE__ */
|
12892
|
+
return /* @__PURE__ */ React58.createElement("div", {
|
12757
12893
|
title: children
|
12758
12894
|
}, trigger);
|
12759
12895
|
}, "TooltipTrigger");
|
@@ -12761,10 +12897,10 @@ var TooltipTrigger = /* @__PURE__ */ __name(({ children, trigger }) => {
|
|
12761
12897
|
// components/bootstrap/Dropdown.tsx
|
12762
12898
|
init_esm_shims();
|
12763
12899
|
var import_prop_types6 = __toESM(require_prop_types(), 1);
|
12764
|
-
import
|
12900
|
+
import React59 from "react";
|
12765
12901
|
import { Dropdown, DropdownButton } from "react-bootstrap";
|
12766
|
-
function
|
12767
|
-
|
12902
|
+
function _extends34() {
|
12903
|
+
_extends34 = Object.assign || function(target) {
|
12768
12904
|
for (var i = 1; i < arguments.length; i++) {
|
12769
12905
|
var source = arguments[i];
|
12770
12906
|
for (var key in source) {
|
@@ -12775,9 +12911,9 @@ function _extends33() {
|
|
12775
12911
|
}
|
12776
12912
|
return target;
|
12777
12913
|
};
|
12778
|
-
return
|
12914
|
+
return _extends34.apply(this, arguments);
|
12779
12915
|
}
|
12780
|
-
__name(
|
12916
|
+
__name(_extends34, "_extends");
|
12781
12917
|
var DropdownItem = Dropdown.Item;
|
12782
12918
|
var Item = /* @__PURE__ */ __name((_a) => {
|
12783
12919
|
var _b = _a, {
|
@@ -12798,15 +12934,15 @@ var Item = /* @__PURE__ */ __name((_a) => {
|
|
12798
12934
|
const Components2 = useVulcanComponents();
|
12799
12935
|
let menuComponent;
|
12800
12936
|
if (component) {
|
12801
|
-
menuComponent = /* @__PURE__ */
|
12937
|
+
menuComponent = /* @__PURE__ */ React59.cloneElement(component, componentProps);
|
12802
12938
|
} else if (labelId) {
|
12803
|
-
menuComponent = /* @__PURE__ */
|
12939
|
+
menuComponent = /* @__PURE__ */ React59.createElement(Components2.FormattedMessage, {
|
12804
12940
|
id: labelId
|
12805
12941
|
});
|
12806
12942
|
} else {
|
12807
|
-
menuComponent = /* @__PURE__ */
|
12943
|
+
menuComponent = /* @__PURE__ */ React59.createElement("span", null, label);
|
12808
12944
|
}
|
12809
|
-
const item = /* @__PURE__ */
|
12945
|
+
const item = /* @__PURE__ */ React59.createElement(DropdownItem, _extends34({
|
12810
12946
|
eventKey: index
|
12811
12947
|
}, itemProps, rest), menuComponent);
|
12812
12948
|
return item;
|
@@ -12822,9 +12958,9 @@ Item.propTypes = {
|
|
12822
12958
|
};
|
12823
12959
|
var Node = /* @__PURE__ */ __name((_a) => {
|
12824
12960
|
var _b = _a, { childrenItems } = _b, rest = __objRest(_b, ["childrenItems"]);
|
12825
|
-
return /* @__PURE__ */
|
12961
|
+
return /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(Item, _extends34({}, rest)), childrenItems && !!childrenItems.length && /* @__PURE__ */ React59.createElement("div", {
|
12826
12962
|
className: "menu-node-children"
|
12827
|
-
}, childrenItems.map((item, index) => /* @__PURE__ */
|
12963
|
+
}, childrenItems.map((item, index) => /* @__PURE__ */ React59.createElement(Item, _extends34({
|
12828
12964
|
key: index
|
12829
12965
|
}, item)))));
|
12830
12966
|
}, "Node");
|
@@ -12836,11 +12972,11 @@ var BootstrapDropdown = /* @__PURE__ */ __name((_a) => {
|
|
12836
12972
|
const Components2 = useVulcanComponents();
|
12837
12973
|
const menuBody = menuContents ? menuContents : menuItems.map((item, index) => {
|
12838
12974
|
if (item === "divider") {
|
12839
|
-
return /* @__PURE__ */
|
12975
|
+
return /* @__PURE__ */ React59.createElement(Dropdown.Divider, {
|
12840
12976
|
key: index
|
12841
12977
|
});
|
12842
12978
|
} else {
|
12843
|
-
return /* @__PURE__ */
|
12979
|
+
return /* @__PURE__ */ React59.createElement(Node, _extends34({}, item, {
|
12844
12980
|
key: index,
|
12845
12981
|
index
|
12846
12982
|
}));
|
@@ -12850,10 +12986,10 @@ var BootstrapDropdown = /* @__PURE__ */ __name((_a) => {
|
|
12850
12986
|
return menuBody;
|
12851
12987
|
} else {
|
12852
12988
|
if (trigger) {
|
12853
|
-
return /* @__PURE__ */
|
12989
|
+
return /* @__PURE__ */ React59.createElement(Dropdown, _extends34({}, dropdownProps), /* @__PURE__ */ React59.createElement(Dropdown.Toggle, null, trigger), /* @__PURE__ */ React59.createElement(Dropdown.Menu, null, menuBody));
|
12854
12990
|
} else {
|
12855
|
-
return /* @__PURE__ */
|
12856
|
-
title: labelId ? /* @__PURE__ */
|
12991
|
+
return /* @__PURE__ */ React59.createElement(DropdownButton, _extends34({}, buttonProps, {
|
12992
|
+
title: labelId ? /* @__PURE__ */ React59.createElement(Components2.FormattedMessage, {
|
12857
12993
|
id: labelId
|
12858
12994
|
}) : label
|
12859
12995
|
}, dropdownProps), menuBody);
|
@@ -12874,10 +13010,10 @@ var Dropdown_default = BootstrapDropdown;
|
|
12874
13010
|
// components/bootstrap/Modal.tsx
|
12875
13011
|
init_esm_shims();
|
12876
13012
|
var import_prop_types7 = __toESM(require_prop_types(), 1);
|
12877
|
-
import
|
13013
|
+
import React60 from "react";
|
12878
13014
|
import { Modal } from "react-bootstrap";
|
12879
|
-
function
|
12880
|
-
|
13015
|
+
function _extends35() {
|
13016
|
+
_extends35 = Object.assign || function(target) {
|
12881
13017
|
for (var i = 1; i < arguments.length; i++) {
|
12882
13018
|
var source = arguments[i];
|
12883
13019
|
for (var key in source) {
|
@@ -12888,29 +13024,29 @@ function _extends34() {
|
|
12888
13024
|
}
|
12889
13025
|
return target;
|
12890
13026
|
};
|
12891
|
-
return
|
13027
|
+
return _extends35.apply(this, arguments);
|
12892
13028
|
}
|
12893
|
-
__name(
|
13029
|
+
__name(_extends35, "_extends");
|
12894
13030
|
var BootstrapModal = /* @__PURE__ */ __name((_a) => {
|
12895
13031
|
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"]);
|
12896
13032
|
let headerComponent;
|
12897
13033
|
if (header) {
|
12898
|
-
headerComponent = /* @__PURE__ */
|
13034
|
+
headerComponent = /* @__PURE__ */ React60.createElement(Modal.Header, null, header);
|
12899
13035
|
} else if (title) {
|
12900
|
-
headerComponent = /* @__PURE__ */
|
13036
|
+
headerComponent = /* @__PURE__ */ React60.createElement(Modal.Header, {
|
12901
13037
|
closeButton: showCloseButton
|
12902
|
-
}, /* @__PURE__ */
|
13038
|
+
}, /* @__PURE__ */ React60.createElement(Modal.Title, null, title));
|
12903
13039
|
} else {
|
12904
|
-
headerComponent = /* @__PURE__ */
|
13040
|
+
headerComponent = /* @__PURE__ */ React60.createElement(Modal.Header, {
|
12905
13041
|
closeButton: showCloseButton
|
12906
13042
|
});
|
12907
13043
|
}
|
12908
|
-
const footerComponent = footer ? /* @__PURE__ */
|
12909
|
-
return /* @__PURE__ */
|
13044
|
+
const footerComponent = footer ? /* @__PURE__ */ React60.createElement(Modal.Footer, null, footer) : null;
|
13045
|
+
return /* @__PURE__ */ React60.createElement(Modal, _extends35({
|
12910
13046
|
size: size2,
|
12911
13047
|
show,
|
12912
13048
|
onHide
|
12913
|
-
}, rest), headerComponent, /* @__PURE__ */
|
13049
|
+
}, rest), headerComponent, /* @__PURE__ */ React60.createElement(Modal.Body, null, children), footerComponent);
|
12914
13050
|
}, "BootstrapModal");
|
12915
13051
|
BootstrapModal.propTypes = {
|
12916
13052
|
size: import_prop_types7.default.string,
|
@@ -12933,9 +13069,9 @@ BootstrapModal.propTypes = {
|
|
12933
13069
|
|
12934
13070
|
// components/bootstrap/ModalTrigger.tsx
|
12935
13071
|
init_esm_shims();
|
12936
|
-
import
|
12937
|
-
function
|
12938
|
-
|
13072
|
+
import React61, { useState as useState9 } from "react";
|
13073
|
+
function _extends36() {
|
13074
|
+
_extends36 = Object.assign || function(target) {
|
12939
13075
|
for (var i = 1; i < arguments.length; i++) {
|
12940
13076
|
var source = arguments[i];
|
12941
13077
|
for (var key in source) {
|
@@ -12946,11 +13082,11 @@ function _extends35() {
|
|
12946
13082
|
}
|
12947
13083
|
return target;
|
12948
13084
|
};
|
12949
|
-
return
|
13085
|
+
return _extends36.apply(this, arguments);
|
12950
13086
|
}
|
12951
|
-
__name(
|
13087
|
+
__name(_extends36, "_extends");
|
12952
13088
|
var ModalTrigger = /* @__PURE__ */ __name((props) => {
|
12953
|
-
const [modalIsOpen, setModalIsOpen] =
|
13089
|
+
const [modalIsOpen, setModalIsOpen] = useState9(false);
|
12954
13090
|
const { onClick, openCallback, closeCallback } = props;
|
12955
13091
|
const clickHandler = /* @__PURE__ */ __name((e) => {
|
12956
13092
|
e.preventDefault();
|
@@ -12974,23 +13110,23 @@ var ModalTrigger = /* @__PURE__ */ __name((props) => {
|
|
12974
13110
|
const Components2 = useVulcanComponents();
|
12975
13111
|
const { trigger, component, children, label, size: size2, className, dialogClassName, title, modalProps, header, footer } = props;
|
12976
13112
|
let triggerComponent = trigger || component;
|
12977
|
-
triggerComponent = triggerComponent ? /* @__PURE__ */
|
13113
|
+
triggerComponent = triggerComponent ? /* @__PURE__ */ React61.createElement("span", {
|
12978
13114
|
onClick: clickHandler
|
12979
|
-
}, triggerComponent) : /* @__PURE__ */
|
13115
|
+
}, triggerComponent) : /* @__PURE__ */ React61.createElement(Components2.Button, {
|
12980
13116
|
onClick: clickHandler
|
12981
13117
|
}, label);
|
12982
|
-
const childrenComponent = /* @__PURE__ */
|
13118
|
+
const childrenComponent = /* @__PURE__ */ React61.cloneElement(children, {
|
12983
13119
|
closeModal
|
12984
13120
|
});
|
12985
|
-
const headerComponent = header && /* @__PURE__ */
|
13121
|
+
const headerComponent = header && /* @__PURE__ */ React61.cloneElement(header, {
|
12986
13122
|
closeModal
|
12987
13123
|
});
|
12988
|
-
const footerComponent = footer && /* @__PURE__ */
|
13124
|
+
const footerComponent = footer && /* @__PURE__ */ React61.cloneElement(footer, {
|
12989
13125
|
closeModal
|
12990
13126
|
});
|
12991
|
-
return /* @__PURE__ */
|
13127
|
+
return /* @__PURE__ */ React61.createElement("div", {
|
12992
13128
|
className: "modal-trigger"
|
12993
|
-
}, triggerComponent, /* @__PURE__ */
|
13129
|
+
}, triggerComponent, /* @__PURE__ */ React61.createElement(Components2.Modal, _extends36({
|
12994
13130
|
size: size2,
|
12995
13131
|
className,
|
12996
13132
|
show: modalIsOpen,
|
@@ -13023,8 +13159,8 @@ var defaultVulcanComponents = __spreadValues(__spreadValues(__spreadValues(__spr
|
|
13023
13159
|
|
13024
13160
|
// components/VulcanComponents/Provider.tsx
|
13025
13161
|
import { debugVulcan as debugVulcan2 } from "@vulcanjs/utils";
|
13026
|
-
function
|
13027
|
-
|
13162
|
+
function _extends37() {
|
13163
|
+
_extends37 = Object.assign || function(target) {
|
13028
13164
|
for (var i = 1; i < arguments.length; i++) {
|
13029
13165
|
var source = arguments[i];
|
13030
13166
|
for (var key in source) {
|
@@ -13035,9 +13171,9 @@ function _extends36() {
|
|
13035
13171
|
}
|
13036
13172
|
return target;
|
13037
13173
|
};
|
13038
|
-
return
|
13174
|
+
return _extends37.apply(this, arguments);
|
13039
13175
|
}
|
13040
|
-
__name(
|
13176
|
+
__name(_extends37, "_extends");
|
13041
13177
|
var debugComponents = debugVulcan2("components");
|
13042
13178
|
var VulcanComponentsProvider = /* @__PURE__ */ __name((_a) => {
|
13043
13179
|
var _b = _a, { value } = _b, props = __objRest(_b, ["value"]);
|
@@ -13055,23 +13191,23 @@ var VulcanComponentsProvider = /* @__PURE__ */ __name((_a) => {
|
|
13055
13191
|
"useVulcanComponents" from index instead of Consumer.`);
|
13056
13192
|
}
|
13057
13193
|
});
|
13058
|
-
return /* @__PURE__ */
|
13194
|
+
return /* @__PURE__ */ React62.createElement(VulcanComponentsContext.Provider, _extends37({
|
13059
13195
|
value: mergedComponents
|
13060
13196
|
}, props));
|
13061
13197
|
}, "VulcanComponentsProvider");
|
13062
13198
|
|
13063
13199
|
// components/VulcanComponents/typings.ts
|
13064
13200
|
init_esm_shims();
|
13065
|
-
import
|
13201
|
+
import React63 from "react";
|
13066
13202
|
|
13067
13203
|
// components/VulcanCurrentUser/index.ts
|
13068
13204
|
init_esm_shims();
|
13069
13205
|
|
13070
13206
|
// components/VulcanCurrentUser/Provider.tsx
|
13071
13207
|
init_esm_shims();
|
13072
|
-
import
|
13073
|
-
function
|
13074
|
-
|
13208
|
+
import React64 from "react";
|
13209
|
+
function _extends38() {
|
13210
|
+
_extends38 = Object.assign || function(target) {
|
13075
13211
|
for (var i = 1; i < arguments.length; i++) {
|
13076
13212
|
var source = arguments[i];
|
13077
13213
|
for (var key in source) {
|
@@ -13082,21 +13218,21 @@ function _extends37() {
|
|
13082
13218
|
}
|
13083
13219
|
return target;
|
13084
13220
|
};
|
13085
|
-
return
|
13221
|
+
return _extends38.apply(this, arguments);
|
13086
13222
|
}
|
13087
|
-
__name(
|
13223
|
+
__name(_extends38, "_extends");
|
13088
13224
|
var VulcanCurrentUserProvider = /* @__PURE__ */ __name((_a) => {
|
13089
13225
|
var _b = _a, { value } = _b, props = __objRest(_b, ["value"]);
|
13090
|
-
return /* @__PURE__ */
|
13226
|
+
return /* @__PURE__ */ React64.createElement(VulcanCurrentUserContext.Provider, _extends38({
|
13091
13227
|
value
|
13092
13228
|
}, props));
|
13093
13229
|
}, "VulcanCurrentUserProvider");
|
13094
13230
|
|
13095
13231
|
// componentsHelpers.tsx
|
13096
13232
|
init_esm_shims();
|
13097
|
-
import
|
13098
|
-
function
|
13099
|
-
|
13233
|
+
import React65 from "react";
|
13234
|
+
function _extends39() {
|
13235
|
+
_extends39 = Object.assign || function(target) {
|
13100
13236
|
for (var i = 1; i < arguments.length; i++) {
|
13101
13237
|
var source = arguments[i];
|
13102
13238
|
for (var key in source) {
|
@@ -13107,9 +13243,9 @@ function _extends38() {
|
|
13107
13243
|
}
|
13108
13244
|
return target;
|
13109
13245
|
};
|
13110
|
-
return
|
13246
|
+
return _extends39.apply(this, arguments);
|
13111
13247
|
}
|
13112
|
-
__name(
|
13248
|
+
__name(_extends39, "_extends");
|
13113
13249
|
var Components = {};
|
13114
13250
|
var ComponentsTable = {};
|
13115
13251
|
var coreComponents = [
|
@@ -13138,34 +13274,34 @@ var coreComponents = [
|
|
13138
13274
|
"FormControl",
|
13139
13275
|
"FormElement"
|
13140
13276
|
];
|
13141
|
-
var componentExists = /* @__PURE__ */ __name((
|
13142
|
-
const component = ComponentsTable[
|
13277
|
+
var componentExists = /* @__PURE__ */ __name((name2) => {
|
13278
|
+
const component = ComponentsTable[name2];
|
13143
13279
|
return !!component;
|
13144
13280
|
}, "componentExists");
|
13145
|
-
var getRawComponent = /* @__PURE__ */ __name((
|
13146
|
-
return ComponentsTable[
|
13281
|
+
var getRawComponent = /* @__PURE__ */ __name((name2) => {
|
13282
|
+
return ComponentsTable[name2].rawComponent;
|
13147
13283
|
}, "getRawComponent");
|
13148
13284
|
var instantiateComponent = /* @__PURE__ */ __name((component, props) => {
|
13149
13285
|
if (!component) {
|
13150
13286
|
return null;
|
13151
|
-
} else if (/* @__PURE__ */
|
13152
|
-
return /* @__PURE__ */
|
13287
|
+
} else if (/* @__PURE__ */ React65.isValidElement(component)) {
|
13288
|
+
return /* @__PURE__ */ React65.cloneElement(component, props);
|
13153
13289
|
} else if (typeof component === "function" && component.prototype && component.prototype.isReactComponent) {
|
13154
13290
|
const Component = component;
|
13155
|
-
return /* @__PURE__ */
|
13291
|
+
return /* @__PURE__ */ React65.createElement(Component, _extends39({}, props));
|
13156
13292
|
} else if (typeof component === "function") {
|
13157
13293
|
return component(props);
|
13158
13294
|
} else if (typeof component === "object" && component.$$typeof && component.render) {
|
13159
13295
|
const Component = component;
|
13160
|
-
return /* @__PURE__ */
|
13296
|
+
return /* @__PURE__ */ React65.createElement(Component, _extends39({}, props));
|
13161
13297
|
} else {
|
13162
13298
|
return component;
|
13163
13299
|
}
|
13164
13300
|
}, "instantiateComponent");
|
13165
|
-
var delayedComponent = /* @__PURE__ */ __name((
|
13301
|
+
var delayedComponent = /* @__PURE__ */ __name((name2) => {
|
13166
13302
|
return (props) => {
|
13167
|
-
const Component = Components[
|
13168
|
-
return Component && /* @__PURE__ */
|
13303
|
+
const Component = Components[name2] || null;
|
13304
|
+
return Component && /* @__PURE__ */ React65.createElement(Component, _extends39({}, props));
|
13169
13305
|
};
|
13170
13306
|
}, "delayedComponent");
|
13171
13307
|
var mergeWithComponents = /* @__PURE__ */ __name((myComponents) => myComponents ? __spreadValues(__spreadValues({}, Components), myComponents) : Components, "mergeWithComponents");
|