@superblocksteam/library 2.0.0-next.54 → 2.0.0-next.56
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/{allPaths-aycW3rZq.js → allPaths-ZvBWAfFh.js} +2 -2
- package/dist/{allPaths-aycW3rZq.js.map → allPaths-ZvBWAfFh.js.map} +1 -1
- package/dist/{allPaths-C5_y7jrf.js → allPaths-zBykV1e8.js} +2 -2
- package/dist/{allPaths-C5_y7jrf.js.map → allPaths-zBykV1e8.js.map} +1 -1
- package/dist/{allPathsLoader-BoIWItsv.js → allPathsLoader-CjOUNCYR.js} +3 -3
- package/dist/{allPathsLoader-BoIWItsv.js.map → allPathsLoader-CjOUNCYR.js.map} +1 -1
- package/dist/{allPathsLoader-X6P_Q5DL.js → allPathsLoader-D_lTjvL4.js} +3 -3
- package/dist/{allPathsLoader-X6P_Q5DL.js.map → allPathsLoader-D_lTjvL4.js.map} +1 -1
- package/dist/{index-BdPAIdrj.js → index-9cqMj15O.js} +101 -104
- package/dist/{index-BdPAIdrj.js.map → index-9cqMj15O.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-B9qeoJ6S.js → splitPathsBySizeLoader-7P9UciS4.js} +2 -2
- package/dist/{splitPathsBySizeLoader-B9qeoJ6S.js.map → splitPathsBySizeLoader-7P9UciS4.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-CLmMzk9R.js → splitPathsBySizeLoader-DtaKcrAb.js} +2 -2
- package/dist/{splitPathsBySizeLoader-CLmMzk9R.js.map → splitPathsBySizeLoader-DtaKcrAb.js.map} +1 -1
- package/dist-types/lib/internal-details/lib/types.d.ts +3 -0
- package/dist-types/lib/internal-details/scope/global.d.ts +1 -0
- package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +3 -3
- package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +1 -1
- package/dist-types/lib/user-facing/components/input/index.d.ts +5 -11
- package/dist-types/lib/user-facing/components/input/props.d.ts +5 -11
- package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-BxzKdlqH.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-DIn-fanT.js";
|
|
3
|
-
import { p as pascalCase, b as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, b as IconSize } from "./index-9cqMj15O.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-ZvBWAfFh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-ZvBWAfFh.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-DIJYif9G.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-LHtbj0-V.js";
|
|
3
|
-
import { p as pascalCase, I as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, I as IconSize } from "./index-9cqMj15O.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-zBykV1e8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-zBykV1e8.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-9cqMj15O.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-zBykV1e8.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-CjOUNCYR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-CjOUNCYR.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-9cqMj15O.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-ZvBWAfFh.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-D_lTjvL4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-D_lTjvL4.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -2690,14 +2690,14 @@ function getLoaderFn$1(options) {
|
|
|
2690
2690
|
if (!(loader === "all")) return [3, 3];
|
|
2691
2691
|
return [4, import(
|
|
2692
2692
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
2693
|
-
"./allPathsLoader-
|
|
2693
|
+
"./allPathsLoader-CjOUNCYR.js"
|
|
2694
2694
|
)];
|
|
2695
2695
|
case 2:
|
|
2696
2696
|
return [2, _b2.sent().allPathsLoader];
|
|
2697
2697
|
case 3:
|
|
2698
2698
|
return [4, import(
|
|
2699
2699
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
2700
|
-
"./splitPathsBySizeLoader-
|
|
2700
|
+
"./splitPathsBySizeLoader-DtaKcrAb.js"
|
|
2701
2701
|
)];
|
|
2702
2702
|
case 4:
|
|
2703
2703
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -110797,9 +110797,24 @@ const InternalGlobalScope = internalCreateScope(() => ({}), {
|
|
|
110797
110797
|
name: GLOBAL_SCOPE_ID,
|
|
110798
110798
|
scopeId: GLOBAL_SCOPE_ID
|
|
110799
110799
|
});
|
|
110800
|
+
const globalName = getName("Global");
|
|
110800
110801
|
const GlobalScope = registerScope(
|
|
110801
110802
|
({ children }) => {
|
|
110802
110803
|
const { theme } = useTheme();
|
|
110804
|
+
useEffect(() => {
|
|
110805
|
+
const global2 = rootStore.entityManager.getEntity(
|
|
110806
|
+
GLOBAL_SCOPE_ID,
|
|
110807
|
+
globalName
|
|
110808
|
+
);
|
|
110809
|
+
if (!global2) {
|
|
110810
|
+
rootStore.entityManager.createEntity({
|
|
110811
|
+
name: globalName,
|
|
110812
|
+
type: "global",
|
|
110813
|
+
props: {},
|
|
110814
|
+
scopeId: GLOBAL_SCOPE_ID
|
|
110815
|
+
});
|
|
110816
|
+
}
|
|
110817
|
+
}, []);
|
|
110803
110818
|
useEffect(() => {
|
|
110804
110819
|
const name = getName("Theme");
|
|
110805
110820
|
const existingTheme = rootStore.entityManager.getEntity(
|
|
@@ -110825,6 +110840,13 @@ const GlobalScope = registerScope(
|
|
|
110825
110840
|
},
|
|
110826
110841
|
InternalGlobalScope
|
|
110827
110842
|
);
|
|
110843
|
+
const updateGlobalScope = (global2) => {
|
|
110844
|
+
rootStore.entityManager.updateEntity({
|
|
110845
|
+
name: globalName,
|
|
110846
|
+
props: global2,
|
|
110847
|
+
scopeId: GLOBAL_SCOPE_ID
|
|
110848
|
+
});
|
|
110849
|
+
};
|
|
110828
110850
|
function createEntityProxy(entityName) {
|
|
110829
110851
|
return new Proxy(
|
|
110830
110852
|
{},
|
|
@@ -126549,6 +126571,9 @@ const labelWidth = Prop.any().readAndWrite().default(Dim.percent(30)).properties
|
|
|
126549
126571
|
label: "Label width",
|
|
126550
126572
|
controlType: "SIMPLE_SIZE_CONTROL",
|
|
126551
126573
|
helpText: "Control the width of the label subcomponent in the input",
|
|
126574
|
+
isVisible: function() {
|
|
126575
|
+
return !!this.label && this.labelPosition === "left";
|
|
126576
|
+
},
|
|
126552
126577
|
options: [
|
|
126553
126578
|
{
|
|
126554
126579
|
label: "Fluid",
|
|
@@ -126588,10 +126613,12 @@ const customValidationProperties = {
|
|
|
126588
126613
|
}
|
|
126589
126614
|
})
|
|
126590
126615
|
};
|
|
126591
|
-
const labelPosition = Prop.string().readAndWrite().default("top").propertiesPanel({
|
|
126616
|
+
const labelPosition = () => Prop.string().readAndWrite().default("top").propertiesPanel({
|
|
126592
126617
|
label: "Label position",
|
|
126593
126618
|
controlType: "RADIO_BUTTON_GROUP",
|
|
126594
|
-
isVisible: (
|
|
126619
|
+
isVisible: function() {
|
|
126620
|
+
return !!this.label;
|
|
126621
|
+
},
|
|
126595
126622
|
options: [
|
|
126596
126623
|
{
|
|
126597
126624
|
label: "Above",
|
|
@@ -126805,7 +126832,7 @@ const propertiesDefinition$d = {
|
|
|
126805
126832
|
})
|
|
126806
126833
|
}),
|
|
126807
126834
|
appearance: Section.category(PropsPanelCategory.Appearance).add({
|
|
126808
|
-
labelPosition,
|
|
126835
|
+
labelPosition: labelPosition(),
|
|
126809
126836
|
labelStyle: labelTextStyle(),
|
|
126810
126837
|
placeholderText: Prop.string().readAndWrite().default("Enter text").propertiesPanel({
|
|
126811
126838
|
helpText: "Sets a placeholder text for the input",
|
|
@@ -126851,23 +126878,7 @@ const propertiesDefinition$d = {
|
|
|
126851
126878
|
controlType: "SWITCH"
|
|
126852
126879
|
})
|
|
126853
126880
|
}),
|
|
126854
|
-
layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: INPUT_PADDING, default: INPUT_PADDING })).add(size$2()).add(margin()).add(
|
|
126855
|
-
// TODO: Should be before visibility props, but there's no way to do that with the layout helper
|
|
126856
|
-
Prop.union({
|
|
126857
|
-
shared: {
|
|
126858
|
-
labelPosition: Prop.string()
|
|
126859
|
-
},
|
|
126860
|
-
variants: [
|
|
126861
|
-
{
|
|
126862
|
-
labelPosition: Prop.literal("left"),
|
|
126863
|
-
labelWidth
|
|
126864
|
-
},
|
|
126865
|
-
{
|
|
126866
|
-
labelPosition: Prop.literal("top")
|
|
126867
|
-
}
|
|
126868
|
-
]
|
|
126869
|
-
})
|
|
126870
|
-
).add(visible()),
|
|
126881
|
+
layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: INPUT_PADDING, default: INPUT_PADDING })).add(size$2()).add(margin()).add({ labelWidth }).add(visible()),
|
|
126871
126882
|
interaction: Section.category(PropsPanelCategory.Interaction).add(
|
|
126872
126883
|
Prop.union({
|
|
126873
126884
|
shared: {
|
|
@@ -144426,14 +144437,14 @@ function getLoaderFn(options) {
|
|
|
144426
144437
|
if (!(loader === "all")) return [3, 3];
|
|
144427
144438
|
return [4, import(
|
|
144428
144439
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
144429
|
-
"./allPathsLoader-
|
|
144440
|
+
"./allPathsLoader-D_lTjvL4.js"
|
|
144430
144441
|
)];
|
|
144431
144442
|
case 2:
|
|
144432
144443
|
return [2, _b2.sent().allPathsLoader];
|
|
144433
144444
|
case 3:
|
|
144434
144445
|
return [4, import(
|
|
144435
144446
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
144436
|
-
"./splitPathsBySizeLoader-
|
|
144447
|
+
"./splitPathsBySizeLoader-7P9UciS4.js"
|
|
144437
144448
|
)];
|
|
144438
144449
|
case 4:
|
|
144439
144450
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -152451,14 +152462,8 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152451
152462
|
const _date = moment(date4, format3);
|
|
152452
152463
|
return _date.isValid() ? _date.toDate() : void 0;
|
|
152453
152464
|
});
|
|
152454
|
-
__publicField(this, "getNormalizedDateFormat", () => {
|
|
152455
|
-
return normalizeDateFormat(this.props.dateFormat || ISO_DATE_FORMAT);
|
|
152456
|
-
});
|
|
152457
|
-
__publicField(this, "getNormalizedDisplayDateFormat", () => {
|
|
152458
|
-
return this.props.displayDateFormat ? normalizeDateFormat(this.props.displayDateFormat) : void 0;
|
|
152459
|
-
});
|
|
152460
152465
|
__publicField(this, "shouldWrapTime", () => {
|
|
152461
|
-
const dateFormat = this.
|
|
152466
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152462
152467
|
const showTime = formatIncludesTime(dateFormat);
|
|
152463
152468
|
const timePrecision = getTimePrecision(dateFormat);
|
|
152464
152469
|
return showTime && this.props.twentyFourHourTime && timePrecision === TimePrecision.MINUTE;
|
|
@@ -152481,25 +152486,8 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152481
152486
|
}
|
|
152482
152487
|
return today.toDate();
|
|
152483
152488
|
});
|
|
152484
|
-
__publicField(this, "getCurrentValue", () => {
|
|
152485
|
-
if (this.props.selectedDate && typeof this.props.selectedDate === "string") {
|
|
152486
|
-
const dateFormat = this.getNormalizedDateFormat();
|
|
152487
|
-
const withoutTz = stripTimezoneFromString(
|
|
152488
|
-
this.props.selectedDate,
|
|
152489
|
-
dateFormat
|
|
152490
|
-
);
|
|
152491
|
-
const converted = convertDateStringTimezone(
|
|
152492
|
-
withoutTz,
|
|
152493
|
-
NO_TZ_FORMAT,
|
|
152494
|
-
this.valueTimezone,
|
|
152495
|
-
this.displayTimezone
|
|
152496
|
-
);
|
|
152497
|
-
return converted;
|
|
152498
|
-
}
|
|
152499
|
-
return null;
|
|
152500
|
-
});
|
|
152501
152489
|
__publicField(this, "getPopoverFooter", () => {
|
|
152502
|
-
const dateFormat = this.
|
|
152490
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152503
152491
|
const showTime = formatIncludesTime(dateFormat);
|
|
152504
152492
|
const shouldWrapTime = this.shouldWrapTime();
|
|
152505
152493
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -152513,7 +152501,7 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152513
152501
|
{
|
|
152514
152502
|
text: "Today",
|
|
152515
152503
|
onClick: () => {
|
|
152516
|
-
const dateFormat2 = this.
|
|
152504
|
+
const dateFormat2 = this.normalizedDateFormat;
|
|
152517
152505
|
const today = moment().tz(this.valueTimezone).format(dateFormat2);
|
|
152518
152506
|
this.props.onDateSelected(today);
|
|
152519
152507
|
},
|
|
@@ -152535,7 +152523,7 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152535
152523
|
);
|
|
152536
152524
|
});
|
|
152537
152525
|
__publicField(this, "formatDisplayDate", (date4) => {
|
|
152538
|
-
const displayDateFormat = this.
|
|
152526
|
+
const displayDateFormat = this.normalizedDisplayDateFormat ?? this.normalizedDateFormat;
|
|
152539
152527
|
const withoutTz = stripTimezoneFromDate(
|
|
152540
152528
|
date4,
|
|
152541
152529
|
displayDateFormat,
|
|
@@ -152544,7 +152532,7 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152544
152532
|
return withoutTz;
|
|
152545
152533
|
});
|
|
152546
152534
|
__publicField(this, "formatSelectedDate", (date4) => {
|
|
152547
|
-
const dateFormat = this.
|
|
152535
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152548
152536
|
const dateStr = stripTimezoneFromDate(date4, dateFormat, moment.tz.guess());
|
|
152549
152537
|
const converted = convertDateStringTimezone(
|
|
152550
152538
|
dateStr,
|
|
@@ -152555,7 +152543,7 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152555
152543
|
return converted;
|
|
152556
152544
|
});
|
|
152557
152545
|
__publicField(this, "parseSelectedDate", (dateStr) => {
|
|
152558
|
-
const dateFormat = this.
|
|
152546
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152559
152547
|
const converted = stripTimezoneFromString(dateStr, dateFormat);
|
|
152560
152548
|
return new Date(converted);
|
|
152561
152549
|
});
|
|
@@ -152563,8 +152551,8 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152563
152551
|
__publicField(this, "onInputChanged", (event) => {
|
|
152564
152552
|
const displayFormattedDateStr = event.target.value;
|
|
152565
152553
|
if (displayFormattedDateStr) {
|
|
152566
|
-
const dateFormat = this.
|
|
152567
|
-
const displayFormat = this.
|
|
152554
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152555
|
+
const displayFormat = this.normalizedDisplayDateFormat || dateFormat;
|
|
152568
152556
|
if (!isValidDate(displayFormattedDateStr)) {
|
|
152569
152557
|
this.props.onDateSelected(displayFormattedDateStr);
|
|
152570
152558
|
return;
|
|
@@ -152584,7 +152572,7 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152584
152572
|
* @param selectedDayOnly date in the local timezone
|
|
152585
152573
|
*/
|
|
152586
152574
|
__publicField(this, "onDayChanged", (selectedDayOnly) => {
|
|
152587
|
-
const dateFormat = this.
|
|
152575
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152588
152576
|
if (selectedDayOnly && (!this.props.selectedDate || !moment(this.props.selectedDate, dateFormat).isSame(
|
|
152589
152577
|
selectedDayOnly,
|
|
152590
152578
|
"days"
|
|
@@ -152629,25 +152617,48 @@ class DatePickerComponent extends React__default.Component {
|
|
|
152629
152617
|
if (!this.props.selectedDate) return;
|
|
152630
152618
|
if (prevProps.timezone !== this.props.timezone) {
|
|
152631
152619
|
const localTimezone = moment.tz.guess();
|
|
152632
|
-
const nextDate = moment.tz(this.props.selectedDate, prevProps.timezone ?? localTimezone).tz(this.props.timezone ?? localTimezone).format(this.
|
|
152620
|
+
const nextDate = moment.tz(this.props.selectedDate, prevProps.timezone ?? localTimezone).tz(this.props.timezone ?? localTimezone).format(this.normalizedDateFormat);
|
|
152633
152621
|
this.props.onDateSelected(nextDate);
|
|
152634
152622
|
}
|
|
152635
152623
|
}
|
|
152624
|
+
get normalizedDateFormat() {
|
|
152625
|
+
return normalizeDateFormat(this.props.dateFormat || ISO_DATE_FORMAT);
|
|
152626
|
+
}
|
|
152627
|
+
get normalizedDisplayDateFormat() {
|
|
152628
|
+
return this.props.displayDateFormat ? normalizeDateFormat(this.props.displayDateFormat) : void 0;
|
|
152629
|
+
}
|
|
152636
152630
|
get valueTimezone() {
|
|
152637
152631
|
return this.props.timezone || moment.tz.guess();
|
|
152638
152632
|
}
|
|
152639
152633
|
get displayTimezone() {
|
|
152640
152634
|
return this.props.displayTimezone || moment.tz.guess();
|
|
152641
152635
|
}
|
|
152636
|
+
get currentValue() {
|
|
152637
|
+
if (this.props.selectedDate && typeof this.props.selectedDate === "string") {
|
|
152638
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152639
|
+
const withoutTz = stripTimezoneFromString(
|
|
152640
|
+
this.props.selectedDate,
|
|
152641
|
+
dateFormat
|
|
152642
|
+
);
|
|
152643
|
+
const converted = convertDateStringTimezone(
|
|
152644
|
+
withoutTz,
|
|
152645
|
+
NO_TZ_FORMAT,
|
|
152646
|
+
this.valueTimezone,
|
|
152647
|
+
this.displayTimezone
|
|
152648
|
+
);
|
|
152649
|
+
return converted;
|
|
152650
|
+
}
|
|
152651
|
+
return null;
|
|
152652
|
+
}
|
|
152642
152653
|
render() {
|
|
152643
|
-
const dateFormat = this.
|
|
152644
|
-
const displayFormat = this.
|
|
152654
|
+
const dateFormat = this.normalizedDateFormat;
|
|
152655
|
+
const displayFormat = this.normalizedDisplayDateFormat || dateFormat;
|
|
152645
152656
|
const anchor = this.props.selectedDate && moment(this.props.selectedDate, dateFormat).isValid() ? moment(this.props.selectedDate, dateFormat) : moment();
|
|
152646
152657
|
const year = anchor.get("year");
|
|
152647
152658
|
const minDate = this.props.minDate ? this.getValidDate(this.props.minDate, dateFormat) : anchor.clone().set({ month: 0, date: 1, year: year - 10 }).toDate();
|
|
152648
152659
|
const maxDate = this.props.maxDate ? this.getValidDate(this.props.maxDate, dateFormat) : anchor.clone().set({ month: 11, date: 31, year: year + 10 }).toDate();
|
|
152649
152660
|
const showTime = formatIncludesTime(dateFormat);
|
|
152650
|
-
const currentValue = this.
|
|
152661
|
+
const currentValue = this.currentValue;
|
|
152651
152662
|
const timePrecision = getTimePrecision(dateFormat);
|
|
152652
152663
|
const initialMonth = this.getInitialMonth(currentValue, minDate, maxDate);
|
|
152653
152664
|
const styleVars = {
|
|
@@ -174895,22 +174906,7 @@ const propertiesDefinition$8 = {
|
|
|
174895
174906
|
})
|
|
174896
174907
|
}),
|
|
174897
174908
|
appearance: Section.category(PropsPanelCategory.Appearance).children({
|
|
174898
|
-
labelPosition:
|
|
174899
|
-
label: "Label position",
|
|
174900
|
-
controlType: "RADIO_BUTTON_GROUP",
|
|
174901
|
-
options: [
|
|
174902
|
-
{
|
|
174903
|
-
icon: "ICON_LEFT_ALIGN",
|
|
174904
|
-
value: "left",
|
|
174905
|
-
label: "Beside"
|
|
174906
|
-
},
|
|
174907
|
-
{
|
|
174908
|
-
icon: "VERTICAL_TOP",
|
|
174909
|
-
value: "top",
|
|
174910
|
-
label: "Above"
|
|
174911
|
-
}
|
|
174912
|
-
]
|
|
174913
|
-
}),
|
|
174909
|
+
labelPosition: labelPosition(),
|
|
174914
174910
|
labelStyle: labelTextStyle(),
|
|
174915
174911
|
icon: Prop.string().propertiesPanel({
|
|
174916
174912
|
label: "Icon",
|
|
@@ -175770,13 +175766,20 @@ const propertiesDefinition$6 = {
|
|
|
175770
175766
|
visibility: "SHOW_NAME"
|
|
175771
175767
|
}),
|
|
175772
175768
|
defaultDate: Prop.string().propertiesPanel({
|
|
175773
|
-
|
|
175769
|
+
controlType: "DATE_PICKER",
|
|
175770
|
+
defaultOnAdd: function() {
|
|
175771
|
+
if (this.manageTimezone) {
|
|
175772
|
+
return moment().tz(this.valueTimezone || moment.tz.guess()).format(this.dateFormat);
|
|
175773
|
+
}
|
|
175774
|
+
return moment().format(this.dateFormat);
|
|
175775
|
+
},
|
|
175774
175776
|
helpText: "Sets the default date of the component. The date is updated if the default date changes",
|
|
175777
|
+
isRemovable: true,
|
|
175778
|
+
label: "Default date",
|
|
175775
175779
|
placeholder: "Enter default date",
|
|
175776
|
-
|
|
175777
|
-
isRemovable: true
|
|
175780
|
+
visibility: "SHOW_NAME"
|
|
175778
175781
|
}).onEdit(adjustDateFormatSideEffect),
|
|
175779
|
-
dateFormat: Prop.string().readAndWrite().default(
|
|
175782
|
+
dateFormat: Prop.string().readAndWrite().default(ISO_DATE_FORMAT).propertiesPanel({
|
|
175780
175783
|
label: "Value format",
|
|
175781
175784
|
helpText: "Sets the format of the selected date",
|
|
175782
175785
|
controlType: "DROP_DOWN",
|
|
@@ -175826,22 +175829,7 @@ const propertiesDefinition$6 = {
|
|
|
175826
175829
|
}),
|
|
175827
175830
|
layout: basicLayout(),
|
|
175828
175831
|
appearance: Section.category(PropsPanelCategory.Appearance).children({
|
|
175829
|
-
labelPosition:
|
|
175830
|
-
label: "Label position",
|
|
175831
|
-
controlType: "RADIO_BUTTON_GROUP",
|
|
175832
|
-
options: [
|
|
175833
|
-
{
|
|
175834
|
-
icon: "ICON_LEFT_ALIGN",
|
|
175835
|
-
value: "left",
|
|
175836
|
-
label: "Beside"
|
|
175837
|
-
},
|
|
175838
|
-
{
|
|
175839
|
-
icon: "VERTICAL_TOP",
|
|
175840
|
-
value: "top",
|
|
175841
|
-
label: "Above"
|
|
175842
|
-
}
|
|
175843
|
-
]
|
|
175844
|
-
}),
|
|
175832
|
+
labelPosition: labelPosition(),
|
|
175845
175833
|
labelStyle: labelTextStyle(),
|
|
175846
175834
|
// TODO(code-mode): Add color pickers, border controls, etc.
|
|
175847
175835
|
icon: Prop.string().readAndWrite().default("calendar_today").propertiesPanel({
|
|
@@ -175904,16 +175892,16 @@ const propertiesDefinition$6 = {
|
|
|
175904
175892
|
if (this.isRequired && !this.selectedDate) {
|
|
175905
175893
|
errors2.isRequired = "Required";
|
|
175906
175894
|
}
|
|
175907
|
-
if (this.selectedDate && this.dateFormat && !
|
|
175895
|
+
if (this.selectedDate && this.dateFormat && !moment(this.selectedDate, this.dateFormat, true).isValid()) {
|
|
175908
175896
|
errors2.dateInvalid = "Invalid date";
|
|
175909
175897
|
}
|
|
175910
|
-
if (this.minDate && this.selectedDate &&
|
|
175911
|
-
|
|
175898
|
+
if (this.minDate && this.selectedDate && moment(this.selectedDate, this.dateFormat).isBefore(
|
|
175899
|
+
moment(this.minDate, this.dateFormat)
|
|
175912
175900
|
)) {
|
|
175913
175901
|
errors2.minDate = "Date must be greater than or equal to " + this.minDate;
|
|
175914
175902
|
}
|
|
175915
|
-
if (this.maxDate && this.selectedDate &&
|
|
175916
|
-
|
|
175903
|
+
if (this.maxDate && this.selectedDate && moment(this.selectedDate, this.dateFormat).isAfter(
|
|
175904
|
+
moment(this.maxDate, this.dateFormat)
|
|
175917
175905
|
)) {
|
|
175918
175906
|
errors2.maxDate = "Date must be less than or equal to " + this.maxDate;
|
|
175919
175907
|
}
|
|
@@ -175926,12 +175914,12 @@ const propertiesDefinition$6 = {
|
|
|
175926
175914
|
return Object.keys(this.validationErrors ?? {}).length === 0;
|
|
175927
175915
|
}),
|
|
175928
175916
|
outputDateLocal: Prop.string().readable().default(function() {
|
|
175929
|
-
return
|
|
175917
|
+
return moment(this.selectedDate, this.dateFormat).format(
|
|
175930
175918
|
"YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
175931
175919
|
);
|
|
175932
175920
|
}),
|
|
175933
175921
|
outputDateUtc: Prop.string().readable().default(function() {
|
|
175934
|
-
return
|
|
175922
|
+
return moment(this.selectedDate, this.dateFormat).toISOString();
|
|
175935
175923
|
}),
|
|
175936
175924
|
showError: Prop.boolean().readable().default(function() {
|
|
175937
175925
|
const hasValue2 = !!this.value;
|
|
@@ -177709,6 +177697,11 @@ const EmbedWrapper = (props) => {
|
|
|
177709
177697
|
"sb-create-component",
|
|
177710
177698
|
createComponentListener
|
|
177711
177699
|
);
|
|
177700
|
+
const globalSyncListener = (event) => {
|
|
177701
|
+
const { global: global2 } = event.data.payload;
|
|
177702
|
+
updateGlobalScope(global2);
|
|
177703
|
+
};
|
|
177704
|
+
iframeMessageHandler.addEventListener("sb-global-sync", globalSyncListener);
|
|
177712
177705
|
return () => {
|
|
177713
177706
|
iframeMessageHandler.removeEventListener(
|
|
177714
177707
|
"sb-bootstrap-response",
|
|
@@ -177730,6 +177723,10 @@ const EmbedWrapper = (props) => {
|
|
|
177730
177723
|
"sb-create-component",
|
|
177731
177724
|
createComponentListener
|
|
177732
177725
|
);
|
|
177726
|
+
iframeMessageHandler.removeEventListener(
|
|
177727
|
+
"sb-global-sync",
|
|
177728
|
+
globalSyncListener
|
|
177729
|
+
);
|
|
177733
177730
|
};
|
|
177734
177731
|
}, []);
|
|
177735
177732
|
useEffect(() => {
|
|
@@ -190974,4 +190971,4 @@ export {
|
|
|
190974
190971
|
copyToClipboard as y,
|
|
190975
190972
|
navigateTo as z
|
|
190976
190973
|
};
|
|
190977
|
-
//# sourceMappingURL=index-
|
|
190974
|
+
//# sourceMappingURL=index-9cqMj15O.js.map
|